Baikal\Core\Tools::timezones PHP Method

timezones() static public method

static public timezones ( )
    static function timezones()
    {
        $aZones = \DateTimeZone::listIdentifiers();
        reset($aZones);
        return $aZones;
    }

Usage Example

Ejemplo n.º 1
0
 public function formMorphologyForThisModelInstance()
 {
     $oMorpho = new \Formal\Form\Morphology();
     $oMorpho->add(new \Formal\Element\Listbox(array("prop" => "PROJECT_TIMEZONE", "label" => "Server Time zone", "validation" => "required", "options" => \Baikal\Core\Tools::timezones())));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_CAL_ENABLED", "label" => "Enable CalDAV")));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_CARD_ENABLED", "label" => "Enable CardDAV")));
     $oMorpho->add(new \Formal\Element\Listbox(array("prop" => "BAIKAL_DAV_AUTH_TYPE", "label" => "WebDAV authentication type", "options" => array("Digest", "Basic", "LDAP-UserBind", "Mail"))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "BAIKAL_DAV_LDAP_URI", "label" => "LDAP URI", "class" => "auth_ldap-userbind")));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "BAIKAL_DAV_LDAP_DN_TEMPLATE", "label" => "LDAP DN template", "class" => "auth_ldap-userbind", "popover" => array("title" => "posible placeholder", "content" => "<strong>%n</strong> - username<br /><strong>%u</strong> - user part of username , when it is an email address)<br /><strong>%d</strong> - domain part"))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "BAIKAL_DAV_LDAP_DISPLAYNAME_ATTR", "label" => "LDAP attribute for DisplayName", "class" => "auth_ldap-userbind")));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "BAIKAL_DAV_LDAP_EMAIL_ATTR", "label" => "LDAP attribute for eMail", "class" => "auth_ldap-userbind")));
     $oMorpho->add(new \Formal\Element\Listbox(array("prop" => "BAIKAL_DAV_MAIL_PROTOCOL", "label" => "MailAuth Protocol", "class" => "auth_mail", "options" => array("imap" => "imap (unencrypted)", "imaps" => "imaps (SSL)", "imaptls" => "imap (StartTLS)", "pop3" => "pop3 (unencrypted)", "pop3s" => "pop3s (SSL)", "pop3tls" => "pop3 (StartTLS)", "smtp" => "smtp (unencrypted)", "smtps" => "smtps (SSL)", "smtptls" => "smtp (StartTLS)"))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "BAIKAL_DAV_MAIL_SERVER", "label" => "MailAuth Server", "class" => "auth_mail", "popover" => array("title" => "Format", "content" => "host:port"))));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_DAV_MAIL_CHECK_CERT", "label" => "MailAuth Check SSL-Certificate", "class" => "auth_mail auth_mail_ssl", "popover" => array("title" => "Security", "content" => "validate the server certificate"))));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_DAV_AUTO_CREATE_USER", "label" => "Automatic create users", "class" => "auth_mail auth_ldap-userbind")));
     $oMorpho->add(new \Formal\Element\Password(array("prop" => "BAIKAL_ADMIN_PASSWORDHASH", "label" => "Admin password")));
     $oMorpho->add(new \Formal\Element\Password(array("prop" => "BAIKAL_ADMIN_PASSWORDHASH_CONFIRM", "label" => "Admin password, confirmation", "validation" => "sameas:BAIKAL_ADMIN_PASSWORDHASH")));
     if (!defined("BAIKAL_ADMIN_PASSWORDHASH") || trim(BAIKAL_ADMIN_PASSWORDHASH) === "") {
         # No password set (Form is used in install tool), so password is required as it has to be defined
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH")->setOption("validation", "required");
     } else {
         $sNotice = "-- Leave empty to keep current password --";
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH")->setOption("placeholder", $sNotice);
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH_CONFIRM")->setOption("placeholder", $sNotice);
     }
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_ADMIN_ENABLED", "label" => "Enable Web interface (recommended)", "popover" => array("title" => "Warning !", "content" => "If disabled, you'll lose access to this very admin interface !"))));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_ADMIN_AUTOLOCKENABLED", "label" => "Web interface autolock", "popover" => array("title" => "Web admin autolock", "content" => "If enabled, you'll have to create a file named <strong>ENABLE_ADMIN</strong> in the folder <strong>Specific/</strong> prior to every admin use.<br /><br />This enforces security, but might be uncomfortable if you use the admin frequently."))));
     return $oMorpho;
 }
All Usage Examples Of Baikal\Core\Tools::timezones