Add a map to a site
@param CNabuSiteMap $nb_site_map Site Map to add to site
@return CNabuSiteMap Returns the inserted site map
489771
public function addSiteMap(CNabuSiteMap $nb_site_map)
    {
        $nb_site_map->transferValue($this, 'nb_site_id');

        return $this->nb_site_map_tree->addItem($nb_site_map);
    }
602200
public function setOpenPopup(string $open_popup = "F") : CNabuDataObject
    {
        if ($open_popup === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$open_popup")
            );
        }
        $this->setValue('nb_site_map_open_popup', $open_popup);
        
        return $this;
    }
876348
public static function buildTableMap()
    {
      $dbMap = Propel::getServiceContainer()->getDatabaseMap(DealerContactInfoVersionTableMap::DATABASE_NAME);
      if (!$dbMap->hasTable(DealerContactInfoVersionTableMap::TABLE_NAME)) {
        $dbMap->addTableObject(new DealerContactInfoVersionTableMap());
      }
    }
884925
public function addMapFirst(Map $map, $login = null, $force = false)
    {
        return $this->addMap($map, $login, $force, true);
    }
923158
public function setDomainZoneHostId(int $nb_domain_zone_host_id) : CNabuDataObject
    {
        if ($nb_domain_zone_host_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_domain_zone_host_id")
            );
        }
        $this->setValue('nb_domain_zone_host_id', $nb_domain_zone_host_id);
        
        return $this;
    }
253890
public static function buildTableMap()
    {
        $dbMap = Propel::getServiceContainer()->getDatabaseMap(GamecurrencyTableMap::DATABASE_NAME);
        if (!$dbMap->hasTable(GamecurrencyTableMap::TABLE_NAME)) {
            $dbMap->addTableObject(new GamecurrencyTableMap());
        }
    }
57244
public function setLoginTarget(CNabuSiteTarget $nb_site_target)
    {
        $nb_site = $this->nb_engine->getHTTPServer()->getSite();
        if ($nb_site instanceof CNabuSite) {
            return $nb_site->setLoginTarget($nb_site_target);
        } else {
            throw new ENabuCoreException(ENabuCoreException::ERROR_SITE_NOT_INSTANTIATED);
        }
    }
552538
public static function buildTableMap()
    {
        $dbMap = Propel::getServiceContainer()->getDatabaseMap(ReferenceTableMap::DATABASE_NAME);
        if (!$dbMap->hasTable(ReferenceTableMap::TABLE_NAME)) {
            $dbMap->addTableObject(new ReferenceTableMap());
        }
    }
1345072
public function setMediotecaItemId(int $nb_medioteca_item_id) : CNabuDataObject
    {
        if ($nb_medioteca_item_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_medioteca_item_id")
            );
        }
        $this->setValue('nb_medioteca_item_id', $nb_medioteca_item_id);
        
        return $this;
    }
167106
public function validateZone(CNabuSiteTarget $nb_site_target)
    {
        $nb_engine = CNabuEngine::getEngine();

        if (!(($nb_site = $nb_site_target->getSite()) instanceof CNabuSite)) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_SITE_NOT_FOUND);
        }

        $this->zone = ($this->nb_user !== null ? 'P' : 'O');
        $nb_engine->traceLog("Request Zone", ($this->zone === 'P' ? 'Private' : 'Public'));

        $site_target_zone = $nb_site_target->getZone();
        $nb_engine->traceLog(
                "Page Zone",
                ($site_target_zone === 'P' ? 'Private' : ($site_target_zone === 'O' ? 'Public' : 'Both'))
        );

        $retval = ($site_target_zone === 'B') ||
                  ($site_target_zone !== null && $site_target_zone === $this->zone);

        if ($retval && $this->zone === 'P' && $nb_site->getRequirePoliciesAfterLogin() === 'T') {
            if ($this->nb_user->getPoliciesAccepted() === 'T') {
                $nb_engine->traceLog('Policies', 'Accepted');
            } else {
                $nb_engine->traceLog('Policies', 'Not accepted');
                if ($nb_site_target->getIgnorePolicies() === 'F' &&
                    ($link = $nb_site->getPoliciesTargetLink())->isLinkable() &&
                    !($link->matchTarget($nb_site_target))
                ) {
                    throw new ENabuRedirectionException(428, new CNabuHTTPRedirection(428, $link->getBestQualifiedURL()));
                }
            }
        }

        return $retval;
    }
