eZPublishCommunityProject  2012.12
eZ\Publish\Core\Persistence\InMemory\LocationHandler Class Reference
+ Inheritance diagram for eZ\Publish\Core\Persistence\InMemory\LocationHandler:
+ Collaboration diagram for eZ\Publish\Core\Persistence\InMemory\LocationHandler:

Public Member Functions

 __construct (Handler $handler, Backend $backend)
 Setups current handler instance with reference to Handler object that created it. More...
 
 changeMainLocation ($contentId, $locationId)
 Changes main location of content identified by given $contentId to location identified by given $locationId. More...
 
 copySubtree ($sourceId, $destinationParentId)
 
 create (CreateStruct $locationStruct)
 
 createCustomUrlAlias ($alias, $locationId, $forwarding=false, $languageCode=null, $alwaysAvailable=false)
 
 createUrlHistoryEntry ($historicUrl, $locationId)
 
 delete ($locationId)
 Removes a location from its $locationId (but not its descendants) Content which looses its main Location will get the first of its other Locations assigned as the new main Location. More...
 
 getPath ($locationId, $language)
 
 hide ($id)
 
 listUrlsForLocation ($locationId, $urlType)
 
 load ($locationId)
 
 loadByParentId ($locationId)
 Returns locations given a parent $locationId. More...
 
 loadByRemoteId ($remoteId)
 Loads the data for the location identified by $remoteId. More...
 
 loadLocationsByContent ($contentId, $rootLocationId=null)
 Loads all locations for $contentId, optionally limited to a sub tree identified by $rootLocationId. More...
 
 markSubtreeModified ($locationId, $timestamp=null)
 
 move ($sourceId, $destinationParentId)
 
 removeSubtree ($locationId)
 
 removeUrlsForLocation ($locationId, array $urlIdentifier)
 
 setSectionForSubtree ($locationId, $sectionId)
 
 storeUrlAliasPath ($path, $locationId, $languageCode=null, $alwaysAvailable=false)
 
 swap ($locationId1, $locationId2)
 
 unHide ($id)
 
 update (UpdateStruct $location, $locationId)
 
- Public Member Functions inherited from eZ\Publish\SPI\Persistence\Content\Location\Handler
 create (CreateStruct $location)
 Creates a new location rooted at $location->parentId. More...
 

Public Attributes

const CHARS_ACCENT = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËéèêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ'
 
const CHARS_NOACCENT = 'AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn'
 

Protected Member Functions

 getSubtreeLocations ($location, &$locations=array())
 Get all subtree locations for the given location (including), sorted by path string. More...
 

Protected Attributes

 $backend
 
 $handler
 

Private Member Functions

 getParentPathString ($pathString)
 Returns parent path string for $pathString. More...
 
 getPathIdentificationString (LocationValue $vo)
 Returns pathIdentificationString for provided location value object. More...
 
 getStrippedContentName (LocationValue $vo)
 Returns stripped content name from location value All downcase, special chars to underscores e.g. More...
 

Detailed Description

See Also
eZ

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\InMemory\LocationHandler::__construct ( Handler  $handler,
Backend  $backend 
)

Setups current handler instance with reference to Handler object that created it.

Parameters
Handler$handler
Backend$backendThe storage engine backend

Member Function Documentation

eZ\Publish\Core\Persistence\InMemory\LocationHandler::changeMainLocation (   $contentId,
  $locationId 
)

Changes main location of content identified by given $contentId to location identified by given $locationId.

Parameters
mixed$contentId
mixed$locationId
Returns
void

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

Referenced by eZ\Publish\Core\Persistence\InMemory\LocationHandler\copySubtree().

eZ\Publish\Core\Persistence\InMemory\LocationHandler::copySubtree (   $sourceId,
  $destinationParentId 
)
eZ\Publish\Core\Persistence\InMemory\LocationHandler::create ( CreateStruct  $locationStruct)
eZ\Publish\Core\Persistence\InMemory\LocationHandler::createCustomUrlAlias (   $alias,
  $locationId,
  $forwarding = false,
  $languageCode = null,
  $alwaysAvailable = false 
)
See Also
eZ
eZ\Publish\Core\Persistence\InMemory\LocationHandler::createUrlHistoryEntry (   $historicUrl,
  $locationId 
)
See Also
eZ
eZ\Publish\Core\Persistence\InMemory\LocationHandler::delete (   $locationId)

Removes a location from its $locationId (but not its descendants) Content which looses its main Location will get the first of its other Locations assigned as the new main Location.

