function ContentCrudTestCase::deleteField in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 6 tests/content.crud.test \ContentCrudTestCase::deleteField()
- 6.2 tests/content.crud.test \ContentCrudTestCase::deleteField()
Deletes an instance of a field.
Parameters
$content_type Either a content type object, or the index of an acquired content type (used only: to get field instance type name).
$field The field instance to delete (defaults to the last worked upon field, used only to get: field instance field name).
2 calls to ContentCrudTestCase::deleteField()
File
- tests/
content.crud.test, line 366
Class
- ContentCrudTestCase
- Base class for CCK CRUD tests. Defines many helper functions useful for writing CCK CRUD tests.
Code
function deleteField($content_type, $field = NULL) {
if (!isset($field)) {
$field = $this->last_field;
}
if (is_numeric($content_type) && isset($this->content_types[$content_type])) {
$content_type = $this->content_types[$content_type];
}
content_field_instance_delete($field['field_name'], $content_type->type);
}