FML/Script/Script.php
public function appendGenericScriptLabel($name, $text = null, $isolated = false)
    {
        if ($name instanceof ScriptLabel) {
            $scriptLabel = $name;
        } else {
            $scriptLabel = new ScriptLabel($name, $text, $isolated);
        }
        if (!in_array($scriptLabel, $this->genericLabels)) {
            array_push($this->genericLabels, $scriptLabel);
        }
        return $this;
    }
public function appendGenericScriptLabel($name, $text = null, $isolated = false)
    {
        if ($name instanceof ScriptLabel) {
            $scriptLabel = $name;
        } else {
            $scriptLabel = new ScriptLabel($name, $text, $isolated);
        }
        if (!in_array($scriptLabel, $this->genericLabels)) {
            array_push($this->genericLabels, $scriptLabel);
        }
        return $this;
    }
public function appendGenericScriptLabel ( $ name , $ text = null , $ isolated = false ) { if ( $ name instanceof ScriptLabel ) { $ scriptLabel = $ name ; } else { $ scriptLabel = new ScriptLabel ( $ name , $ text , $ isolated ) ; } if ( ! in_array ( $ scriptLabel , $ this -> genericLabels ) ) { array_push ( $ this -> genericLabels , $ scriptLabel ) ; } return $ this ; }
Append a generic Script text for the next rendering

@TODO: get rid of generic script labels approach
@param string|ScriptLabel $name     Label name or ScriptLabel
@param string             $text     Script text
@param bool               $isolated (optional) Whether to isolate the Label Script
@return static
Append a generic Script text for the next rendering