You are here

protected function Schema::createTitle in Schemata 8

Generates a title for the schema based on a simple trio of parameters.

Parameters

string $required: This value will be used as the prefix.

string $optional: Optional value to be separated from the required prefix if present.

string $sep: Separator string to be used.

Return value

string The title value.

1 call to Schema::createTitle()
Schema::__construct in src/Schema/Schema.php
Creates a Schema object.

File

src/Schema/Schema.php, line 144

Class

Schema
Schema class that describes a Drupal Entity or Entity Type.

Namespace

Drupal\schemata\Schema

Code

protected function createTitle($required, $optional = '', $sep = ':') {
  return empty($optional) ? $required : $required . $sep . $optional;
}