You are here

function dsNodeTests::entitiesSetLabelClass in Display Suite 7.2

Same name and namespace in other branches
  1. 7 tests/ds.entities.test \dsNodeTests::entitiesSetLabelClass()

Set the label.

1 call to dsNodeTests::entitiesSetLabelClass()
dsNodeTests::testDSFieldTemplate in tests/ds.entities.test
Tests on field templates.

File

tests/ds.entities.test, line 84
Entities tests

Class

dsNodeTests
@file Entities tests

Code

function entitiesSetLabelClass($label, $text = '', $class = '', $hide_colon = FALSE) {
  $edit = array(
    'fields[body][label]' => $label,
  );
  if (!empty($text)) {
    $edit['fields[body][settings_edit_form][settings][ft][lb]'] = $text;
  }
  if (!empty($class)) {
    $edit['fields[body][settings_edit_form][settings][ft][classes][]'] = $class;
  }
  if ($hide_colon) {
    $edit['fields[body][settings_edit_form][settings][ft][lb-col]'] = '1';
  }
  $this
    ->dsEditFormatterSettings($edit);
}