Populates a config field with the result of a factory being run, if one exists.

@param string $field The name of the field to be loaded
@return bool TRUE if a factory has been successfully run, FALSE otherwise
551952
protected function load($field) {
        if ($this->factoryExists($field)) {
            $this->values[$field] = $this->runFactory($field);
            return TRUE;
        }

        return FALSE;
    }
335761
public function hasFilter(string $field): bool
    {
        foreach ($this->filters as $filter) {
            if ($filter->hasFilter($field)) {
                return true;
            }
        }

        return false;
    }
260109
public function inError(string $field): bool
    {
        foreach ($this->_errors as $item) {
            if ($field === $item['name']) {
                return true;
            }
        }
        return false;
    }
919006
public static function factoryType($field)
    {
        $data = [];
        $persistence = new Persistence_Array($data);
        $filterDomain = 'atk4\\ui\\TableColumn\\FilterModel\Type';

        // check if field as a type and use string as default
        if (empty($type = $field->type)) {
            $type = 'string';
        }
        $class = $filterDomain.ucfirst($type);

        /*
         * You can set your own filter model condition by extending
         * Field class and setting your filter model class.
         */
        if (!empty($field->filterModel) && isset($field->filterModel)) {
            if ($field->filterModel instanceof Model) {
                return $field->filterModel;
            }
            $class = $field->filterModel;
        }

        return new $class($persistence, ['lookupField' => $field]);
    }
886345
protected function _field($field) {
		if (!isset($this->_config['fieldMap'][$field])) {
			throw new RuntimeException(__d('user_tools', 'Invalid field "%s"!', $field));
		}

		return $this->_config['fieldMap'][$field];
	}
1168445
public function hasFilter(string $field): bool
    {
        if ($this->filter === null) {
            return false;
        }

        return $this->filter->hasFilter($field);
    }
1160360
public function getPropertyInfoForField($field)
    {
        if (!$this->loaded) {
            $this->load();
        }

        foreach ($this->propertiesInfos as $name => $infos) {
            if ($infos->getField() == $field) {
                return $infos;
            }
        }

        return false;
    }
1204114
public function hasDatabaseField($field)
    {
        $spec = static::getSchema()->fieldSpec(static::class, $field, DataObjectSchema::DB_ONLY);
        return !empty($spec);
    }
689423
public function hasSort(string $field): bool
    {
        foreach ($this->sorts as $sort) {
            if ($field === $sort->getField()) {
                return true;
            }
        }

        return false;
    }
43885
public function removeField(Field $field)
    {
        if ($this->hasField($field)) {
            unset($this->fields[$field->getName()]);

            return true;
        }

        return false;
    }
1059458
protected function isFillable(string $field): bool
    {
        if (static::FILLABLE === '*') {
            return true;
        }

        if (!empty(static::FILLABLE)) {
            return in_array($field, static::FILLABLE);
        }

        if (static::SECURED === '*') {
            return false;
        }

        return !in_array($field, static::SECURED);
    }
806404
public final function set($field, $value) {
        // This is a legacy change to the way files are get/set.
        // Make sure we never save the \stored_file object. Instead, use the id from $file->get_id() - set_file() does this for us.
        if ($field === 'file') {
            $this->set_file($value);
            return true;
        }
        if (property_exists($this, $field)) {
            $this->{$field} =& $value;
            $this->dirty = true;
            return true;
        }
        $a = (object)array('property' => $field, 'class' => get_class($this));
        if ($this->get('exporter')) {
            throw new portfolio_export_exception($this->get('exporter'), 'invalidproperty', 'portfolio', null, $a);
        }
        throw new portfolio_exception('invalidproperty', 'portfolio', null, $a); // this happens outside export (eg admin settings)

    }
1272656
public function hasChanges(string $field = null): bool
    {
        //Check updates for specific field
        if (!empty($field)) {
            if (array_key_exists($field, $this->changes)) {
                return true;
            }

            //Do not force accessor creation
            $value = $this->getField($field, null, false);
            if ($value instanceof RecordAccessorInterface && $value->hasChanges()) {
                return true;
            }

            return false;
        }

        if (!empty($this->changes)) {
            return true;
        }

        //Do not force accessor creation
        foreach ($this->getFields(false) as $value) {
            //Checking all fields for changes (handled internally)
            if ($value instanceof RecordAccessorInterface && $value->hasChanges()) {
                return true;
            }
        }

        return false;
    }
145317
private function IsFieldLocked($field)
    {
        if (!is_array($this->locked_fields)) {
            return false;
        }
        $locked_tables = array_keys($this->locked_fields);
        $locked_fields = array_values($this->locked_fields);
        $_locked_fields = array();

        foreach ($locked_fields as $locked_field) {
            if (is_array($locked_field)) {
                foreach ($locked_field as $_locked_field) {
                    $_locked_fields[] = $_locked_field;
                }
            } else {
                $_locked_fields[] = $locked_field;
            }
        }

        if (in_array($this->table, $locked_tables) and in_array($field, $_locked_fields)) {
            return true;
        }

        return false;
    }
562226
protected function getField($field)
    {
        if ($this->isFieldSupported($field) && isset($this->fields[ $field ])) {
            return $this->fields[ $field ];
        }

        return null;
    }
1022667
public function getField($field)
    {
        return isset($this->data[$field]) ? $this->data[$field] : null;
    }
597206
public function hasField($field)
    {
        $schema = static::getSchema();
        return (
            array_key_exists($field, $this->record)
            || array_key_exists($field, $this->components)
            || $schema->fieldSpec(static::class, $field)
            || $schema->unaryComponent(static::class, $field)
            || $this->hasMethod("get{$field}")
        );
    }