コード例 #1
0
 public function __get($name)
 {
     if ($name == "links") {
         if (!isset($this->links)) {
             //Get the list of lists that are being displayed for the widget
             $this->links = array();
             $listWidgetListLinks = new ListWidgetListsLinks();
             $listWidgetListLinks->listWidgetListsId = $this->id;
             $listWidgetListLinks->orderBy('weight ASC');
             $listWidgetListLinks->find();
             while ($listWidgetListLinks->fetch()) {
                 $this->links[$listWidgetListLinks->id] = clone $listWidgetListLinks;
             }
         }
         return $this->links;
     }
 }
コード例 #2
0
 private function deleteLink($linkId)
 {
     $listWidgetLinks = new ListWidgetListsLinks();
     $listWidgetLinks->get($linkId);
     $listWidgetLinks->delete();
 }