protected function _actionAdd(AnCommandContext $context)
    {
        $entity = parent::_actionAdd($context);

        if ($entity->isPortraitable() && AnRequest::has('files.portrait')) {
            $file = AnRequest::get('files.portrait', 'raw');

            if ($this->bellowSizeLimit($file) && $file['error'] == 0) {
                $entity->setPortrait(array(
                   'url' => $file['tmp_name'],
                   'mimetype' => $file['type'],
                   )
               );
            }
        }

        return $entity;
    }
protected function _actionAdd(AnCommandContext $context)
    {
        $entity = parent::_actionAdd($context);

        if ($entity->isPortraitable() && AnRequest::has('files.portrait')) {
            $file = AnRequest::get('files.portrait', 'raw');

            if ($this->bellowSizeLimit($file) && $file['error'] == 0) {
                $entity->setPortrait(array(
                   'url' => $file['tmp_name'],
                   'mimetype' => $file['type'],
                   )
               );
            }
        }

        return $entity;
    }
protected function _actionAdd ( AnCommandContext $ context ) { $ entity = parent :: _actionAdd ( $ context ) ; if ( $ entity -> isPortraitable ( ) && AnRequest :: has ( 'files.portrait' ) ) { $ file = AnRequest :: get ( 'files.portrait' , 'raw' ) ; if ( $ this -> bellowSizeLimit ( $ file ) && $ file [ 'error' ] == 0 ) { $ entity -> setPortrait ( array ( 'url' => $ file [ 'tmp_name' ] , 'mimetype' => $ file [ 'type' ] , ) ) ; } } return $ entity ; }
Add an actor.

@param AnCommandContext $context Context parameter

@return AnDomainEntityAbstract
Add an actor .