Commit f82b2f0b authored by Mateu Aguiló Bosch's avatar Mateu Aguiló Bosch
Browse files

Catch up with core development

parent 57b75302
machine: environment_indicator_default
description: 'Default environment.'
name: 'Default environment'
disabled: 0
disabled: false
color: '#A33'
weight: 99
position: top
fixed: 0
regexurl: '.*'
\ No newline at end of file
fixed: false
regexurl: '.*'
......@@ -8,9 +8,8 @@ scripts:
- environment_indicator.js
- color.js
files:
- plugins/ctools_export_ui_environment_indicator.class.php
stylesheets:
all:
- environment_indicator.css
configure: environment_indicator.list
\ No newline at end of file
drupal.environment_indicator:
version: '2.0'
js:
environment_indicator.js: {}
color.js: {}
css:
component:
environment_indicator.css: {}
dependencies:
- color/drupal.color
\ No newline at end of file
......@@ -33,29 +33,6 @@ function environment_indicator_help($path, $arg) {
}
}
/**
* Implements hook_library_info().
*/
function environment_indicator_library_info() {
// Declare the CSS and JS.
$path = drupal_get_path('module', 'environment_indicator');
$libraries['drupal.environment_indicator'] = array(
'title' => t('Environment Indicator'),
'version' => '1.0',
'js' => array(
$path . '/environment_indicator.js' => array(),
$path . '/color.js' => array(),
),
'css' => array(
$path . '/environment_indicator.css' => array(),
),
'dependencies' => array(
array('color', 'drupal.color'),
),
);
return $libraries;
}
/**
* Implement hook_menu().
*/
......@@ -134,7 +111,7 @@ function environment_indicator_load($name) {
* Implements hook_page_build().
*/
function environment_indicator_page_build(&$page) {
$page['#attached']['library'][] = array('environment_indicator', 'drupal.environment_indicator');
$page['#attached']['library'][] = 'environment_indicator/drupal.environment_indicator';
if ($match = environment_indicator_get_active()) {
if (environment_indicator_check_access($match)) {
if (environment_indicator_needs_js()) {
......
<?php
/**
* @file
* Contains \Drupal\environment_indicator\Entity\EnvironmentIndicator.
......@@ -14,10 +15,9 @@ use Drupal\Core\Annotation\Translation;
/**
* Defines a Environment configuration entity.
*
* @EntityType(
* @ConfigEntityType(
* id = "environment_indicator",
* label = @Translation("Environment Indicator"),
* module = "environment_indicator",
* controllers = {
* "storage" = "Drupal\Core\Config\Entity\ConfigStorageController",
* "access" = "Drupal\environment_indicator\EnvironmentIndicatorAccessController",
......@@ -27,16 +27,17 @@ use Drupal\Core\Annotation\Translation;
* "delete" = "Drupal\environment_indicator\Form\EnvironmentIndicatorDeleteForm"
* }
* },
* admin_permission = "administer environment indicator settings",
* config_prefix = "environment_indicator.environment",
* entity_keys = {
* "id" = "machine",
* "label" = "human_name",
* "uuid" = "uuid"
* "weight" = "weight"
* },
* links = {
* "canonical" = "environment_indicator.update",
* "delete-form" = "environment_indicator.delete",
* "edit-form" = "environment_indicator.update"
* "edit-form" = "environment_indicator.update",
* "delete-form" = "environment_indicator.delete"
* }
* )
*/
......@@ -52,11 +53,6 @@ class EnvironmentIndicator extends ConfigEntityBase implements ConfigEntityInter
*/
public $name;
/**
* The universal unique identifier for the configurable.
*/
public $uuid;
/**
* The regular expression to match against the URL.
*/
......
......@@ -42,7 +42,7 @@ class EnvironmentIndicatorFormController extends EntityFormController {
'#attached' => array(
// Add Farbtastic color picker.
'library' => array(
array('system', 'farbtastic'),
'core/jquery.farbtastic',
),
),
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment