| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace MGModule\DNSManager2\models\custom\package\item;
- use MGModule\DNSManager2 as main;
- /**
- * Description of repository
- *
- * @author Michal Czech <michael@modulesgarden.com>
- */
- class Repository extends \MGModule\DNSManager2\mgLibs\models\repository{
- public function getModelClass() {
- return __NAMESPACE__.'\PackageItem';
- }
-
- public function byType($type) {
- return $this->setFilter('type', $type);
- }
-
- public function byRelID($relid) {
- return $this->setFilter('relid', $relid);
- }
-
- public function byPackageID($packageid) {
- return $this->setFilter('packageid', $packageid);
- }
-
- public function getItemsWith($type, $relid) {
- $this->setFilter('type', $type);
- if($relid !== false)
- $this->setFilter('relid', $relid);
- return $this->get();
- }
- }
|