Defines a sub table for value data;

@param type $valueGroup
332828
final public function defineValueGroup($valueGroup = NULL)
    {
        $this->valueGroup = !empty($valueGroup) ? trim($valueGroup) . "_" : NULL;
        //you must have this proxy table created at setup
        //also object type must be the same as valuegroup
        if (!empty($valueGroup)) {
            return $this->setObjectType(trim($valueGroup));
        }
    }
23992
public function addMetaData($itemKey, $itemValue, $itemGroup = null)
    {
        $this->getMetaData()->addItem(
            new PagSeguroMetaDataItem($itemKey, $itemValue, $itemGroup)
        );
    }
31601
public function showEditComponentGroup(ComponentGroup $group)
    {
        return View::make('dashboard.components.groups.edit')
            ->withPageTitle(trans('dashboard.components.groups.edit.title').' - '.trans('dashboard.dashboard'))
            ->withGroup($group);
    }
831117
protected function bindLevel($group, $data)
	{
		// Ensure the input data is an array.
		settype($data, 'array');

		// Process the input data.
		foreach ($data as $k => $v)
		{
			if ($this->findField($k, $group))
			{
				// If the field exists set the value.
				$this->data->set($group . '.' . $k, $v);
			}
			elseif (is_object($v) || Arr::isAssociative($v))
			{
				// If the value is an object or an associative array, hand it off to the recursive bind level method
				$this->bindLevel($group . '.' . $k, $v);
			}
		}
	}
860194
public function dbGroup($dbGroup = null)
    {
        if ($dbGroup === null)
        {
            return $this->_dbGroup;
        }
        $this->_dbGroup = $dbGroup;

        return $this;
    }
715333
private function addGroup(MenuGroup $group)
    {
        if (!$this->hasGroup($group->getName())) {
            $this->groups[$group->getName()] = $group;
        }
    }
786214
public function initialize(array $config)
    {
        parent::initialize($config);

        $this
            ->setPrimaryKey('id')
            ->setTable(CMS_TABLE_GROUPS)
            ->setDisplayField('name');

        $this->addBehavior('Tree');
        $this->addAssociations([
            'belongsTo' => [
                'ParentGroup' => [
                    'foreignKey' => 'parent_id',
                    'className'  => 'Community.Group'
                ]
            ],
            'hasMany' => [
                'Users' => [
                    'dependent' => true,
                    'className' => 'Community.Users',
                ]
            ]
        ]);
    }
134784
public function group($group){
        if(is_array($group)){
            $this->group= 'GROUP BY ';
            foreach ($group as $value) {
                $this->group .= $value.',';
            }
            $this->group= rtrim($this->group, ',');
            $this->group.=' ';
        }else{
            $this->group= 'GROUP BY '.$group.' ';
        }
    }
886144
public function init($group)
	{
		// Lets validate if the post type exists and if so, continue.
		$postTypeModel = $this->getPostType($group);
		if(!$postTypeModel){
    		$errorMessages = 'You are not authorized to do this.';
    		return $this->abort($errorMessages);
    	}

		// Receiving the current data of the group
		$config = NikuConfig::where('group', '=', $group)
			->get()
			->keyBy('option_name')
			->toArray();

		$templates = $postTypeModel->view;

		// Appending the key added in the config to the array
        // so we can use it very easliy in the component.
        foreach($templates as $key => $template){

	    	if(!empty($template['customFields'])){

	    		// For each custom fields
	            foreach($template['customFields'] as $ckey => $customField){
	                $templates[$key]['customFields'][$ckey]['id'] = $ckey;

	                // Adding the values to the result
	            	if(!empty($config[$ckey])){
	            		$templates[$key]['customFields'][$ckey]['value'] = $config[$ckey]['option_value'];
	            	}
	            }
	        }
	    }

		$collection = collect([
			'config' => $this->getConfig($postTypeModel),
			'templates' => $templates,
		]);

		return response()->json($collection);
	}
882800
private function validateBrowserType(ContainerBuilder $container, string $valueType): void
    {
        if ($container->has(sprintf('netgen_content_browser.config.%s', $valueType))) {
            return;
        }

        throw new RuntimeException(
            sprintf(
                'Netgen Content Browser backend for "%s" value type does not exist.',
                $valueType
            )
        );
    }
175702
public function resetDevelopmentAssets($group = null)
    {
        if (is_null($group))
        {
            $this->development = array();
        }
        else
        {
            $this->development[$group] = array();
        }
    }
