eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway::createNodeAssignment PHP Method

createNodeAssignment() abstract public method

Create an entry in the node assignment table.
abstract public createNodeAssignment ( eZ\Publish\SPI\Persistence\Content\Location\CreateStruct $createStruct, mixed $parentNodeId, integer $type = self::NODE_ASSIGNMENT_OP_CODE_CREATE_NOP )
$createStruct eZ\Publish\SPI\Persistence\Content\Location\CreateStruct
$parentNodeId mixed
$type integer
    public abstract function createNodeAssignment(CreateStruct $createStruct, $parentNodeId, $type = self::NODE_ASSIGNMENT_OP_CODE_CREATE_NOP);

Usage Example

Beispiel #1
0
 /**
  * Creates a new location rooted at $location->parentId.
  *
  * @param \eZ\Publish\SPI\Persistence\Content\Location\CreateStruct $createStruct
  *
  * @return \eZ\Publish\SPI\Persistence\Content\Location
  */
 public function create(CreateStruct $createStruct)
 {
     $parentNodeData = $this->locationGateway->getBasicNodeData($createStruct->parentId);
     $locationStruct = $this->locationGateway->create($createStruct, $parentNodeData);
     $this->locationGateway->createNodeAssignment($createStruct, $parentNodeData['node_id'], LocationGateway::NODE_ASSIGNMENT_OP_CODE_CREATE_NOP);
     return $locationStruct;
 }
All Usage Examples Of eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway::createNodeAssignment