method addJs documentation in bbn\Mvc\Controller

This will add a javascript view from a file path to $this->obj->script

Chainable

function() { $args = \func_get_args(); $has_path = false; foreach ($args as $i => $a) { if ($new_data = $this->retrieveVar($a)) { $this->jsData($new_data); } elseif (\is_string($a)) { $has_path = 1; } elseif (\is_array($a)) { $this->jsData($a); } elseif ($a === true) { $this->jsData($this->data); } } if (!$has_path) { array_unshift($args, $this->_path); } $args[] = 'js'; if ($r = $this->getView(...$args)) { $this->addScript($r); } return $this; }

This will add a javascript view from a file path to $this->obj->script BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.