Get Cron by alias.

@param string $alias

@return EdgarEzCron|null
515744
public function getCron(string $alias): ?EdgarEzCron
    {
        if ($cron = $this->repository->getCron($alias)) {
            return $cron;
        }

        $crons = $this->getCrons();
        if (isset($crons[$alias])) {
            $cron = new EdgarEzCron();
            $cron->setAlias($alias);
            $cron->setExpression($crons[$alias]['expression']);
            $cron->setArguments($crons[$alias]['arguments']);
            $cron->setPriority($crons[$alias]['priority']);
            $cron->setEnabled($crons[$alias]['enabled']);

            return $cron;
        }

        return null;
    }
185756
private function getLoader($alias)
    {
        if (!$this->hasLoader($alias)) {
            throw new \RuntimeException(sprintf('Form loader with alias "%s" not found.', $alias));
        }

        return $this->loaders[$alias];
    }
676422
public function getId($alias)
    {
        if (!isset($this->aliases[$alias])) {
            return null;
        }

        $id = $this->aliases[$alias];
        while (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }

        return $id;
    }
349199
protected function getPageByPageAlias($alias)
    {
        $site = $this->siteSelector->retrieve();
        $page = $this->cmsSelector->retrieve()->getPageByPageAlias($site, $alias);

        return $page;
    }
426295
public static function getByAlias($alias) 
    {
		$f = self::getDbConnection()->fetchAssoc('SELECT * FROM menus WHERE alias=?',array($alias));
		if (!$f) throw new Exception\CMS('Меню alias='.$alias.' не найдено');
		return new self($f);
  	}
563857
public function getMappingByAlias(string $alias) : Mapping
    {
        foreach ($this->mappings as $mapping) {
            if (0 === strcasecmp($alias, $mapping->getClassAlias())) {
                return $mapping;
            }
        }

        return Mapping::null();
    }
1078115
private function getType($alias) {
        if (isset(self::$types[$alias])) {
            return $alias;
        }
        foreach (self::$types as $type => $aliases) {
            if (in_array($alias, $aliases, true)) {
                return $type;
            }
        }
        return null;
    }
645688
public function getTableByAlias($alias)
    {
        return $this->hasTableAlias($alias) ? $this->getExpression($this->getHash($alias)) : null;
    }
1018513
public function getParametersForAlias($alias)
    {
        foreach ($this->classMap as $item => $parameters) {
            if ($parameters['alias'] == $alias) {
                $parameters['class'] = $item;

                return $parameters;
            }
        }

        return null;
    }
211642
static function get($alias = null)
    {
        if ($alias === null) {
            return static::$config[static::$default];
        }
        if (isset(static::$config[$alias])) {
            return static::$config[$alias];
        } else {
            return false;
        }
    }
1197777
public function getColumnByAlias($alias)
    {
        return $this->hasColumnAlias($alias) ? $this->getExpression($this->getHash($alias)) : null;
    }
1171346
public function getNew($alias)
    {
        if (!isset($this->registered[$alias]))
            return false;
        
        // Execute the Closure to get the first instance
        $object = $this->registered[$alias]($this);
        if (!is_object($object))
            throw new Exception('The alias "' . $alias . '" does not return an object.');
        
        return $object;
    }
1070352
protected function getValueForQuery($alias)
    {
        $value = $this->getConvertedValue($alias);
        
        return is_null($value) ? $this->getValue() : $value;
    }
499753
public function getAuthenticate($alias)
    {
        if (empty($this->_authenticateObjects)) {
            $this->constructAuthenticate();
        }

        return isset($this->_authenticateObjects[$alias]) ? $this->_authenticateObjects[$alias] : null;
    }
462214
public function addQueued(string $alias): bool
    {
        $query = $this->createQueryBuilder('c')
            ->where('c.alias = :alias')
            ->setParameter('alias', $alias)
            ->getQuery();

        try {
            /** @var EdgarCron $edgarCron */
            $edgarCron = $query->setMaxResults(1)->getOneOrNullResult();
        } catch (NonUniqueResultException $e) {
            $edgarCron = new EdgarCron();
            $edgarCron->setAlias($alias);
        }

        if (!$edgarCron) {
            $edgarCron = new EdgarCron();
            $edgarCron->setAlias($alias);
        }

        try {
            $now = new \DateTime('now');
            $edgarCron->setQueued($now);
            $edgarCron->setStarted(null);
            $edgarCron->setEnded(null);
            $edgarCron->setStatus(self::STATUS_INIT);
            $this->getEntityManager()->persist($edgarCron);
            $this->getEntityManager()->flush();
        } catch (ORMException $e) {
            return false;
        }

        return true;
    }
602435
public function getWidget($alias)
    {
        if (!isset($this->widgets[$alias])) {
            throw new WidgetException(sprintf('View widget with alias "%s" does not exist.', $alias));
        }

        return $this->widgets[$alias];
    }
967065
public function getDbConnection(string $alias = null): \Doctrine\DBAL\Connection
    {
        if ($alias === null) {
            return $this->getContainer()->offsetGet('connection');
        }
        return $this->getContainer()->offsetGet('connections')[$alias];
    }