getIncrementalFieldsMeta

Retorna a relação de meta informação de propriedades vinculadas a persistencia com incremento

@return PropertyContract[]|boolean
167184
public function getIncrementalFieldsMeta()
    {
        if (!empty($this->incrementalFieldsMeta)) {
            return $this->incrementalFieldsMeta;
        }

        $incrementalFieldsMeta = $this->getPropertyContainer()->getFields('hasMany');
        if (!empty($incrementalFieldsMeta)) {
            $incrementalFieldsMeta = array_filter(
                $incrementalFieldsMeta,
                function (PropertyContract $property) {
                    if (!$property->getBehavior()->isPersistent()) {
                        return false;
                    }

                    if (!$property->getBehavior() instanceof IntegerBehavior) {
                        return false;
                    }

                    if (!empty($property->getBehavior()->isAutoIncrement())) {
                        return true;
                    }

                    return false;
                }
            );
        }
        $this->incrementalFieldsMeta = $incrementalFieldsMeta;

        return $this->incrementalFieldsMeta;
    }
695040
protected function propertiesFromAttributes(): array
    {
        // Get all managed properties
        $propertyNames = $this->entityMap->getProperties();

        $propertyAttributes = array_only($this->attributes, $propertyNames);
        $attributesArray = array_except($this->attributes, $propertyNames);

        $attributesArrayName = $this->entityMap->getAttributesArrayName();

        if ($attributesArrayName) {
            $propertyAttributes[$attributesArrayName] = $attributesArray;
        }

        return $propertyAttributes;
    }
1273784
private function getEditableProperties()
    {
        if (!isset($this->_editableProperties)) {
            $reflection = new ReflectionClass('WhEditableField');
            $this->_editableProperties = array_map(
                function ($d) {
                    return $d->getName();
                },
                $reflection->getProperties()
            );
        }
        return $this->_editableProperties;
    }
370634
function GetPropertyTypes() {
		$response = $this->MakeAPICall("GET", "propertytypes", '24h');

		if ($response['success'] == true) {
			$records = array();
			foreach ($response['results'] as $res) {
				$records[$res['MlsCode']] = $res['MlsName'];
			}

			return $records;
		}
		else {
			return false;
		}
	}
794222
public function getDefaultValuesForProperties()
    {
        $this->initialize();
        if (!isset($this->fullConfiguration['properties'])) {
            return [];
        }

        $defaultValues = [];
        foreach ($this->fullConfiguration['properties'] as $propertyName => $propertyConfiguration) {
            if (isset($propertyConfiguration['defaultValue'])) {
                $type = isset($propertyConfiguration['type']) ? $propertyConfiguration['type'] : '';
                switch ($type) {
                    case 'DateTime':
                        $defaultValues[$propertyName] = new \DateTime($propertyConfiguration['defaultValue']);
                    break;
                    default:
                        $defaultValues[$propertyName] = $propertyConfiguration['defaultValue'];
                }
            }
        }

        return $defaultValues;
    }
378871
public function getFrontendCreateFields() {
		$fields = new FieldList();
		$cmsFields = $this->owner->getCMSFields();
		$whitelist = ArrayLib::valuekey($this->owner->stat('frontend_create_fields'));

		// Set for frontend
		HtmlEditorConfig::set_active('multirecordediting_minimal');

		foreach ($cmsFields->dataFields() as $field) {
			if (isset($whitelist[$field->getName()])) {
				if ($field instanceof GridField) {
					$field = $field->transform(new MultiRecordTransformation);
				}
				if ($field instanceof MultiRecordField) {
					$field->setFieldsFunction(__FUNCTION__, true);
				}
				$fields->push($field);
			}
		}

		return $fields;
	}
246520
public function GetChangableFieldNames()
    {
        $aFieldNames = $this->GetFromInternalCache('aChangableFieldNames');
        if (is_null($aFieldNames)) {
            $aFieldNames = array();
            $oFields = $this->GetFieldCmsFieldConfList();
            while ($oField = $oFields->Next()) {
                $aFieldNames[] = $oField->fieldName;
            }
            $oFields->GoToStart();
            $this->SetInternalCache('aChangableFieldNames', $aFieldNames);
        }

        return $aFieldNames;
    }
125355
public function getRequiredFields()
    {
        // Generate required field validator
        $requiredNames = $this
            ->getController()
            ->data()
            ->Fields()
            ->filter('Required', true)
            ->column('Name');
        $requiredNames = array_merge($requiredNames, $this->getEmailRecipientRequiredFields());
        $required = new RequiredFields($requiredNames);
        $this->extend('updateRequiredFields', $required);
        $required->setForm($this);
        return $required;
    }
496491
protected function getOwnFields()
    {
        $type = $this->getType();

        if (isset($this->fields[$type])) {
            return $this->fields[$type];
        }
    }
172882
public function getFields()
    {
        $coercedFields = [];
        foreach (array_keys($this->entry->getFields()) as $key) {
            $coercedFields[$key] = $this->getCoercedField($key);
        }

        return $coercedFields;
    }
505581
public function build()
    {
        return array_filter(
            $this->flatMap($this->acceptedProperties, function ($property) {
                return [$property => $this->getValueForProperty($property)];
            })
        );
    }
1150798
public function validateFields() {
        $availableFields = [];
        foreach ($this->action()->fields() as $field) {
            if ($field instanceof NovaDependencyContainer) {
                $availableFields[] = $field;
                $this->extractChildFields($field->meta['fields']);
            } else {
                $availableFields[] = $field;
            }
        }

        if ($this->childFieldsArr) {
            $availableFields = array_merge($availableFields, $this->childFieldsArr);
        }

        $this->validate(collect($availableFields)->mapWithKeys(function ($field) {
            return $field->getCreationRules($this);
        })->all());
    }
1359321
protected function getAssignedCustomfields()
    {

        $customfields = array_get(app('customfields')->get(), get_called_class(), []);
        return !is_array($customfields) ? [$customfields] : $customfields;
    }
1031761
public function getMetaComponents()
    {
        // Return array of Meta Data Control fields
        return [
            $this->getFieldnameToken()     => $this->generateTokenComponent(),
            $this->getFieldnameStep()      => $this->generateStepField(),
            $this->getFieldnameSteps()     => $this->generateStepsField(),
            $this->getFieldnameSubmitted() => $this->generateSubmittedField(),
            $this->getFieldnameUpload()    => $this->generateUploadField(),
        ];
    }
76310
public function getValue() {
		$value = array();
		foreach ($this->decorated->getValue() as $key => $decoratedFieldValue) {
			if (array_key_exists(self::PROPERTY_NAME, $decoratedFieldValue)) {
				$value[$key] = $decoratedFieldValue[self::PROPERTY_NAME];
			}
		}
		return $value;
	}
870765
public function getCMSFields()
    {
        $fields = $this->scaffoldFormFields(
            array(
                // Don't allow has_many/many_many relationship editing before the record is first saved
                'includeRelations' => ($this->ID > 0),
                'tabbed' => true,
                'ajaxSafe' => true
            )
        );
        $fields->removeByName('PresetID');
        $fields->addFieldToTab(
            'Root.Main',
            ReadonlyField::create(
                'PresetName',
                _t('PlaceableObject.PRESET', 'Preset')
            )->setValue($this->Preset()->Title)
        );
        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
1247263
public function get_custom_fields() : array {
        if (!isset($this->record->customfields)) {
            $this->record->customfields = \core_course\customfield\course_handler::create()->get_instance_data($this->id);
        }
        return $this->record->customfields;
    }