Beispiel #1
0
	public function run($widgetParams, $orient, $request)
	{
		if (Flattr::needsWidget($request))
		{
			$args = func_get_args();
			array_shift($args); // $widgetParams
			array_shift($args); // $orient
			$url = CoOrg::createFullURL($args);
			$widget = Flattr::widget($this, $request);
			$this->flattrTitle = $widget->title;
			$this->flattrDescription = $widget->description;
			$this->flattrLanguage = $widget->language;
			$this->flattrTags = $widget->tags;
			$this->flattrCategory = $widget->category;
			$this->flattrUID = $widgetParams['uid'];
			$this->flattrButton = $orient == CoOrg::PANEL_ORIENT_VERTICAL ? 'default' : 'compact';
			$this->flattrLink = $url;
			return $this->render('flattr-button');
		}
	}