Exemplo n.º 1
0
 /**
  * Checks for an existing ECK bundle.
  *
  * @param string $type
  *   The bundle type.
  * @param array $element
  *   The form element.
  * @param FormStateInterface $form_state
  *   The form state.
  *
  * @return bool
  *   TRUE if this format already exists, FALSE otherwise.
  */
 public function exists($type, array $element, FormStateInterface $form_state)
 {
     return EckEntityBundle::load($type);
 }
Exemplo n.º 2
0
 /**
  * Title callback for add page.
  *
  * @param string $eck_entity_bundle
  *   The entity type.
  *
  * @return string
  *   The title.
  */
 public function addContentPageTitle($eck_entity_bundle)
 {
     $eck_entity_bundle = EckEntityBundle::load($eck_entity_bundle);
     return t('Add %label content', array('%label' => $eck_entity_bundle->get('name')));
 }