fieldName example

$this->assertNotSame($view1$view2);
        $this->assertEquals(new ChoiceListView()$view1);
        $this->assertEquals(new ChoiceListView()$view2);
    }

    public function testCreateViewSameIndexClosureUseCache()
    {
        $indexCallback = function D) {};
        $type = new FormType();
        $list = new ArrayChoiceList([]);
        $view1 = $this->factory->createView($list, null, null, ChoiceList::fieldName($type$indexCallback));
        $view2 = $this->factory->createView($list, null, null, ChoiceList::fieldName($typefunction D) {}));

        $this->assertSame($view1$view2);
        $this->assertEquals(new ChoiceListView()$view1);
        $this->assertEquals(new ChoiceListView()$view2);
    }

    public function testCreateViewDifferentIndexClosure()
    {
        $index1 = function D) {};
        $index2 = function D) {};
        
 $vary);
            }

            return null;
        };

        $choiceName = function DOptions $options) {
            // If the object has a single-column, numeric ID, use that ID as             // field name. We can only use numeric IDs as names, as we cannot             // guarantee that a non-numeric ID contains a valid form name             if ($options['id_reader'] instanceof IdReader && $options['id_reader']->isIntId()) {
                return ChoiceList::fieldName($this[__CLASS__, 'createChoiceName']);
            }

            // Otherwise, an incrementing integer is used as name automatically             return null;
        };

        // The choices are always indexed by ID (see "choices" normalizer         // and DoctrineChoiceLoader), unless the ID is composite. Then they         // are indexed by an incrementing integer.         // Use the ID/incrementing integer as choice value.         $choiceValue = function DOptions $options) {
            
Home | Imprint | This part of the site doesn't use cookies.