Eve Component Library

Eve is a component library built on top of Eden PHP. Following the same practices of not making a general definition of how a page is built out, it doesn't mean you can't use pre-built components. We taken components all over the internet and combined them into this PHP driven output. Eve is also powered by Twitter Bootstrap 3!

SVN Checkout

Fields

Color Block Snippet
<?php echo eve()->field()
->color('colour', '#006699'); ?>

Button Block Snippet
<?php echo eve()->field()->button('button')
->setAttributes('class', 'btn-primary'); ?>

Radio Block Snippet
<?php echo eve()->field()
->radio('radio', 3, array(
    '1' => 'Option 1',
    '2' => 'Option 2',
    '3' => 'Option 3',
    '4' => 'Option 4'
)); ?>

Select Block Snippet
<?php echo eve()->field()
->select('select', 4, array(
    '1' => 'Option 1',
    '2' => 'Option 2',
    '3' => 'Option 3',
    '4' => 'Option 4'
)); ?>

Checkbox Block Snippet
<?php echo eve()->field()
->checkbox('checkbox', array(2, 4), array(
    '1' => 'Option 1',
    '2' => 'Option 2',
    '3' => 'Option 3',
    '4' => 'Option 4'
)); ?>

File Block Snippet
<?php echo eve()->field()->file('file', true); ?>

File Block Snippet
<?php echo eve()->field()->image('image', true); ?>

File Block Snippet
<?php echo eve()
->field()
->tag('tags', 'test,swe')
->addOptions('test', array('local' => array(
'Lorem', 	'Ipsum',
'Dolor',	'Levity',
'Dasma',	'Dogity',
'Lord Of the Rings'))); ?>

Mask Block Snippet
<?php echo eve()->field()
->mask('99-999-a-**-999', 
'99-999-a-a1-321'); ?>

Slider Block Snippet
<?php echo eve()->field()->slider('slider'); ?>

Date Block Snippet
<?php echo eve()->field()->date('date'); ?>

Date Block Snippet
<?php echo eve()->field()->time('time'); ?>

Date Block Snippet
<?php echo eve()->field()->datetime('datetime'); ?>

Autocomplete Block Snippet
<?php echo eve()
->field()
->autocomplete('autocomplete')
->addOptions('autocomplete', array('local' => array(
'Lorem Ipsum', 
'Ipsum Dolor',
'Dolor Levity',
'Levity Dasma',
'Dasma Dogity',
'Dogity Lorem',
'Lord Of the Rings'))); ?>

Combobox Block Snippet
<?php echo eve()
->field()
->combobox('combobox')
->addOptions('combobox', array('local' => array(
'Lorem Ipsum', 
'Ipsum Dolor',
'Dolor Levity',
'Levity Dasma',
'Dasma Dogity',
'Dogity Lorem',
'Lord Of the Rings 3'))); ?>

OK Cancel
OK Cancel
Wysiwyg Block Snippet
<?php echo eve()->field()
->wysiwyg('wysiwyg')
->setAttributes('rows', 10); ?>

Wysiwyg Block Snippet
<?php echo eve()
->block()
->tree()
->setCallback(function($path, $item) {
    $template = $path.' '.$item['name'];
    if(isset($item['children']) && !empty($item['children'])) {
        $template = '<i class="icon-expand"></i> '.$template;
    }
    
    return $template;
})
->canToggle('i')
->addItem('some/path/0',    array('name' => 'One',   'active' => 1))
->addItem('some/path',      array('name' => 'Two',   'active' => 1))
->addItem('some',           array('name' => 'Three', 'active' => 0))
->addItem('some/path/2',    array('name' => 'Four',  'active' => 1))
->addItem('some/other',     array('name' => 'Five',  'active' => 0))
->addItem('another/path/0', array('name' => 'Six',   'active' => 1))
->addItem('another/path',   array('name' => 'Seven', 'active' => 1))
->addItem('another',        array('name' => 'Eight', 'active' => 0))
->addItem('another/path/2', array('name' => 'Nine',  'active' => 1))
->addItem('another/other',  array('name' => 'Ten',   'active' => 0)); ?>

Blocks

Key
Sort Block Snippet
<?php echo eve()->block()
->sort($_GET, 'key', 'Key'); ?>

Pagination Block Snippet
<?php echo eve()
->block()
->pagination(100)
->setQuery($_GET); ?>

Login Block

Password not right
Login Block Snippet
<?php echo eve()
->module()
->user()
->block()
->login()
->setHolders('user_email', 'Enter Email')
->setHolders('user_password', 'Enter Password')
->setErrors('user_email', 'Email Taken')
->setErrors('user_password', 'Password not right')
->setData('user_name', 'halibut')
->useSlug(); ?>

Register Block

Password not right
Register Block Snippet
<?php echo eve()->module()->user()->block()->fields()
->setHolders('user_email', 'Enter Email')
->setHolders('user_password', 'Enter Password')
->setErrors('user_email', 'Email Taken')
->setErrors('user_password', 'Password not right')
->setData('user_name', 'halibut')
->setData('user_password', 'halibut')
->useSlug(); ?>

Address Block

Postal is required
Address Block Snippet
<?php echo eve()->module()->user()->block()->address()
->setStates(eden('country')->us()->getStates())
->setRegions(eden('country')->us()->getTerritories())
->setHolders('address_street_1', '123 Sesame Street')
->setHolders('address_city', 'White Plains')
->setHolders('address_state', 'New York')
->noStreet2()
->noNeighborhood()
->setPhonePattern('999-9999')
->setHolders('address_phone', '555-2424')
->setErrors('address_postal', 'Postal is required'); ?>

Post Block

Title cannot be empty
Post Block Snippet
<?php echo eve()
->module()
->post()
->block()
->fields()
->setHolders('post_title', 'Enter Title')
->setErrors('post_title', 'Title cannot be empty')
->setHolders('post_slug', 'Enter Slug')
->setData('post_detail', 'halibut')
->setData('post_active', 1); ?>

Search Block

Search Block Snippet
<?php echo eve()->block()->search()->useIcon(); ?>

© Openovate Labs