Ejemplo n.º 1
0
 /**
  * Menu proxy
  * @param string $provider the plugin key of the one who should handle the request
  * @param string $location the current $location
  * @param Zend_Controller_Action $controller the controller who handle the request
  * @return X_Page_ItemList_PItem
  */
 public function getShareItems($provider, $location, Zend_Controller_Action $controller)
 {
     // this plugin fetch resources only if it's the provider
     if ($provider != $this->getId()) {
         return;
     }
     // add an info inside the debug log so we can trace this call
     X_Debug::i('Plugin triggered');
     // disable automatic sorting, items will be already sorted in the target site
     X_VlcShares_Plugins::broker()->unregisterPluginClass('X_VlcShares_Plugins_SortItems');
     // let's create the itemlist
     $items = new X_Page_ItemList_PItem();
     // show the requested location in the debug log
     // $location has been already decoded
     X_Debug::i("Requested node: {$location}");
     X_VlcShares_Plugins_Utils::menuProxy($items, $location, $this->nodes, $this);
     return $items;
 }