Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 15341 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 15341 Rev 15441
Línea 7... Línea 7...
7
use Laminas\Form\Form;
7
use Laminas\Form\Form;
8
use Laminas\Db\Adapter\AdapterInterface;
8
use Laminas\Db\Adapter\AdapterInterface;
9
use Laminas\Log\LoggerInterface;
9
use Laminas\Log\LoggerInterface;
10
use LeadersLinked\Mapper\CompanySizeMapper;
10
use LeadersLinked\Mapper\CompanySizeMapper;
11
use LeadersLinked\Mapper\IndustryMapper;
11
use LeadersLinked\Mapper\IndustryMapper;
-
 
12
use LeadersLinked\Mapper\ThemeMapper;
Línea 12... Línea 13...
12
 
13
 
13
class NetworkCreateForm extends Form
14
class NetworkCreateForm extends Form
14
{
15
{
15
    /**
16
    /**
Línea 105... Línea 106...
105
            'attributes' => [
106
            'attributes' => [
106
                'maxlength' 	=> 250,
107
                'maxlength' 	=> 250,
107
                'id' 			=> 'admin_hostname',
108
                'id' 			=> 'admin_hostname',
108
            ]
109
            ]
109
        ]);
110
        ]);
-
 
111
        
-
 
112
        $this->add([
-
 
113
            'name' => 'theme_id',
-
 
114
            'type' => \Laminas\Form\Element\Select::class,
-
 
115
            'attributes' => [
-
 
116
                'id' => 'theme_id',
-
 
117
            ],
-
 
118
            'options' => [
-
 
119
                'disable_inarray_validator' => true,
-
 
120
                'value_options' => $this->optionsTheme($adapter)
-
 
121
            ]
-
 
122
        ]);
-
 
123
        
110
    }
124
    }
Línea 111... Línea 125...
111
    
125
    
112
    /**
126
    /**
113
     *
127
     *
Línea 145... Línea 159...
145
            $options[$industry->uuid] = $industry->name;
159
            $options[$industry->uuid] = $industry->name;
146
        }
160
        }
Línea 147... Línea 161...
147
        
161
        
148
        return $options;
162
        return $options;
-
 
163
    }
-
 
164
    
-
 
165
    /**
-
 
166
     *
-
 
167
     * @param AdapterInterface $adapter
-
 
168
     */
-
 
169
    private function optionsTheme($adapter)
-
 
170
    {
-
 
171
        $options = [];
-
 
172
        
-
 
173
        $mapper = ThemeMapper::getInstance($adapter);
-
 
174
        $records = $mapper->fetchAll();
-
 
175
        
-
 
176
        foreach($records as $record)
-
 
177
        {
-
 
178
            $options[$record->uuid] = $record->name;
-
 
179
        }
-
 
180
        return $options;
Línea 149... Línea 181...
149
    }
181
    }
150
   
182