__construct() public method

Constructor render style
public __construct ( array $params ) : Ansel_Widget
$params array
return Ansel_Widget
示例#1
0
文件: Tags.php 项目: raz0rsdge/horde
 /**
  *
  * @var array $params  The parameters:
  *   - view:  The view we are attaching to (image, gallery).
  */
 public function __construct($params)
 {
     parent::__construct($params);
     $this->_resourceType = $params['view'];
     $this->_title = _("Tags");
     // Handle any incoming tag changes from non-script browsers.
     $tags = Horde_Util::getFormData('addtag');
     if (!is_null($tags) && strlen($tags)) {
         $tagger = $GLOBALS['injector']->getInstance('Ansel_Tagger');
         $this->_view->resource->setTags($tags, $tagger->split($tags));
     } elseif (Horde_Util::getFormData('actionID') == 'deleteTags') {
         $tag = Horde_Util::getFormData('tag');
         $this->_view->resource->removeTag($tag);
     }
 }
示例#2
0
 public function __construct($params)
 {
     parent::__construct($params);
 }
示例#3
0
 /**
  * Constructor
  *
  * @param array $params  Any parameters for this widget
  * @return Ansel_Widget_ImageFaces
  */
 public function __construct($params)
 {
     parent::__construct($params);
     $this->_title = _("People in this gallery");
 }
示例#4
0
 /**
  * Constructor
  *
  * @param array $params  Any parameters for this widget
  *
  * @return Ansel_Widget_SimilarPhotos
  */
 public function __construct($params)
 {
     parent::__construct($params);
     $this->_title = _("Similar Photos");
 }