perfart.class.inc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. class NodeEntityFieldQuery extends EntityFieldQuery {
  3. // define some defaults for the class
  4. public function __construct() {
  5. // now we don't need to define these over and over anymore
  6. $this
  7. ->entityCondition('entity_type', 'node')
  8. ->propertyCondition('status', 1);
  9. }
  10. }
  11. class EffectuationEntityFieldQuery extends NodeEntityFieldQuery {
  12. // define some defaults for the class
  13. public function __construct() {
  14. // now we don't need to define these over and over anymore
  15. $this
  16. ->entityCondition('bundle', array('effectuation'))
  17. ->fieldCondition('field_performances', 'target_id', 'NULL', '!=')
  18. ->fieldOrderBy('field_date_de_debut', 'value', 'ASC');
  19. }
  20. }
  21. // class PerformanceEntityFieldQuery extends NodeEntityFieldQuery {
  22. // // define some defaults for the class
  23. // public function __construct() {
  24. // // now we don't need to define these over and over anymore
  25. // $this
  26. // ->entityCondition('bundle', array('performance'));
  27. // }
  28. // }
  29. /*
  30. class PerformancesEntityFieldQuery extends NodeEntityFieldQuery {
  31. // define some defaults for the class
  32. public function __construct() {
  33. // now we don't need to define these over and over anymore
  34. $this
  35. ->entityCondition('bundle', array('performance'));
  36. }
  37. }
  38. */