Example #1
0
 /**
  * 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;
 }
Example #2
0
 public function getNoteTitle($actionName, $formData)
 {
     $config = $this->workflow->getActionConfig($actionName);
     if (!empty($config['note_title'])) {
         return $config['note_title'];
     }
     if ($this->workflow->isGlobalAction($actionName) || $formData['oldStatus'] === $formData['newStatus']) {
         return $this->getActionLabel($actionName);
     }
     return $this->getStatusLabel($formData['oldStatus']) . ' ->' . $this->getStatusLabel($formData['newStatus']);
 }