PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 years ago
Size: 498 bytes
 

Contents

Class file image Download
--TEST-- error in twig extension --TEMPLATE-- {{ object.region is not null ? object.regionChoices[object.region] }} --DATA-- class House { const REGION_S = 1; const REGION_P = 2; public static $regionChoices = array(self::REGION_S => 'house.region.s', self::REGION_P => 'house.region.p'); public function getRegionChoices() { return self::$regionChoices; } } $object = new House(); $object->region = 1; return array('object' => $object) --EXPECT-- house.region.s