Swat/SwatDetailsView.php
protected function validateField(SwatDetailsViewField $field)
    {
        // note: This works because the id property is set before children are
        // added to parents in SwatUI.
        if ($field->id !== null) {
            if (array_key_exists($field->id, $this->fields_by_id)) {
                throw new SwatDuplicateIdException(
                    "A field with the id '{$field->id}' already exists " .
                        'in this details-view.',
                    0,
                    $field->id
                );
            }
        }
    }
protected function validateField(SwatDetailsViewField $field)
    {
        // note: This works because the id property is set before children are
        // added to parents in SwatUI.
        if ($field->id !== null) {
            if (array_key_exists($field->id, $this->fields_by_id)) {
                throw new SwatDuplicateIdException(
                    "A field with the id '{$field->id}' already exists " .
                        'in this details-view.',
                    0,
                    $field->id
                );
            }
        }
    }
protected function validateField ( SwatDetailsViewField $ field ) { // note: This works because the id property is set before children are // added to parents in SwatUI. if ( $ field -> id !== null ) { if ( array_key_exists ( $ field -> id , $ this -> fields_by_id ) ) { throw new SwatDuplicateIdException ( "A field with the id '{$field->id}' already exists " . 'in this details-view.' , 0 , $ field -> id ) ; } } }
Ensures a field added to this details-view is valid for this
details-view

@param SwatDetailsViewField $field the field to check.

@throws SwatDuplicateIdException if the field has the same id as a
field already in this details-view.
Ensures a field added to this details - view is valid for this details - view