Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiny improvement on render() method in Magento\Backend\Block\Widget\Grid\Column\Ren... #667

Commits on Sep 16, 2014

  1. Improved render() method in Magento\Backend\Block\Widget\Grid\Column\…

    …Renderer\Concat
    
    which allows now calls to any method on a model.
    
    Configuration in adminhtml grid can look like this:
    
    ```php
            $this->addColumn('product_price', array(
                'header'    => __('RRP incl. Tax<br>Sales Prices incl. Tax'),
                'getter'    => ['returnProductPrice', 'getProductFinalPrice'],
                'align'     => 'right',
                'type'  => 'concat',
                'separator' => '<br>',
            ));
    ```
    
    or this
    
    ```php
            $this->addColumn('product_price2', array(
                'header'    => __('RRP incl. Tax<br>SP&nbsp;&nbsp;&nbsp; incl. Tax'),
                'index'    => ['product_price', 'product_final_price'],
                'align'     => 'right',
                'type'  => 'concat',
                'separator' => '<br>',
            ));
    ```
    SchumacherFM committed Sep 16, 2014
    Configuration menu
    Copy the full SHA
    b72b0e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa3849e View commit details
    Browse the repository at this point in the history