1316070
public static function buildTableMap()
    {
      $dbMap = Propel::getDatabaseMap(BaseUserPeer::DATABASE_NAME);
      if (!$dbMap->hasTable(BaseUserPeer::TABLE_NAME)) {
        $dbMap->addTableObject(new \Slashworks\BackendBundle\Model\map\UserTableMap());
      }
    }
1326341
public function setSiteAliasId(int $nb_site_alias_id) : CNabuDataObject
    {
        if ($nb_site_alias_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_site_alias_id")
            );
        }
        $this->setValue('nb_site_alias_id', $nb_site_alias_id);
        
        return $this;
    }
779005
public function setServerHostId(int $nb_server_host_id) : CNabuDataObject
    {
        if ($nb_server_host_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_server_host_id")
            );
        }
        $this->setValue('nb_server_host_id', $nb_server_host_id);
        
        return $this;
    }
893508
public function addRole(CNabuSiteTargetCTARole $nb_role)
    {
        if ($nb_role->isValueNumeric(NABU_ROLE_FIELD_ID) || $nb_role->isValueGUID(NABU_ROLE_FIELD_ID)) {
            $nb_role->setSiteTargetCTA($this);
            $this->nb_site_target_cta_role_list->addItem($nb_role);
        }

        return $nb_role;
    }
1099560
public function UpdateSitemap()
    {
        // Get url
        $url = $this->app->url();

        // Get basePath
        $basePath = $this->app->basePath();

        // Create sitemap
        $sitemap = new Sitemap($basePath.'/sitemap.xml');

        // Get all discussions
        $discussions = Discussion::whereVisibleTo(new Guest())->get();

        // Get all users
        $users = User::whereVisibleTo(new Guest())->get();

        // Add home
        $sitemap->addItem($url, time(), Sitemap::DAILY, 0.9);

        // Add users
        foreach ($users as $user) {
            $sitemap->addItem($url.'/u/'.$user->username, time(), Sitemap::DAILY, 0.5);
        }

        // Get all tags
        if (class_exists(Tag::class)) {
            $tags = Tag::whereVisibleTo(new Guest())->get();

            // Add tags
            foreach ($tags as $tag) {
                $sitemap->addItem($url.'/t/'.$tag->slug, time(), Sitemap::DAILY, 0.9);
            }
        }

        // Get all pages
        if (class_exists(Page::class)) {
            $pages = Page::all();

            //Add pages
            foreach ($pages as $page) {
                $sitemap->addItem($url.'/p/'.$page->id.'-'.$page->slug, time(), Sitemap::DAILY, 0.5);
            }
        }

        // Add discussions
        foreach ($discussions as $discussion) {
            $sitemap->addItem($url.'/d/'.$discussion->id.'-'.$discussion->slug, strtotime($discussion->last_time), Sitemap::DAILY, 0.7);
        }

        // Write
        $sitemap->write();
    }
1153694
public function addPageToSitemapIndex()
    {
        if (!$this->checkIfSitemapIndexingIsEnabled('page')) {
            return;
        }

        if (!$this->checkIfNoLanguageFallback()) {
            // got content in fallback language => don't index
            return;
        }

        $pageUrl = $this->getPageUrl();

        // check blacklisting
        if (GeneralUtility::checkUrlForBlacklisting($pageUrl, $this->blacklistConf)) {
            return;
        }

        // Index page
        $pageData = $this->generateSitemapPageData($pageUrl);
        if (!empty($pageData)) {
            SitemapUtility::index($pageData);
        }
    }
736849
public static function buildTableMap()
    {
      $dbMap = Propel::getServiceContainer()->getDatabaseMap(PersonTeamLinkVersionTableMap::DATABASE_NAME);
      if (!$dbMap->hasTable(PersonTeamLinkVersionTableMap::TABLE_NAME)) {
        $dbMap->addTableObject(new PersonTeamLinkVersionTableMap());
      }
    }