Update a script tag

@link   https://help.shopify.com/api/reference/scripttag#update
@param  ScriptTag $scriptTag
@return void
353884
public function update(ScriptTag $scriptTag)
    {
        $data = $scriptTag->exportData();
        $response = $this->request(
            '/admin/script_tags/'.$scriptTag->id.'.json', 'PUT', array(
            'script_tag' => $data
            )
        );
        $scriptTag->setData($response['script_tag']);
    }
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();
            }
        }
    }
580241
public function prepare(Script $script)
    {
        $script->addCustomScriptLabel(ScriptLabel::MouseClick, $this->getScriptMouseClick());
        $script->addCustomScriptLabel(ScriptLabel::OnInit, $this->getScriptInit());
        $script->addCustomScriptLabel(ScriptLabel::Loop, $this->getScriptLoop());
    }
565289
public void setTag(TagLibTag tag) {
	tag.setTagLib(this);
	tags.put(tag.getName(), tag);

	if (tag.hasAppendix()) appendixTags.put(tag.getName(), tag);
	else if (appendixTags.containsKey(tag.getName())) appendixTags.remove(tag.getName());
    }
110819
public static function run($script)
    {
        $script = self::openTag($script);
        //
        $script = self::closeTag($script);
        //
        return $script;
    }
487594
public function normalizeTag(Tag $tag)
	{
		if (isset($tag->template) && !$tag->template->isNormalized())
		{
			$tag->template->normalize($this);
		}
	}
692512
public function updateTag($tagPath, Request $request)
    {
        $tagUpdateStruct = $this->inputDispatcher->parse(
            new Message(
                ['Content-Type' => $request->headers->get('Content-Type')],
                $request->getContent()
            )
        );

        $tag = $this->tagsService->loadTag(
            $this->extractTagIdFromPath($tagPath)
        );

        $updatedTag = $this->tagsService->updateTag($tag, $tagUpdateStruct);

        $childrenCount = 0;
        $synonymsCount = 0;

        if (empty($updatedTag->mainTagId)) {
            $childrenCount = $this->tagsService->getTagChildrenCount($updatedTag);
            $synonymsCount = $this->tagsService->getTagSynonymCount($updatedTag);
        }

        return new Values\RestTag(
            $updatedTag,
            $childrenCount,
            $synonymsCount
        );
    }
500502
public function update(string $domain, string $tag, string $description)
    {
        Assert::stringNotEmpty($domain);
        Assert::stringNotEmpty($tag);

        $params = [
            'description' => $description,
        ];

        $response = $this->httpPut(sprintf('/v3/%s/tags/%s', $domain, $tag), $params);

        return $this->hydrateResponse($response, UpdateResponse::class);
    }
237329
public function prepare(Script $script)
    {
        $script->addScriptFunction("buttonscript", $this->getScriptFunction());
        $script->addCustomScriptLabel(ScriptLabel::MouseClick, $this->getScriptMouseClick());
        $script->addCustomScriptLabel(ScriptLabel::MouseOver, <<<EOL
               if (Event.Control.Parent.HasClass("uiButton")) {                 
                  (Event.Control.Parent as CMlFrame).RelativeScale=1.1;
               }
EOL
        );

        $script->addCustomScriptLabel(ScriptLabel::MouseOut, <<<EOL
               if (Event.Control.Parent.HasClass("uiButton")) {                  
                  (Event.Control.Parent as CMlFrame).RelativeScale= 1.; 
               }
EOL
        );
    }
202858
public function setTags($tags)
    {
        $this->_tags = $tags;
        $this->_tagsDirty = true;
        $this->_currentTags = null;
    }
1284007
public function addTags($tags = array())
	{
		if (!is_array($tags)) {
			$tags = func_get_args();
		}
		foreach ($tags as $tagAttributes) {
			$this->addTag($tagAttributes);
		}
	}
370680
def add_tag(
            self,
            tag):
        

        if tag.replace("@", "") in self.tags:
            return

        self.refresh
        oldContent = self.to_string(indentLevel=1)
        self.tags += [tag.replace("@", "")]
        newContent = self.to_string(indentLevel=1)

        # ADD DIRECTLY TO CONTENT IF THE PROJECT IS BEING ADDED SPECIFICALLY TO
        # THIS OBJECT
        self.parent._update_document_tree(
            oldContent=oldContent,
            newContent=newContent
        )

        self.refresh
        return None
757334
public function addTag(Tag $tag)
    {
        $tag->setBlog($this);
        $this->tags->add($tag);

        return $tag;
    }
488227
public function taggedAs($tag)
    {
        if (empty($this->current_node)) {
            return;
        }

        $this->current_node->tags = $tag;
        $this->current_node->save();
    }
1078469
public function runInstallScript(string $scriptName) {
        $this->displayMsgInCli(' >> ');
        $this->displayMsgNLInCli('Execute script '.$scriptName, 'yellow', 'bold');
        
        require_once($this->sourcePath.'/'.$scriptName);
        $this->displayMsgNLInCli('');
    }
88072
public function onPostInstallOrUpdate(ScriptEvent $event)
    {
        if ($this->state->isFirstInstall()) {
            $this->state->setFirstInstall(false);
            $this->logger->info(
                '<comment>Running additional update to apply merge settings</comment>'
            );
            $this->runFirstInstall($event);
        }
    }
8100
public function update(Tag $tag, FormRequest $request)
    {
        $this->repository->update($request->id, $request->all());

        return $this->redirect($request, $tag);
    }