/**
  * @todo missing docblock
  */
 public static function find($pid)
 {
     // Check the own page first
     if (CheckPageUtility::hasThemeableSysTemplateRecord($pid)) {
         return $pid;
     }
     // ..then the rootline pages
     $rootLineUtility = new RootlineUtility($pid);
     $pages = $rootLineUtility->get();
     foreach ($pages as $page) {
         if (CheckPageUtility::hasThemeableSysTemplateRecord($page['pid'])) {
             return $page['pid'];
         }
     }
     return NULL;
 }