Validator messages
Messages the validator shows while loading a theme (lang/en/themes.php). Placeholders (:file, :code …) are filled with the real value. The rules are in §8.
Message
| Key | Message |
|---|---|
legacy | The theme does not use the contract (old structure: views/ folder). |
missing_file | Required file missing: :file (:mode). |
language_not_array | language.php must return a plain array only: :reason |
language_bad_key | language.php: key or text ":key" is invalid (keys use lowercase letters, digits, underscores and dots; text cannot be empty). |
symlink | Symbolic links are not allowed: :file |
server_config | Server configuration files are not allowed: :file |
executable | Executable files are not allowed: :file |
unknown_template | Template not in the contract is never used: :file |
template_location | Templates are used only in the theme root or under includes/: :file |
head_required | :file: {!! $page['head'] !!} is required (SEO, security and theme files are printed from here). |
hook_required | :file: @hook(':hook') is required (cookie consent, maintenance and impersonation strips). |
forbidden | forbidden construct ":code" — :reason |
raw | raw output is allowed only for permitted expressions: :code |
include_target | :directive may only call the theme's includes/ templates: :target |
inline_script | inline <script> is forbidden (load scripts from assets/js with theme_asset()) |
inline_handler | inline event handlers are forbidden (:attr=) |
javascript_url | javascript: URLs are forbidden |
Kinds of forbidden constructs
| Key | Message |
|---|---|
php_block | PHP blocks cannot run in templates |
php_tag | PHP tags cannot be used in templates |
directive | this Blade directive is disabled in themes |
facade | core services (database, session, files…) are not reachable from themes |
class | themes cannot use classes or create objects |
function | this function is disabled in themes; data comes from the presenter layer |
include | PHP files cannot be included |
superglobal | request data cannot be accessed directly |
internal | view engine internals cannot be accessed |
backtick | shell commands (backticks) are forbidden |
Expressions allowed in raw output
{!! $page['head'] !!}{!! site_component('…') !!}{!! $x['…_html'] !!}{!! theme_icon('…') !!}
Extensions treated as executable
.php .phtml .phar .php3 .php4 .php5 .php7 .php8 .pht .phps .cgi .pl .py .sh .asp .aspx .jsp