Advertisement
Guest User

Classes/Domain/Model/CustomFEU.php

a guest
Aug 10th, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.07 KB | None | 0 0
  1. <?php
  2. namespace Vendor\Feregistration\Domain\Model;
  3.  
  4. /***************************************************************
  5.  *
  6.  *  Copyright notice
  7.  *
  8.  *  (c) 2016
  9.  *
  10.  *  All rights reserved
  11.  *
  12.  *  This script is part of the TYPO3 project. The TYPO3 project is
  13.  *  free software; you can redistribute it and/or modify
  14.  *  it under the terms of the GNU General Public License as published by
  15.  *  the Free Software Foundation; either version 3 of the License, or
  16.  *  (at your option) any later version.
  17.  *
  18.  *  The GNU General Public License can be found at
  19.  *  http://www.gnu.org/copyleft/gpl.html.
  20.  *
  21.  *  This script is distributed in the hope that it will be useful,
  22.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  23.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24.  *  GNU General Public License for more details.
  25.  *
  26.  *  This copyright notice MUST APPEAR in all copies of the script!
  27.  ***************************************************************/
  28.  
  29. /**
  30.  * Custom Frontend User
  31.  */
  32. class CustomFEU extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
  33. {
  34.  
  35.     /**
  36.      * disable
  37.      *
  38.      * @var bool
  39.      */
  40.     protected $disable = false;
  41.    
  42.     /**
  43.      * frfield
  44.      *
  45.      * @var string
  46.      */
  47.     protected $frfield = '';
  48.    
  49.     /**
  50.      * frcat
  51.      *
  52.      * @var string
  53.      */
  54.     protected $frcat = '';
  55.    
  56.     /**
  57.      * frhash
  58.      *
  59.      * @var string
  60.      */
  61.     protected $frhash = '';
  62.    
  63.     /**
  64.      * usergroup
  65.      *
  66.      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Vendor\Feregistration\Domain\Model\FEGroups>
  67.      */
  68.     protected $usergroup = null;
  69.    
  70.     /**
  71.      * Returns the disable
  72.      *
  73.      * @return bool $disable
  74.      */
  75.     public function getDisable()
  76.     {
  77.         return $this->disable;
  78.     }
  79.    
  80.     /**
  81.      * Sets the disable
  82.      *
  83.      * @param bool $disable
  84.      * @return void
  85.      */
  86.     public function setDisable($disable)
  87.     {
  88.         $this->disable = $disable;
  89.     }
  90.    
  91.     /**
  92.      * Returns the boolean state of disable
  93.      *
  94.      * @return bool
  95.      */
  96.     public function isDisable()
  97.     {
  98.         return $this->disable;
  99.     }
  100.    
  101.     /**
  102.      * Returns the frfield
  103.      *
  104.      * @return string $frfield
  105.      */
  106.     public function getFrfield()
  107.     {
  108.         return $this->frfield;
  109.     }
  110.    
  111.     /**
  112.      * Sets the frfield
  113.      *
  114.      * @param string $frfield
  115.      * @return void
  116.      */
  117.     public function setFrfield($frfield)
  118.     {
  119.         $this->frfield = $frfield;
  120.     }
  121.    
  122.     /**
  123.      * Returns the frcat
  124.      *
  125.      * @return string $frcat
  126.      */
  127.     public function getFrcat()
  128.     {
  129.         return $this->frcat;
  130.     }
  131.    
  132.     /**
  133.      * Sets the frcat
  134.      *
  135.      * @param string $frcat
  136.      * @return void
  137.      */
  138.     public function setFrcat($frcat)
  139.     {
  140.         $this->frcat = $frcat;
  141.     }
  142.    
  143.     /**
  144.      * Returns the frhash
  145.      *
  146.      * @return string $frhash
  147.      */
  148.     public function getFrhash()
  149.     {
  150.         return $this->frhash;
  151.     }
  152.    
  153.     /**
  154.      * Sets the frhash
  155.      *
  156.      * @param string $frhash
  157.      * @return void
  158.      */
  159.     public function setFrhash($frhash)
  160.     {
  161.         $this->frhash = $frhash;
  162.     }
  163.    
  164.     /**
  165.      * __construct
  166.      */
  167.     public function __construct()
  168.     {
  169.         //Do not remove the next line: It would break the functionality
  170.         $this->initStorageObjects();
  171.     }
  172.    
  173.     /**
  174.      * Initializes all ObjectStorage properties
  175.      * Do not modify this method!
  176.      * It will be rewritten on each save in the extension builder
  177.      * You may modify the constructor of this class instead
  178.      *
  179.      * @return void
  180.      */
  181.     protected function initStorageObjects()
  182.     {
  183.         $this->usergroup = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
  184.     }
  185.    
  186.     /**
  187.      * Adds a FEGroups
  188.      *
  189.      * @param \Vendor\Feregistration\Domain\Model\FEGroups $usergroup
  190.      * @return void
  191.      */
  192.     public function addUsergroup(\Vendor\Feregistration\Domain\Model\FEGroups $usergroup)
  193.     {
  194.         $this->usergroup->attach($usergroup);
  195.     }
  196.    
  197.     /**
  198.      * Removes a FEGroups
  199.      *
  200.      * @param \Vendor\Feregistration\Domain\Model\FEGroups $usergroupToRemove The FEGroups to be removed
  201.      * @return void
  202.      */
  203.     public function removeUsergroup(\Vendor\Feregistration\Domain\Model\FEGroups $usergroupToRemove)
  204.     {
  205.         $this->usergroup->detach($usergroupToRemove);
  206.     }
  207.    
  208.     /**
  209.      * Returns the usergroup
  210.      *
  211.      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Vendor\Feregistration\Domain\Model\FEGroups> $usergroup
  212.      */
  213.     public function getUsergroup()
  214.     {
  215.         return $this->usergroup;
  216.     }
  217.    
  218.     /**
  219.      * Sets the usergroup
  220.      *
  221.      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Vendor\Feregistration\Domain\Model\FEGroups> $usergroup
  222.      * @return void
  223.      */
  224.     public function setUsergroup(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $usergroup)
  225.     {
  226.         $this->usergroup = $usergroup;
  227.     }
  228.  
  229. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement