eZPublishCommunityProject  2013.4
eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler Class Reference

Section Handler. More...

+ Inheritance diagram for eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler:
+ Collaboration diagram for eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler:

Public Member Functions

 __construct (Gateway $sectionGateway)
 Creates a new Section Handler. More...
 
 assign ($sectionId, $contentId)
 Assigns section to single content object. More...
 
 assignmentsCount ($sectionId)
 Number of content assignments a Section has. More...
 
 create ($name, $identifier)
 Create a new section. More...
 
 delete ($id)
 Delete a section. More...
 
 load ($id)
 Get section data. More...
 
 loadAll ()
 Get all section data. More...
 
 loadByIdentifier ($identifier)
 Get section data by identifier. More...
 
 update ($id, $name, $identifier)
 Update name and identifier of a section. More...
 

Protected Member Functions

 createSectionFromArray (array $data)
 Creates a Section from the given $data. More...
 
 createSectionsFromArray (array $data)
 Creates a Section from the given $data. More...
 

Protected Attributes

 $sectionGateway
 

Detailed Description

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::__construct ( Gateway  $sectionGateway)

Creates a new Section Handler.

Parameters
\eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway$sectionGateway

Member Function Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::assign (   $sectionId,
  $contentId 
)

Assigns section to single content object.

Parameters
mixed$sectionId
mixed$contentId

Implements eZ\Publish\SPI\Persistence\Content\Section\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::assignmentsCount (   $sectionId)

Number of content assignments a Section has.

Parameters
mixed$sectionId
Returns
int

Implements eZ\Publish\SPI\Persistence\Content\Section\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::create (   $name,
  $identifier 
)

Create a new section.

Parameters
string$name
string$identifier
Returns

Implements eZ\Publish\SPI\Persistence\Content\Section\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::createSectionFromArray ( array  $data)
protected
eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::createSectionsFromArray ( array  $data)
protected

Creates a Section from the given $data.

Parameters
array$data
Returns
[]

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler\loadAll().

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::delete (   $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

Implements eZ\Publish\SPI\Persistence\Content\Section\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::load (   $id)

Get section data.

Parameters
mixed$id
Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionIf section is not found
Returns

Implements eZ\Publish\SPI\Persistence\Content\Section\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::loadAll ( )

Get all section data.

Returns
[]

Implements eZ\Publish\SPI\Persistence\Content\Section\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::loadByIdentifier (   $identifier)

Get section data by identifier.

Parameters
string$identifier
Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionIf section is not found
Returns

Implements eZ\Publish\SPI\Persistence\Content\Section\Handler.

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::update (   $id,
  $name,
  $identifier 
)

Update name and identifier of a section.

Parameters
mixed$id
string$name
string$identifier
Returns

Implements eZ\Publish\SPI\Persistence\Content\Section\Handler.

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler::$sectionGateway
protected

The documentation for this class was generated from the following file: