We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36425
    • 49 Posts
    hi again!
    i have one question more.

    i have a getlist.class.php

    class OStoreGetListProcessor extends modObjectGetListProcessor {
        public $classKey = 'osEvent';
        public $languageTopics = array('ostore:default');
        public $defaultSortField = 'name';
        public $defaultSortDirection = 'ASC';
        public $objectType = 'ostore.event';
    }
    return 'OStoreGetListProcessor';


    in my grid i what to create a column that i want do from processor.

    js for example
    ,{
                header: 'my column'
                ,dataIndex: 'anouther'
                ,sortable: false
    }


    how i can create this column in my processor?
    it does not exist in the database, i want to do it with my options in php. for each object a unique option [ed. note: gaserge last edited this post 14 years, 4 months ago.]
      • 36425
      • 49 Posts
      oh it so easy...
      solved it by using afterIteration method

          public function afterIteration( $list ) {
              //$list['anouther'] = '0';
              foreach( $list as &$val ) {
                  $val['anouther'] = 1;
              }
              file_put_contents( dirname(__FILE__).'/watch.txt', json_encode($list) );
              return $list;
          }