function isEmpty()
    {
        // If $this->subfields is null, we must have deleted it
        if (!$this->subfields) {
            return true;
        }

        // Iterate through the subfields looking for some data
        foreach ($this->subfields as $subfield) {
            // Check if subfield has data
            if (!$subfield->isEmpty()) {
                return false;
            }
        }
        // It is empty
        return true;
    }
function isEmpty()
    {
        // If $this->subfields is null, we must have deleted it
        if (!$this->subfields) {
            return true;
        }

        // Iterate through the subfields looking for some data
        foreach ($this->subfields as $subfield) {
            // Check if subfield has data
            if (!$subfield->isEmpty()) {
                return false;
            }
        }
        // It is empty
        return true;
    }
function isEmpty ( ) { // If $this->subfields is null, we must have deleted it if ( ! $ this -> subfields ) { return true ; } // Iterate through the subfields looking for some data foreach ( $ this -> subfields as $ subfield ) { // Check if subfield has data if ( ! $ subfield -> isEmpty ( ) ) { return false ; } } // It is empty return true ; }
Checks if the field is empty.

Checks if the field is empty. If the field has at least one subfield
with data, it is not empty.

@return bool Returns true if the field is empty, otherwise false
Checks if the field is empty .