If content has no location left, it's removed from backend

Parameters
mixed$locationId
eZ\Publish\Core\Persistence\InMemory\LocationHandler::getParentPathString (   $pathString)
private

Returns parent path string for $pathString.

Parameters
string$pathString
Returns
string
eZ\Publish\Core\Persistence\InMemory\LocationHandler::getPath (   $locationId,
  $language 
)
See Also
eZ
eZ\Publish\Core\Persistence\InMemory\LocationHandler::getPathIdentificationString ( LocationValue  $vo)
private

Returns pathIdentificationString for provided location value object.

Parameters
\eZ\Publish\SPI\Persistence\Content\Location$vo
Returns
string

Referenced by eZ\Publish\Core\Persistence\InMemory\LocationHandler\create(), and eZ\Publish\Core\Persistence\InMemory\LocationHandler\move().

eZ\Publish\Core\Persistence\InMemory\LocationHandler::getStrippedContentName ( LocationValue  $vo)
private

Returns stripped content name from location value All downcase, special chars to underscores e.g.

my_content_name

Parameters
LocationValue$vo
Returns
string

Referenced by eZ\Publish\Core\Persistence\InMemory\LocationHandler\getPathIdentificationString(), and eZ\Publish\Core\Persistence\InMemory\LocationHandler\move().

eZ\Publish\Core\Persistence\InMemory\LocationHandler::getSubtreeLocations (   $location,
$locations = array() 
)
protected

Get all subtree locations for the given location (including), sorted by path string.

Parameters
\eZ\Publish\SPI\Persistence\Content\Location$location
array$locations
Returns
array

Referenced by eZ\Publish\Core\Persistence\InMemory\LocationHandler\copySubtree().

eZ\Publish\Core\Persistence\InMemory\LocationHandler::hide (   $id)
eZ\Publish\Core\Persistence\InMemory\LocationHandler::listUrlsForLocation (   $locationId,
  $urlType 
)
See Also
eZ
eZ\Publish\Core\Persistence\InMemory\LocationHandler::loadByParentId (   $locationId)

Returns locations given a parent $locationId.

Todo:
Requires approbation
Parameters
mixed$locationId
Returns
[]
eZ\Publish\Core\Persistence\InMemory\LocationHandler::loadByRemoteId (   $remoteId)

Loads the data for the location identified by $remoteId.

Parameters
string$remoteId
Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundException
Returns

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

eZ\Publish\Core\Persistence\InMemory\LocationHandler::loadLocationsByContent (   $contentId,
  $rootLocationId = null 
)

Loads all locations for $contentId, optionally limited to a sub tree identified by $rootLocationId.

Parameters
int$contentId
int$rootLocationId
Todo:
Add support for $rootLocationId when not child of node 1
Returns
[]

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

eZ\Publish\Core\Persistence\InMemory\LocationHandler::markSubtreeModified (   $locationId,
  $timestamp = null 
)
eZ\Publish\Core\Persistence\InMemory\LocationHandler::move (   $sourceId,
  $destinationParentId 
)
eZ\Publish\Core\Persistence\InMemory\LocationHandler::removeSubtree (   $locationId)
eZ\Publish\Core\Persistence\InMemory\LocationHandler::removeUrlsForLocation (   $locationId,
array  $urlIdentifier 
)
See Also
eZ
eZ\Publish\Core\Persistence\InMemory\LocationHandler::setSectionForSubtree (   $locationId,
  $sectionId 
)
eZ\Publish\Core\Persistence\InMemory\LocationHandler::storeUrlAliasPath (   $path,
  $locationId,
  $languageCode = null,
  $alwaysAvailable = false 
)
See Also
eZ
eZ\Publish\Core\Persistence\InMemory\LocationHandler::swap (   $locationId1,
  $locationId2 
)
eZ\Publish\Core\Persistence\InMemory\LocationHandler::unHide (   $id)
eZ\Publish\Core\Persistence\InMemory\LocationHandler::update ( UpdateStruct  $location,
  $locationId 
)

Member Data Documentation

eZ\Publish\Core\Persistence\InMemory\LocationHandler::$backend
protected
eZ\Publish\Core\Persistence\InMemory\LocationHandler::$handler
protected
const eZ\Publish\Core\Persistence\InMemory\LocationHandler::CHARS_ACCENT = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËéèêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ'
const eZ\Publish\Core\Persistence\InMemory\LocationHandler::CHARS_NOACCENT = 'AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn'

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