|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
-
- namespace Modules;
-
- class CMember extends ContentType {
-
- public $keys = array(
- 'NAME' => 'name',
- 'FIRSTNAME' => 'firstname',
- 'ROLE' => 'role'
- );
- public $values;
- protected $layout;
- protected $layouts = array(
- 'default' => 'simple',
- 'toc' => 'view_in_toc'
- );
-
- function __construct($keys,$config) {
-
- parent::__construct($keys,$config);
- }
-
-
- function simple() {
- return sprintf("sdsd");
- }
-
- function view_in_toc() {
- $f3 = \Base::instance();
- $v = (object) $this->values;
-
- $name = $v->name;
- if ($v->firstname) {
- $name = $v->firstname." ".$name;
- //$name .= ", ".$v->firstname;
- }
-
- $v->termine = new TOC(array(
- 'concerts',
- '/spielplan/termine/',
- ''
- ),
- $f3->get('CONTENT'),
- 'MEMBERS=@'.$this->id
- );
- //var_dump($v->test);
- $v->termine->dispatch();
-
-
- return sprintf("<h1><a href=\"/%s\">%s</a><span class=\"role\">%s</span></h1>%s<br>",
- $this->href,
- $name,
- $v->role,
- $v->termine
- );
- }
-
- }
|