Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cCodeGeneratorAbstract
  • cCodeGeneratorFactory
  • cCodeGeneratorStandard
  • cContentTypeAbstract
  • cContentTypeAbstractTabbed
  • cContentTypeDate
  • cContentTypeFilelist
  • cContentTypeHead
  • cContentTypeHtml
  • cContentTypeHtmlhead
  • cContentTypeImg
  • cContentTypeImgdescr
  • cContentTypeImgeditor
  • cContentTypeLink
  • cContentTypeLinkdescr
  • cContentTypeLinkeditor
  • cContentTypeLinktarget
  • cContentTypeRaw
  • cContentTypeTeaser
  • cContentTypeText
  • cTypeGenerator
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: 
  3: /**
  4:  * This file contains the abstract CONTENIDO code generator class.
  5:  *
  6:  * @package Core
  7:  * @subpackage ContentType
  8:  * @author Murat Purc <murat@purc.de>
  9:  * @copyright four for business AG <www.4fb.de>
 10:  * @license http://www.contenido.org/license/LIZENZ.txt
 11:  * @link http://www.4fb.de
 12:  * @link http://www.contenido.org
 13:  */
 14: 
 15: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 16: 
 17: /**
 18:  * Abstract CONTENIDO code generator class.
 19:  *
 20:  * @package Core
 21:  * @subpackage ContentType
 22:  */
 23: abstract class cCodeGeneratorAbstract {
 24: 
 25:     /**
 26:      * CONTENIDO database instance.
 27:      *
 28:      * @var cDb
 29:      */
 30:     protected $_db;
 31: 
 32:     /**
 33:      * Frontend debug options.
 34:      *
 35:      * @see $frontend_debug in __FRONTEND_PATH__/data/config/config.php
 36:      * @var array
 37:      */
 38:     protected $_feDebugOptions = array();
 39: 
 40:     /**
 41:      * Collected CSS data for current template.
 42:      *
 43:      * @var string
 44:      */
 45:     protected $_cssData = '';
 46: 
 47:     /**
 48:      * Collected JS data for current template.
 49:      *
 50:      * @var string
 51:      */
 52:     protected $_jsData = '';
 53: 
 54:     /**
 55:      * Template name.
 56:      *
 57:      * @var string
 58:      */
 59:     protected $_tplName = '';
 60: 
 61:     /**
 62:      * Category id.
 63:      *
 64:      * @var int
 65:      */
 66:     protected $_idcat;
 67: 
 68:     /**
 69:      * Article id.
 70:      *
 71:      * @var int
 72:      */
 73:     protected $_idart;
 74: 
 75:     /**
 76:      * Language id.
 77:      *
 78:      * @var int
 79:      */
 80:     protected $_lang;
 81: 
 82:     /**
 83:      * Client id.
 84:      *
 85:      * @var int
 86:      */
 87:     protected $_client;
 88: 
 89:     /**
 90:      * Flag to process layout.
 91:      *
 92:      * @var bool
 93:      */
 94:     protected $_layout;
 95: 
 96:     /**
 97:      * Flag to persist generated code.
 98:      *
 99:      * @var bool
100:      */
101:     protected $_save;
102: 
103:     /**
104:      * Article language id.
105:      *
106:      * @var int
107:      */
108:     protected $_idartlang;
109: 
110:     /**
111:      * Page title.
112:      * Usually from article language table.
113:      *
114:      * @var string
115:      */
116:     protected $_pageTitle;
117: 
118:     /**
119:      * Layout code.
120:      * Initially with container tags which will be replaced by module output.
121:      *
122:      * @var string
123:      */
124:     protected $_layoutCode = '';
125: 
126:     /**
127:      * Module output code prefix.
128:      *
129:      * @var array
130:      */
131:     protected $_modulePrefix = array();
132: 
133:     /**
134:      * Module output code.
135:      *
136:      * @var string
137:      */
138:     protected $_moduleCode = '';
139: 
140:     /**
141:      * Module output code suffix.
142:      *
143:      * @var array
144:      */
145:     protected $_moduleSuffix = array();
146: 
147:     /**
148:      * Article language.
149:      *
150:      * @var cApiArticleLanguage
151:      */
152:     protected $_oArtLang;
153: 
154:     /**
155:      * Constructor to create an instance of this class.
156:      */
157:     public function __construct() {
158:         $this->_db = cRegistry::getDb();
159:     }
160: 
161:     /**
162:      * Setter for frontend debug options.
163:      *
164:      * @see $frontend_debug in __FRONTEND_PATH__/data/config/config.php
165:      *         located in clients frontend directory
166:      * @param array $debugOptions
167:      */
168:     public function setFrontendDebugOptions(array $debugOptions) {
169:         $this->_feDebugOptions = $debugOptions;
170:     }
171: 
172:     /**
173:      * Generates the code for a specific article (article for a client
174:      * in a language).
175:      *
176:      * @param int      $idcat
177:      * @param int      $idart
178:      * @param int      $lang
179:      * @param int      $client
180:      * @param bool     $layout   [optional]
181:      *                           This params purpose is unclear.
182:      * @param bool     $save     [optional]
183:      *                           Flag to persist generated code.
184:      * @param bool     $contype  [optional]
185:      *                           Flag to enable/disable replacement of CMS_TAGS[].
186:      * @param bool     $editable [optional]
187:      * @param int|NULL $version  [optional]
188:      *
189:      * @return string
190:      *         Generated code or error code '0601' if no template
191:      *         configuration was found for category or article.
192:      *
193:      * @throws cDbException
194:      * @throws cException
195:      * @throws cInvalidArgumentException If an article with the given idart and idlang can not be loaded.
196:      */
197:     public function generate(
198:         $idcat, $idart, $lang, $client, $layout = false, $save = true,
199:         $contype = true, $editable = true, $version = NULL
200:     ) {
201: 
202:         $this->_idcat = (int) $idcat;
203:         $this->_idart = (int) $idart;
204:         $this->_lang = (int) $lang;
205:         $this->_client = (int) $client;
206:         $this->_layout = (bool) $layout;
207:         $this->_save = (bool) $save;
208: 
209:         $this->_oArtLang = new cApiArticleLanguage();
210:         $this->_oArtLang->loadByArticleAndLanguageId($this->_idart, $this->_lang);
211:         if (!$this->_oArtLang->isLoaded()) {
212:             throw new cInvalidArgumentException('Couldn\'t load article language for idart=' . $this->_idart . 'AND idlang=' . $this->_lang);
213:         }
214: 
215:         $this->_idartlang = $this->_oArtLang->get('idartlang');
216:         $this->_pageTitle = stripslashes($this->_oArtLang->get('pagetitle'));
217: 
218:         return $this->_generate($contype, $editable, $version);
219:     }
220: 
221:     /**
222:      * Generates the code for a specific article (article for a client in a
223:      * language).
224:      *
225:      * @param bool $contype [optional]
226:      *         Flag to enable/disable replacement of CMS_TAGS[].
227:      * @param bool $editable [optional]
228:      * @param bool $version [optional]
229:      * @return string
230:      *         The generated code.
231:      */
232:     abstract function _generate($contype = true, $editable = true, $version = NULL);
233: 
234:     /**
235:      * Returns the template configuration id, either by configured
236:      * article or by configured category.
237:      *
238:      * @return int|NULL
239:      *
240:      * @throws cInvalidArgumentException
241:      */
242:     protected function _getTemplateConfigurationId() {
243:         // get configuration for article
244:         $idtplcfg = conGetTemplateConfigurationIdForArticle($this->_idart, $this->_idcat, $this->_lang, $this->_client);
245:         if (is_numeric($idtplcfg) && $idtplcfg != 0) {
246:             // article is configured
247:             cDebug::out("configuration for article found: $idtplcfg<br><br>");
248:         } else {
249:             // check whether category is configured
250:             $idtplcfg = conGetTemplateConfigurationIdForCategory($this->_idcat, $this->_lang, $this->_client);
251:             if (NULL !== $idtplcfg) {
252:                 // category is configured
253:                 cDebug::out("configuration for category found: $idtplcfg<br><br>");
254:             }
255:         }
256: 
257:         return (is_numeric($idtplcfg)) ? $idtplcfg : NULL;
258:     }
259: 
260:     /**
261:      * Will be invoked, if code generation wasn't able to find a configured
262:      * article or category.
263:      *
264:      * @todo This method is not required as it is only used in the standard code generator.
265:      * @param int $idcatart
266:      *         Category article id.
267:      */
268:     abstract protected function _processNoConfigurationError($idcatart);
269: 
270:     /**
271:      * Returns array containing used layout, template and template name.
272:      *
273:      * @return array
274:      *         Assoziative array like
275:      *         array(
276:      *             'idlay' => (int),
277:      *             'idtpl' => (int),
278:      *             'name' => (string)
279:      *         )
280:      *
281:      * @throws cDbException
282:      * @throws cInvalidArgumentException
283:      *
284:      * @global array $cfg
285:      */
286:     protected function _getTemplateData() {
287:         global $cfg;
288: 
289:         // get IDLAY and IDMOD array
290:         $sql = "SELECT
291:                     a.idlay AS idlay
292:                     , a.idtpl AS idtpl
293:                     , a.name AS name
294:                 FROM
295:                     `%s` AS a
296:                     , `%s` AS b
297:                 WHERE
298:                     b.idtplcfg = %d
299:                     AND b.idtpl = a.idtpl
300:                 ;";
301: 
302:         $sql = $this->_db->prepare($sql, $cfg['tab']['tpl'], $cfg['tab']['tpl_conf'], $this->_idtplcfg);
303:         $this->_db->query($sql);
304:         $this->_db->nextRecord();
305:         $data = $this->_db->toArray();
306: 
307:         if ($this->_layout !== false) {
308:             $data['idlay'] = $this->_layout;
309:         }
310: 
311:         cDebug::out("Using Layout: $data[idlay] and Template: $data[idtpl] for generation of code.<br><br>");
312: 
313:         return $data;
314:     }
315: 
316:     /**
317:      * Processes replacements of all existing CMS_* tags within passed code.
318:      *
319:      * @param array $contentList
320:      *                            Associative list of CMS variables.
321:      * @param bool  $saveKeywords [optional]
322:      *                            Flag to save collected keywords during replacement process.
323:      * @param bool  $editable     [optional]
324:      *
325:      * @throws cDbException
326:      * @throws cException
327:      */
328:     protected function _processCmsTags($contentList, $saveKeywords = true, $editable = true) {
329:         // NOTE: Variables below are required in included/evaluated content type codes!
330:         global $db, $db2, $sess, $cfg, $code, $cfgClient, $encoding;
331: 
332:         // NOTE: Variables below are additionally required in included/evaluated
333:         // content type codes within backend edit mode!
334:         global $edit, $editLink, $belang;
335: 
336:         $idcat = $this->_idcat;
337:         $idart = $this->_idart;
338:         $lang = $this->_lang;
339:         $client = $this->_client;
340:         $idartlang = $this->_idartlang;
341: 
342:         if (!is_object($db2)) {
343:             $db2 = cRegistry::getDb();
344:         }
345:         // End: Variables required in content type codes
346: 
347:         $match = array();
348:         $keycode = array();
349: 
350:         // NOTE: $a_content is used by included/evaluated content type codes
351:         // below
352:         $a_content = $contentList;
353: 
354:         // select all cms_type entries
355:         $_typeList = array();
356:         $oTypeColl = new cApiTypeCollection();
357:         $oTypeColl->select();
358:         while (false !== ($oType = $oTypeColl->next())) {
359:             $_typeList[] = $oType->toObject();
360:         }
361: 
362:         // replace all CMS_TAGS[]
363:         foreach ($_typeList as $_typeItem) {
364:             $key = cString::toLowerCase($_typeItem->type);
365:             $type = $_typeItem->type;
366:             // find all CMS_{type}[{number}] values, e.g. CMS_HTML[1]
367:             // $tmp = preg_match_all('/(' . $type . ')\[+([a-z0-9_]+)+\]/i',
368:             // $this->_layoutCode, $match);
369:             $tmp = preg_match_all('/(' . $type . '\[+(\d)+\])/i', $this->_layoutCode, $match);
370: 
371:             $a_[$key] = $match[0];
372: 
373:             $success = array_walk($a_[$key], 'cString::extractNumber');
374: 
375:             $search = array();
376:             $replacements = array();
377: 
378:             $typeClassName = $this->_getContentTypeClassName($type);
379:             $typeCodeFile = $this->_getContentTypeCodeFilePathName($type);
380: 
381:             foreach ($a_[$key] as $val) {
382:                 if (class_exists($typeClassName)) {
383:                     // we have a class for the content type, use it
384:                     $tmp = !empty($a_content[$_typeItem->type][$val]) ? $a_content[$_typeItem->type][$val] : '';
385:                     /** @var cContentTypeAbstract $cTypeObject */
386:                     $cTypeObject = new $typeClassName($tmp, $val, $a_content);
387:                     global $edit;
388: 
389:                     if (cRegistry::isBackendEditMode()) {
390:                         //if ($editable) {
391:                             $tmp = $cTypeObject->generateEditCode();
392:                         //} else if ($typeClassName !== 'cContentTypeImgeditor') {
393:                         //    $tmp = $cTypeObject->generateViewCode();
394:                         //}
395:                     } else {
396:                         $tmp = $cTypeObject->generateViewCode();
397:                     }
398:                 } else if (cFileHandler::exists($typeCodeFile)) {
399:                     // include CMS type code file
400:                     include($typeCodeFile);
401:                 }
402: 
403:                 $search[$val] = sprintf('%s[%s]', $type, $val);
404:                 $replacements[$val] = $tmp;
405:                 $keycode[$type][$val] = $tmp;
406:             }
407:             $this->_layoutCode = str_ireplace($search, $replacements, $this->_layoutCode);
408:         }
409:     }
410: 
411:     /**
412:      * Processes and adds or replaces title tag for an article.
413:      */
414:     abstract protected function _processCodeTitleTag();
415: 
416:     /**
417:      * Processes and adds or replaces all meta tags for an article.
418:      */
419:     abstract protected function _processCodeMetaTags();
420: 
421:     /**
422:      * Replaces all container/module configuration tags (CMS_VALUE[n] values)
423:      * by their settings.
424:      *
425:      * @param int $containerNumber
426:      *         Container number
427:      * @param string $containerCfg
428:      *         A string being formatted like concatenated query
429:      *         parameter, e.g. param1=value1&param2=value2...
430:      * @return string
431:      *         Concatenated PHP code containing CMS_VALUE variables and their values
432:      */
433:     protected function _processCmsValueTags($containerNumber, $containerCfg) {
434:         $containerCfgList = array();
435: 
436:         $containerCfg = preg_replace('/(&\$)/', '', $containerCfg);
437:         parse_str($containerCfg, $containerCfgList);
438: 
439:         // $tmp1 = preg_split('/&/', $containerCfg);
440:         // foreach ($tmp1 as $key1 => $value1) {
441:         //     $tmp2 = explode('=', $value1);
442:         //     foreach ($tmp2 as $key2 => $value2) {
443:         //         $containerCfgList["$tmp2[0]"] = $tmp2[1];
444:         //     }
445:         // }
446: 
447:         $CiCMS_Var = '$C' . $containerNumber . 'CMS_VALUE';
448:         $CiCMS_Values = array();
449: 
450:         foreach ($containerCfgList as $key3 => $value3) {
451:             // convert special characters and escape backslashes!
452:             $tmp = conHtmlSpecialChars($value3);
453:             $tmp = str_replace('\\', '\\\\', $tmp);
454:             $CiCMS_Values[] = $CiCMS_Var . '[' . $key3 . '] = "' . $tmp . '"; ';
455:             $this->_moduleCode = str_replace("\$CMS_VALUE[$key3]", $tmp, $this->_moduleCode);
456:             $this->_moduleCode = str_replace("CMS_VALUE[$key3]", $tmp, $this->_moduleCode);
457:         }
458: 
459:         $this->_moduleCode = str_replace("CMS_VALUE", $CiCMS_Var, $this->_moduleCode);
460:         $this->_moduleCode = str_replace("\$" . $CiCMS_Var, $CiCMS_Var, $this->_moduleCode);
461:         $this->_moduleCode = preg_replace("/(CMS_VALUE\[)([0-9]*)(\])/i", '', $this->_moduleCode);
462: 
463:         return implode("\n", $CiCMS_Values);
464:     }
465: 
466:     /**
467:      * Extends container code by adding several debug features,
468:      * if enabled and configured.
469:      *
470:      * @param int   $containerNumber
471:      *         Container number (the id attribute in container tag).
472:      * @param array $module
473:      *         Recordset as assoziative array of related module (container code).
474:      *
475:      * @throws cDbException
476:      * @throws cInvalidArgumentException
477:      */
478:     protected function _processFrontendDebug($containerNumber, array $module) {
479:         global $containerinf;
480: 
481:         $data = $this->_getTemplateData();
482: 
483:         if (empty($this->_feDebugOptions)) {
484:             return;
485:         }
486: 
487:         $sFeDebug = '';
488:         if ($this->_feDebugOptions['container_display'] == true) {
489:             $this->_modulePrefix[] = 'if ($frontend_debug[\'container_display\']) echo "<!-- START CONTAINER ' . $containerinf[$data['idlay']][$containerNumber]['name'] . ' (' . $containerNumber . ') -->";';
490:         }
491: 
492:         if ($this->_feDebugOptions['module_display'] == true) {
493:             $this->_modulePrefix[] = 'if ($frontend_debug[\'module_display\']) echo "<!-- START MODULE ' . $module['name'] . ' (' . $module['idmod'] . ') -->";';
494:         }
495: 
496:         if ($this->_feDebugOptions['module_timing'] == true) {
497:             $this->_modulePrefix[] = '$modTime' . $containerNumber . ' = -getmicrotime(true);';
498:             $this->_moduleSuffix[] = '$modTime' . $containerNumber . ' += getmicrotime(true);';
499:         }
500: 
501:         if ($this->_feDebugOptions['module_display'] == true) {
502:             $this->_moduleSuffix[] = 'if ($frontend_debug[\'module_display\']) echo "<!-- END MODULE ' . $module['name'] . ' (' . $module['idmod'] . ')";';
503:             if ($this->_feDebugOptions['module_timing'] == true) {
504:                 $this->_moduleSuffix[] = 'if ($frontend_debug[\'module_timing\']) echo(" AFTER " . $modTime' . $containerNumber . ');';
505:             }
506:             $this->_moduleSuffix[] = 'if ($frontend_debug[\'module_display\']) echo " -->";';
507:         }
508:         if ($this->_feDebugOptions['container_display'] == true) {
509:             $this->_moduleSuffix[] = 'if ($frontend_debug[\'container_display\']) echo "<!-- END CONTAINER ' . $containerinf[$data['idlay']][$containerNumber]['name'] . ' (' . $containerNumber . ') -->";';
510:         }
511:     }
512: 
513:     /**
514:      * Replaces container tag in layout by the parsed container code
515:      * (module code).
516:      *
517:      * @param int $containerNumber
518:      *         Container number (the id attribute in container tag).
519:      */
520:     protected function _processCmsContainer($containerNumber) {
521:         $cmsContainer = "CMS_CONTAINER[$containerNumber]";
522: 
523:         // replace new container (<container id="n"..>) against old one
524:         // (CMS_CONTAINER[n])
525:         $this->_layoutCode = preg_replace("/<container( +)id=\\\"$containerNumber\\\"(.*)>(.*)<\/container>/Uis", $cmsContainer, $this->_layoutCode);
526:         $this->_layoutCode = preg_replace("/<container( +)id=\\\"$containerNumber\\\"(.*)\/>/i", $cmsContainer, $this->_layoutCode);
527: 
528:         // concatenate final container/module output code,
529:         // but generate PHP code only if there is something to generate
530:         $modulePrefix = trim(implode("\n", $this->_modulePrefix));
531:         if (!empty($modulePrefix)) {
532:             $modulePrefix = "<?php\n" . $modulePrefix . "\n?>";
533:         }
534:         $moduleSuffix = trim(implode("\n", $this->_moduleSuffix));
535:         if (!empty($moduleSuffix)) {
536:             $moduleSuffix = "<?php\n" . $moduleSuffix . "\n?>";
537:         }
538:         $moduleOutput = $modulePrefix . $this->_moduleCode . $moduleSuffix;
539: 
540:         // replace container (CMS_CONTAINER[n]) against the container code
541:         $this->_layoutCode = str_ireplace($cmsContainer, $moduleOutput, $this->_layoutCode);
542:         // $this->_layoutCode = addslashes($this->_layoutCode);
543:     }
544: 
545:     /**
546:      * Returns array of all CMS_* vars being used by current article and language
547:      *
548:      * @param bool     $editable [optional]
549:      * @param int|NULL $version  [optional]
550:      *
551:      * @return array
552:      *         like $arr[type][typeid] = value;
553:      *
554:      * @throws cDbException
555:      */
556:     protected function _getUsedCmsTypesData($editable = true, $version = NULL) {
557:         global $cfg;
558: 
559:         $return = array();
560: 
561:         // find out what kind of CMS_... vars are in use
562:         if ($version == NULL) {
563:             $sql = "SELECT * FROM `%s` AS A, `%s` AS B, `%s` AS C
564:                     WHERE A.idtype = C.idtype AND A.idartlang = B.idartlang AND B.idart = %d AND B.idlang = %d";
565:             $sql = $this->_db->prepare(
566:                     $sql,
567:                     $cfg['tab']['content'],
568:                     $cfg['tab']['art_lang'],
569:                     $cfg['tab']['type'],
570:                     $this->_idart,
571:                     $this->_lang
572:             );
573:         } else if (is_numeric($version)) {
574:             $sql = 'SELECT b.type as type, a.typeid as typeid, a.value as value
575:                     FROM `%s` AS a
576:                     INNER JOIN `%s` as b
577:                             ON b.idtype = a.idtype
578:                     WHERE (a.idtype, a.typeid, a.version) IN
579:                             (SELECT idtype, typeid, max(version)
580:                             FROM %s
581:                             WHERE idartlang = %d AND version <= %d
582:                             GROUP BY idtype, typeid)
583:                     AND a.idartlang = %d
584:                     AND (a.deleted < 1 OR a.deleted IS NULL)
585:                     ORDER BY a.idtype, a.typeid;';
586:             $sql = $this->_db->prepare(
587:                     $sql,
588:                     $cfg['tab']['content_version'],
589:                     $cfg['tab']['type'],
590:                     $cfg['tab']['content_version'],
591:                     $this->_idartlang,
592:                     $version,
593:                     $this->_idartlang
594:             );
595:         }
596: 
597:         $this->_db->query($sql);
598:         while ($this->_db->nextRecord()) {
599:             $return[$this->_db->f('type')][$this->_db->f('typeid')] = $this->_db->f('value');
600:         }
601: 
602:         return $return;
603:     }
604: 
605:     /**
606:      * Resets module related variables.
607:      */
608:     protected function _resetModule() {
609:         $this->_modulePrefix = array();
610:         $this->_moduleCode = '';
611:         $this->_moduleSuffix = array();
612:     }
613: 
614:     /**
615:      * Returns the classname for a content type.
616:      *
617:      * @param string $type
618:      *         Content type, e.g. CMS_HTMLHEAD.
619:      * @return string
620:      *         The classname e.g. cContentTypeHtmlhead for content type CMS_HTMLHEAD.
621:      */
622:     protected function _getContentTypeClassName($type) {
623:         $typeClassName = 'cContentType' . ucfirst(cString::toLowerCase(str_replace('CMS_', '', $type)));
624: 
625:         return $typeClassName;
626:     }
627: 
628:     /**
629:      * Returns the full path to the include file name of a content type.
630:      *
631:      * @param string $type
632:      *         Content type, e.g. CMS_HTMLHEAD
633:      * @return string
634:      *         The full path e.g.
635:      *         {path_to_contenido_includes}/type/code/include.CMS_HTMLHEAD.code.php
636:      *         for content type CMS_HTMLHEAD
637:      */
638:     protected function _getContentTypeCodeFilePathName($type) {
639:         global $cfg;
640:         $typeCodeFile = cRegistry::getBackendPath() . $cfg['path']['includes'] . 'type/code/include.' . $type . '.code.php';
641: 
642:         return $typeCodeFile;
643:     }
644: 
645:     /**
646:      * Getter for article language.
647:      *
648:      * @todo deprecate me
649:      * @return cApiArticleLanguage
650:      *         The aggregated article language object.
651:      */
652:     protected function getArtLangObject() {
653:         return $this->_oArtLang;
654:     }
655: }
656: 
CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0