private function getItemModelOptions(Model $itemModel, $options = [])
    {
        $itemOptions = [];
        foreach ($options as $option) {
            $itemOptions[$option] = $this->getFromModel($itemModel, $option);
        }

        return array_filter($itemOptions, function ($value) {
            if ($value !== false && empty($value)) {
                return false;
            }

            return true;
        });
    }
private function getItemModelOptions(Model $itemModel, $options = [])
    {
        $itemOptions = [];
        foreach ($options as $option) {
            $itemOptions[$option] = $this->getFromModel($itemModel, $option);
        }

        return array_filter($itemOptions, function ($value) {
            if ($value !== false && empty($value)) {
                return false;
            }

            return true;
        });
    }
private function getItemModelOptions ( Model $ itemModel , $ options = [ ] ) { $ itemOptions = [ ] ; foreach ( $ options as $ option ) { $ itemOptions [ $ option ] = $ this -> getFromModel ( $ itemModel , $ option ) ; } return array_filter ( $ itemOptions , function ( $ value ) { if ( $ value !== false && empty ( $ value ) ) { return false ; } return true ; } ) ; }
Gets the item models options based the config.

@param Model $itemModel
@param array $options

@return array
Gets the item models options based the config .