theme); } public static function findLocale($locale, $page) { return static::forLocale($locale, $page)->find($page->fileName); } /** * Returns the directory name corresponding to the object type. * For pages the directory name is "pages", for layouts - "layouts", etc. * @return string */ public function getObjectTypeDirName() { $dirName = static::$parent->getObjectTypeDirName(); if (strlen(static::$locale)) { $dirName .= '-' . static::$locale; } return $dirName; } }