1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
15:
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17:
18: 19: 20: 21: 22: 23:
24: abstract class cContentTypeAbstractTabbed extends cContentTypeAbstract {
25:
26: 27: 28: 29: 30: 31:
32: protected function _generateTabMenuCode(array $tabs) {
33: $template = new cTemplate();
34:
35:
36: foreach ($tabs as $id => $name) {
37: $template->set('d', 'TAB_ID', $id);
38: $template->set('d', 'TAB_NAME', $name);
39: $template->next();
40: }
41: $code = $template->generate($this->_cfg['path']['contenido'] . 'templates/standard/template.cms_abstract_tabbed_edit_tab_menu.html', true);
42:
43: return $this->_encodeForOutput($code);
44: }
45:
46: 47: 48: 49: 50: 51: 52: 53:
54: protected function _getRawSettings($contentTypeName, $id, array $contentTypes) {
55: if (!isset($contentTypes[$contentTypeName][$id])) {
56: $idArtLang = cRegistry::getArticleLanguageId();
57:
58: $typeItem = new cApiType();
59: $typeItem->loadByType($contentTypeName);
60: $idtype = $typeItem->get('idtype');
61:
62:
63: $content = new cApiContent();
64: $content->loadByMany(array(
65: 'idartlang' => $idArtLang,
66: 'idtype' => $idtype,
67: 'typeid' => $id
68: ));
69: return $content->get('value');
70: } else {
71: return $contentTypes[$contentTypeName][$id];
72: }
73: }
74:
75: 76: 77: 78: 79:
80: protected function _generateActionCode() {
81: $template = new cTemplate();
82:
83: $code = $template->generate($this->_cfg['path']['contenido'] . 'templates/standard/template.cms_abstract_tabbed_edit_action.html', true);
84:
85: return $this->_encodeForOutput($code);
86: }
87:
88: }