#PHP getter method
/**
* Getter of $${PARAM_NAME}
*
* @return ${TYPE_HINT}
*/
#if (${TYPE_HINT} == "bool" || ${TYPE_HINT} == "boolean")
public ${STATIC} function ${PARAM_NAME}()
| import json | |
| import urllib2 | |
| import sys | |
| import time | |
| from Foundation import NSUserNotification | |
| from Foundation import NSUserNotificationCenter | |
| from Foundation import NSUserNotificationDefaultSoundName | |
| orderId = sys.argv[1] | |
| step = previousStep = None |
#PHP getter method
/**
* Getter of $${PARAM_NAME}
*
* @return ${TYPE_HINT}
*/
#if (${TYPE_HINT} == "bool" || ${TYPE_HINT} == "boolean")
public ${STATIC} function ${PARAM_NAME}()
| <?php | |
| // (string) $message - message to be passed to Slack | |
| // (string) $room - room in which to write the message, too | |
| // (string) $icon - You can set up custom emoji icons to use with each message | |
| public static function slack($message, $room = "engineering", $icon = ":longbox:") { | |
| $room = ($room) ? $room : "engineering"; | |
| $data = "payload=" . json_encode(array( | |
| "channel" => "#{$room}", | |
| "text" => $message, |
| class BootstrapFormBuilder < ActionView::Helpers::FormBuilder | |
| def get_error_text(object, field, options) | |
| if object.nil? || options[:hide_errors] | |
| "" | |
| else | |
| errors = object.errors[field.to_sym] | |
| if errors.empty? then "" else errors.first end | |
| end | |
| end |