protected function _beforeControllerAdd(AnCommandContext $context)
    {
        if (!$context->data['owner'] instanceof ComActorsDomainEntityActor) {
            if ($this->getRepository()->hasBehavior('ownable')) {
                $context->data['owner'] = $this->actor;
            }
        }
    }
protected function _beforeControllerAdd(AnCommandContext $context)
    {
        if (!$context->data['owner'] instanceof ComActorsDomainEntityActor) {
            if ($this->getRepository()->hasBehavior('ownable')) {
                $context->data['owner'] = $this->actor;
            }
        }
    }
protected function _beforeControllerAdd ( AnCommandContext $ context ) { if ( ! $ context -> data [ 'owner' ] instanceof ComActorsDomainEntityActor ) { if ( $ this -> getRepository ( ) -> hasBehavior ( 'ownable' ) ) { $ context -> data [ 'owner' ] = $ this -> actor ; } } }
If the context->data actor is not already set them set the owner to the data
before controller add.

@param AnCommandContext $context

@return bool
If the context - > data actor is not already set them set the owner to the data before controller add .