PHP code example of flextype-components / template

1. Go to this page and download the library: Download flextype-components/template library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

flextype-components / template example snippets


use Flextype\Component\View\View;

// Create new view object
$view = new View('blog/views/backend/index');

// Assign some new variables
$view->assign('msg', 'Some message...');

// Get view
$output = $view->render();

// Display view
echo $output;

View::factory('blog/views/backend/index')
     ->assign('msg', 'Some message...')
     ->display();

// Get view
$output = $view->render();

// Display output
echo $output;

$view->display();