List Layout

Using the following code snippet you could create simple list layouts.


Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 301

Deprecated: Function create_function() is deprecated in /var/www/docs.appzio.com/public/wp-content/plugins/wp-gfm/markdown.php on line 302
public function tab1() {
	$this->layout = new stdClass();

	$this->model->flushActionRoutes();

	$list_items = [
	    'Controller/SimpleGrid' => 'Simple Grid',
	    'Controller/ExtendedGrid' => 'Extended Grid',
	    'Controller/Checkboxes' => 'Checkboxes & Radio Buttons',
	    'Controller/Overlay' => 'Overlay Images',
	    'Controller/Swipers' => 'Swipers',
    ];

    foreach ($list_items as $route => $list_item) {
        $this->layout->scroll[] = $this->getComponentRow([
            $this->getComponentText($list_item, [], [
                'padding' => '10 15 10 15',
                'width' => 'auto',
                'text-align' => 'center',
                'border-width' => '1',
                'border-color' => '#cccccc',
                'border-radius' => '5',
                'background-color' => '#eaeaea',
                'color' => '#333333',
            ])
        ], [
            'onclick' => $this->getOnclickRoute($route, true)
        ], [
            'margin' => '10 15 0 15',
        ]);
	}

	return $this->layout;
}