public function create(array $data, MembershipInterface $author): PodiumResponse
    {
        /* @var $categoryForm AuthoredFormInterface */
        $categoryForm = $this->getForm();

        $categoryForm->setAuthor($author);

        if (!$categoryForm->loadData($data)) {
            return PodiumResponse::error();
        }

        return $categoryForm->create();
    }
public function create(array $data, MembershipInterface $author): PodiumResponse
    {
        /* @var $categoryForm AuthoredFormInterface */
        $categoryForm = $this->getForm();

        $categoryForm->setAuthor($author);

        if (!$categoryForm->loadData($data)) {
            return PodiumResponse::error();
        }

        return $categoryForm->create();
    }
public function create ( array $ data , MembershipInterface $ author ) : PodiumResponse { /* @var $categoryForm AuthoredFormInterface */ $ categoryForm = $ this -> getForm ( ) ; $ categoryForm -> setAuthor ( $ author ) ; if ( ! $ categoryForm -> loadData ( $ data ) ) { return PodiumResponse :: error ( ) ; } return $ categoryForm -> create ( ) ; }
Creates category.
@param array $data
@param MembershipInterface $author
@return PodiumResponse
Creates category .