3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * This class generates form components
20 * for previewing Civicrm Profile Group
23 class CRM_UF_Form_Inline_PreviewById
extends CRM_UF_Form_AbstractPreview
{
26 * Pre processing work done here.
28 * gets session variables for group or field id
33 * @throws \CRM_Core_Exception
35 public function preProcess() {
36 // Inline forms don't get menu-level permission checks
37 if (!CRM_Core_Permission
::check('access CiviCRM')) {
38 CRM_Core_Error
::statusBounce(ts('Permission Denied'));
40 $gid = CRM_Utils_Request
::retrieve('id', 'Positive');
41 $fields = CRM_Core_BAO_UFGroup
::getFields($gid, FALSE, NULL, NULL, NULL, FALSE, NULL, FALSE, NULL, CRM_Core_Permission
::CREATE
, 'field_name', NULL, TRUE);
42 $this->setProfile($fields);