Loads a Bower asset from the NAils asset module's bower_components directory

@param  string $sAsset     The asset to load
@param  string $sForceType Force a particular type of asset (i.e. JS or CSS)

@return void
359210
protected function loadNailsBower($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                $this->aCss['NAILS-BOWER-' . $sAsset] = NAILS_ASSETS_URL . $this->sBowerDir . $sAsset;
                break;

            case 'JS':

                $this->aJs['NAILS-BOWER-' . $sAsset] = NAILS_ASSETS_URL . $this->sBowerDir . $sAsset;
                break;
        }
    }
1374047
public function setFrameAncestorsHeader()
    {
        /** @var SettingsStorage $settingsStorage */
        $settingsStorage = $this->getServiceLocator()->get(SettingsStorage::SERVICE_ID);
        $whitelistedSources = $settingsStorage->get(CspHeaderSettingsInterface::CSP_HEADER_SETTING);

        if ($whitelistedSources === null) {
            $whitelistedSources = ["'none'"];
        }

        // Wrap directives in quotes
        if (in_array($whitelistedSources, ['self', 'none'])) {
            $whitelistedSources = ["'" . $whitelistedSources . "'"];
        }

        if ($whitelistedSources === 'list') {
            $whitelistedSources = json_decode($settingsStorage->get(CspHeaderSettingsInterface::CSP_HEADER_LIST), true);
        }

        if (!is_array($whitelistedSources)) {
            $whitelistedSources = [$whitelistedSources];
        }

        header(sprintf(
            'Content-Security-Policy: frame-ancestors %s',
            implode(' ', $whitelistedSources)
        ));
    }
388587
public static function registerIconFontSet($fontName, $forceCopyAssets = false)
    {
        if (!in_array($fontName, static::getAvailableIconFontSets())) {
            return false;
        }

        $fontPath = \Yii::getPathOfAlias('foundation.fonts.foundation_icons_' . $fontName);
        $fontUrl  = \Yii::app()->assetManager->publish($fontPath, true, -1, $forceCopyAssets);

        \Yii::app()->clientScript->registerCssFile($fontUrl . "/stylesheets/{$fontName}_foundicons.css");

        if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7.0')) {
            \Yii::app()->clientScript->registerCssFile($fontUrl . "/stylesheets/{$fontName}_foundicons_ie7.css");
        }
    }
393495
protected function unloadNailsPackage($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                unset($this->aCss['NAILS-PACKAGE-' . $sAsset]);
                break;

            case 'JS':

                unset($this->aJs['NAILS-PACKAGE-' . $sAsset]);
                break;
        }
    }
170802
private function insert($index, $type, $hrefOrCss)
    {
        self::$cssList->insert($index, array($type, $hrefOrCss));
        return $this;
    }
907496
public function setJSFromFile(string $filename, Scopable $scope = null, bool $relativeToRootPath = true): void
    {
        $this->jsElement = new HtmlFromFile($filename, $scope, $relativeToRootPath);
    }
131440
protected function setMenu(SourceSet $sourceSet)
    {
        // Second loop to set the menu which was initialized during the first loop
        foreach ($sourceSet->updatedSources() as $source) {
            /** @var \Sculpin\Core\Source\FileSource $source */

            if ($source->isGenerated() || !$source->canBeFormatted()) {
                // Skip generated sources.
                // Only takes pages that can be formatted (AKA *.md)
                continue;
            }

            $source->data()->set('menu', $this->menu);
        }
    }
923399
protected function loadApp($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                $this->aCss['APP-' . $sAsset] = $this->sBaseUrl . $this->sCssDir . $sAsset;
                break;

            case 'JS':

                $this->aJs['APP-' . $sAsset] = $this->sBaseUrl . $this->sJsDir . $sAsset;
                break;
        }
    }
906130
public function type($sSelector, $sText)
    {
        try {
            $this->getElementLazy($sSelector)->setValue($sText);
        } catch (ElementException $e) {
            sleep(1);
            $this->getElementLazy($sSelector)->setValue($sText);
        }
    }
539928
public void setOfferingSet(java.util.Collection<HostOffering> offeringSet) {
        if (offeringSet == null) {
            this.offeringSet = null;
            return;
        }

        this.offeringSet = new com.amazonaws.internal.SdkInternalList<HostOffering>(offeringSet);
    }
762896
protected function addCacheBuster($sAsset)
    {
        if ($this->sCacheBuster) {

            $aParsedUrl = parse_url($sAsset);

            if (empty($aParsedUrl['query'])) {

                $sAsset .= '?';

            } else {

                $sAsset .= '&';
            }

            $sAsset .= 'revision=' . $this->sCacheBuster;
        }

        return $sAsset;
    }
73237
private function loadAssetsFromDir($href, $attr, $title, $type = 'style')
    {
        $path = str_replace('\\', '/', $href);
        $assets = glob($path.'*');

        foreach ($assets as $src) {
            ($type == 'style') ? $this->setStyle($attr, $src, $title) : $this->setScript($src, $attr);
        }
    }
169946
protected function LoadFromBasketPostProcessData($oBasket, &$aOrderData)
    {
        parent::LoadFromBasketPostProcessData($oBasket, $aOrderData);
        $oUser = TdbDataExtranetUser::GetInstance();
        $oShipping = $oUser->GetShippingAddress();
        $aOrderData['adr_shipping_is_dhl_packstation'] = $oShipping->fieldIsDhlPackstation;
    }
115600
public function setImageSet($imageSet)
    {
        if (! in_array($imageSet, $this->availableImageSets)) {
            throw new \InvalidArgumentException('Invalid Gravatar image set.');
        }

        $this->imageSet = $imageSet;
    }
835892
protected function _uploadFile($sSource, $sTarget)
    {
        $blDone = move_uploaded_file($sSource, $sTarget);

        if ($blDone) {
            $blDone = @chmod($sTarget, 0644);
        }

        return $blDone;
    }
105570
protected function loadUrl($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                $this->aCss['URL-' . $sAsset] = $sAsset;
                break;

            case 'JS':

                $this->aJs['URL-' . $sAsset] = $sAsset;
                break;
        }
    }
710406
public function loadOrderArticles($aOrders)
    {
        if (!count($aOrders)) {
            $this->clear();

            return;
        }

        foreach ($aOrders as $iKey => $oOrder) {
            $aOrdersIds[] = $oOrder->getId();
        }

        $oBaseObject = $this->getBaseObject();
        $sArticleTable = $oBaseObject->getViewName();
        $sArticleFields = $oBaseObject->getSelectFields();
        $sArticleFields = str_replace("`$sArticleTable`.`oxid`", "`oxorderarticles`.`oxartid` AS `oxid`", $sArticleFields);

        $sSelect = "SELECT $sArticleFields FROM oxorderarticles ";
        $sSelect .= "left join $sArticleTable on oxorderarticles.oxartid = $sArticleTable.oxid ";
        $sSelect .= "WHERE oxorderarticles.oxorderid IN ( '" . implode("','", $aOrdersIds) . "' ) ";
        $sSelect .= "order by $sArticleTable.oxid ";

        $this->selectString($sSelect);

        // not active or not available products must not have button "tobasket"
        $sNow = date('Y-m-d H:i:s');
        foreach ($this as $oArticle) {
            if (!$oArticle->oxarticles__oxactive->value &&
                ($oArticle->oxarticles__oxactivefrom->value > $sNow ||
                 $oArticle->oxarticles__oxactiveto->value < $sNow
                )
            ) {
                $oArticle->setBuyableState(false);
            }
        }
    }