Esempio n. 1
0
 public function attributePathProvider()
 {
     $article_type = new ArticleType();
     $headline_attribute = $article_type->getAttribute('headline');
     $content_objects_attribute = $article_type->getAttribute('content_objects');
     $paragraph_type = $content_objects_attribute->getEmbeddedTypeByPrefix('paragraph');
     $title_attribute = $paragraph_type->getAttribute('title');
     $workflow_state_attribute = $article_type->getAttribute('workflow_state');
     $workflow_state_type = $workflow_state_attribute->getEmbeddedTypeByPrefix('workflow_state');
     $workflow_step_attribute = $workflow_state_type->getAttribute('workflow_step');
     return [[$headline_attribute, 'headline'], [$title_attribute, 'content_objects.paragraph.title'], [$workflow_step_attribute, 'workflow_state.workflow_state.workflow_step']];
 }
Esempio n. 2
0
 public function testGetAttributeByPath()
 {
     $article_type = new ArticleType();
     $attribute = $article_type->getAttribute('content_objects.paragraph.title');
     $this->assertEquals('title', $attribute->getName());
 }