src/NodePub/Common/Collections/TaggedCollection.php
public function getTaggings()
    {
        if (is_null($this->taggings)) {
            foreach ($this as $key => $item) {
                if (empty($item['tags'])) {
                    continue;
                }
                foreach ($item['tags'] as $tagging) {
                    if (!in_array($tagging, array_keys($item['tags']))) {
                        $this->taggings[$tagging] = array();
                    }
                    
                    $this->taggings[$tagging][] = $key;
                }
            }
        }
        
        return $this->taggings;
    }
public function getTaggings()
    {
        if (is_null($this->taggings)) {
            foreach ($this as $key => $item) {
                if (empty($item['tags'])) {
                    continue;
                }
                foreach ($item['tags'] as $tagging) {
                    if (!in_array($tagging, array_keys($item['tags']))) {
                        $this->taggings[$tagging] = array();
                    }
                    
                    $this->taggings[$tagging][] = $key;
                }
            }
        }
        
        return $this->taggings;
    }
public function getTaggings ( ) { if ( is_null ( $ this -> taggings ) ) { foreach ( $ this as $ key => $ item ) { if ( empty ( $ item [ 'tags' ] ) ) { continue ; } foreach ( $ item [ 'tags' ] as $ tagging ) { if ( ! in_array ( $ tagging , array_keys ( $ item [ 'tags' ] ) ) ) { $ this -> taggings [ $ tagging ] = array ( ) ; } $ this -> taggings [ $ tagging ] [ ] = $ key ; } } } return $ this -> taggings ; }
Returns associative array of tags and the slugs of items
with those tags
i.e. 'tagfoo' => array('foo', 'bar')

Caches the result so it does the loop once.
Returns associative array of tags and the slugs of items with those tags i . e . tagfoo = > array ( foo bar )