function addTitlle($Category, $Id, $Lang) { require_once 'classes/model/Content.php'; $content = new Content(); $value = $content->load($Category, '', $Id, $Lang); return $value; }
/** * load blog post data in the object * @access public */ public function load($content_id) { Logger::log("Enter: BlogPost::load | Arg: \$content_id = {$content_id}"); Logger::log("Calling: Content::load | Param: \$content_id = {$content_id}"); parent::load($content_id); Logger::log("Exit: BlogPost::load"); return; }
/** * @return string */ public function getPermissionName() { if ($this->getPerUid() == '') { throw new Exception("Error in getPerName, the PER_UID can't be blank"); } $lang = defined('SYS_LANG') ? SYS_LANG : 'en'; $this->permission_name = Content::load('PER_NAME', '', $this->getPerUid(), $lang); return $this->permission_name; }
/** * Get the [grp_title] column value. * * @return string */ public function getGrpTitle() { if ($this->getGrpUid() == '') { throw new Exception("Error in getGrpTitle, the GRP_UID can't be blank"); } $lang = defined('SYS_LANG') ? SYS_LANG : 'en'; $this->grp_title = Content::load('GRP_TITLE', '', $this->getGrpUid(), $lang); return $this->grp_title; }
/** * Get the evn_description column value. * @return string */ public function getEvnDescription() { if ($this->getEvnUid() == "") { throw new Exception("Error in getEvnDescription, the getEvnUid() can't be blank"); } $lang = defined('SYS_LANG') ? SYS_LANG : 'en'; $this->evn_description = Content::load('EVN_DESCRIPTION', '', $this->getEvnUid(), $lang); return $this->evn_description; }
/** * Get the rep_tab_title column value. * @return string */ public function getRepTabTitle() { if ($this->getRepTabUid() == "") { throw new Exception("Error in getRepTabTitle, the getRepTabUid() can't be blank"); } $lang = defined('SYS_LANG') ? SYS_LANG : 'en'; $this->rep_tab_title = Content::load('REP_TAB_TITLE', '', $this->getRepTabUid(), $lang); return $this->rep_tab_title; }
/** * Get the stg_title column value. * @return string */ public function getStgTitle() { if ($this->getStgUid() == "") { throw new Exception("Error in getStgTitle, the getStgUid() can't be blank"); } $lang = defined('SYS_LANG') ? SYS_LANG : 'en'; $this->stg_title = Content::load('STG_TITLE', '', $this->getStgUid(), $lang); return $this->stg_title; }
/** * Get Notes List * * @param int $httpData->start * @param int $httpData->limit * @param string $httpData->appUid (optionalif it is not passed try use $_SESSION['APPLICATION']) * @return array containg the case notes */ function getNotesList($httpData) { if (!isset($_SESSION['USER_LOGGED'])) { $response = new stdclass(); $response->message = G::LoadTranslation('ID_LOGIN_AGAIN'); $response->lostSession = true; print G::json_encode($response); die; } $appUid = null; if (isset($httpData->appUid) && trim($httpData->appUid) != "") { $appUid = $httpData->appUid; } else { if (isset($_SESSION['APPLICATION'])) { $appUid = $_SESSION['APPLICATION']; } } G::LoadClass('case'); $case = new Cases(); $caseLoad = ''; if (!isset($_SESSION['PROCESS']) && !isset($httpData->pro)) { $caseLoad = $case->loadCase($appUid); $httpData->pro = $caseLoad['PRO_UID']; } if (!isset($httpData->pro) || empty($httpData->pro)) { $proUid = $_SESSION['PROCESS']; } else { $proUid = $httpData->pro; } if (!isset($httpData->tas) || empty($httpData->tas)) { $tasUid = $_SESSION['TASK']; } else { $tasUid = $httpData->tas; } //$proUid = (!isset($httpData->pro)) ? $_SESSION['PROCESS'] : $httpData->pro; //$tasUid = (!isset($httpData->tas)) ? ((isset($_SESSION['TASK'])) ? $_SESSION['TASK'] : '') : $httpData->tas; $usrUid = $_SESSION['USER_LOGGED']; $respView = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, 'VIEW'); $respBlock = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, 'BLOCK'); if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) { return array('totalCount' => 0, 'notes' => array(), 'noPerms' => 1); } //require_once ("classes/model/AppNotes.php"); if (!isset($appUid)) { throw new Exception(G::LoadTranslation('ID_RESOLVE_APPLICATION_ID')); } $usrUid = isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : ""; $appNotes = new AppNotes(); $response = $appNotes->getNotesList($appUid, '', $httpData->start, $httpData->limit); require_once "classes/model/Content.php"; $content = new Content(); $response['array']['appTitle'] = $content->load('APP_TITLE', '', $appUid, SYS_LANG); return $response['array']; }
/** * load Video data in the object * @access public * @param content id of the Video. * @param $user_id user id of the person who is accessing data * @param $my_user_id user id of the person whose data is loading */ public function load($content_id, $user_id = 0, $my_user_id = 0) { Logger::log("Enter: Video::load | Arg: \$content_id = {$content_id}"); Logger::log("Calling: Content::load | Param: \$content_id = {$content_id}"); parent::load($content_id); $sql = "SELECT * FROM {videos} WHERE content_id = {$this->content_id}"; $res = Dal::query($sql); if ($res->numRows() > 0) { $row = $res->fetchRow(DB_FETCHMODE_OBJECT); if ($my_user_id != 0) { // getting degree 1 friendlist $relations = Relation::get_relations($user_id, APPROVED, PA::$network_info->network_id); if ($user_id == $my_user_id) { $this->video_file = $row->video_file; $this->file_name = $row->video_file; $this->file_perm = $row->video_perm; } elseif (in_array($my_user_id, $relations)) { if ($row->video_perm == WITH_IN_DEGREE_1 || $row->video_perm == ANYONE) { $this->video_file = $row->video_file; $this->file_name = $row->video_file; $this->file_perm = $row->video_perm; } } elseif ($my_user_id == 0) { if ($row->video_perm == WITH_IN_DEGREE_1 || $row->video_perm == ANYONE) { $this->video_file = $row->video_file; $this->file_name = $row->video_file; $this->file_perm = $row->video_perm; } } else { if ($row->video_perm == ANYONE) { $this->video_file = $row->video_file; $this->file_name = $row->video_file; $this->file_perm = $row->video_perm; } } } else { if ($user_id == $my_user_id) { $this->video_file = $row->video_file; $this->file_name = $row->video_file; $this->file_perm = $row->video_perm; } else { if ($row->video_perm == ANYONE) { $this->video_file = $row->video_file; $this->file_name = $row->video_file; $this->file_perm = $row->video_perm; } } } } Logger::log("Exit: Video::load"); return; }
/** * load Announcement data in the object * @access public * @param content id of the Announcement. */ public function load($content_id) { Logger::log(" Enter: Announcement::load | Arg: \$content_id = {$content_id}"); Logger::log(" Calling: Content::load | Param: \$content_id = {$content_id}"); parent::load($content_id); $sql = "SELECT * FROM {announcements} WHERE content_id = {$this->content_id}"; $res = Dal::query($sql); if ($res->numRows() > 0) { $row = $res->fetchRow(DB_FETCHMODE_OBJECT); $this->announcement_time = $row->announcement_time; $this->position = $row->position; $this->status = $row->status; } Logger::log("Exit: Announcement::load"); return; }
/** * Class constructor * Creates the page and the registration form */ function __construct() { parent::__construct(); // creates the form $this->form = new TQuickForm('form_Content'); $this->form->class = 'tform'; $this->form->style = 'width: 640px'; $this->form->setFormTitle(_t('Content')); // defines the database parent::setDatabase('blog'); // defines the active record parent::setActiveRecord('Content'); // create the form fields $id = new TEntry('id'); $title = new TEntry('title'); $subtitle = new TText('subtitle'); $sidepanel = new THtmlEditor('sidepanel'); $id->setEditable(FALSE); // add the fields $this->form->addQuickField('ID', $id, 100); $this->form->addQuickField(_t('Title'), $title, 500); $this->form->addQuickField(_t('Subtitle'), $subtitle, 400); $row = $this->form->getContainer()->addRow(); $row->addCell($lbl = new TLabel(_t('Side panel'))); $lbl->setFontStyle('b'); $sidepanel->style = 'margin: 10px'; $row = $this->form->getContainer()->addRow(); $row->addCell($sidepanel)->colspan = 2; $this->form->addField($sidepanel); $subtitle->setSize(500, 40); $sidepanel->setSize(590, 200); // define the form action $this->form->addQuickAction(_t('Save'), new TAction(array($this, 'onSave')), 'ico_save.png'); TTransaction::open('blog'); $content = new Content(); if ($content->load(1)) { $this->onEdit(array('key' => 1)); } TTransaction::close(); // add the form to the page parent::add($this->form); }
function LoadContent($data, $fields) { $obj = new Content(); $ConCategory = $fields['CON_CATEGORY']; $ConParent = $fields['CON_PARENT']; $ConId = $fields['CON_ID']; $ConLang = $fields['CON_LANG']; $ConValue = $fields['CON_VALUE']; try { $res = $obj->load($ConCategory, $ConParent, $ConId, $ConLang); if ($res == '') { $this->testLime->is($res, '', 'Load Empty Content '); } else { $this->testLime->is($ConValue, $ConValue, 'correct value from Content->Load '); } } catch (Exception $e) { return $e; } return $res; }
/** * load sb content in the object * @access public */ public function load($content_id) { Logger::log("Enter: SBMicroContent::load | Arg: \$content_id = {$content_id}"); Logger::log("Calling: Content::load | Param: \$content_id = {$content_id}"); parent::load($content_id); $sql = "SELECT SB.sbtype_id,SB.name FROM {sbmicrocontent_types} AS SB,{contents_sbmicrocontents} AS MC WHERE MC.content_id = ? AND MC.microcontent_id = SB.sbtype_id"; $data = array($content_id); $res = Dal::query($sql, $data); if (PEAR::isError($res)) { Logger::log(" Throwing exception DB_QUERY_FAILED | Message: {$res->getMessage}()", LOGGER_ERROR); throw new PAException(DB_QUERY_FAILED, $res->getMessage()); } if ($res->numRows()) { $row = $res->fetchRow(DB_FETCHMODE_OBJECT); $this->sbtype_id = $row->sbtype_id; $this->sbname = stripslashes($row->name); } Logger::log("Exit: SBMicrocontent::load"); return; }
function regenerateContent($langId) { $oCriteria = new Criteria('workflow'); $oCriteria->addSelectColumn(ContentPeer::CON_CATEGORY); $oCriteria->addSelectColumn(ContentPeer::CON_ID); $oCriteria->addSelectColumn(ContentPeer::CON_VALUE); $oCriteria->add(ContentPeer::CON_LANG, 'en'); $oCriteria->add(ContentPeer::CON_VALUE, '', Criteria::NOT_EQUAL); $oDataset = ContentPeer::doSelectRS($oCriteria); $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); $oDataset->next(); $oContent = new Content(); while ($aRow = $oDataset->getRow()) { $oContent->load($aRow['CON_CATEGORY'], '', $aRow['CON_ID'], $langId); $oDataset->next(); } }
/** This function get all the video for a network if we pass cat_id for that than it return all the video for that category */ public function load($cid) { Logger::log("Enter: TekVideo::load()"); if (!isset($cid)) { $cid = NULL; } $sql = 'SELECT * FROM {media_videos} WHERE content_id = ?'; $res = Dal::query($sql, $cid); $result_array = array(); if ($res->numRows()) { while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { if (!empty($row->video_id)) { $this->verify_status($row->video_id, $row->content_id, $row->status); } $this->video_id = $row->video_id; $this->status = $row->status; $this->external_thumbnail = $row->external_thumbnail; $this->internal_thumbnail = $row->internal_thumbnail; $this->views = $row->views; /* $this->embed_tag = get_embed_tag($row->video_id);*/ $this->view_url = $row->view_url; $this->duration = $row->duration; $this->category_id = $row->category_id; $this->content_id = $row->content_id; $this->author_id = $row->author_id; $this->video_perm = $row->video_perm; $this->file_perm = $row->video_perm; parent::load($row->content_id); $result_array[] = $row; } } Logger::log("Exit: TekVideo::load()"); return $result_array; }
/** * Get the [inp_doc_comment] column value. * @return string */ public function getInpDocDescription() { if ($this->inp_doc_description == '') { try { $this->inp_doc_description = Content::load('INP_DOC_DESCRIPTION', '', $this->getInpDocUid(), defined('SYS_LANG') ? SYS_LANG : 'en'); } catch (Exception $oError) { throw $oError; } } return $this->inp_doc_description; }
/** * Get the [out_doc_template] column value. * @return string */ public function getOutDocTemplate() { if ($this->out_doc_template == '') { try { $this->out_doc_template = Content::load('OUT_DOC_TEMPLATE', '', $this->getOutDocUid(), defined('SYS_LANG') ? SYS_LANG : 'en'); } catch (Exception $oError) { throw $oError; } } return $this->out_doc_template; }
public function getTriggerNames($triggers) { $triggers_info = Array(); $aTriggers = array(); foreach ($triggers as $key => $val) { $aTriggers[] = $val['TRI_UID']; } $lang = defined('SYS_LANG') ? SYS_LANG : 'en'; $c = new Criteria(); $c->clearSelectColumns(); $c->addSelectColumn(ContentPeer::CON_ID); $c->addSelectColumn(ContentPeer::CON_VALUE); $c->add(ContentPeer::CON_ID, $aTriggers, Criteria::IN); $c->add(ContentPeer::CON_CATEGORY, 'TRI_TITLE'); $c->add(ContentPeer::CON_LANG, $lang); $rs = TriggersPeer::doSelectRS($c); $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC); $rs->next(); $row = $rs->getRow(); while (is_array($row)) { $info[$row['CON_ID']] = ($row['CON_VALUE'] != '' ? $row['CON_VALUE'] : '-'); $rs->next(); $row = $rs->getRow(); } foreach ($triggers as $key => $val) { if (isset($info[$val['TRI_UID']])) { $triggers_info[] = $info[$val['TRI_UID']]; } else { $triggers_info[] = Content::load('TRI_TITLE', '', $val['TRI_UID'], $lang); } } return $triggers_info; }
/** * Get data of a DynaForm from a record * * @param array $record Record * * return array Return an array with data DynaForm */ public function getDynaFormDataFromRecord($record) { try { if ($record["DYN_TITLE"] . "" == "") { //There is no transaltion for this Document name, try to get/regenerate the label $record["DYN_TITLE"] = \Content::load("DYN_TITLE", "", $record["DYN_UID"], SYS_LANG); } if ($record["DYN_DESCRIPTION"] . "" == "") { //There is no transaltion for this Document name, try to get/regenerate the label $record["DYN_DESCRIPTION"] = \Content::load("DYN_DESCRIPTION", "", $record["DYN_UID"], SYS_LANG); } if ($record["DYN_VERSION"] == 0) { $record["DYN_VERSION"] = 1; } return array( $this->getFieldNameByFormatFieldName("DYN_UID") => $record["DYN_UID"], $this->getFieldNameByFormatFieldName("DYN_TITLE") => $record["DYN_TITLE"], $this->getFieldNameByFormatFieldName("DYN_DESCRIPTION") => $record["DYN_DESCRIPTION"] . "", $this->getFieldNameByFormatFieldName("DYN_TYPE") => $record["DYN_TYPE"] . "", $this->getFieldNameByFormatFieldName("DYN_CONTENT") => $record["DYN_CONTENT"] . "", $this->getFieldNameByFormatFieldName("DYN_VERSION") => (int)($record["DYN_VERSION"]) ); } catch (\Exception $e) { throw $e; } }
/** * Get the tas_def_message column value. * @return string */ public function getTasDefSubjectMessage() { if ($this->getTasUid() == "") { throw new Exception("Error in getTasDefSubjectMessage, the getTasUid() can't be blank"); } $lang = defined('SYS_LANG') ? SYS_LANG : 'en'; $this->tas_def_subject_message = Content::load('TAS_DEF_SUBJECT_MESSAGE', '', $this->getTasUid(), $lang); return $this->tas_def_subject_message; }
public function load($cid) { parent::load($cid); // the content part $this->load_by_event_id(Event::get_eid_from_cid($cid)); // the event part }
/** * editObjectPermission * * @param string $sOP_UID * @param string $sProcessUID * @return void */ public function editExtObjectPermission($sProcessUID, $sOP_UID) { $oCriteria = new Criteria(); $oCriteria->add(ObjectPermissionPeer::OP_UID, $sOP_UID); $oDataset = ObjectPermissionPeer::doSelectRS($oCriteria); $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); $oDataset->next(); $aRows = $oDataset->getRow(); $oCriteria = new Criteria(); $oCriteria->add(GroupwfPeer::GRP_UID, $aRows['USR_UID']); if (GroupwfPeer::doCount($oCriteria) == 1) { $user = '******' . $aRows['USR_UID']; } $oCriteria = new Criteria(); $oCriteria->add(UsersPeer::USR_UID, $aRows['USR_UID']); if (UsersPeer::doCount($oCriteria) == 1) { $user = '******' . $aRows['USR_UID']; } $aFields['LANG'] = SYS_LANG; $aFields['OP_UID'] = $aRows['OP_UID']; $aFields['PRO_UID'] = $aRows['PRO_UID']; $aFields['OP_CASE_STATUS'] = $aRows['OP_CASE_STATUS']; $aFields['TAS_UID'] = $aRows['TAS_UID']; $aFields['OP_GROUP_USER'] = $user; $aFields['OP_TASK_SOURCE'] = $aRows['OP_TASK_SOURCE']; $aFields['OP_PARTICIPATE'] = $aRows['OP_PARTICIPATE']; $aFields['OP_OBJ_TYPE'] = $aRows['OP_OBJ_TYPE']; $aFields['OP_ACTION'] = $aRows['OP_ACTION']; $lang = defined('SYS_LANG') ? SYS_LANG : 'en'; $aFields['TASK_TARGET_NAME'] = Content::load('TAS_TITLE', '', $aRows['TAS_UID'], $lang); $aFields['TASK_SOURCE_NAME'] = Content::load('TAS_TITLE', '', $aRows['OP_TASK_SOURCE'], $lang); $oUser = UsersPeer::retrieveByPK($aRows['USR_UID']); if (!is_null($oUser)) { $aFields['USR_FULLNAME'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname(); } else { throw new Exception("The row '" . $aRows['USR_UID'] . "' in table USER doesn't exist!"); } switch ($aRows['OP_OBJ_TYPE']) { /* case 'ANY': $aFields['OP_OBJ_TYPE'] = ''; break; */ case 'DYNAFORM': $aFields['DYNAFORM'] = $aRows['OP_OBJ_UID']; $aFields['DYNAFORM_NAME'] = Content::load('DYN_TITLE', '', $aRows['OP_OBJ_UID'], $lang); break; case 'INPUT': $aFields['INPUT'] = $aRows['OP_OBJ_UID']; $aFields['INPUT_NAME'] = Content::load('INP_DOC_TITLE', '', $aRows['OP_OBJ_UID'], $lang); break; case 'OUTPUT': $aFields['OUTPUT'] = $aRows['OP_OBJ_UID']; $aFields['OUTPUT_NAME'] = Content::load('OUT_DOC_TITLE', '', $aRows['OP_OBJ_UID'], $lang); break; } return $aFields; }
public function getRolName() { if ($this->getRolUid() == '') { throw new Exception("Error in getRolName, the ROL_UID can't be blank"); } $lang = defined('SYS_LANG') ? SYS_LANG : 'en'; $this->rol_name = Content::load('ROL_NAME', '', $this->getRolUid(), $lang); return $this->rol_name; }
$layout->loadPopular(); $layout->loadUnpublished(); // Print layout $app->response()->body((string) $layout); }); /* * Save content edition */ $app->post('/edit/:alias', function ($alias) use($app) { // redirect if not logged if (BootWiki::getLoggedAccount() == null) { $app->redirect(BASEURL); } // load content to edit $content = new Content(); $content->load($alias, TRUE); $content->savePost($_POST['content'], $_FILES['upload_image']); // Load form $form = new ContentForm(); $form->edit($content); // Load layout $layout = new Layout($form); $layout->loadRecent(); $layout->loadPopular(); $layout->loadUnpublished(); // Print layout $app->response()->body((string) $layout); }); /* * Display login form */
/** * Get the [app_doc_filename] column value. * * @return string */ public function getAppDocFilename () { if ($this->app_doc_filename == '') { try { $this->app_doc_filename = Content::load( 'APP_DOC_FILENAME', $this->getDocVersion(), $this->getAppDocUid(), (defined( 'SYS_LANG' ) ? SYS_LANG : 'en') ); if ($this->app_doc_filename == "") { $this->app_doc_filename = Content::load( 'APP_DOC_FILENAME', '', $this->getAppDocUid(), (defined( 'SYS_LANG' ) ? SYS_LANG : 'en') ); //For backward compatibility } } catch (Exception $oError) { throw ($oError); } } return $this->app_doc_filename; }
/** * Get the [Pro_description] column value. * * @return string */ public function getProDescription () { if ($this->getProUid() == '') { throw (new Exception( "Error in getProDescription, the PRO_UID can't be blank" )); } $lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en'; $this->pro_description = Content::load( 'PRO_DESCRIPTION', '', $this->getProUid(), $lang ); return $this->pro_description; }
function getGrpUser ($aData) { G::LoadClass( 'groups' ); G::LoadClass( 'tasks' ); require_once 'classes/model/Content.php'; $oTasks = new Tasks(); $oGroups = new Groups(); $oContent = new Content(); $aGroup = array (); $aUsers = array (); $aGroup = $oTasks->getGroupsOfTask( $aData['ROU_NEXT_TASK'], 1 ); $aGrpUid = $aGroup[0]['GRP_UID']; $sGrpName = $oContent->load( 'GRP_TITLE', '', $aGrpUid, 'en' ); $aGrp['GRP_NAME'] = $sGrpName; $aGrp['GRP_UID'] = $aGrpUid; $aUsers = $oGroups->getUsersOfGroup( $aGroup[0]['GRP_UID'] ); foreach ($aUsers as $aKey => $userid) { $aData[$aKey] = $userid; } return $aGrp; }
$Fields['APP_CUR_USER'] = $appFields['APP_CUR_USER']; $Fields['APP_DATA'] = $appFields['APP_DATA']; $Fields['CREATOR'] = $appFields['CREATOR']; $Fields['APP_PIN'] = $appFields['APP_PIN']; $Fields['APP_PROC_CODE'] = $appFields['APP_PROC_CODE']; $Fields['PRO_TITLE'] = Content::load('PRO_TITLE', '', $appFields['PRO_UID'], SYS_LANG); $oUser = new Users(); $oUser->load($appFields['APP_CUR_USER']); $Fields['CUR_USER'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname(); $threads = $oCase->GetAllThreads($appFields['APP_UID']); $Fields['THREADS'] = $threads; $Fields['CANT_THREADS'] = count($threads); $Fields['CANT_APP_DATA'] = count($Fields['APP_DATA']); $delegations = $oCase->GetAllDelegations($appFields['APP_UID']); foreach ($delegations as $key => $val) { $delegations[$key]['TAS_TITLE'] = Content::load('TAS_TITLE', '', $val['TAS_UID'], SYS_LANG); if ($val['USR_UID'] != -1) { $oUser->load($val['USR_UID']); $delegations[$key]['USR_NAME'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname(); } else { $delegations[$key]['USR_NAME'] = G::LoadTranslation('ID_UNKNOW_USER') . G::LoadTranslation('ID_SUBPROCESS_USER'); } } $Fields['CANT_DELEGATIONS'] = count($delegations); $Fields['DELEGATIONS'] = $delegations; require_once 'classes/model/AppDelay.php'; $oCriteria = new Criteria('workflow'); $oCriteria->addSelectColumn(AppDelayPeer::APP_THREAD_INDEX); $oCriteria->addSelectColumn(AppDelayPeer::APP_DEL_INDEX); $oCriteria->addSelectColumn(AppDelayPeer::APP_TYPE); $oCriteria->addSelectColumn(AppDelayPeer::APP_STATUS);
/** * Get the [Dyn_description] column value. * * @return string */ public function getDynDescription() { if ($this->getDynUid() == '') { throw new Exception("Error in getDynDescription, the DYN_UID can't be blank"); } $lang = defined('SYS_LANG') ? SYS_LANG : 'en'; $this->dyn_description = Content::load('DYN_DESCRIPTION', '', $this->getDynUid(), $lang); return $this->dyn_description; }
/** * Get data of a DynaForm from a record * * @param array $record Record * * return array Return an array with data DynaForm */ public function getDynaFormDataFromRecord($record) { try { if ($record["DYN_TITLE"] . "" == "") { //There is no transaltion for this Document name, try to get/regenerate the label $record["DYN_TITLE"] = \Content::load("DYN_TITLE", "", $record["DYN_UID"], SYS_LANG); } if ($record["DYN_DESCRIPTION"] . "" == "") { //There is no transaltion for this Document name, try to get/regenerate the label $record["DYN_DESCRIPTION"] = \Content::load("DYN_DESCRIPTION", "", $record["DYN_UID"], SYS_LANG); } if ($record["DYN_VERSION"] == 0) { $record["DYN_VERSION"] = 1; } $record["DYN_CONTENT"] = preg_replace("/\\\\u([a-f0-9]{4})/e", "iconv('UCS-4LE','UTF-8',pack('V', hexdec('U\$1')))", $record["DYN_CONTENT"]); return array($this->getFieldNameByFormatFieldName("DYN_UID") => $record["DYN_UID"], $this->getFieldNameByFormatFieldName("DYN_TITLE") => $record["DYN_TITLE"], $this->getFieldNameByFormatFieldName("DYN_DESCRIPTION") => $record["DYN_DESCRIPTION"] . "", $this->getFieldNameByFormatFieldName("DYN_TYPE") => $record["DYN_TYPE"] . "", $this->getFieldNameByFormatFieldName("DYN_CONTENT") => $record["DYN_CONTENT"] . "", $this->getFieldNameByFormatFieldName("DYN_VERSION") => (int) $record["DYN_VERSION"], $this->getFieldNameByFormatFieldName("DYN_UPDATE_DATE") => $record["DYN_UPDATE_DATE"]); } catch (\Exception $e) { throw $e; } }