Repository.php 593 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace MGModule\DNSManager2\models\custom\set;
  3. /**
  4. * Description of repository
  5. *
  6. * @author Michal Czech <michael@modulesgarden.com>
  7. */
  8. class Repository extends \MGModule\DNSManager2\mgLibs\models\repository
  9. {
  10. public function getModelClass()
  11. {
  12. return __NAMESPACE__.'\Set';
  13. }
  14. public function adminOnly()
  15. {
  16. return $this->byUserId('ISNULL');
  17. }
  18. public function byUserId($userId)
  19. {
  20. return $this->setFilter('idu', $userId);
  21. }
  22. public function byID($id)
  23. {
  24. return $this->setFilter('id', $id);
  25. }
  26. }