Example #1
0
 protected function getStreamUrl()
 {
     $params = array('limit' => '10', 'from' => '-from-', 'mode' => \humhub\modules\content\components\actions\Stream::MODE_ACTIVITY);
     if ($this->contentContainer) {
         return $this->contentContainer->createUrl($this->streamAction, $params);
     }
     return \yii\helpers\Url::to(array_merge([$this->streamAction], $params));
 }
Example #2
0
 protected function getStreamUrl()
 {
     $params = array('limit' => '10', 'from' => '-from-', 'mode' => BaseStreamAction::MODE_ACTIVITY);
     if ($this->contentContainer) {
         return $this->contentContainer->createUrl($this->streamAction, $params);
     }
     return Yii::app()->createUrl($this->streamAction, $params);
 }
Example #3
0
 /**
  * Creates url to stream BaseStreamAction including placeholders
  * which are replaced and handled by javascript.
  *
  * If a contentContainer is specified it will be used to create the url.
  *
  * @return string
  */
 protected function getStreamUrl()
 {
     $params = [$this->streamAction, 'limit' => '-limit-', 'filters' => '-filter-', 'sort' => '-sort-', 'from' => '-from-', 'mode' => \humhub\modules\content\components\actions\Stream::MODE_NORMAL];
     if ($this->contentContainer) {
         return $this->contentContainer->createUrl($this->streamAction, $params);
     }
     return Url::to($params);
 }
Example #4
0
 /**
  * Creates url to stream BaseStreamAction including placeholders
  * which are replaced and handled by javascript.
  * 
  * If a contentContainer is specified it will be used to create the url.
  * 
  * @return string
  */
 protected function getStreamUrl()
 {
     $params = array('limit' => '-limit-', 'filters' => '-filter-', 'sort' => '-sort-', 'from' => '-from-', 'mode' => BaseStreamAction::MODE_NORMAL);
     if ($this->contentContainer) {
         return $this->contentContainer->createUrl($this->streamAction, $params);
     }
     return Yii::app()->createUrl($this->streamAction, $params);
 }
 /**
  * Creates a relative URL for the specified action defined in this controller.
  * The container guid (sguid/uguid) attribute is automatically added to the 
  * constructed url.
  * 
  * @param string $route the URL route. This should be in the format of 'ControllerID/ActionID'.
  * If the ControllerID is not present, the current controller ID will be prefixed to the route.
  * If the route is empty, it is assumed to be the current action.
  * If the controller belongs to a module, the {@link CWebModule::getId module ID}
  * will be prefixed to the route. (If you do not want the module ID prefix, the route should start with a slash '/'.)
  * @param array $params additional GET parameters (name=>value). Both the name and value will be URL-encoded.
  * If the name is '#', the corresponding value will be treated as an anchor
  * and will be appended at the end of the URL.
  * @param string $ampersand the token separating name-value pairs in the URL.
  * @return string the constructed URL
  */
 public function createContainerUrl($route, $params = array(), $ampersand = '&')
 {
     return $this->contentContainer->createUrl($route, $params, $ampersand);
 }