The create url for an area after another
@param Area $area
@return string
321934
protected function CreateAfterUrl(Area $area)
    {
        $args = array('layout'=>$this->layout->GetID());
        $args['previous'] = $area->GetID();
        return BackendRouter::ModuleUrl(new AreaForm(), $args);
    }
1286437
private function getId($name_area)
    {
        $id = $name_area->find('a', 0)->href;
        $id = explode('/', $id);

        return $id[4];
    }
1155573
public function postConfiguration($area)
    {
        $area = app(AreaManager::class)->getById($area);

        return $this->processor->markAsConfigured($this, $area);
    }
835263
public function getArea($name)
    {
        if(null === $this->areas)
        {
            $this->areas = array();

            $this->scanAreas($this->contentPath . $this->getNode()->getUri());
        }

        return array_key_exists($name, $this->areas) ? $this->areas[$name] : null;
    }
801065
public function setPostcodeArea($area)
    {
        $area = strtoupper(trim($area));

        if (preg_match('/^'.self::RxArea.'$/', $area)) {
            $this->postcodeArea = $area;
        } else {
            $this->postcodeArea = null;
        }

        return $this;
    }
1241519
public function setAreas($areas = null)
    {
        if ($areas === null) {
            $appDir = $this->alias->get('@app');
            $dirs = glob("$appDir/Areas/*", GLOB_ONLYDIR) ?: glob("$appDir/Controllers/*", GLOB_ONLYDIR);

            $areas = [];
            foreach ($dirs as $dir) {
                $dir = substr($dir, strrpos($dir, '/') + 1);
                if (preg_match('#^[A-Za-z]\w+$#', $dir)) {
                    $areas[] = $dir;
                }
            }
        }

        $this->_areas = $areas;

        return $this;
    }
1313592
public function BlockArea($area, $limit = null)
	{
		if ($this->owner->ID <= 0) {
			return;
		} // blocks break on fake pages ie Security/login

		$list = $this->getBlockList($area);

		foreach ($list as $block) {
			if (!$block->canView()) {
				$list->remove($block);
			}
		}

		if ($limit !== null) {
			$list = $list->limit($limit);
		}

		$data = [];
		$data['HasBlockArea'] = ($this->owner->canEdit() && isset($_REQUEST['block_preview']) && $_REQUEST['block_preview']) || $list->Count() > 0;
		$data['BlockArea'] = $list;
		$data['AreaID'] = $area;

		$data = $this->owner->customise($data);

		$template = ['BlockArea_'.$area];

		if (SSViewer::hasTemplate($template)) {
			return $data->renderWith($template);
		} else {
			return $data->renderWith('BlockArea');
		}
	}
1119932
public static function area(
        string $content = null, 
        array $attributes = []
    ) : string
    {
        return self::tag("area", $content, $attributes);
    }
1245361
public function buildUrl($url)
    {
        if (strncmp($url, '/', 1) === 0) {
            return $url;
        }
        $baseUrl = isset($this->grid->controllerUrl) ? $this->grid->controllerUrl : '';

        return $baseUrl ? Url::to($baseUrl . '/' . $url) : Url::to($url);
    }
860839
private function serializeArea(Area $area)
    {
        $areaData = [
            'id' => $area->getUuid(),
            'color' => $area->getColor(),
        ];

        $position = explode(',', $area->getValue());

        switch ($area->getShape()) {
            case 'circle':
                $areaData['shape'] = 'circle';
                $areaData['radius'] = $area->getSize() / 2;

                // We store the top left corner, so we need to calculate the real center
                $center = $this->serializeCoords($position);
                $center['x'] += $areaData['radius'];
                $center['y'] += $areaData['radius'];
                $areaData['center'] = $center;

                break;
            // For retro-compatibility purpose.
            // It doesn't exist anymore in the schema and is handled as rect
            case 'square':
                $areaData['shape'] = 'rect';
                $areaData['coords'] = [
                    // top-left coords
                    $this->serializeCoords($position),
                    // bottom-right coords
                    $this->serializeCoords([$position[0] + $area->getSize(), $position[1] + $area->getSize()]),
                ];
                break;
            case 'rect':
                $areaData['shape'] = 'rect';
                $areaData['coords'] = [
                    $this->serializeCoords(array_slice($position, 0, 2)),
                    $this->serializeCoords(array_slice($position, 2, 2)),
                ];
                break;
        }

        return $areaData;
    }
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;
    }
281340
protected function Area()
    {
        if (!$this->area) {
            $this->area = new Area(Request::GetData('area'));
        }
        return $this->area;
    }
369871
function GrantAddContentToLayoutArea(Area $area)
    {
        $result = $this->Grant(BackendAction::Create(), $area);
        if (!$result->ToBool())
        {
            return $result;
        }
        return $this->GrantAddContentToLayout($area->GetLayout());
    }
256400
public function buildUrl(string $url): string
    {
        if (filter_var($url, FILTER_VALIDATE_URL)) {
            return $url;
        }
        return $this->endPoint . static::ENDPOINT_SUFFIX . $url;
    }
604361
public function urlAdd(string $url, string $action = '-1'): string
    {
        return $this->c::addUrlQueryArgs(['_wpnonce' => wp_create_nonce($action)], $url);
    }
420115
private function getCharacterVaId($va_name_area)
    {
        $va_id = $va_name_area->find('a', 0)->href;
        $va_id = explode('/', $va_id);

        return $va_id[4];
    }
1062659
function GrantAddContentToPageArea(Page $page, Area $area)
    {
        $result = $this->Grant(BackendAction::Create(), $area);
        
        if (!$result->ToBool())
        {
            return $result;
        }
        return $this->GrantAddContentToPage($page);
    }