コード例 #1
0
ファイル: Facebook.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     global $wgWFMKMaxWidth;
     $this->profile = new String('profile');
     $this->profile->setRequired();
     $this->addParameter($this->profile);
     $this->width = new IntegerInPixel('width');
     $this->width->setDefaultValue($wgWFMKMaxWidth);
     $this->width->setMin(0);
     $this->width->setMax($wgWFMKMaxWidth);
     $this->addParameter($this->width);
     $this->height = new IntegerInPixel('height');
     $this->height->setDefaultValue(556);
     $this->height->setMin(0);
     $this->addParameter($this->height);
     $this->faces = new Boolean('faces');
     $this->faces->setDefaultValue(true);
     $this->addParameter($this->faces);
     $this->stream = new Boolean('stream');
     $this->stream->setDefaultValue(true);
     $this->addParameter($this->stream);
     $this->force_wall = new Boolean('force_wall');
     $this->addParameter($this->force_wall);
     $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);
 }
コード例 #2
0
ファイル: Gravatar.php プロジェクト: eFFemeer/seizamcore
 protected function declareParameters()
 {
     $this->source = new XorParameter('source');
     $email = new String('email');
     $email->setValidateType('email');
     $this->source->addParameter($email);
     $user = new User('user');
     $this->source->addParameter($user);
     $this->source->setDefaultParameter($user);
     global $wgUser;
     $this->source->setDefaultValue($wgUser, false);
     $this->addParameter($this->source);
     $this->size = new IntegerInPixel('size');
     global $wgWFMKMaxWidth;
     $this->size->setMax(min(array($wgWFMKMaxWidth, 2048)));
     $this->size->setDefaultValue(80);
     $this->addParameter($this->size);
     /*
     * Currently, rating is forced to G: "suitable for display on all websites with any audience type"
      $this->rating = new XorParameter('rating');
      $this->rating->addParameter(new Option('g')); // +++ all websites with any audience type
      $this->rating->addParameter(new Option('pg')); // ++
      $this->rating->addParameter(new Option('r')); // +
      $this->rating->addParameter(new Option('x')); // ! hardcore
      $this->addParameter($this->rating);
     */
     $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);
 }
コード例 #3
0
ファイル: Jamendo.php プロジェクト: eFFemeer/seizamcore
 public function declareParameters()
 {
     $track = new String('track');
     $track->setValidateType('int');
     $album = new String('album');
     $album->setValidateType('int');
     $this->source = new XorParameter('source');
     $this->source->addParameter($track);
     $this->source->addParameter($album);
     $this->source->setRequired();
     $this->source->setDefaultParameter($track);
     $this->addParameter($this->source);
     $this->autoplay = new Boolean('autoplay');
     $this->addParameter($this->autoplay);
     $this->lang = new XorParameter('lang');
     $this->lang->addParameter(new Option('en'));
     $this->lang->addParameter(new Option('fr'));
     $this->lang->setDefaultValue('en');
     $this->addParameter($this->lang);
     $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);
 }
コード例 #4
0
ファイル: Button.php プロジェクト: eFFemeer/seizamcore
 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);
 }
コード例 #5
0
ファイル: YouTube.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     global $wgWFMKMaxWidth;
     $this->id = new String('id');
     $this->id->setEscapeMode('urlpathinfo');
     $this->playlist = new String('playlist');
     $this->playlist->setEscapeMode('urlpathinfo');
     $source = new XorParameter('source');
     $source->addParameter($this->id);
     $source->addParameter($this->playlist);
     $source->setRequired();
     // user need to set one of these parameter
     $source->setDefaultParameter($this->id);
     // user don't need to type "id=xxx", just "xxx" at right position
     $this->addParameter($source);
     $this->width = new IntegerInPixel('width');
     $this->width->setDefaultValue($wgWFMKMaxWidth);
     $this->width->setMin(0);
     $this->width->setMax($wgWFMKMaxWidth);
     $this->addParameter($this->width);
     $this->height = new IntegerInPixel('height');
     $this->height->setDefaultValue(441);
     $this->height->setMin(0);
     $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);
 }
