scriptStart() public method

### Options - safe Whether the code block should contain a CDATA - block Set to true to append output to view block "script" or provide custom block name.
public scriptStart ( array $options = [] ) : void
$options array Options for the code block.
return void
Ejemplo n.º 1
0
 /**
  * Starts capturing output for Javascript code.
  *
  * To end capturing output, you can use the `scriptEnd()` method.
  *
  * To capture output with a single method, you can also use the
  *  `scriptBlock()` method.
  * @param array $options Options for the code block
  * @return mixed A script tag or `null`
  * @see scriptBlock()
  */
 public function scriptStart(array $options = [])
 {
     $options = $this->optionsDefaults(['block' => 'script_bottom'], $options);
     return parent::scriptStart($options);
 }