private function decodeContentTypesFromText($text)
    {
        $contenttypes = [];

        if ((substr($text, 0, 1) == '(') &&
            (substr($text, -1) == ')')
        ) {
            $contenttypes = explode(',', substr($text, 1, -1));
        } else {
            $contenttypes[] = $text;
        }

        $instance = $this;
        $contenttypes = array_map(
            function ($name) use ($instance) {
                $ct = $instance->getContentType($name);

                return $ct['slug'];
            },
            $contenttypes
        );

        return $contenttypes;
    }
private function decodeContentTypesFromText($text)
    {
        $contenttypes = [];

        if ((substr($text, 0, 1) == '(') &&
            (substr($text, -1) == ')')
        ) {
            $contenttypes = explode(',', substr($text, 1, -1));
        } else {
            $contenttypes[] = $text;
        }

        $instance = $this;
        $contenttypes = array_map(
            function ($name) use ($instance) {
                $ct = $instance->getContentType($name);

                return $ct['slug'];
            },
            $contenttypes
        );

        return $contenttypes;
    }
private function decodeContentTypesFromText ( $ text ) { $ contenttypes = [ ] ; if ( ( substr ( $ text , 0 , 1 ) == '(' ) && ( substr ( $ text , - 1 ) == ')' ) ) { $ contenttypes = explode ( ',' , substr ( $ text , 1 , - 1 ) ) ; } else { $ contenttypes [ ] = $ text ; } $ instance = $ this ; $ contenttypes = array_map ( function ( $ name ) use ( $ instance ) { $ ct = $ instance -> getContentType ( $ name ) ; return $ ct [ 'slug' ] ; } , $ contenttypes ) ; return $ contenttypes ; }
Decode a contenttypes argument from text.

(entry,page) -> ['entry', 'page']
event -> ['event']

@param string $text text with contenttypes

@return array array with contenttype(slug)s
Decode a contenttypes argument from text .