src/Fieldset.php
public function getSlugableFieldNames($primary = false)
    {
        $results = [];
        if ($primary) {
            $results[] = $primary;
        }

        if (!isset($this->data['fields']) || empty($this->data['fields'])) {
            return $results;
        }

        $table = $this->data['name'];
        foreach ($this->data['fields'] as $field) {
            $name = $table . '_' . $field['name'];
            if (isset($field['type'])) {
                if ($field['type'] === 'slug') {
                    $results[] = $name;
                }
            }
        }

        return $results;
    }
public function getSlugableFieldNames($primary = false)
    {
        $results = [];
        if ($primary) {
            $results[] = $primary;
        }

        if (!isset($this->data['fields']) || empty($this->data['fields'])) {
            return $results;
        }

        $table = $this->data['name'];
        foreach ($this->data['fields'] as $field) {
            $name = $table . '_' . $field['name'];
            if (isset($field['type'])) {
                if ($field['type'] === 'slug') {
                    $results[] = $name;
                }
            }
        }

        return $results;
    }
public function getSlugableFieldNames ( $ primary = false ) { $ results = [ ] ; if ( $ primary ) { $ results [ ] = $ primary ; } if ( ! isset ( $ this -> data [ 'fields' ] ) || empty ( $ this -> data [ 'fields' ] ) ) { return $ results ; } $ table = $ this -> data [ 'name' ] ; foreach ( $ this -> data [ 'fields' ] as $ field ) { $ name = $ table . '_' . $ field [ 'name' ] ; if ( isset ( $ field [ 'type' ] ) ) { if ( $ field [ 'type' ] === 'slug' ) { $ results [ ] = $ name ; } } } return $ results ; }
Returns slug fields

@param string|false $primary

@return array
Returns slug fields