PHPCS BookmarkForm

This commit is contained in:
Evan Prodromou 2010-12-21 10:16:53 -05:00
parent c96faf065d
commit 14babfb900

View File

@ -47,20 +47,33 @@ if (!defined('STATUSNET')) {
class BookmarkForm extends Form class BookmarkForm extends Form
{ {
private $_title = null; private $_title = null;
private $_url = null; private $_url = null;
private $_tags = null; private $_tags = null;
private $_description = null; private $_description = null;
function __construct($out=null, $title=null, $url=null, $tags=null, $description=null) /**
{ * Construct a bookmark form
parent::__construct($out); *
* @param HTMLOutputter $out output channel
* @param string $title Title of the bookmark
* @param string $url URL of the bookmark
* @param string $tags Tags to show
* @param string $description Description of the bookmark
*
* @return void
*/
$this->_title = $title; function __construct($out=null, $title=null, $url=null, $tags=null,
$this->_url = $url; $description=null)
$this->_tags = $tags; {
$this->_description = $description; parent::__construct($out);
}
$this->_title = $title;
$this->_url = $url;
$this->_tags = $tags;
$this->_description = $description;
}
/** /**
* ID of the form * ID of the form
@ -103,35 +116,35 @@ class BookmarkForm extends Form
function formData() function formData()
{ {
$this->out->elementStart('fieldset', array('id' => 'new_bookmark_data')); $this->out->elementStart('fieldset', array('id' => 'new_bookmark_data'));
$this->out->elementStart('ul', 'form_data'); $this->out->elementStart('ul', 'form_data');
$this->li(); $this->li();
$this->out->input('title', $this->out->input('title',
_('Title'), _('Title'),
$this->_title, $this->_title,
_('Title of the bookmark')); _('Title of the bookmark'));
$this->unli(); $this->unli();
$this->li(); $this->li();
$this->out->input('url', $this->out->input('url',
_('URL'), _('URL'),
$this->_url, $this->_url,
_('URL to bookmark')); _('URL to bookmark'));
$this->unli(); $this->unli();
$this->li(); $this->li();
$this->out->input('tags', $this->out->input('tags',
_('Tags'), _('Tags'),
$this->_tags, $this->_tags,
_('Comma- or space-separated list of tags')); _('Comma- or space-separated list of tags'));
$this->unli(); $this->unli();
$this->li(); $this->li();
$this->out->input('description', $this->out->input('description',
_('Description'), _('Description'),
$this->_description, $this->_description,
_('Description of the URL')); _('Description of the URL'));
$this->unli(); $this->unli();
$this->out->elementEnd('ul'); $this->out->elementEnd('ul');