Guest User

Untitled

a guest
Jan 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Model\Cursos;
  4.  
  5. use EmagLib\Search\Search,
  6. EmagLib\Search\Restrictions\WebRestriction,
  7. EmagLib\Search\Restrictions\LocalRestriction;
  8.  
  9. /**
  10. * The cursos standard search. This example, uses the PHP 5.4 traits to apply
  11. * restrictions to the Search.
  12. *
  13. * @Search(facet="true", highlight="true", start="0", rows="20", resultEntity="Model\Cursos\Curso")
  14. * @SearchParam(name="f.titulo.h1.fragsize", value="...")
  15. * @SearchParam(name="f.programa.h1.fragsize", value="...")
  16. * @SearchParam(name="f.programa.h1.snippets", value="...")
  17. * @SearchParam(name="f.snippet.h1.fragsize", value="...")
  18. */
  19. class StandardCursosSearch implements Search
  20. {
  21. use WebRestriction, LocalRestriction;
  22.  
  23. /**
  24. * The category id
  25. *
  26. * @var int
  27. * @Filter(mapsTo="idCateg")
  28. * @FacetField
  29. */
  30. public $idCategoria;
  31.  
  32. /**
  33. * The Curso's skill level. (If we don't provide a "mapTo" attribute, the search manager will map to "nivelCurso"
  34. *
  35. * @var int
  36. * @Filter
  37. */
  38. public $nivelCurso;
  39. }
Add Comment
Please, Sign In to add comment