Finds the block by name

@param string $name

@return \Ekyna\Bundle\CmsBundle\Editor\Model\BlockInterface|null
965982
public function findOneByName($name)
    {
        $qb = $this->getQueryBuilder();

        return $qb
            ->andWhere($qb->expr()->eq('b.name', ':name'))
            ->andWhere($qb->expr()->isNull('b.row'))
            ->getQuery()
            ->useQueryCache(true)
            // TODO ->useResultCache(true, 3600, Block::getEntityTagPrefix() . '[name:'.$name.']')
            ->setParameter('name', $name)
            ->getOneOrNullResult();
    }
102018
public function find( $name )
    {
        if ( ! $this->getEnabledList()
                    ->isEnabled( $name ) )
        {
            return null;
        }

        $data = $this->queryData( $name );

        if ( $data )
        {
            $structure = new Structure( $data );
            $structure->setMapper( $this );
            return $structure;
        }

        return null;
    }
798337
protected function getInterface($name) {
    if (isset($this->requiredInterfaces[$name])) {
      return $this->requiredInterfaces[$name];
    }
    return null;
  }
942542
public function getBlockError($blockName)
    {
        if (array_key_exists($blockName, $this->blockErrors)) {
            return $this->blockErrors[$blockName];
        }

        return null;
    }
5886
protected function findTableFromName($name)
    {
        foreach ($this->tables as $table) {
            if ($table->getName() === $name) {
                return $table;
            }
        }

        return null;
    }
457129
public function getMissingLocalesForBlockName($name)
    {
        $locales = array();
        foreach ($this->locales as $locale)
        {
            if (!$this->hasContentBlock($name, $locale))
            {
                $locales[$locale] = $locale;
            }
        }

        return $locales;
    }
893996
public function exists($name)
    {
        $viewblocks = $this->get('viewblocks', []);

        return !empty($viewblocks[$name]) || $this->Blocks->exists($name);
    }
564570
public function find( $name )
    {
        $name = (string) $name;
        $path = $this->getSavePath();

        if ( ! is_file( $path . $name ) )
        {
            return null;
        }

        return $this->createStructure( array(
            'name' => $name,
            'code' => @ file_get_contents( $path . $name ),
        ) );
    }
520688
public function getPlugin($name)
    {
        if (isset($this->plugins[$name])) {
            return $this->plugins[$name];
        }

        return null;
    }
383787
public function findTile($name) {
        if (isset($this->tiles[$name]))
            return $this->tiles[$name];
        return null;
    }
317204
protected function searchDefinitionByName($name)
    {
        foreach ($this->getGroupAndSortingDefinition() as $definition) {
            if ($name === $definition->getName()) {
                return $definition;
            }
        }

        return null;
    }
919171
public function &getBlocksByName($name)
    {
        if (!isset($this->namedBlocks[$name])) {
            $this->namedBlocks[$name] = [];
        }

        return $this->namedBlocks[$name];
    }
1273360
private function getGroupByName($name)
    {
        foreach (Craft::$app->sites->getAllGroups() as $group) {
            if ($group->name === $name) {
                return $group;
            }
        }
        return null;
    }
475793
private function searchBlock($key)
    {
        if (!empty($this->blocks[ $key ])) {
            return $this->blocks[ $key ];
        }

        foreach ($this->blocks as $block) {
            if (($find = $block->searchBlock($key)) !== null) {
                return $find;
            }
        }

        return null;
    }
78204
private function getBlockByName($name, $resourcesName)
    {
        if (isset($this->blocks[$name])) {
            return [$name => $this->blocks[$name]];
        }

        foreach ($this->{$resourcesName} as &$template) {
            if (!$template instanceof Twig_Template) {
                $template = $this->twig->loadTemplate($template['template']);
            }

            $tpl = $template;

            $block = $this->searchBlock($name, $tpl);
            if ($block !== null) {
                $this->blocks[$name] = $block;

                return [$name => $block];
            }
        }

        return [];
    }
1213223
final public function getCache($name) {
	
		return ((is_array($this->cache) and array_key_exists($name, $this->cache)) ? $this->cache[$name] : NULL);
	
	}
134278
public function get($name)
    {
        return isset($this->routes[$name]) ? $this->routes[$name] : null;
    }