Exemplo n.º 1
0
 /**
  * Checks if the form type should be read-only or not
  *
  * @param array $options
  *
  * @return bool
  */
 protected function isReadOnly($options)
 {
     /** @var ConfigIdInterface $configId */
     $configId = $options['config_id'];
     $className = $configId->getClassName();
     if (empty($className)) {
         return false;
     }
     return $this->typeHelper->isImmutable($configId->getScope(), $className, $this->typeHelper->getFieldName($configId));
 }
Exemplo n.º 2
0
 /**
  * @dataProvider getFieldNameProvider
  */
 public function testGetFieldName($configId, $expected)
 {
     $this->assertSame($expected, $this->typeHelper->getFieldName($configId));
 }