/** * @param xPDOObject|quipCommentNotify $object * @return boolean */ public function prepareRow(xPDOObject $object) { $notifyArray = $object->toArray(); $notifyArray['cls'] = ''; $notifyArray['createdon'] = !empty($notifyArray['createdon']) ? strftime('%b %d, %Y %H:%M %p', strtotime($notifyArray['createdon'])) : ''; return $notifyArray; }
public function prepareRow(xPDOObject $object) { $ff = $object->toArray(); $ff['encrypted'] = $this->modx->getCount($this->classKey, array('form' => $ff['form'], 'encrypted' => 1)); $ff['total'] = $this->modx->getCount($this->classKey, array('form' => $ff['form'])); return $ff; }
public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); $objectArray['sender_name'] = $object->get('sender_username'); $objectArray['read'] = $object->get('read') ? true : false; return $objectArray; }
/** * @param xPDOObject $object * @return array */ public function prepareRow(xPDOObject $object) { $array = $object->toArray(); $array['actions'] = array(); if (!($user = $this->modx->getObject('modUser', $array['user_id']))) { return $this->failure($this->modx->lexicon('identifyx_user_err_nf') . ' №' . $id); } $blocked = $user->Profile->get('blocked'); if ($blocked) { $array['actions'][] = array('cls' => '', 'icon' => 'icon icon-power-off action-green', 'title' => $this->modx->lexicon('identifyx_user_enable'), 'multiple' => $this->modx->lexicon('identifyx_users_enable'), 'action' => 'unblockUser', 'button' => true, 'menu' => true); } else { $array['actions'][] = array('cls' => '', 'icon' => 'icon icon-power-off action-gray', 'title' => $this->modx->lexicon('identifyx_user_disable'), 'multiple' => $this->modx->lexicon('identifyx_users_disable'), 'action' => 'blockUser', 'button' => true, 'menu' => true); } // // Edit // $array['actions'][] = array( // 'cls' => '', // 'icon' => 'icon icon-edit', // 'title' => $this->modx->lexicon('identifyx_item_update'), // 'multiple' => $this->modx->lexicon('identifyx_items_update'), // 'action' => 'updateData', // 'button' => true, // 'menu' => true, // ); // // Remove // $array['actions'][] = array( // 'cls' => '', // 'icon' => 'icon icon-trash-o action-red', // 'title' => $this->modx->lexicon('identifyx_item_remove'), // 'multiple' => $this->modx->lexicon('identifyx_items_remove'), // 'action' => 'removeData', // 'button' => true, // 'menu' => true, // ); return $array; }
public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); $objectArray['category_name'] = $object->get('category_name'); unset($objectArray['content']); return $objectArray; }
/** * Prepare the row for iteration * * @param xPDOObject $object * * @return array */ public function prepareRow(xPDOObject $object) { if ($this->getProperty('combo')) { return $object->get(array('id', 'name', 'pagetitle')); } $array = parent::prepareRow($object); $icon = $this->_modx23 ? 'icon' : 'fa'; $array['actions'] = array(); // View $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-comments-o", 'title' => $this->modx->lexicon('tickets_action_view'), 'action' => 'viewThread', 'button' => empty($array['deleted']) || empty($array['closed']), 'menu' => true); // Publish if (!$array['closed']) { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-power-off action-gray", 'title' => $this->modx->lexicon('tickets_action_close'), 'multiple' => $this->modx->lexicon('tickets_action_close'), 'action' => 'closeThread', 'button' => empty($array['deleted']), 'menu' => true); } else { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-power-off action-green", 'title' => $this->modx->lexicon('tickets_action_open'), 'multiple' => $this->modx->lexicon('tickets_action_open'), 'action' => 'openThread', 'button' => true, 'menu' => true); } // Delete if (!$array['deleted']) { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-trash-o action-yellow", 'title' => $this->modx->lexicon('tickets_action_delete'), 'multiple' => $this->modx->lexicon('tickets_action_delete'), 'action' => 'deleteThread', 'button' => false, 'menu' => true); } else { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-undo action-green", 'title' => $this->modx->lexicon('tickets_action_undelete'), 'multiple' => $this->modx->lexicon('tickets_action_undelete'), 'action' => 'undeleteThread', 'button' => true, 'menu' => true); } $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-trash-o action-red", 'title' => $this->modx->lexicon('tickets_action_remove'), 'multiple' => $this->modx->lexicon('tickets_action_remove'), 'action' => 'removeThread', 'button' => false, 'menu' => true); // Menu $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-cog actions-menu", 'menu' => false, 'button' => true, 'action' => 'showMenu', 'type' => 'menu'); return $array; }
/** * Prepare the row for iteration * @param xPDOObject $object * @return array */ public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); $objectArray['catid'] = $objectArray['id']; $objectArray['text'] = $objectArray['name']; $hasChildren = $this->_hasChildren($objectArray['catid']); $objectArray['leaf'] = $hasChildren ? FALSE : TRUE; $usergroups = $object->getMany('vnewsCategoriesHasUsergroups'); $usergroupsArray = array(); if ($usergroups) { foreach ($usergroups as $usergroup) { $usergroupId = $usergroup->get('usergroup_id'); $c = $this->modx->newQuery('modUserGroup'); $c->where(array('id' => $usergroupId)); $modUserGroup = $this->modx->getObject('modUserGroup', $c); if ($modUserGroup) { $usergroupsArray[] = array('usergroup_id' => $usergroupId, 'usergroup' => $modUserGroup->get('name')); } } } $objectArray['usergroups'] = $usergroupsArray; unset($objectArray['id']); // avoid Ext component's ID return $objectArray; }
public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); $objectArray['name'] = $object->get('name') . ' - ' . $object->get('authority'); $objectArray['id'] = $object->get('authority'); return $objectArray; }
/** * @param xPDOObject $object * * @return array */ public function prepareRow(xPDOObject $object) { $array = $object->toArray(); $array['key'] = $array['classKey'] . '-' . $array['item']; switch ($array['classKey']) { case 'modTemplate': $array['name'] = '<a href="index.php?a=element/template/update&id=' . $array['item'] . '">' . $array['templatename'] . '</a>'; break; case 'modChunk': $array['name'] = '<a href="index.php?a=element/chunk/update&id=' . $array['item'] . '">' . $array['chunkname'] . '</a>'; break; case 'modSnippet': $array['name'] = '<a href="index.php?a=element/snippet/update&id=' . $array['item'] . '">' . $array['snippetname'] . '</a>'; break; case 'modPlugin': $array['name'] = '<a href="index.php?a=element/plugin/update&id=' . $array['item'] . '">' . $array['pluginname'] . '</a>'; break; case 'modTemplateVar': $array['name'] = '<a href="index.php?a=element/tv/update&id=' . $array['item'] . '">' . $array['tvname'] . '</a>'; break; } if (!isset($array['name'])) { $array['name'] = '(' . $this->modx->lexicon('deleted') . ')'; } unset($array['templatename'], $array['chunkname'], $array['snippetname'], $array['pluginname'], $array['id']); $array['actions'][] = array('cls' => '', 'icon' => 'icon icon-pencil-square-o ', 'title' => $this->modx->lexicon('admintools_open'), 'action' => 'openElement', 'button' => true, 'menu' => true); return $array; }
/** * @param xPDOObject $object * * @return array */ public function prepareRow(xPDOObject $object) { $icon = 'icon'; $array = $object->toArray(); $array['actions'] = array(); // Edit $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-edit green", 'title' => $this->modx->lexicon('gl_action_update'), 'action' => 'update', 'button' => true, 'menu' => true); if ($array['default']) { return $array; } switch (true) { case $array['active']: break; case $array['active1']: $array['active'] = 1; break; case $array['active2']: $array['active'] = 1; break; default: $array['active'] = 0; } if (!$array['active']) { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-toggle-off red", 'title' => $this->modx->lexicon('gl_action_active'), 'action' => 'active', 'button' => true, 'menu' => true); } else { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-toggle-on green", 'title' => $this->modx->lexicon('gl_action_inactive'), 'action' => 'inactive', 'button' => true, 'menu' => true); } // sep $array['actions'][] = array('cls' => '', 'icon' => '', 'title' => '', 'action' => 'sep', 'button' => false, 'menu' => true); // Remove $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-trash-o red", 'title' => $this->modx->lexicon('gl_action_remove'), 'action' => 'remove', 'button' => true, 'menu' => true); return $array; }
/** * @param xPDOObject|modAccessContext $object * @return array */ public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); if (empty($objectArray['name'])) { $objectArray['name'] = '(' . $this->modx->lexicon('none') . ')'; } $objectArray['authority_name'] = !empty($objectArray['role_name']) ? $objectArray['role_name'] . ' - ' . $objectArray['authority'] : $objectArray['authority']; /* get permissions list */ $data = $objectArray['policy_data']; unset($objectArray['policy_data']); $data = $this->modx->fromJSON($data); if (!empty($data)) { $permissions = array(); foreach ($data as $perm => $v) { $permissions[] = $perm; } $objectArray['permissions'] = implode(', ', $permissions); } $cls = ''; if (($objectArray['target'] == 'web' || $objectArray['target'] == 'mgr') && $objectArray['policy_name'] == 'Administrator' && ($this->userGroup && $this->userGroup->get('name') == 'Administrator')) { } else { $cls .= 'pedit premove'; } $objectArray['cls'] = $cls; return $objectArray; }
public function prepareRow(xPDOObject $object) { $core = array('Resource', 'Object', 'Administrator', 'Load Only', 'Load, List and View'); $policyArray = $object->toArray(); $permissions = array(); $cls = 'pedit'; if (!in_array($object->get('name'), $core)) { $cls .= ' premove'; } $policyArray['cls'] = $cls; if (!empty($policyArray['total_permissions'])) { $data = $object->get('data'); $ct = 0; if (!empty($data)) { foreach ($data as $k => $v) { if (!empty($v)) { $permissions[] = $k; $ct++; } } } $policyArray['active_permissions'] = $ct; $policyArray['active_of'] = $this->modx->lexicon('active_of', array('active' => $policyArray['active_permissions'], 'total' => $policyArray['total_permissions'])); $policyArray['permissions'] = $permissions; } unset($policyArray['data']); return $policyArray; }
/** {@inheritDoc} */ public function prepareRow(xPDOObject $object) { $icon = 'fa'; $array = $object->toArray(); $array['actions'] = array(); // Menu $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-cog actions-menu", 'menu' => false, 'button' => true, 'action' => 'showMenu', 'type' => 'menu'); // Edit $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-edit green", 'title' => $this->modx->lexicon('mlmsystem_action_edit'), 'action' => 'update', 'button' => true, 'menu' => true); // sep $array['actions'][] = array('cls' => '', 'icon' => '', 'title' => '', 'action' => 'sep', 'button' => false, 'menu' => true); $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-street-view", 'title' => $this->modx->lexicon('mlmsystem_action_change_parent'), 'action' => 'changeParent', 'button' => false, 'menu' => true); $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-money ", 'title' => $this->modx->lexicon('mlmsystem_action_change_balance'), 'action' => 'changeBalance', 'button' => true, 'menu' => true); // sep $array['actions'][] = array('cls' => '', 'icon' => '', 'title' => '', 'action' => 'sep', 'button' => false, 'menu' => true); //Blocked status if ($array['status'] != $this->statusBlocked) { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-unlock-alt red", 'title' => $this->modx->lexicon('mlmsystem_action_active_blocked'), 'action' => 'activeBlocked', 'button' => false, 'menu' => true); } else { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-unlock green", 'title' => $this->modx->lexicon('mlmsystem_action_inactive_blocked'), 'action' => 'inactiveBlocked', 'button' => false, 'menu' => true); } if (!$array['leader']) { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-shield green", 'title' => $this->modx->lexicon('mlmsystem_action_active_leader'), 'action' => 'activeLeader', 'button' => false, 'menu' => true); } else { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-shield red", 'title' => $this->modx->lexicon('mlmsystem_action_inactive_leader'), 'action' => 'inactiveLeader', 'button' => false, 'menu' => true); } // Remove $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-trash-o red", 'title' => $this->modx->lexicon('mlmsystem_action_remove'), 'action' => 'remove', 'button' => false, 'menu' => true); return $array; }
/** * @param xPDOObject $object * * @return array */ public function prepareRow(xPDOObject $object) { $icon = 'fa'; $array = $object->toArray(); $array['actions'] = array(); // Edit /*$array['actions'][] = array( 'cls' => '', 'icon' => "$icon $icon-eye green", 'title' => $this->modx->lexicon('gl_action_view'), 'action' => 'update', 'button' => true, 'menu' => true, );*/ if (!$array['active']) { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-toggle-off red", 'title' => $this->modx->lexicon('gl_action_active'), 'action' => 'active', 'button' => true, 'menu' => true); } else { $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-toggle-on green", 'title' => $this->modx->lexicon('gl_action_inactive'), 'action' => 'inactive', 'button' => true, 'menu' => true); } // sep $array['actions'][] = array('cls' => '', 'icon' => '', 'title' => '', 'action' => 'sep', 'button' => false, 'menu' => true); // Remove $array['actions'][] = array('cls' => '', 'icon' => "{$icon} {$icon}-trash-o red", 'title' => $this->modx->lexicon('gl_action_remove'), 'action' => 'remove', 'button' => true, 'menu' => true); return $array; }
public function prepareRow(xPDOObject $object) { $a = $object->toArray('', false, true); $a['runs'] = $this->modx->getCount('sTaskRun', array('task' => $a['id'])); $a['data'] = !empty($a['data']) ? $this->modx->toJSON($a['data']) : ''; return $a; }
public function prepareRow(xPDOObject $object) { $charset = $this->modx->getOption('modx_charset', null, 'UTF-8'); $objectArray = $object->toArray(); $resourceArray['pagetitle'] = htmlentities($objectArray['pagetitle'], ENT_COMPAT, $charset); return $objectArray; }
/** * @param xPDOObject|modAccessResourceGroup $object * @return array */ public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); if (empty($objectArray['name'])) { $objectArray['name'] = '(' . $this->modx->lexicon('none') . ')'; } $objectArray['authority_name'] = !empty($objectArray['role_name']) ? $objectArray['role_name'] . ' - ' . $objectArray['authority'] : $objectArray['authority']; /* get permissions list */ $data = $objectArray['policy_data']; unset($objectArray['policy_data']); $data = $this->modx->fromJSON($data); if (!empty($data)) { $permissions = array(); foreach ($data as $perm => $v) { $permissions[] = $perm; } $objectArray['permissions'] = implode(', ', $permissions); } $cls = ''; if (($objectArray['target'] == 'web' || $objectArray['target'] == 'mgr') && $objectArray['policy_name'] == 'Administrator' && ($this->userGroup && $this->userGroup->get('name') == 'Administrator')) { } else { $cls .= 'pedit premove'; } $objectArray['cls'] = $cls; $objectArray['menu'] = array(array('text' => $this->modx->lexicon('access_rgroup_update'), 'handler' => 'this.updateAcl'), '-', array('text' => $this->modx->lexicon('access_rgroup_remove'), 'handler' => 'this.confirm.createDelegate(this,["remove"])')); return $objectArray; }
/** * Prepare the row for iteration * @param xPDOObject $object * @return array */ public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); $objectArray['newsid'] = $objectArray['id']; $objectArray['text'] = $objectArray['subject'] . ' (' . $objectArray['id'] . ')'; $objectArray['leaf'] = TRUE; $objectArray['scheduled_for'] = date('m/d/Y', $objectArray['scheduled_for']); $categories = $object->getMany('vnewsNewslettersHasCategories'); $categoriesArray = array(); if ($categories) { foreach ($categories as $category) { $categoryId = $category->get('category_id'); $categoryObj = $this->modx->getObject('vnewsCategories', $categoryId); if ($categoryObj) { $categoriesArray[] = array('category_id' => $categoryId, 'category' => $categoryObj->get('name')); } } } else { $categoriesArray[] = array('category_id' => 0, 'category' => 'uncategorized'); } $objectArray['categories'] = $categoriesArray; unset($objectArray['id']); // avoid Ext component's ID return $objectArray; }
public function prepareRow(xPDOObject $object) { $fields = array_map('trim', explode(',', $this->modx->getOption('ms2_order_product_fields', null, ''))); $fields = array_values(array_unique(array_merge($fields, array('id', 'product_id', 'product_pagetitle')))); $data = array(); foreach ($fields as $v) { $data[$v] = $object->get($v); if ($v == 'product_price' || $v == 'product_old_price') { $data[$v] = round($data[$v], 2); } else { if ($v == 'product_weight') { $data[$v] = round($data[$v], 3); } } } $options = $object->get('options'); if (!empty($options) && is_array($options)) { $tmp = array(); foreach ($options as $k => $v) { $tmp[] = $this->modx->lexicon('ms2_' . $k) . ': ' . $v; $data['option_' . $k] = $v; } $data['options'] = implode('; ', $tmp); } return $data; }
/** * Prepare the row for iteration * @param xPDOObject $object * @return array */ public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); $objectArray['usergroups'] = ''; if (!empty($objectArray['user_id'])) { $userObj = $this->modx->getObject('modUser', $objectArray['user_id']); if ($userObj) { $usergroups = $userObj->getUserGroupNames(); if ($usergroups) { $objectArray['usergroups'] = @implode(',', $usergroups); } } } $subscribersHasCategories = $object->getMany('vnewsSubscribersHasCategories'); $objectArray['categories'] = ''; if ($subscribersHasCategories) { $categories = array(); foreach ($subscribersHasCategories as $subsHasCats) { $category = $subsHasCats->getOne('vnewsCategories'); $categories[] = $category->get('name'); } $objectArray['categories'] = @implode(',', $categories); } return $objectArray; }
/** * Convert category ID to category name for objects with a category. * Convert template ID to template name for objects with a template * * Note: It's much more efficient to do these with a join, but that can * only be done for objects known to have the field. This code can * be used on any object. * * @param xPDOObject $object * @return array */ public function prepareRow(xPDOObject $object) { $fields = $object->toArray(); if (array_key_exists('category', $fields)) { if (!empty($fields['category'])) { $categoryObj = $this->modx->getObject('modCategory', $fields['category']); if ($categoryObj) { $fields['category'] = $categoryObj->get('category'); } else { $fields['category'] = $this->modx->lexicon('invalid_category'); } } else { $fields['category'] = $this->modx->lexicon('none'); } } if (array_key_exists('template', $fields)) { if (!empty($fields['template'])) { $templateObj = $this->modx->getObject('modTemplate', $fields['template']); if ($templateObj) { $fields['template'] = $templateObj->get('category'); } else { $fields['template'] = $this->modx->lexicon('invalid_template'); } } else { $fields['template'] = $this->modx->lexicon('none'); } } return $fields; }
/** * @param xPDOObject $object * * @return array */ public function prepareRow(xPDOObject $object) { $array = $object->toArray(); switch ($array['principal_type']) { case 'all': $array['principal_name'] = $this->modx->lexicon('admintools_permissions_all'); break; case 'gst': $array['principal_name'] = $this->modx->lexicon('admintools_permissions_guest'); break; case 'grp': $array['principal_name'] = $array['groupname']; unset($array['groupname']); break; case 'usr': $array['principal_name'] = $array['fullname']; unset($array['fullname']); break; } // Edit note $array['actions'][] = array('cls' => '', 'icon' => 'icon icon-pencil-square-o ', 'title' => $this->modx->lexicon('admintools_edit'), 'action' => 'updatePermission', 'button' => true, 'menu' => true); // Remove note $array['actions'][] = array('cls' => '', 'icon' => 'icon icon-trash-o action-red', 'title' => $this->modx->lexicon('admintools_remove'), 'action' => 'removePermission', 'button' => true, 'menu' => true); return $array; }
/** * Prepare the row for iteration * @param xPDOObject $object * @return array */ public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); unset($objectArray['password'], $objectArray['cachepwd'], $objectArray['salt'], $objectArray['class_key'], $objectArray['active'], $objectArray['remote_key'], $objectArray['remote_data'], $objectArray['hash_class'], $objectArray['primary_group'], $objectArray['session_stale'], $objectArray['sudo'], $objectArray['blocked']); $objectArray['uid'] = $objectArray['id']; $objectArray['text'] = $objectArray['username'] . ' (' . $objectArray['id'] . ')'; $basePath = $this->modx->getOption('uploadtousers.base_path', null, $this->modx->getOption('assets_path') . 'userfiles/'); if (!is_dir($basePath)) { $this->modx->log(modX::LOG_LEVEL_ERROR, $basePath . ' for Upload to Users package does not exist.'); return $objectArray; } $folderName = $this->modx->getOption('uploadtousers.foldername'); if (!empty($folderName)) { switch ($folderName) { case 'id': $dirPath = $basePath . $objectArray['uid'] . '/'; break; case 'username': $dirPath = $basePath . $objectArray['username'] . '/'; break; default: break; } $objectArray['leaf'] = $this->_leaf($dirPath); } if (!is_dir($dirPath)) { @mkdir($dirPath); } $objectArray['dirPath'] = $dirPath; $objectArray['type'] = 'user'; unset($objectArray['id']); // avoid Ext component's ID return $objectArray; }
/** * Prepare the row for iteration * @param xPDOObject $object * @return array */ public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); $objectArray['blocked'] = $object->get('blocked') ? true : false; $objectArray['cls'] = 'pupdate premove pcopy'; unset($objectArray['password'], $objectArray['cachepwd'], $objectArray['salt']); return $objectArray; }
/** * Prepare the Namespace for listing * * @param xPDOObject $object * @return array */ public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); $objectArray['perm'] = array(); $objectArray['perm'][] = 'pedit'; $objectArray['perm'][] = 'premove'; return $objectArray; }
/** * @param xPDOObject $object * * @return array */ public function prepareRow(xPDOObject $object) { $array = $object->toArray(); if (empty($array['fullname'])) { $array['fullname'] = $array['username']; } return $array; }
/** * Transform the xPDOObject derivative to an array; * @param xPDOObject $object * @return array */ public function prepareRow(xPDOObject $object) { $row = $object->toArray('', false, true); if (!empty($row['parent_name'])) { $row['category_name'] .= ' » ' . $row['parent_name']; } return $row; }
function prepareRow(xPDOObject $object) { /** @var byAd $ad */ $ad = $object->getOne('Ad'); $row = array_merge($ad->toArray(), $object->toArray()); $row['image'] = $ad->getImageUrl(); return $row; }
public function prepareRow(xPDOObject $object) { $objectArray = $object->toArray(); if (!$this->getProperty('combo', false)) { $objectArray['menu'] = array(array('text' => $this->modx->lexicon('provider_update'), 'handler' => array('xtype' => 'modx-window-provider-update')), '-', array('text' => $this->modx->lexicon('provider_remove'), 'handler' => 'this.remove.createDelegate(this,["provider_confirm_remove", "workspace/providers/remove"])')); } return $objectArray; }
/** * @param xPDOObject $object * * @return array */ public function prepareRow(xPDOObject $object) { $array = $object->toArray(); if (empty($array['class'])) { $array['class'] = $this->objectType; } return $array; }