public addInclude ( string $file, string $ext = '.js' ) | ||
$file | string | |
$ext | string |
public function addInclude($file, $ext = '.js')
{
return $this->addStaticInclude($file, $ext);
}
function addInclude($file, $ext = '.js') { if (strpos($file, 'http') === 0) { parent::addOnReady('$.atk4.includeJS("' . $file . '")'); return $this; } $url = $this->api->locateURL('js', $file . $ext); if (!$this->atk4_initialised) { return parent::addInclude($file, $ext); } parent::addOnReady('$.atk4.includeJS("' . $url . '")'); return $this; }