当前位置: 首页>>代码示例>>PHP>>正文


PHP Column::__construct方法代码示例

本文整理汇总了PHP中Column::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Column::__construct方法的具体用法?PHP Column::__construct怎么用?PHP Column::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Column的用法示例。


在下文中一共展示了Column::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($name, $label, $url, $options = array())
 {
     $options['formatter'] = array($this, 'formatLink');
     $this->url = $url;
     $this->idProperty = $options['idProperty'] ?: 'id';
     parent::__construct($name, $label, $options);
 }
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:7,代码来源:LinkColumn.php

示例2: __construct

 /**
  * @param Grido\Grid $grid
  * @param string $name
  * @param string $label
  * @param string $dateFormat
  */
 public function __construct($grid, $name, $label, $dateFormat = NULL)
 {
     parent::__construct($grid, $name, $label);
     if ($dateFormat !== NULL) {
         $this->dateFormat = $dateFormat;
     }
 }
开发者ID:cujan,项目名称:atlashornin,代码行数:13,代码来源:Date.php

示例3: __construct

 /**
  *
  * @param \Database\Resource $resource
  * @param string $name
  * @param string $alias
  * @param boolean $check_existance Sends boolean argument to Column constructor
  */
 public function __construct(\Database\Resource $resource, $name, $alias = null, $check_existance = null)
 {
     $check_existance = empty($check_existance) ? DATABASE_CHECK_COLUMNS : $check_existance;
     parent::__construct($resource, $name, $check_existance);
     if ($alias) {
         $this->setAlias($alias);
     }
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:15,代码来源:Field.php

示例4: __construct

 public function __construct($columnName, $maximumLength, $defaultValue = "")
 {
     parent::__construct($columnName, $defaultValue);
     if (!is_numeric($maximumLength)) {
         throw new \InvalidArgumentException("maximumLength must be numeric");
     }
     $this->maximumLength = $maximumLength;
 }
开发者ID:samnotsowise,项目名称:Module.Stem,代码行数:8,代码来源:String.php

示例5: __construct

 public function __construct($name, $columnHeader, $params = array())
 {
     parent::__construct($name, $columnHeader, $params);
     if (isset($params['sortField']) && !is_null($params['sortField'])) {
         $this->sortField = $params['sortField'];
     } else {
         $this->sortField = lcfirst($this->name);
     }
 }
开发者ID:KoenraadM,项目名称:ListBundle,代码行数:9,代码来源:ODMColumn.php

示例6: __construct

 public function __construct($idProperty = 'id')
 {
     parent::__construct('_checkbox', '<input type="checkbox" class="check-all" name="check-all"/>', array('required' => true, 'sortable' => false, 'searchable' => false, 'formatter' => function ($record, $col) use($idProperty) {
         // If record is an object, try to call $record->getId(), then $record->id
         if (is_object($record)) {
             $func = $this->camelize('get_' . $idProperty);
             if (is_callable(array($record, $func))) {
                 $id = call_user_func(array($record, $func));
             } else {
                 $id = $record->{$idProperty};
             }
         } else {
             // Else record is an array, simply access the wanted property
             $id = $record[$idProperty];
         }
         $id = htmlspecialchars($id);
         return '<input type="checkbox" class="check-row" name="check[' . $id . ']"/>';
     }));
 }
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:19,代码来源:CheckboxColumn.php

示例7: __construct

 /**
  * @param string $name
  * @param string $field
  * @param string $entityField
  * @param array $options
  */
 public function __construct($name, $field, $entityField, array $options = [])
 {
     $this->entityField = $entityField;
     $pos = strpos($field, '.');
     if (false !== $pos) {
         $fields = $field;
         while (false !== $pos) {
             $sub = substr($fields, 0, $pos);
             $this->prefixes[] = EntityColumn::createEntityPrefix($sub);
             $fields = substr($fields, $pos + 1);
             $pos = strpos($fields, '.');
             if (false === $pos && 0 < strlen($fields)) {
                 $pos = strlen($fields);
             }
         }
     } else {
         $this->prefixes[] = self::createEntityPrefix($field);
     }
     parent::__construct($name, $field, $options);
 }
开发者ID:uvoelkel,项目名称:serverside-datatables-bundle,代码行数:26,代码来源:EntityColumn.php

示例8: __construct

 public function __construct($actions, $idProperty = 'id')
 {
     global $l;
     parent::__construct('_actions', $l->g(1381), array('required' => true, 'sortable' => false, 'searchable' => false, 'formatter' => function ($record, $col) use($actions, $idProperty) {
         // If record is an object, try to call $record->getId(), then $record->id
         if (is_object($record)) {
             $func = $this->camelize('get_' . $idProperty);
             if (is_callable(array($record, $func))) {
                 $id = call_user_func(array($record, $func));
             } else {
                 $id = $record->{$idProperty};
             }
         } else {
             // Else record is an array, simply access the wanted property
             $id = $record[$idProperty];
         }
         $id = htmlspecialchars($id);
         $actionHtml = '';
         foreach ($actions as $url => $class) {
             $actionHtml .= '<a href="' . $url . $id . '" class="row-action">' . '<span class="' . $class . '"></span>' . '</a>';
         }
         return $actionHtml;
     }));
 }
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:24,代码来源:ActionsColumn.php

示例9: __construct

 /**
  * @param Grido\Grid $grid
  * @param string $name
  * @param string $label
  * @param int $decimals number of decimal points
  * @param string $decPoint separator for the decimal point
  * @param string $thousandsSep thousands separator
  */
 public function __construct($grid, $name, $label, $decimals = NULL, $decPoint = NULL, $thousandsSep = NULL)
 {
     parent::__construct($grid, $name, $label);
     $this->setNumberFormat($decimals, $decPoint, $thousandsSep);
 }
开发者ID:cujan,项目名称:atlashornin,代码行数:13,代码来源:Number.php

示例10: __construct

 public function __construct($column, $name, $format = 'j.n.Y')
 {
     parent::__construct($column, $name);
     $this->format = $format;
 }
开发者ID:vsek,项目名称:grid,代码行数:5,代码来源:Date.php

示例11: __construct

 public function __construct($name, $label, $format = 'd/m/Y')
 {
     parent::__construct($name, $label);
     $this->format = $format;
 }
开发者ID:drahak,项目名称:tables,代码行数:5,代码来源:DateTimeColumn.php

示例12: __construct

 public function __construct($name, $flags, $extra = array())
 {
     parent::__construct($name, $flags, $extra);
 }
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:4,代码来源:papercolumn.php

示例13: __construct

 public function __construct()
 {
     parent::__construct(array('id' => self::ID, 'title' => '', 'size' => 15, 'filterable' => true, 'sortable' => false, 'source' => false, 'align' => 'center'));
 }
开发者ID:deeky666,项目名称:APYDataGridBundle,代码行数:4,代码来源:MassActionColumn.php

示例14: __construct

 public function __construct($column, $name, $languageId)
 {
     parent::__construct($column, $name);
     $this->languageId = $languageId;
 }
开发者ID:vsek,项目名称:translate,代码行数:5,代码来源:Translate.php

示例15: __construct

 public function __construct($column, $name, $table)
 {
     parent::__construct($column, $name);
     $this->table = $table;
     $this->setOrdering(false);
 }
开发者ID:vsek,项目名称:grid,代码行数:6,代码来源:HasOne.php


注:本文中的Column::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。