Beispiel #1
0
 protected function declareParameters()
 {
     global $wgWFMKMaxWidth;
     $this->title = new Title('title');
     $this->title->setRequired();
     $this->addParameter($this->title);
     $this->caption = new Wikitext('caption');
     $this->caption->setParser($this->getParser());
     $this->caption->setRequired();
     $this->addParameter($this->caption);
     $this->color = new XorParameter('color');
     $red = new Option('red');
     $this->color->addParameter($red);
     $grey = new Option('grey');
     $this->color->addParameter($grey);
     $this->color->setDefaultValue('red');
     $this->addParameter($this->color);
     $this->width = new IntegerInPixel('width');
     $this->width->setMax($wgWFMKMaxWidth);
     $this->addParameter($this->width);
     $this->height = new IntegerInPixel('height');
     $this->addParameter($this->height);
     $float = new XorParameter('float');
     $this->right = new Option('right');
     $float->addParameter($this->right);
     $this->left = new Option('left');
     $float->addParameter($this->left);
     $this->addParameter($float);
 }