Code Duplication    Length = 16-19 lines in 3 locations

class/files/templates/user/TemplatesUserCategories.php 1 location

@@ 264-282 (lines=19) @@
261
     *
262
     * @return bool|string
263
     */
264
    public function renderFile($filename)
265
    {
266
        $module = $this->getModule();
267
        $table = $this->getTable();
268
        $moduleDirname = $module->getVar('mod_dirname');
269
        $tableName = $table->getVar('table_name');
270
        $tableSolename = $table->getVar('table_solename');
271
        $tableFieldname = $table->getVar('table_fieldname');
272
        $language = $this->getLanguage($moduleDirname, 'MA');
273
        $content = $this->getTemplatesUserCategoriesHeader($moduleDirname);
274
        $content .= $this->getTemplatesUserCategoriesPanel($moduleDirname, $tableName, $tableSolename, $language);
275
        /*
276
        $content .= $this->getTemplatesUserCategories($moduleDirname, $tableName, $tableSolename, $language);*/
277
        $content .= $this->getTemplatesUserCategoriesFooter($moduleDirname);
278
        //
279
        $this->tdmcfile->create($moduleDirname, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
280
281
        return $this->tdmcfile->renderFile();
282
    }
283
}
284

class/files/templates/user/TemplatesUserPages.php 1 location

@@ 218-233 (lines=16) @@
215
     *
216
     * @return bool|string
217
     */
218
    public function renderFile($filename)
219
    {
220
        $module = $this->getModule();
221
        $table = $this->getTable();
222
        $moduleDirname = $module->getVar('mod_dirname');
223
        $tableName = $table->getVar('table_name');
224
        $tableSolename = $table->getVar('table_solename');
225
        $language = $this->getLanguage($moduleDirname, 'MA');
226
        $content = $this->getTemplatesUserPagesHeader($moduleDirname);
227
        $content      .= $this->getTemplatesUserPages($moduleDirname, $tableName, $tableSolename, $language);
228
        $content      .= $this->getTemplatesUserPagesFooter($moduleDirname);
229
        //
230
        $this->tdmcfile->create($moduleDirname, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
231
232
        return $this->tdmcfile->renderFile();
233
    }
234
}
235

class/files/admin/AdminMenu.php 1 location

@@ 223-239 (lines=17) @@
220
    /**
221
     * @return bool|string
222
     */
223
    public function render()
224
    {
225
        $module = $this->getModule();
226
        $filename = $this->getFileName();
227
        $moduleDirname = $module->getVar('mod_dirname');
228
        $language = $this->getLanguage($moduleDirname, 'MI', 'ADMENU');
229
        $langAbout = $this->getLanguage($moduleDirname, 'MI', 'ABOUT');
230
        $menu = 1;
231
        $content = $this->getHeaderFilesComments($module, $filename);
232
        $content .= $this->getAdminMenuHeader();
233
        $content .= $this->getAdminMenuDashboard($language, $menu);
234
        $content .= $this->getAdminMenuList($module, $language, $langAbout, $menu);
235
236
        $this->tdmcfile->create($moduleDirname, 'admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
237
238
        return $this->tdmcfile->renderFile();
239
    }
240
}
241