Adds a new Site Map root node of type URL.
@param int $order Order for the node.
@param CNabuRole $nb_role Default role for this Site Map. If null, uses the default Role of the Site.
@return CNabuBuiltInSiteMap Returns the created instance
10239
public function addRootSiteMapForURL($order, CNabuRole $nb_role = null)
    {
        if ($nb_role === null) {
            $nb_role = $this->nb_engine->getHTTPServer()->getSite()->getDefaultRole();
        }

        $nb_site_map = new CNabuBuiltInSiteMap();
        $nb_site_map->setOrder($order);

        return $this->addRootSiteMap($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;
    }
964562
public function addTarget(CNabuSiteTarget $nb_site_target, $default = false)
    {
        $nb_site_target->setSite($this);

        if ($default) {
            $this->setDefaultTarget($nb_site_target);
        }

        return $this->nb_site_target_list->addItem($nb_site_target);
    }
69323
public function addCTAObject(CNabuSiteTargetCTA $nb_site_target_cta)
    {
        $nb_site_target_cta->setSiteTarget($this);

        return $this->nb_site_target_cta_list->addItem($nb_site_target_cta);
    }
568829
public function setDnsOrigin($dns_origin) : CNabuDataObject
    {
        if ($dns_origin === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$dns_origin")
            );
        }
        $this->setValue('nb_domain_zone_dns_origin', $dns_origin);
        
        return $this;
    }
387789
public function setZone(string $zone = "B") : CNabuDataObject
    {
        if ($zone === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$zone")
            );
        }
        $this->setValue('nb_site_map_role_zone', $zone);
        
        return $this;
    }
519369
public function createdToAdmin($order)
    {
        $store = $this->store->get($order['store_id']);
        $store_name = $this->store->getTranslation('title', $this->translation->getLangcode(), $store);
        $options = array('from' => reset($store['data']['email']));

        $default = (array) $this->store->getDefault(true);
        $url = $this->store->getUrl($default);

        $vars = array(
            '@store' => $store_name,
            '@order_id' => $order['order_id'],
            '@order' => "$url/admin/sale/order/{$order['order_id']}",
            '@status' => $this->order->getStatusName($order['status']),
            '@total' => $this->price->format($order['total'], $order['currency']),
        );

        $subject = $this->translation->text('New order #@order_id on @store', $vars);
        $message = $this->translation->text("Order status: @status\r\nTotal: @total\r\nView: @order", $vars);

        return array($options['from'], $subject, $message, $options);
    }
750634
public function addOrderBy($sort, $order = null)
    {
        return $this->add('orderBy', $sort . ' ' . (! $order ? 'ASC' : $order), true);
    }
1063833
public function setCommerceId(int $nb_commerce_id) : CNabuDataObject
    {
        if ($nb_commerce_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_commerce_id")
            );
        }
        $this->setValue('nb_commerce_id', $nb_commerce_id);
        
        return $this;
    }
837199
public function addRole(CNabuSiteMapRole $nb_role)
    {
        if ($nb_role->isValueNumeric(NABU_ROLE_FIELD_ID) || $nb_role->isValueGUID(NABU_ROLE_FIELD_ID)) {
            $nb_role->setSiteMap($this);
            $this->nb_site_map_role_list->addItem($nb_role);
        }

        return $nb_role;
    }
656112
public function setOrigin($origin) : CNabuDataObject
    {
        if ($origin === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$origin")
            );
        }
        $this->setValue('nb_domain_zone_origin', $origin);
        
        return $this;
    }
149366
protected function visitSirelNodeOrder(Node\Order $order)
    {
        return $this->visit($order->getExpression()) . " "
            . ($order->isAscending() ? "ASC" : "DESC");
    }
221449
public function setVisible(string $visible = "T") : CNabuDataObject
    {
        if ($visible === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$visible")
            );
        }
        $this->setValue('nb_site_map_visible', $visible);
        
        return $this;
    }
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);
        }
    }
397979
public function setLevel(int $level = 1) : CNabuDataObject
    {
        if ($level === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$level")
            );
        }
        $this->setValue('nb_site_map_level', $level);
        
        return $this;
    }
1136327
public function getRoleByKey(string $key)
    {
        if (strlen($key) === 0) {
            throw new ENabuCoreException(
                ENabuCoreException::ERROR_UNEXPECTED_PARAM_VALUE,
                array('$key', print_r($key, true))
            );
        }

        return $this->nb_role_list->getItem($key, CNabuRoleList::INDEX_KEY);
    }
207787
public function addOrderBy($sort, $order = null)
    {
        if (false !== strpos($sort, '.')) {
            return parent::addOrderBy($sort, $order);
        }

        if (true === in_array($sort, self::$joinCriteria)) {
            $sort = $this->getSectionAlias().'.'.$sort;
        } elseif (0 !== strpos($this->getAlias().'.', $sort)) {
            $sort = $this->getAlias().'.'.$sort;
        }

        return parent::addOrderBy($sort, $order);
    }