@param Column $newAreaLayout

@return ThemeGridColumn
325415
public function duplicate($newAreaLayout)
    {
        $areaLayoutColumnID = parent::duplicate($newAreaLayout);
        $db = Loader::db();
        $v = array($areaLayoutColumnID, $this->arLayoutColumnSpan, $this->arLayoutColumnOffset);
        $db->Execute('insert into AreaLayoutThemeGridColumns (arLayoutColumnID, arLayoutColumnSpan, arLayoutColumnOffset) values (?, ?, ?)', $v);
        $newAreaLayoutColumn = self::getByID($areaLayoutColumnID);

        return $newAreaLayoutColumn;
    }
750686
public function htmlGridSystem($identifier,$numRows=1,$numCols=NULL){
		return $this->addHtmlComponent(new HtmlGridSystem($identifier,$numRows,$numCols));
	}
125712
public static function reload_template($component, $area, $itemid) {
        global $PAGE;

        $params = self::validate_parameters(self::reload_template_parameters(),
                      ['component' => $component, 'area' => $area, 'itemid' => $itemid]);

        $PAGE->set_context(context_system::instance());
        $handler = \core_customfield\handler::get_handler($params['component'], $params['area'], $params['itemid']);
        self::validate_context($handler->get_configuration_context());
        if (!$handler->can_configure()) {
            throw new moodle_exception('nopermissionconfigure', 'core_customfield');
        }
        $output = $PAGE->get_renderer('core_customfield');
        $outputpage = new \core_customfield\output\management($handler);
        return $outputpage->export_for_template($output);
    }
1200614
private void obtainScrollableArea(@StyleRes final int themeResourceId) {
        TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
                new int[]{R.attr.materialDialogScrollableAreaTop,
                        R.attr.materialDialogScrollableAreaBottom});
        int topIndex = typedArray.getInt(0, -1);
        int bottomIndex = typedArray.getInt(1, -1);

        if (topIndex != -1) {
            Area top = Area.fromIndex(topIndex);

            if (bottomIndex != -1) {
                Area bottom = Area.fromIndex(bottomIndex);
                setScrollableArea(top, bottom);
            } else {
                setScrollableArea(top);
            }
        } else {
            setScrollableArea(null, null);
        }
    }
412053
public function addColumn($name, $accessor = null)
    {
        $col = new\RBM\Datagrid\Column($this, $name, count($this->_columns), $accessor);
        $this->_columns[$name] = $col;
        $this->_columnsPositions[] = $name;
        return $col;
    }
155572
public static function update($itemid, $newvalue) {
        global $DB;
        require_capability('moodle/tag:manage', context_system::instance());
        $tagarea = $DB->get_record('tag_area', array('id' => $itemid), '*', MUST_EXIST);
        $newvalue = clean_param($newvalue, PARAM_INT);
        $data = array('showstandard' => $newvalue);
        core_tag_area::update($tagarea, $data);
        $tagarea->showstandard = $newvalue;
        $tmpl = new self($tagarea);
        return $tmpl;
    }
46241
static function LastAreaModLog(Area $area, Interfaces\IContainerReferenceResolver $resolver)
    {
        $lastLog = $this->LastAreaLog($area);
        $areaContents = LayoutContent::Schema()->FetchByArea(false, $area);
        foreach ($areaContents as $areaContent)
        {
            $content = $areaContent->GetContent();
            $contentLog = self::LastContentModLog($content, $resolver);
            if (self::IsAfter($contentLog, $lastLog))
            {
                $lastLog = $contentLog;
            }
        }
        return $lastLog;
    }
403077
public function setColsCount($numCols, $toCreate=true, $width=NULL) {
		/*if (isset($width)==false) {
			$this->setWide($numCols);
		}*/
		if ($toCreate == true) {
			$count=$this->count();
			if ($count == 0 || $this->hasOnlyCols($count)) {
				for($i=$count; $i < $numCols; $i++) {
					$this->addItem(new HtmlGridCol("col-" . $this->identifier . "-" . $i, $width));
				}
			} else {
				for($i=0; $i < $count; $i++) {
					$this->getItem($i)->setColsCount($numCols);
				}
			}
		}
		return $this;
	}
