Update to Drupal 8.0.0-rc3. For more information, see https://www.drupal.org/node/2608078
This commit is contained in:
parent
6419a031d7
commit
4afb23bbd3
762 changed files with 20080 additions and 6368 deletions
|
@ -8,6 +8,7 @@
|
|||
namespace Drupal\Core;
|
||||
|
||||
use Drupal\Component\Render\MarkupInterface;
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
use Drupal\Core\Render\BubbleableMetadata;
|
||||
|
||||
/**
|
||||
|
@ -16,7 +17,7 @@ use Drupal\Core\Render\BubbleableMetadata;
|
|||
* Note: not to be confused with \Drupal\Core\Link, which is for passing around
|
||||
* ungenerated links (typically link text + route name + route parameters).
|
||||
*/
|
||||
class GeneratedLink extends BubbleableMetadata implements MarkupInterface {
|
||||
class GeneratedLink extends BubbleableMetadata implements MarkupInterface, \Countable {
|
||||
|
||||
/**
|
||||
* The HTML string value containing a link.
|
||||
|
@ -61,4 +62,11 @@ class GeneratedLink extends BubbleableMetadata implements MarkupInterface {
|
|||
return $this->__toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function count() {
|
||||
return Unicode::strlen($this->__toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue