本文整理汇总了PHP中Wiki::get_items方法的典型用法代码示例。如果您正苦于以下问题:PHP Wiki::get_items方法的具体用法?PHP Wiki::get_items怎么用?PHP Wiki::get_items使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wiki
的用法示例。
在下文中一共展示了Wiki::get_items方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Show
public function Show($parameters)
{
$view = new Zend_View();
$view->addScriptPath('../library/Shineisp/Custom/views');
$limit = 10;
$id = null;
$ns = new Zend_Session_Namespace();
$languageID = Languages::get_language_id($ns->lang);
$translator = Shineisp_Registry::getInstance()->Zend_Translate;
if (!empty($parameters['category']) && is_numeric($parameters['category'])) {
$id = $parameters['category'];
}
if (!empty($parameters['limit']) && is_numeric($parameters['limit'])) {
$limit = $parameters['limit'];
}
// Get the products
$view->wiki = Wiki::get_items($limit, $id);
return $view->render('wikilist.phtml');
}
示例2: editAction
/**
* editAction
* Get a record and populate the application form
* @return unknown_type
*/
public function editAction()
{
$this->getHelper('layout')->setLayout('1column');
$form = $this->getForm('/tickets/process');
$id = $this->getRequest()->getParam('id');
if (!empty($id) && is_numeric($id)) {
$isp = Shineisp_Registry::get('ISP');
$fields = "DATE_FORMAT(t.date_open, '%d/%m/%Y %H:%i:%s') as creationdate, t.sibling_id, DATE_FORMAT(t.date_close, '%d/%m/%Y %H:%i:%s') as expiringdate, \n\t\t\tt.subject, t.description, t.status_id as status_id, t.vote as vote, s.status as status, c.email as email, CONCAT(c.firstname, ' ', c.lastname) as customer, c.company as company, (DATEDIFF(t.date_close, t.date_open)) as days";
$rs = $this->tickets->getAllInfo($id, $fields, true);
if (!empty($rs[0])) {
if (!empty($rs[0]['sibling_id'])) {
$rs[0]['sibling'] = Tickets::getAllInfo($rs[0]['sibling_id'], $fields, true);
}
$this->view->headTitle()->prepend($rs[0]['customer']);
$this->view->headTitle()->prepend($rs[0]['subject']);
$form->populate($rs[0]);
$this->view->record = $rs[0];
$this->view->isp = $isp;
$this->view->adminavatar = Shineisp_Commons_Gravatar::get_gravatar($isp->email, 80);
$this->view->customeravatar = Shineisp_Commons_Gravatar::get_gravatar($rs[0]['email'], 80);
$this->view->notes = Tickets::Notes($id, "note_id, admin as adminreply, vote as vote, DATE_FORMAT(date_post, '%d/%m/%Y %H:%i:%s') as date_post,CONCAT(c.firstname, ' ', c.lastname) as customer, c.company as company, note", true);
$this->view->summary = $rs[0];
$status = $rs[0]['status_id'];
if ($status == Statuses::id('closed', 'tickets') || $status == Statuses::id('solved', 'tickets')) {
$this->view->canreply = false;
} else {
$this->view->canreply = true;
}
$this->view->name = $rs[0]['subject'];
}
$this->view->id = $id;
$this->view->title = $this->translator->translate('Ticket');
$this->getHelper('layout')->setLayout('2columns-right');
$this->view->placeholder("right")->append($this->view->partial('partials/wikisidebar.phtml', array('items' => Wiki::get_items(5))));
}
$this->view->title = $this->translator->translate("Ticket");
$this->view->description = $this->translator->translate("Here you can write down your problem. Remember to be clear and analytic in order to explain the problem that has been occurred.");
$this->view->dnsdatagrid = $this->dnsGrid();
$this->view->form = $form;
$this->_helper->viewRenderer('customform');
}