PHP Class Newscoop\Service\Implementation\ArticleTypeServiceDoctrine

Inheritance: implements Newscoop\Service\IArticleTypeService
Afficher le fichier Open project: sourcefabric/newscoop

Protected Properties

Свойство Type Description
$em Doctrine\ORM\EntityManager
$id Newscoop\Service\Resource\ResourceId

Méthodes publiques

Méthode Description
__construct ( ResourceId $id ) Construct the service base d on the provided resource id.
create ( string $name ) : ArticleType Creates an article type
createField ( string $name, ArticleType $type, array $props = null ) : ArticleTypeField Creates a field
createMany ( array $articleTypes ) Creates more article types
findAllTypes ( )
findFieldByName ( ArticleType $type, $name )
findFields ( ArticleType $type )
findTypeByName ( $name )
getCount ( Search $search = NULL )

Méthodes protégées

Méthode Description
getManager ( ) : Doctrine\ORM\EntityManager Provides the dictrine entity manager.
getResourceId ( ) : Newscoop\Services\Resource\ResourceId Provides the resource id.

Private Methods

Méthode Description
_create ( $name )
_createField ( $name, ArticleType $type, $props = null )

Method Details

__construct() public méthode

Construct the service base d on the provided resource id.
public __construct ( ResourceId $id )
$id Newscoop\Service\Resource\ResourceId The resource id, not null not empty

create() public méthode

Creates an article type
public create ( string $name ) : ArticleType
$name string the name of the new article type, not null
Résultat Newscoop\Entity\ArticleType

createField() public méthode

Creates a field
public createField ( string $name, ArticleType $type, array $props = null ) : ArticleTypeField
$name string the name of the article type field, not null
$type Newscoop\Entity\ArticleType
$props array properies of the field @see Newscoop\Entity\ArticleType
Résultat Newscoop\Entity\ArticleTypeField

createMany() public méthode

Creates more article types
See also: self::create()
public createMany ( array $articleTypes )
$articleTypes array the array of types, optionally with fields [ typeName => [ fields : [ name : fieldName, parentType : typeName, ignore : bool ], [...] ], [...] ]

findAllTypes() public méthode

public findAllTypes ( )

findFieldByName() public méthode

public findFieldByName ( ArticleType $type, $name )
$type Newscoop\Entity\ArticleType

findFields() public méthode

public findFields ( ArticleType $type )
$type Newscoop\Entity\ArticleType

findTypeByName() public méthode

public findTypeByName ( $name )

getCount() public méthode

public getCount ( Search $search = NULL )
$search Search

getManager() protected méthode

Provides the dictrine entity manager.
protected getManager ( ) : Doctrine\ORM\EntityManager
Résultat Doctrine\ORM\EntityManager The doctrine entity manager.

getResourceId() protected méthode

Provides the resource id.
protected getResourceId ( ) : Newscoop\Services\Resource\ResourceId
Résultat Newscoop\Services\Resource\ResourceId The resource id.

Property Details

$em protected_oe property

protected Doctrine\ORM\EntityManager $em
Résultat Doctrine\ORM\EntityManager

$id protected_oe property

protected ResourceId,Newscoop\Service\Resource $id
Résultat Newscoop\Service\Resource\ResourceId