Returns the default html content when a new content is added to the slot

@param   string   $slotName The slot name to retrieve
@return  string   The default text
964326
public function getContentFromSlot($slotName)
    {
        if(!$this->checkSlotExists($slotName)) return null;

        return $this->slots[$slotName]->getContent();
    }
96381
public function slot($name, $content = null)
    {
        if (func_num_args() === 2) {
            $this->slots[$this->currentComponent()][$name] = $content;
        } else {
            if (ob_start()) {
                $this->slots[$this->currentComponent()][$name] = '';

                $this->slotStack[$this->currentComponent()][] = $name;
            }
        }
    }
454707
public function renderSlot($slotName = null, $extraAttributes = "")
    {
        $this->checkSlotName($slotName);

        try {
            $slotContents = array();
            $pageTree = $this->container->get('red_kite_cms.page_tree');
            $blockManagers = $pageTree->getBlockManagers($slotName);

            foreach ($blockManagers as $blockManager) {
                if (null === $blockManager) {
                    continue;
                }

                $slotContents[] = $this->renderBlock($blockManager, null, false, $extraAttributes);
            }

            if (empty($slotContents) && $pageTree->isCmsMode()) {
                $slotContents[] = sprintf('<div data-editor="enabled" data-block-id="0" data-slot-name="%s" class="al-empty-slot-placeholer">%s</div>', $slotName, $this->translator->translate('twig_extension_empty_slot', array(), 'RedKiteCmsBundle'));
            }

            $content = implode(PHP_EOL, $slotContents);
            $content = TwigTemplateWriter::MarkSlotContents($slotName, $content);

        } catch (\Exception $ex) {
            $content = $this->translator->translate('twig_extension_slot_rendering_error', array('%slot_name%' => $slotName, '%error%' => $ex->getMessage()), 'RedKiteCmsBundle');
        }

        return sprintf('<div class="al_%s">%s</div>', $slotName, $content);
    }
171903
public function getHtml(string $name, string $default = '') : string
    {
        $contentArea = $this->content->getHtml($name);

        return $contentArea ? $contentArea->html->asString() : $default;
    }
1278735
public static function getPackageName($classname)
    {
        $reflect = new ReflectionClass($classname);

        if (method_exists($reflect, 'getNamespaceName')) {
            $namespace = $reflect->getNamespaceName();

            if ($namespace != '') {
                return $namespace;
            }
        }

        if (preg_match('/@package[\s]+([\.\w]+)/', $reflect->getDocComment(), $matches)) {
            return $matches[1];
        }

        return "default";
    }
819471
protected function get_this_slot($slots, $slotnumber) {
        foreach ($slots as $key => $slot) {
            if ($slot->slot == $slotnumber) {
                return $slot;
            }
        }
        return null;
    }
110460
public function render($menuName = null)
    {
        if (empty($menuName)) {
            $menuName = self::DEFAULT_MENU_NAME;
        }

        $menu = $this->menus->filter(function (MenuContainer $menu) use ($menuName) {
            return $menu->getName() == $menuName;
        })->first();

        if ($menu instanceof MenuContainer) {
            return MenuHelper::purifyHtml(Html::decode($menu->render()));
        } else {
            throw new MenuNotFoundException($menuName);
        }
    }
156190
public function pageName($pageName = null)
    {
        if (null === $pageName) {
            return $this->pageName;
        }

        $this->pageName = $pageName;

        return $this;
    }
543830
public function getDomainByName($domainName, $default = null)
    {
        if (empty($domainName)) {
            return $default;
        }

        try {
            $result = $this->findOneBy(['domain' => $domainName]);
        } catch (NoResultException $e) {
            $result = $default;
        }

        return $result;
    }
1334815
protected function getHtmlDescription($html)
    {
        $content = '';
        $doc = new \DOMDocument;
        @$doc->loadHTML($html);
        $xpath = new \DOMXPath($doc);

        $query = '//p[preceding-sibling::p]';

        foreach ($xpath->query($query) as $node) {
            $content .= trim($node->textContent, PHP_EOL);
        }

        return $content;
    }
426479
public function fetchPage($pageName)
    {
        $pageName = (string) $pageName;

        if (!array_key_exists($pageName, $this->pages))
        {
            if ('' == $pageName)
            {
                $page = ContentPageQuery::create()
                    ->filterByIsPublished(true)
                    ->filterByName(null, Criteria::ISNULL)
                    ->_or()
                    ->filterByName('')
                    ->findOne()
                ;
            }
            else
            {
                $page = ContentPageQuery::create()
                    ->filterByIsPublished(true)
                    ->filterByName($pageName)
                    ->findOne()
                ;
            }

            $this->pages[$pageName] = $page;
        }

        return $this->pages[$pageName];
    }
185671
protected function getTableDefaults($tableName)
  {
    if (!isset($this->tableDefaults[$tableName]))
    {
      $this->loadTable($tableName);
    }
    return $this->tableDefaults[$tableName];
  }
1276286
public function loadHTML($html)
    {
        $html = str_replace(chr(13), '', $html);
        $html = '<?xml version="1.0" encoding="utf-8" ?><' . $this->PARENT_TAG_NAME . '>' . $html . '</' . $this->PARENT_TAG_NAME . '>';
        if (defined('LIBXML_HTML_NODEFDTD')) {
            return $this->dom->loadHTML($html, LIBXML_HTML_NODEFDTD);
        } else {
            return $this->dom->loadHTML($html);
        }


    }
1133242
public function getDefaultValue(string $variableName)
    {
        if (isset($this->defaultValues[$variableName])) {
            return $this->defaultValues[$variableName];
        }

        return null;
    }
391689
protected function renderSlot(Response $response, SlotContent $slotContent)
    {
        if (null === $slotContent->getSlotName()) {
           throw new \RuntimeException('No slot has been defined for the event ' . get_class($this));
        }

        $isReplacing = $slotContent->isReplacing();
        if (null === $isReplacing) {
           throw new \RuntimeException('No action has been specified for the event ' . get_class($this));
        }

        if (null === $slotContent->getContent()) {
           return null;
        }

        $content = $response->getContent();
        $content = ($isReplacing) ? $this->replaceContent($slotContent, $content) : $this->injectContent($slotContent, $content);
        if (null !== $content) {
            $response->setContent($content);
        }

        return $response;
    }
1287507
public function slotToArray($slotName)
    {
        if (!is_string($slotName)) {
            throw new InvalidArgumentTypeException('exception_slotToArray_accepts_only_strings');
        }

        if (!array_key_exists($slotName, $this->slotManagers)) {
            return array();
        }

        $slotManager = $this->slotManagers[$slotName];

        return $slotManager->getBlockManagersCollection()->toArray();
    }
432325
protected function getElementGroup($elementName)
    {
        $returnValue =  '';

		foreach($this->groups as $groupName => $group){
				if(in_array($elementName, $group['elements'])){
					$returnValue = $groupName;
					break;
				}
		}

        return $returnValue;
    }