Back to WebAssetRegistry class

Method addTemplateRegistryFile

public self
addTemplateRegistryFile
(string $template, int $client)
Helper method to register new file with Template Asset(s) info
Parameters
  • string $template The template name
  • int $client The application client id
Returns
  • self
Since
  • 4.0.0

Method addTemplateRegistryFile - Source code

/**
 * Helper method to register new file with Template Asset(s) info
 *
 * @param   string   $template  The template name
 * @param   integer  $client    The application client id
 *
 * @return  self
 *
 * @since  4.0.0
 */
public function addTemplateRegistryFile(string $template, int $client) : self
{
    switch ($client) {
        case 0:
            $this->addRegistryFile('templates/' . $template . '/joomla.asset.json');
            break;
        case 1:
            $this->addRegistryFile('administrator/templates/' . $template . '/joomla.asset.json');
            break;
        default:
            break;
    }
    return $this;
}