Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
Press.inc.php
1 <?php
2 
21 import('lib.pkp.classes.context.Context');
22 
23 class Press extends Context {
27  function Press() {
28  parent::Context();
29  }
30 
36  function getPageHeaderTitle() {
37  $typeArray = $this->getSetting('pageHeaderTitleType');
38  $imageArray = $this->getSetting('pageHeaderTitleImage');
39  $titleArray = $this->getSetting('pageHeaderTitle');
40 
41  $title = null;
42 
43  foreach (array(AppLocale::getLocale(), AppLocale::getPrimaryLocale()) as $locale) {
44  if (isset($typeArray[$locale]) && $typeArray[$locale]) {
45  if (isset($imageArray[$locale])) $title = $imageArray[$locale];
46  }
47  if (empty($title) && isset($titleArray[$locale])) $title = $titleArray[$locale];
48  if (!empty($title)) return $title;
49  }
50  return null;
51  }
52 
57  function getPageHeaderLogo() {
58  $logoArray = $this->getSetting('pageHeaderLogoImage');
59  foreach (array(AppLocale::getLocale(), AppLocale::getPrimaryLocale()) as $locale) {
60  if (isset($logoArray[$locale])) return $logoArray[$locale];
61  }
62  return null;
63  }
64 
71  if ($this->getSetting('codeType') != '' && $this->getSetting('codeValue') != '') {
72  return true;
73  } else {
74  return false;
75  }
76  }
77 
82  function getAssocType() {
83  return ASSOC_TYPE_PRESS;
84  }
85 
90  static function getSettingsDAO() {
91  return DAORegistry::getDAO('PressSettingsDAO');
92  }
93 
98  static function getDAO() {
99  return DAORegistry::getDAO('PressDAO');
100  }
101 }
102 
103 ?>
static & getDAO($name, $dbconn=null)
hasRequiredOnixHeaderFields()
Definition: Press.inc.php:70
Basic class describing a context.
Definition: Context.inc.php:16
static getPrimaryLocale()
static getLocale()
Press()
Definition: Press.inc.php:27
static getSettingsDAO()
Definition: Press.inc.php:90
Basic class describing a press.
Definition: Press.inc.php:23
getPageHeaderTitle()
Definition: Press.inc.php:36
static getDAO()
Definition: Press.inc.php:98
& getSetting($name, $locale=null)
getPageHeaderLogo()
Definition: Press.inc.php:57
getAssocType()
Definition: Press.inc.php:82