getElementWorkflowConfig() public static method

gets workflow config for element. always returns first valid workflow config
public static getElementWorkflowConfig ( AbstractElement $element ) : array
$element Pimcore\Model\Element\AbstractElement
return array
Example #1
0
 /**
  * Returns whether or not an element has a workflow
  * @param Asset|ConcreteObject|Document $element
  * @return bool
  */
 public static function elementHasWorkflow(AbstractElement $element)
 {
     $config = Workflow\Config::getElementWorkflowConfig($element);
     if (is_array($config)) {
         return true;
     }
     return false;
 }