Create a new script tag

@link   https://help.shopify.com/api/reference/scripttag#create
@param  ScriptTag $scriptTag
@return void
328826
public function create(ScriptTag &$scriptTag)
    {
        $data = $scriptTag->exportData();
        $response = $this->request(
            '/admin/script_tags.json', 'POST', array(
            'script_tag' => $data
            )
        );
        $scriptTag->setData($response['script_tag']);
    }
682624
protected function outputIgnoreTag(Tag $tag)
	{
		$tagPos = $tag->getPos();
		$tagLen = $tag->getLen();

		// Capture the text to ignore
		$ignoreText = substr($this->text, $tagPos, $tagLen);

		// Catch up with the tag's position then output the tag
		$this->outputText($tagPos, 0, false);
		$this->output .= '<i>' . htmlspecialchars($ignoreText, ENT_NOQUOTES, 'UTF-8') . '</i>';
		$this->isRich = true;

		// Move the cursor past this tag
		$this->pos = $tagPos + $tagLen;
	}
676078
private function generateScriptTag() {
        return Html::script('', [
                    'src' => $this->stripeJs,
                    'data-key' => Yii::$app->stripe->publicKey,
                    'data-amount' => $this->amount,
                    'data-name' => $this->name,
                    'data-description' => $this->description,
                    'data-image' => $this->image,
                    'data-currency' => $this->currency,
                    'data-panel-label' => $this->panelLabel,
                    'data-zip-code' => $this->validateZipCode,
                    'data-email' => $this->userEmail,
                    'data-label' => $this->label,
                    'data-allow-remember-me' => $this->allowRemember,
                    'data-billing-address' => $this->collectBillingAddress,
                    'class' => self::BUTTON_CLASS,
        ]);
    }
160137
public function addTag($tag)
    {
        $tags = $this->getTags();
        array_push($tags, $tag);
        $this->setTags($tags);
    }
301774
public function create($title, $tag = null, $group = null, $description = null) {
        $params = [
            'data' => [
                'title' => $title
            ]
        ];

        if (isset($tag)) {
            $params['data']['tag'] = $tag;
        }

        if (isset($group)) {
            $params['data']['group'] = $group;
        }

        if (isset($group)) {
            $params['data']['description'] = $description;
        }

        $result = $this->api->request(
            'checkmk.statictag.create',
            $params
        );

        if (!array_key_exists('id', $result) ||
            !is_numeric($result['id']) ||
            !array_key_exists('success', $result) ||
            $result['success'] !== true) {
            if (array_key_exists('message', $result)) {
                throw new RuntimeException(sprintf('Bad result: %s', $result['message']));
            } else {
                throw new RuntimeException('Bad result');
            }
        }

        return (int) $result['id'];
    }
963161
public function withTag($tag) {
        if (is_null($this->tags)) {
            $this->tags = [];
        }

        array_push($this->tags, $tag);
        return $this;
    }
1193955
protected function publishTag($tag)
    {
        foreach ($this->pathsToPublish($tag) as $from => $to) {
            $this->publishItem($from, $to);
        }
    }
839228
def addTag( self, tag ):
        
        if ( not (tag and self.isTagValid(tag)) ):
            return False
        
        self.blockSignals(True)
        create_item = self.createItem()
        if create_item:
            self.insertItem(self.row(create_item), XMultiTagItem(tag, self))
            create_item.setText('')
        else:
            self.addItem(XMultiTagItem(tag, self))
        self.blockSignals(False)
        
        if ( not self.signalsBlocked() ):
            self.tagCreated.emit(tag)
        
        return False
316004
public function addScript($script = array())
	{
		foreach ($script as $file => $options)
		{
			$this->scripts = array_add($this->scripts, $file, $options);
		}
	}
750153
def create
      @script_listing = Script::Listing.find(params[:listing_id])
      @script_url = @script_listing.urls.create(script_url_params)
      @script_url.user_id = current_user.id
      @script_url.org_id = current_user.org_id
      if @script_url.save
        redirect_to script_listing_urls_path, notice: 'Author was successfully created.'
        else
          render :new
      end
    end
1016616
function createScript(url, appID) {
    if (!document) { return; }
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.async = true;
    script.src = url+appID;
    // Attach the script tag to the document head
    var s = document.getElementsByTagName('head')[0];
    s.appendChild(script);
  }
373892
def create(self, tag, **kwds):
        
        return self._client.post("/tag/create.json", tag=tag, **kwds)["result"]
829854
public function addTag(Tag $tag)
    {
        if (!$this->tags->contains($tag)) {
            $this->tags->add($tag);
            return true;
        }
        return false;
    }
484520
public function registerScript($script, $once = true)
    {
        if ( ! $once) {
            $this->scripts[] = $script;

            return $this;
        }

        // Make sure the script is added only once
        $hash = md5($script);

        if (array_key_exists($hash, $this->scriptHashes)) {
            return $this;
        }

        $this->scripts[] = $script;

        // Map the hash for adding the script only once
        end($this->scripts);
        $index = key($this->scripts);

        $this->scriptHashes[$hash] = $index;

        return $this;
    }
851727
public function insert(WorkspaceTag $tag)
    {
        $this->om->persist($tag);
        $this->om->flush();
    }
43123
public function addTag($tag)
    {
        $this->tags[] = (string)$tag;
        $this->ref = null;
        return $this;
    }
17310
public static function addTags($tags)
    {
        self::updateAllCounters(['frequency' => 1], ['name' => $tags]);

        foreach ($tags as $name) {
            if (!self::find()->where(['name' => $name])->exists()) {
                (new self([
                    'name' => $name,
                    'frequency' => 1
                ]))->save();
            }
        }
    }