Store the admin metadata.
167794
def put_admin_metadata(self, admin_metadata):
        """"""
        logger.debug("Putting admin metdata")
        text = json.dumps(admin_metadata)
        key = self.get_admin_metadata_key()
        self.put_text(key, text)
1232141
function setMetaData( $key, $value )
    {
        $this->MetaData[$key] = $value;
        eZDebug::writeNotice( 'Set MetaData : [' . $key . '] = ' . $value, __METHOD__ );
        $this->savePersistentData();
    }
1335424
public function store() {

		$rules    = [];
		$nicename = [];
		foreach (\L::all() as $l) {
			$nicename['name_'.$l] = trans('admin.name_'.$l);
			$rules['name_'.$l]    = 'required';
		}
		$data = $this->validate(request(), $rules, [], $nicename);
		//$data            = request()->except(['_token', 'method']);
		$data['admin_id'] = admin()->user()->id;
		if (request('parent') == null) {
			$data['parent'] = null;
		}
		if (request()->hasFile('icon')) {
			$data['icon'] = it()->upload(request()->file('icon'), 'departments/'.time(), 'icon');
		}

		if (request()->has('color')) {
			$data['color'] = request('color');
		}
		if (request()->has('parent')) {
			$data['parent'] = request('parent');
		}
		Dep::create($data);
		session()->flash('success', trans('admin.added'));
		return back();
	}
1200006
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._courses_default = self._mdata['courses']['default_id_values']
        self._assessments_default = self._mdata['assessments']['default_id_values']
        self._assets_default = self._mdata['assets']['default_id_values']
440173
def _load_metadata(self):
        """"""
        if self._synchronizer is None:
            self._load_metadata_nosync()
        else:
            mkey = self._key_prefix + array_meta_key
            with self._synchronizer[mkey]:
                self._load_metadata_nosync()
371814
def database_admin_api(self):
        """"""
        if self._database_admin_api is None:
            self._database_admin_api = DatabaseAdminClient(
                credentials=self.credentials, client_info=_CLIENT_INFO
            )
        return self._database_admin_api
740131
def _init_metadata(self):
        """"""
        ItemTextsFormRecord._init_metadata(self)
        ItemFilesFormRecord._init_metadata(self)
        edXBaseFormRecord._init_metadata(self)
        IRTItemFormRecord._init_metadata(self)
        TimeValueFormRecord._init_metadata(self)
        ProvenanceFormRecord._init_metadata(self)
        super(edXItemFormRecord, self)._init_metadata()
618518
public function compileMetadata()
    {
        if (is_null($this->metadataCache))
        {
            $this->metadata = '{}';

            return;
        }

        $this->metadata = json_encode($this->metadataCache);
    }
204352
def set_metadata(self, key, metadata):
        
        with self._lock:
            self._metadata[key] = metadata
607470
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._level_default = self._mdata['level']['default_id_values'][0]
        self._start_time_default = self._mdata['start_time']['default_date_time_values'][0]
        self._grade_system_default = self._mdata['grade_system']['default_id_values'][0]
        self._items_shuffled_default = self._mdata['items_shuffled']['default_boolean_values'][0]
        self._score_system_default = self._mdata['score_system']['default_id_values'][0]
        self._deadline_default = self._mdata['deadline']['default_date_time_values'][0]
        self._duration_default = self._mdata['duration']['default_duration_values'][0]
        self._items_sequential_default = self._mdata['items_sequential']['default_boolean_values'][0]
701331
protected function setup_metadata() {
		if ( ! $this->meta_type ) {
			return;
		}

		$metadata = $this->get_metadata();
		foreach ( $this->get_mapping() as $attribute => $meta ) {
			if ( isset( $metadata[ $meta ] ) ) {
				$this->set_attribute( $attribute, $metadata[ $meta ] );
			}
		}
	}
448184
def create(self):
        """"""
        self._storage_broker.create_structure()
        self._storage_broker.put_admin_metadata(self._admin_metadata)
977901
public function metaData()
    {
        Meta::setTitle($this->title)
            ->set("description", $this->about)
            ->set("og:type", "website", "property")
            ->set("og:title", $this->title, "property")
            ->set("og:description", $this->description, "property")
            ->set("og:url", $this->href, "property")
            ->setImageOG(($this->hasFeaturedImage() ? $this->featuredImage : null))
            ->setCanonical($this->href)
            ->setWildcards(
                [
                '{{title}}' => $this->title,
                '{{sitename}}' => settings('siteTitle')
                ]
            );
    }
515049
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._url_default = self._mdata['url']['default_string_values'][0]
        self._data_default = self._mdata['data']['default_object_values'][0]
        self._accessibility_type_default = self._mdata['accessibility_type']['default_type_values'][0]
581508
def _init_metadata(self):
        """"""
        self._enclosed_object_metadata = {
            'element_id': Id(self.my_osid_object_form._authority,
                             self.my_osid_object_form._namespace,
                             'enclosed_object'),
            'element_label': 'Enclosed Object',
            'instructions': 'accepts an osid object Id',
            'required': False,
            'read_only': False,
            'linked': False,
            'array': False,
            'default_id_values': [''],
            'syntax': 'ID',
            'id_set': []
        }
324066
protected static function setUpMeta () {
		$metaKey = static::SESSION_METADATA_KEY;
		$meta = [];
		if (isset($_SESSION[$metaKey]))
			$meta = @unserialize($_SESSION[$metaKey]);
		if (!$meta)
			$meta = [
				'names'			=> [],
				'hoops'			=> [],
				'expirations'	=> [],
			];
		$meta = (object) $meta;
		static::$meta = & $meta;
	}
27640
def _persist(self):
        """"""
        with open(self.file, 'w') as f:
            json.dump({
                'client': self.client,
                'creds': self.creds,
                'config': self.config
            }, f)