Back to Workflow class

Method getConditionName

public string
getConditionName
(int $value)
Returns the translated condition name, based on the given number
Parameters
  • int $value The condition ID
Returns
  • string
Since
  • 4.0.0
Class: Workflow
Project: Joomla

Method getConditionName - Source code

/**
 * Returns the translated condition name, based on the given number
 *
 * @param   integer  $value  The condition ID
 *
 * @return  string
 *
 * @since   4.0.0
 */
public function getConditionName(int $value) : string
{
    $component = $this->getComponent();
    if ($component instanceof WorkflowServiceInterface) {
        $conditions = $component->getConditions($this->extension);
    } else {
        $conditions = self::CONDITION_NAMES;
    }
    return ArrayHelper::getValue($conditions, $value, '', 'string');
}