getLanguageCode() public method

returns language of node.
public getLanguageCode ( ) : string
return string
 protected function setUp()
 {
     parent::setUp();
     $this->contactManager = $this->prophesize(ContactManagerInterface::class);
     $this->accountManager = $this->prophesize(ContactManagerInterface::class);
     $this->node = $this->prophesize(Node::class);
     $this->property = $this->prophesize(PropertyInterface::class);
     $this->structure = $this->prophesize(StructureInterface::class);
     $this->structure->getLanguageCode()->willReturn($this->locale);
     $this->structure->getWebspaceKey()->willReturn($this->webspaceKey);
     $this->property->getStructure()->willReturn($this->structure->reveal());
     $this->serializer = $this->prophesize(Serializer::class);
 }
Ejemplo n.º 2
0
 public function testInvalidate()
 {
     $this->structure->hasTag('sulu.rlp')->willReturn(true);
     $this->structure->getPropertyValueByTagName('sulu.rlp')->willReturn('/path/to');
     $this->structure->getLanguageCode()->willReturn($this->languageCode);
     $this->structure->getWebspaceKey()->willReturn($this->webspaceKey);
     $urls = ['/path/to/1', '/path/to/2'];
     $this->webspaceManager->findUrlsByResourceLocator('/path/to', $this->env, $this->languageCode, $this->webspaceKey)->willReturn($urls);
     $this->proxyClient->purge($urls[0])->shouldBeCalled();
     $this->proxyClient->purge($urls[1])->shouldBeCalled();
     $this->proxyClient->flush()->shouldBeCalled();
     $this->webspaceManager->findUrlsByResourceLocator(Argument::any())->shouldNotBeCalled();
     $this->handler->invalidateStructure($this->structure->reveal());
     $this->handler->flush();
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function copyFrom(StructureInterface $structure)
 {
     $this->setWebspaceKey($structure->getWebspaceKey());
     $this->setLanguageCode($structure->getLanguageCode());
     $this->setUuid($structure->getUuid());
     $this->setChanged($structure->getChanged());
     $this->setChanger($structure->getChanger());
     $this->setCreated($structure->getCreated());
     $this->setCreator($structure->getCreator());
     $this->setPublished($structure->getPublished());
     $this->setPath($structure->getPath());
     $this->setNodeType($structure->getNodeType());
     $this->setHasTranslation($structure->getHasTranslation());
 }