本文整理汇总了PHP中Tinebase_Translation::getTranslation方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Translation::getTranslation方法的具体用法?PHP Tinebase_Translation::getTranslation怎么用?PHP Tinebase_Translation::getTranslation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tinebase_Translation
的用法示例。
在下文中一共展示了Tinebase_Translation::getTranslation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTranslatedRightDescriptions
/**
* get translated right descriptions
*
* @return array with translated descriptions for this applications rights
*/
public static function getTranslatedRightDescriptions()
{
/** @var Zend_Translate_Adapter $translate */
$translate = Tinebase_Translation::getTranslation('Tinebase');
$rightDescriptions = array(self::ADMIN => array('text' => $translate->_('admin'), 'description' => $translate->_('admin right description')), self::RUN => array('text' => $translate->_('run'), 'description' => $translate->_('run right description')), self::USE_PERSONAL_TAGS => array('text' => $translate->_('Personal tags'), 'description' => $translate->_('Use and see personal tags')));
return $rightDescriptions;
}
示例2: directory
/**
* public function to access the directory
*
* @param string $mac
*/
public function directory($mac)
{
$this->_authenticate();
# get the phone
Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' phone ' . $mac);
$phone = Voipmanager_Controller_Snom_Phone::getInstance()->getByMacAddress($mac);
Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' phone ' . $phone->template_id);
$template = Voipmanager_Controller_Snom_Template::getInstance()->get($phone->template_id);
Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' phone ' . $template->setting_id);
$settings = Voipmanager_Controller_Snom_Setting::getInstance()->get($template->setting_id);
$language = $settings->language ? $settings->language : 'en';
$translate = Tinebase_Translation::getTranslation($this->_applicationName, new Zend_Locale('de'));
Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' phone ' . $language);
$baseUrl = $this->_getBaseUrl();
$xml = '<?xml version="1.0" encoding="UTF-8"?>
<SnomIPPhoneInput>
<Prompt>Prompt</Prompt>
<URL>' . $baseUrl . '</URL>
<InputItem>
<DisplayName>' . $translate->_('Enter search') . ':</DisplayName>
<QueryStringParam>method=Phone.searchContacts&TINE20SESSID=' . Tinebase_Session::getId() . '&mac=' . $mac . '&query</QueryStringParam>
<DefaultValue/>
<InputFlags>a</InputFlags>
</InputItem>
</SnomIPPhoneInput>
';
header('Content-Type: text/xml');
echo $xml;
}
示例3: getTranslatedRightDescriptions
/**
* get translated right descriptions
*
* @return array with translated descriptions for this applications rights
*/
public static function getTranslatedRightDescriptions()
{
$translate = Tinebase_Translation::getTranslation('Sipgate');
$rightDescriptions = array(self::MANAGE_ACCOUNTS => array('text' => $translate->_('manage accounts'), 'description' => $translate->_('enables the account module in the application')), self::SYNC_LINES => array('text' => $translate->_('sync lines'), 'description' => $translate->_('allows the user to sync the call history')), self::MANAGE_SHARED_ACCOUNTS => array('text' => $translate->_('manage shared accounts'), 'description' => $translate->_('add, edit and delete shared accounts')), self::MANAGE_PRIVATE_ACCOUNTS => array('text' => $translate->_('manage private accounts'), 'description' => $translate->_('add, edit and delete private accounts')));
$rightDescriptions = array_merge($rightDescriptions, parent::getTranslatedRightDescriptions());
return $rightDescriptions;
}
示例4: getTranslatedRightDescriptions
/**
* get translated right descriptions
*
* @return array with translated descriptions for this applications rights
*/
public static function getTranslatedRightDescriptions()
{
$translate = Tinebase_Translation::getTranslation('Tasks');
$rightDescriptions = array(Tinebase_Acl_Rights::MANAGE_SHARED_FOLDERS => array('text' => $translate->_('manage shared task lists'), 'description' => $translate->_('Create new shared tasks lists')), Tinebase_Acl_Rights::MANAGE_SHARED_FAVORITES => array('text' => $translate->_('manage shared tasks favorites'), 'description' => $translate->_('Create or update shared tasks favorites')));
$rightDescriptions = array_merge($rightDescriptions, parent::getTranslatedRightDescriptions());
return $rightDescriptions;
}
示例5: getTranslatedRightDescriptions
/**
* get translated right descriptions
*
* @return array with translated descriptions for this applications rights
*/
public static function getTranslatedRightDescriptions()
{
$translate = Tinebase_Translation::getTranslation('HumanResources');
$rightDescriptions = array(self::EDIT_PRIVATE => array('text' => $translate->_('edit private employee data'), 'description' => $translate->_('Edit birthday, account data and other private information of employee records')));
$rightDescriptions = array_merge($rightDescriptions, parent::getTranslatedRightDescriptions());
return $rightDescriptions;
}
示例6: getTranslatedRightDescriptions
/**
* get translated right descriptions
*
* @return array with translated descriptions for this applications rights
*/
public static function getTranslatedRightDescriptions()
{
$translate = Tinebase_Translation::getTranslation('Calendar');
$rightDescriptions = array(Tinebase_Acl_Rights::MANAGE_SHARED_FOLDERS => array('text' => $translate->_('manage shared calendars'), 'description' => $translate->_('Create new shared calendars')), Tinebase_Acl_Rights::MANAGE_SHARED_FAVORITES => array('text' => $translate->_('manage shared calendars favorites'), 'description' => $translate->_('Create or update shared calendars favorites')), self::MANAGE_RESOURCES => array('text' => $translate->_('manage resources'), 'description' => $translate->_('All Rights to administrate resources')));
$rightDescriptions = array_merge($rightDescriptions, parent::getTranslatedRightDescriptions());
return $rightDescriptions;
}
示例7: getTranslatedRightDescriptions
/**
* get translated right descriptions
*
* @return array with translated descriptions for this applications rights
*/
public static function getTranslatedRightDescriptions()
{
$translate = Tinebase_Translation::getTranslation('Filemanager');
$rightDescriptions = array(Tinebase_Acl_Rights::MANAGE_SHARED_FOLDERS => array('text' => $translate->_('manage shared folders'), 'description' => $translate->_('Create new shared folders')), self::MANAGE_DOWNLOADLINKS => array('text' => $translate->_('Manage anonymous download links'), 'description' => $translate->_('Allow to see, add and delete download links of files and folders')));
$rightDescriptions = array_merge($rightDescriptions, parent::getTranslatedRightDescriptions());
return $rightDescriptions;
}
示例8: getTranslatedRightDescriptions
/**
* get translated right descriptions
*
* @return array with translated descriptions for this applications rights
*/
public static function getTranslatedRightDescriptions()
{
$translate = Tinebase_Translation::getTranslation('Sales');
$rightDescriptions = array(self::MANAGE_PRODUCTS => array('text' => $translate->_('manage products'), 'description' => $translate->_('add, edit and delete products')));
$rightDescriptions = array_merge($rightDescriptions, parent::getTranslatedRightDescriptions());
return $rightDescriptions;
}
示例9: resolveVirtualFields
/**
* resolves all virtual fields for the address
*
* @param array $address
* @return array with property => value
*/
public function resolveVirtualFields($address)
{
if (!isset($address['type'])) {
if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) {
Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' Invalid address for resolving: ' . print_r($address, true));
}
return $address;
}
$ft = '';
$i18n = Tinebase_Translation::getTranslation($this->_applicationName)->getAdapter();
$type = $address['type'];
$ft .= !empty($address['prefix1']) ? $address['prefix1'] : '';
$ft .= !empty($address['prefix1']) && !empty($address['prefix2']) ? ' ' : '';
$ft .= !empty($address['prefix2']) ? $address['prefix2'] : '';
$ft .= !empty($address['prefix1']) || !empty($address['prefix2']) ? ', ' : '';
$ft .= !empty($address['postbox']) ? $address['postbox'] : (!empty($address['street']) ? $address['street'] : '');
$ft .= !empty($address['postbox']) || !empty($address['street']) ? ', ' : '';
$ft .= !empty($address['postalcode']) ? $address['postalcode'] . ' ' : '';
$ft .= !empty($address['locality']) ? $address['locality'] : '';
$ft .= ' (';
$ft .= $i18n->_($type);
if ($type == 'billing') {
$ft .= ' - ' . $address['custom1'];
}
$ft .= ')';
$address['fulltext'] = $ft;
return $address;
}
示例10: getTranslatedRightDescriptions
/**
* get translated right descriptions
*
* @return array with translated descriptions for this applications rights
*/
public static function getTranslatedRightDescriptions()
{
$translate = Tinebase_Translation::getTranslation('Projects');
$rightDescriptions = array(self::MANAGE_SHARED_PROJECT_FAVORITES => array('text' => $translate->_('Manage shared project favorites'), 'description' => $translate->_('Create new shared project favorites')));
$rightDescriptions = array_merge($rightDescriptions, parent::getTranslatedRightDescriptions());
return $rightDescriptions;
}
示例11: getTranslatedRightDescriptions
/**
* get translated right descriptions
*
* @return array with translated descriptions for this applications rights
*/
public static function getTranslatedRightDescriptions()
{
$translate = Tinebase_Translation::getTranslation('Filemanager');
$rightDescriptions = array(Tinebase_Acl_Rights::MANAGE_SHARED_FOLDERS => array('text' => $translate->_('manage shared folders'), 'description' => $translate->_('Create new shared folders')));
$rightDescriptions = array_merge($rightDescriptions, parent::getTranslatedRightDescriptions());
return $rightDescriptions;
}
示例12: getTranslatedRightDescriptions
/**
* get translated right descriptions
*
* @return array with translated descriptions for this applications rights
*/
public static function getTranslatedRightDescriptions()
{
$translate = Tinebase_Translation::getTranslation('Timetracker');
$rightDescriptions = array(self::MANAGE_TIMEACCOUNTS => array('text' => $translate->_('Manage timeaccounts'), 'description' => $translate->_('Add, edit and delete timeaccounts (includes all timesheet grants)')), self::ADD_TIMEACCOUNTS => array('text' => $translate->_('Add timeaccounts'), 'description' => $translate->_('Add timeaccounts')), Tinebase_Acl_Rights::MANAGE_SHARED_FAVORITES => array('text' => $translate->_('Manage shared timetracker favorites'), 'description' => $translate->_('Create or update shared timetracker favorites')));
$rightDescriptions = array_merge($rightDescriptions, parent::getTranslatedRightDescriptions());
return $rightDescriptions;
}
示例13: testGetPrincipalByGroupPath
/**
* @todo it's just a fake test // the test has to use a list_id when backend logic is implemented finaly
*/
public function testGetPrincipalByGroupPath()
{
$list = Tinebase_Group::getInstance()->getGroupById(Tinebase_Core::getUser()->accountPrimaryGroup);
$principal = $this->_backend->getPrincipalByPath(Tinebase_WebDav_PrincipalBackend::PREFIX_GROUPS . '/' . $list->list_id);
//var_dump($principal);
$this->assertEquals(Tinebase_WebDav_PrincipalBackend::PREFIX_GROUPS . '/' . $list->list_id, $principal['uri']);
$this->assertEquals($list->name . ' (' . Tinebase_Translation::getTranslation('Calendar')->_('Group') . ')', $principal['{DAV:}displayname']);
}
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:11,代码来源:PrincipalBackendTest.php
示例14: createPersonalFolder
/**
* creates the initial folder for new accounts
*
* @param mixed[int|Tinebase_Model_User] $_account the accountd object
* @return Tinebase_Record_RecordSet of subtype Tinebase_Model_Container
*/
public function createPersonalFolder($_account)
{
$translation = Tinebase_Translation::getTranslation($this->_applicationName);
$account = Tinebase_User::getInstance()->getUserById($_account);
$newContainer = new Tinebase_Model_Container(array('name' => sprintf($translation->_("%s's personal Projects"), $account->accountFullName), 'type' => Tinebase_Model_Container::TYPE_PERSONAL, 'owner_id' => $account->getId(), 'backend' => 'Sql', 'application_id' => Tinebase_Application::getInstance()->getApplicationByName($this->_applicationName)->getId(), 'model' => static::$_defaultModel));
$personalContainer = Tinebase_Container::getInstance()->addContainer($newContainer);
$container = new Tinebase_Record_RecordSet('Tinebase_Model_Container', array($personalContainer));
return $container;
}
示例15: createPersonalFolder
/**
* creates the initial folder for new accounts
*
* @param mixed[int|Tinebase_Model_User] $_account the accountd object
* @return Tinebase_Record_RecordSet of subtype Tinebase_Model_Container
*/
public function createPersonalFolder($_accountId)
{
$translation = Tinebase_Translation::getTranslation('ExampleApplication');
$account = Tinebase_User::getInstance()->getUserById($_accountId);
$newContainer = new Tinebase_Model_Container(array('name' => sprintf($translation->_("%s's personal example records"), $account->accountFullName), 'type' => Tinebase_Model_Container::TYPE_PERSONAL, 'owner_id' => $_accountId, 'backend' => 'Sql', 'application_id' => Tinebase_Application::getInstance()->getApplicationByName('ExampleApplication')->getId()));
$personalContainer = Tinebase_Container::getInstance()->addContainer($newContainer);
$container = new Tinebase_Record_RecordSet('Tinebase_Model_Container', array($personalContainer));
return $container;
}