コード例 #6
0
ファイル: GoogleDoc.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     global $wgWFMKMaxWidth;
     $this->id = new String('id');
     $this->id->setEscapeMode('urlpathinfo');
     $this->addParameter($this->id);
     $this->oldkey = new String('oldkey');
     $this->oldkey->setEscapeMode('urlpathinfo');
     $this->addParameter($this->oldkey);
     $this->width = new IntegerInPixel('width');
     $this->width->setDefaultValue($wgWFMKMaxWidth - 2);
     // -2 because of frameborder
     $this->width->setMax($wgWFMKMaxWidth - 2);
     // -2 because of frameborder
     $this->addParameter($this->width);
     $this->height = new IntegerInPixel('height');
     $this->height->setDefaultValue($wgWFMKMaxWidth);
     $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);
 }
コード例 #7
0
ファイル: Twitter.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     global $wgWFMKMaxWidth;
     $user = new String('user');
     $user->setEscapeMode('quotes');
     $search = new String('search');
     $search->setEscapeMode('quotes');
     $this->source = new XorParameter('source');
     $this->source->addParameter($user);
     $this->source->addParameter($search);
     $this->source->setRequired();
     // one of theses parameters has to be set
     $this->source->setDefaultParameter($user);
     // user don't need to type "user=xxx", just "xxx" at right position
     $this->addParameter($this->source);
     $this->faves = new Option('faves');
     $this->list = new String('list');
     $this->list->setEscapeMode('quotes');
     $this->follow = new Option('follow');
     $mode = new XorParameter('mode');
     $mode->addParameter($this->faves);
     $mode->addParameter($this->list);
     $mode->addParameter($this->follow);
     $this->addParameter($mode);
     $this->title = new String('title');
     $this->title->setEscapeMode('quotes');
     $this->addParameter($this->title);
     $this->subject = new String('subject');
     $this->subject->setEscapeMode('quotes');
     $this->addParameter($this->subject);
     $this->width = new IntegerInPixel('width');
     $this->width->setDefaultValue($wgWFMKMaxWidth);
     $this->width->setMin(0);
     $this->width->setMax($wgWFMKMaxWidth);
     $this->addParameter($this->width);
     $this->height = new IntegerInPixel('height');
     $this->height->setDefaultValue(441);
     $this->height->setMin(0);
     $this->addParameter($this->height);
     $this->count = new Integer('count');
     $this->count->setDefaultValue(5);
     $this->count->setMin(0);
     $this->count->setMax(30);
     $this->addParameter($this->count);
     $this->scrollbar = new Boolean('scrollbar');
     $this->addParameter($this->scrollbar);
     $this->live = new Boolean('live');
     $this->addParameter($this->live);
     $this->loop = new Boolean('loop');
     $this->addParameter($this->loop);
     $this->all = new Boolean('all');
     $this->addParameter($this->all);
     $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);
 }
コード例 #8
0
ファイル: Audio.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     $this->url = new String('url');
     $this->url->setValidateType('url');
     $this->url->setRequired();
     $this->addParameter($this->url);
     $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);
 }
コード例 #9
0
ファイル: Skype.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 public function declareParameters()
 {
     $this->name = new String('name');
     $this->name->setRequired();
     $this->addParameter($this->name);
     $this->status = new Boolean('status');
     $this->addParameter($this->status);
     $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);
 }
コード例 #10
0
ファイル: Flickr.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     $this->user = new String('user');
     $this->addParameter($this->user);
     $this->tag = new String('tag');
     $this->addParameter($this->tag);
     // hide link to fickr.com on top, and to photostream on bottom
     $this->nolink = new Boolean('nolink');
     $this->addParameter($this->nolink);
     $this->photostream = new OptionString('photostream');
     $this->photostream->setONValue('photostream...');
     $this->addParameter($this->photostream);
     $this->count = new Integer('count');
     $this->count->setDefaultValue(3);
     $this->count->setMin(1);
     $this->count->setMax(10);
     $this->addParameter($this->count);
     $this->random = new Boolean('random');
     // default = false = the most recent
     $this->addParameter($this->random);
     $square = new Option('square');
     $square->setONOutput('s');
     $thumbnail = new Option('thumbnail');
     $thumbnail->setONOutput('t');
     $medium = new Option('medium');
     $medium->setONOutput('m');
     $this->size = new XorParameter('size');
     $this->size->addParameter($square);
     $this->size->addParameter($thumbnail);
     $this->size->addParameter($medium);
     $this->size->setDefaultParameter($square);
     // size's default output is square's default output
     $square->setDefaultValue(true);
     // default value of square is true = square's default output is 's'
     $this->addParameter($this->size);
     $this->width = new IntegerInPixel('width');
     $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);
 }
