Finds a specific component view with a given type and key.

@param string $type
@param string $key

@return Component|null
436373
public function findComponent (string $type, string $key)
    {
        $componentType = $this->typeRegistry->getType($type);

        return $componentType->getComponent($key);
    }
570746
public static function create( $type, array $props )
    {
        try {
            $component = self::create_registered_component($type, $props);
        } catch (\RuntimeException $ex) {
            $component = self::create_core_component($type, $props);
        }
        
        return $component;
    }
332640
public function find($key)
    {
        $template = $this->getCollection()->get($key);

        if ($template !== null) {
            return $template;
        }

        throw new NotFoundException("Media template $key not found.");
    }
682592
public function getType($key)
    {
        $map = $this->getMap();
        if (array_key_exists($key, $map)) {
            $type = $map[$key]->getType();
            return $type;
        }
        return 0;
    }
1319669
public static function read($key = null, $type = null)
    {
        if (!self::_tableExists()) {
            return;
        }

        self::autoLoad();

        if (!$key) {
            return self::$_data;
        }

        if (key_exists($key, self::$_data)) {
            if ($type) {
                $value = self::$_data[$key];
                settype($value, $type);
                return $value;
            }
            return self::$_data[$key];
        }

        $model = self::model();

        $data = $model->findByName($key)->select('value');

        if ($data->count() > 0) {
            $data = $data->first()->toArray();
        } else {
            return null;
        }

        self::_store($key, $data['value']);

        $value = $data['value'];

        if ($type) {
            settype($value, $type);
        }

        return $value;
    }
846350
public function format($key, $type)
    {
        if (is_file($key)) {
            $key = file_get_contents($key);
        }

        if (is_string($key) && strpos($key, '-----') === false) {
            $key = $this->convertKey($key, $type);
        }

        return $key;
    }
552543
public function findOneComponentByType($type)
    {
        foreach ($this->components as $component) {
            if ($component->hasType($type)) {
                return $component;
            }
        }
    }
168300
protected function getDataValue($type, $key)
    {
        if ($key == 'password') {
            return;
        }

        $name = $type.'Data';

        return array_get($this->$name, $key);
    }
519465
public function searchPartByKeyAndType($key, $type = '\\Zepi\\Web\\UserInterface\\Layout\\AbstractContainer')
    {
        foreach ($this->parts as $part) {
            if ((is_a($part, $type) || is_subclass_of($part, $type)) && $part->getKey() === $key) {
                return $part;
            }
            
            $result = $part->searchPartByKeyAndType($key, $type);
            if ($result !== false) {
                return $result;
            }
        }
        
        return false;
    }
1296684
protected function getJoinTable($type)
    {
        switch ($type) {
            case self::DELETE:
                // Delete uses edit type - Drop through
            case self::EDIT:
                return $this->getEditorGroupsTable();
            case self::VIEW:
                return $this->getViewerGroupsTable();
            default:
                throw new InvalidArgumentException("Invalid argument type $type");
        }
    }
126954
public static function get($key = null, $type = 'string', $defaultValue = '')
    {
        if (!$key) {
            return $_GET;
        }
        return self::typeConvert(isset($_GET[$key]) ? $_GET[$key] : $defaultValue, $type);
    }
1014523
public function get($key)
    {
        if (array_key_exists($key, $this->container)) {
            return $this->container[$key];
        }

        return null;
    }
261462
protected function get($key)
    {
        $this->checkForNonEmptyKey($key);
        if (!$this->settingsHaveBeenRetrieved) {
            $this->retrieveSettings();
        }
        if (!isset($this->cachedSettings[$key])) {
            return null;
        }

        return $this->cachedSettings[$key];
    }
42610
public function getFieldsByType($key, $type)
    {
        $storage = $this->storageRepository->load();
        if (empty($storage[$type]) || empty($storage[$type]['tca'])) {
            return [];
        }

        $fields = [];
        foreach ($storage[$type]['tca'] as $field => $config) {
            if ($config['config']['type'] !== strtolower($key)) {
                continue;
            }

            $elements = $this->getElementsWhichUseField($field, $type);
            if (empty($elements)) {
                continue;
            }

            $fields[] = [
                'field' => $field,
                'label' => $this->getLabel($elements[0]['key'], $field, $type),
            ];
        }

        return $fields;
    }
41976
public function get(string $type = '', string $module = '', $key = null) {
		$result = $this->data;
		if (!empty($type)) {
			$result = $result[$type] ?? null;
			if (!isset($result)) return $result;
			if (!empty($module)) {
				$result = $result[$module] ?? null;
				if (!isset($result)) return $result;
				if (!empty($key)) {
					$result = $result[$key] ?? null;
					if (!isset($result)) return $result;
				} else if (!empty($result['datasource'])) {
					// acl is skipped intentionally
					return \Factory::model($result['datasource'], true)->get(['skip_acl' => true]);
				}
			}
		}
		return $result;
	}
1113725
private function resolverType(string $section, string $key)
    {
        return $this->typeRegistry->get(
            $this->schemaRegistry->get($section, $key)->getType()
        );
    }
311782
public function search($key)
    {
        $binarySearch = new BinarySearch($this);
        $result = $binarySearch->search($key);
        if (\is_null($result) || $result->getKey() != $key) {
            return null;
            
        }
        return $result;
    }