Ham add mot position vao container
@param string $diyId id cua diy
@param string $itemId id cua position
@param string $containerId container id cua position
@param int $numberColumn so cot cua position
@return string
336683
private function addPosition($diyId, $itemId, $containerId, $numberColumn){
        // Generate template container
        $template = Diy::generateTemplatePosition($numberColumn, $diyId, $containerId, $itemId);
        
        $model = Diy::find()->where(['_id' => $diyId])->one();
        if ($model) {
            // Check container co position hay chua
            $container = ArrayHelper::getValue($model->data, $containerId);
            // Neu chua thi add moi vao container
            if (empty($container)){
                $model->data = ArrayHelper::merge($model->data, [
                    $containerId => [
                        $itemId => ['column' => $numberColumn]
                    ]
                ]);
            } else { // Neu co position trong container thi add them vao mang hien co
                $model->data = ArrayHelper::merge($model->data, [
                        $containerId => ArrayHelper::merge($model->data[$containerId], [
                            $itemId => ['column' => $numberColumn]
                        ])
                    ]
                );
            }
            
            $model->save();
        }
        
        return $template;
    }
1278898
public function addColumn($id, $label, $type) {
        $this->cols[] = new DataColumn($id, $label, $type);
    }
492426
public function createGridLayout($itemsInGrid, $numberOfCols)
    {
        $position = 1;
        $columns = new ArrayList();
        $result = new ArrayList();
        foreach ($itemsInGrid as $key => $item) {
            $columns->push($item);
            if (($position) >= $numberOfCols) {
                $position = 1;
                $row = new ArrayList();
                $row->Columns = $columns;
                $result->push($row);
                $columns = new ArrayList();
            } else {
                $position = $position + 1;
            }
        }
        if ($columns->Count() > 0) {
            $row = new ArrayList();
            $row->Columns = $columns;
            $result->push($row);
        }
        return $result;
    }
164959
public ContextMenuItemState addChild(String itemCaption, String itemId) {

        ContextMenuItemState rootItem = new ContextMenuItemState();
        rootItem.setCaption(itemCaption);
        rootItem.setId(itemId);

        m_rootItems.add(rootItem);

        return rootItem;
    }
476614
private void formatHeaderAndFooter(int itemCount, int id) {
        // Header.
        this.header.set(VERSION_OFFSET, CURRENT_VERSION);
        this.header.set(FLAGS_OFFSET, getFlags(this.config.isIndexPage ? FLAG_INDEX_PAGE : FLAG_NONE));
        setHeaderId(id);
        setCount(itemCount);

        // Matching footer.
        setFooterId(id);
    }
1241493
public function assignProduct($categoryId, $productId, $position = null, $identifierType = null)
    {
        return $this->__createAction('catalog_category.assignProduct', func_get_args());
    }
395599
private String generateIncrementedId (String componentId) {
        Integer serialNum = (Integer) context.getAttributes().get(componentId);
        if (null == serialNum) {
            serialNum = 1;
        } else {
            serialNum = serialNum.intValue() + 1;
        }
        context.getAttributes().put(componentId, serialNum);
        componentId = componentId + UNIQUE_ID_PREFIX + serialNum.intValue();
        return componentId;
    }
1061968
public static function create(int $itemid = 0) : \core_customfield\handler {
        if (static::$singleton === null) {
            self::$singleton = new static(0);
        }
        return self::$singleton;
    }
493126
public void addDocumentParticipantObject(String documentUniqueId, String repositoryUniqueId, String homeCommunityId)
	{
		List<TypeValuePairType> tvp = new LinkedList<>();
        //SEK - 10/19/2011 - added check for empty or null, RE: Issue Tracker artifact artf2295 (was Issue 135)
 		if (!EventUtils.isEmptyOrNull(repositoryUniqueId)) {
			tvp.add(getTypeValuePair("Repository Unique Id", repositoryUniqueId.getBytes()));
		}
		if (!EventUtils.isEmptyOrNull(homeCommunityId)) {
			tvp.add(getTypeValuePair("ihe:homeCommunityID", homeCommunityId.getBytes()));
		}
		
		addParticipantObjectIdentification(
				new RFC3881ParticipantObjectCodes.RFC3881ParticipantObjectIDTypeCodes.ReportNumber(), 
				null, 
				null, 
				tvp, 
				documentUniqueId, 
				RFC3881ParticipantObjectTypeCodes.SYSTEM, 
				RFC3881ParticipantObjectTypeRoleCodes.REPORT,
				null, 
				null);
	}
962
public function admin_modal_bail( $item_id, $item_title, $field_args ) {

		$model_data = $this->build_dfv_field_item_data_recurse_item( $item_id, $item_title, $field_args );
		?>
			<script type="text/javascript">
				window.parent.jQuery( window.parent ).trigger(
					'dfv:modal:update',
					<?php echo wp_json_encode( $model_data, JSON_HEX_TAG ); ?>
				);
			</script>
		<?php

		die();

	}
1051353
protected SelectItem addRowNumber(PlainSelect plainSelect, List<SelectItem> autoItems) {
        //增加ROW_NUMBER()
        StringBuilder orderByBuilder = new StringBuilder();
        orderByBuilder.append("ROW_NUMBER() OVER (");
        if (isNotEmptyList(plainSelect.getOrderByElements())) {
            orderByBuilder.append(PlainSelect.orderByToString(
                    getOrderByElements(plainSelect, autoItems)).substring(1));
            //清空排序列表
            plainSelect.setOrderByElements(null);
        } else {
            orderByBuilder.append("ORDER BY RAND()");
        }
        orderByBuilder.append(") ");
        orderByBuilder.append(PAGE_ROW_NUMBER);
        return new SelectExpressionItem(new Column(orderByBuilder.toString()));
    }
1234715
public void addCorporateGroupId(final String organizationId, final String corporateGroupId) {
        final DbOrganization dbOrganization = getOrganization(organizationId);

        if(!dbOrganization.getCorporateGroupIdPrefixes().contains(corporateGroupId)){
            dbOrganization.getCorporateGroupIdPrefixes().add(corporateGroupId);
            repositoryHandler.store(dbOrganization);
        }

        repositoryHandler.addModulesOrganization(corporateGroupId, dbOrganization);
    }
855734
public function update ($item_id, array $data) {
		return $this->api->update($this->list_name, $item_id, $data);
	}
390404
public function addAddonItem(string $id, array $data, array $headers = [])
    {
        $url = $this->url('invoices/%s/add_addon_charge', $id);

        return $this->post($url, $data, $headers);
    }
933209
public function moveUpAction(Request $request, $menuid, $item)
    {
        $em = $this->getEntityManager();
        $repo = $em->getRepository($this->container->getParameter('kunstmaan_menu.entity.menuitem.class'));
        $item = $repo->find($item);

        if ($item) {
            $repo->moveUp($item);
        }

        return new RedirectResponse(
            $this->generateUrl('kunstmaanmenubundle_admin_menuitem', array('menuid' => $menuid))
        );
    }
795213
public function doVoid($authorization_id, $data = [])
    {
        $this->setRequestData(
            array_merge($data, [
                'AUTHORIZATIONID' => $authorization_id,
            ])
        );

        return $this->doPayPalRequest('DoVoid');
    }
288526
public function addItem($itemData, $locale, $userId, $order)
    {
        $item = $this->itemManager->save($itemData, $locale, $userId);

        $order->addItem($item->getEntity());

        return $item;
    }