BaseEventTypeElement::copiedFields PHP Method

copiedFields() protected method

Fields which are copied by the loadFromExisting() method By default these are taken from the "safe" scenario of the model rules, but should be overridden for more complex requirements.
protected copiedFields ( ) : array:
return array:
    protected function copiedFields()
    {
        $rules = $this->rules();
        $fields = null;
        foreach ($rules as $rule) {
            if ($rule[1] == 'safe') {
                $fields = $rule[0];
                break;
            }
        }
        $fields = explode(',', $fields);
        $no_copy = array('event_id', 'id');
        foreach ($fields as $index => $field) {
            if (in_array($field, $no_copy)) {
                unset($fields[$index]);
            } else {
                $fields[$index] = trim($field);
            }
        }
        return $fields;
    }