protected function setDataEditTrigger()
    {
        $conditions = $this->getData('trigger.data.conditions');

        if (empty($conditions) || !is_array($conditions)) {
            return null;
        }

        if (!$this->isError()) {
            gplcart_array_sort($conditions);
        }

        $modified = array();

        foreach ($conditions as $condition) {
            $modified[] = is_string($condition) ? $condition : $condition['original'];
        }

        $this->setData('trigger.data.conditions', implode("\n", $modified));
    }
protected function setDataEditTrigger()
    {
        $conditions = $this->getData('trigger.data.conditions');

        if (empty($conditions) || !is_array($conditions)) {
            return null;
        }

        if (!$this->isError()) {
            gplcart_array_sort($conditions);
        }

        $modified = array();

        foreach ($conditions as $condition) {
            $modified[] = is_string($condition) ? $condition : $condition['original'];
        }

        $this->setData('trigger.data.conditions', implode("\n", $modified));
    }
protected function setDataEditTrigger ( ) { $ conditions = $ this -> getData ( 'trigger.data.conditions' ) ; if ( empty ( $ conditions ) || ! is_array ( $ conditions ) ) { return null ; } if ( ! $ this -> isError ( ) ) { gplcart_array_sort ( $ conditions ) ; } $ modified = array ( ) ; foreach ( $ conditions as $ condition ) { $ modified [ ] = is_string ( $ condition ) ? $ condition : $ condition [ 'original' ] ; } $ this -> setData ( 'trigger.data.conditions' , implode ( "\n" , $ modified ) ) ; }
Converts an array of conditions into a multiline string
Converts an array of conditions into a multiline string