コード例 #11
0
ファイル: SoundCloud.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     global $wgWFMKMaxWidth;
     $track = new Integer('track');
     $track->setMin(0);
     $user = new Integer('user');
     $user->setMin(0);
     $playlist = new Integer('playlist');
     $playlist->setMin(0);
     $this->source = new XorParameter('source');
     $this->source->addParameter($track);
     $this->source->addParameter($user);
     $this->source->addParameter($playlist);
     $this->source->setRequired();
     // user need to set one of these parameter
     $this->source->setDefaultParameter($track);
     // user don't need to type "track=xxx", just "xxx" at right position
     $this->addParameter($this->source);
     $this->width = new IntegerInPixel('width');
     $this->width->setDefaultValue($wgWFMKMaxWidth);
     $this->width->setMax($wgWFMKMaxWidth);
     $this->addParameter($this->width);
     $this->height = new IntegerInPixel('height');
     $this->height->setDefaultValue(450);
     // updated later to 166 if source is "track"
     $this->addParameter($this->height);
     $this->autoplay = new Boolean('autoplay');
     $this->addParameter($this->autoplay);
     $this->artwork = new Boolean('artwork');
     $this->addParameter($this->artwork);
     $this->comments = new Boolean('comments');
     $this->addParameter($this->comments);
     $this->playcount = new Boolean('playcount');
     $this->addParameter($this->playcount);
     $this->like = new Boolean('like');
     $this->addParameter($this->like);
     $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);
 }
コード例 #12
0
ファイル: Video.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     global $wgWFMKMaxWidth;
     $this->url = new String('url');
     $this->url->setValidateType('url');
     $this->url->setRequired();
     $this->addParameter($this->url);
     $this->width = new IntegerInPixel('width');
     $this->width->setDefaultValue($wgWFMKMaxWidth);
     $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);
 }
コード例 #13
0
ファイル: Dailymotion.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     global $wgWFMKMaxWidth;
     $this->id = new String('id');
     $this->id->setEscapeMode('urlpathinfo');
     $this->id->setRequired();
     $this->addParameter($this->id);
     $this->width = new IntegerInPixel('width');
     $this->width->setDefaultValue($wgWFMKMaxWidth);
     $this->width->setMax($wgWFMKMaxWidth);
     $this->addParameter($this->width);
     $this->height = new IntegerInPixel('height');
     $this->height->setDefaultValue(441);
     $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);
 }
コード例 #14
0
ファイル: Disqus.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     // Set $wgDisqusShortName in LocalSettings as you discus account name
     global $wgDisqusShortName, $wgWFMKMaxWidth;
     $this->shortname = new String('shortname');
     $this->shortname->setEscapeMode('javascript');
     $this->shortname->setDefaultValue($wgDisqusShortName);
     $this->addParameter($this->shortname);
     $this->id = new String('id');
     $this->id->setEscapeMode('javascript');
     $this->addParameter($this->id);
     $this->url = new String('url');
     $this->url->setEscapeMode('javascript');
     $this->url->setDefaultValue($this->parser->getTitle()->getCanonicalURL());
     $this->addParameter($this->url);
     $this->title = new String('title');
     $this->title->setEscapeMode('javascript');
     $this->title->setDefaultValue($this->parser->getTitle()->getFullText());
     $this->addParameter($this->title);
     $this->width = new IntegerInPixel('width');
     $this->width->setMax($wgWFMKMaxWidth);
     $this->width->setMin(0);
     $this->addParameter($this->width);
     $this->height = new IntegerInPixel('height');
     $this->height->setMin(0);
     $this->addParameter($this->height);
     $this->frame = new Option('frame');
     $this->addParameter($this->frame);
     $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);
     $this->dev = new Option('dev');
     $this->addParameter($this->dev);
 }
