Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • php8.2-docker-services
  • 6.x
  • laminas
  • bertrand.gauthier-master-patch-70311
  • bertrand.gauthier-master-patch-87168
  • laminas_migration
  • sqlite
  • 4.0.0
  • 3.2.1
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 1.0.1
  • 1.0.0
15 results

composer.lock

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    FormAwareTrait.php 923 B
    <?php
    
    namespace <namespace>;
    
    use <targetFullClass>;
    
    /**
     * Description of <class>
     *
     * @author UnicaenCode
     */
    trait <class>
    {
        /**
         * @var <targetClass>
         */
        protected $<variable>;
    
    
    
        /**
         * @param <targetClass> $<variable>
         *
         * @return self
         */
        public function set<method>( <targetClass> $<variable> )
        {
            $this-><variable> = $<variable>;
    
            return $this;
        }
    <if useGetter notrim>
    
    
        /**
         * Retourne un nouveau formulaire ou fieldset systématiquement, sauf si ce dernier a été fourni manuellement.
         *
         * @return <targetClass>
         * @throws RuntimeException
         */
        public function get<method>() : <targetClass>
        {
            if ($this-><variable>){
                return $this-><variable>;
            }else{
                return \Application::$container->get('FormElementManager')->get(<targetClass>::class);
            }
        }
    <endif useGetter>
    }