20647
public function formProperties(array $group = null)
    {
        $obj   = $this->obj();
        $props = $obj->metadata()->properties();

        // We need to sort form properties by form group property order if a group exists
        if (!empty($group)) {
            $props = array_merge(array_flip($group), $props);
        }

        foreach ($props as $propertyIdent => $propertyMetadata) {
            if (method_exists($obj, 'filterPropertyMetadata')) {
                $propertyMetadata = $obj->filterPropertyMetadata($propertyMetadata, $propertyIdent);
            }

            if (!is_array($propertyMetadata)) {
                throw new UnexpectedValueException(sprintf(
                    'Invalid property data for "%1$s", received %2$s',
                    $propertyIdent,
                    (is_object($propertyMetadata) ? get_class($propertyMetadata) : gettype($propertyMetadata))
                ));
            }

            $formProperty = $this->getOrCreateFormProperty($propertyIdent, $propertyMetadata);

            if (!$formProperty->hidden()) {
                yield $propertyIdent => $formProperty;
            }
        }
    }
1351789
public function addSerializerGroup($group)
    {
        if (is_array($group)) {
            $this->serializerGroups = array_merge(
                $this->serializerGroups,
                $group
            );
        } else {
            $this->serializerGroups[$group] = $group;
        }
    }
939727
public function transformCriterionGroup(CriterionGroupInterface $criterionGroup)
    {
        $criterionCount = $criterionGroup->count();
        $subQuery = [];

        if ($criterionCount === 1) {
            // Handle simple criterion
            $criterion = $criterionGroup->getCriteria();
            /** @var CriterionInterface $criterionGroup */
            $criterion = array_pop($criterion)[0];

            $subQuery["filtered"] = $this->transformCriterion($criterion);
        } else {
            //Handle multiple criteria

            // 1st, split OR groups
            // This must be transformed with operator priority: AND is prior to OR.

            $splitConditions = [];
            $i = 0;

            foreach ($criterionGroup->getCriteria() as $criterionTuple) {
                /** @var CriterionInterface $criterion */
                list($criterion, $link) = $criterionTuple;
                $splitConditions[$i][] = $criterion;

                if ($link === Link::LINK_OR) {
                    $i++;
                }
            }

            if (count($splitConditions) === 1) {
                // Group without OR
                $subQuery["filtered"] = [
                    "filter" => [],
                ];

                $keyBag = [];

                /** @var CriterionInterface $criterion */
                foreach ($splitConditions[0] as $criterion) {
                    $subQuery["filtered"] = array_merge_recursive(
                        $subQuery["filtered"],
                        $this->transformCriterion($criterion, $keyBag)
                    );
                }
            } else {
                // Group with OR
                $subQueries = [];

                foreach ($splitConditions as $splitCondition) {
                    $keyBag = [];

                    $subQuery["filtered"] = [
                        "filter" => [],
                    ];

                    /** @var CriterionInterface $criterion */
                    foreach ($splitCondition as $criterion) {
                        $subQuery["filtered"] = array_merge_recursive(
                            $subQuery["filtered"],
                            $this->transformCriterion($criterion, $keyBag)
                        );
                    }

                    $subQueries[]["query"] = $subQuery;
                }

                $subQuery = ["filtered" => ["filter" => ["or" => $subQueries]]];
            }
        }

        return $subQuery;
    }
879949
public function registerValueObject($valueObject, $valueMap = null)
    {
        if (!is_string($valueObject)) {
            $valueObject = get_class($valueObject);
        }

        if ($valueMap === null) {

            // First, we'll look into registered namespaces for Entity Maps,
            // if any. Then we'll fallback to the same namespace of the object
            if (!$valueMap = $this->getMapFromNamespaces($valueObject)) {
                $valueMap = $valueObject.'Map';
            } else {
                $valueMap = get_class($valueMap);
            }
        }

        if (!class_exists($valueMap)) {
            throw new MappingException("$valueMap doesn't exists");
        }

        $this->valueClasses[$valueObject] = $valueMap;
    }
756628
function group($group)
    {
        if (!empty($group))
        {
            self::sql_safe($group);
            $this->group = "group by $group";
        }
        else
        {
            $this->group = '';
        }
    }
711875
public static function subToday(string $subType, int $subValue): self
    {
        $subTypeMethod = 'sub'.ucfirst(strtolower(Str::after($subType, 'PAST_')));
        $today = Carbon::today();

        return self::sub($today, $subTypeMethod, $subType, $subValue);
    }