Class

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler

class Handler implements Handler

Section Handler.

Methods

__construct(Gateway $sectionGateway)

Creates a new Section Handler.

Section create(string $name, string $identifier)

Create a new section.

Section update(mixed $id, string $name, string $identifier)

Update name and identifier of a section.

Section load(mixed $id)

Get section data.

Section[] loadAll()

Get all section data.

Section loadByIdentifier(string $identifier)

Get section data by identifier.

delete(mixed $id)

Delete a section.

assign(mixed $sectionId, mixed $contentId)

Assigns section to single content object.

int assignmentsCount(mixed $sectionId)

Number of content assignments a Section has.

int policiesCount(mixed $sectionId)

Number of role policies using a Section in limitations.

int countRoleAssignmentsUsingSection(int $sectionId)

Counts the number of role assignments using section with $sectionId in their limitations.

Details

at line 33
public __construct(Gateway $sectionGateway)

Creates a new Section Handler.

Parameters

Gateway $sectionGateway

at line 46
public Section create(string $name, string $identifier)

Create a new section.

Parameters

string $name
string $identifier

Return Value

Section

at line 67
public Section update(mixed $id, string $name, string $identifier)

Update name and identifier of a section.

Parameters

mixed $id
string $name
string $identifier

Return Value

Section

at line 88
public Section load(mixed $id)

Get section data.

Parameters

mixed $id

Return Value

Section

Exceptions

NotFoundException If section is not found

at line 104
public Section[] loadAll()

Get all section data.

Return Value

Section[]

at line 120
public Section loadByIdentifier(string $identifier)

Get section data by identifier.

Parameters

string $identifier

Return Value

Section

Exceptions

NotFoundException If section is not found

at line 175
public delete(mixed $id)

Delete a section.

Might throw an exception if the section is still associated with some content objects. Make sure that no content objects are associated with the section any more before calling this method.

Parameters

mixed $id

at line 193
public assign(mixed $sectionId, mixed $contentId)

Assigns section to single content object.

Parameters

mixed $sectionId
mixed $contentId

at line 205
public int assignmentsCount(mixed $sectionId)

Number of content assignments a Section has.

Parameters

mixed $sectionId

Return Value

int

at line 217
public int policiesCount(mixed $sectionId)

Number of role policies using a Section in limitations.

Parameters

mixed $sectionId

Return Value

int

at line 229
public int countRoleAssignmentsUsingSection(int $sectionId)

Counts the number of role assignments using section with $sectionId in their limitations.

Parameters

int $sectionId

Return Value

int