Ejemplo n.º 1
0
 public function checkLinkToModule($id = null)
 {
     if (!is_null($id)) {
         $modInPages = new ModulesInPages();
         $modLinkPage = $modInPages->getAllLinkPages();
         $data = array($id => $this->findByPk($id)->name);
         $result = array();
         $data = $this->getIdArray($id, $data);
         foreach ($data as $key => $value) {
             foreach ($modLinkPage as $key_m => $value_m) {
                 if ($key == $key_m) {
                     $result[$key] = $value_m;
                 }
             }
         }
         if (count($result) > 0) {
             return $result;
         } else {
             return false;
         }
     }
 }