system/modules/dma_elementgenerator/models/DmaEgFieldsModel.php line 32

Open in your IDE?
  1. <?php
  2. /**
  3. * Contao Open Source CMS
  4. *
  5. * Copyright (c) 2005-2015 Leo Feyer
  6. *
  7. * @license LGPL-3.0+
  8. */
  9. namespace DMA;
  10. class DmaEgFieldsModel extends \Model
  11. {
  12. /**
  13. * Table name
  14. * @var string
  15. */
  16. protected static $strTable = 'tl_dma_eg_fields';
  17. /**
  18. * Find published fields by their parent ID filtered by type=legend
  19. *
  20. * @param mixed $intPid The numeric PID
  21. * @param array $arrOptions An optional options array
  22. *
  23. * @return static The DmaEgFieldsModel or null if there are no fields
  24. */
  25. public static function findAllNotLegendsByPid($intPid, array $arrOptions=array())
  26. {
  27. $t = static::$strTable;
  28. $arrColumns = array("$t.pid=? AND $t.type!=?");
  29. $arrValues = array
  30. (
  31. $intPid,
  32. 'lengend'
  33. );
  34. $arrOptions['order'] = "sorting";
  35. if (!BE_USER_LOGGED_IN)
  36. {
  37. }
  38. return static::findBy($arrColumns, $arrValues, $arrOptions);
  39. }
  40. }