本文整理匯總了PHP中Drupal\Core\Entity\EntityTypeInterface::getLowercaseLabel方法的典型用法代碼示例。如果您正苦於以下問題:PHP EntityTypeInterface::getLowercaseLabel方法的具體用法?PHP EntityTypeInterface::getLowercaseLabel怎麽用?PHP EntityTypeInterface::getLowercaseLabel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Drupal\Core\Entity\EntityTypeInterface
的用法示例。
在下文中一共展示了EntityTypeInterface::getLowercaseLabel方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: save
/**
* {@inheritdoc}
*/
public function save(array $form, array &$form_state)
{
drupal_set_message(t('Saved the %label @entity-type.', array('%label' => $this->entity->label(), '@entity-type' => $this->entityType->getLowercaseLabel())));
$this->entity->save();
\Drupal::entityManager()->clearCachedFieldDefinitions();
$form_state['redirect_route']['route_name'] = 'entity.' . $this->entity->getEntityTypeId() . '_list';
}
示例2: save
/**
* {@inheritdoc}
*/
public function save(array $form, FormStateInterface $form_state)
{
drupal_set_message($this->t('Saved the %label @entity-type.', array('%label' => $this->entity->label(), '@entity-type' => $this->entityType->getLowercaseLabel())));
$this->entity->save();
\Drupal::entityManager()->clearCachedFieldDefinitions();
$form_state->setRedirectUrl($this->entity->urlInfo('collection'));
}
示例3: save
/**
* {@inheritdoc}
*/
public function save(array $form, FormStateInterface $form_state)
{
drupal_set_message(t('Saved the %label @entity-type.', array('%label' => $this->entity->label(), '@entity-type' => $this->entityType->getLowercaseLabel())));
$this->entity->save();
\Drupal::entityManager()->clearCachedFieldDefinitions();
$form_state->setRedirect('entity.' . $this->entity->getEntityTypeId() . '_list');
}
示例4: getEntityTypeLabels
/**
* {@inheritdoc}
*/
public function getEntityTypeLabels()
{
$lowercase_label = $this->entityType->getLowercaseLabel();
return ['singular' => $lowercase_label, 'plural' => t('@entity_type entities', ['@entity_type' => $lowercase_label])];
}