Pimcore\Model\Document::getId PHP Method

getId() public method

Returns the document id.
public getId ( ) : integer
return integer
    public function getId()
    {
        return (int) $this->id;
    }

Usage Example

コード例 #1
0
ファイル: Manager.php プロジェクト: pimcore/pimcore
 /**
  * Returns the available statuses given an action and a state
  *
  * @param $actionName
  * @param $stateName
  * @return array
  * @throws \Exception
  */
 public function getAvailableStatuses($actionName, $stateName)
 {
     $actionConfig = $this->workflow->getActionConfig($actionName);
     $globalAction = $this->workflow->isGlobalAction($actionName);
     $hasTransition = $this->actionHasTransition($actionConfig);
     if ($globalAction || !$hasTransition) {
         $objectStatus = $this->getElementStatus();
         $availableStatuses = [$objectStatus => $this->workflow->getStatusConfig($objectStatus)];
     } else {
         //we have a check here for the state being an existing one
         if (!isset($actionConfig['transitionTo'][$stateName])) {
             throw new \Exception("Workflow::getAvailableStatuses, State [{$stateName}] not valid for action [{$actionName}] on element [{$this->element->getId()}] with status [{$this->getElementStatus()}]");
         }
         $availableStatuses = [];
         foreach ($actionConfig['transitionTo'][$stateName] as $statusName) {
             $availableStatuses[$statusName] = $this->workflow->getStatusConfig($statusName);
         }
     }
     return $availableStatuses;
 }
All Usage Examples Of Pimcore\Model\Document::getId