Usage examples
Ce contenu n’est pas encore disponible dans votre langue.
Each section shows one use case with one php block, written as code that runs in a view and echoes its output. The
documentation site can render each block as a live demo, so the rendered output is not copied into this page.
Basic usage
Section titled “Basic usage”Describe what the example shows.
use yii\template\Example;
$example = new Example();
echo $example->getExample(true) ? 'Legacy mode' : 'Default mode';