| Current Path : /var/www/iplanru/data/old/www/i-plan.ru/media/zoo/elements/itemmodified/ |
| Current File : /var/www/iplanru/data/old/www/i-plan.ru/media/zoo/elements/itemmodified/itemmodified.php |
<?php
/**
* @package ZOO
* @author YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/
/*
Class: ElementItemModified
The item modified element class
*/
class ElementItemModified extends Element {
/*
Function: hasValue
Checks if the element's value is set.
Parameters:
$params - render parameter
Returns:
Boolean - true, on success
*/
public function hasValue($params = array()) {
return true;
}
/*
Function: edit
Renders the edit form field.
Returns:
String - html
*/
public function edit() {
return null;
}
/*
Function: render
Renders the element.
Parameters:
$params - render parameter
Returns:
String - html
*/
public function render($params = array()) {
$params = $this->app->data->create($params);
$format = $params->get('date_format');
if ($format == 'custom') {
$format = $params->get('custom_format');
}
if (!empty($this->_item)) {
return $this->app->html->_('date', $this->_item->modified, $this->app->date->format($format), $this->app->date->getOffset());
}
}
}