673759
public function updateAlwaysAvailableFlag($contentId, $newAlwaysAvailable)
    {
        try {
            return $this->innerGateway->updateAlwaysAvailableFlag($contentId, $newAlwaysAvailable);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
625158
public function getGrid($name, $title = null, SS_List $dataList = null)
    {
        return GridField::create($name, $title, $dataList, $this->gridConfig);
    }
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;
    }
822982
public function createHtmlTableFromArray($nbColonnes=4,$styleTableau='border:1px;',$classTableau='',$cellProperty='',$tableauProperties='')
	{
	
		$htmlClassTableau = "";
		if($classTableau!='')
			$htmlClassTableau = " class='".$classTableau."' ";
	
		$html="<table style=\"".$styleTableau."\" ".$htmlClassTableau." ".$tableauProperties."><tbody>";
		
		
		$nbValues = count($this->tabValues);
		
		// calcul du nombre de cases totales :
		if($nbValues%$nbColonnes==0)
		{
			$nbLignes = $nbValues / $nbColonnes;
		}
		else
		{
			$nbLignes = intval($nbValues / $nbColonnes)+1;
		}
		
		$nbCases = $nbLignes * $nbColonnes;
		
		$ligne=0; // coordonn�es horizontales
		$colonne=0; // coordonn�es verticales
		for($i=0 ; $i<$nbCases ; $i++)
		{
			if($colonne==0)
			{
				$html.="<tr>";
			}
			
			if(isset($this->tabValues[$i]))
			{
				if(isset($this->tabStyles[$i]) && $this->tabStyles[$i]!='')
					$html.="<td ".$this->tabStyles[$i].">".$this->tabValues[$i]."</td>";
				else
					$html.="<td ".$cellProperty.">".$this->tabValues[$i]."</td>";
			}
			else
			{
				$html.="<td ".$cellProperty.">&nbsp;</td>";
			}
			
			
			if($colonne==$nbColonnes-1)
			{
				$html.="</tr>";
				$colonne=0;
				$ligne+=1;
			}
			else
			{
				$colonne+=1;
			}
		}
		
		$html=$html."</tbody></table>";
		return $html;
	}
481728
public function newInstance(
        string $createdByUserId,
        string $createdReason = Tracking::UNKNOWN_REASON
    ) {
        /** @var ContainerInterface|ContainerAbstract $new */
        $new = parent::newInstance(
            $createdByUserId,
            $createdReason
        );

        $new->lastPublished = new \DateTime();

        $new->revisions = new ArrayCollection();

        if (!empty($new->publishedRevision)) {
            $revision = $new->publishedRevision->newInstance(
                $createdByUserId,
                $createdReason
            );
            $new->removePublishedRevision();
            $new->revisions->add($revision);
            $new->setStagedRevision($revision);
        } elseif (!empty($new->stagedRevision)) {
            $revision = $new->stagedRevision->newInstance(
                $createdByUserId,
                $createdReason
            );
            $new->setStagedRevision($revision);
            $new->revisions->add($revision);
        }

        return $new;
    }
948972
public function withSize($newWidth, $newHeight)
    {
        $newDimension = clone $this;

        if ($newWidth == 0 && $newHeight > 0) {
            $newDimension->withHeight($newHeight);
            $newWidth = $newDimension->getWidth();
        } else {
            if ($newWidth > 0 && $newHeight == 0) {
                $newDimension->withWidth($newWidth);
                $newHeight = $newDimension->getHeight();
            }
        }

        $targetDimension = clone $this;

        if ($this->directive === 'UP') {
            if ($newWidth > $this->width) {
                $targetDimension->width = $newWidth;
                $targetDimension->height = $newHeight;

                return $targetDimension;
            } elseif ($newWidth < $this->width) {
                return $targetDimension;
            }
        } elseif ($this->directive === 'DOWN') {
            if ($newWidth > $this->width) {
                return $targetDimension;
            } elseif ($newWidth < $this->width) {
                $targetDimension->width = $newWidth;
                $targetDimension->height = $newHeight;

                return $targetDimension;
            }
        }

        if ($this->maintainAspectRatio) {
            $targetDimension->width = $newWidth > $this->width ? $this->width : $newWidth;
            $targetDimension->height = $newHeight > $this->height ? $this->height : $newHeight;
        } else {
            $targetDimension->width = (int)$newWidth;
            $targetDimension->height = (int)$newHeight;
        }

        return $targetDimension;
    }
145368
function ezColumnsStart( $options = array() )
    {
        // start from the current y-position, make the set number of columne
        if ( isset( $this->ez['columns'] ) && $this->ez['columns'] == 1 )
        {   // if we are already in a column mode then just return.
            return;
        }
        $def = array( 'gap'=>10, 'num'=>2 );
        foreach( $def as $k => $v )
        {
            if ( !isset( $options[$k] ) )
            {
                $options[$k] = $v;
            }
        }
        // setup the columns
        $this->ez['columns'] = array( 'on' => 1, 'colNum' => 1 );

        // store the current margins
        $this->ez['columns']['margins'] = array( $this->ez['leftMargin'],
                                                 $this->ez['rightMargin'],
                                                 $this->ez['topMargin'],
                                                 $this->ez['bottomMargin'] );
        // and store the settings for the columns
        $this->ez['columns']['options'] = $options;
        // then reset the margins to suit the new columns
        // safe enough to assume the first column here, but start from the current y-position
        $this->ez['topMargin'] = $this->ez['pageHeight']-$this->y;
        $width = ( $this->ez['pageWidth'] - $this->ez['leftMargin'] - $this->ez['rightMargin'] - ( $options['num'] - 1 ) * $options['gap'] ) / $options['num'];
        $this->ez['columns']['width'] = $width;
        $this->ez['rightMargin'] = $this->ez['pageWidth'] - $this->ez['leftMargin'] - $width;

    }
90637
public function column(string $componentId) : TableComponentMappingDefiner
    {
        /** @var IColumn $column */
        /** @var IColumnComponent $component */
        list($column, $component) = $this->tableDataSource->getStructure()->getColumnAndComponent($componentId);
        $componentId = $column->getName() . '.' . $component->getName();

        return new TableComponentMappingDefiner($component, function (IColumnComponent $chartAxisComponent) use ($column, $componentId) {
            $this->chartComponentTableIdMap[$chartAxisComponent] = $componentId;
            $this->addColumnToLoad($column);
        });
    }
99688
public function setCols(int $cols): Textarea
    {
        if (empty((int) $cols)) {
            Throw new FormException('A html form textareas cols attribute need to be of type integer');
        }

        $this->attribute['cols'] = $cols;

        return $this;
    }