예제 #1
0
 public function getStatusLabel($statusName)
 {
     if (!$this->workflow) {
         throw new \Exception('Decorator needs a workflow to produce labels');
     }
     $config = $this->workflow->getStatusConfig($statusName);
     return $this->translateLabel($config['label']);
 }
예제 #2
0
파일: Manager.php 프로젝트: pimcore/pimcore
 /**
  * Returns the objects layout configuration given the current place in the workflow
  * If no layout is specified then null will be returned
  * @return string|null
  */
 public function getObjectLayout()
 {
     $statusConfig = $this->workflow->getStatusConfig($this->getElementStatus());
     if (!empty($statusConfig['objectLayout']) && is_numeric($statusConfig['objectLayout'])) {
         return $statusConfig['objectLayout'];
     }
     return null;
 }