Version 1
[yaffs-website] / vendor / drush / drush / tests / resources / modules / d8 / woot / src / WootManager.php
1 <?php
2
3 /**
4  * @file
5  * Contains \Drupal\woot\WootManager.
6  */
7
8 namespace Drupal\woot;
9
10 use Drupal\Component\Graph\Graph;
11 use Drupal\Component\Utility\SafeMarkup;
12 use Drupal\Core\Config\Entity\ConfigEntityInterface;
13 use Drupal\Core\Entity\ContentEntityInterface;
14 use Drupal\Core\Entity\EntityManager;
15 use Drupal\Core\Session\AccountInterface;
16 use Drupal\rest\LinkManager\LinkManagerInterface;
17 use Drupal\rest\Plugin\Type\ResourcePluginManager;
18 use Symfony\Component\Serializer\Serializer;
19
20 /**
21  * A simulated service for wooting.
22  * @todo throw useful exceptions
23  */
24 class WootManager
25 {
26   /**
27    * The current user.
28    *
29    * @var \Drupal\Core\Session\AccountInterface
30    */
31   protected $currentUser;
32
33   /**
34    * Constructs the default content manager.
35    *
36    * @param \Drupal\Core\Session|AccountInterface $current_user
37    *   The current user.
38    */
39   public function __construct(AccountInterface $current_user) {
40     $this->currentUser = $current_user;
41   }
42
43   /**
44    * Woof mightily. Note that we can include commands directly
45    * inside a service class.
46    *
47    * @command woof
48    * @aliases wf
49    */
50   public function woof()
51   {
52     return 'Woof!';
53   }
54 }