コード例 #15
0
ファイル: Bandcamp.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     $track = new String('track');
     $track->setValidateType('int');
     $album = new String('album');
     $album->setValidateType('int');
     $this->source = new XorParameter('source');
     $this->source->addParameter($track);
     $this->source->addParameter($album);
     $this->source->setRequired();
     // user need to set one of theses parameters
     $this->addParameter($this->source);
     $this->size = new XorParameter('size');
     $size_names = array_keys(self::$SIZES);
     foreach ($size_names as $size_name) {
         $this->size->addParameter(new Option($size_name));
     }
     $this->size->setDefaultValue($size_names[0]);
     $this->addParameter($this->size);
     $this->float = new XorParameter('float');
     $this->float->addParameter(new Option('right'));
     $this->float->addParameter(new Option('left'));
     $this->addParameter($this->float);
 }
コード例 #16
0
ファイル: AddThis.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     $this->long = new Boolean('long');
     $this->addParameter($this->long);
     $this->big = new Boolean('big');
     $this->addParameter($this->big);
     $this->counter = new Boolean('counter');
     $this->addParameter($this->counter);
     $this->vertical = new Boolean('vertical');
     $this->addParameter($this->vertical);
     $this->url = new String('url');
     $this->url->setDefaultValue($this->parser->getTitle()->getCanonicalURL());
     $this->addParameter($this->url);
     $this->pubid = new String('pubid');
     $this->pubid->setDefaultValue('ra-4fdafa43072e511d');
     $this->pubid->setEscapeMode('urlpathinfo');
     $this->addParameter($this->pubid);
     $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);
 }
コード例 #17
0
ファイル: Flattr.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 public function declareParameters()
 {
     $this->uid = new String('uid');
     $this->addParameter($this->uid);
     $this->url = new String('url');
     $this->url->setDefaultValue($this->parser->getTitle()->getCanonicalURL());
     $this->addParameter($this->url);
     $this->title = new String('title');
     $this->title->setDefaultValue($this->parser->getTitle()->getText());
     $this->title->setMinimalLength(5);
     $this->title->setMaximalLength(100);
     $this->addParameter($this->title);
     $this->description = new String('description');
     $this->description->setDefaultValue($this->parser->getTitle()->getText());
     $this->description->setMinimalLength(5);
     $this->description->setMaximalLength(1000);
     $this->addParameter($this->description);
     $this->category = new XorParameter('category');
     $this->category->addParameter(new Option('text'));
     $this->category->addParameter(new Option('images'));
     $this->category->addParameter(new Option('video'));
     $this->category->addParameter(new Option('audio'));
     $this->category->addParameter(new Option('software'));
     $this->category->addParameter(new Option('people'));
     $this->category->addParameter(new Option('rest'));
     $this->addParameter($this->category);
     $this->tags = new String('tags');
     $this->addParameter($this->tags);
     $this->compact = new Option('compact');
     $this->addParameter($this->compact);
     $this->nopopout = new Option('nopopout');
     $this->addParameter($this->nopopout);
     $this->hidden = new Option('hidden');
     $this->addParameter($this->hidden);
     $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);
     $this->language = new String('language');
     $this->addParameter($this->language);
 }
