Created
July 21, 2015 11:18
-
-
Save St0iK/56a3492473483bdf5dc2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Implements hook_block_info(). | |
| */ | |
| function creode_product_types_block_block_info() | |
| { | |
| $blocks = array(); | |
| $blocks['product_types_block'] = array( | |
| 'info' => t('Product types'), | |
| ); | |
| return $blocks; | |
| } | |
| /** | |
| * Implements hook_block_view(). | |
| */ | |
| function creode_product_types_block_block_view($delta = '') | |
| { | |
| $block = array(); | |
| switch ($delta) { | |
| case 'product_types_block': | |
| $block['subject'] = ''; | |
| $block['content'] = _product_types_block_content(); | |
| break; | |
| } | |
| return $block; | |
| } | |
| function _product_types_block_content() | |
| { | |
| $last_url_key = end(explode('/', current_path())); | |
| $output = ""; | |
| $output .= "<select id='facetapi_select_facet_form_1' class='form-select form-item'>"; | |
| $output .= "<optgroup label='Audio'>"; | |
| $output .= "<option value='/product-line/type/audio-pmic-audio'>PMIC + Audio</option>"; | |
| $output .= "<option value='/product-line/type/audio-codecs'>Audio CODECs</option>"; | |
| $output .= "<option value='/product-line/type/audio-amplifiers'>Audio amplifiers</option>"; | |
| $output .= "</optgroup>"; | |
| $output .= "<optgroup label='Connectivity'>"; | |
| $output .= "<option value='/product-line/type/bluetooth-smart'>Bluetooth® Smart</option>"; | |
| // $output .= "<option value='/product-line/type/smartbond-development-tools'>SmartBond Development Tools</option>"; | |
| $output .= "<option value='/product-line/type/voice-over-dect'>Voice over DECT</option>"; | |
| $output .= "<option value='/product-line/type/voice-over-ip'>Voice over IP</option>"; | |
| $output .= "</optgroup>"; | |
| $output .= "<optgroup label='Lighting'>"; | |
| $output .= "<option value='/product-line/type/led-drivers-solid-state-lighting'>SSL LED Drivers</option>"; | |
| $output .= "<option value='/product-line/type/led-drivers-backlighting'>Backligh LED Drivers</option>"; | |
| $output .= "</optgroup>"; | |
| $output .= "<optgroup label='Power Conversion'>"; | |
| $output .= "<option value='/product-line/type/acdc-embedded'>AC/DC - Embedded</option>"; | |
| $output .= "<option value='/product-line/type/acdc-power-adapters'>AC/DC - Power Adapters</option>"; | |
| $output .= "<option value='/product-line/type/acdc-rapid-charge-solutions'>AC/DC - Rapid Charge™ Solutions</option>"; | |
| // $output .= "<option value='/product-line/type/acdc-converters'>AC/DC Converters</option>"; | |
| $output .= "</optgroup>"; | |
| $output .= "<option value='0'>--Choose--</option>"; | |
| $output .= "<optgroup label='Power management'>"; | |
| $output .= "<option value='/product-line/type/system-pmics'>System PMICs</option>"; | |
| $output .= "<option value='/product-line/type/power-management-pmic-audio'>PMIC + Audio</option>"; | |
| $output .= "<option value='/product-line/type/embedded-pmics'>Embedded PMICs</option>"; | |
| $output .= "</optgroup>"; | |
| $output .= "<optgroup label='Sensors'>"; | |
| $output .= "<option value='/product-line/type/multi-touch'>Multi-Touch</option>"; | |
| $output .= "</optgroup>"; | |
| // $output .= "<option value='/product-line/type/audio-reference-designs'>Audio reference designs</option>"; | |
| $output .= "</select>"; | |
| return $output; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment