<commit_before><?php
/*"******************************************************************************************************
*   (c) 2004-2006 by MulchProductions, www.mulchprod.de                                                 *
*   (c) 2007-2016 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
********************************************************************************************************/

namespace Kajona\Flow\System;

use Kajona\System\System\AdminListableInterface;
use Kajona\System\System\Model;
use Kajona\System\System\ModelInterface;
use Kajona\System\System\Objectfactory;

/**
 * FlowTransition
 *
 * @author <EMAIL>
 * @targetTable flow_step_transition.transition_id
 * @module flow
 * @moduleId _flow_module_id_
 * @formGenerator Kajona\Flow\Admin\FlowTransitionFormgenerator
 */
class FlowTransition extends Model implements ModelInterface, AdminListableInterface
{
    /**
     * @var string
     * @tableColumn flow_step_transition.target_step
     * @tableColumnDatatype char254
     * @fieldType Kajona\System\Admin\Formentries\FormentryDropdown
     * @fieldMandatory
     */
    protected $strTargetStatus;

    /**
     * @return string
     */
    public function getStrTargetStatus()
    {
        return $this->strTargetStatus;
    }

    /**
     * @param string $strTargetStatus
     */
    public function setStrTargetStatus(string $strTargetStatus)
    {
        $this->strTargetStatus = $strTargetStatus;
    }

    /**
     * @return FlowStatus
     */
    public function getTargetStatus()
    {
        return Objectfactory::getInstance()->getObject($this->strTargetStatus);
    }

    /**
     * @return FlowActionAbstract[]
     */
    public function getArrActions()
    {
        return FlowActionAbstract::getObjectListFiltered(null, $this->getSystemid());
    }

    /**
     * @return FlowConditionAbstract[]
     */
    public function getArrConditions()
    {
        return FlowConditionAbstract::getObjectListFiltered(null, $this->getSystemid());
    }

    /**
     * @return string
     */
    public function getStrIcon()
    {
        return $this->getTargetStatus()->getStrIcon();
    }

    /**
     * @return string
     */
    public function getStrDisplayName()
    {
        return $this->getTargetStatus()->getStrName();
    }

    public function getStrAdditionalInfo()
    {
        return "";
    }

    public function getStrLongDescription()
    {
        return "";
    }
}
<commit_msg>UPDATE: module_flow | FlowTransition > add method to get parent status<commit_after><?php
/*"******************************************************************************************************
*   (c) 2004-2006 by MulchProductions, www.mulchprod.de                                                 *
*   (c) 2007-2016 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
********************************************************************************************************/

namespace Kajona\Flow\System;

use Kajona\System\System\AdminListableInterface;
use Kajona\System\System\Model;
use Kajona\System\System\ModelInterface;
use Kajona\System\System\Objectfactory;

/**
 * FlowTransition
 *
 * @author ch<EMAIL>
 * @targetTable flow_step_transition.transition_id
 * @module flow
 * @moduleId _flow_module_id_
 * @formGenerator Kajona\Flow\Admin\FlowTransitionFormgenerator
 */
class FlowTransition extends Model implements ModelInterface, AdminListableInterface
{
    /**
     * @var string
     * @tableColumn flow_step_transition.target_step
     * @tableColumnDatatype char254
     * @fieldType Kajona\System\Admin\Formentries\FormentryDropdown
     * @fieldMandatory
     */
    protected $strTargetStatus;

    /**
     * @return string
     */
    public function getStrTargetStatus()
    {
        return $this->strTargetStatus;
    }

    /**
     * @param string $strTargetStatus
     */
    public function setStrTargetStatus(string $strTargetStatus)
    {
        $this->strTargetStatus = $strTargetStatus;
    }

    /**
     * @return FlowStatus
     */
    public function getParentStatus()
    {
        return Objectfactory::getInstance()->getObject($this->getPrevId());
    }

    /**
     * @return FlowStatus
     */
    public function getTargetStatus()
    {
        return Objectfactory::getInstance()->getObject($this->strTargetStatus);
    }

    /**
     * @return FlowActionAbstract[]
     */
    public function getArrActions()
    {
        return FlowActionAbstract::getObjectListFiltered(null, $this->getSystemid());
    }

    /**
     * @return FlowConditionAbstract[]
     */
    public function getArrConditions()
    {
        return FlowConditionAbstract::getObjectListFiltered(null, $this->getSystemid());
    }

    /**
     * @return string
     */
    public function getStrIcon()
    {
        return $this->getTargetStatus()->getStrIcon();
    }

    /**
     * @return string
     */
    public function getStrDisplayName()
    {
        return $this->getTargetStatus()->getStrName();
    }

    public function getStrAdditionalInfo()
    {
        return "";
    }

    public function getStrLongDescription()
    {
        return "";
    }
}

{'fraction_non_alphanumeric': 0.1763409257898604, 'fraction_numerical': 0.007714915503306392, 'mean_word_length': 2.544921875, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3296003', 'n_tokens_mistral': 1477, 'n_tokens_neox': 1411, 'n_words': 253}