public function primaryFields()
    {
        $result = [];
        foreach ($this->indexes as $index) {
            if (!$index->isPrimary()) {
                continue;
            }

            foreach ($index->fields() as $field) {
                $result[] = $this->field($field);
            }
        }

        return $result;
    }
public function primaryFields()
    {
        $result = [];
        foreach ($this->indexes as $index) {
            if (!$index->isPrimary()) {
                continue;
            }

            foreach ($index->fields() as $field) {
                $result[] = $this->field($field);
            }
        }

        return $result;
    }
public function primaryFields ( ) { $ result = [ ] ; foreach ( $ this -> indexes as $ index ) { if ( ! $ index -> isPrimary ( ) ) { continue ; } foreach ( $ index -> fields ( ) as $ field ) { $ result [ ] = $ this -> field ( $ field ) ; } } return $ result ; }
Returns array containing names of primary indexes

@return FieldInterface[]
Returns array containing names of primary indexes