This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$source_key_schema = array( | |
'mfg_code' => array( | |
'type' => 'varchar', | |
'length' => 255, | |
'unsigned' => FALSE, | |
'not null' => TRUE, | |
'alias' => 'i' | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$connection = require_once __DIR__ . '/../sites/default/dbconnection.php'; | |
Database::addConnectionInfo('default', 'default', $connection); | |
$container->register('database.default', 'Drupal\Core\Database\Connection') | |
->setFactoryClass('Drupal\Core\Database\Database') | |
->setFactoryMethod('getConnection') | |
->setArguments(array('default', 'default')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "drupal/utilty", | |
"description": "Common utility classes for Drupal components.", | |
"keywords": ["drupal"], | |
"homepage": "http://www.drupal.org", | |
"license": "GPL2+", | |
"authors": [ | |
{ | |
"name": "Dries Buytaert", | |
"email": "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
block.controllers: | |
class: Drupal\block\BlockEntityControllers | |
arguments: ['@service_container', '@module_handler'] | |
tags: | |
- { name: event_subscriber } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains \Drupal\node\NodeEntityControllers | |
*/ | |
namespace Drupal\node; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains PageManagerCriteriaForm.php. | |
*/ | |
namespace Drupal\page_manager\Form; | |
use Drupal\Core\Condition\ConditionManager; | |
use Drupal\Core\Entity\EntityInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Adding a method to TypedDataManager | |
public function mapDefinition(array $type) { | |
/** $type comes across as: | |
* | |
* "type" = "entity", | |
* "constraints" = { | |
* "EntityType" = "node" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// My code for getting this output. | |
$definition = new DataDefinition(\Drupal::service('typed_data')->getDefinition('entity')); | |
$definition->setDataType('entity'); | |
$definition->addConstraint('EntityType', 'node'); | |
drupal_set_message('<pre>' . print_r($definition, TRUE) . '</pre>'); | |
$definition2 = new DataDefinition(\Drupal::service('typed_data')->getDefinition('entity:node')); | |
drupal_set_message('<pre>' . print_r($definition2, TRUE) . '</pre>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/modules/comment/comment.tokens.inc b/core/modules/comment/comment.tokens.inc | |
index eab4d3e..8cd2602 100644 | |
--- a/core/modules/comment/comment.tokens.inc | |
+++ b/core/modules/comment/comment.tokens.inc | |
@@ -12,72 +12,83 @@ function comment_token_info() { | |
$type = array( | |
'name' => t('Comments'), | |
'description' => t('Tokens for comments posted on the site.'), | |
- 'needs-data' => 'comment', | |
+ 'needs-data' => 'entity:comment', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains PageManagerWizard.php. | |
*/ | |
namespace Drupal\page_manager\Route; | |
use Drupal\Core\Controller\ControllerBase; | |
use Drupal\Core\DependencyInjection\ContainerInjectionInterface; |