You are here

function dsNodeTests::entitiesSetLabelClass in Display Suite 7

Same name and namespace in other branches
  1. 7.2 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 83
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][format][ft][lb]'] = $text;
  }
  if (!empty($class)) {
    $edit['fields[body][format][ft][styles][]'] = $class;
  }
  if ($hide_colon) {
    $edit['fields[body][format][ft][lb-col]'] = '1';
  }
  $this
    ->dsConfigureUI($edit);
}