Imbo\Model\Group::setName PHP 메소드

setName() 공개 메소드

Set the group name
public setName ( string $name ) : self
$name string The name of the group
리턴 self
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

Usage Example

예제 #1
0
파일: Group.php 프로젝트: imbo/imbo
 /**
  * Get the resources associated with a specific group
  *
  * @param EventInterface $event The current event
  */
 public function getGroup(EventInterface $event)
 {
     $route = $event->getRequest()->getRoute();
     $groupName = $route->get('group');
     $adapter = $event->getAccessControl();
     if (!$adapter->groupExists($groupName)) {
         throw new ResourceException('Resource group not found', 404);
     }
     $resources = $adapter->getGroup($groupName);
     $model = new GroupModel();
     $model->setName($groupName);
     $model->setResources($resources);
     $response = $event->getResponse();
     $response->setModel($model);
 }
All Usage Examples Of Imbo\Model\Group::setName