Retrieves info about one tag area

@param int $tagareaid
@return stdClass
171762
public static function get_by_id($tagareaid) {
        $tagareas = self::get_areas();
        foreach ($tagareas as $itemtype => $it) {
            foreach ($it as $component => $v) {
                if ($v->id == $tagareaid) {
                    return $v;
                }
            }
        }
        return null;
    }
334959
public static function get_search_areas_list($enabled = false) {

        // Two different arrays, we don't expect these arrays to be big.
        if (static::$allsearchareas !== null) {
            if (!$enabled) {
                return static::$allsearchareas;
            } else {
                return static::$enabledsearchareas;
            }
        }

        static::$allsearchareas = array();
        static::$enabledsearchareas = array();
        $searchclasses = \core_component::get_component_classes_in_namespace(null, 'search');

        foreach ($searchclasses as $classname => $classpath) {
            $areaname = substr(strrchr($classname, '\\'), 1);
            $componentname = strstr($classname, '\\', 1);
            if (!static::is_search_area($classname)) {
                continue;
            }

            $areaid = static::generate_areaid($componentname, $areaname);
            $searchclass = new $classname();
            static::$allsearchareas[$areaid] = $searchclass;
            if ($searchclass->is_enabled()) {
                static::$enabledsearchareas[$areaid] = $searchclass;
            }
        }

        if ($enabled) {
            return static::$enabledsearchareas;
        }
        return static::$allsearchareas;
    }
375149
static public function fetchByTagID( $tagID )
    {
        $tagKeywordList = parent::fetchObjectList( self::definition(), null, array( 'keyword_id' => $tagID ) );

        if ( is_array( $tagKeywordList ) )
            return $tagKeywordList;

        return array();
    }
842950
function getTags()
    {
        if( $this->getRenderedMetaContent() instanceof TagsAwareInterface  )
        {
            return array_unique(
                        array_merge(
                            parent::getTags(),
                            $this->getRenderedMetaContent()->getTags()
                   ));
        }
        return parent::getTags();
    }
856743
protected function getActiveTextarea(): string
    {
        return Html::activeTextarea($this->model, $this->attribute, $this->options);
    }
645049
protected function getTextareaTag()
    {
        // textarea tags cannot be self-closing when using HTML parser on XHTML
        $value = $this->value === null ? '' : $this->value;

        // escape value for display because we actually want to show entities
        // for editing
        $value = htmlspecialchars($value);

        $textarea_tag = new SwatHtmlTag('textarea');
        $textarea_tag->name = $this->id;
        $textarea_tag->id = $this->id;
        $textarea_tag->class = $this->getCSSClassString();
        // NOTE: The attributes rows and cols are required in
        //       a textarea for XHTML strict.
        $textarea_tag->rows = $this->rows;
        $textarea_tag->cols = $this->cols;
        $textarea_tag->setContent($value, 'text/xml');
        $textarea_tag->accesskey = $this->access_key;
        $textarea_tag->tabindex = $this->tab_index;

        if ($this->read_only) {
            $textarea_tag->readonly = 'readonly';
        }

        if (!$this->isSensitive()) {
            $textarea_tag->disabled = 'disabled';
        }

        if ($this->placeholder != '') {
            $textarea_tag->placeholder = $this->placeholder;
        }

        return $textarea_tag;
    }
292495
public function getAreasByName($name)
    {
        if (!isset($this->areas[$name])) {
            return null;
        }

        return $this->areas[$name];
    }
155178
public function getAreasForPageType($class)
	{
		$areas = $this->getAreas(false);

		if (!$areas) {
			return false;
		}

		foreach ($areas as $area => $config) {
			if (!is_array($config)) {
				continue;
			}

			if (isset($config['except'])) {
				$except = $config['except'];
				if (is_array($except)
					? in_array($class, $except)
					: $except == $class
				) {
					unset($areas[$area]);
					continue;
				}
			}

			if (isset($config['only'])) {
				$only = $config['only'];
				if (is_array($only)
					? !in_array($class, $only)
					: $only != $class
				) {
					unset($areas[$area]);
					continue;
				}
			}
		}

		if (count($areas)) {
			foreach ($areas as $k => $v) {
				$areas[$k] = _t('Block.BlockAreaName.'.$k, FormField::name_to_label($k));
			}

			return $areas;
		} else {
			return $areas;
		}
	}
