/** * @return Psc\CMS\Action|Psc\CMS\ActionMeta */ public function action($entityOrMeta, $verb, $subResource = NULL) { if (is_string($entityOrMeta)) { $entityOrMeta = $this->entityMetaProvider->getEntityMeta($entityOrMeta); } return new Action($entityOrMeta, $verb, $subResource); }
/** * Returns the EntityMeta for specific or general type * * Attention: When type is specific $dc is not optional! * @return Psc\CMS\EntityMeta */ public function getEntityMeta(EntityMetaProvider $entityMetaProvider = NULL) { if (!isset($this->entityMeta) && $this->type === self::SPECIFIC) { if (!isset($entityMetaProvider)) { throw new \LogicException('Missing Parameter 1 (EntityMetaProvider) for ' . __FUNCTION__); } $this->entityMeta = $entityMetaProvider->getEntityMeta($this->entity->getEntityName()); } return $this->entityMeta; }