Get enabled fields.
@return string[]
769359
public function enabledFields()
    {
        return array_merge(
            (is_string($this->guidAttribute) && !empty($this->guidAttribute)) ? [$this->guidAttribute] : [],
            (is_string($this->idAttribute) && !empty($this->idAttribute)) ? [$this->idAttribute] : [],
            $this->enabledTimestampFields(),
            $this->enabledIPFields()
        );
    }
1030528
public function getFlattenedFields()
    {
        if (!isset($this->flatFields)) {
            $this->flatFields = [];

            foreach ($this->fields as $field) {
                if (isset($field['fields']) && is_array($field['fields'])) {
                    $this->flatFields += $this->flattenCollection($field);
                } else {
                    $this->flatFields[$field['name']] = $field;
                }
            }
        }

        return $this->flatFields;
    }
1187344
protected function getStaticFields()
	{
		$fields = [];
		foreach ($this->info as $info)
		{
			if (is_array($info))
			{
				foreach ($info as $value)
				{
					if ($value instanceof AbstractDto)
					{
						$fields += $value->getStaticFields();
					}
				}
			}
			if ($info instanceof AbstractDto)
			{
				$fields += $info->getStaticFields();
			}
		}

		return $fields;
	}
235987
protected function _fields()
    {
        $schema = $this->_table->getSchema();
        $fields = $schema->columns();
        if ($this->_config['fields'] !== null) {
            $fields = array_intersect($fields, (array)$this->_config['fields']);
        }

        return $fields;
    }
534338
protected function get_enabled_plugins() {
        $plugins = \core\plugininfo\fileconverter::get_enabled_plugins();

        $pluginclasses = [];
        foreach ($plugins as $plugin) {
            $pluginclasses[$plugin] = \core\plugininfo\fileconverter::get_classname($plugin);
        }

        return $pluginclasses;
    }
305171
public function getEnabledProviders()
    {
        $enabledProviders = array();
        foreach ($this->providers as $provider) {
            $method = 'get' . $provider . 'Enabled';
            if ($this->$method()) {
                $enabledProviders[] = $provider;
            }
        }

        return $enabledProviders;
    }
366490
protected function getFieldsAsArrays()
    {
        $fields = [];

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

        return $fields;
    }
1227135
public function getPrivateVisibleFields()
    {
        $fields = $this->om->getRepository('ClarolineCoreBundle:Facet\FieldFacet')->findBy(array('isVisibleByOwner' => true));

        $data = [];

        foreach ($fields as $field) {
            if ($this->authorization->isGranted('ROLE_ADMIN')) {
                $canOpen = true;
                $canEdit = true;
            } else {
                $canOpen = $field->getIsVisibleByOwner();
                $canEdit = $field->getIsEditableByOwner();
            }

            $data[] = array(
                'id' => $field->getId(),
                'canOpen' => $canOpen,
                'canEdit' => $canEdit,
                'position' => $field->getPosition()
            );
        }

        $visibleFieldFacets = $this->getVisibleFieldFacets();

        foreach ($data as $field) {
            $found = false;

            foreach ($visibleFieldFacets as $visibleFieldFacet) {
                if ($field['id'] === $visibleFieldFacet['id']) {
                    $data[$field['position']]['canOpen'] = $field['canOpen'] | $visibleFieldFacet['canOpen'];
                    $data[$field['position']]['canEdit'] = $field['canEdit'] | $visibleFieldFacet['canEdit'];
                }
            }
        }

        return $data;
    }
11721
public function getFields()
    {
        $fields = [];
        foreach ($this->fieldsets as $fieldset) {
            $fields = array_merge($fields, $fieldset->getAllFields());
        }
        return $fields;
    }
809532
public function getFilteredFields()
    {
        $filteredFields = array();
        foreach ($this->_fields as $fieldName => $data) {
            $filteredFields[$fieldName] = $data['value'];
        }
        return $filteredFields;
    }
244110
public function getDataModelSettings()
    {
        if (! $this->exists) {
            return array();
        }

        $fieldSettings = array();

        foreach ($this->_fields as $key => $field) {
            if ($field instanceof FieldInterface) {
                $fieldSettings[$key] = $field->getDataModelSettings();
            }
        }

        return $fieldSettings;
    }
29093
public function getProcessedFields()
    {
        $fields = array();
        foreach ($this->fields as $fieldName => $field) {
            $fields[$fieldName] = $this->getProcessedField($fieldName);
        }

        return $fields;
    }
640886
public function getFields()
    {
        $ownerClass = get_class($this->owner);
        $ownerTable = $ownerClass::tableName();
        if (!isset(self::$_fields[$ownerTable])) {
            self::$_fields[$ownerTable] = [];
            $_f = ['deletedField', 'deletedByField', 'createdField', 'createdByField', 'modifiedField', 'modifiedByField'];
            $schema = $ownerClass::getTableSchema();
            foreach ($_f as $field) {
                if (isset($schema->columns[$this->{$field}])) {
                    self::$_fields[$ownerTable][$field] = $this->{$field};
                }
            }
        }

        return self::$_fields[$ownerTable];
    }
172882
public function getFields()
    {
        $coercedFields = [];
        foreach (array_keys($this->entry->getFields()) as $key) {
            $coercedFields[$key] = $this->getCoercedField($key);
        }

        return $coercedFields;
    }
1063942
public static function get_enabled_plugins() {
        $enabled = array();
        $plugins = core_plugin_manager::instance()->get_installed_plugins('dataformat');

        if (!$plugins) {
            return array();
        }

        $enabled = array();
        foreach ($plugins as $plugin => $version) {
            $disabled = get_config('dataformat_' . $plugin, 'disabled');
            if (empty($disabled)) {
                $enabled[$plugin] = $plugin;
            }
        }
        return $enabled;
    }
872697
protected function getPluginFields()
    {
        return array(
            'debug' => array(
                'type' => 'radio',
                'label' => $this->t('field_debug'),
                'description' => $this->t('desc_debug'),
                'options' => array(
                    PluginConfig::Send_SendAndMailOnError => $this->t('option_debug_1'),
                    PluginConfig::Send_SendAndMail => $this->t('option_debug_2'),
                    PluginConfig::Send_TestMode => $this->t('option_debug_3'),
                ),
                'attributes' => array(
                    'required' => true,
                ),
            ),
            'logLevel' => array(
                'type' => 'radio',
                'label' => $this->t('field_logLevel'),
                'description' => $this->t('desc_logLevel'),
                'options' => array(
                    Log::Notice => $this->t('option_logLevel_3'),
                    Log::Info => $this->t('option_logLevel_4'),
                    Log::Debug => $this->t('option_logLevel_5'),
                ),
                'attributes' => array(
                    'required' => true,
                ),
            ),
        );
    }
1113905
public static function get_enabled_plugins() {
        global $CFG;

        // These two are always enabled and can't be disabled.
        $enabled = array('nologin'=>'nologin', 'manual'=>'manual');
        foreach (explode(',', $CFG->auth) as $auth) {
            $enabled[$auth] = $auth;
        }

        return $enabled;
    }