<commit_before><?php
/**
 * Created by PhpStorm.
 * User: jhelbing
 * Date: 02.02.16
 * Time: 11:10
 */

namespace Enhavo\Bundle\AppBundle\Table\Widget;

use Enhavo\Bundle\AppBundle\Table\AbstractTableWidget;

class PropertyWidget extends AbstractTableWidget
{
    public function render($options, $item)
    {
        return $this->getProperty($item, $options['property']);
    }

    public function getType()
    {
        return 'property';
    }
}<commit_msg>add path option<commit_after><?php
/**
 * Created by PhpStorm.
 * User: jhelbing
 * Date: 02.02.16
 * Time: 11:10
 */

namespace Enhavo\Bundle\AppBundle\Table\Widget;

use Enhavo\Bundle\AppBundle\Table\AbstractTableWidget;

class PropertyWidget extends AbstractTableWidget
{
    public function render($options, $item)
    {
        $path = $this->getOption('path', $options);
        $resource =  $this->getProperty($item, $options['property']);

        if($path != null) {
            $resource = $this->getProperty($resource , $path);
        }

        return $resource;
    }

    public function getType()
    {
        return 'property';
    }
}
{'fraction_non_alphanumeric': 0.1378692927484333, 'fraction_numerical': 0.017905102954341987, 'mean_word_length': 3.036101083032491, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1789804', 'n_tokens_mistral': 359, 'n_tokens_neox': 344, 'n_words': 72}