mostly filebased Content Presentation System
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace Modules;
  3. class CMember extends ContentType {
  4. public $keys = array(
  5. 'NAME' => 'name',
  6. 'FIRSTNAME' => 'firstname',
  7. 'ROLE' => 'role'
  8. );
  9. public $values;
  10. protected $layout;
  11. protected $layouts = array(
  12. 'default' => 'simple',
  13. 'toc' => 'view_in_toc'
  14. );
  15. function __construct($keys,$config) {
  16. parent::__construct($keys,$config);
  17. }
  18. function simple() {
  19. return sprintf("sdsd");
  20. }
  21. function view_in_toc() {
  22. $f3 = \Base::instance();
  23. $v = (object) $this->values;
  24. $name = $v->name;
  25. if ($v->firstname) {
  26. $name = $v->firstname." ".$name;
  27. //$name .= ", ".$v->firstname;
  28. }
  29. $v->termine = new TOC(array(
  30. 'concerts',
  31. '/spielplan/termine/',
  32. ''
  33. ),
  34. $f3->get('CONTENT'),
  35. 'MEMBERS=@'.$this->id
  36. );
  37. //var_dump($v->test);
  38. $v->termine->dispatch();
  39. return sprintf("<h1><a href=\"/%s\">%s</a><span class=\"role\">%s</span></h1>%s<br>",
  40. $this->href,
  41. $name,
  42. $v->role,
  43. $v->termine
  44. );
  45. }
  46. }