PHP code example of zooxsmart / los-ui

1. Go to this page and download the library: Download zooxsmart/los-ui 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/ */

    

zooxsmart / los-ui example snippets



echo $this->losHead()->getJquery();
 
//Will use the 2.2.0 unminified version  
echo $this->losHead()->getJquery(false, '2.1.0');


//Will use the 2.2.0 unminified version  
echo $this->losHead()->getJqueryLink(false, '2.1.0');

 
echo $this->losHead()->getFontAwesome();

//Will use the unminified version
echo $this->losHead()->getFontAwesome(false);
 
//Will use the 4.2.0 unminified version  
echo $this->losHead()->getFontAwesome(false, '4.2.0');

// Will return only the css link
echo $this->losHead()->getFontAwesomeLink();

<?= $this->losIcon('fa-user') 

<?= $this->losIcon('fa-user', 'margin-right:4px;float:none') 

<?= $this->losIcon('fa-user pull-right') 

 
//Will use the minified local version (both css and js)
echo $this->losHead()->addBootstrap();

//Will use the minified version
echo $this->losHead()->addBootstrap(true);

//Will use the 3.3.1 unminified version  
echo $this->losHead()->addBootstrap(true, '3.3.1');

// Will only generate the javascript link
echo $this->losHead()->addBootstrapJs();

// Will only generate the css link
echo $this->losHead()->addBootstrapCss();

// Will only generate the css link url
echo $this->losHead()->addBootstrapCssLink();

<?= $this->losForm($form) 

<?= $this->losForm($form, true) 

<?= $this->losFormRow($form->get('password') 


echo $this->losForm()->openTag($form, true);
foreach (['name','gender','email','password','passwordVerify','captcha','newsletter','submit'] as $element) {
    echo $this->losFormRow()->render($form->get($element), true, 4);
}
echo $this->losForm()->closeTag();


array(
	'spec' => array(
	    'type'    => 'Laminas\Form\Element\Text',
    	'name'    => 'price',
    	'options' => array(
        	'label' => 'Price',
        	'addon-append' => '.00',
        	'addon-prepend' => 'glyphicon-usd',
    	),
    ),
),
array(
	'user' => array(
	    'type'    => 'Laminas\Form\Element\Text',
    	'name'    => 'user',
    	'options' => array(
        	'label' => 'User',
        	'addon-prepend' => 'fa-user'
    	),
    ),
),


/**
 * @Form\Attributes({"type":"text","placeholder":"Price"})
 * @Form\Options({"label":"Price", "addon-prepend":"glyphicon-usd", "addon-append":".00"})
 */
protected $price;


array(
	'spec' => array(
	    'type'    => 'Laminas\Form\Element\Text',
    	'name'    => 'price',
    	'options' => array(
        	'label' => 'Price',
        	'addon-append' => '.00',
        	'addon-prepend' => 'glyphicon-usd',
        	'help-block' => 'Value is a price',
    	),
    ),
),

<?= $this->losAlert('test') 

<?= $this->losAlert()->success('test') 

<?= $this->losAlert()->setDismissible(true)->success('test') 

<?= $this->losBadge('2') 

<?= $this->losButton('Test') 

<?= $this->losIcon('glyphicon-user') 

<?= $this->losIcon('glyphicon-user', 'margin-right:4px;float:none') 

<?= $this->losIcon('glyphicon-user pull-right') 

 echo $this->losImage('/images/logo.png') 

 echo $this->losImage('/images/logo.png')->setResponsive(false) 

<?= $this->losLabel('test') 

<?= $this->losNavigation('Navigation')->menu()


'navigation' => [
    'default' => [
        'crud' => [
            'pages' => [
                [
                    'label' => 'Client',
                    'route' => 'client',
                    'pages' => [
                        [
                            'label' => 'Edit Client',
                            'route' => 'client/edit',
                        ],
                        [
                    		'type' => 'LosUi\Navigation\Page\Divider'
                 		],
                  		[
                            'label' => 'Remove Client',
                            'route' => 'client/remove',
                        ],
                    ]
                ]
            ]
        ]
    ]
]

<?= $this->losPaginationControl($this->paginator); 

<?= $this->losWell('test')