forked from rat4m3n/pyrocms-store
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.php
More file actions
34 lines (32 loc) · 716 Bytes
/
plugin.php
File metadata and controls
34 lines (32 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* This is a sample module for PyroCMS
*
* @author Jerel Unruh - PyroCMS Dev Team
* @website http://unruhdesigns.com
* @package PyroCMS
* @subpackage Sample Module
*/
class Plugin_Sample extends Plugin
{
/**
* Item List
* Usage:
*
* {{ sample:items limit="5" order="asc" }}
* {{ id }} {{ name }} {{ slug }}
* {{ /sample:items }}
*
* @return array
*/
function items()
{
$limit = $this->attribute('limit');
$order = $this->attribute('order');
return $this->db->order_by('name', $order)
->limit($limit)
->get('sample_items')
->result_array();
}
}
/* End of file plugin.php */