protected function getStructureForPrototypeName($prototypeStructures, $prototypeName)
    {
        foreach ($prototypeStructures as $structure) {
            if (preg_match(sprintf('!%s!', $structure['match']), $prototypeName)) {
                return $structure;
            }
        }

        return [
            'label' => 'Other',
            'icon' => 'icon-question',
            'color' => 'white'
        ];
    }
protected function getStructureForPrototypeName($prototypeStructures, $prototypeName)
    {
        foreach ($prototypeStructures as $structure) {
            if (preg_match(sprintf('!%s!', $structure['match']), $prototypeName)) {
                return $structure;
            }
        }

        return [
            'label' => 'Other',
            'icon' => 'icon-question',
            'color' => 'white'
        ];
    }
protected function getStructureForPrototypeName ( $ prototypeStructures , $ prototypeName ) { foreach ( $ prototypeStructures as $ structure ) { if ( preg_match ( sprintf ( '!%s!' , $ structure [ 'match' ] ) , $ prototypeName ) ) { return $ structure ; } } return [ 'label' => 'Other' , 'icon' => 'icon-question' , 'color' => 'white' ] ; }
Find the matching structure for a prototype

@param $prototypeStructures
@param $prototypeName
@return array
Find the matching structure for a prototype