コード例 #1
0
 public static function isInPortfolioPage(ilPortfolioPage $a_page, $a_type, $a_id)
 {
     // try to find verification in portfolio page
     $a_page->buildDom();
     $dom = $a_page->getDom();
     if ($dom instanceof php4DOMDocument) {
         $dom = $dom->myDOMDocument;
     }
     $xpath_temp = new DOMXPath($dom);
     $nodes = $xpath_temp->query("//PageContent/Verification");
     foreach ($nodes as $node) {
         if ($node->getAttribute("Type") == $a_type && $node->getAttribute("Id") == $a_id) {
             return true;
         }
     }
     return false;
 }