ACC SHELL
<?php
class o_gallery_simple extends object
{
public function initialize($phase)
{
parent::initialize($phase);
if ($phase == 0)
{
$this->set('order', array('+priority', '+title'));
$this->f('otitle')->get = 'return ($object->oid ? $object->title : "");';
$this->defineOCreated();
$this->definePriority();
$this->defineImage();
$this->defineStringLocalized('title');
}
}
}
class gallery_simple extends ObjectModule
{
public function initialize($phase)
{
parent::initialize($phase);
if ($phase == 4)
{
$this->action('list')->set('order-fields', array('timestamp', 'priority', 'title'));
$this->action('list')->set('columns', array('priority', 'title', 'image'));
$this->action('list')->set('actions', array('new', 'edit', 'delete'));
}
}
public function index($options = array())
{
Router::add(Router::TYPE_EQUALS, __('get-url'), array('page.location' => $this->id.'/get'));
Router::process();
if (page()->location("{$this->id}/get"))
$this->mainTemplate();
}
public function page($options = array())
{
if (page()->location("~^{$this->id}/~"))
{
page()->breadcrumb(__('module-name', $this->id), $this->url('get'));
return true;
}
}
/************************************************** ACTIONS **************************************************/
}
?>
ACC SHELL 2018