commit 8488ee25d58c8666d09ce0d547d9ff0b3cd02406 Author: Matthias Vandermaesen Date: Sat Mar 30 14:51:41 2013 +0100 fixed: remarks zuuperman diff --git a/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkFormatter.php b/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkFormatter.php index 735c79a..9d939f9 100644 --- a/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkFormatter.php +++ b/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkFormatter.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\link\Plugin\field\formatter\LinkFormatter. + * Contains \Drupal\link\Plugin\field\formatter\LinkFormatter. */ namespace Drupal\link\Plugin\field\formatter; @@ -27,7 +27,7 @@ * "url_only" = "", * "url_plain" = "", * "rel" = "", - * "target" = "", + * "target" = "" * } * ) */ diff --git a/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkSeparateFormatter.php b/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkSeparateFormatter.php index 36e53a2..ad75ec2 100644 --- a/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkSeparateFormatter.php +++ b/core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkSeparateFormatter.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\link\Plugin\field\formatter\LinkSeparateFormatter. + * Contains \Drupal\link\Plugin\field\formatter\LinkSeparateFormatter. * * @todo * Merge into 'link' formatter once there is a #type like 'item' that @@ -30,7 +30,7 @@ * settings = { * "trim_length" = "80", * "rel" = "", - * "target" = "", + * "target" = "" * } * ) */ @@ -64,8 +64,6 @@ public function viewElements(EntityInterface $entity, $langcode, array $items) { $url_title = $item['url']; if (!empty($settings['trim_length'])) { $link_title = truncate_utf8($link_title, $settings['trim_length'], FALSE, TRUE); - } - if (!empty($settings['trim_length'])) { $url_title = truncate_utf8($item['url'], $settings['trim_length'], FALSE, TRUE); } $element[$delta] = array( diff --git a/core/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php b/core/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php index d3f9ac1..d07cc4d 100644 --- a/core/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php +++ b/core/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\link\Plugin\field\widget\LinkWidget. + * Contains \Drupal\link\Plugin\field\widget\LinkWidget. */ namespace Drupal\link\Plugin\field\widget; @@ -23,7 +23,7 @@ * }, * settings = { * "placeholder_url" = "", - * "placeholder_title" = "", + * "placeholder_title" = "" * } * ) */ @@ -79,13 +79,13 @@ public function settingsForm(array $form, array &$form_state) { '#type' => 'textfield', '#title' => t('Placeholder for URL'), '#default_value' => $this->getSetting('placeholder_url'), - '#description' => t('The placeholder is a short hint (a word or short phrase) intended to aid the user with data entry. A hint could be a sample value or a brief description of the expected format.'), + '#description' => t('Text that will be shown inside the field until a value is entered. This hint is usually a sample value or a brief description of the expected format.'), ); $element['placeholder_title'] = array( '#type' => 'textfield', '#title' => t('Placeholder for link title'), '#default_value' => $this->getSetting('placeholder_title'), - '#description' => t('The placeholder is a short hint (a word or short phrase) intended to aid the user with data entry. A hint could be a sample value or a brief description of the expected format.'), + '#description' => t('Text that will be shown inside the field until a value is entered. This hint is usually a sample value or a brief description of the expected format.'), '#states' => array( 'invisible' => array( ':input[name="instance[settings][title]"]' => array('value' => DRUPAL_DISABLED),