src/App/Controller/Dashboard/Settings/AccountController.php line 86

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Dashboard\Settings;
  3. use App\Component\ViewLayer\AbstractView;
  4. use App\Component\ViewLayer\Views\AbstractHtmlView;
  5. use App\Component\ViewLayer\Views\AjaxHtmlView;
  6. use App\Component\ViewLayer\Views\JsonView;
  7. use App\Controller\PaginationTrait;
  8. use App\Form\Forms\DummyForm;
  9. use App\Form\Forms\Searching\AccountSearchForm;
  10. use App\Form\Forms\Security\AccountType;
  11. use App\Form\Forms\Security\Profile\ContainerRoleType;
  12. use App\Form\Forms\Security\Profile\GroupType;
  13. use App\Form\Forms\Security\Profile\ListRoleType;
  14. use App\Form\Forms\Security\Profile\SchoolRoleType;
  15. use App\Model\Searching\AccountRoleAssociationSearch;
  16. use App\Model\Searching\AccountSearch;
  17. use App\Model\Searching\GroupAccountSearch;
  18. use App\Model\Searching\RoleAssociationSearch;
  19. use Cms\BulletinBundle\Model\Bulletins\AccountCreationBulletin;
  20. use Cms\BulletinBundle\Model\Bulletins\PasswordResetBulletin;
  21. use Cms\BulletinBundle\Service\BulletinService;
  22. use Cms\TenantBundle\Model\ProductsBitwise;
  23. use Platform\SecurityBundle\Entity\Access\GroupAccount;
  24. use Platform\SecurityBundle\Entity\Access\RoleAssociation;
  25. use Platform\SecurityBundle\Entity\Access\RoleAssociation\AccountRoleAssociation;
  26. use Platform\SecurityBundle\Entity\Identity\Account;
  27. use Platform\SecurityBundle\Service\PasswordService;
  28. use Products\NotificationsBundle\Controller\AbstractDashboardController;
  29. use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
  30. use Symfony\Component\HttpFoundation\RedirectResponse;
  31. use Symfony\Component\HttpFoundation\Request;
  32. use Symfony\Component\HttpFoundation\Response;
  33. use Symfony\Component\Routing\Annotation\Route;
  34. /**
  35.  * @Route(
  36.  *     "/accounts",
  37.  * )
  38.  */
  39. final class AccountController extends AbstractDashboardController
  40. {
  41.     use PaginationTrait;
  42.     public const ROUTES__MAIN 'app.app.dashboard.settings.accounts.main';
  43.     public const ROUTES__CREATE 'app.app.dashboard.settings.accounts.create';
  44.     public const ROUTES__UPDATE 'app.app.dashboard.settings.accounts.update';
  45.     public const ROUTES__ROLES_MAIN 'app.app.dashboard.settings.accounts.roles.main';
  46.     public const ROUTES__ROLES_DELETE 'app.app.dashboard.settings.accounts.roles.delete';
  47.     public const ROUTES__ROLES_PERMISSIONS_INHERITANCE_TOGGLE 'app.app.dashboard.settings.accounts.roles.inheritance_toggle';
  48.     public const ROUTES__GROUPS_MAIN 'app.app.dashboard.settings.accounts.groups.main';
  49.     public const ROUTES__GROUPS_DELETE 'app.app.dashboard.settings.accounts.groups.delete';
  50.     public const ROUTES__REACTIVATE 'app.app.dashboard.settings.accounts.reactivate';
  51.     public const ROUTES__DEACTIVATE 'app.app.dashboard.settings.accounts.deactivate';
  52.     public const ROUTES__MANAGE_PASSWORD 'app.app.dashboard.settings.accounts.manage_password';
  53.     public const ROUTES__ROLES_PERMISSIONS_SUPER_USER_TOGGLE 'app.app.dashboard.settings.accounts.roles.suer_user_toggle';
  54.     public const ROUTES__ROLES_PERMISSIONS_IMPERSONATION_TOGGLE 'app.app.dashboard.settings.accounts.roles.impersonation_toggle';
  55.     private const MANAGE_PASSWORD_TYPE__RESET 'reset';
  56.     private const MANAGE_PASSWORD_TYPE__CLEAR 'clear';
  57.     private const MAX_ASSOCIATION 10000;
  58.     /**
  59.      * @param int $pagination
  60.      * @return AbstractHtmlView|Response
  61.      *
  62.      * @Route(
  63.      *     "/list/{pagination}",
  64.      *     name = self::ROUTES__MAIN,
  65.      *     requirements = {
  66.      *         "pagination" = "[1-9]\d*",
  67.      *     },
  68.      *     defaults = {
  69.      *         "pagination" = 0,
  70.      *     },
  71.      * )
  72.      */
  73.     public function mainAction(int $pagination 0)
  74.     {
  75.         // AUDIT
  76.         $this->denyAccessUnlessGranted('app.security.admin');
  77.         $result $this->doSearch(
  78.             Account::class,
  79.             'accounts',
  80.             AccountSearch::class,
  81.             AccountSearchForm::class,
  82.             $pagination,
  83.         );
  84.         return ($result instanceof Response) ? $result $this->html($result);
  85.     }
  86.     /**
  87.      * @param Request $request
  88.      * @return AbstractView|RedirectResponse
  89.      *
  90.      * @Route(
  91.      *     "/create",
  92.      *     name = self::ROUTES__CREATE,
  93.      * )
  94.      * @throws \Exception
  95.      */
  96.     public function createAction(Request $request)
  97.     {
  98.         // AUDIT
  99.         $this->denyAccessUnlessGranted('app.security.admin');
  100.         $account = new Account();
  101.         $form $this->createForm(
  102.             AccountType::class,
  103.             $account,
  104.             [
  105.                 'password' => false,
  106.                 'notify' => ($this->getGlobalContext()->getTenant()->getProducts(
  107.                     )->getMask() !== ProductsBitwise::SMM__BASE),
  108.             ]
  109.         );
  110.         if ($this->handleForm($form$request)) {
  111.             if ( ! empty($password $form->get('password')->getData())) {
  112.                 $account->setPasswordRaw($password);
  113.             }
  114.             $this->getEntityManager()->save($account);
  115.             if ($form->get('notify')->getData() === true) {
  116.                 $this->sendCreateEmail($account$password);
  117.             }
  118.             $this->getLoggingService()->createLog($account);
  119.             return $this->jsonView([
  120.                 'redirect' => true,
  121.             ]);
  122.         }
  123.         return $this->ajax([
  124.             'form' => $form->createView(),
  125.             'account' => $account,
  126.         ])->unwrap();
  127.     }
  128.     /**
  129.      * @param Account $account
  130.      * @return AbstractHtmlView|JsonView
  131.      *
  132.      * @Route(
  133.      *     "/{account}/update",
  134.      *     name = self::ROUTES__UPDATE,
  135.      *     requirements = {
  136.      *         "account" = "[1-9]\d*",
  137.      *     },
  138.      * )
  139.      * @ParamConverter(
  140.      *     "account",
  141.      *     class = Account::class,
  142.      * )
  143.      */
  144.     public function updateAction(Account $account)
  145.     {
  146.         // AUDIT
  147.         $this->denyAccessUnlessGranted('app.security.admin');
  148.         $isSuperAdmin $this->isGranted('campussuite.super_admin');
  149.         // only superadmins can edit special permissions nad onoster account has only special permissions section
  150.         if( ! $isSuperAdmin && $account->isOneRoster()) {
  151.             throw new \LogicException();
  152.         }
  153.         $form $this->createForm(AccountType::class, $account, [
  154.             'password' => false,
  155.         ]);
  156.         if ($this->handleForm($form)) {
  157.             $this->getEntityManager()->save($account);
  158.             if ( $form->has('password') && ! empty($password $form->get('password')->getData())) {
  159.                 $this->getEntityManager()->save($account->setPasswordRaw($password));
  160.                 if ($form->get('notify')->getData() === true) {
  161.                     $this->sendResetPasswordEmail($account$password);
  162.                 }
  163.             }
  164.             $this->getLoggingService()->createLog($account);
  165.             return $this->jsonView([
  166.                 'redirect' => true,
  167.             ]);
  168.         }
  169.         return $this->ajax([
  170.             'form' => $form->createView(),
  171.             'account' => $account,
  172.         ])->unwrap();
  173.     }
  174.     /**
  175.      * @param Account $account
  176.      * @return AbstractHtmlView
  177.      *
  178.      * @Route(
  179.      *     "/{account}/roles",
  180.      *     name = self::ROUTES__ROLES_MAIN,
  181.      *     requirements = {
  182.      *         "account" = "[1-9]\d*",
  183.      *     }
  184.      * )
  185.      * @ParamConverter(
  186.      *     "account",
  187.      *     class = Account::class,
  188.      * )
  189.      */
  190.     public function rolesAction(Account $account): AbstractHtmlView
  191.     {
  192.         // AUDIT
  193.         $this->denyAccessUnlessGranted('app.security.admin');
  194.         $accountRoleAssociationRepository $this->getEntityManager()->getRepository(AccountRoleAssociation::class);
  195.         $accountRoleAssociationSearch = (new AccountRoleAssociationSearch())->setAccount($account);
  196.         $containerRoleForm $this->createForm(ContainerRoleType::class);
  197.         $schoolRoleForm $this->createForm(SchoolRoleType::class);
  198.         $listRoleForm $this->createForm(ListRoleType::class);
  199.         $isContainerRoleFormSubmitted $this->handleForm($containerRoleForm);
  200.         $isSchoolRoleFormSubmitted $this->handleForm($schoolRoleForm);
  201.         $isListRoleFormSubmitted $this->handleForm($listRoleForm);
  202.         if ($isContainerRoleFormSubmitted || $isSchoolRoleFormSubmitted || $isListRoleFormSubmitted) {
  203.             $association = (new AccountRoleAssociation())
  204.                 ->setAccount($account)
  205.                 ->setInheritance(RoleAssociation::INHERITANCES__ME_ONLY);
  206.             switch (true) {
  207.                 case $isContainerRoleFormSubmitted:
  208.                     $data $containerRoleForm->getData();
  209.                     $association->setContainer($data['container']);
  210.                     $containerRoleForm $this->createForm(ContainerRoleType::class);
  211.                     break;
  212.                 case $isSchoolRoleFormSubmitted:
  213.                     $data $schoolRoleForm->getData();
  214.                     $association->setSchool($data['school']);
  215.                     $schoolRoleForm $this->createForm(SchoolRoleType::class);
  216.                     break;
  217.                 case $isListRoleFormSubmitted:
  218.                     $data $listRoleForm->getData();
  219.                     $association->setList($data['list']);
  220.                     $listRoleForm $this->createForm(ListRoleType::class);
  221.                     break;
  222.                 default:
  223.                     throw new \LogicException();
  224.             }
  225.             $association
  226.                 ->setRole($data['role']);
  227.             $this->getEntityManager()->save($association);
  228.             $this->getLoggingService()->createLog($account);
  229.         }
  230.         return $this->ajax([
  231.             'account' => $account,
  232.             'websiteAssociations' => $accountRoleAssociationRepository->findBySearch(
  233.                 $accountRoleAssociationSearch->setTypes([RoleAssociationSearch::TYPES__CONTAINER]),
  234.                 self::MAX_ASSOCIATION
  235.             ),
  236.             'messageAssociations' => $accountRoleAssociationRepository->findBySearch(
  237.                 $accountRoleAssociationSearch->setTypes(
  238.                     [RoleAssociationSearch::TYPES__SCHOOLRoleAssociationSearch::TYPES__LIST]
  239.                 ),
  240.                 self::MAX_ASSOCIATION
  241.             ),
  242.             'containerRoleForm' => $containerRoleForm->createView(),
  243.             'schoolRoleForm' => $schoolRoleForm->createView(),
  244.             'listRoleForm' => $listRoleForm->createView(),
  245.         ])->unwrap();
  246.     }
  247.     /**
  248.      * @param AccountRoleAssociation $accountRoleAssociation
  249.      * @return JsonView
  250.      *
  251.      * @Route(
  252.      *     "/_inheritance_toggle/{accountRoleAssociation}",
  253.      *     name = self::ROUTES__ROLES_PERMISSIONS_INHERITANCE_TOGGLE,
  254.      *     methods = {"POST"},
  255.      *     requirements = {
  256.      *         "accountRoleAssociation" = "[1-9]\d*",
  257.      *     },
  258.      * )
  259.      * @ParamConverter(
  260.      *     "accountRoleAssociation",
  261.      *     class = AccountRoleAssociation::class,
  262.      * )
  263.      */
  264.     public function toggleInheritanceAction(
  265.         AccountRoleAssociation $accountRoleAssociation
  266.     ): JsonView {
  267.         // AUDIT
  268.         $this->denyAccessUnlessGranted('app.security.admin');
  269.         $inheritance $accountRoleAssociation->getInheritance();
  270.         $toggledInheritance $inheritance === RoleAssociation::INHERITANCES__ME_ONLY RoleAssociation::INHERITANCES__ME_AND_ALL_DESCENDENTS RoleAssociation::INHERITANCES__ME_ONLY;
  271.         $accountRoleAssociation->setInheritance($toggledInheritance);
  272.         $this->getLoggingService()->createLog($accountRoleAssociation->getAccount());
  273.         return $this->jsonView([
  274.             'value' => $inheritance === RoleAssociation::INHERITANCES__ME_ONLY,
  275.         ]);
  276.     }
  277.     /**
  278.      * @param Account $account
  279.      * @param AccountRoleAssociation $association
  280.      * @return AbstractView|AjaxHtmlView|JsonView|RedirectResponse
  281.      *
  282.      * @Route(
  283.      *     "/{account}/roles/{association}/delete",
  284.      *     name = self::ROUTES__ROLES_DELETE,
  285.      *     requirements = {
  286.      *         "account" = "[1-9]\d*",
  287.      *         "association" = "[1-9]\d*",
  288.      *     },
  289.      * )
  290.      * @ParamConverter(
  291.      *     "account",
  292.      *     class = Account::class,
  293.      * )
  294.      * @ParamConverter(
  295.      *     "association",
  296.      *     class = AccountRoleAssociation::class,
  297.      * )
  298.      */
  299.     public function roleDeleteAction(Account $accountAccountRoleAssociation $association)
  300.     {
  301.         $this->denyAccessUnlessGranted(
  302.             'app.security.admin',
  303.             [$accountnull]
  304.         );
  305.         $this->denyAccessUnlessGranted(
  306.             'app.security.admin',
  307.             [$associationnull]
  308.         );
  309.         $id $association->getId();
  310.         $this->getEntityManager()->delete($association);
  311.         $this->getLoggingService()->createLog($association$id);
  312.         return $this->redirectToRoute(self::ROUTES__ROLES_MAIN, ['account' => $account->getId()]);
  313.     }
  314.     /**
  315.      * @param Account $account
  316.      * @return AbstractHtmlView
  317.      *
  318.      * @Route(
  319.      *     "/{account}/groups",
  320.      *     name = self::ROUTES__GROUPS_MAIN,
  321.      *     requirements = {
  322.      *         "account" = "[1-9]\d*",
  323.      *     }
  324.      * )
  325.      * @ParamConverter(
  326.      *     "account",
  327.      *     class = Account::class,
  328.      * )
  329.      */
  330.     public function groupsAction(Account $account): AbstractHtmlView
  331.     {
  332.         // AUDIT
  333.         $this->denyAccessUnlessGranted('app.security.admin');
  334.         $groupAccountAssociationRepository $this->getEntityManager()->getRepository(GroupAccount::class);
  335.         $groupRoleAssociationSearch = (new GroupAccountSearch())->setAccount($account);
  336.         $form $this->createForm(GroupType::class, null, ['account' => $account]);
  337.         if ($this->handleForm($form)) {
  338.             $association = (new GroupAccount())
  339.                 ->setGroup($form->getData()['group'])
  340.                 ->setAccount($account);
  341.             $this->getEntityManager()->save($association);
  342.             $this->getLoggingService()->createLog($account);
  343.             // reset form
  344.             $form $this->createForm(GroupType::class, null, ['account' => $account]);
  345.         }
  346.         return $this->ajax([
  347.             'account' => $account,
  348.             'associations' => $groupAccountAssociationRepository->findBySearch(
  349.                 $groupRoleAssociationSearch,
  350.                 self::MAX_ASSOCIATION
  351.             ),
  352.             'form' => $form->createView(),
  353.         ])->unwrap();
  354.     }
  355.     /**
  356.      * @param Account $account
  357.      * @param GroupAccount $association
  358.      * @return AbstractView|AjaxHtmlView|JsonView|RedirectResponse
  359.      *
  360.      * @Route(
  361.      *     "/{account}/groups/{association}/delete",
  362.      *     name = self::ROUTES__GROUPS_DELETE,
  363.      *     requirements = {
  364.      *         "account" = "[1-9]\d*",
  365.      *         "association" = "[1-9]\d*",
  366.      *     },
  367.      * )
  368.      * @ParamConverter(
  369.      *     "account",
  370.      *     class = Account::class,
  371.      * )
  372.      * @ParamConverter(
  373.      *     "association",
  374.      *     class = GroupAccount::class,
  375.      * )
  376.      */
  377.     public function groupDeleteAction(Account $accountGroupAccount $association)
  378.     {
  379.         $this->denyAccessUnlessGranted(
  380.             'app.security.admin',
  381.             [$accountnull]
  382.         );
  383.         $this->denyAccessUnlessGranted(
  384.             'app.security.admin',
  385.             [$associationnull]
  386.         );
  387.         $id $association->getId();
  388.         $this->getEntityManager()->delete($association);
  389.         $this->getLoggingService()->createLog($association$id);
  390.         return $this->redirectToRoute(self::ROUTES__GROUPS_MAIN, ['account' => $account->getId()]);
  391.     }
  392.     /**
  393.      * @param Account $account
  394.      * @return AbstractView|AjaxHtmlView|JsonView
  395.      *
  396.      * @Route(
  397.      *     "/{account}/reactivate",
  398.      *     name = self::ROUTES__REACTIVATE,
  399.      *     requirements = {
  400.      *         "account" = "[1-9]\d*",
  401.      *     },
  402.      * )
  403.      * @ParamConverter(
  404.      *     "account",
  405.      *     class = Account::class,
  406.      * )
  407.      */
  408.     public function reactivateAction(Account $account): AbstractView
  409.     {
  410.         // AUDIT
  411.         $this->denyAccessUnlessGranted(
  412.             'app.security.admin',
  413.             [$accountnull]
  414.         );
  415.         if ($account->isActive()) {
  416.             return $this->jsonView([
  417.                 'redirect' => true,
  418.             ]);
  419.         }
  420.         $form $this->createForm(DummyForm::class);
  421.         if ($this->handleForm($form)) {
  422.             $id $account->getId();
  423.             $account->setActive(true);
  424.             $this->getEntityManager()->save($account);
  425.             $this->getLoggingService()->createLog($account$id);
  426.             return $this->jsonView([
  427.                 'redirect' => true,
  428.             ]);
  429.         }
  430.         return $this->ajax([
  431.             'account' => $account,
  432.             'form' => $form->createView(),
  433.         ]);
  434.     }
  435.     /**
  436.      * @param Account $account
  437.      * @return AbstractView|AjaxHtmlView|JsonView
  438.      *
  439.      * @Route(
  440.      *     "/{account}/deactivate",
  441.      *     name = self::ROUTES__DEACTIVATE,
  442.      *     requirements = {
  443.      *         "account" = "[1-9]\d*",
  444.      *     },
  445.      * )
  446.      * @ParamConverter(
  447.      *     "account",
  448.      *     class = Account::class,
  449.      * )
  450.      */
  451.     public function deactivateAction(Account $account): AbstractView
  452.     {
  453.         // AUDIT
  454.         $this->denyAccessUnlessGranted(
  455.             'app.security.admin',
  456.             [$accountnull]
  457.         );
  458.         if ( ! $account->isActive()) {
  459.             return $this->jsonView([
  460.                 'redirect' => true,
  461.             ]);
  462.         }
  463.         $form $this->createForm(DummyForm::class);
  464.         if ($this->handleForm($form)) {
  465.             $id $account->getId();
  466.             $account->setActive(false);
  467.             $this->getEntityManager()->save($account);
  468.             $this->getLoggingService()->createLog($account$id);
  469.             return $this->jsonView([
  470.                 'redirect' => true,
  471.             ]);
  472.         }
  473.         return $this->ajax([
  474.             'account' => $account,
  475.             'form' => $form->createView(),
  476.         ]);
  477.     }
  478.     /**
  479.      * @param Request $request
  480.      * @param Account $account
  481.      * @param string|null $type
  482.      * @return AbstractView|AjaxHtmlView|JsonView
  483.      *
  484.      * @Route(
  485.      *     "/{account}/manage-password/{type}",
  486.      *     name = self::ROUTES__MANAGE_PASSWORD,
  487.      *     requirements = {
  488.      *         "account" = "[1-9]\d*",
  489.      *          "type" =  "reset|clear"
  490.      *     },
  491.      * )
  492.      * @ParamConverter(
  493.      *     "account",
  494.      *     class = Account::class,
  495.      * )
  496.      */
  497.     public function managePasswordAction(Request $requestAccount $accountstring $type null)
  498.     {
  499.         $this->denyAccessUnlessGranted(
  500.             'app.security.admin',
  501.             [$accountnull]
  502.         );
  503.         if ( ! $account->canManagePassword()) {
  504.             return $this->jsonView([
  505.                 'redirect' => true,
  506.             ]);
  507.         }
  508.         $form $this->createForm(DummyForm::class);
  509.         if ($this->handleForm($form) && $type != null) {
  510.             $id $account->getId();
  511.             if ($type === self::MANAGE_PASSWORD_TYPE__RESET) {
  512.                 $this->getPasswordService()->sendResetPasswordInitEmail(
  513.                     $request,
  514.                     $account
  515.                 );
  516.             } elseif ($type === self::MANAGE_PASSWORD_TYPE__CLEAR) {
  517.                 $this->getEntityManager()->save(
  518.                     $account->setPassword(null)
  519.                 );
  520.             }
  521.             $this->getEntityManager()->save($account);
  522.             $this->getLoggingService()->createLog($account$id);
  523.             return $this->jsonView([
  524.                 'redirect' => true,
  525.             ]);
  526.         }
  527.         return $this->ajax([
  528.             'account' => $account,
  529.             'form' => $form->createView(),
  530.         ]);
  531.     }
  532.     /**
  533.      * @param Account $account
  534.      * @return JsonView
  535.      *
  536.      * @Route(
  537.      *     "/_super_user_toggle/{account}",
  538.      *     name = self::ROUTES__ROLES_PERMISSIONS_SUPER_USER_TOGGLE,
  539.      *     methods = {"POST"},
  540.      *     requirements = {
  541.      *         "account" = "[1-9]\d*",
  542.      *     },
  543.      * )
  544.      * @ParamConverter(
  545.      *     "account",
  546.      *     class = Account::class,
  547.      * )
  548.      */
  549.     public function toggleSuperUserAction(Account $account): JsonView {
  550.         // AUDIT
  551.         $this->denyAccessUnlessGranted('campussuite.super_admin');
  552.         $account->getSpecialPermissions()->setSuperUser( ! $account->getSpecialPermissions()->isSuperUser());
  553.         $this->getEntityManager()->save($account);
  554.         $this->getLoggingService()->createLog($account);
  555.         return $this->jsonView([
  556.             'value' => $account->getSpecialPermissions()->isSuperUser(),
  557.         ]);
  558.     }
  559.     /**
  560.      * @param Account $account
  561.      * @param string $password
  562.      * @return void
  563.      */
  564.     private function sendResetPasswordEmail(Account $accountstring $password): void
  565.     {
  566.         $this->getBulletinService()->send(
  567.             (new PasswordResetBulletin())
  568.                 ->setTo($account)
  569.                 ->setAccount($account)
  570.                 ->setPassword($password)
  571.                 ->setDashboard($this->getGlobalContext()->getDashboardUrl())
  572.         );
  573.     }
  574.     /**
  575.      * @param Account $account
  576.      * @param string|null $password
  577.      * @return void
  578.      */
  579.     private function sendCreateEmail(Account $account, ?string $password null): void
  580.     {
  581.         $this->getBulletinService()->send(
  582.             (new AccountCreationBulletin())
  583.                 ->setTo($account)
  584.                 ->setAccount($account)
  585.                 ->setPassword($password)
  586.                 ->setDashboard($this->getGlobalContext()->getDashboardUrl())
  587.         );
  588.     }
  589.     /**
  590.      * @return PasswordService
  591.      */
  592.     private function getPasswordService(): PasswordService
  593.     {
  594.         return $this->get(__METHOD__);
  595.     }
  596.     /**
  597.      * @return BulletinService
  598.      */
  599.     private function getBulletinService(): BulletinService
  600.     {
  601.         return $this->get(__METHOD__);
  602.     }
  603. }