479443
public function &__get($tagName)
    {
        $getDocument[ $tagName ] = null;

        if (in_array($tagName, ['html', 'head', 'body', 'title'])) {
            $getDocument[ $tagName ] = $this->getElementsByTagName($tagName)->item(0);
        }

        return $getDocument[ $tagName ];
    }
898312
public function deleteTag($tagid){
	    if (!$this->access_token && !$this->checkAuth()) return false;
	    $result = $this->http_get(self::API_URL_PREFIX.self::TAG_DELETE_URL.'access_token='.$this->access_token.'&tagid='.$tagid);
	    if ($result)
	    {
	        $json = json_decode($result,true);
	        if (!$json || !empty($json['errcode']) || $json['errcode']!=0) {
	            $this->errCode = $json['errcode'];
	            $this->errMsg = $json['errmsg'];
	            return false;
	        }
	        return $json;
	    }
	    return false;
	}
1233112
protected function _getPartial($tag_name) {
		if ((is_array($this->_partials) || $this->_partials instanceof ArrayAccess) && isset($this->_partials[$tag_name])) {
			return $this->_partials[$tag_name];
		} else {
            $partial_file = $this->server->getRelAppPath('views/' . $tag_name . '.tpl');
            if(file_exists($partial_file)) {
                return file_get_contents($partial_file);
            }
        }

		if ($this->_throwsException(MustacheException::UNKNOWN_PARTIAL)) {
			throw new MustacheException('Unknown partial: ' . $tag_name, MustacheException::UNKNOWN_PARTIAL);
		} else {
			return '';
		}
	}
926695
public function getBasicTagData($tagId)
    {
        $query = $this->handler->createSelectQuery();
        $query
            ->select('*')
            ->from($this->handler->quoteTable('eztags'))
            ->where(
                $query->expr->eq(
                    $this->handler->quoteColumn('id'),
                    $query->bindValue($tagId, null, PDO::PARAM_INT)
                )
            );

        $statement = $query->prepare();
        $statement->execute();

        if ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
            return $row;
        }

        throw new NotFoundException('tag', $tagId);
    }
1100027
public function administrativeArea($admin_area_id, Request $request = null)
    {
        $admin_area = AdministrativeArea::find($admin_area_id);

        if ($request) {
            $included = [];
            if (
            $request->has('include') &&
            AdministrativeArea::isIncludable($request->include)
            ) {
                $cities = $admin_area->cities()->getQuery();
                $cities_included = new Collection($cities, 'city');
                $included = $cities_included->toArray();
            }
            $links = $request ? ['self' => $request->url()] : [];
            return $this->respondWithItem(
                $admin_area,
                'administrative_area',
                $links,
                $included
            );
        }
        return $admin_area;
    }
744530
public function deleteTag($tagId)
    {
        $result = $this->httpGet(self::WECHAT_TAG_DELETE_PREFIX, [
            'access_token' => $this->getAccessToken(),
            'tagid' => $tagId
        ]);
        return isset($result['errcode']) && ($result['errcode'] ? $this->dump([$result,$this->getAccessToken()]) : !$result['errcode']);
    }
218959
public function getAreaRelationName()
    {
        // Allow repeated calls to return from internal cache
        if (isset($this->cacheData['area_relation_name'])) {
            return $this->cacheData['area_relation_name'];
        }

        $page = $this->getPage();

        $result = 'ElementalArea';

        if ($page) {
            $has_one = $page->config()->get('has_one');
            $area = $this->Parent();

            foreach ($has_one as $relationName => $relationClass) {
                if ($page instanceof BaseElement && $relationName === 'Parent') {
                    continue;
                }
                if ($relationClass === $area->ClassName && $page->{$relationName}()->ID === $area->ID) {
                    $result = $relationName;
                    break;
                }
            }
        }

        $this->setAreaRelationNameCache($result);

        return $result;
    }
857867
protected function getUpdateEvent($formData)
    {
        $event = new AreaUpdateEvent();

        $this->hydrateEvent($event, $formData);

        $event->setAreaId($formData['area_id']);

        return $event;
    }
753154
public function load($areaid) {
        global $DB;

        $this->areacache = $DB->get_record('grading_areas', array('id' => $areaid), '*', MUST_EXIST);
        $this->context = context::instance_by_id($this->areacache->contextid, MUST_EXIST);
        $this->component = $this->areacache->component;
        $this->area = $this->areacache->areaname;
    }