コード例 #18
0
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     $this->source = new XorParameter('source');
     $this->user = new String('user');
     $this->source->addParameter($this->user);
     $this->tag = new String('tag');
     $this->source->addParameter($this->tag);
     $this->addParameter($this->source);
     $this->source->setRequired();
     $this->size = new IntegerInPixel('size');
     $this->size->setDefaultValue(80);
     $this->addParameter($this->size);
     $this->width = new Integer('width');
     $this->width->setDefaultValue(9);
     $this->width->setMin(1);
     $this->width->setMax(10);
     $this->addParameter($this->width);
     $this->height = new Integer('height');
     $this->height->setDefaultValue(1);
     $this->height->setMin(1);
     $this->height->setMax(10);
     $this->addParameter($this->height);
     $this->padding = new Integer('padding');
     $this->padding->setDefaultValue(8);
     $this->padding->setMin(0);
     $this->addParameter($this->padding);
     $this->color = new String('color');
     $this->addParameter($this->color);
     $this->slideshow = new Boolean('slideshow');
     $this->addParameter($this->slideshow);
     $this->border = new Boolean('border');
     $this->addParameter($this->border);
     $this->float = new XorParameter('float');
     $right = new Option('right');
     $this->float->addParameter($right);
     $left = new Option('left');
     $this->float->addParameter($left);
     $this->addParameter($this->float);
     $this->category = new XorParameter('category');
     $this->category->addParameter(new Option('Abstract'));
     $this->category->addParameter(new Option('Animals'));
     $this->category->addParameter(new Option('Black and White'));
     $this->category->addParameter(new Option('Celebrities'));
     $this->category->addParameter(new Option('City and Architecture'));
     $this->category->addParameter(new Option('Commercial'));
     $this->category->addParameter(new Option('Concert'));
     $this->category->addParameter(new Option('Family'));
     $this->category->addParameter(new Option('Fashion'));
     $this->category->addParameter(new Option('Film'));
     $this->category->addParameter(new Option('Fine Art'));
     $this->category->addParameter(new Option('Food'));
     $this->category->addParameter(new Option('Journalism'));
     $this->category->addParameter(new Option('Landscapes'));
     $this->category->addParameter(new Option('Macro'));
     $this->category->addParameter(new Option('Nature'));
     $this->category->addParameter(new Option('Nude'));
     $this->category->addParameter(new Option('People'));
     $this->category->addParameter(new Option('Performing Arts'));
     $this->category->addParameter(new Option('Sport'));
     $this->category->addParameter(new Option('Still Life'));
     $this->category->addParameter(new Option('Street'));
     $this->category->addParameter(new Option('Transportation'));
     $this->category->addParameter(new Option('Travel'));
     $this->category->addParameter(new Option('Underwater'));
     $this->category->addParameter(new Option('Urban Exploration'));
     $this->category->addParameter(new Option('Wedding'));
     $this->category->addParameter(new Option('Uncategorized'));
     $this->addParameter($this->category);
 }
コード例 #19
0
ファイル: GooglePlus.php プロジェクト: eFFemeer/seizamcore
 /**
  * Declares the widget's parameters:
  * <ul>
  * <li>instanciates Parameter objects,</li>
  * <li>configures them and</li>
  * <li>calls addParameter() for each of them.</li>
  * </ul>
  * 
  * @return void
  */
 protected function declareParameters()
 {
     global $wgWFMKMaxWidth;
     // the identifier is a numeric value, but very long
     // handling it as an Integer could break when MediaWiki runs on 32bits servers
     // the safer is to handle it as string, and validate only digits
     $user = new String('user');
     $user->setValidateType('digits');
     // a +1 take an url as value, the default is the current page
     $url = new String('url');
     $url->setValidateType('url');
     $url->setEscapeMode('none');
     $this->target = new XorParameter('target');
     $this->target->addParameter($url);
     $this->target->addParameter($user);
     $this->target->setDefaultParameter($url);
     // parse as "target = URL_VALUE" by default
     $this->addParameter($this->target);
     $this->size = new XorParameter('size');
     $small = new Option('small');
     // +1   badge   icon
     $medium = new Option('medium');
     // +1
     $standard = new Option('standard');
     // +1   badge   icon
     $large = new Option('large');
     // +1           icon
     $this->size = new XorParameter('size');
     $this->size->addParameter($small);
     $this->size->addParameter($medium);
     $this->size->addParameter($standard);
     $this->size->addParameter($large);
     $this->size->setDefaultParameter($standard);
     $standard->setDefaultValue(true);
     $this->addParameter($this->size);
     $none = new Option('none');
     $bubble = new Option('bubble');
     $inline = new Option('inline');
     $this->annotation = new XorParameter('annotation');
     // used for +1
     $this->annotation->addParameter($none);
     $this->annotation->addParameter($bubble);
     $this->annotation->addParameter($inline);
     $this->annotation->setDefaultParameter($none);
     // size's default output is none's default output
     $none->setDefaultValue(true);
     // default value of none is true = none's default output is 'none'
     $this->addParameter($this->annotation);
     $this->icon = new Boolean('icon');
     $this->addParameter($this->icon);
     $this->width = new IntegerInPixel('width');
     // used for +1 with annotation=inline
     $this->width->setMax($wgWFMKMaxWidth);
     $this->width->setDefaultValue(300);
     $this->addParameter($this->width);
     $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);
 }