本文整理匯總了PHP中Drupal\views\Tests\ViewUnitTestBase::schemaDefinition方法的典型用法代碼示例。如果您正苦於以下問題:PHP ViewUnitTestBase::schemaDefinition方法的具體用法?PHP ViewUnitTestBase::schemaDefinition怎麽用?PHP ViewUnitTestBase::schemaDefinition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Drupal\views\Tests\ViewUnitTestBase
的用法示例。
在下文中一共展示了ViewUnitTestBase::schemaDefinition方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: schemaDefinition
/**
* {@inheritdoc}
*/
protected function schemaDefinition()
{
$schema = parent::schemaDefinition();
$schema['views_test_data']['fields']['status'] = array('description' => 'The status of this record', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '');
return $schema;
}
示例2: schemaDefinition
/**
* {@inheritdoc}
*/
public function schemaDefinition()
{
$schema = parent::schemaDefinition();
$schema['views_test_data']['fields']['destroyed'] = array('description' => "The destruction date of this record", 'type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'default' => 0);
return $schema;
}
示例3: schemaDefinition
protected function schemaDefinition()
{
$schema = parent::schemaDefinition();
$schema['views_test_data']['fields']['description'] = array('description' => "A person's description", 'type' => 'text', 'not null' => FALSE, 'size' => 'big');
return $schema;
}
示例4: schemaDefinition
/**
* Allow {views_test_data}.job to be NULL.
*/
protected function schemaDefinition()
{
$schema = parent::schemaDefinition();
unset($schema['views_test_data']['fields']['job']['not null']);
return $schema;
}
示例5: schemaDefinition
/**
* Overrides \Drupal\views\Tests\ViewTestBase::schemaDefinition().
*/
protected function schemaDefinition()
{
$schema = parent::schemaDefinition();
$schema['views_test_data']['fields']['langcode'] = array('description' => 'The {language}.langcode of this beatle.', 'type' => 'varchar', 'length' => 12, 'default' => '');
return $schema;
}