/** * Create page field given input * * @param array $input * @internal param Field $field * @return PageField */ protected function newGlobalField($languageId, $key, $type, $humanName) { $field = $this->GlobalField->newInstance(); $field->language_id = $languageId; $field->type = $type; $field->human_name = $humanName; $field->key = $key; $field->json_value = '{}'; $field->save(); return $field; }
/** * Finds a global field for this tag * * @param array $tag * @return DvsGlobalField */ protected function findGlobalField($tag) { return $this->DvsGlobalField->newInstance()->where('key', $tag['key'])->where('language_id', $this->languageId)->first(); }