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


PHP Grid\Extended类代码示例

本文整理汇总了PHP中Magento\Backend\Block\Widget\Grid\Extended的典型用法代码示例。如果您正苦于以下问题:PHP Extended类的具体用法?PHP Extended怎么用?PHP Extended使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: _prepareColumns

 /**
  * Prepare columns
  * @return \Magento\Backend\Block\Widget\Grid\Extended
  */
 protected function _prepareColumns()
 {
     $this->addColumn('ip', ['header' => __('IP'), 'index' => 'ip', 'renderer' => "\\Wyomind\\Watchlog\\Block\\Adminhtml\\Attempts\\Renderer\\Ip"]);
     $this->addColumn('date', ['header' => __('Last Attempts'), 'index' => 'date', 'type' => 'datetime']);
     $this->addColumn('attempts', ['header' => __('Attempts'), 'index' => 'attempts']);
     $this->addColumn('failed', ['header' => __('Failed'), 'index' => 'failed']);
     $this->addColumn('succeeded', ['header' => __('Succeeded'), 'index' => 'succeeded']);
     return parent::_prepareColumns();
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:13,代码来源:Grid.php

示例2: _prepareColumns

 /**
  * Prepare columns
  *
  * @return \Magento\Backend\Block\Widget\Grid\Extended
  */
 protected function _prepareColumns()
 {
     $this->addColumn('news_id', ['header' => __('ID'), 'index' => 'news_id']);
     $this->addColumn('title', ['header' => __('Title'), 'index' => 'title']);
     $this->addColumn('author', ['header' => __('Author'), 'index' => 'author']);
     $this->addColumn('published_at', ['header' => __('Published On'), 'index' => 'published_at', 'type' => 'date', 'header_css_class' => 'col-date', 'column_css_class' => 'col-date']);
     $this->addColumn('created_at', ['header' => __('Created'), 'index' => 'created_at', 'type' => 'datetime', 'header_css_class' => 'col-date', 'column_css_class' => 'col-date']);
     $this->addColumn('action', ['header' => __('Edit'), 'type' => 'action', 'getter' => 'getId', 'actions' => [['caption' => __('Edit'), 'url' => ['base' => '*/*/edit', 'params' => ['store' => $this->getRequest()->getParam('store')]], 'field' => 'news_id']], 'sortable' => false, 'filter' => false, 'header_css_class' => 'col-action', 'column_css_class' => 'col-action']);
     return parent::_prepareColumns();
 }
开发者ID:dineshmalekar,项目名称:magento2-extension-example,代码行数:15,代码来源:Grid.php

示例3: _prepareColumns

 /**
  * @return \Magento\Backend\Block\Widget\Grid\Extended
  */
 protected function _prepareColumns()
 {
     $this->addColumn('name', ['header' => __('Product'), 'index' => 'name', 'header_css_class' => 'col-product', 'column_css_class' => 'col-product']);
     $this->addColumn('link_title', ['header' => __('Link'), 'index' => 'link_title', 'header_css_class' => 'col-link', 'column_css_class' => 'col-link']);
     $this->addColumn('sku', ['header' => __('SKU'), 'index' => 'sku', 'header_css_class' => 'col-sku', 'column_css_class' => 'col-sku']);
     $this->addColumn('purchases', ['header' => __('Purchases'), 'width' => '215px', 'align' => 'right', 'filter' => false, 'index' => 'purchases', 'type' => 'number', 'renderer' => 'Magento\\Reports\\Block\\Adminhtml\\Product\\Downloads\\Renderer\\Purchases', 'header_css_class' => 'col-purchases', 'column_css_class' => 'col-purchases']);
     $this->addColumn('downloads', ['header' => __('Downloads'), 'width' => '215px', 'align' => 'right', 'filter' => false, 'index' => 'downloads', 'type' => 'number', 'header_css_class' => 'col-qty', 'column_css_class' => 'col-qty']);
     $this->addExportType('*/*/exportDownloadsCsv', __('CSV'));
     $this->addExportType('*/*/exportDownloadsExcel', __('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:14,代码来源:Grid.php

示例4: __construct

 /**
  * Information constructor.
  *
  * @param \Dotdigitalgroup\Email\Model\Apiconnector\Test $test
  * @param \Magento\Backend\Block\Template\Context        $context
  * @param \Magento\Backend\Helper\Data                   $backendHelper
  * @param \Dotdigitalgroup\Email\Helper\Data             $helper
  * @param array                                          $data
  */
 public function __construct(\Dotdigitalgroup\Email\Model\Apiconnector\Test $test, \Magento\Backend\Block\Template\Context $context, \Magento\Backend\Helper\Data $backendHelper, \Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Framework\App\ProductMetadataFactory $productMetadata, array $data = [])
 {
     $this->productMetadata = $productMetadata->create();
     $this->test = $test;
     $this->data = $helper;
     parent::__construct($context, $backendHelper, $data);
 }
开发者ID:dotmailer,项目名称:dotmailer-magento2-extension,代码行数:16,代码来源:Information.php

示例5: _prepareColumns

 /**
  * @return $this
  * @throws \Exception
  */
 protected function _prepareColumns()
 {
     $this->addColumn('username', ['header' => __('Username'), 'index' => 'username']);
     $this->addColumn('firstname', ['header' => __('First Name'), 'index' => 'firstname']);
     $this->addColumn('lastname', ['header' => __('Last Name'), 'index' => 'lastname']);
     return parent::_prepareColumns();
 }
开发者ID:mirasvit,项目名称:module-blog,代码行数:11,代码来源:Grid.php

示例6: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('chooser_id', ['header' => __('ID'), 'align' => 'right', 'index' => 'block_id', 'width' => 50]);
     $this->addColumn('chooser_title', ['header' => __('Title'), 'align' => 'left', 'index' => 'title']);
     $this->addColumn('chooser_identifier', ['header' => __('Identifier'), 'align' => 'left', 'index' => 'identifier']);
     $this->addColumn('chooser_is_active', ['header' => __('Status'), 'index' => 'is_active', 'type' => 'options', 'options' => [0 => __('Disabled'), 1 => __('Enabled')]]);
     return parent::_prepareColumns();
 }
开发者ID:mrtuvn,项目名称:m2ce.dev,代码行数:8,代码来源:Chooser.php

示例7: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('slider_id', ['header' => __('ID'), 'type' => 'number', 'index' => 'slider_id', 'header_css_class' => 'col-id', 'column_css_class' => 'col-id']);
     $this->addColumn('title', ['header' => __('Title'), 'index' => 'title', 'class' => 'xxx', 'width' => '50px']);
     $this->addColumn('status', ['header' => __('Status'), 'index' => 'status', 'type' => 'options', 'options' => $this->getOptionStatuses()]);
     $this->addColumn('edit', ['header' => __('Edit'), 'type' => 'action', 'getter' => 'getId', 'actions' => [['caption' => __('Edit'), 'url' => ['base' => '*/*/edit'], 'field' => 'slider_id']], 'filter' => false, 'sortable' => false, 'index' => 'stores', 'header_css_class' => 'col-action', 'column_css_class' => 'col-action']);
     return parent::_prepareColumns();
 }
开发者ID:hientruongbluecom,项目名称:cemagento2,代码行数:8,代码来源:Grid.php

示例8: _prepareColumns

 /**
  * {@inheritdoc}
  */
 protected function _prepareColumns()
 {
     $this->addColumn('term', ['header' => __('Stopword'), 'type' => 'text', 'index' => 'term']);
     if (!$this->storeManager->isSingleStoreMode()) {
         $this->addColumn('store_id', ['header' => __('Store'), 'type' => 'store', 'index' => 'store_id']);
     }
     return parent::_prepareColumns();
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:11,代码来源:Grid.php

示例9: _prepareColumns

 /**
  *
  * @return $this
  * @throws \Exception
  * @throws \Magento\Framework\Exception\LocalizedException
  */
 protected function _prepareColumns()
 {
     $this->addColumn('email_contact_id', ['header' => __('Contact ID'), 'type' => 'number', 'index' => 'email_contact_id', 'header_css_class' => 'col-id', 'column_css_class' => 'col-id'])->addColumn('email', ['header' => __('Email'), 'type' => 'text', 'index' => 'email', 'class' => 'xxx'])->addColumn('customer_id', ['header' => __('Customer ID'), 'type' => 'number', 'index' => 'customer_id'])->addColumn('is_guest', ['header' => __('Is Guest'), 'type' => 'options', 'index' => 'is_guest', 'options' => ['0' => 'Guest', '1' => 'Not Guest']])->addColumn('is_subscriber', ['header' => __('Is Subscriber'), 'index' => 'is_subscriber', 'type' => 'options', 'options' => ['0' => 'Not Subscriber', '1' => 'Subscriber'], 'escape' => true])->addColumn('subscriber_status', ['header' => 'Subscriber Status', 'align' => 'center', 'index' => 'subscriber_status', 'type' => 'options', 'options' => ['1' => 'Subscribed', '2' => 'Not Active', '3' => 'Unsubscribed', '4' => 'Unconfirmed'], 'escape' => true])->addColumn('email_imported', ['header' => __('Email Imported'), 'align' => 'center', 'index' => 'email_imported', 'escape' => true, 'type' => 'options', 'options' => $this->_importerFactory->create()->getOptions(), 'renderer' => 'Dotdigitalgroup\\Email\\Block\\Adminhtml\\Column\\Renderer\\Imported'])->addColumn('subscriber_imported', array('header' => __('Subscriber Imported'), 'sortable' => false, 'align' => 'center', 'index' => 'subscriber_imported', 'escape' => true, 'type' => 'options', 'renderer' => 'Dotdigitalgroup\\Email\\Block\\Adminhtml\\Column\\Renderer\\Imported', 'options' => $this->_importerFactory->create()->getOptions()))->addColumn('suppressed', array('header' => __('Suppressed'), 'align' => 'right', 'index' => 'suppressed', 'escape' => true, 'type' => 'options', 'options' => ['1' => 'Suppressed', 'null' => 'Not Suppressed'], 'filter_condition_callback' => array($this, '_filterCallbackContact')))->addColumn('website_id', array('header' => __('Website'), 'align' => 'center', 'type' => 'options', 'options' => $this->_storeFactory->create()->getWebsiteOptionHash(true), 'index' => 'website_id'));
     $block = $this->getLayout()->getBlock('grid.bottom.links');
     if ($block) {
         $this->setChild('grid.bottom.links', $block);
     }
     return parent::_prepareColumns();
 }
开发者ID:dragonsword007008,项目名称:magento2,代码行数:15,代码来源:Grid.php

示例10: _prepareColumns

 /**
  * Prepare default grid column
  *
  * @return $this
  */
 protected function _prepareColumns()
 {
     parent::_prepareColumns();
     $this->addColumn('attribute_code', ['header' => __('Attribute Code'), 'sortable' => true, 'index' => 'attribute_code', 'header_css_class' => 'col-attr-code', 'column_css_class' => 'col-attr-code']);
     $this->addColumn('frontend_label', ['header' => __('Default label'), 'sortable' => true, 'index' => 'frontend_label', 'header_css_class' => 'col-label', 'column_css_class' => 'col-label']);
     $this->addColumn('is_required', ['header' => __('Required'), 'sortable' => true, 'index' => 'is_required', 'type' => 'options', 'options' => ['1' => __('Yes'), '0' => __('No')], 'header_css_class' => 'col-required', 'column_css_class' => 'col-required']);
     $this->addColumn('is_user_defined', ['header' => __('System'), 'sortable' => true, 'index' => 'is_user_defined', 'type' => 'options', 'options' => ['0' => __('Yes'), '1' => __('No')], 'header_css_class' => 'col-system', 'column_css_class' => 'col-system']);
     return $this;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:14,代码来源:AbstractGrid.php

示例11: _prepareColumns

 /**
  * Define grid columns
  *
  * @return $this
  */
 protected function _prepareColumns()
 {
     $this->addColumn('code', ['header' => __('Coupon Code'), 'index' => 'code']);
     $this->addColumn('created_at', ['header' => __('Created'), 'index' => 'created_at', 'type' => 'datetime', 'align' => 'center', 'width' => '160']);
     $this->addColumn('used', ['header' => __('Uses'), 'index' => 'times_used', 'width' => '100', 'type' => 'options', 'options' => [__('No'), __('Yes')], 'renderer' => 'Magento\\SalesRule\\Block\\Adminhtml\\Promo\\Quote\\Edit\\Tab\\Coupons\\Grid\\Column\\Renderer\\Used', 'filter_condition_callback' => [$this->_salesRuleCoupon->create(), 'addIsUsedFilterCallback']]);
     $this->addColumn('times_used', ['header' => __('Times Used'), 'index' => 'times_used', 'width' => '50', 'type' => 'number']);
     $this->addExportType('*/*/exportCouponsCsv', __('CSV'));
     $this->addExportType('*/*/exportCouponsXml', __('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:15,代码来源:Grid.php

示例12: _prepareColumns

 /**
  * @return $this
  */
 protected function _prepareColumns()
 {
     $this->addColumn('firstname', ['header' => __('First Name'), 'index' => 'firstname']);
     $this->addColumn('lastname', ['header' => __('Last Name'), 'index' => 'lastname']);
     $this->addColumn('email', ['header' => __('Email'), 'index' => 'email']);
     $this->addColumn('add_date', ['header' => __('Subscribe Date'), 'index' => 'add_date', 'type' => 'date']);
     $this->addColumn('send_date', ['header' => __('Last Notified'), 'index' => 'send_date', 'type' => 'date']);
     $this->addColumn('send_count', ['header' => __('Send Count'), 'index' => 'send_count']);
     return parent::_prepareColumns();
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:13,代码来源:Stock.php

示例13: _prepareColumns

 /**
  * Initialize grid report review columns
  *
  * @return $this
  */
 protected function _prepareColumns()
 {
     $this->addColumn('nickname', ['header' => __('Customer'), 'width' => '100px', 'index' => 'nickname']);
     $this->addColumn('title', ['header' => __('Title'), 'width' => '150px', 'index' => 'title']);
     $this->addColumn('detail', ['header' => __('Detail'), 'index' => 'detail']);
     $this->addColumn('created_at', ['header' => __('Created'), 'index' => 'created_at', 'width' => '200px', 'type' => 'datetime']);
     $this->setFilterVisibility(false);
     $this->addExportType('*/*/exportProductDetailCsv', __('CSV'));
     $this->addExportType('*/*/exportProductDetailExcel', __('Excel XML'));
     return parent::_prepareColumns();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:16,代码来源:Grid.php

示例14: _prepareColumns

 protected function _prepareColumns()
 {
     $this->addColumn('job-code', ['header' => __('Job Code'), 'index' => 'job_code']);
     $status_options = [\Magento\Cron\Model\Schedule::STATUS_PENDING => \Magento\Cron\Model\Schedule::STATUS_PENDING, \Magento\Cron\Model\Schedule::STATUS_RUNNING => \Magento\Cron\Model\Schedule::STATUS_RUNNING, \Magento\Cron\Model\Schedule::STATUS_SUCCESS => \Magento\Cron\Model\Schedule::STATUS_SUCCESS, \Magento\Cron\Model\Schedule::STATUS_MISSED => \Magento\Cron\Model\Schedule::STATUS_MISSED, \Magento\Cron\Model\Schedule::STATUS_ERROR => \Magento\Cron\Model\Schedule::STATUS_ERROR];
     $this->addColumn('status', ['header' => __('Status'), 'index' => 'status', 'type' => 'options', 'options' => $status_options]);
     $this->addColumn('created-at', ['header' => __('Created At'), 'index' => 'created_at', 'type' => 'datetime', 'filter_time' => true]);
     $this->addColumn('scheduled-at', ['header' => __('Scheduled At'), 'index' => 'scheduled_at', 'type' => 'datetime', 'filter_time' => true]);
     $this->addColumn('executed-at', ['header' => __('Executed At'), 'index' => 'executed_at', 'type' => 'datetime', 'filter_time' => true]);
     $this->addColumn('finished-at', ['header' => __('Finished At'), 'index' => 'finished_at', 'type' => 'datetime', 'filter_time' => true]);
     return parent::_prepareColumns();
 }
开发者ID:CelebrosLtd,项目名称:M2_Celexport,代码行数:11,代码来源:Tasks.php

示例15: _prepareColumns

 /**
  * @return $this
  */
 protected function _prepareColumns()
 {
     $this->addColumn('firstname', ['header' => __('First Name'), 'index' => 'firstname']);
     $this->addColumn('lastname', ['header' => __('Last Name'), 'index' => 'lastname']);
     $this->addColumn('email', ['header' => __('Email'), 'index' => 'email']);
     $this->addColumn('price', ['header' => __('Price'), 'index' => 'price', 'type' => 'currency', 'currency_code' => $this->_scopeConfig->getValue(\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_BASE, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)]);
     $this->addColumn('add_date', ['header' => __('Subscribe Date'), 'index' => 'add_date', 'type' => 'date']);
     $this->addColumn('last_send_date', ['header' => __('Last Notified'), 'index' => 'last_send_date', 'type' => 'date']);
     $this->addColumn('send_count', ['header' => __('Send Count'), 'index' => 'send_count']);
     return parent::_prepareColumns();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:14,代码来源:Price.php


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