activity/logger/logger.php
public function getActivityObject(KCommandInterface $command)
    {
        $parts = explode('.', $command->getName());

        // Properly fetch data for the event.
        if ($parts[0] == 'before') {
            $object = $command->getSubject()->getModel()->fetch();
        } else {
            $object = $command->result;
        }

        return $object;
    }
public function getActivityObject(KCommandInterface $command)
    {
        $parts = explode('.', $command->getName());

        // Properly fetch data for the event.
        if ($parts[0] == 'before') {
            $object = $command->getSubject()->getModel()->fetch();
        } else {
            $object = $command->result;
        }

        return $object;
    }
public function getActivityObject ( KCommandInterface $ command ) { $ parts = explode ( '.' , $ command -> getName ( ) ) ; // Properly fetch data for the event. if ( $ parts [ 0 ] == 'before' ) { $ object = $ command -> getSubject ( ) -> getModel ( ) -> fetch ( ) ; } else { $ object = $ command -> result ; } return $ object ; }
Get the activity object.

The activity object is the entity on which the action is executed.

@param KCommandInterface $command The command.

@return KModelEntityInterface The activity object.
Get the activity object .