public function addAllFieldsExcept($exclusions, $includeHasOne = false)
    {
        if (!is_array($exclusions)) {
            $exclusions = [$exclusions];
        }
        $fields = $this->allFieldsFromDataObject($includeHasOne);
        $filteredFields = array_diff($fields, $exclusions);

        return $this->addFields($filteredFields);
    }
public function addAllFieldsExcept($exclusions, $includeHasOne = false)
    {
        if (!is_array($exclusions)) {
            $exclusions = [$exclusions];
        }
        $fields = $this->allFieldsFromDataObject($includeHasOne);
        $filteredFields = array_diff($fields, $exclusions);

        return $this->addFields($filteredFields);
    }
public function addAllFieldsExcept ( $ exclusions , $ includeHasOne = false ) { if ( ! is_array ( $ exclusions ) ) { $ exclusions = [ $ exclusions ] ; } $ fields = $ this -> allFieldsFromDataObject ( $ includeHasOne ) ; $ filteredFields = array_diff ( $ fields , $ exclusions ) ; return $ this -> addFields ( $ filteredFields ) ; }
Adds fields against a blacklist.

@param array|string $exclusions
@param bool $includeHasOne

@return $this
Adds fields against a blacklist .