eZ\Publish\Core\Repository\Tests\Service\Integration\ContentTypeBase::createGroups PHP Метод

createGroups() защищенный Метод

Creates a number of ContentTypeGroup objects and returns them.
protected createGroups ( ) : eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup[]
Результат eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup[]
    protected function createGroups()
    {
        if (empty($this->contentTypeGroups)) {
            $contentTypeService = $this->repository->getContentTypeService();
            $groupCreate = $contentTypeService->newContentTypeGroupCreateStruct('first-group');
            $groupCreate->creatorId = $this->repository->getCurrentUserReference()->getUserId();
            $groupCreate->creationDate = new \DateTime();
            // @todo uncomment when support for multilingual names and descriptions is added EZP-24776
            //$groupCreate->mainLanguageCode = 'de_DE';
            //$groupCreate->names = array( 'en_US' => 'A name.' );
            //$groupCreate->descriptions = array( 'en_US' => 'A description.' );
            $this->contentTypeGroups[] = $contentTypeService->createContentTypeGroup($groupCreate);
            $groupCreate->identifier = 'second-group';
            $this->contentTypeGroups[] = $contentTypeService->createContentTypeGroup($groupCreate);
        }
        return $this->contentTypeGroups;
    }
ContentTypeBase