Update to Drupal 8.2.2. For more information, see https://www.drupal.org/project/drupal/releases/8.2.2
This commit is contained in:
parent
23ffed3665
commit
507b45a0ed
378 changed files with 11434 additions and 5542 deletions
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\vocabulary_serialization_test;
|
||||
|
||||
use Drupal\Core\Cache\CacheableResponse;
|
||||
use Drupal\taxonomy\VocabularyInterface;
|
||||
|
||||
class VocabularyResponse extends CacheableResponse {
|
||||
|
||||
/**
|
||||
* @var \Drupal\taxonomy\VocabularyInterface
|
||||
*/
|
||||
protected $vocabulary;
|
||||
|
||||
public function setVocabulary(VocabularyInterface $vocabulary) {
|
||||
$this->vocabulary = $vocabulary;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\vocabulary_serialization_test;
|
||||
|
||||
use Drupal\taxonomy\VocabularyInterface;
|
||||
|
||||
class VocabularySerializationTestController {
|
||||
|
||||
public function vocabularyResponse(VocabularyInterface $taxonomy_vocabulary) {
|
||||
$response = new VocabularyResponse('this is the output');
|
||||
$response->setVocabulary($taxonomy_vocabulary);
|
||||
return $response;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
name: 'Vocabulary serialization test'
|
||||
type: module
|
||||
package: Testing
|
||||
version: VERSION
|
||||
core: 8.x
|
||||
dependencies:
|
||||
- taxonomy
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
vocabulary_serialization_test:
|
||||
path: '/vocabulary_serialization_test/{taxonomy_vocabulary}'
|
||||
defaults:
|
||||
_controller: 'Drupal\vocabulary_serialization_test\VocabularySerializationTestController::vocabularyResponse'
|
||||
requirements:
|
||||
_access: 'TRUE'
|
||||
Reference in a new issue