protected $addressees = true;
protected $attachments = true;
+ protected $id_prefix = null;
protected $maxchars = 0;
protected $options = true;
protected $show_n = NOTICES_PER_PAGE;
$this->$key = (bool)$prefs[$key];
}
}
-
+ // string preferences
+ foreach(array('id_prefix') as $key) {
+ if (array_key_exists($key, $prefs)) {
+ $this->$key = $prefs[$key];
+ }
+ }
}
/**
*
* @return int Total amount of notices actually available.
*/
- function show()
+ public function show()
{
- $this->out->elementStart('div', array('id' =>'notices_primary'));
$this->out->elementStart('ol', array('class' => 'notices xoxo'));
$notices = $this->notice->fetchAll();
}
$this->out->elementEnd('ol');
- $this->out->elementEnd('div');
-
return $total;
}
{
$prefs = array('addressees' => $this->addressees,
'attachments' => $this->attachments,
+ 'id_prefix' => $this->id_prefix,
'maxchars' => $this->maxchars,
'options' => $this->options);
return new NoticeListItem($notice, $this->out, $prefs);