protected function _actionAdd(AnCommandContext $context)
    {
        $context->response->status = AnHttpResponse::CREATED;
        $entity = $this->getRepository()->getEntity()->setData($context['data']);
        $this->setItem($entity);

        return $this->getItem();
    }
protected function _actionAdd(AnCommandContext $context)
    {
        $context->response->status = AnHttpResponse::CREATED;
        $entity = $this->getRepository()->getEntity()->setData($context['data']);
        $this->setItem($entity);

        return $this->getItem();
    }
protected function _actionAdd ( AnCommandContext $ context ) { $ context -> response -> status = AnHttpResponse :: CREATED ; $ entity = $ this -> getRepository ( ) -> getEntity ( ) -> setData ( $ context [ 'data' ] ) ; $ this -> setItem ( $ entity ) ; return $ this -> getItem ( ) ; }
Add Action.

@param AnCommandContext $context Context parameter

@return AnDomainEntityAbstract
Add Action .