getHiddenFields() public method

Uses the hidden and no-hidden options.
public getHiddenFields ( Table $model ) : array
$model Cake\ORM\Table The model to introspect.
return array The columns to make accessible
Beispiel #1
0
 /**
  * Test getting hidden field with a whitelist
  *
  * @return void
  */
 public function testGetHiddenFieldsWhiteList()
 {
     $model = TableRegistry::get('Users');
     $this->Task->params['hidden'] = 'id, title  , , body ,  created';
     $result = $this->Task->getHiddenFields($model);
     $expected = ['id', 'title', 'body', 'created'];
     $this->assertEquals($expected, $result);
 }