query
stringlengths
10
8.11k
document
stringlengths
17
398k
negatives
sequencelengths
19
20
metadata
dict
Creates a new order from simple data arrays
public function createFromDataArray(array $data, array $items): Order;
[ "public function reorder(array $data);", "private function _setOrderDataArray()\n {\n foreach ($this->orderCollection->getItems() as $order){\n $this->_prepareOrderStatusArray($order);\n $this->_prepareOrderPaymentArray($order);\n\n $this->_prepareOrderTrackingArray($order);\n $this->_prepareOrderProductsArray($order);\n }\n }", "public function mapArrayToOrder(array $data) :Order\n {\n $orderObj = new Order();\n $orderObj->setId($data['id']);\n $orderObj->setUserId($data['user_id']);\n $orderObj->setStatus($data['status']);\n return $orderObj;\n }", "public function prepare_order(array $order);", "function buildObjects($sortedData) {\n $stores = array();\n foreach($sortedData as $store) {\n // values come in as SimpleXMLElement objects, hence the casting\n $newStore = new Store((string)$store[0], (string)$store[1][0], (string)$store[2][0], floatval($store[3][0][0]), floatval($store[3][1][0]));\n array_push($stores, $newStore);\n }\n return $stores;\n}", "public static function createOrder($data) {\n\t\tif (array_key_exists('id', $data)) unset($data['id']);\n\t\t$order = new Model_Order($data);\n\t\treturn $order;\n\t}", "public function testGetOrderedData()\n {\n $order = array('from', 'to', 'length', 'bearing', 'gradient');\n $data = array('1.1', '1.2', 10, 234, -10);\n $sample = File_Therion_Shot::parse($data, $order);\n $from = $sample->getFrom();\n $to = $sample->getTo();\n \n // swap order\n $sample->setOrder(array_reverse($order));\n \n $this->assertEquals(\n array(-10, 234, 10, $to, $from),\n $sample->getOrderedData()\n );\n }", "protected function sortDataArray() {}", "function buildOrderSimple(array $info = array()) {\n $this->uniqueId = \"PhpSdkOrder1-\" . uniqid();\n $order = new Order(array_replace(array(\n \"id\" => $this->uniqueId,\n \"visitor\" => \"da39a3ee5e6b4b0d3255bfef95601890afd80709\",\n \"total_amount\" => 100.01, // Result approve in test env\n \"shipping_amount\" => 20.00,\n \"tax_amount\" => 3.45,\n \"currency\" => \"BRL\",\n \"installments\" => 2,\n \"ip\" => \"189.68.156.100\",\n \"customer\" => array(\n \"id\" => \"28372\",\n \"name\" => \"Júlia da Silva\",\n \"tax_id\" => \"12345678909\",\n \"dob\" => \"1970-12-25\",\n \"phone1\" => \"11-1234-5678\",\n \"phone2\" => \"21-2143-6578\",\n \"email\" => \"jsilva@exemplo.com.br\",\n \"created_at\" => \"2010-12-25\",\n \"new\" => false,\n \"vip\" => false\n )\n ), $info));\n return $order;\n }", "public function toSortations( array $array );", "private function prepareOrderData($raw_data)\n {\n $prepared_data = [\n 'history' => []\n ];\n \n $accepted_keys = [\n 'tracking_number', 'status', 'subtotal', 'shipping', 'tax', 'fee',\n 'insurance', 'discount', 'total', 'shipping_fee', 'insurance_fee',\n 'transaction_fee'\n ];\n \n foreach ($accepted_keys as $key) {\n $prepared_data[$key] = (!empty($raw_data[$key]) ? $raw_data[$key] : '');\n }\n \n if (!empty($raw_data['tat'])) {\n foreach ($raw_data['tat'] as $status => $timestamp) {\n $prepared_data['history'][$timestamp] = [\n 'date' => date('Y-m-d H:i:s.u', intval($timestamp)),\n 'status' => $status\n ];\n }\n \n ksort($prepared_data['history']);\n $prepared_data['history'] = array_values($prepared_data['history']);\n }\n \n return $prepared_data;\n }", "function array_order_by()\n {\n $args = func_get_args();\n $data = array_shift($args);\n foreach ($args as $n => $field) {\n if (is_string($field)) {\n $tmp[$field] = array();\n foreach ($data as $key => $row)\n $tmp[$field][$key] = $row[$field];\n $args[$n] = &$tmp[$field];\n } else {\n $args[$n] = &$args[$n];\n }\n }\n $args[] = &$data;\n call_user_func_array('array_multisort', $args);\n return array_pop($args);\n }", "public function data_swap() {\n\t\t\t$data = array(\n\t\t\t\tarray(array(array(1, 2)), array(array(2, 1))),\n\t\t\t);\n\t\t\treturn $data;\n\t\t}", "private function reorder($info){ \n //if some order is set \n if(!empty($this->order)) \n { \n //set new order \n $neworder = array(); \n //for each provided input \n foreach($this->order as $val) \n { \n //find it's id in info table \n $id = $this->searchForInput($val, $info); \n //if id found \n if($id) \n { \n //set it in new order \n $neworder[] = $info[$id]; \n //empty old array \n $info[$id] = array(); \n } \n } \n //now let's check if anything is left in info array \n foreach($info as $val) \n { \n //if element is left \n if(!empty($val)) \n { \n //insert it in new order \n $neworder[] = $val; \n } \n } \n return $neworder; \n } \n return $info; \n }", "public function createOrderWith3DSecureDataProvider()\n {\n return array(\n array('else_jcb_3d', true),\n array('else_visa', false),\n array('else_mastercard', false)\n );\n }", "abstract protected function prepareHistoryOrder(array $order);", "protected function Orders_array() {\n\t$tOrd = $this->Engine()->Orders();\n\t$idCust = $this->GetKeyValue();\n\t$arRow = NULL;\n\t$arOrd = NULL;\n\n\t// collect orders where customer is BUYER (B)\n\t$rs = $tOrd->GetData('ID_Buyer='.$idCust);\n\twhile ($rs->NextRow()) {\n\t $idOrd = $rs->GetKeyValue();\n\t $arRow = $rs->Values();\n\t fcArray::NzAppend($arRow,'roles','B');\t// append \"B\" to the Roles list\n\t $arOrd[$idOrd] = $arRow;\n\t}\n\n\t// collect orders where customer is RECIPIENT (R)\n\t$rs = $tOrd->GetData('ID_Recip='.$idCust);\n\twhile ($rs->NextRow()) {\n\t $idOrd = $rs->GetKeyValue();\n\t if (fcArray::Exists($arOrd,$idOrd)) {\n\t\t$arRow = $arOrd[$idOrd];\n\t } else {\n\t\t$arRow = $rs->Values();\n\t }\n\t fcArray::NzAppend($arRow,'roles','R');\t// append \"R\" to the Roles list\n\t $arOrd[$idOrd] = $arRow;\n\t}\n\n\treturn $arOrd;\n\n }", "protected function changeStartArrayData1(){\n\t\t\n\t\t$data = array(\n\t\t\t0 => array('A', 'A', 7, 8),\n\t\t\t\t// $data[0][0]: List/Party of new start array\n\t\t\t\t// $data[0][1]: List/Party of old start array\n\t\t\t\t// $data[0][2]: Percentage international of new list/party\n\t\t\t\t// $data[0][3]: Percentage regional of new list/party\n\t\t\t\t\t// About regional area ($this->area[0]) see also remarks in method originalListPercentageData($startArray).\n\t\t\t\t// $data[0][0] + $data[0][1]: Instead of the letters that represent names, later it could be IDs (e.g. numbers),\n\t\t\t\t\t// that are different from the name (and are also not Persistence_Object_Identifier).\n\t\t\t1 => array('B', 'D', 10, 9),\n\t\t\t2 => array('C', 'B', 15, 17),\n\t\t\t3 => array('D', 'C', 33, 32),\n\t\t\t4 => array('E', 'D', 35, 34)\n\t\t);\n\t\treturn $data;\n\t}", "public function createOrder($order);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$sql = "SELECT vmd_user, vmd_pass FROM users_groups WHERE group_id='". $this>session>userdata('group_id') ."' AND vmd_user!='' and vmd_pass!='' LIMIT 1";
function getVMD() { $sql = 'SELECT vmd_user, vmd_pass FROM users_groups WHERE id = ? AND vmd_user != "" and vmd_pass != "" LIMIT 1'; //$query = $this->db->query($sql); $results = \DB::select($sql, array(\Session::get('group_id'))); //if($query->num_rows() > 0) { if(count($results) > 0) { $row = (array) $results[0]; return $row; } else { return false; } }
[ "function get_assessor_by_group()\n { //check User_login and Pass_login in database\n $sql = \"SELECT *\n\t\t\tFROM pefs_database.pef_group_assessor \n WHERE gro_grp_id =? \n\t\t\t\";\n $query = $this->db->query($sql, array($this->gro_grp_id));\n return $query;\n }", "function validate_admin($username,$password){\n $query = $this->db->query(\"SELECT * FROM user_admin WHERE username = '\".$username.\"' AND password = '\".$password.\"' LIMIT 1\");\n return $query;\n }", "function sel_usergroup() {\n // return $query->result();\n $this->db2 = $this->load->database('config1', true);\n $qdata = $this->db2->query(\"SELECT id FROM [user_group]\n\t\t\t\t\t\t\t\t\t\t \");\n return $qdata->result();\n }", "function getNoIdUserInGroup ($idGrouppNo)\n{\n $db = connect();\n $req = \"SELECT id_users FROM groups_member WHERE NOT id_groups = \". $idGrouppNo .\" ;\";\n $query = $db->prepare($req);\n $query->execute(array($idGrouppNo));\n $data = $query->fetchAll(PDO::FETCH_OBJ);\n return $data;\n $query->closeCursor();\n}", "function findNotJoinedGroup($username) {\n $conn = connectDb();\n $username = cleanInput($username, 32, $conn);\n $sql = \"SELECT gid, gname, description FROM Groups WHERE gid NOT IN (SELECT gid FROM GroupMember WHERE uname=?)\";\n $stmt = $conn->prepare($sql);\n $stmt->bind_param('s', $username);\n $stmt->execute();\n $res = $stmt->get_result();\n $result = $res->fetch_all(MYSQLI_ASSOC);\n $conn->close();\n return $result;\n}", "function find_by_groupLevel($level)\n{\n global $db;\n $sql = \"SELECT group_level FROM user_groups WHERE group_level = '{$db->get_escape_string($level)}' LIMIT 1 \";\n $result = $db->run_query($sql);\n\n if ($db->num_rows($result) === 0) {\n return true;\n } else {\n return false;\n }\n}", "function find_by_groupLevel($level)\n{\n global $db;\n $sql = \"SELECT group_level, group_name FROM user_groups WHERE group_level = '{$db->escape($level)}' LIMIT 1 \";\n $result = $db->query($sql);\n return($db->num_rows($result) === 0 ? true : false);\n}", "public function checkGroupMember($query_user_id,$query_group_id){\n $sqlQuery = \"SELECT *\n FROM\n group_user\n WHERE \n USER_ID = ? AND GROUP_ID = ?\";\n $stmt = $this->conn->prepare($sqlQuery);\n\n $stmt->bindParam(1, $query_user_id, PDO::PARAM_INT);\n $stmt->bindParam(2, $query_group_id, PDO::PARAM_INT);\n\n $stmt->execute();\n $stmt_count = $stmt->rowCount();\n if($stmt_count>0){\n return true;\n }else{\n return false;\n } \n }", "function GetUserGroupByUserLogin( $user_login )\n {\n $tmp_db = new DB();\n $q = \"SELECT `group_id` FROM `\".TblSysUser.\"` WHERE `login`='$user_login'\";\n $res = $tmp_db->db_Query( $q );\n //echo '<br>'.$q.' $res='.$res.' $tmp_db->result='.$tmp_db->result;\n if ( !$res OR !$tmp_db->result) { return false;}\n $row = $tmp_db->db_FetchAssoc();\n //\n $group = $row['group_id'];\n //echo '<br> $group='.$group;\n return $group;\n }", "function getUserGroup() {\n return (isset($_SESSION['group'])) ? $_SESSION['group'] : -1;\n}", "static function login($uname,$ps){\n\t\treturn self::db()->getRow(\" uname = '$uname' and ps = '$ps'\");\n\t}", "public function checkAdminLogin(){\n\n $this->username = $this->$dbObj->quote($this->username);\n //first encode the md5 password\n $this->password = $this->$dbObj->quote($this->$gcObj->encodeMD5String($this->password));\n\n echo $this->ad_username;\n echo $this->ad_password;\n\n $result = $this->$dbObj->select(\"select * from admin where username = $this->$ad_username and password = $this->$ad_password and status = 1\");\n echo $result;\n return $result;\n }", "function sumo_verify_group_exist($group='') \r\n{\t\r\n\tGLOBAL $SUMO;\r\n\t\t\r\n\tif(!$group || strlen($group) > 50) \r\n\t{\r\n\t\t//\r\n\t}\t\r\n\telse \r\n\t{\t\t\t\r\n\t\t$query = \"SELECT usergroup FROM \".SUMO_TABLE_GROUPS.\" \r\n\t\t\t\t WHERE usergroup='\".$group.\"'\";\r\n\t\t\t\t\t\t\r\n\t\t$rs = $SUMO['DB']->Execute($query);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\tif($rs->PO_RecordCount(SUMO_TABLE_GROUPS, \"usergroup='\".$group.\"'\") == 0) \r\n\t\t\treturn FALSE;\r\n\t\telse\r\n\t\t\treturn TRUE;\r\n\t}\r\n}", "function check_group_entry ($courseid, $password) {\n $ingroup = false;\n if ( ($groups = get_groups($courseid)) !== false ) {\n foreach ($groups as $group) \n if ( !empty($group->password) and ($password == $group->password) )\n $ingroup = $group->id;\n }\n return $ingroup;\n}", "function getUser_id($email, $password)\n{\n $dbh = connectDB();\n $stmt = $dbh->query(\"SELECT * FROM users WHERE email = '$email' && password = '$password' \");\n return $stmt->fetch(PDO::FETCH_ASSOC); // one to show\n}", "function find_all_current_members(){\n global $db;\n $results = array();\n $sql = \"SELECT m.id,m.name,m.login,m.username,m.group,m.status,\";\n $sql .=\"g.group_name \";\n $sql .=\"FROM members m \";\n $sql .=\"LEFT JOIN member_groups g \";\n $sql .=\"ON g.group_level=m.group WHERE m.status = 0 ORDER BY m.id ASC\";\n $result = find_by_sql($sql);\n return $result;\n}", "function select_session() {\n $this->sql_session = 'SELECT hash_pass FROM usuarios WHERE dni = \"' . $_POST['dni'] . '\"';\n $this->select_sql_session($this->sql_session, new Conexio_db());\n return null;\n }", "function login_backend($user,$psw)\n{\n\tglobal $db,$ros;\n\t\n\t//$psw = md5($psw);\n\t\n\t$sql = 'SELECT admin_id,uname,pwd '.\n\t\t\t'FROM '. $ros->table('admin').\n\t\t\t'WHERE uname = \"'.$user.'\" '.\n\t\t\t'AND pwd = \"'.$psw.'\"'\n\t\t\t;\n\t$info = $db->getOne($sql);\t\t\t\n\treturn $info;\n\t$db->free_result($res);\n}", "function find_by_groupLevel($level) {\n\t$DataBase = MySqlDb::GetInstance();\n $sql = \"SELECT group_level FROM user_groups WHERE group_level = \".$level.\" \"; \n\t$DataBase->Execute($sql);\n\t$result = $DataBase->getData();\n\tif(!$result[0]){\n\t\treturn false;\n\t}else{\n\t\treturn true;\n\t}\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the count of daily active users in the reporting period by product.
function getOffice365ActiveUserCounts($period){ return $this->addReportQuery("getOffice365ActiveUserCounts",$period); }
[ "function logUsersPerDay(){\n \n $time = time() - (60 * 60 * 24);\n $dbq = db_query(\"SELECT count(*) as count FROM users WHERE access>='\". $time .\"' AND status='1'\");\n $all = $dbq -> fetchObject();\n \n $this->setAction('users-active', $all -> count);\n }", "public function getActDailyRecordCount()\n {\n return $this->count(self::_ACT_DAILY_RECORD);\n }", "private function _count_active_user_day($today) {\n $format_date = date('Y-m-d', strtotime($today));\n if ($format_date) {\n $count = Statistic_by_day::where('date', $format_date)->first();\n if ($count) {\n return $count->num_of_user;\n }\n return 0;\n }\n return 0;\n }", "public function getProcessedDailyRecordsCount()\n {\n return Mage::getModel(\"analytic/cronJobDaily\")->getCollection()->count();\n }", "protected function reportProductsActive()\n {\n $productsActiveCount = $this->productManagement->getCount(Status::STATUS_ENABLED);\n /** @var \\Magento\\NewRelicReporting\\Model\\Counts $model */\n $model = $this->countsFactory->create()->load(Config::ACTIVE_COUNT, 'type');\n $this->updateCount($productsActiveCount, $model, Config::ACTIVE_COUNT);\n }", "function getOffice365ActivationCounts(){\n return $this->addReportQuery(\"getOffice365ActivationCounts\");\n }", "public function getUserQuantity()\n {\n return count($this->db->fetchAll(self::TODAY));\n }", "function getTotalDailyUsers($pid,$dev_id,$fromYear,$toYear) {\n\ttry {\n\t\t$DBH = DBC('postgres'); //enter db name\n $SQL = \"SELECT date(lastseen_timestamp), count(*) FROM cust_global WHERE pid = ? AND dev_id = ? AND lastseen_timestamp >= ? AND lastseen_timestamp <= ? GROUP BY date(lastseen_timestamp);\";\n\t\t$STH = $DBH->prepare($SQL);\n\t\t$STH->execute(array($pid,$dev_id,$fromYear,$toYear));\n\t\t$jsonData = array();\n\t\tforeach ($STH->fetchAll(PDO::FETCH_ASSOC) as $row) {\n $jsonData[$row[\"date\"]] = $row[\"count\"];\n\t\t}\n //Add response code\n $jsonData[\"response\"] = 1;\n\t\techo json_encode($jsonData);\n\t} catch(PDOException $e) {\n\t\techo $e->getMessage();\n\t}\n}", "public function getSalesAccountCount();", "public function sales()\n {\n $dailySales = PricedProduct::whereBetween('created_at', [Carbon::now()->startOfDay(), Carbon::now()->endOfDay()])->get();\n\n $userUsage = PricedProduct::where('user_id', auth('api')->id())\n ->whereBetween('created_at', [Carbon::now()->startOfMonth(), Carbon::now()->endOfMonth()])->count();\n\n return response()->json([\n 'dailySales' => $dailySales,\n 'userUsage' => $userUsage,\n ]);\n }", "function UserCount()\n{\n\tglobal $log;\n\t$log->debug(\"Entering UserCount() method ...\");\n\tglobal $adb;\n\t$result=$adb->query(\"select * from ec_users where deleted =0;\");\n\t$user_count=$adb->num_rows($result);\n\t$result=$adb->query(\"select * from ec_users where deleted =0 AND is_admin != 'on';\");\n\t$nonadmin_count = $adb->num_rows($result);\n\t$admin_count = $user_count-$nonadmin_count;\n\t$count=array('user'=>$user_count,'admin'=>$admin_count,'nonadmin'=>$nonadmin_count);\n\t$log->debug(\"Exiting UserCount method ...\");\n\treturn $count;\n}", "public static function get7daysTotalCustomers(){\n $customers = DB::select(\"select count(DISTINCT customer_id) as count from purchase_logs WHERE \n DATE(created_at) BETWEEN DATE(NOW())-INTERVAL 7 DAY AND DATE(NOW())\");\n return $customers[0]->count;\n }", "public function getDailyDataCount()\n {\n return $this->count(self::DAILY_DATA);\n }", "public static function getDailyLoggedInUsers();", "public function getActiveCount() {\n $query = $this->connection->select(self::TABLE, 'ta');\n $query->condition('deal_status', self::DEAL_STATUS_AVAILABLE);\n return $query->countQuery()->execute()->fetchField();\n }", "public function certificateCounter()\n {\n $today = Carbon::now();\n $day = Certificate::where('manager_id', auth()->user()->id)->whereDay('created_at', $today->day)\n ->get();\n return $day->count();\n }", "public static function getWeeklyAuthUsers()\n {\n $authUsersCounts = [];\n $dates = [];\n $period = CarbonPeriod::create(self::$weekStartDate, self::$currentDate);\n\n foreach ($period as $date) {\n $dateFormatted = explode(',', $date->toFormattedDateString())[0];\n array_push($dates, $dateFormatted);\n\n $dailyAuthUsers = DB::table('visitor_logs')\n ->join('visitor_profiles', 'visitor_logs.visitor_id', '=', 'visitor_profiles.id')\n ->where('visitor_profiles.is_auth', true)\n ->whereDate('visitor_logs.created_at', '=', $date->format('Y-m-d'))\n ->select('visitor_logs.created_at')\n ->count();\n\n array_push($authUsersCounts, $dailyAuthUsers);\n }\n\n return [$dates, $authUsersCounts];\n }", "function UserCount()\r\n{\r\n\tglobal $log;\r\n\t$log->debug(\"Entering UserCount() method ...\");\r\n\tglobal $adb;\r\n\t$result=$adb->mquery(\"select * from vtiger_users where deleted =0\", array());\r\n\t$user_count=$adb->num_rows($result);\r\n\t$result=$adb->mquery(\"select * from vtiger_users where deleted =0 AND is_admin != 'on'\", array());\r\n\t$nonadmin_count = $adb->num_rows($result);\r\n\t$admin_count = $user_count-$nonadmin_count;\r\n\t$count=array('user'=>$user_count,'admin'=>$admin_count,'nonadmin'=>$nonadmin_count);\r\n\t$log->debug(\"Exiting UserCount method ...\");\r\n\treturn $count;\r\n}", "public function getOrderCountByDay();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stampa la form dei custosm fields di buddypress espandendo la classe walker
function tvox_bd_uplaoder_custom_fields( $item_id ) { // Stampo gli imput fields echo( '<label for="tvox_bd_title">Title</label>' ); echo( '<input type="text" name="tvox_bd_title" class="buddydrive-customs" value="' . esc_attr( get_post_meta( $item_id, 'tvox_bd_title', TRUE ) ) . '" />' ); echo( '<label for="tvox_bd_artist">Artist</label>' ); echo( '<input type="text" name="tvox_bd_artist" class="buddydrive-customs" value="' . esc_attr( get_post_meta( $item_id, 'tvox_bd_artist', TRUE ) ) . '" />' ); echo( '<label for="tvox_bd_media_terms">Media Category</label> '); // Estraggo l'alberatura della taxonomy media $args = array( 'type' => 'buddydrivefile', 'child_of' => 0, 'parent' => '', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 0, 'hierarchical' => 1, 'exclude' => '', 'include' => '', 'number' => '', 'taxonomy' => 'media', 'pad_counts' => flase ); $media_terms = get_categories( $args ); // Estraggo i terms dell'oggetto e preparo il valore della variabile hidden $object_terms = wp_get_object_terms( $item_id, 'media' ); $object_term_ids = array(); foreach ( $object_terms as $term ) { $object_term_ids[] = $term->term_id; } $hidden_term_ids = serialize( $object_term_ids ); // Stampo il walker per la selezione dei terms, con i valori già checked $walker = new Tvox_BD_Media_Walker(); print_r( $walker->walk( $media_terms, 10, array ('checked' => $object_term_ids) )); ?> <input type=hidden name="tvox_bd_media_terms" id="tvox_bd_media_terms" class="buddydrive-customs" value="<?php echo $hidden_term_ids; ?>" /> <script type="text/javascript"> function tvox_set_hidden_terms() { var tvox_bd_terms = []; jQuery('input.tvox_bd_term_check:checkbox:checked').each(function() { tvox_bd_terms.push( parseInt(jQuery(this).val()) ); }); jQuery('input#tvox_bd_media_terms').val(serialize( tvox_bd_terms)); } <?php if ( $item_id ) : ?> tvox_set_hidden_terms(); <?php endif; ?> jQuery('textarea#buddyfile-desc').attr('maxlength', '500'); jQuery('textarea#buddyfile-desc').attr('placeholder', '500 characters to do so'); jQuery('textarea#buddydrive-item-content').attr('maxlength', '500'); jQuery('input.tvox_bd_term_check').click(tvox_set_hidden_terms); </script> <?php }
[ "function gmw_search_form_custom_fields( $gmw ) {\r\n\t\techo gmw_get_search_form_custom_fields( $gmw );\r\n\t}", "public function item_custom_fields_to_form() {\n // 1. special management for fields equipped with \"free\" checkbox\n // nothing to do: they don't exist in this plugin\n\n // 2. special management for composite fields\n // nothing to do: they don't exist in this plugin\n\n // 3. special management for defaultvalue\n // nothing to do: defaultvalue doesn't need any further care\n\n // 4. special management for autofill contents\n $referencearray = array(''); // <-- take care, the first element is already on board\n for ($i = 1; $i <= SURVEYFIELD_AUTOFILL_CONTENTELEMENT_COUNT; $i++) {\n $referencearray[] = constant('SURVEYFIELD_AUTOFILL_CONTENTELEMENT'.sprintf('%02d', $i));\n }\n\n $items = array();\n for ($i = 1; $i < 6; $i++) {\n $index = sprintf('%02d', $i);\n $fieldname = 'element'.$index.'_select';\n if (in_array($this->{'element'.$index}, $referencearray)) {\n $this->{$fieldname} = $this->{'element'.$index};\n } else {\n $constantname = 'SURVEYFIELD_AUTOFILL_CONTENTELEMENT'.SURVEYFIELD_AUTOFILL_CONTENTELEMENT_COUNT;\n $this->{$fieldname} = constant($constantname);\n $fieldname = 'element'.$index.'_text';\n $this->{$fieldname} = $this->{'element'.$index};\n }\n }\n }", "function gal_meta_fields_nodes(){\n\t \n\t\tglobal $post;\n\t \n\t\t// Use underscore to prevent showing up in Custom Field Section\n\t $meta = get_post_meta($post->ID,'_cpt_meta_gallery', TRUE);\n\t\t\n\t\techo '<p><strong>'.(__('Post title')).':</strong></p>';\n\t\t\n\t\techo '<input id=\"post-title-type\" type=\"text\" name=\"post-title-type\" value=\"'.(isset($meta['link-to-post-title']) ? $meta['link-to-post-title'] : null).'\">';\n\t\techo '<input id=\"link-to-post-title\" type=\"hidden\" name=\"_cpt_meta_gallery[link-to-post-title]\" value=\"\">';\n\t\t\n\t\t//echo '<p><strong>'.(__('Order')).':</strong></p>';\n\t\t//echo '<input type=\"text\" value=\"'.(isset($meta['cpt-order']) ? $meta['cpt-order'] : null).'\" name=\"cpt-order\" />';\n\t}", "public function initCustomFieldsTree(){\r\n\r\n if ($this->_p->getVar('custom_fields') && count($this->_p->getVar('custom_fields')) > 0)\r\n return $this;\r\n\r\n $this->_p->setVar('custom_fields', oTree::build($this->_p, array('model' => 'Field'), false, function(oPortal &$p, &$elem, &$params){\r\n\r\n $elem['type'] = $elem['field_type'];\r\n\r\n $elem['multilang'] = isset($elem['multilang']) && $elem['multilang'] ? $elem['multilang'] : false;\r\n $elem['empty'] = isset($elem['empty']) && $elem['empty'] ? false : true;\r\n $elem['fullempty'] = isset($elem['fullempty']) && $elem['fullempty'] ? false : true;\r\n\r\n $elem['default_value'] = $elem['default_value'] != '' ? $elem['default_value'] : null;\r\n $elem['helptext'] = $elem['helptext'] != '' ? $elem['helptext'] : null;\r\n $elem['maxlength'] = $elem['maxlength'] ? $elem['maxlength'] : null;\r\n $elem['max_input_size'] = $elem['max_input_size'] ? $elem['max_input_size'] : null;\r\n $elem['width'] = $elem['width'] ? $elem['width'] : null;\r\n $elem['height'] = $elem['height'] ? $elem['height'] : null;\r\n $elem['visual'] = array();\r\n $elem['custom'] = true;\r\n $elem['children'] = array();\r\n\r\n // parse regular expression\r\n if ($elem['fieldReg'] != ''){\r\n // it is always parsed\r\n }\r\n\r\n if ($elem['unique']){\r\n $elem['unique'] = array();\r\n } else {\r\n unset($elem['unique']);\r\n }\r\n\r\n // add array values for select\r\n if ($elem['arr_name'] != ''){\r\n $elem['visual']['source'] = array();\r\n //$values = explode(\"\\r\\n\", $arr['arr_name']);\r\n $values = unserialize($elem['arr_name']);\r\n\r\n foreach ($values['items'] as $y){\r\n //$fields[$v['nick']]['visual']['source']['arr_name'][$y] = $y;\r\n //$this->_p->custom_fields[$arr['real_id']]['visual']['source']['arr_name'][$x+1] = $y;\r\n if ($y['picture']){\r\n $y['picture'] = unserialize($y['picture']);\r\n //$this->_visual['target_dir'].calc_item_path($params['id'])\r\n $y['picture'] = Images::get($p, $y['picture'], $p->getVar('files_dir').'fields/upload/', $elem['real_id']);\r\n }\r\n $elem['visual']['source']['arr_name'][$y['id']] = array('title' => $y['title'], 'weight' => $y['weight'], 'picture' => $y['picture']);\r\n\r\n }\r\n\r\n }\r\n\r\n // add array values for select\r\n if ($elem['tbl_name'] != '' && isset($p->getVar('tables')[$elem['tbl_name']])){\r\n $elem['visual']['source'] = array();\r\n $elem['visual']['source']['tbl_name'] = $elem['tbl_name'];\r\n // describe linker table and check for is_top field\r\n $desc_tbl = describe_table($p, $p->getVar('tables')[$elem['tbl_name']]);\r\n\r\n $fields_add = array();\r\n $order = $primary = null;\r\n if ($desc_tbl && !empty($desc_tbl)){\r\n\r\n foreach ($desc_tbl as $field){\r\n $fields_add[] = $field;\r\n if ($field == 'real_id'){\r\n $elem['visual']['source']['multilang'] = true;\r\n }\r\n if ($field == 'title'){\r\n $order = $field;\r\n }\r\n }\r\n }\r\n\r\n // check if order is absent\r\n if (!$order){\r\n if (in_array('sname', $fields_add))\r\n $order = 'sname';\r\n\r\n if (in_array('fname', $fields_add))\r\n $order = 'fname';\r\n\r\n if (in_array('mname', $fields_add))\r\n $order = 'mname';\r\n }\r\n\r\n // hack :)\r\n $elem['visual']['source']['conditions']['where'][$order] = array('op' => '<>', 'value' => '');\r\n $elem['visual']['source']['conditions']['order'][$order] = 'asc';\r\n\r\n }\r\n\r\n if ($elem['visual_type'] != '')\r\n $elem['visual']['type'] = $elem['visual_type'];\r\n elseif (!$elem['field_type'])\r\n $elem['visual']['type'] = 'group';\r\n\r\n // some patching for visual fields\r\n if ($elem['visual']['type'] == 'range'){\r\n $elem['visual']['fields'] = array('value2');\r\n }\r\n\r\n if ($elem['visual_accept'] != '')\r\n $elem['visual']['accept'] = explode(',', str_replace(' ', '', $elem['visual_accept']));\r\n\r\n if ($elem['title'] != '')\r\n $elem['visual']['title'] = $elem['title'];\r\n\r\n }));\r\n\r\n\t\tif ($this->_p->getVar('is_debug')){\r\n\t\t\t$this->_p->debug->add(\"oForms: After get serialized custom fields\");\r\n\t\t}\r\n\r\n return $this;\r\n\r\n\t}", "public function buildStepFormElements();", "function bbp_forum_form_fields()\n{\n}", "public function buildForm()\n {\n $this\n ->add('value', 'text', ['label' => trans('elementForm.value')])\n ->addCollection('location', 'Activity\\TargetLocation', 'target_location', [], trans('elementForm.location'))\n ->addAddMoreButton('add_target_location', 'target_location')\n ->addCollection('dimension', 'Activity\\TargetDimension', 'target_dimension', [], trans('elementForm.dimension'))\n ->addAddMoreButton('add_target_dimension', 'target_dimension')\n ->addComments();\n }", "function new_fields_input_viewer( $action ){\r\n\t\tglobal $current_user;\r\n\t\t$current_user = wp_get_current_user();\r\n\t\tif( !current_user_can( 'manage_options', $current_user->ID ) ){\r\n\t\t\twp_die( __( 'You do not have permissions to activate this plugin, sorry, check with site administrator to resolve this issue please!', 'user-registration-aide' ) );\r\n\t\t}else{\r\n\t\t\tdo_action( 'database_update' );\r\n\t\t\t$class = ( string ) 'BuddyPress';\r\n\t\t\t$plugin = ( string ) 'buddypress/bp-loader.php';\r\n\t\t\t$newField = ( string ) '';\r\n\t\t\t$newFieldKey = ( string ) '';\r\n\t\t\t$reg_form_use = ( string ) '';\r\n\t\t\t$required = ( string ) '';\r\n\t\t\t$field_data_type = ( string ) '';\r\n\t\t\t$fieldOptions = ( string ) '';\r\n\t\t\t$msg1 = ( string ) '';\r\n\t\t\t$minNumb = ( int ) 0;\r\n\t\t\t$maxNumb = ( int ) 0;\r\n\t\t\t$stepNumb = ( int ) 0;\r\n\t\t\t$nfc = new INPUT_NEW_FIELDS_MODEL();\r\n\t\t\t$input = $nfc->input_options_array();\r\n\t\t\t$span = array( 'regForm', 'Add Custom Fields With Own Input Option Here:', 'user-registration-aide');\r\n\t\t\t\r\n\t\t\t// re-enteringfield data if there was an error\r\n\t\t\tif( empty( $action ) || $action == 'error' ){\r\n\t\t\t\tif( !empty( $_POST['ura_newField'] ) ){\r\n\t\t\t\t\t$newField = sanitize_text_field( $_POST['ura_newField'] );\r\n\t\t\t\t}\r\n\t\t\t\tif( !empty( $_POST['ura_newFieldKey'] ) ){\r\n\t\t\t\t\t$newFieldKey = sanitize_key( $_POST['ura_newFieldKey'] );\r\n\t\t\t\t}\r\n\t\t\t\tif( !empty( $_POST['reg_form_use'] ) ){\r\n\t\t\t\t\t$reg_form_use = sanitize_key( $_POST['reg_form_use'] );\r\n\t\t\t\t}\r\n\t\t\t\tif( !empty( $_POST['required'] ) ){\r\n\t\t\t\t\t$required = sanitize_key( $_POST['required'] );\r\n\t\t\t\t}\r\n\t\t\t\tif( !empty( $_POST['input_type'] ) ){\r\n\t\t\t\t\t$field_data_type = sanitize_key( $_POST['input_type'] );\r\n\t\t\t\t}\r\n\t\t\t\tif( !empty( $_POST['ura_fieldOptions'] ) ){\r\n\t\t\t\t\t$fieldOptions = sanitize_text_field( $_POST['ura_fieldOptions'] );\r\n\t\t\t\t}\r\n\t\t\t\tif( !empty( $_POST['ura_minNumb'] ) ){\r\n\t\t\t\t\t$minNumb = sanitize_text_field( $_POST['ura_minNumb'] );\r\n\t\t\t\t}\r\n\t\t\t\tif( !empty( $_POST['ura_maxNumb'] ) ){\r\n\t\t\t\t\t$maxNumb = sanitize_text_field( $_POST['ura_maxNumb'] );\r\n\t\t\t\t}\r\n\t\t\t\tif( !empty( $_POST['ura_stepNumb'] ) ){\r\n\t\t\t\t\t$stepNumb = sanitize_text_field( $_POST['ura_stepNumb'] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$select_options = array(\r\n\t\t\t\t'1'\t=>\t__( 'Yes', 'user-registration-aide' ),\r\n\t\t\t\t'0'\t=>\t__( 'No', 'user-registration-aide' )\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t// Shows Aministration Page \r\n\t\t\t\r\n\t\t\t?>\r\n\t\t\t<br />\r\n\t\t\t\t\r\n\t\t\t<table class=\"newInputFields\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th colspan=\"4\" class=\"newInputFields\"><?php _e( 'Create Custom Fields Of Various Input Types Here:', 'user-registration-aide' );?> </th>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\r\n\t\t\t\t<?php\r\n\t\t\t\t\t// Form for adding new fields for users profile and registration\r\n\t\t\t\t\t?>\t\t\t\t\t\t\t\r\n\t\t\t\t\t<td colspan=\"4\">\r\n\t\t\t\t\t<?php _e( 'Here is where you can enter your custom additional fields, the key name should be lower ', 'user-registration-aide' ); ?>\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\t<?php _e( 'case and correlate to the field name that the user sees on the registration form and profile.','user-registration-aide' ); ?>\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\t<?php _e( 'Examples:','user-registration-aide' ); ?>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t<br/>\r\n\t\t\t\t\r\n\t\t\t<table class=\"newInputFields\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td width=\"25%\"><?php _e( 'Field Key Name: dob', 'user-registration-aide' );?></td>\r\n\t\t\t\t\t<td width=\"25%\"><?php _e( 'Field Type: Select (Drop Down)', 'user-registration-aide' );?></td>\r\n\t\t\t\t\t<td width=\"25%\"><?php _e( 'Registration Form: Yes/No', 'user-registration-aide' );?></td>\r\n\t\t\t\t\t<td width=\"25%\"><?php _e( 'Field Required: Yes/No', 'user-registration-aide' ); ?></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td align=\"left\">\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e( 'Field Key Name:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\techo '<input style=\"width: 100%;\" type=\"text\" title=\"'.__( 'Enter the database name for your field here, like dob for Date of Birth or full_name, use lower case letters and _ (underscores) ONLY! Keep it short and simple and relative to the field you are creating!', 'user-registration-aide' ) . '\" value=\"'. $newFieldKey . '\" name=\"ura_newFieldKey\" id=\"ura_newFieldKey\" maxlength=\"30\" />';\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td align=\"left\">\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e( 'Field Type:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<select name=\"input_type\" id=\"input_type\" title=\"<?php _e( 'Select the input type for your new custom field here from select, text, textarea, radio or checkbox', 'user-registration-aide' );?>\" >\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\tforeach( $input as $key\t=>\t$title ){\r\n\t\t\t\t\t\tif( $key == $field_data_type ){\r\n\t\t\t\t\t\t\techo \"<option selected=\".$field_data_type.\" value=\\\"$key\\\">$title</option>\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\techo \"<option value=\\\"$key\\\">$title</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td align=\"left\">\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e( 'Use on Registration Form:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<select name=\"reg_form_use\" id=\"reg_form_use\" title=\"<?php _e( 'Choose Yes to use this field on the Registration Form or No not to use it on Registration Form','user-registration-aide' );?>\" >\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\tforeach( $select_options as $key =>\t$title ){\r\n\t\t\t\t\t\tif( $key == $reg_form_use ){\r\n\t\t\t\t\t\t\techo \"<option selected=\".$reg_form_use.\" value=\\\"$key\\\">$title</option>\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\techo \"<option value=\\\"$key\\\">$title</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e( 'Field Requirement:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<select name=\"required\" id=\"required\" title=\"<?php _e( 'Select whether the new field is required or not here', 'user-registration-aide' );?>\" >\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\tforeach( $select_options as $key =>\t$title ){\r\n\t\t\t\t\t\tif( $key == $required ){\r\n\t\t\t\t\t\t\techo \"<option selected=\".$required.\" value=\\\"$key\\\">$title</option>\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\techo \"<option value=\\\"$key\\\">$title</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t<br/>\r\n\t\t\t<table class=\"newInputFields\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td align=\"left\">\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e( 'Input Type Number:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<p title=\"<?php _e( 'You can select the minimum number to display, maximum number to display and the step, or increment to use, like 5,10,15 for 5 or 2,4,6,8 for 2 or 1,2,3 for 1.', 'user-registration-aide' );?>\" >\r\n\t\t\t\t\t<?php _e( 'Only use these choices if your Field Type is a number', 'user-registration-aide' ); ?>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td align=\"left\">\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e( 'Minimum Number:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\techo '<input style=\"width: 100%;\" type=\"number\" title=\"'.__( 'Enter the minimum number to use for your number input box', 'user-registration-aide' ) . '\" value=\"'. $minNumb . '\" name=\"ura_minNumb\" id=\"ura_minNumb\" maxlength=\"30\" />';\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td align=\"left\">\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e( 'Maximum Number:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\techo '<input style=\"width: 100%;\" type=\"number\" title=\"'.__( 'Enter the maximum number to use for your number input box', 'user-registration-aide' ) . '\" value=\"'. $maxNumb . '\" name=\"ura_maxNumb\" id=\"ura_maxNumb\" maxlength=\"30\" />';\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td align=\"left\">\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e( 'Number Step By:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\techo '<input style=\"width: 100%;\" type=\"number\" title=\"'.__( 'Enter the number to increment by in your number select box ( 1, 2, 5 which are the numbers that would be used, like 5 would be 5,10,15,20 like that )', 'user-registration-aide' ) . '\" value=\"'. $stepNumb . '\" name=\"ura_stepNumb\" id=\"ura_stepNumb\" maxlength=\"30\" />';\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t<br/>\r\n\t\t\t<table class=\"newInputFields\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\"4\" align=\"left\">\r\n\t\t\t\t\t<fieldset title=\"\">\r\n\t\t\t\t\t<legend><?php _e( 'Field Title:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\techo '<input style=\"width: 100%;\" type=\"text\" title=\"'.__( 'Enter the user friendly name for your field here, like Date of Birth for dob, ect. Keep it short & simple and relative to the field you are creating!', 'user-registration-aide' ) . '\" value=\"'. $newField . '\" name=\"ura_newField\" id=\"ura_newField\" maxlength=\"50\" />';\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t<br/>\r\n\t\t\t<table class=\"newInputFields\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\"4\" align=\"left\">\r\n\t\t\t\t\t<fieldset title=\"<?php _e( 'NOTE: DO NOT USE COMMAS in your field options please! It will mess up your whole array of options strings!!', 'user-registration-aide' );?>\">\r\n\t\t\t\t\t<legend title=\"<?php _e( 'NOTE: DO NOT USE COMMAS in your field options please! It will mess up your whole array of options strings!!', 'user-registration-aide' );?>\"><?php _e( 'Field Options:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t$texts = $nfc->options_text_inputs();\r\n\t\t\t\t\t$text_keys = $nfc->options_keys_array();\r\n\t\t\t\t\t$space = '&nbsp';\r\n\t\t\t\t\t$double_space = '&nbsp;&nbsp;';\r\n\t\t\t\t\t$triple_space = '&nbsp;&nbsp;&nbsp;&nbsp;';\r\n\t\t\t\t\t$quad_space = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\r\n\t\t\t\t\t$i = ( int ) 1;\r\n\t\t\t\t\t$index = ( int ) 0;\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t<table class=\"options-number\" style=\"width:95%;\">\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t<th class=\"options-number\" style=\"width:5%\">\r\n\t\t\t\t\t<?php _e( 'Option Number:', 'user-registration-aide' );?>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th style=\"width:22.5%;\">\r\n\t\t\t\t\t<?php _e( 'Option Key:', 'user-registration-aide' );?>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th style=\"width:22.5%;\">\r\n\t\t\t\t\t<?php _e( 'Option Name:', 'user-registration-aide' );?>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th class=\"options-number\" style=\"width:5%;\">\r\n\t\t\t\t\t<?php _e( 'Option Number:', 'user-registration-aide' );?>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th style=\"width:22.5%;\">\r\n\t\t\t\t\t<?php _e( 'Option Key:', 'user-registration-aide' );?>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th style=\"width:22.5;%\">\r\n\t\t\t\t\t<?php _e( 'Option Name:', 'user-registration-aide' );?>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\tfor( $x = 1; $x <= 8; $x++ ){\r\n\t\t\t\t\t//foreach( $texts as $id\t=> $label ){\r\n\t\t\t\t\t\techo '<tr>';\r\n\t\t\t\t\t\techo '<td class=\"options-number\">'.$i.':</td>';\r\n\t\t\t\t\t\techo '<td width=\"22.5%\">'.$text_keys[$index].'</td>';\r\n\t\t\t\t\t\techo '<td width=\"22.5%\">'.$texts[$index].'</td>';\r\n\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t$index++;\r\n\t\t\t\t\t\techo '<td class=\"options-number\">'.$i.':</td>';\r\n\t\t\t\t\t\techo '<td width=\"22.5%\">'.$text_keys[$index].'</td>';\r\n\t\t\t\t\t\techo '<td width=\"22.5%\">'.$texts[$index].'</td>';\r\n\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t$index++;\r\n\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t</table>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t\tif ( class_exists( $class ) ){\r\n\t\t\t\tif( is_plugin_active( $plugin ) ){\r\n\t\t\t\t?>\r\n\t\t\t</table>\r\n\t\t\t<br/>\r\n\t\t\t<table class=\"newInputFields\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\"4\" align=\"left\">\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e('BuddyPress Fields:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e('Field Description:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<input style=\"width: 100%;\" type=\"textarea\" title=\"'.__( 'Enter the field description to describe in detail the field you are creating here!', 'user-registration-aide' ) . '\" value=\"\" name=\"ura_newFieldDesc\" id=\"ura_newFieldDesc\" />\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e('Default Visibility:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<input type=\"radio\" name=\"default_visibility\" value=\"public\" checked><?php _e('Everyone', 'user-registration-aide' );?><br>\r\n\t\t\t\t\t<input type=\"radio\" name=\"default_visibility\" value=\"adminsonly\"><?php _e(' Only Me', 'user-registration-aide' );?><br>\r\n\t\t\t\t\t<input type=\"radio\" name=\"default_visibility\" value=\"loggedin\"><?php _e(' All Members', 'user-registration-aide' );?><br>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend><?php _e( 'Per Member Visibility:', 'user-registration-aide' );?></legend>\r\n\t\t\t\t\t<input type=\"radio\" name=\"allow_custom_visibility\" value=\"allowed\" checked><?php _e(' Let members change this field\\'s visibility', 'user-registration-aide' );?><br>\r\n\t\t\t\t\t<input type=\"radio\" name=\"allow_custom_visibility\" value=\"disabled\"><?php _e(' Enforce the default visibility for all members', 'user-registration-aide' );?><br>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<?php\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t\t</table>\r\n\t\t\t<br/>\r\n\t\t\t<table class=\"newInputFields\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td style=\"text-align:center;\" colspan=\"4\">\r\n\t\t\t\t\t<input type=\"submit\" class=\"button-primary\" name=\"new_fields_update\" value=\"<?php _e( 'Add New Field', 'user-registration-aide' );?>\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t}\r\n\t}", "function edit_screen_fields_manage($bp){\n\n if (isset($_GET['edit']) && !empty($_GET['edit'])){\n $field = $this->get_item_by_slug('field', $_GET['edit']);\n }\n \n $this->edit_screen_head('fields-manage');\n echo '<div class=\"box_field\">';\n //echo '<p>';\n echo '<label>' . __('Field Title', 'bpge') . '</label>';\n echo '<input type=\"text\" value=\"'.$field->title.'\" name=\"extra-field-title\">';\n \n if (empty($field)){\n echo '<label>' . __('Field Type', 'bpge') . '</label>';\n echo '<select name=\"extra-field-type\" id=\"extra-field-type\">';\n echo '<option value=\"text\">' . __('Text Box', 'bpge') . '</option>';\n echo '<option value=\"textarea\">' . __('Multi-line Text Box', 'bpge') . '</option>';\n echo '<option value=\"checkbox\">' . __('Checkboxes', 'bpge') . '</option>';\n echo '<option value=\"radio\">' . __('Radio Buttons', 'bpge') . '</option>';\n //echo '<option value=\"datebox\">' . __('Date Selector', 'bpge') . '</option>';\n echo '<option value=\"select\">' . __('Drop Down Select Box', 'bpge') . '</option>';\n echo '</select>';\n \n echo '<div id=\"extra-field-vars\">';\n echo '<div class=\"content\"></div>';\n echo '<div class=\"links\">\n <a class=\"button\" href=\"#\" id=\"add_new\">' . __('Add New', 'bpge') . '</a>\n </div>';\n echo '</div>';\n }\n echo '<label>' . __('Field Description', 'bpge') . '</label>';\n echo '<textarea name=\"extra-field-desc\">'.$field->title.'</textarea>';\n \n echo '<!--label for=\"extra-field-required\">' . __('Is this field required (will be marked as required on group Edit Details page)?','bpge') . '</label>';\n $req = '';\n $not_req = 'checked=\"checked\"';\n if ( $field->required == 1 ) {\n $req = 'checked=\"checked\"';\n $not_req = '';\n }\n echo '<input type=\"radio\" value=\"1\" '.$req.' name=\"extra-field-required\"> '.__('Required', 'bpge').'<br />';\n echo '<input type=\"radio\" value=\"0\" '.$not_req.' name=\"extra-field-required\"> '. __('Not Required', 'bpge').'<br /-->';\n \n echo '<label for=\"extra-field-display\">' . sprintf(__('Should this field be displayed for public on \"<u>%s</u>\" page?','bpge'), $this->nav_item_name) . '</label>';\n $disp = 'checked=\"checked\"';\n $not_disp = '';\n if ( $field->display != 1 ) {\n $not_disp = 'checked=\"checked\"';\n $disp = '';\n }\n echo '<input type=\"radio\" value=\"1\" '.$disp.' name=\"extra-field-display\"> '.__('Display it', 'bpge').'<br />';\n echo '<input type=\"radio\" value=\"0\" '.$not_disp.' name=\"extra-field-display\"> '. __('Do NOT display it', 'bpge');\n //echo '</p>';\n \n do_action('bpge_field_manage', $this, $field);\n \n if (empty($field)){\n echo '<p><input type=\"submit\" name=\"save_fields_add\" id=\"save\" value=\"'.__('Create New &rarr;','bpge').'\"></p>';\n }else{\n echo '<input type=\"hidden\" name=\"extra-field-slug\" value=\"' . $field->slug . '\">';\n echo '<p><input type=\"submit\" name=\"save_fields_edit\" id=\"save\" value=\"'.__('Save Changes &rarr;','bpge').'\"></p>';\n }\n echo '</div>';\n wp_nonce_field('groups_edit_group_extras');\n }", "function bbp_topic_form_fields()\n{\n}", "function wooc_extra_register_fields() {\n\t?>\n\n\t<!-- <p class=\"[ margin-bottom--small no-padding ][ text-left ][ col-xs-6 ]\">\n\t\t<label for=\"username\">Nombre<span class=\"required\">*</span></label>\n\t\t<input class=\"[ form-control form-control-bg ]\" name=\"billing_first_name\" type=\"text\" id=\"reg_billing_first_name\" placeholder=\"<?php _e( 'First name', 'woocommerce' ); ?>*\" value=\"<?php if ( ! empty( $_POST['billing_first_name'] ) ) esc_attr_e( $_POST['billing_first_name'] ); ?>\" required data-parsley-error-message=\"Por favor ingresa tu nombre.\">\n\t</p>\n\n\t<p class=\"[ margin-bottom--small no-padding ][ text-left ][ col-xs-6 ]\">\n\t\t<label for=\"username\">Apellido<span class=\"required\">*</span></label>\n\t\t<input class=\"[ form-control form-control-bg ]\" name=\"billing_last_name\" type=\"text\" id=\"reg_billing_last_name\" placeholder=\"<?php _e( 'Last name', 'woocommerce' ); ?>*\" value=\"<?php if ( ! empty( $_POST['billing_last_name'] ) ) esc_attr_e( $_POST['billing_last_name'] ); ?>\" required data-parsley-error-message=\"Por favor ingresa tu apellido.\">\n\t</p> -->\n\n\n\t<?php\n}", "public function setup_fields() {\n\t\t$this->add_settings_field( [\n\t\t\t'name' => 'wpjm_job_base_slug',\n\t\t\t'label' => __( 'Listing base', 'my-listing' ),\n\t\t\t'value' => $this->permalinks['job_base'],\n\t\t\t'placeholder' => 'listing',\n\t\t\t'after' => $this->listing_type_permalink_docs(),\n\t\t] );\n\n\t\t$this->add_settings_field( [\n\t\t\t'name' => 'wpjm_job_category_slug',\n\t\t\t'label' => __( 'Category base', 'my-listing' ),\n\t\t\t'value' => $this->permalinks['category_base'],\n\t\t\t'placeholder' => 'category',\n\t\t] );\n\n\t\t$this->add_settings_field( [\n\t\t\t'name' => 'ml_region_slug',\n\t\t\t'label' => __( 'Region base', 'my-listing' ),\n\t\t\t'value' => $this->permalinks['region_base'],\n\t\t\t'placeholder' => 'region',\n\t\t] );\n\n\t\t$this->add_settings_field( [\n\t\t\t'name' => 'ml_tag_slug',\n\t\t\t'label' => __( 'Tag base', 'my-listing' ),\n\t\t\t'value' => $this->permalinks['tag_base'],\n\t\t\t'placeholder' => 'tag',\n\t\t] );\n\t}", "public function buildFormFields(): void\n {\n $this\n ->addField(\n SharpFormTextField::make(\"nom\")\n ->setLabel(\"Nom\")\n );\n }", "function additional_page_meta_fields_box($post){\n\n // Use nonce for verification\n wp_nonce_field('additional_page_meta_fields_nonce', 'additional_page_meta_fields_noncename');\n\n // Load template class\n $brace = new \\brace\\parser;\n $brace->template_path = __DIR__.'/templates/';\n\n // Render additional fields\n $brace->parse('additional-fiels',[\n 'checked' => get_post_meta($post->ID, 'post_is_static', true)\n ]);\n }", "function _filter_edit_form_advanced() {\n\t\t\t\tglobal $post;\n\t\t\t\tinclude 'tpl/edit-postpage-metabox.tpl.php';\n\n\t\t\t}", "function fieldForm()\n {\n global $table;\n\n $table->table_column('<b>'.$this->description.': </b>'.$this->_specifyNotNull(), '33%', '', 'right');\n $table->table_column(html_form_textArea($this->name, $this->default, $this->columns, $this->rows), '67%', '', 'left');\n $table->table_nextRowWithColumns();\n }", "public function payment_fields()\r\n {\r\n \r\n // ok, let's display some description before the payment form\r\n if ($this->description) {\r\n // display the description with <p> tags etc.\r\n echo wpautop(wp_kses_post($this->description));\r\n }\r\n \r\n // I will echo() the form, but you can close PHP tags and print it directly in HTML\r\n echo '<fieldset id=\"wc-' . esc_attr($this->id) . '-cc-form\" class=\"wc-credit-card-form wc-payment-form\" style=\"background:transparent;\">';\r\n \r\n // Add this action hook if you want your custom gateway to support it\r\n do_action('woocommerce_momo_form_start', $this->id);\r\n \r\n // I recommend to use inique IDs, because other gateways could already use #ccNo, #expdate, #cvc\r\n echo '<div class=\"form-row form-row-wide\"><label>Mobile Wallet Provider <span class=\"required\">*</span></label>\r\n\t\t\t\t<select id=\"epaygh_mobile_wallet_network\" name=\"epaygh_mobile_wallet_network\">\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"mtn\" selected>MTN</option>\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"airtel\">Airtel</option>\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"tigo\">Tigo</option>\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"vodafone\">Vodafone</option>\r\n\t\t\t\t</select>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"form-row form-row-wide\"><label>Mobile Wallet Number <span class=\"required\">*</span></label>\r\n\t\t\t\t<input id=\"epaygh_mobile_wallet_number\" name=\"epaygh_mobile_wallet_number\" type=\"tel\">\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"form-row form-row-wide\"><label>Voucher </label>\r\n\t\t\t\t\t<input id=\"epaygh_payment_voucher\" name=\"epaygh_payment_voucher\" type=\"text\" autocomplete=\"off\"><br>\r\n\t\t\t\t\t<span class=\"required\">Leave empty if mobile network is not Vodafone</span>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"clear\"></div>';\r\n \r\n do_action('woocommerce_momo_form_end', $this->id);\r\n \r\n echo '<div class=\"clear\"></div></fieldset>';\r\n }", "public function feed_settings_fields() {\n $default_settings = parent::feed_settings_fields();\n $form = $this->get_current_form();\n // Prepare customer information fields.\n $billing_info = parent::get_field( 'billingInformation', $default_settings );\n\n $billing_fields = $billing_info['field_map'];\n $add_first_name = true;\n $add_last_name = true;\n foreach ( $billing_fields as $mapping ) {\n //add first/last name if it does not already exist in billing fields\n if ( $mapping['name'] == 'firstName' ) {\n $add_first_name = false;\n } else if ( $mapping['name'] == 'lastName' ) {\n $add_last_name = false;\n }\n }\n\n if ( $add_last_name ) {\n //add last name\n array_unshift( $billing_info['field_map'], array( 'name' => 'lastName', 'label' => __( 'Last Name', 'gravityformspayxpert' ), 'required' => false ) );\n }\n if ( $add_first_name ) {\n array_unshift( $billing_info['field_map'], array( 'name' => 'firstName', 'label' => __( 'First Name', 'gravityformspayxpert' ), 'required' => false ) );\n }\n\n $billing_info['field_map'][] = array( 'name' => 'phone', 'label' => __( 'Phone', 'gravityformspayxpert' ), 'required' => false );\n\n $default_settings = parent::replace_field( 'billingInformation', $billing_info, $default_settings );\n\n return $default_settings;\n }", "private function parse_fields() {\n\t\t$fields = Kirki::$fields;\n\t\tforeach ( $fields as $field ) {\n\t\t\tif ( isset( $field['tooltip'] ) && ! empty( $field['tooltip'] ) ) {\n\t\t\t\t// Get the control ID and properly format it for the tooltips.\n\t\t\t\t$id = str_replace( '[', '-', str_replace( ']', '', $field['settings'] ) );\n\t\t\t\t// Add the tooltips content.\n\t\t\t\t$this->tooltips_content[ $id ] = array(\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'content' => $field['tooltip'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return path to a hardcopy of $strFilename located in $strDstFolder filename is crypted, not content
public static function getCryptedCopy($strFilename, $strDstFolder) { $strPath = FileSystem::createCryptedPath( $strFilename, $strDstFolder ); if( FileSystem::fileExists($strPath) == false ) { copy( $strFilename, $strPath ); } return $strPath; }
[ "abstract protected function getDestinationFilePath();", "public function getDestinationFilePath();", "private function getDestinationDir()\n {\n if (empty($this->options->cloneDir)) {\n return trailingslashit(WPStaging::getWPpath() . $this->options->cloneDirectoryName);\n }\n return trailingslashit($this->options->cloneDir);\n }", "public function copyImage($srcImage)\n {\n $pathImage = '';\n\n if ($srcImage && File::exists(public_path($srcImage))) {\n // get folder to upload\n $folderUpload = $this->getFolderUpload($srcImage);\n\n // set folder to save\n $folderPath = $this->setFolderUpload($folderUpload);\n\n // get and create container folder if needed\n if (!is_dir(public_path($folderPath))) {\n File::makeDirectory(public_path($folderPath), intval(0755, 8), true);\n }\n\n // set file name\n $fileName = date('YmdHis', time()) . '-' . $this->getImageNameByPath($srcImage);\n\n // copy file to same path\n if (File::copy(public_path($srcImage), public_path($folderPath) . $fileName)) {\n $pathImage = $folderPath . $fileName;\n }\n }\n\n return $pathImage;\n }", "public function get_destfile() {\n $fs = get_file_storage();\n\n return $fs->get_file_by_id($this->get('destfileid'));\n }", "public function getFullPath()\n {\n if (!$this->filename)\n return;\n return Yii::$app->getModule('backup')->backupRootPath . DIRECTORY_SEPARATOR . $this->filename;\n }", "public function copyFromDFSToDFS( $srcFilePath, $dstFilePath )\n {\n \n $this->accumulatorStart();\n\n $srcFilePath = $this->makeDFSPath( $srcFilePath );\n $dstFilePath = $this->makeDFSPath( $dstFilePath );\n \n if(strpos($srcFilePath,'/storage/') !== FALSE )\n {\n $result = $this->s3->getObject(array('Bucket' => $this->bucket,\n 'Key' => $srcFilePath));\n\n \n $contentdata = (string) $result['Body'];\n $ret = $this->createFile( $dstFilePath,$contentdata );\n }else{\n $item_src = $this->pool->getItem($srcFilePath); \n $item_dst = $this->pool->getItem($dstFilePath);\n $item_dst->lock();\n $item_dst->set($item_src->get($srcFilePath));\n $ret =true;\n }\n \n $this->accumulatorStop();\n \n return $ret;\n }", "private function getDdReviewCopy()\r\n {\r\n copy(\r\n getcwd().DIRECTORY_SEPARATOR.$this->ddReviewLocation.DIRECTORY_SEPARATOR.'dd_review.exe',\r\n getcwd().DIRECTORY_SEPARATOR.\"rhapsody\".DIRECTORY_SEPARATOR.'dd_review.exe'\r\n );\r\n }", "function getCopyedFileId() {\n\t\treturn $this->getData('copyedFileId');\n\t}", "public function copyAssetToTempFolder() : string;", "public function copyFile($strSource, $strDest){\n clearstatcache();\n if(!is_file($strDest)){\n $rtnCp = copy($strSource, $strDest);\n return $this->genTestOutput($strDest, $rtnCp);\n } else {\n return $this->genOutput($strDest, 'normal');\n }\n }", "public function getFileProtectionFileName(): string\n {\n return $this->getCurrentFileProtectionHandler()->getFileNameWithPath(\n $this->wordpressConfig->getUploadDirectory()\n );\n }", "public function get_dest_path()\n {\n return $this->dest_path;\n }", "private function generate_file_path() {\n // determine filename\n $orgn_prename = rtrim($this->orgn_name, '.' . $this->file_ext);\n $this->file_name = $this->file_norepeat\n ? $orgn_prename . '_' . time() . '_' . rand(10000, 99999) . '.' . $this->file_ext \n : $this->orgn_name;\n\n $this->file_path = $this->upload_path . $this->file_name;\n\n return $this->file_path;\n }", "public function getTargetFilePath()\n {\n return Path::combine($this->getTargetFolder()->getPath(), $this->getTargetFilename());\n }", "private function getDrupalFilesComponentPath(): string\n {\n $drupalFilesPath = $this->getDrupalFilesDir();\n $drupalFilesArchiveComponentPath = Path::join($this->archiveDir, self::COMPONENT_FILES);\n $this->logger()->info(\n dt(\n 'Copying Drupal files from !from_path to !to_path...',\n ['!from_path' => $drupalFilesPath, '!to_path' => $drupalFilesArchiveComponentPath]\n )\n );\n\n $excludes = $this->getRegexpsForPaths([\n 'css',\n 'js',\n 'styles',\n 'php',\n ]);\n\n $this->filesystem->mirror(\n $drupalFilesPath,\n $drupalFilesArchiveComponentPath,\n $this->getFileIterator($drupalFilesPath, $excludes)\n );\n\n return $drupalFilesArchiveComponentPath;\n }", "public function get_file_path($name) {\n return $this->get_files_directory() . '/' . hash_secure($name);\n }", "protected function getWorkingCopyUrl()\n\t{\n\t\t$wc_path = $this->getWorkingCopyPath();\n\n\t\tif ( !$this->repositoryConnector->isUrl($wc_path) ) {\n\t\t\treturn $this->repositoryConnector->getWorkingCopyUrl($wc_path);\n\t\t}\n\n\t\treturn $wc_path;\n\t}", "protected function getPreparedPath()\n {\n return $this->outputBaseDir . '/' . $this->outputFilename;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation getUnpublishedItemCountAsyncWithHttpInfo Unpublished Item Counts
protected function getUnpublishedItemCountAsyncWithHttpInfo( string $fromDate, ): PromiseInterface { $returnType = '\Walmart\Models\MP\US\Insights\GetUnpublishedItemsCount'; $request = $this->getUnpublishedItemCountRequest($fromDate); $this->writeDebug($request); $this->writeDebug((string) $request->getBody()); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { $this->writeDebug($response); $this->writeDebug((string) $response->getBody()); if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); if ($returnType !== 'string') { $content = json_decode($content); } } return ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()); }, function ($exception) { $response = $exception->getResponse(); $hasResponse = !empty($response); $body = (string) ($hasResponse ? $response->getBody() : '[NULL response]'); $this->writeDebug($response); $statusCode = $hasResponse ? $response->getStatusCode() : $exception->getCode(); throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri() ), $statusCode, $response->getHeaders(), $body, ); } ); }
[ "public function countPublishedItems()\n\t{\n\t\t$total = $this->items()\n\t\t\t->whereEquals('published', self::STATE_PUBLISHED)\n\t\t\t->total();\n\n\t\treturn (int)$total;\n\t}", "public function countUnseenNewsItems(){\n return $this->newsModel->countUnseenNewsItems();\n }", "public function getUnviewedCount()\n {\n return $this->notificationMapper->countUnviewed();\n }", "public function getItemsCount() {\n return $this->body->getItemsCount();\n }", "function getNbUnreadInternalNotifications();", "public function get_unindexed_indexables_count($unindexed_count = 0)\n {\n }", "public function getUnassociatedDigitalItemsAsyncWithHttpInfo($_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null, $_placeholders = null)\n {\n $returnType = '\\ultracart\\v2\\models\\ItemDigitalItemsResponse';\n $request = $this->getUnassociatedDigitalItemsRequest($_limit, $_offset, $_since, $_sort, $_expand, $_placeholders);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function unreadMessagesCount()\n {\n $input = Request::onlyLegacy('last_read_message_id', 'thread_id');\n\n $userId = \\Auth::id();\n $count = $this->service->getUnreadMessagesCount($userId, $input);\n\n return ApiResponse::success(['count' => $count]);\n }", "public function getUnassociatedDigitalItemsWithHttpInfo($_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null, $_placeholders = null)\n {\n return $this->getUnassociatedDigitalItemsWithHttpInfoRetry(true , $_limit, $_offset, $_since, $_sort, $_expand, $_placeholders);\n }", "public function itemCount()\n {\n $response = $this->getServiceLocator()->get('Omeka\\ApiManager')\n ->search('items', [\n 'owner_id' => $this->id(),\n 'limit' => 0,\n ]);\n return $response->getTotalResults();\n }", "public function getUnpublishedCount()\n {\n return $this->getComments()->filter(function (Comment $comment) {\n return (!$comment->published());\n })->count();\n }", "protected function getUnpublishedItemsAsyncWithHttpInfo(\n string $fromDate,\n ?string $unpublishedReasonCode = 'all',\n ?string $limit = '20',\n ?string $offerLifecycleStatus = 'all',\n ?string $marketTrending = 'true',\n ?string $itemsWithInventory = 'true',\n ): PromiseInterface {\n $returnType = '\\Walmart\\Models\\MP\\US\\Insights\\GetUnpublishedItem';\n $request = $this->getUnpublishedItemsRequest($fromDate, $unpublishedReasonCode, $limit, $offerLifecycleStatus, $marketTrending, $itemsWithInventory);\n $this->writeDebug($request);\n $this->writeDebug((string) $request->getBody());\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $this->writeDebug($response);\n $this->writeDebug((string) $response->getBody());\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return ObjectSerializer::deserialize($content, $returnType, $response->getHeaders());\n },\n function ($exception) {\n $response = $exception->getResponse();\n $hasResponse = !empty($response);\n $body = (string) ($hasResponse ? $response->getBody() : '[NULL response]');\n $this->writeDebug($response);\n $statusCode = $hasResponse ? $response->getStatusCode() : $exception->getCode();\n\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $body,\n );\n }\n );\n }", "public function isNotApprovedItemCount()\n {\n $api = $this->getServiceLocator()->get('Omeka\\ApiManager');\n $response = $api->search('scripto_items', [\n 'scripto_project_id' => $this->id(),\n 'is_not_approved' => true,\n 'limit' => 0,\n ]);\n return $response->getTotalResults();\n }", "public function getNumberOfItemsUnshipped()\n {\n return $this->_fields['NumberOfItemsUnshipped']['FieldValue'];\n }", "public function popular()\n {\n $return = json_decode($this->_Client->httpCall('items/popular'));\n\n if (isset($return->error)) {\n return $return->errorMessage;\n } else {\n return $return;\n }\n }", "public function getItemsCount();", "public function getUnassociatedDigitalItemsWithHttpInfoRetry($retry , $_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null, $_placeholders = null)\n {\n $returnType = '\\ultracart\\v2\\models\\ItemDigitalItemsResponse';\n $request = $this->getUnassociatedDigitalItemsRequest($_limit, $_offset, $_since, $_sort, $_expand, $_placeholders);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n\n if($e->getResponse()) {\n $response = $e->getResponse();\n $statusCode = $response->getStatusCode();\n $retryAfter = 0;\n $headers = $response->getHeaders();\n if (array_key_exists('Retry-After', $headers)) {\n $retryAfter = intval($headers['Retry-After'][0]);\n }\n\n if ($statusCode == 429 && $retry && $retryAfter > 0 && $retryAfter <= $this->config->getMaxRetrySeconds()) {\n sleep($retryAfter);\n return $this->getUnassociatedDigitalItemsWithHttpInfoRetry(false , $_limit, $_offset, $_since, $_sort, $_expand, $_placeholders);\n }\n }\n\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ItemDigitalItemsResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 410:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function getNumberOfItemsUnshipped();", "public function get_unindexed_count() {\n\t\t$unindexed_count = $this->post_indexation->get_total_unindexed();\n\t\t$unindexed_count += $this->term_indexation->get_total_unindexed();\n\t\t$unindexed_count += $this->general_indexation->get_total_unindexed();\n\t\t$unindexed_count += $this->post_type_archive_indexation->get_total_unindexed();\n\t\t$unindexed_count += $this->post_link_indexing_action->get_total_unindexed();\n\t\t$unindexed_count += $this->term_link_indexing_action->get_total_unindexed();\n\n\t\treturn $unindexed_count;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When cloning some Entity that is NOT in detached mode, the cloning will create new Entity with the same properties but without ID. If the ID should be preserved, just invoke >detach on existing attached entity before its cloning. ATTENTION: The mapper of Entity is gonna be removed, so you cannot get reference to another Entity within cloned Entity. But the IDs of those Entities are available inside the $row.
public function __clone() { if (!$this->row->isDetached()) { $this->row = clone $this->row; $primaryKey = $this->mapper ->getPrimaryKey( $this->getReflection() ->getShortName() ); $this->row->detach(); // Entity now has NO ID, but for persisting is // used $modified property of Result, where the ID // is still available -> Error when unique key is defined // at column/s. // we have to unset the ID manually unset($this->row->{$primaryKey}); } $this->mapper = null; }
[ "public function __clone()\n\t{\n\t\tif($this->isPersisted)\n\t\t{\n\t\t\t$this->isPersisted = false;\n\t\t\t$this->original = [];\n\t\t\t$this->related = [];\n\n\t\t\tunset($this->columns[$this->primaryKey]);\n\t\t}\n\t}", "public function __clone()\n\t\t{\n\t\t\t$aPrimaryKey = $this->oDatabase->GetTablePrimaryKey( $this->sTableName );\n\t\t\t\n\t\t\tif( count( $aPrimaryKey ) == 1 )\n\t\t\t{\n\t\t\t\t$sPrimaryKey = reset( $aPrimaryKey );\n\t\t\t\t\n\t\t\t\t$this->{$sPrimaryKey} = null;\n\t\t\t}\n\t\t\n\t\t}", "public function __clone() {\n /* ensure attributes are loaded from DB. readExtraItem() isn't\n * called here because maybe the content is already there and it would\n * cause the DB operation to be done twice.\n */\n $this->getAttribute('uid');\n\n // unset the UID so the object can be written to a new DB record.\n $this->attributes['uid'] = 0;\n $this->setUid(0);\n\n $this->setAttribute('crdate', time());\n $this->setAttribute('tstamp', time());\n\n $this->store();\n\n /// clone extras, creating new abstract references to the concrete records\n $old_extras = $this->getExtras();\n $this->extras = array();\n foreach ($old_extras as $old_extra) {\n $this->extras[] = clone $old_extra;\n }\n }", "protected function _rowToEntity($row) {\r\n \t$id = $row->{$this->_getPrimary()};\r\n \t\r\n \tif($this->_hasIdentity($id)) {\r\n \t\t$entity = $this->_getIdentity($id);\r\n \t}\r\n \telse {\r\n \t\t$entity = $this->create();\r\n \t\r\n\t\t\tforeach($entity->getAttributes() as $name) {\r\n\t\t\t\tif($this->_isReference($name)) {\r\n\t\t\t\t\t$refId = $row->{$this->_getReferenceField($name)};\r\n\t \t\t\tif($this->_referenceMap[$name]['earlyLoad']) {\r\n\t \t\t\t\t$entity->{$name} = $this->getReferenceEntity($name, $refId);\r\n\t \t\t\t}\r\n\t \t\t\t// Register the id on the entity for lazy load\r\n\t \t\t\telse {\r\n\t \t\t\t\t$entity->addLazyReference($name, $refId);\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t\telseif($this->_isDependence($name)) {\r\n\t \t\t\tif($this->_dependenciesMap[$name]['earlyLoad']) {\r\n\t \t\t\t\t$entity->{$name} = $this->getDependentEntities($name, $id);\r\n\t \t\t\t}\r\n\t \t\t\telse {\r\n\t \t\t\t\t$entity->addLazyDependencies($name);\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\t$entity->{$name} = $row->{$name};\r\n\t \t\t}\r\n\t \t}\r\n\t \t$this->_setIdentity($id, $entity);\r\n \t}\r\n \t\r\n \treturn $entity;\r\n }", "public function __clone() {\n\t\t// Save the data we care about\n\t\t$data = $this->getFieldsWithoutPk();\n\t\t\n\t\t// Reset all attributes of the cloned object (yes, undo everything PHP did)\n\t\t$className = get_class($this);\n\t\t$freshObject = new $className();\n\t\tforeach ($freshObject as $key => $value) {\n\t\t\t$this->$key = $value;\n\t\t}\n\t\t\n\t\t// Mark all fields as having been modified (except key ID) so that a call to save() will complete the clone.\n\t\t$this->setFields($data);\n\t}", "public function __clone()\n {\n foreach ($this->columns as &$col)\n $col = clone $col;\n\n foreach ($indexes as &$index)\n {\n $index = clone $index;\n if ($index->getType() === Index::PRIMARY)\n $this->primary = $index;\n }\n\n foreach ($foreign_keys as &$fk)\n $fk = clone $fk;\n }", "public function __clone()\n {\n // Make the model appear as if it was a new record.\n foreach($this->primaryKey() as $key)\n {\n $this->$key = null;\n }\n \n $this->isNewRecord = true;\n $this->dt_crtd = null;\n $this->ts_updt = null;\n \n $this->trigger(self::EVENT_AFTER_CLONE);\n \n // Reattaches the behaviors because they pointed to the model cloned from.\n $this->detachBehaviors();\n // Remove all event registration manually because behaviors removed their event listeners on the model cloned from.\n foreach((new \\ReflectionClass(self::className()))->getConstants() as $name => $constant)\n {\n if(strpos($name, 'EVENT_') === 0) // If the constant begins with EVENT_.\n {\n $this->off($constant); // Remove all handlers to this event.\n }\n }\n $this->attachBehaviors($this->behaviors());\n }", "public function detach()\n {\n foreach ($this->maps as $child) {\n $child->map_id = null;\n $child->save();\n }\n\n return parent::detach();\n }", "public function __clone()\n {\n if (! $this->uuid) {\n /*\n * ensure doctrine proxies compatibility\n * @see http://doctrine-orm.readthedocs.io/en/latest/cookbook/implementing-wakeup-or-clone.html\n */\n return;\n }\n $this->uuid = Uuid::uuid4()->toString();\n }", "public function __clone()\n {\n // Clone the fields of the cloned Board and adjust the fields parent boards\n foreach ($this->fields as $y => $row)\n {\n foreach ($row as $x => $field)\n {\n $tmpField = clone $field;\n $tmpField->setParentBoard($this);\n\n $this->fields[$y][$x] = $tmpField;\n }\n }\n }", "public function copy()\n {\n // Just a simple shallow copy because entities only have primitives attributes\n return clone $this;\n }", "public function __clone()\n {\n foreach ($this->_columns as $k => $column) {\n $this->_columns[$k] = clone $column;\n }\n\n foreach ($this->_indexes as $k => $index) {\n $this->_indexes[$k] = clone $index;\n }\n\n foreach ($this->_fkConstraints as $k => $fk) {\n $this->_fkConstraints[$k] = clone $fk;\n $this->_fkConstraints[$k]->setLocalTable($this);\n }\n }", "public function detach($entity);", "public function prepare($entity, stdClass $row) {\n $entity->nid = reset($entity->node);\n }", "public function __clone()\n {\n foreach ($this->_associations as $i => $association) {\n $this->_associations[$i] = clone $association;\n }\n }", "public function __clone()\n {\n foreach ($this->_sqlParts AS $part => $elements) {\n if (is_array($this->_sqlParts[$part])) {\n foreach ($this->_sqlParts[$part] AS $idx => $element) {\n if (is_object($element)) {\n $this->_sqlParts[$part][$idx] = clone $element;\n }\n }\n } else if (\\is_object($elements)) {\n $this->_sqlParts[$part] = clone $elements;\n }\n }\n }", "public function cloneEntity()\n {\n // Clone order\n $newOrder = parent::cloneEntity();\n\n if ($this->getOrderNumber() && !$this->isTemporary()) {\n $newOrder->setOrderNumber(\n \\XLite\\Core\\Database::getRepo('XLite\\Model\\Order')->findNextOrderNumber()\n );\n }\n\n // Clone profile\n $newOrder->setOrigProfile($this->getOrigProfile());\n\n if ($this->getProfile()) {\n $clonedProfile = $this->getProfile()->cloneEntity();\n $newOrder->setProfile($clonedProfile);\n $clonedProfile->setOrder($newOrder);\n }\n\n // Clone currency\n $newOrder->setCurrency($this->getCurrency());\n\n // Clone order statuses\n $newOrder->setPaymentStatus($this->getPaymentStatus());\n $newOrder->setShippingStatus($this->getShippingStatus());\n\n // Clone order items\n $this->cloneOrderItems($newOrder);\n\n // Clone order details\n foreach ($this->getDetails() as $detail) {\n $clonedDetails = $detail->cloneEntity();\n $newOrder->addDetails($clonedDetails);\n $clonedDetails->setOrder($newOrder);\n }\n\n // Clone tracking numbers\n foreach ($this->getTrackingNumbers() as $tn) {\n $clonedTN = $tn->cloneEntity();\n $newOrder->addTrackingNumbers($clonedTN);\n $clonedTN->setOrder($newOrder);\n }\n\n // Clone events\n foreach ($this->getEvents() as $event) {\n $cloned = $event->cloneEntity();\n $newOrder->addEvents($cloned);\n $cloned->setOrder($newOrder);\n $cloned->setAuthor($event->getAuthor());\n }\n\n // Clone surcharges\n foreach ($this->getSurcharges() as $surcharge) {\n $cloned = $surcharge->cloneEntity();\n $newOrder->addSurcharges($cloned);\n $cloned->setOwner($newOrder);\n }\n\n // Clone payment transactions\n foreach ($this->getPaymentTransactions() as $pt) {\n $cloned = $pt->cloneEntity();\n $newOrder->addPaymentTransactions($cloned);\n $cloned->setOrder($newOrder);\n }\n\n return $newOrder;\n }", "public function __clone()\n {\n if(!empty($this->dataList)) {\n foreach($this->dataList as $column) {\n $this->$column = null;\n }\n }\n }", "public function testClonedEntityFields() {\n $user = $this->createUser();\n\n // Create a test entity.\n $entity = EntityTestMul::create([\n 'name' => $this->randomString(),\n 'user_id' => $user->id(),\n 'language' => 'en',\n ]);\n\n $entity->addTranslation('de');\n $entity->save();\n $fields = array_keys($entity->getFieldDefinitions());\n\n // Reload the entity, clone it and check that both entity objects reference\n // different field instances.\n $entity = $this->reloadEntity($entity);\n $clone = clone $entity;\n\n $different_references = TRUE;\n foreach ($fields as $field_name) {\n if ($entity->get($field_name) === $clone->get($field_name)) {\n $different_references = FALSE;\n }\n }\n $this->assertTrue($different_references, 'The entity object and the cloned entity object reference different field item list objects.');\n\n\n // Reload the entity, initialize one translation, clone it and check that\n // both entity objects reference different field instances.\n $entity = $this->reloadEntity($entity);\n $entity->getTranslation('de');\n $clone = clone $entity;\n\n $different_references = TRUE;\n foreach ($fields as $field_name) {\n if ($entity->get($field_name) === $clone->get($field_name)) {\n $different_references = FALSE;\n }\n }\n $this->assertTrue($different_references, 'The entity object and the cloned entity object reference different field item list objects if the entity is cloned after an entity translation has been initialized.');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
converts mm to inches
function convert_mm_to_inches($mmsize) { if (strpos($mmsize, "x")!==false) { // separated by x $sizes = explode("x", $mmsize); $sep = 'x'; } elseif (strpos($mmsize, "&")!==false) { // separated by & $sizes = explode("&", $mmsize); $sep = '&'; } elseif (strpos($mmsize, "-")!==false) { // separated by - $sizes = explode("-", $mmsize); $sep = '-'; } elseif (strpos($mmsize, "or")!==false) { // separated by or $sizes = explode("or", $mmsize); $sep = 'or'; } else { $sizes[] = $mmsize; $sep = ""; } foreach ($sizes as $size) { if (intval($size)<4) { return $mmsize . "mm"; } $decimal = (($size/10)/2.54); $decimal = round($decimal / 0.125) * 0.125; $newsize[] = " " . decimal_to_fraction($decimal) . " inch "; $newmm[] = " ".trim($size)."mm "; } return implode($sep, $newsize) . " (" . trim(implode($sep, $newmm)) . ") "; }
[ "private function inchesToMm($inches)\n {\n return $inches * 25.4;\n }", "function to_inches($mm,$denom) {\n #\n # Arguments:\n # mm - length in millimeters\n # denom - accuracy in fractions of an inch, e.g. 1/8, 1/16, etc.\n #\n $in_frac = round($mm/25.4*$denom,0,PHP_ROUND_HALF_UP);\n $inches = floor($in_frac/$denom);\n $num = $in_frac % $denom;\n $gcd = gcd($num,$denom);\n $num = $num/$gcd;\n $denom = $denom/$gcd;\n $retval = \"\";\n if ($num == 0) {\n $retval = $inches . \"\\\"\";\n } \n else {\n $retval = $inches . \" \" . $num . \"/\" . $denom . \"\\\"\";\n }\n return $retval;\n}", "function inchesToCm($inches)\n {\n // Berechnen des Ergebnisses\n $cm = $inches * 2.54;\n\n // Ausgabe der Tabellenzeile\n echo \"<tr><td>$inches</td><td>$cm</td></tr>\";\n }", "function MMtoINCHES($value, $precision) {\nglobal $rain_prec;\nreturn round($value = (.0393700787 * $value),$precision);\n}", "function toCentimeters($feet, $inches)\n{\n $heightResult = (($feet * 12) + $inches) * 2.54;\n\n return $heightResult;\n}", "private function feetInchestoMeters() {\n if (strstr($this->iU, '.')) {// Decimal feet\n $f = substr($this->iU, 0, strstr($this->iU, '.'));\n $i = ($this->iU - $f) * 12.0;\n } elseif (strstr($this->iU, \"'\")) {// 7'2\" format\n $f = substr($this->iU, 0, strstr($this->iU, \"'\"));\n $i = substr($this->iU, strstr($this->iU, \"'\"));\n if (strstr($i, '\"')) {\n $i = substr($i, 0, strstr($i, '\"'));\n }\n } else {// Just feet\n $f = $this->iU;\n $i = 0;\n }\n return round(($f * 0.3048) + ($i * 0.0254), 1);\n }", "function px2mm($px)\n{\n return $px * 25.4 / 72;\n}", "function px2mm($px) {\n return $px * 25.4 / 72;\n}", "private function mmToIn($mm) {\n return $mm * 0.0393700787;\n }", "function millibar2inch($millibar) {\n\treturn $millibar/33.86;\n}", "public static function inchSizeToPixels($sizeInInch = 1)\n {\n return ($sizeInInch * 96);\n }", "function px2mm($px){\r\n return $px*25.4/72;\r\n}", "public static function inchSizeToPixels ($sizeInInch = 1)\n {\n return ($sizeInInch * 96);\n }", "function px2mm($px){\n return $px*25.4/72;\n}", "public function getCentimeters()\r\n {\r\n switch ($this->unit)\r\n {\r\n case 'cm':\r\n return $this->size;\r\n case 'mm':\r\n return $this->size * 10;\r\n case 'in':\r\n return $this->size / 2.54;\r\n }\r\n }", "function px2mm($px){\n return $px*25.4/72;\n}", "public function centimeters()\n {\n return $this->to('cm');\n }", "function px2mm( $px ){\n return $px*25.4/72;\n}", "function convert_cm_to_feet($cm_value)\n{\n\t//TODO: Convert cm to feet eg. 5'7\n\treturn $cm_value;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Store a newly created Shippingmethod in storage.
public function store(CreateShippingmethodRequest $request) { $input = $request->all(); $shippingmethod = $this->shippingmethodRepository->create($input); Flash::success('Shippingmethod saved successfully.'); return redirect(route('admin.shippingmethods.index')); }
[ "public function store(CreateShipmentMethodRequest $request)\n {\n $input = $request->all();\n\n $shipmentMethod = $this->shipmentMethodRepository->create($input);\n\n Flash::success('Shipment Method saved successfully.');\n\n return redirect(route('shipmentMethods.index'));\n }", "public function register_shipping_method( $method ) {\n\t\tif ( ! is_object( $method ) ) {\n\t\t\t$method = new $method();\n\t\t}\n\n\t\t$id = empty( $method->instance_id ) ? $method->id : $method->instance_id;\n\n\t\t$this->shipping_methods[ $id ] = $method;\n\t}", "public function save() {\n if ($this->isNew) {\n list($error, $response) = $this->connection->post(\n $this->pathFor('create'), \n array('payment_method' => $this->sanitizedAttributes())\n );\n $this->handleResponse($error, $response);\n $this->isNew = false;\n } else {\n list($error, $response) = $this->connection->put(\n $this->pathFor('update'), \n array('payment_method' => $this->sanitizedAttributes())\n );\n $this->handleResponse($error, $response);\n }\n }", "public function saveShippingMethodAction()\n {\n if ($this->_expireAjax()) {\n return;\n }\n if ($this->getRequest()->isPost()) {\n $data = $this->getRequest()->getPost('shipping_method', '');\n $result = $this->getOnepage()->saveShippingMethod($data);\n // $result will contain error data if shipping method is empty\n if (!$result) {\n Mage::dispatchEvent(\n 'checkout_controller_onepage_save_shipping_method',\n array(\n 'request' => $this->getRequest(),\n 'quote' => $this->getOnepage()->getQuote()));\n $this->getOnepage()->getQuote()->collectTotals();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n $result['skipPayment'] = false;\n if($this->getOnepage()->getQuote()->getGrandTotal() == 0){\n $result['skipPayment'] = true;\n }\n $result['goto_section'] = 'payment';\n $result['update_section'] = array(\n 'name' => 'payment-method',\n 'html' => $this->_getPaymentMethodsHtml()\n );\n }\n $this->getOnepage()->getQuote()->collectTotals()->save();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }\n }", "public function saveShippingMethodAction()\n {\n if ($this->_expireAjax()) {\n return;\n }\n if ($this->getRequest()->isPost()) {\n $data = $this->getRequest()->getPost('shipping_method', '');\n $result = $this->getOnepage()->saveShippingMethod($data);\n /*\n $result will have erro data if shipping method is empty\n */\n if(!$result) {\n Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method',\n array('request'=>$this->getRequest(),\n 'quote'=>$this->getOnepage()->getQuote()));\n $this->getOnepage()->getQuote()->collectTotals();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\n $result['goto_section'] = 'payment';\n\t\t\t\t\n $result['update_section'] = array(\n 'name' => 'payment-method',\n 'html' => $this->_getPaymentMethodsHtml()\n );\n\t\t\t\t\n\t\t\t\t$shippingAmount = $this->getOnepage()->getQuote()->getShippingAddress()->getShippingAmount();\n\t\t\t\tif ($shippingAmount > 0) {\n\t\t\t\t\t$shippingAmount = Mage::helper('core')->formatPrice($shippingAmount, false);\n\t\t\t\t} else {\n\t\t\t\t\t$shippingAmount = 'FREE';\n\t\t\t\t}\n\t\t\t\t\n $result['set_summary'] = array(\n 'name' => 'shipping_method',\n 'html' => $this->getOnepage()->getQuote()->getShippingAddress()->getShippingDescription().' - '.\n\t\t\t\t\t\t\t\t$shippingAmount\n );\n }\n $this->getOnepage()->getQuote()->collectTotals()->save();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }\n }", "public function saveShippingMethodAction(){\n\t\tif ($this->_expireAjax()) {\n\t\t\treturn;\n\t\t}\n\t\t$responseData = array();\n\n\t\tif ($this->getRequest()->isPost()) {\n\n\t\t\t$this->checkNewslatter();\n\n\t\t\t$data = $this->getRequest()->getPost('shipping_method', '');\n\t\t\t$result = $this->getOnepage()->saveShippingMethod($data);\n\t\t\t/*\n\t\t\t $result will have erro data if shipping method is empty\n\t\t\t*/\n\t\t\tif(!$result) {\n\t\t\t\tMage::dispatchEvent('checkout_controller_onepage_save_shipping_method',\n\t\t\t\t\tarray('request'=>$this->getRequest(),\n\t\t\t\t\t\t'quote'=>$this->getOnepage()->getQuote())\n\t\t\t\t);\n\n\t\t\t\t$this->getOnepage()->getQuote()->collectTotals();\n\t\t\t\t$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\n\t\t\t\t$responseData['review'] = $this->_getReviewHtml();\n\t\t\t\t$responseData['grandTotal'] = Mage::helper('opc')->getGrandTotal();\n\t\t\t\t/*$result['update_section'] = array(\n\t\t\t\t\t\t'name' => 'payment-method',\n\t\t\t\t\t\t'html' => $this->_getPaymentMethodsHtml()\n\t\t\t\t);*/\n\t\t\t}\n\t\t\t$this->getOnepage()->getQuote()->collectTotals()->save();\n\n\n\n\t\t\t$this->getResponse()->setHeader('Content-type','application/json', true);\n\t\t\t$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($responseData));\n\t\t}\n\t}", "public function setShippingMethod($shippingMethod);", "public static function shipping_zone_methods_save_changes()\n {\n }", "function woocommerce_register_shipping_method($shipping_method)\n {\n }", "public function saveShippingAction()\n {\n $quote = $this->_getQuote();\n $quote->setTotalsCollectedFlag(false)->collectTotals()->save();\n\n // collect shipping rates\n $quote->getShippingAddress()->removeAllShippingRates();\n $quote->getShippingAddress()->setCollectShippingRates(true)->collectShippingRates();\n\n // Save the shipping method\n $submitShipping = $this->getRequest()->getParam('submit_shipping');\n if (!empty($submitShipping)) {\n // Check the shipping rate we want to use is available\n $method = $this->getRequest()->getParam('shipping_method');\n if (!empty($method) && $quote->getShippingAddress()->getShippingRateByCode($method)) {\n $quote->getShippingAddress()->setShippingMethod($method);\n $quote->setTotalsCollectedFlag(false)->collectTotals()->save();\n }\n }\n\n return $this->_returnJson(array(\n 'success' => true,\n 'totals' => $this->_returnTotals()\n ));\n }", "public function shipped () {\n $this->shipped = true;\n $this->save();\n }", "public function create()\n\t{\n\t\t$method = new ShipMethod;\n\t\treturn View::make('ship_methods.create', compact('method'));\n\t}", "public function save(){\n\n $this->validate();\n\n if ($this->shipping_id) {\n $shipping = ShippingCompany::find($this->shipping_id);\n } else {\n $shipping = new ShippingCompany();\n }\n $shipping->name = $this->name;\n $shipping->phone = $this->phone;\n $shipping->address = $this->address;\n $shipping->mobile = $this->mobile;\n $shipping->save();\n\n $this->clear();\n }", "public function saveInfoShippingAction()\r\n {\r\n $this->_initCheckout();\r\n $formActionURL = Mage::getSingleton('core/session')->getData('FormActionURL');\r\n if ($formActionURL) {\r\n Mage::getSingleton('core/session')->unsetData('FormActionURL');\r\n }\r\n $shippingMethod = $this->getRequest()->getParam('shipping_method');\r\n if ($shippingMethod) {\r\n //Save to quote\r\n $this->_quote->getShippingAddress()->setShippingMethod($shippingMethod)->save();\r\n\r\n //Get price\r\n $quote = $this->_getQuote();\r\n $cRate = $this->_checkout->getShippingByCode($shippingMethod);\r\n if ($cRate) {\r\n echo json_encode(array(\r\n 'form_action' => $formActionURL,\r\n 'input_post' => '<input type=\"hidden\" name=\"EWAY_NEWSHIPPINGTOTAL\" value=\"' . round($cRate->getPrice() * 100) . '\" />'\r\n ));\r\n } else {\r\n Mage::throwException($this->__('Method not found.'));\r\n }\r\n } else {\r\n Mage::throwException($this->__('Method not support.'));\r\n }\r\n die;\r\n }", "public function save_shippingAction() {\n $shipping_method = $this->getRequest()->getPost('shipping_method', '');\n $payment_method = $this->getRequest()->getPost('payment_method', false);\n $old_shipping_method = $this->getOnepage()->getQuote()->getShippingAddress()->getShippingMethod();\n if ($shipping_method && $shipping_method != '' && $shipping_method != $old_shipping_method) {\n ////Mage::helper('onestepcheckout')->saveShippingMethod($shipping_method);\n $this->getOnepage()->saveShippingMethod($shipping_method);\n }\n\n if ($payment_method != '') {\n try{\n $payment = $this->getRequest()->getPost('payment', array());\n $payment['method'] = $payment_method;\n Mage::helper('onestepcheckout')->savePaymentMethod($payment);\n }\n catch(Exception $e) {\n }\n }\n \n // $paymentHtml = $this->_getPaymentMethodsHtml();\n // $reviewHtml = $this->_getReviewTotalHtml();\n // $result = array('payment' => $paymentHtml, \n // 'review' => $reviewHtml);\n // $this->getResponse()->setBody(Zend_Json::encode($result));\n $this->loadLayout(false);\n $this->renderLayout();\n }", "private function createBackupMethod()\n {\n return ShippingMethod::fromArray(\n [\n 'id' => 'backup',\n 'title' => 'shipping cost',\n ]\n );\n }", "private function createShip(): void\n {\n $this->ship = Ship::create([\n 'team_id' => $this->data['team_id'],\n 'title' => $this->data['title'],\n 'description' => $this->valueOrNull($this->data, 'description'),\n ]);\n }", "public function add_shipping_method($type)\n {\n }", "public function saveShipment(ShipmentInterface $shipment): ShipmentInterface;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets birth year, from the category Naissance en.
static public function get_birth_year ($name, $bypassCache = false) { $ds = new FrWikipediaDataSource($name); $categories = $ds->get_categories($bypassCache); foreach ($categories as $category) { $matches = []; if (preg_match('/Catégorie:Naissance en ([0-9]{4})/', $category, $matches)) { return $matches[1]; } } return null; }
[ "public function getBirthYear();", "function getBirthYear(){\n\t\treturn $this->getBirthDate()->MinDate()->Format('Y');\n\t}", "private function getNIKYear()\n\t{\n\t\treturn intval(substr($this->nik, 10, 2));\n\t}", "public function getDeathYear() {\n\t\treturn $this->getDeathDate()->minimumDate()->format('%Y');\n\t}", "public function getBirthAndDeathYears()\n {\n if ($this->date_of_birth)\n $years = substr($this->date_of_birth, 0, 4);\n else\n return '?';\n if ($this->date_of_death)\n $years .= ' - ' . substr($this->date_of_death, 0, 4);\n\n return $years;\n }", "public function getBornYear()\n {\n if ($this->deathAge < 0 || $this->deathYear < 0) {\n return -1;\n }\n $bornYear = intval($this->deathYear) - intval($this->deathAge);\n if ($bornYear >= 0) {\n return $bornYear;\n } else {\n return -1;\n }\n }", "public function getYear()\n {\n return substr( $this->fullYear, -2);\n }", "public function getYearOfBirth()\n {\n return $this->yearOfBirth;\n }", "public static function getYear() {\n $date = self::toJalali();\n return $date['year'];\n }", "private function _get_year() {\n // Element is required and may appear once only\n return $this->_eval_query_as_string(\"/{$this->nsp}article/{$this->nsp}admin/{$this->nsp}numero/{$this->nsp}pub/{$this->nsp}annee\");\n }", "public function getBirthCentury() : int\n {\n $firstNo = substr($this->code, 0, 1);\n return 1700 + ceil($firstNo / 2) * 100;\n }", "public function getYear()\n {\n return $this->getValue('year');\n }", "public function getYear(): string\n {\n return $this->toLocalizedString('y');\n }", "public function getPublicationYear();", "function get_age($birth_year) {\n print \"Age: \".(2017-$birth_year);\n }", "public function getYear() {\n\t\treturn $this->format ( 'y' );\n\t}", "public function getYear()\r\n\t{\r\n\t\treturn $this->format('y');\r\n\t}", "public function yearInCredit()\n {\n switch ((int) $this->value) {\n case 1:\n $string = 'First-year';\n break;\n\n case 2:\n $string = 'Sophomore';\n break;\n\n case 3:\n $string = 'Junior';\n break;\n\n case 4:\n $string = 'Senior';\n break;\n\n case 5:\n $string = 'Fifth-year';\n break;\n\n case 6:\n $string = 'Exchange';\n break;\n\n case 7:\n $string = 'Non-degree';\n break;\n\n case 8:\n $string = 'PSEO';\n break;\n\n case 9:\n $string = 'Graduate';\n break;\n\n case 10:\n $string = 'Community auditor';\n break;\n\n default:\n $string = 'unknown';\n break;\n }\n\n return new GACString($string);\n }", "public function getPublicationYear() {\n $fields = array('publicationYear');\n $result = TingOpenformatMethods::parseFields($this->_getPublicationDetails(), $fields);\n return (is_array($result)) ? reset($result) : $result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a new operatorActionExtension
public function setOperatorActionExtension(\Calcinai\Siri\Objects\Datex\ExtensionType $operatorActionExtension) { $this->operatorActionExtension = $operatorActionExtension; return $this; }
[ "public function setAction(array $action): self;", "public function setCampaignExtensionSettingOperation($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Ads\\GoogleAds\\V8\\Services\\CampaignExtensionSettingOperation::class);\n $this->writeOneof(26, $var);\n\n return $this;\n }", "public function addEditAction($action, array $extensions) {\n $this->addDecorator(new EditActionDecorator($action, $this->fileBrowser, $extensions));\n }", "public function setAction($action);", "public function setCloneFunction($action)\n {\n $this->clone_function = $action;\n }", "public function setAction($action = '');", "public function registerOperator($operator, $callback) {}", "public function defOperator($operator, callable $func) {\n if ($operator & Token::T_OPERATOR == 0) {\n throw new ShuntException('unsupported operator');\n }\n $this->operatorHandlers[$operator] = $func;\n }", "public function setExtension($extension);", "public function setOperator($operator) {\n\t\t$this->operator = $operator;\n\t}", "function setAction($action)\n {\n $this->__action = $action ;\n }", "public function setAction(string $action);", "public function SetAction(){ \n\n\t $request = self::$yAction['_LITE_']['REQUEST'];\n\t if( $this->ActionExist() ){\n\t \n\t $this->action = self::$yAction['_LITE_']['ACTION'] = $request[$this->actionQuerystring]; \n\t \n }else{ self::$yAction['_LITE_']['ACTION'] = $this->action; }\n \n if(!isset($this->templateAction)){ $this->templateAction = $this->action; }\n \n\t}", "public function setOperator($operator)\n {\n $this->operator = $operator;\n }", "public function setAction(array $action)\n {\n $this->action = $action;\n\n return $this;\n }", "function setAction($action) {\n $this->action = $action;\n }", "public function activate_extension(){}", "public function set_External_Definition_Operator($str_ext_def_op_in) {\n $this->ext_def_op = $str_ext_def_op_in;\n }", "public function enable(Extension $extension);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load configuration file $filename. It should have $settings variable of type array in it.
static function loadConfig($filename) { $settings = null; include $filename; // config file defines local array $settings if ($settings) { self::importConfig($settings); } }
[ "public static function load_settings_file($filename)\n {\n // Turn on output buffering to prevent accidental output.\n ob_start();\n include($filename);\n ob_get_clean();\n \n // We should now have an array $s with which to merge\n // the current settings.\n if (!empty($s)) {\n static::load_settings($s);\n }\n }", "protected function loadFile(string $filename)\n\t{\n\t\t$absolutePath = FS::resolve($this->configFolder . '/' . strtolower($filename) . '.php');\n\n\t\tif (\\file_exists($absolutePath)) {\n\t\t\t$array = require $absolutePath;\n\n\t\t\tif (\\is_array($array)) {\n\t\t\t\t$this->config[basename($absolutePath, '.php')] = $array;\n\t\t\t}\n\t\t}\n\t}", "private function addSettings($filename)\n {\n // Check for file.\n if (!file_exists($filename))\n {\n throw new ConfigurationException('config-file-not-found', $filename);\n }\n \n // Load ini file and add settings.\n $settings = parse_ini_file($filename, false);\n $this->settings = array_merge($this->settings, $settings);\n }", "protected function getConfiguration($filename)\n {\n return $this->getLoader()->loadFile($filename);\n }", "static function LoadConfig($filename = \"config.json\") {\n $fp = fopen($filename, \"r\");\n $jsonStr = fread($fp, 100000);\n return json_decode($jsonStr, true);\n }", "function readFromFile($filename){\n\t\ttry{\n\t\t\t/**\n\t\t\t * a return array() format file\n\t\t\t * would return a value\n\t\t\t */\n\t\t\tinclude $filename;\n\t\t}catch(Exception $e){\n\t\t\t//on error happends do nothing\n\t\t}\n\t\treturn $config;\n\t}", "public function load($filename, $context = null) {\n if (is_file($filename)) {\n $file = $filename;\n }\n else if (is_file($context.DIRECTORY_SEPARATOR.$filename)) {\n $file = $context.DIRECTORY_SEPARATOR.$filename;\n }\n else {\n throw new Exception(\"Couldn't find: \".$filename.\" in: \".$context);\n }\n\n $this->settings = parse_ini_file($file);\n\n if ($this->settings === false) {\n throw new Exception(\"Could not process ini file: \".$file);\n }\n }", "function ConfigReader($filename) \n {\n assert('Debug::log(\"ConfigReader: parsing file \\'$filename\\'\")');\n $this->state =& new ConfigReaderState($filename);\n $this->sections = $this->parseFields();\n }", "public function loadConfig($file) {\n $config = require_once(CONFIGPATH . $file . EXT);\n if(is_array($config)) {\n foreach ($config as $k => $v)\n $this->setConfig($k, $v);\n }\n }", "function load($fileName) {\r\n\t\t$_this =& Configure::getInstance();\r\n\r\n\t\tif(!file_exists(CONFIGS . $fileName . '.php')) {\r\n\t\t\ttrigger_error(\"Configure::load() - $fileName.php not found\", E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tinclude(CONFIGS . $fileName . '.php');\r\n\t\tif(!isset($config)){\r\n\t\t\ttrigger_error(\"Configure::load() - no variable \\$config found in $fileName.php\", E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn $_this->write($config);\r\n\t}", "protected function loadConfigs()\n {\n $this->configs = $this->file->parse();\n }", "protected function set_from_file()\n\t{\n\t\t$custom_config_file = $this->ext_root_path . 'config.' . $this->php_ext;\n\n\t\tif (file_exists($custom_config_file))\n\t\t{\n\t\t\tinclude($custom_config_file);\n\n\t\t\tif (!isset($config) || !is_array($config))\n\t\t\t{\n\t\t\t\t$config = array();\n\t\t\t}\n\n\t\t\t$this->__set_array($config);\n\t\t}\n\t}", "public function loadYamlConfig($filepath);", "private function loadConfiguration()\n {\n # load configuration\n $this->config = @include($this->configFile);\n $this->validateConfig();\n }", "private static function loadSettings() {\n $settingsFile = ROOT . 'config/settings.json';\n\n if (!file_exists($settingsFile)) {\n self::$settings = array();\n return;\n }\n\n self::$settings = json_decode(file_get_contents($settingsFile), TRUE);\n foreach (self::$settings as $key => $value) {\n Template::assign($key, $value);\n }\n }", "public static function load($filename, $section)\r\n {\r\n if (empty($filename)) {\r\n throw new Zend_Config_Exception('Filename is not set');\r\n }\r\n if (empty($section)) {\r\n throw new Zend_Config_Exception('Section is not set');\r\n }\r\n\r\n $iniArray = parse_ini_file($filename, true);\r\n if (!isset($iniArray[$section])) {\r\n throw new Zend_Config_Exception(\"Section '$section' cannot be found in $filename\");\r\n }\r\n\r\n $self = new self();\r\n return $self->_processExtends($iniArray, $section);\r\n }", "public function get($filename)\n {\n return new Config($this->parser, $this->dumper, $filename);\n }", "public static function loadConfig($configFile) {\n\t}", "public function load($filename)\n {\n // File needs to exist.\n if (file_exists($filename)) {\n\n // Parse as INI file.\n $data = parse_ini_file($filename);\n if (array_key_exists('edges', $data) && array_key_exists('thresholds', $data)) {\n\n // Make sure all standard preparations performed.\n $this->initWeights();\n $this->weightsInitialized = true;\n\n // Load data from file.\n $this->edgeWeight = unserialize($data['edges']);\n $this->nodeThreshold = unserialize($data['thresholds']);\n\n // Load IDs of training and control set.\n if (array_key_exists('training_data', $data) && array_key_exists('control_data', $data)) {\n\n // Load the IDs.\n $this->trainDataIds = unserialize($data['training_data']);\n $this->controlDataId = unserialize($data['control_data']);\n\n /* If we do not reset the training and control data here, then we end up with a bunch of IDs that do\n * not refer to the actual data we're training the network with. */\n $this->trainInputs = [];\n $this->trainOutput = [];\n $this->controlInputs = [];\n $this->controlOutput = [];\n }\n\n // Return success.\n return true;\n }\n }\n\n // Return failure.\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to find a all Categories for the Speakout feature on a network with topics This function find categories associated for the Speakout Feature on a network with their related topics.
public function getCategorysWithTopics(Doctrine_Query $q = null) { if (is_null($q)) { $q = Doctrine_Query::create() ->from('SpeakoutCategory sc'); } $rootAlias = $q->getRootAlias(); $q->leftJoin($rootAlias . '.SpeakoutTopic st'); return Doctrine_Core::getTable('SpeakoutTopic')->getTopics($q); }
[ "public function getCategories() {\n\t\t$probableCategories = [];\n\t\tforeach ( $this->features as $feature => $value ) {\n\t\t\tif ( $feature == 'countFace' ) {\n\t\t\t\t$probableCategories[] = 'Category:People';\n\t\t\t} else if ( $feature == 'percentFace' ) {\n\t\t\t\tif ( $value > 60 ) {\n\t\t\t\t\t$probableCategories[] = 'Category:Selfies';\n\t\t\t\t}\n\t\t\t} else if ( $value == 'expression' ) {\n\t\t\t\tswitch ( $feature ) {\n\t\t\t\t\tcase 'joyLikelihood':\n\t\t\t\t\t\t$probableCategories[] = 'Category:Happiness';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'sorrowLikelihood':\n\t\t\t\t\t\t$probableCategories[] = 'Category:Sadness';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'angerLikelihood':\n\t\t\t\t\t\t$probableCategories[] = 'Category:Anger';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'surpriseLikelihood':\n\t\t\t\t\t\t$probableCategories[] = 'Category:Surprise';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'blurredLikelihood':\n\t\t\t\t\t\t$probableCategories[] = 'Category:Blurred images';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'headwearLikelihood':\n\t\t\t\t\t\t$probableCategories[] = 'Category:Headgear';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$probableCategories[] = 'Category:' . $feature;\n\t\t\t}\n\t\t}\n\n\t\t// If we don't get any probable categories, return\n\t\tif ( count( $probableCategories ) <= 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Make API call to commons categoryinfo API\n\t\t$client = new GuzzleHttp\\Client();\n\t\t$response = $client->request(\n\t\t\t'GET',\n\t\t\t'https://commons.wikimedia.org/w/api.php?',\n\t\t\t[ 'query' => [\n\t\t\t\t'action' => 'query',\n\t\t\t\t'prop' => 'categoryinfo',\n\t\t\t\t'titles' => implode( '|', $probableCategories ),\n\t\t\t\t'formatversion' => 2,\n\t\t\t\t'format' => 'json'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t// Decode the response\n\t\t$result = json_decode( $response->getBody(), true );\n\t\t// Categories found\n\t\t$actualCategories = [];\n\t\t// Find the valid categories\n\t\tforeach ( $result['query']['pages'] as $element ) {\n\t\t\tif ( !array_key_exists( 'missing', $element ) && $element['categoryinfo']['hidden'] != true ) {\n\t\t\t\t$actualCategories[] = $element['title'];\n\t\t\t}\n\t\t}\n\t\t// If we found any likely categories, return those else false\n\t\tif ( count( $actualCategories ) > 0 ) {\n\t\t\treturn $actualCategories;\n\t\t}\n\t\treturn null;\n\t}", "public function getCategories() {\n \n $db = JFactory::getDbo(true);\n $db->setQuery(\n \"SELECT category_id FROM #__tpcxsocial_forum_topics_categories WHERE topic_id = '\" . $this->id . \"'\"\n );\n $db->query();\n \n return $db->loadResultArray();\n \n }", "private function extractCategories()\n {\n // 1. data feed configuration data\n $this->categoriesFilterList = [];\n $this->categoriesMapping = [];\n if (is_array(json_decode($this->params['categories'], true))) {\n foreach (json_decode($this->params['categories'], true) as $key => $categoriesFilter) {\n if (isset($categoriesFilter['c']) && $categoriesFilter['c'] == 1) {\n $this->categoriesFilterList[] = $key;\n }\n }\n foreach (json_decode($this->params['categories'], true) as $key => $categoriesFilter) {\n if ($categoriesFilter['m'] != \"\") {\n $this->categoriesMapping[$key] = $categoriesFilter['m'];\n }\n }\n }\n if (count($this->categoriesFilterList) < 1) {\n $this->categoriesFilterList[] = '*';\n }\n // 2. all categories available\n $listOfCategories = $this->categoryFactory->create()->getCollection()->setStoreId($this->params['store_id'])->addAttributeToSelect(['name', 'store_id', 'is_active', 'include_in_menu']);\n $this->categories = [];\n foreach ($listOfCategories as $category) {\n $this->categories[$category->getId()]['name'] = $category->getName();\n $this->categories[$category->getId()]['path'] = $category->getPath();\n $this->categories[$category->getId()]['level'] = $category->getLevel();\n if ($this->_loadCategoriesUrl) {\n $this->categories[$category->getId()]['url'] = $category->getUrl();\n }\n if ($this->_includeInMenu) {\n $this->categories[$category->getId()]['include_in_menu'] = true;\n } else {\n $this->categories[$category->getId()]['include_in_menu'] = $category->getIncludeInMenu();\n }\n }\n }", "function cns_get_filter_cats($only_exists_now = false)\n{\n $filter_rows_a = $GLOBALS['FORUM_DB']->query_select('f_topics', array('DISTINCT t_pt_from_category'), array('t_pt_from' => get_member()));\n $filter_rows_b = $GLOBALS['FORUM_DB']->query_select('f_topics', array('DISTINCT t_pt_to_category'), array('t_pt_to' => get_member()));\n $filter_cats = array('' => 1);\n if (!$only_exists_now) {\n $filter_cats[do_lang('TRASH')] = 1;\n }\n if ($GLOBALS['FORUM_DB']->query_select_value('f_special_pt_access', 'COUNT(*)', array('s_member_id' => get_member())) > 0) {\n $filter_cats[do_lang('INVITED_TO_PTS')] = 1;\n }\n foreach ($filter_rows_a as $filter_row) {\n $filter_cats[$filter_row['t_pt_from_category']] = 1;\n }\n foreach ($filter_rows_b as $filter_row) {\n $filter_cats[$filter_row['t_pt_to_category']] = 1;\n }\n\n return array_keys($filter_cats);\n}", "public function getCategories()\n {\n $app = Factory::getApplication('com_attlist');\n\n // Obtain a database connection\n $db = JFactory::getDbo();\n //Retrieve the shout\n $query = $db->getQuery(true)\n ->select(array('id', 'title'))\n ->from($db->quoteName('#__categories'))\n ->where($db->quoteName('extension') . ' = ' . $db->quote('com_attlist.meldungen'))\n ->order('id ASC');\n // Prepare the query\n $db->setQuery($query);\n // Load the categories.\n $category = $db->loadAssocList();\n // Return the Categories\n return $category;\n }", "public function getCategories() {\n\t\t$categories = array(\n\t\t\t'' => 'None/Unknown',\n\t\t\t'Feedb' => array(\n\t\t\t\t'' => 'None/Unknown',\n\t\t\t\t'Rep' => 'Reports',\n\t\t\t\t'Sugg' => 'Suggestions',\n\t\t\t\t'Compl' => 'Complaints',\n\t\t\t\t'Bug' => 'Bug/Error',\n\t\t\t),\n\t\t\t'Help' => array(\n\t\t\t\t'' => 'None/Unknown',\n\t\t\t\t'Acc' => 'Account',\n\t\t\t\t'Paym' => 'Payment',\n\t\t\t\t'Subsc' => 'Subscription/Membership',\n\t\t\t\t'Evnt' => 'Events',\n\t\t\t\t'eSprt' => 'E-Sports',\n\t\t\t\t'Grps' => 'Groups',\n\t\t\t\t'oUsr' => 'Other users',\n\t\t\t\t'Cntn' => 'Content',\n\t\t\t),\n\t\t\t'Cont' => array(\n\t\t\t\t'' => 'None/Unknown',\n\t\t\t\t'sCnt' => 'Staff contact',\n\t\t\t\t'jAppl' => 'Job application',\n\t\t\t),\n\t\t);\n\t\treturn $categories;\n\t}", "public function getCategories();", "function community_groups_get_categories() {\n\treturn array('support', 'plugins', 'language', 'developers');\n}", "private function getDivisionTopics () {\n \t$catalogWhere = $this->getCatalogWhereTerms();\n \tif (!isset(self::$getDivisionTopics_stmts[$catalogWhere])) {\n\t \t$query =\n\"SELECT \n STVDIVS_CODE,\n\tSTVDIVS_DESC\nFROM \n\tSCBCRSE\n\tINNER JOIN STVDIVS ON SCBCRSE_DIVS_CODE = STVDIVS_CODE\nWHERE\n\tSCBCRSE_COLL_CODE IN (\n\t\tSELECT\n\t\t\tcoll_code\n\t\tFROM\n\t\t\tcourse_catalog_college\n\t\tWHERE\n\t\t\t\".$this->getCatalogWhereTerms().\"\n\t)\n\nGROUP BY SCBCRSE_DIVS_CODE\n\";\n\t\t\tself::$getDivisionTopics_stmts[$catalogWhere] = $this->manager->getDB()->prepare($query);\n\t\t}\n\t\t\n\t\t$parameters = $this->getCatalogParameters();\n\t\tself::$getDivisionTopics_stmts[$catalogWhere]->execute($parameters);\n\t\t\t\t\n\t\t$topics = array();\n\t\twhile ($row = self::$getDivisionTopics_stmts[$catalogWhere]->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$topics[] = new banner_course_Topic(\n\t\t\t\t\t\t$this->getOsidIdFromString($row['STVDIVS_CODE'], 'topic/division/'),\n\t\t\t\t\t\ttrim($row['STVDIVS_DESC']),\n\t\t\t\t\t\t'',\n\t\t\t\t\t\tnew phpkit_type_URNInetType(\"urn:inet:middlebury.edu:genera:topic/division\")\n\t\t\t\t);\n\t\t}\n\t\tself::$getDivisionTopics_stmts[$catalogWhere]->closeCursor();\n\t\treturn new phpkit_course_ArrayTopicList($topics);\n }", "public function categories()\r\n\t{\r\n\t\tglobal $connections;\r\n\t\t\r\n\t\treturn $connections->term->getTerms('category');\r\n\t}", "public function get_all_category() {\n\n \t\t$all_category = array();\n \t\tif( is_array($this->wpextend_global_settings) ) {\n\n \t\t\tforeach( $this->wpextend_global_settings as $key => $val ) {\n \t\t\t\t$all_category[$key] = $val['name'];\n \t\t\t}\n \t\t}\n\n\t\t// Return categories\n \t\treturn $all_category;\n \t}", "public function getSpotCategories()\n\t{\n\t\t// return info\n\t\treturn $this->doAPICall('categories/?');\n\t}", "public function get_all_categories() {\n\n // Gets all categories\n (new MidrubBaseUserAppsCollectionChatbotHelpers\\Categories)->get_all_categories();\n\n }", "public function topics()\n {\n return $this->hasMany('Topic', 'category_id');\n }", "public function category_lookup()\n\t{\n\t\t$categories = $this->category_model->get_categories();\n\t\treturn $categories;\n\t}", "public static function getAllCategories () {\n\t\t$resultSet = ORM::for_table(self::INST_CAT_TABLE)->\n\t\t\tselect('id')->\n\t\t\tselect('name')->\n\t\t\tselect('display_sequence')->\n\t\t\torder_by_asc('display_sequence')->\n\t\t\tfind_many();\n//\t\t$selstmt = \"SELECT ID, NAME, DISPLAY_SEQUENCE FROM INSTRUMENT_CATEGORIES \" .\n//\t\t\t\"ORDER BY DISPLAY_SEQUENCE\";\n\t\t$cats = array();\n\t\tforeach ($resultSet as $result) {\n\t\t\t$cat = new InstrumentCategory();\n\t\t\t$cat->id = $result->id;\n\t\t\t$cat->name = $result->name;\n\t\t\t$cat->displaySequence = $result->display_sequence;\n\t\t\t$cats[] = $cat;\n\t\t}\n\t\t// The cats have all been herded\n\t\treturn $cats;\n\t}", "public function get_categories($data)\n {\n $table = $this->di['table']('Forum');\n $list = $this->di['db']->find('Forum');\n \n $result = array();\n foreach($list as $f) {\n $result[$f->category][] = $table->toApiArray($f);\n }\n return $result;\n }", "function ciniki_classes_web_categoryList($ciniki, $settings, $tnid) {\n\n //\n // Build the query to get the categories\n //\n $strsql = \"SELECT DISTINCT category, category_permalink \"\n . \"FROM ciniki_classes \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND (webflags&0x01) > 0 \"\n . \"ORDER BY category \"\n . \"\";\n //\n // Get the list of posts, sorted by publish_date for use in the web CI List Categories\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.classes', array(\n array('container'=>'categories', 'fname'=>'category_permalink', \n 'fields'=>array('name'=>'category', 'permalink'=>'category_permalink')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['categories']) ) {\n $categories = $rc['categories'];\n } else {\n $categories = array();\n }\n\n return array('stat'=>'ok', 'categories'=>$categories);\n}", "protected function findAllCategories()\n {\n if (isset($this->_categories)) {\n return resolve($this->_categories);\n }\n return (new Query())->select(['category'])\n ->from($this->sourceMessageTable)\n ->orderBy(['category' => SORT_ASC])\n ->groupBy(['category'])\n ->column($this->db)\n ->then(function($categories) {\n return $this->_categories = $categories;\n });\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepares a HTTP Response from an exception.
public function prepareExceptionResponse(\Exception $result) { $serializer = $this->getSerializationHelper()->getExceptionSerializer($this->httpRequest); if (is_null($serializer)) { throw new Exception("No exception serializer found", 0, $result); } $statusCode = 500; if ($result instanceof HttpExceptionInformation) { $statusCode = $result->getHttpStatusCode(); } $content = $serializer->serialize($result); $response = new HttpFoundation\Response($content, $statusCode); $response->headers->set("Content-Type", $serializer->getContentType()); return $response; }
[ "public function prepareExceptionResponse(\\Exception $result);", "protected function prepareResponse($request , Exception $e)\n\t{\n\t\tif ( !$this->isHttpException($e) ) {\n\t\t\treturn $this->toIlluminateResponse($this->convertExceptionToResponse($e) , $e);\n\t\t}\n\n\t\tif ( !$this->isHttpException($e) ) {\n\t\t\t$e = new HttpException(500 , $e->getMessage());\n\t\t}\n\n\t\treturn $this->toIlluminateResponse(\n\t\t\t$this->renderHttpException($e) , $e\n\t\t);\n\t}", "protected function setResponseFromException()\n {\n try {\n $this->response = $this->exception->response();\n } catch (Error $exception) {\n //\n }\n }", "public function prepareResponse()\n {\n try {\n $this->setBaseMiddlewares();\n $this->handleRequest($this->middlewares);\n $this->router->build();\n $this->handleRequest($this->routeMiddlewares);\n $this->response = $this->router->run();\n } catch (Exception $exception) {\n $response = $this->container->call([$this->getExceptionHandler(), 'render'], [$exception]);\n $this->response = $response ?: $this->response;\n }\n }", "public function handlePrepareException(InvalidUrlException $exception): Response\n {\n return $this->handleException($exception);\n }", "protected function prepareResponse()\n {\n return new Response(null, Response::STATUS_OK, 'text/html;charset=UTF8');\n }", "public function makeException()\n {\n $this->thrownException = ResponseException::create($this);\n }", "protected function prepareResponse() : void\n {\n $data = $this->getOutputData();\n $dataStructureFormatter = $this->getDataStructureManager()->getDataStructureFormatter();\n $outputContent = $dataStructureFormatter->getOutputContent($data);\n // 3. Prepare the Response\n $response = App::getResponse();\n $response->setContent($outputContent);\n foreach ($this->getHeaders() as $name => $value) {\n $response->headers->set($name, $value);\n }\n }", "public function makeExceptionResponse(\\Exception $exception);", "private function makeException()\n {\n $this->thrownException = BLMSResponseException::create($this);\n }", "public function makeException()\n {\n $this->thrownException = HodelaResponseException::create($this);\n }", "public function throwResponse()\n {\n throw new HttpResponseException($this);\n }", "protected function createFailSafeResponse()\n {\n $status = new Status(500);\n $response = new Response();\n $response->setRequest(new Request());\n $response->setWriter(new Json());\n $response->setStatus($status);\n $response->setBodyData($status->getMessage());\n return $response;\n }", "protected function convertExceptionToResponse(Exception $e)\n {\n\t\t$msg_erro = $e->getMessage();\t//msg de erro\n \n\t\t//verifica se o debug está ativo\n $debug = env('APP_DEBUG');\n if ($debug) {\n\t\t\t\n\t\t\tif ( $e->getCode() === 99998 || $e->getCode() === 99990 ) {\n\t\t\t\treturn response()->view('errors.500', ['exception' => $msg_erro], 500);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tabort(500, $msg_erro);\n\t\t\t}\n\t\t}\n \n $dominio = getenv('HTTP_HOST');\n $url\t = \"http://\" . $dominio. getenv('REQUEST_URI');\n \n\t\t//Verifica se a mensagem é um alerta.\n\t\tif ( $e->getCode() === 99998 || $e->getCode() === 99990 ) {\n\t\t\t$text = $msg_erro;\n\t\t}\n\t\t//Verifica se a sessão expirou.\n\t\telse if ( $e->getCode() == 401 ) {\n\t\t\treturn response()->view('errors.500', ['exception' => $msg_erro], 401);\n\t\t}\n else if($e->getCode() == 'HY000'){\n $text = $this->databaseExecetion($e)->TEXT;\n }\n\n// //Verifica se é uma mensangem vinda do banco de dados\n// else if($e->getCode() == 'HY000'){\n// //Verifica se houve um deadlock update no banco de dados\n// if ( stripos($msg_erro, 'General error: -913') > 0 ) {\n// $text = 'Execução interrompida. Houve uma atualização simultanea por outro usuário. Por favor, tente novamente.';\n// }\n// else{\n// $text = 'Ocorreu uma falha ao executar esta operação.';\n// } \n// \n// }\n \n\t\t//Verifica se o item (página) não existe.\n\t\t//Para isso, é verificada a existência da palavra 'offset'.\n\t\telse if ( stripos($msg_erro, 'offset') > 0 && stripos($msg_erro, 'offset') < 20 ) {\n\t\t\tabort(404);\n\t\t}\n\t\telse {\n if($e->getCode() == 99997){\n $text = $msg_erro;\n }else{\n $text = '<div class=\"msg-erro-formatada\">';\n $text .= '<span class=\"lbl\">Erro:</span><span class=\"lbl-msg\">'. $this->trataErro($e->getCode(),$msg_erro) .'</span><br>';\n $text .= '<span class=\"lbl\">Código:</span><span class=\"lbl-msg\">'. $e->getCode() .'</span><br>';\n $text .= '<span class=\"lbl\">Tipo:</span><span class=\"lbl-msg\">'. $this->trataFile($e->getFile()) .'</span><br>';\n $text .= '<span class=\"lbl\">Linha:</span><span class=\"lbl-msg\">'. $e->getLine() .'</span><br>';\n $text .= '<span class=\"lbl\">Url:</span><span class=\"lbl-msg\">'. $url .'</span><br>';\n $text .= '</div>';\n }\n\t\t\t//$text .= \"<button class='btn btn-default ' >\";\n\t\t\t//$text .= \"<span class='glyphicon glyphicon glyphicon-envelope' gofullscreen='fundo-tela'></span> Enviar erro para o suporte</button>\";\n\t\t}\n\t\t\n return response()->view('errors.500', ['exception' => $text], 500);\n }", "public function handleFinalizeException(\\Throwable $exception): Response;", "protected function setErrorHeader() {\n\t\tif ($this->response_code >= 400 && $this->response_code < 500) {\n\t\t\theader('HTTP/1.1 ' . $this->response_code . \" \" . SVException::g($this->response_code));\n\t\t\texit(0);\n\t\t}\n\t}", "private function check_response_headers() {\n\t\t$code = $this->get_http_response_code($this->response_headers);\n\t\t$this->response_code = (int)$code;\n\t\tif($this->response_code != 200 && $this->die_on_error)\n\t\t\tthrow new Exception('Error: response header is: ' . $this->response_headers[0]);\n\t}", "public function handlePrepareException(NotAuthorizedException $exception): Response\n {\n return $this->handleException($exception);\n }", "protected function prepareJsonResponse($request, Exception $e)\n {\n $status = $this->isHttpException($e) ? $e->getStatusCode() : 500;\n $headers = $this->isHttpException($e) ? $e->getHeaders() : [];\n\n return api_response()->fail($e)->response($status, $headers);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Relate selected products to each other.
public function massRelateToEachOtherAction() { $this->_linkProductsToEachOther(self::LINK_TYPE_RELATED, 'Successfully related %d products to each other (%d new links, %d already existed).'); }
[ "function jigoshop_output_related_products() {\n\t\tjigoshop_related_products( 2, 2 );\n\t}", "function _assignProducts() {\n\t\t\t$productIds = array( );\n\t\t\tforeach ($this as $item) {\n\t\t\t\t$productIds[] = $item->getProductId( );\n\t\t\t}\n\n\t\t\t$this->_productIds = array_merge( $this->_productIds, $productIds );\n\t\t\t$productCollection = Mage::getModel( 'catalog/product' )->getCollection( )->setStoreId( $this->getStoreId( ) )->addIdFilter( $this->_productIds )->addAttributeToSelect( Mage::getSingleton( 'sales/quote_config' )->getProductAttributes( ) )->addOptionsToResult( )->addStoreFilter( )->addUrlRewrite( )->addTierPriceData( );\n\t\t\tMage::dispatchEvent( 'prepare_catalog_product_collection_prices', array( 'collection' => $productCollection, 'store_id' => $this->getStoreId( ) ) );\n\t\t\tMage::dispatchEvent( 'sales_quote_item_collection_products_after_load', array( 'product_collection' => $productCollection ) );\n\t\t\t$recollectQuote = false;\n\t\t\tforeach ($this as $item) {\n\t\t\t\t$product = $productCollection->getItemById( $item->getProductId( ) );\n\n\t\t\t\tif ($product) {\n\t\t\t\t\t$product->setCustomOptions( array( ) );\n\t\t\t\t\t$qtyOptions = array( );\n\t\t\t\t\t$optionProductIds = array( );\n\t\t\t\t\tforeach ($item->getOptions( ) as $option) {\n\t\t\t\t\t\t$product->getTypeInstance( true )->assignProductToOption( $productCollection->getItemById( $option->getProductId( ) ), $option, $product );\n\n\t\t\t\t\t\tif (( is_object( $option->getProduct( ) ) && $option->getProduct( )->getId( ) != $product->getId( ) )) {\n\t\t\t\t\t\t\t$optionProductIds[$option->getProduct( )->getId( )] = $option->getProduct( )->getId( );\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ($optionProductIds) {\n\t\t\t\t\t\tforeach ($optionProductIds as $optionProductId) {\n\t\t\t\t\t\t\t$qtyOption = $item->getOptionByCode( 'product_qty_' . $optionProductId );\n\n\t\t\t\t\t\t\tif ($qtyOption) {\n\t\t\t\t\t\t\t\t$qtyOptions[$optionProductId] = $qtyOption;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$item->setQtyOptions( $qtyOptions );\n\t\t\t\t\t$item->setProduct( $product );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$item->isDeleted( true );\n\t\t\t\t$recollectQuote = true;\n\t\t\t}\n\n\t\t\tforeach ($this as $item) {\n\t\t\t\t$item->checkData( );\n\t\t\t}\n\n\n\t\t\tif (( $recollectQuote && $this->_quote )) {\n\t\t\t\t$this->_quote->collectTotals( );\n\t\t\t}\n\n\t\t\treturn $this;\n\t\t}", "public function joinProductFilter()\n\t{\n\t $this->joinExportCategoryProduct();\n\t}", "public function appendUpsellProducts($observer)\n {\n /* @var $product Mage_Catalog_Model_Product */\n $product = $observer->getEvent()->getProduct();\n\n /**\n * Check is current product type is allowed for bundle selection product type\n */\n if (!in_array($product->getTypeId(), Mage::helper('hamper')->getAllowedSelectionTypes())) {\n return $this;\n }\n\n /* @var $collection Mage_Catalog_Model_Resource_Product_Link_Product_Collection */\n $collection = $observer->getEvent()->getCollection();\n $limit = $observer->getEvent()->getLimit();\n if (is_array($limit)) {\n if (isset($limit['upsell'])) {\n $limit = $limit['upsell'];\n } else {\n $limit = 0;\n }\n }\n\n /* @var $resource Mage_Bundle_Model_Resource_Selection */\n $resource = Mage::getResourceSingleton('bundle/selection');\n\n $productIds = array_keys($collection->getItems());\n if (!is_null($limit) && $limit <= count($productIds)) {\n return $this;\n }\n\n // retrieve bundle product ids\n $bundleIds = $resource->getParentIdsByChild($product->getId());\n // exclude up-sell product ids\n $bundleIds = array_diff($bundleIds, $productIds);\n\n if (!$bundleIds) {\n return $this;\n }\n\n /* @var $bundleCollection Mage_Catalog_Model_Resource_Product_Collection */\n $bundleCollection = $product->getCollection()\n ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())\n ->addStoreFilter()\n ->addMinimalPrice()\n ->addFinalPrice()\n ->addTaxPercents();\n\n Mage::getSingleton('catalog/product_visibility')\n ->addVisibleInCatalogFilterToCollection($bundleCollection);\n\n if (!is_null($limit)) {\n $bundleCollection->setPageSize($limit);\n }\n $bundleCollection->addFieldToFilter('entity_id', array('in' => $bundleIds))\n ->setFlag('do_not_use_category_id', TRUE);\n\n if ($collection instanceof Varien_Data_Collection) {\n foreach ($bundleCollection as $item) {\n $collection->addItem($item);\n }\n } elseif ($collection instanceof Varien_Object) {\n $items = $collection->getItems();\n foreach ($bundleCollection as $item) {\n $items[$item->getEntityId()] = $item;\n }\n $collection->setItems($items);\n }\n\n return $this;\n }", "function drawSelectedProducts(){\n \n }", "public function appendUpsellProducts($observer)\n {\n /* @var $product Mage_Catalog_Model_Product */\n $product = $observer->getEvent()->getProduct();\n\n /**\n * Check is current product type is allowed for bundle selection product type\n */\n if (!in_array($product->getTypeId(), Mage::helper('bundle')->getAllowedSelectionTypes())) {\n return $this;\n }\n\n /* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Product_Collection */\n $collection = $observer->getEvent()->getCollection();\n $limit = $observer->getEvent()->getLimit();\n if (is_array($limit)) {\n if (isset($limit['upsell'])) {\n $limit = $limit['upsell'];\n } else {\n $limit = 0;\n }\n }\n\n /* @var $resource Mage_Bundle_Model_Mysql4_Selection */\n $resource = Mage::getResourceSingleton('bundle/selection');\n\n $productIds = array_keys($collection->getItems());\n if (!is_null($limit) && $limit <= count($productIds)) {\n return $this;\n }\n\n // retrieve bundle product ids\n $bundleIds = $resource->getParentIdsByChild($product->getId());\n // exclude up-sell product ids\n $bundleIds = array_diff($bundleIds, $productIds);\n\n if (!$bundleIds) {\n return $this;\n }\n\n /* @var $bundleCollection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */\n $bundleCollection = $product->getCollection()\n ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())\n ->addStoreFilter()\n ->addMinimalPrice()\n ->addFinalPrice()\n ->addTaxPercents();\n\n Mage::getSingleton('catalog/product_visibility')\n ->addVisibleInCatalogFilterToCollection($bundleCollection);\n\n if (!is_null($limit)) {\n $bundleCollection->setPageSize($limit);\n }\n $bundleCollection->addFieldToFilter('entity_id', array('in' => $bundleIds))\n ->setFlag('do_not_use_category_id', true);\n\n if ($collection instanceof Varien_Data_Collection) {\n foreach ($bundleCollection as $item) {\n $collection->addItem($item);\n }\n } elseif ($collection instanceof Varien_Object) {\n $items = $collection->getItems();\n foreach ($bundleCollection as $item) {\n $items[$item->getEntityId()] = $item;\n }\n $collection->setItems($items);\n }\n\n return $this;\n }", "protected function getProductsAlsoInOtherGroups()\n {\n return true;\n }", "public function getProductSelection();", "public function testUpdateBasketTwoProductsWithSameSelectionList()\n {\n $sArtId = '1126';\n $oBasket = new oxBasket();\n\n // creating selection list\n $oSelList = new oxSelectlist;\n $oSelList->setId( '_testoxsellist' );\n $oSelList->oxselectlist__oxtitle = new oxfield( 'testsel' );\n $oSelList->oxselectlist__oxvaldesc = new oxfield( 'Large__@@Medium__@@Small__@@' );\n $oSelList->save();\n\n // assigning sel list\n $oO2Sel = new oxbase;\n $oO2Sel->init( \"oxobject2selectlist\" );\n $oO2Sel->setId( '_testoxobject2selectlist' );\n $oO2Sel->oxobject2selectlist__oxobjectid = new oxfield( $sArtId );\n $oO2Sel->oxobject2selectlist__oxselnid = new oxfield( $oSelList->getId() );\n $oO2Sel->save();\n\n // storing products to basket with diff sel list\n $oBasket->addToBasket( $sArtId, 1, array( 0 ) );\n $oBasket->calculateBasket();\n\n $oBasket->addToBasket( $sArtId, 1, array( 1 ) );\n $oBasket->calculateBasket();\n\n // checking amounts\n $aContents = $oBasket->getContents();\n $this->assertEquals( 2, count( $aContents ) );\n\n // checking counts\n $oBasketItem = reset( $aContents );\n $this->assertEquals( 1, $oBasketItem->getAmount() );\n\n next( $aContents );\n\n // updating last product selection list\n $oBasket->addToBasket( $sArtId, 1, array( 0 ), null, true, false, key( $aContents ) );\n $oBasket->calculateBasket();\n\n // checking final basket amount\n $aContents = $oBasket->getContents();\n $this->assertEquals( 1, count( $aContents ) );\n\n // checking counts\n $oBasketItem = reset( $aContents );\n $this->assertEquals( 2, $oBasketItem->getAmount() );\n }", "public function assignProductsToCategory(){\n\t\t$this->getCategoryLinkManagement()\n\t\t->assignProductToCategories(\n\t\t\t$product->getSku(),\n\t\t\t$product->getCategoryIds() \n\t\t);\n\t}", "public function productAction()\n {\n $this->_title(Mage::helper('netevensync')->__('Neteven Selection'))->_title($this->__('Catalog'));\n $this->loadLayout()\n ->_setActiveMenu('catalog/netevensync/product')\n ->_addBreadcrumb(Mage::helper('netevensync')->__('Neteven Selection'), Mage::helper('netevensync')->__('Neteven Selection'))\n ;\n $this->renderLayout();\n }", "private function set_products() : void\n {\n $this->products = $this->client->products->all([\n 'active' => true,\n 'limit' => 100,\n 'ids' => $this->product_ids,\n ]);\n }", "public function syncAssociations()\n {\n $this->associations = $this->product->associations\n ->merge($this->product->inverseAssociations)\n ->map(function ($assoc) {\n $inverse = $assoc->target->id == $this->product->id;\n\n $product = $inverse ? $assoc->parent : $assoc->target;\n\n return [\n 'id' => $assoc->id,\n 'inverse' => $inverse,\n 'target_id' => $product->id,\n 'thumbnail' => optional($product->thumbnail)->getUrl('small'),\n 'name' => $product->translateAttribute('name'),\n 'type' => $assoc->type,\n ];\n });\n }", "protected function _getSelectedProducts() {\n\n\t$products = $this->getRequest()->getPost('products_related');\n\tif (!is_array($products)) {\n\t $products = array_keys($this->getSelectedRelatedProducts());\n\t}\n\treturn $products;\n }", "public function addOrderProducts() {\n \n }", "public function prepareForProductsInCarts()\n {\n $productEntity = Mage::getResourceSingleton('catalog/product_collection');\n $productAttrName = $productEntity->getAttribute('name');\n $productAttrNameId = (int) $productAttrName->getAttributeId();\n $productAttrNameTable = $productAttrName->getBackend()->getTable();\n $productAttrPrice = $productEntity->getAttribute('price');\n $productAttrPriceId = (int) $productAttrPrice->getAttributeId();\n $productAttrPriceTable = $productAttrPrice->getBackend()->getTable();\n\n $ordersSubSelect = clone $this->getSelect();\n $ordersSubSelect->reset()\n ->from(\n array('oi' => $this->getTable('sales/order_item')),\n array(\n 'orders' => new Zend_Db_Expr('COUNT(1)'),\n 'product_id'))\n ->group('oi.product_id');\n\n $this->getSelect()\n ->useStraightJoin(true)\n ->reset(Zend_Db_Select::COLUMNS)\n ->joinInner(\n array('quote_items' => $this->getTable('sales/quote_item')),\n 'quote_items.quote_id = main_table.entity_id',\n null)\n ->joinInner(\n array('e' => $this->getTable('catalog/product')),\n 'e.entity_id = quote_items.product_id',\n null)\n ->joinInner(\n array('product_name' => $productAttrNameTable),\n \"product_name.entity_id = e.entity_id AND product_name.attribute_id = {$productAttrNameId}\",\n array('name'=>'product_name.value'))\n ->joinInner(\n array('product_price' => $productAttrPriceTable),\n \"product_price.entity_id = e.entity_id AND product_price.attribute_id = {$productAttrPriceId}\",\n array('price' => new Zend_Db_Expr('product_price.value * main_table.base_to_global_rate')))\n ->joinLeft(\n array('order_items' => new Zend_Db_Expr(sprintf('(%s)', $ordersSubSelect))),\n 'order_items.product_id = e.entity_id',\n array()\n )\n ->columns('e.*')\n ->columns(array('carts' => new Zend_Db_Expr('COUNT(quote_items.item_id)')))\n ->columns('order_items.orders')\n ->where('main_table.is_active = ?', 1)\n ->group('quote_items.product_id');\n\n return $this;\n }", "function PostProcessRelatedProducts() {\n\t $db = JFactory::getDBO();\n\t $csvilog = JRequest::getVar('csvilog');\n\t $this->_csv_fields = JRequest::getVar('csv_fields');\n\t \n\t if (isset($this->_csv_fields['related_products'])) {\n\t\t $newrelations = array();\n\t\t /* Get the related products */\n\t\t $q = \"SELECT p1.product_id, GROUP_CONCAT(p2.product_id SEPARATOR '|') AS related_products \n\t\t \t\tFROM csvi_import_related_products r\n\t\t\t\tLEFT JOIN #__vm_product p1\n\t\t\t\tON r.product_sku = p1.product_sku\n\t\t\t\tLEFT JOIN #__vm_product p2\n\t\t\t\tON r.related_sku = p2.product_sku\n\t\t\t\tGROUP BY r.product_sku\";\n\t\t $db->setQuery($q);\n\t\t $relations = $db->loadObjectList();\n\t\t foreach ($relations as $key => $related) {\n\t\t\t $this->_vm_product_relations->bind($related);\n\t\t\t $csvilog->AddMessage('debug', JText::_('PROCESS_RELATED_PRODUCTS'), true);\n\t\t\t if ($this->_vm_product_relations->store());\n\t\t\t else {\n\t\t\t\t $csvilog->AddMessage('debug', JText::_('DEBUG_RELATED_PRODUCTS'), true);\n\t\t\t }\n\t\t }\n\t }\n }", "protected function addProducts()\n {\n /**\n * @var $cartProduct \\Extcode\\Cart\\Domain\\Model\\Cart\\Product\n */\n foreach ($this->cart->getProducts() as $cartProduct) {\n if ($cartProduct->getBeVariants()) {\n $this->addProductVariants($cartProduct);\n } else {\n $this->addProduct($cartProduct);\n }\n }\n }", "public function testReassignProductToOtherCategory(): void\n {\n $product = $this->productRepository->get('simple_with_child_category');\n $this->assertEquals(1, $this->getCategoryProductRelationRecordsCount((int)$product->getId(), [5]));\n $this->assertEquals(3, $this->getCategoryProductIndexRecordsCount((int)$product->getId(), [3, 4, 5]));\n $this->categoryLinkManagement->assignProductToCategories('simple_with_child_category', [6]);\n $this->assertEquals(1, $this->getCategoryProductRelationRecordsCount((int)$product->getId(), [6]));\n $this->assertEquals(1, $this->getCategoryProductIndexRecordsCount((int)$product->getId(), [6]));\n $this->assertEquals(0, $this->getCategoryProductRelationRecordsCount((int)$product->getId(), [5]));\n $this->assertEquals(0, $this->getCategoryProductIndexRecordsCount((int)$product->getId(), [3, 4, 5]));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Process webhook for cancelled payment.
public static function cancel_payment( $data ) { $webhook_data = $data->data; $payment_id = $webhook_data->id; $gateway_debug = 'yes' === WC_Admin_Settings::get_option( 'cko_gateway_responses', 'no' ); // Initialize the Checkout Api. $checkout = new Checkout_SDK(); try { // Check if payment is already voided or captured on checkout.com hub. $details = $checkout->get_builder()->getPaymentsClient()->getPaymentDetails( $payment_id ); $order_id = ! empty( $details['metadata']['order_id'] ) ? $details['metadata']['order_id'] : null; // Return false if no order id. if ( empty( $order_id ) ) { WC_Checkoutcom_Utility::logger( 'No order id', null ); return false; } // Load order form order id. $order = self::get_wc_order( $order_id ); $status = 'wc-cancelled'; $message = 'Webhook received from checkout.com. Payment cancelled'; // Add notes for the order and update status. $order->add_order_note( $message ); $order->update_status( $status ); return true; } catch ( CheckoutApiException $ex ) { $error_message = 'An error has occurred while processing your cancel request.'; // Check if gateway response is enabled from module settings. if ( $gateway_debug ) { $error_message .= $ex->getMessage(); } WC_Checkoutcom_Utility::logger( $error_message, $ex ); return false; } }
[ "private function handle_order_canceled_webhook( $webhook_data ) {\n // Order canceled.\n }", "public function process_webhook_source_canceled( $notification ) {\n\t\t$order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->id );\n\n\t\t// If can't find order by charge ID, try source ID.\n\t\tif ( ! $order ) {\n\t\t\t$order = WC_Stripe_Helper::get_order_by_source_id( $notification->data->object->id );\n\n\t\t\tif ( ! $order ) {\n\t\t\t\tWC_Stripe_Logger::log( 'Could not find order via charge/source ID: ' . $notification->data->object->id );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( 'cancelled' !== $order->get_status() ) {\n\t\t\t$order->update_status( 'cancelled', __( 'This payment has cancelled.', 'woocommerce-gateway-stripe' ) );\n\t\t}\n\n\t\tdo_action( 'wc_gateway_stripe_process_webhook_payment_error', $order, $notification );\n\t}", "public function handlePaymentCancelled($sTransactionKey);", "public static function void_payment( $data ) {\n\t\t$webhook_data = $data->data;\n\t\t$order_id = $webhook_data->metadata->order_id;\n\n\t\t// Return false if no order id.\n\t\tif ( empty( $order_id ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Load order form order id.\n\t\t$order = self::get_wc_order( $order_id );\n\t\t$order_id = $order->get_id();\n\n\t\t// check if payment is already captured.\n\t\t$already_voided = get_post_meta( $order_id, 'cko_payment_voided', true );\n\t\t$message = 'Webhook received from checkout.com. Payment voided';\n\n\t\t// Add note to order if captured already.\n\t\tif ( $already_voided ) {\n\t\t\t$order->add_order_note( $message );\n\t\t\treturn true;\n\t\t}\n\n\t\t$order->add_order_note( esc_html__( 'Checkout.com Payment Void webhook received', 'checkout-com-unified-payments-api' ) );\n\n\t\t// Get action id from webhook data.\n\t\t$action_id = $webhook_data->action_id;\n\n\t\t// Set action id as woo transaction id.\n\t\tupdate_post_meta( $order_id, '_transaction_id', $action_id );\n\t\tupdate_post_meta( $order_id, 'cko_payment_voided', true );\n\n\t\t// Get cko capture status configured in admin.\n\t\t$status = WC_Admin_Settings::get_option( 'ckocom_order_void', 'cancelled' );\n\n\t\t/* translators: %s: Action ID. */\n\t\t$order_message = sprintf( esc_html__( 'Checkout.com Payment Voided - Action ID : %s', 'checkout-com-unified-payments-api' ), $action_id );\n\n\t\t// add notes for the order and update status.\n\t\t$order->add_order_note( $order_message );\n\t\t$order->update_status( $status );\n\n\t\treturn true;\n\t}", "private function handleSubscriptionCancelled($event)\n {\n $data = $event->data->object;\n $subscriptionId = $data->id;\n $subscriptionModel = new Subscription();\n\n $subscription = wpFluent()->table('wpf_subscriptions')\n ->where('vendor_subscriptipn_id', $subscriptionId)\n ->where('status', '!=', 'completed')\n ->first();\n\n if (!$subscription) {\n return;\n }\n\n do_action('wppayform/form_submission_activity_start', $subscription->form_id);\n\n\n $subscriptionModel->update($subscription->id, [\n 'status' => 'cancelled'\n ]);\n\n\n $subscription = $subscriptionModel->getSubscription($subscription->id);\n\n $submissionModel = new Submission();\n $submission = $submissionModel->getSubmission($subscription->submission_id);\n\n // New Payment Made so we have to fire some events here\n do_action('wppayform/subscription_payment_canceled', $submission, $subscription, $submission->form_id, $data);\n do_action('wppayform/subscription_payment_canceled_stripe', $submission, $subscription, $submission->form_id, $data);\n\n }", "public function handle_cancel_request() {\n $cancel = optional_param('cancel', 0, PARAM_BOOL);\n if ($cancel) {\n // Redirect to frontpage, needed for loginhttps\n redirect(new moodle_url('/'));\n }\n }", "public function processCancelledOrder() {\n\n\t\tif ( WP_DEBUG ) {\n\t\t\terror_log( \"Returning via the PayPal 'cancel' button: \" . print_r( $_REQUEST, true ) );\n\t\t}\n\n\t\t$token = isset( $_REQUEST['token'] ) ? sanitize_text_field( $_REQUEST['token'] ) : null;\n\n\t\t// do we have an order reference we can use...\n\t\tif ( ! is_null( $token ) ) {\n\n\t\t\tif ( ( WP_DEBUG ) ) {\n\t\t\t\terror_log( \"Customer cancelled order during PayPal payment\" );\n\t\t\t}\n\t\t\t$cancelled_order = new MemberOrder();\n\t\t\t$cancelled_order->getMemberOrderByPayPalToken( $token );\n\n\t\t\tif ( true === $cancelled_order->updateStatus( 'cancelled_at_payment' ) ) {\n\n\t\t\t\tif ( WP_DEBUG ) {\n\t\t\t\t\terror_log( \"Order status for order # {$cancelled_order->id} was updated\" );\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function processVoid(): void\n {\n $isVoid = $this->transaction->getTxnType() === TransactionInterface::TYPE_VOID;\n if ($isVoid && $this->config->getValue('order_status_voided') === 'canceled') {\n $this->orderManagement->cancel($this->order->getEntityId());\n }\n }", "abstract public function cancel_payment( Payment $payment );", "public function cancelBeforePaymentAction()\n {\n\n $campaignId = $this->_getParam('campaignId', null);\n $campaign = $this->_getCampaign($campaignId);\n\n\n $user = Dm_Session::GetConnectedUser();\n $rest = Dm_Config::GetConfig('campaign', 'rest');\n $wrapper = Mk_Factory::getRestWrapper($rest, $user->userKey);\n Dm_Log::Debug($wrapper->campaignsCancel(array('id' => $campaign->messengeoExtId)));\n\n $path = $this->hrefHelper('campaign-list',\n array('status' => Service_Api_Object_Campaign::STATUS_PENDING));\n $this->_redirect($path);\n\n }", "public static function set_cancelled( $args ) {\n\n $args = wp_parse_args( $args , array (\n 'payment_id' => 0 ,\n 'balance_payable_order_id' => 0 ,\n ) ) ;\n\n if ( _sumo_pp_payment_has_status( $args[ 'payment_id' ] , 'in_progress' , 'overdue' ) ) {\n if ( _sumo_pp_update_payment_status( $args[ 'payment_id' ] , 'cancelled' ) ) {\n\n _sumo_pp_add_payment_note( sprintf( __( 'Balance payment of order#%s is not paid so far. Payment is Cancelled.' , _sumo_pp()->text_domain ) , $args[ 'balance_payable_order_id' ] ) , $args[ 'payment_id' ] , 'success' , __( 'Payment Cancelled' , _sumo_pp()->text_domain ) ) ;\n\n update_post_meta( $args[ 'payment_id' ] , '_next_payment_date' , '' ) ;\n update_post_meta( $args[ 'payment_id' ] , '_next_installment_amount' , '0' ) ;\n update_post_meta( $args[ 'payment_id' ] , '_remaining_payable_amount' , '0' ) ;\n update_post_meta( $args[ 'payment_id' ] , '_remaining_installments' , '0' ) ;\n\n if ( $payment_cron = _sumo_pp_get_payment_cron( $args[ 'payment_id' ] ) ) {\n $payment_cron->unset_jobs() ;\n }\n\n _sumo_pp_send_payment_email( $args[ 'payment_id' ] , 'payment_cancelled' , $args[ 'balance_payable_order_id' ] ) ;\n\n do_action( 'sumopaymentplans_payment_is_cancelled' , $args[ 'payment_id' ] , $args[ 'balance_payable_order_id' ] , 'balance-payment-order' ) ;\n }\n }\n }", "private function handle_order_remove_hold_webhook( $webhook_data ) {\n // Order removed from hold.\n }", "public function handleStripe() {\n $payload = request()->all();\n\n // Call specific method dependent on the event type\n $method = $this->eventToMethod($payload['type']);\n if (method_exists($this, $method)) {\n return $this->$method($payload);\n }\n\n return response('Webhook received but not handled.');\n }", "function petitionPaymentCancel()\n\t\t{\t\t\t\t\t\t\t\t\n\t\t\tglobal $_CONF;\t\t\t\n\t\t\t$article_id = trim($_REQUEST[\"article_id\"]);\n\t\t\t$visitor_id = base64_decode(trim($_REQUEST[\"visitor_id\"]));\t\t\t\n\t\t\t$rs = $this->oModel->setUserTypeOneTimeSubscriber($visitor_id);\t\t\t\n\t\t\theader(\"location:./index.php?stage=visitor&mode=EmailMessage&message=Sign up completed but error in petition payment.\");\t\t\t\n\t\t\tdie();\t\t\t\t\n\t\t}", "public function webhookAction()\n {\n $modelWebhook = Mage::getModel('chargepayment/webhook');\n\n $isDebugCard = Mage::getModel('chargepayment/creditCard')->isDebug();\n $isDebugJs = Mage::getModel('chargepayment/creditCardJs')->isDebug();\n $isDebugKit = Mage::getModel('chargepayment/creditCardKit')->isDebug();\n $isDebugHosted = Mage::getModel('chargepayment/hosted')->isDebug();\n\n $isDebug = $isDebugCard || $isDebugJs || $isDebugKit || $isDebugHosted ? true : false;\n\n if ($isDebug) {\n Mage::log(file_get_contents('php://input'), null, CheckoutApi_ChargePayment_Model_Webhook::LOG_FILE);\n Mage::log(json_decode(file_get_contents('php://input')), null, CheckoutApi_ChargePayment_Model_Webhook::LOG_FILE);\n }\n\n if (!$this->getRequest()->isPost()) {\n $this->getResponse()->setHttpResponseCode(400);\n return;\n }\n\n $request = new Zend_Controller_Request_Http();\n $key = $request->getHeader('Authorization');\n\n if (!$modelWebhook->isValidPublicKey($key)) {\n $this->getResponse()->setHttpResponseCode(401);\n return;\n }\n\n $data = json_decode(file_get_contents('php://input'));\n\n if (empty($data)) {\n $this->getResponse()->setHttpResponseCode(400);\n return;\n }\n\n $eventType = $data->eventType;\n\n if (!$modelWebhook->isValidResponse($data)) {\n $this->getResponse()->setHttpResponseCode(400);\n return;\n }\n\n switch ($eventType) {\n case CheckoutApi_ChargePayment_Model_Webhook::EVENT_TYPE_CHARGE_CAPTURED:\n $result = $modelWebhook->captureOrder($data);\n break;\n case CheckoutApi_ChargePayment_Model_Webhook::EVENT_TYPE_CHARGE_REFUNDED:\n $result = $modelWebhook->refundOrder($data);\n break;\n case CheckoutApi_ChargePayment_Model_Webhook::EVENT_TYPE_CHARGE_VOIDED:\n $result = $modelWebhook->voidOrder($data);\n break;\n case CheckoutApi_ChargePayment_Model_Webhook::EVENT_TYPE_INVOICE_CANCELLED:\n $result = $modelWebhook->voidOrder($data);\n break;\n default:\n $this->getResponse()->setHttpResponseCode(500);\n return;\n }\n\n $httpCode = $result ? 200 : 400;\n\n $this->getResponse()->setHttpResponseCode($httpCode);\n }", "public function cancel()\n {\n session()->flash('error', 'Paypal payment has been canceled.');\n\n return redirect()->route('shop.checkout.cart.index');\n }", "public function cancelAction()\r\n {\r\n\r\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\r\n $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\r\n if ($order->getId()) {\r\n // Flag the order as 'cancelled' and save it\r\n $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Gateway has declined the payment.')->save();\r\n Mage::getSingleton('checkout/session')->unsQuoteId();\r\n Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure' => true));\r\n }\r\n }\r\n }", "public function onCancel(WorkflowActivityRuntimeContext $context) {\n\t\t// override\n\t}", "public function whenDonationWasCancelled(DonationWasCancelled $event)\n {\n $donation = $event->donation;\n $organisation = $donation->donor->organisation;\n $this->hitWebhookEndpointsOfOrganisationUsingObjectForEvent($organisation,$donation,'donation.cancelled');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
validate update profile fields
protected function validateUpdateProfileFor($request){ $rules = [ 'name' => 'required', 'email' => 'required' ]; $this->validate($request,$rules); }
[ "private function checkUpdateUserFields() {\n $this->setRequiredFields(['token', 'updateUser']);\n if (in_array('first_name', $this->_required)) { $this->_val->matches('first_name', '/^[A-Za-z\\'\\.\\-]{2,20}$/i'); }\n if (in_array('last_name', $this->_required)) { $this->_val->matches('last_name', '/^[A-Za-z\\'\\.\\-]{2,40}$/i'); }\n if (in_array('address', $this->_required)) { $this->_val->matches('address', '/^[A-Za-z0-9\\',\\.#\\-\\s]{2,80}$/i'); }\n if (in_array('city', $this->_required)) { $this->_val->matches('city', '/^[A-Za-z\\'\\.\\-\\s]{2,60}$/i'); }\n if (in_array('country', $this->_required)) { $this->_val->removeTags('country'); }\n if (in_array('state', $this->_required)) { $this->_val->removeTags('state'); }\n if (in_array('zip', $this->_required)) { $this->_val->matches('zip', '/^(\\d{5}$)|(^\\d{5}\\-\\d{4})$/'); }\n if (in_array('email', $this->_required)) { $this->_val->isEmail('email'); }\n if (in_array('user_level', $this->_required)) { $this->_val->isInt('user_level'); }\n $this->checkValidationOnUpdate();\n }", "function cooperhewitt_epp_validate_profile_update( $errors, $update, $user_data ) {\n\treturn cooperhewitt_epp_validate_strong_password( $errors, $user_data );\n}", "protected function validateUpdateProfile($request)\n {\n $this->validate($request, $this->getUpdateProfileRules());\n }", "public function testUpdateInvalidProfile() {\n\t\t// create a Profile, try to update it without actually updating it and watch it fail. Bad backend dev trying to update without parameters\n\t\t$profile = new Profile(null, $this->oAuth->getOAuthId(), $this->profileType->getProfileTypeId(), $this->VALID_PROFILEBIO, $this->VALID_CLOUDINARYID, $this->VALID_PROFILELOCATION, $this->VALID_OAUTHTOKEN, $this->VALID_SOUNDCLOUDUSER, $this->VALID_USERNAME);\n\t\t$profile->update($this->getPDO());\n\t}", "public function testUpdateInvalidProfile() {\n\t\t// create a profile and try to update it without actually inserting it\n\t\t$profile = new Profile(null, $this->VALID_NAME, $this->VALID_EMAIL, $this->VALID_TYPE_S, $this->VALID_GITHUBTOKEN,\n\t\t\t$this->VALID_BIO, $this->VALID_RATE, $this->VALID_IMAGE, $this->VALID_DATETIME, $this->VALID_ACTIVATION,\n\t\t\t$this->VALID_HASH, $this->VALID_SALT);\n\t\t$profile->update($this->getPDO());\n\t}", "public function testUpdateInvalidProfile() {\n\t\t//create a profile, try to update it without actually updating it and watch it fail\n\t\t$profile = new Profile(null, $this->VALID_ACTIVATEFUZZY, $this->VALID_FUZZYMAIL, $this->VALID_FUZZYNAME, $this->VALID_HASHTHEFUZZY, $this->VALID_FUZZYLASTNAME, $this->VALID_CALLINGFUZZY, $this->VALID_SALTYFUZZY, $this->VALID_STRIPEYFUZZY, $this->VALID_WHATFUZZY, $this->VALID_USERFUZZY);\n\t\t$profile->update($this->getPDO());\n\t}", "public function testUpdateValidProfile() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\t\t// create a new Profile and insert to into mySQL\n\t\t$profileId = generateUuidV4();\n\t\t$profile = new Profile($profileId, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_IMAGE_URL, $this->VALID_PROFILE_REFRESH_TOKEN, $this->VALID_PROFILE_USERNAME);\n\t\t$profile->insert($this->getPDO());\n\t\t$profile->setProfileUsername($this->VALID_PROFILE_USERNAME2);\n\t\t// edit the Profile and update it in mySQL\n\t\t$profile->update($this->getPDO());\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoProfile = Profile::getProfileByProfileId($this->getPDO(), $profile->getProfileId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileImage(), $this->VALID_PROFILE_IMAGE_URL);\n\t\t$this->assertEquals($pdoProfile->getProfileRefreshToken(), $this->VALID_PROFILE_REFRESH_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileUsername(), $this->VALID_PROFILE_USERNAME2);\n\t}", "public function updateProfile($data)\n\t{\n\t\treturn $this->validator->make($data, [\n\t\t\t'first_name' => 'required|max:64',\n\t\t\t'last_name' => 'required|max:64'\n\t\t]);\n\t}", "public function testUpdateValidProfile() {\n\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\t\t$profileId = generateUuidV4();\n\t\t$profile = new Profile($profileId, $this->VALID_PROFILE_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL1, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_NAME, $this->VALID_PROFILE_PHONE, $this->VALID_PROFILE_SALT);\n\t\t$profile->insert($this->getPDO());\n\n\t\t//edit the profile\n\t\t$profile->setProfileEmail($this->VALID_PROFILE_EMAIL2);\n\t\t$profile->update($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoProfile = Profile::getProfileByProfileId($this->getPDO(), $profile->getProfileId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_PROFILE_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL2);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t\t$this->assertEquals($pdoProfile->getProfilePhone(), $this->VALID_PROFILE_PHONE);\n\t\t$this->assertEquals($pdoProfile->getProfileSalt(), $this->VALID_PROFILE_SALT);\n\t}", "public function testUpdateValidProfile() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert it into mySQL\n\t\t$profileId = generateUuidV4();\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION, $this->VALID_ATHANDLE, $this->VALID_EMAIL, $this->VALID_HASH);\n\t\t$profile->insert($this->getPDO());\n\n\t\t//edit the Profile and update it in mySQL\n\t\t$profile->setProfileAtHandle($this->VALID_ATHANDLE2);\n\t\t$profile->update($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoProfile = Profile::getProfileByProfileId($this->getPDO(), $profile->getProfileId());\n\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION);\n\t\t$this->assertEquals($pdoProfile->getProfileAtHandle(), $this->VALID_ATHANDLE2);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_HASH);\n\t}", "function culturefeed_ui_profile_edit_form_validate(array $form, array &$form_state) {\n\n $values = $form_state['values'];\n $culturefeed_user = $form['#culturefeed_user'];\n\n // Custom validations first.\n if (drupal_strlen($values['bio']) > 250) {\n form_set_error('bio', t('The maximum of 250 characters is exceeded'));\n return;\n }\n\n // Update profile information.\n $culturefeed_user_update = new CultureFeed_User();\n\n $culturefeed_user_update->id = $culturefeed_user->id;\n $culturefeed_user_update->givenName = $values['givenName'];\n $culturefeed_user_update->familyName = $values['familyName'];\n $culturefeed_user_update->gender = $values['gender'];\n $culturefeed_user_update->bio = $values['bio'];\n $culturefeed_user_update->street = $values['street'];\n $culturefeed_user_update->zip = $values['zip'];\n $culturefeed_user_update->city = $values['city'];\n $culturefeed_user_update->country = $values['country'];\n $culturefeed_user_update->dob = NULL;\n // For the moment this field is removed, so we default to Dutch.\n $culturefeed_user_update->preferredLanguage = (isset($values['preferredLanguage'])) ? $values['preferredLanguage'] : 'nl';\n\n if (!empty($values['dob'])) {\n\n $dob_parts = explode('/', $values['dob']);\n\n if (count($dob_parts) == 3) {\n\n list($day, $month, $year) = $dob_parts;\n\n if (is_numeric($day) && is_numeric($month) && is_numeric($year)) {\n\n $timezone = new DateTimeZone('Europe/Brussels');\n $dob = new DateTime($year . '-' . $month . '-' . $day, $timezone);\n $culturefeed_user_update->dob = $dob->getTimestamp();\n\n }\n\n }\n\n }\n\n $fields = array(\n 'id', 'givenName', 'familyName', 'gender', 'bio', 'street', 'zip', 'city',\n 'country', 'dob',\n );\n\n try {\n DrupalCultureFeed::updateUser($culturefeed_user_update, $fields);\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_ui', $e);\n form_set_error('submit', t('Error occurred while saving your personal data.'));\n }\n\n // Remove the profile picture if requested.\n if (empty($form_state['values']['picture']) && $form_state['#old_picture'] > 0) {\n try {\n DrupalCultureFeed::removeUserDepiction($culturefeed_user->id);\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_ui', $e);\n }\n }\n\n // Upload profile picture.\n if ($form_state['values']['picture'] && $form_state['#old_picture'] != $form_state['values']['picture']) {\n\n $file = file_load($form_state['values']['picture']);\n if ($file) {\n try {\n $file_upload = culturefeed_prepare_curl_upload_from_file($file);\n DrupalCultureFeed::uploadUserDepiction($culturefeed_user->id, $file_upload);\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_ui', $e);\n form_set_error('picture', t('Error occurred while saving your picture.'));\n }\n }\n }\n\n // Save the default privacy settings. Adjustable privacy settings are moved\n // to privacy settings tab.\n $privacy_config = new CultureFeed_UserPrivacyConfig();\n $privacy_config->gender = CultureFeed_UserPrivacyConfig::PRIVACY_PRIVATE;\n $privacy_config->bio = CultureFeed_UserPrivacyConfig::PRIVACY_PUBLIC;\n\n try {\n DrupalCultureFeed::updateUserPrivacy($culturefeed_user->id, $privacy_config);\n }\n catch (Exception $e) {\n form_set_error('submit', t('Error occurred while saving your privacy settings.'));\n }\n\n}", "public function testUpdateProfile()\n {\n }", "function validate_on_update ($data) {\n\n\t\t$val = $this->form_validation;\n\t\t\n\t\tif (isset($data['username'])) {\n\t\t\t$val->set_rules('username', 'Login', 'trim|required|alpha_dash|min_length[4]');\n\t\t}\n\t\tif (isset($data['password'])) {\n\t\t\t$val->set_rules('password', 'Password', 'trim|required');\n\t\t}\n\t\tif (isset($data['open_password'])) {\n\t\t\t$val->set_rules('open_password', 'Open Password', '');\n\t\t}\n\t\tif (isset($data['email'])) {\n\t\t\t$val->set_rules('email', 'EMail', 'trim|required|valid_email');\n\t\t}\n\t\tif (isset($data['status'])) {\n\t\t\t$val->set_rules('status', 'Status', '');\n\t\t}\n\n\t\treturn $this->run_validation($data);\n\t}", "function user_check_update_input($uid)\n\t{\n\t\t$update = true;\n\t\t\n\t\t$user_previous_data = $this->DB->database_select('users', '*', array('uid' => $uid), 1);\n\t\t\n\t\t$empty_keys = array('firstname', 'lastname', 'email', 'profile_about');\n\t\t\n\t\t/**\n\t\t * If any fields were empty, do not update row with empty values. Instead, update using previous values\n\t\t*/\n\t\t\n\t\tfor($i = 0; $i < count($empty_keys); $i++)\n\t\t{\n\t\t\t$key = $empty_keys[$i];\n\t\t\tif(empty($_POST[$key]))\n\t\t\t{\n\t\t\t\t$_POST[$key] = $user_previous_data[$key];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$_POST['profile_about'] = substr($_POST['profile_about'], 0, 2000);\n\t\t$_POST['firstname'] = substr($_POST['firstname'], 0, 50);\n\t\t$_POST['lastname'] = substr($_POST['lastname'], 0, 50);\n\t\t\n\t\t//Special query needed...one of the rare moments when != is used in where context <--- ONLY SPECIAL QUERY USED TO DATE.\n\t\t\n\t\t$rows = $this->DB->special_query(\"select * from users where email='\n\t\t\t\t\t\t \".mysql_real_escape_string($_POST['email']).\"' and uid != '$uid'\");\n\t\t\n\t\t$rows = mysql_fetch_array($rows);\n\t\t\n\t\tif($rows != false)\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Email address already exists\");\n\t\t\t$update = false;\n\t\t}\n\t\t\n\t\tif(!preg_match(\"/^[A-Za-z0-9_\\-\\.]+@[A-Z0-9a-z]+\\.[a-zA-Z]{2,5}\\.?[a-zA-Z]*$/\", trim($_POST['email'])))\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Invalid email address\");\n\t\t\t$update = false;\n\t\t}\n\t\t\n\t\tif(!empty($_POST['password']) && ($_POST['password'] != $_POST['password_confirm']))\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Passwords do not match\");\n\t\t\t$update = false;\n\t\t}\n\t\t\n\t\t/*\n\t\t *Need to do a separate check on\n\t\t *password field being empty as data first needed to be compared against confirm data\n\t\t*/\n\t\t\n\t\tif($update && empty($_POST['password']))\n\t\t{\n\t\t\t$_POST['password'] = $user_previous_data['password'];\n\t\t}\n\t\t\n\t\tunset($_POST['password_confirm']);\n\t\t\n\t\treturn $update;\n\t\t\n\t}", "function cpf_validate_required_edituser() {\r\n $success = true;\r\n foreach ($_POST as $key => $value) {\r\n if (substr($key, 0, 4) == 'cpf_') { //custom profile fields input names start with cpf_\r\n $field_name = substr($key, 4);\r\n $required = Database::get()->querySingle(\"SELECT required FROM custom_profile_fields WHERE shortname = ?s\", $field_name)->required;\r\n if ($required == 1 && $value == '') {\r\n $success = false;\r\n }\r\n }\r\n }\r\n return $success;\r\n}", "public function testUpdateProfileForm()\n {\n $rand = rand();\n\n if (config('access.users.change_email')) {\n $this->actingAs($this->user)\n ->visit('/account')\n ->see('My Account')\n ->type($this->user->first_name.'_'.$rand, 'first_name')\n ->type($this->user->last_name.'_'.$rand, 'last_name')\n ->type('2_'.$this->user->email, 'email')\n ->press('update-profile')\n ->seePageIs('/account')\n ->see('Profile successfully updated.')\n ->seeInDatabase(config('access.users_table'),\n [\n 'email' => '2_'.$this->user->email,\n 'first_name' => $this->user->first_name.'_'.$rand,\n 'last_name' => $this->user->last_name.'_'.$rand,\n ]);\n } else {\n $this->actingAs($this->user)\n ->visit('/account')\n ->see('My Account')\n ->type($this->user->first_name.'_'.$rand, 'first_name')\n ->type($this->user->last_name.'_'.$rand, 'last_name')\n ->press('update-profile')\n ->seePageIs('/account')\n ->see('Profile successfully updated.')\n ->seeInDatabase(config('access.users_table'),\n [\n 'first_name' => $this->user->first_name.'_'.$rand,\n 'last_name' => $this->user->last_name.'_'.$rand,\n ]);\n }\n }", "function check_for_profile_update() {\n\tif (isset($_GET['profile']) && $_GET['profile'] == 'updated') { \n\t\t$user = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));\n\n\t\tif (isset($_POST['displayName']) && $_POST['displayName'] !== '') {\n\t\t\t$name = $_POST['displayName'];\n\t\t\twp_update_user(array('ID'=>$user->ID, 'display_name'=>$name));\n\t\t\tupdate_user_meta('user_'.$user->ID, 'name_change', 1);\n\t\t}\n\t\tif (isset($_POST['pass1']) && isset($_POST['pass2']) && !empty($_POST['pass1']) && $_POST['pass1'] == $_POST['pass2']) {\n\t\t\t$update = $wpdb->query($wpdb->prepare(\"UPDATE {$wpdb->users} SET `user_pass` = %s WHERE `ID` = %d\", array(wp_hash_password($_POST['pass1']), $user_ID)));\n\t\t if (!is_wp_error($update)) {\n\t\t wp_cache_delete($user_ID, 'users');\n\t\t wp_cache_delete($user->user_login, 'userlogins');\n\t\t wp_logout();\n\t wp_signon(array('user_login' => $user->user_login,\n\t 'user_password' => $_POST['pass1']));\n\t ob_start();\n\t\t }\n\t\t} \n\t\theader('Location: '.home_url().'/user/'.$user->user_login);\n\t\treturn '<p>Profile updated. Keep on keepin&apos; on.</p>';\n\t}\n}", "private function userProfileUpdate(){\n }", "public function updateProfile() {\n \n $this->User_model->updateProfile();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register an event handler to be called when a given event is received. The $event '' can be specified to register the handler for all events.
public function add_event_handler($event, $callback);
[ "public function registerEvent($event, $handler);", "public function registerEventHandler($event, callable $handler);", "abstract protected function registerEventHandler($event, callable $handler);", "function registerEventHandler( $event, $function ) {\n $this->_events[$event][] = $function;\n }", "public function addHandler($eventClass, $handler);", "public function register_event($event)\n\t{\n\t\t//\n\t\t// Check if the event isn't registered already\n\t\t//\n\t\t$this->is_event_registered($event, FALSE);\n\n\t\t//\n\t\t// Register the event\n\t\t//\n\t\t$this->events[$event] = array();\n\t}", "public function subscribe($event);", "public function on($event, callable $listener);", "protected function registerMasterHandler($event, $handler)\n {\n $this->masterHandlers[$this->getMasterHandlerKey($event)][] = $this->resolveHandler($handler);\n }", "private function callHandler($event, $data = NULL) {\r\n if (isset($this->myEventHandlers[$event])) {\r\n if ($data !== NULL) {\r\n call_user_func($this->myEventHandlers[$event], $data);\r\n } else {\r\n call_user_func($this->myEventHandlers[$event]);\r\n }\r\n }\r\n }", "public function addHandler($events, $handler, $priority = PriorityInterface::PRIORITY_NORMAL);", "public function listen(string $event, \\Closure $callback): self;", "public function handle(EventNewEvent $event)\n {\n\n }", "public function push(Event $event);", "function addEvent($event);", "public function handle(Event $event);", "public static function listen(string $event, callable $callback): void\n {\n static::$events[$event][] = \\Closure::fromCallable($callback);\n }", "protected function handle($event)\n {\n $method = $this->getApplyMethod($event);\n\n if (! method_exists($this, $method)) {\n return;\n }\n\n $this->$method($event);\n }", "public function addEvent($event) {\n $this->_events[$this->getNumEvents()] = $event;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tells if the current user has a given privilege. If there is a setting in config.php for auth_sp_saml_$configName_entitlement then SAML will determine if the user has this access. Otherwise the array in config.php for $configName will show an explicit list of users who have this access.
public static function isPrivilegeAllowed( $configName ) { $ret = false; if (is_null($configName)) return false; if (self::user()) { // constants $entitlement_attribute = Config::get('auth_sp_saml_entitlement_attribute'); $additional_attributes = Config::get('auth_sp_additional_attributes'); // settings for this configName $cfg = Config::get($configName); $cfg_entitlement = Config::get('auth_sp_saml_' .$configName. '_entitlement'); // Admin privs through entitlement if (self::isSP() && $entitlement_attribute && $cfg_entitlement && $additional_attributes) { if (self::$attributes['additional'] && array_key_exists($entitlement_attribute, self::$attributes['additional']) && in_array($entitlement_attribute, $additional_attributes)) { $ret = in_array($cfg_entitlement, self::$attributes['additional'][$entitlement_attribute]); } } else { // Admin UID from config file if (!is_array($cfg)) { $cfg = array_filter(array_map('trim', preg_split('`[,;\s]+`', (string)$cfg))); } $ret = in_array(self::user()->saml_user_identification_uid, $cfg); } } return $ret; }
[ "public function authIsAdmin() {\n\n global $config;\n\n require_once($config['site_simplesamllocation'].'lib/_autoload.php');\n\n $as = new SimpleSAML_Auth_Simple($config['site_authenticationSource']); \n if($as->isAuthenticated()) {\n $as->requireAuth();\n $attributes = $as->getAttributes();\n\n // compare config admin to userUID\n if(isset($attributes[$config['saml_uid_attribute']][0])) {\n $attributes[\"saml_uid_attribute\"] = $attributes[$config['saml_uid_attribute']][0];\n } else if(isset($attributes[$config['saml_uid_attribute']])) {\n $attributes[\"saml_uid_attribute\"] = $attributes[$config['saml_uid_attribute']];\n } else {\n // required attribute does not exist\n logEntry(\"UID attribute not found in IDP (\".$config['saml_uid_attribute'].\")\",\"E_ERROR\");\n return FALSE;\n }\n\n $known_admins = explode(',', $config['admin']);\n if(in_array($attributes[\"saml_uid_attribute\"], $known_admins)) {\n return TRUE;\n } else {\n return FALSE;\n }\n }\n return FALSE;\n\n }", "public static function isAccess(Config $config)\n {\n foreach ($config->perms as $permissionName) {\n if (Yii::$app->user->can($permissionName)) {\n return true;\n }\n }\n return false;\n }", "function user_has_priv ($priv, $accept_staff_priv=true)\n{\n\n // If the session hasn't been setup yet, then the user can't be\n // privileged\n\n if (! array_key_exists (SESSION_LOGIN_USER_PRIVS, $_SESSION))\n return false;\n\n // See if the user has the privilege\n\n if (is_string (stristr ($_SESSION[SESSION_LOGIN_USER_PRIVS], \",$priv,\")))\n return true;\n\n // OK, if that didn't work, and if Staff privilege is an acceptable\n // substitute, see if the user has that\n\n if ($accept_staff_priv)\n if (is_string (stristr ($_SESSION[SESSION_LOGIN_USER_PRIVS], ',Staff,')))\n return true;\n\n // Admin priv is ALWAYS an acceptable substitute\n\n return is_string (stristr ($_SESSION[SESSION_LOGIN_USER_PRIVS], ',Admin'));\n}", "public function canSeeConfidentialProject(){\n //else if ($userSession->getRole()->getId() == \\Model\\Role::ROLE_ADMIN && $esConfidencial) $ws->generate_error(01,\"No puede agregar proyectos como confidencia. Acceso Denegado\");\n $roles= [Role::ROLE_SUPERADMIN,Role::ROLE_ADMIN_CONFIDENTIAL,Role::ROLE_REPORT_CONFIDENTIAL];\n return in_array($this->getRole()->getId(),$roles);\n }", "function has_sysadmin_privs($acct_info = '') {\n if($acct_info == '') {\n global $user_info;\n $acct_info = $user_info;\n }\n return $this->GetGidBit($acct_info['gidflags'], 'system_admin_privileges');\n}", "function _hasAccess()\n {\n // create user object\n $user =& User::singleton();\n\n $timePoint =& TimePoint::singleton($_REQUEST['sessionID']);\n $candID = $timePoint->getCandID();\n\n $candidate =& Candidate::singleton($candID);\n\n // check user permissions\n return ($user->hasPermission('access_all_profiles') || $user->getData('CenterID') == $candidate->getData('CenterID') || $user->getData('CenterID') == $timePoint->getData('CenterID'));\n }", "function _hasAccess()\r\n {\r\n // create user object\r\n $user =& User::singleton();\r\n\r\n $timePoint =& TimePoint::singleton($_REQUEST['sessionID']);\r\n $candID = $timePoint->getCandID();\r\n\r\n $candidate =& Candidate::singleton($candID);\r\n\r\n // check user permissions\r\n return ($user->hasPermission('access_all_profiles') || $user->getData('CenterID') == $candidate->getData('CenterID') || $user->getData('CenterID') == $timePoint->getData('CenterID'));\r\n }", "function check_for_privileges(){\n\t\tglobal $config, $errors;\n\n if (false === $privilege = $this->data->get_privileges_of_user($this->auth[\"uname\"], $this->auth[\"udomain\"], \n array('SUPER','RESELLER', 'ADMIN','USER'), $errors)) return false;\n\n switch ($privilege){\n case 'SUPER':\n $this->auth[\"perm\"]=\"USER,ADMIN,RESELLER,SUPER\";\n\t break;\n\n case 'RESELLER':\n $this->auth[\"perm\"]=\"USER,ADMIN,RESELLER\";\n break;\n\n case 'ADMIN':\n $this->auth[\"perm\"]=\"USER,ADMIN\";\n break;\n case 'USER':\n $this->auth[\"perm\"]=\"USER\";\n break;\n\n }//switch\n\n\n\n }", "function ask_access_to_list ()\n { \n if( ($GLOBALS['B']->auth->user_rights > 3) )\n {\n return TRUE;\n }\n return FALSE;\n }", "public function user_has_access() {\n\t\treturn current_user_can( 'pvm_edit_projects' );\n\t}", "function chkUserPrivileges($request, $db, $privlgs, $resType=\"AS_ONE\")\n{\n $PRIV_ARR=[\n 'ADMIN_PAGE_ACCESS' =>0x100,//9bit\n 'MANAGE_FILES' =>0x80, //8bit\n 'WRITE_CATEGORIES' =>0x40, //7bit\n 'READ_CATEGORIES' =>0x20, //6bit\n 'WRITE_USERS' =>0x10, //5bit\n 'READ_USERS' =>0x8, //4bit\n 'BLOCK_USERS' =>0x4, //3bit\n 'WRITE_POST' =>0x2, //2bit\n 'READ_POST' =>0x1, //1bit\n ];\n \n //High part\n //9-Admin page access\n //8-Manage files\n //7-Write categories\n //6-Read categories - 0-hide categories\n //5-Write users\n //4-Read users - 0-hide users\n //3-blocked user\n //2-Write post\n //1-Read post - 0-hide posts\n\n $privs=0;\n\n //Get access token\n $at=getAt($request);\n\n //No token\n if ($at==\"-1\" && $resType==\"AS_ONE\") {\n return false;\n }\n if ($at==\"-1\" && $resType!=\"AS_ONE\") {\n $arrOut=[];\n for ($i=0;$i<count($privlgs);$i++) {\n $arrOut[$privlgs[$i]]=false;\n }\n return $arrOut;\n }\n \n //Check token in DB\n $sql=\" SELECT COUNT(tokens.id) AS cnt FROM tokens \";\n $sql.=\" WHERE tokens.at=:at\";\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\":at\", $at);\n $stmt->execute();\n if ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n if (intval($row[\"cnt\"])==0) {\n if ($resType==\"AS_ONE\") {\n return false;\n }\n if ($resType!=\"AS_ONE\") {\n $arrOut=[];\n for ($i=0;$i<count($privlgs);$i++) {\n $arrOut[$privlgs[$i]]=false;\n }\n return $arrOut;\n }\n }\n }\n\n //Get privelegs from DB\n $sql=\" SELECT users.privlgs FROM users \";\n $sql.=\" LEFT JOIN tokens \";\n $sql.=\" ON tokens.usrid=users.id \";\n $sql.=\" WHERE tokens.at=:atoken\";\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\":atoken\", $at);\n $stmt->execute();\n if ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $privs=intval($row['privlgs']);\n }\n\n //AS_ONE result\n if ($resType==\"AS_ONE\") {\n $res=true;\n for ($i=0;$i<count($privlgs);$i++) {\n if (($privs&$PRIV_ARR[$privlgs[$i]])==0) {\n $res=false;\n break;\n }\n }\n return $res;\n }\n\n //AS_ARRAY result\n $arrOut=[];\n for ($i=0;$i<count($privlgs);$i++) {\n $arrOut[$privlgs[$i]]=($privs&$PRIV_ARR[$privlgs[$i]])?true:false;\n }\n return $arrOut;\n}", "function SEC_hasRights($features,$operator='AND')\n{\n global $_USER, $_RIGHTS, $_SEC_VERBOSE;\n\n if (strstr($features,',')) {\n $features = explode(',',$features);\n }\n\n if (is_array($features)) {\n // check all values passed\n for ($i = 0; $i < count($features); $i++) {\n if ($operator == 'OR') {\n // OR operator, return as soon as we find a true one\n if (in_array($features[$i],$_RIGHTS)) {\n if ($_SEC_VERBOSE) {\n COM_errorLog('SECURITY: user has access to ' . $features[$i],1);\n }\n return true;\n }\n } else {\n // this is an \"AND\" operator, bail if we find a false one\n if (!in_array($features[$i],$_RIGHTS)) {\n if ($_SEC_VERBOSE) {\n COM_errorLog('SECURITY: user does not have access to ' . $features[$i],1);\n }\n return false;\n }\n }\n }\n\n if ($operator == 'OR') {\n if ($_SEC_VERBOSE) {\n COM_errorLog('SECURITY: user does not have access to ' . $features[$i],1);\n }\n return false;\n } else {\n if ($_SEC_VERBOSE) {\n COM_errorLog('SECURITY: user has access to ' . $features[$i],1);\n }\n return true;\n }\n } else {\n // Check the one value\n if ($_SEC_VERBOSE) {\n if (in_array($features,$_RIGHTS)) {\n COM_errorLog('SECURITY: user has access to ' . $features,1);\n } else {\n COM_errorLog('SECURITY: user does not have access to ' . $features,1);\n }\n }\n return in_array($features,$_RIGHTS);\n }\n}", "function is_elevated()\r\n {\r\n return $this->ci->session->userdata('acp_user_level');\r\n }", "protected function checkFrontendUserPermissionsGeneric($configName)\n {\n $settings = $this->getPermissionSettings();\n\n if ($settings[$configName] === 'all') {\n return true;\n }\n\n if ($this->currentUserIsInAdminGroup()) {\n return true;\n }\n\n return $this->currentUserIsInGroup($settings[$configName]);\n }", "function xarPrivExists($name)\n{\n $priv = xarPrivileges::findPrivilege($name);\n if ($priv) return true;\n else return false;\n}", "function cbl_user_is( $access ) {\n\t\n\t$member = MS_Model_Member::get_current_member();\n\t\n\t$access_arr = array(\n\t\t'non_paying' => [ 30, 201, 151 ], //Non-paying IDs \n\t\t'paying' => [ 39, 38, 4371 ], //Paying IDs\n\t\t'preview' => [ 151, 201 ], //Preview IDs\n\t\t'bots' => [ 201 ] //Robots IDs\n\t); \n\t\n\t\n\t$cbl_membership_id = $member->get_membership_ids();\n\t\n\tif( array_key_exists( $access, $access_arr ) ){\n\t\t\n\t\t$result = array_intersect( $cbl_membership_id, $access_arr[ $access ] );\n\t\t\t\n\t\treturn ( !empty( $result ) )? true : false ; \n\t}\n\n\treturn NULL; //access not set. \n}", "function penton_custom_dfp_user_has_role() {\n global $user;\n\n // Allow user 1\n if ($user->uid == '1') {\n return TRUE;\n }\n\n $roles = array('administrator', 'associate administrator');\n foreach ($roles as $role) {\n if (in_array($role, $user->roles)) {\n return TRUE;\n }\n }\n return FALSE;\n}", "function smarty_function_accessuser($params)\n{\n $params['module'] = 'admin';\n $params['controller'] = 'user';\n $params['action'] = 'edit';\n\n global $access_config;\n $up = $_SESSION['user']['permission'];\n $rule = $access_config[$params['module']]\n [$params['controller']]\n [$params['action']];\n $access = FALSE;\n if(count($up) > count($rule) || count($up) == count($rule)) {\n foreach ($up as $v) {\n if(in_array($v, $rule)){\n $access = TRUE; break;\n }\n }\n } else {\n foreach ($rule as $v) {\n if(in_array($v, $up)){\n $access = TRUE; break;\n }\n }\n }\n return $access;\n}", "private function canDisplay()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_COACH',\n 'ROLE_ASSISTANT',\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value for the ChannelName input for this GetChannel Choreo.
public function setChannelName($value) { return $this->set('ChannelName', $value); }
[ "public function setChannelName($var)\n {\n GPBUtil::checkString($var, True);\n $this->channelName = $var;\n\n return $this;\n }", "public function setChannelname($var)\n {\n GPBUtil::checkString($var, True);\n $this->channelname = $var;\n\n return $this;\n }", "public function setChannel($name)\n {\n if (!is_string($name)) {\n throw new InvalidArgumentException(\n 'Channel name must be a string.'\n );\n }\n\n $this->channel = $name;\n return $this;\n }", "public function getChannelByName()\n {\n if (!isset($this->requestParams['name'])) {\n throw new PushApiException(PushApiException::NO_DATA);\n }\n\n if (!$channel = Channel::getInfoByName($this->requestParams['name'])) {\n throw new PushApiException(PushApiException::NOT_FOUND);\n }\n\n $this->send($channel);\n }", "public function getChannelName()\n {\n return $this->channelName;\n }", "public function resolveChannelName($channelName)\n {\n return $this->channelRegistry->get($channelName);\n }", "public function getChannelName()\n {\n return $this->_channel['name'];\n\n }", "public abstract function getChannel($name);", "public function getChannelName()\n {\n return $this->formattedData['channelName'];\n }", "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->Channel = $var;\n\n return $this;\n }", "public function getChannel(string $name)\n {\n foreach ($this->channels as $channel) {\n if ($channel->getName() === $name) {\n return $channel;\n }\n }\n }", "protected function getChannelByName($name)\n {\n return Cache::remember('channel.name.'.$name, 60 * 60 * 24, function () use ($name) {\n return Channel::withTrashed()->where('name', $name)->firstOrFail();\n });\n }", "public final function getChannelName()\n {\n return $this->extractData(\"channel_name\");\n }", "public function testGetChannelName($url, $channelName)\n {\n $this->assertSame($channelName, $this->plugin->getChannelName($url));\n }", "public function channelInfo($name)\n {\n return $this->requestGet('channels/' . urlencode($name));\n }", "public function channel_name() : string {\r\n return $this->payload[\"channel\"][\"name\"];\r\n }", "public function getByName($name)\n {\n return R::findOne(\n 'marketingchannel',\n 'name = ?',\n array($name)\n );\n }", "public function setChannel($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Cloud\\Container\\V1\\ReleaseChannel\\Channel::class);\n $this->channel = $var;\n\n return $this;\n }", "public static function addChannel($name){\n if(! self::hasChannel($name))\n self::$channels[] = $name;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the size of the longest word on a string
public static function getWordSize(string|Stringable $string): int { $string = (string) $string; $len = 0; foreach (preg_split('#[\h\v]+#', $string) as $word) { if (($wlen = mb_strlen($word)) > $len) { $len = $wlen; } } return $len; }
[ "function findLongestWord($str)\n{\n $str = explode(\" \", $str);\n $res = '';\n foreach($str as $v) {\n if(strlen($res) < strlen($v))\n $res = $v;\n\n }\n return strlen($res);\n}", "function getLongestWord($str) {\n // get array of words\n $str = explode(' ', $str);\n\n $longestWordLength = 0;\n $longestWord = '';\n\n foreach ($str as $word) {\n if (strlen($word) > $longestWordLength) {\n $longestWordLength = strlen($word);\n $longestWord = $word;\n }\n }\n return $longestWord;\n}", "function LongestWord($sen) {\n$longesWord = null;\n$longesWordCount = 0;\n$words = explode(' ' , $sen);\n$totalWords = count($words);\nfor($i = 0 ; $i < $totalWords ; $i++){\n if(strlen($words[$i]) > strlen(@$words[$i+1]) && $longesWordCount < strlen($words[$i])){\n $longesWordCount = strlen($words[$i]);\n $longesWord = $words[$i];\n }\n}\n$sen = \"Given String: $sen <br>No. of words are $totalWords And Longest Word is $longesWord\";\nreturn $sen; \n}", "public static function longestString($array) {\r\n\t$i = 0;\r\n\t\r\n\tforeach ($array as $value) {\t\r\n\t\tif (strlen($value) > $i) {\t\r\n\t\t\t$i = strlen($value);\r\n\t\t}\t\t\t\r\n\t}\r\n\t\r\n\treturn $i;\r\n}", "function getLongestWord($sentence) {\n\t\t$words = explode(' ', $sentence);\n\n\t\t$longestWord = '';\n\n\t\t$nbWords = count($words);\n\n\t\tif($nbWords > 0) {\n\t\t\t$longestWord = $words[0];\n\t\t}\n\n\t\tfor($i = 0; $i < $nbWords; $i++) {\n\t\t\tif(strlen($words[$i]) > strlen($longestWord)) {\n\t\t\t\t$longestWord = $words[$i];\n\t\t\t}\n\t\t}\n\t\treturn $longestWord;\n\t}", "function findShort($str){\n $words = (explode(\" \", $str));\n $lengths = array_map(\"strlen\", $words);\n return min($lengths);\n }", "public function longestStringLength(): int\n {\n return Arr::longestStringLength($this->value);\n }", "function longestString($i) {\n // i will be an array.\n // return the longest string in the array\n\n}", "function longestSubstring($str) {\n if (strlen($str) < 1) {\n return $str;\n }\n $table = [];\n $result = [];\n $i = 0;\n while ($i < strlen($str)) {\n if (!isset($table[$str[$i]])) {\n $table[$str[$i]] = $i;\n $i++;\n } else {\n $i = $table[$str[$i]] + 1;\n $chars = array_keys($table);\n if (sizeof($chars) > sizeof($result)) {\n $result = $chars;\n }\n $chars = [];\n $table = [];\n }\n }\n if (sizeof($table) > 0) {\n $chars = array_keys($table);\n if (sizeof($chars) > sizeof($result)) {\n $result = $chars;\n }\n }\n sort($result);\n return implode(\"\", $result);\n}", "public function getMltMaxWordLength(): int {}", "function longestString(array $array) {\n return max(array_map(strlen, $array));\n}", "public function length()\n {\n return strlen($this->word);\n }", "public function get_word_length()\n\t{\n\t\treturn $this->word_length;\n\t}", "public function getMltMaxWordLength(){}", "protected function getLongestSize()\n {\n if ($this->longest) {\n return $this->longest;\n }\n\n // Build possible handles\n $strings = [];\n $connections = $this->connections->getActiveConnections();\n $stages = (array) $this->connections->getAvailableStages() ?: [''];\n foreach ($connections as $handle => $connection) {\n $servers = $connection->getConnectionKey()->servers;\n if (count($servers) > 1) {\n $handle .= '/'.count($servers);\n }\n\n foreach ($stages as $stage) {\n $strings[] = trim($handle.'/'.$stage, '/');\n }\n }\n\n // Get longest string\n $strings = array_map('strlen', $strings);\n $strings = $strings ? max($strings) : 0;\n\n // Cache value\n $this->longest = $strings;\n\n return $this->longest;\n }", "function four_letter_words($s) {\n $res = 0;\n $words = preg_split('/\\s+/', $s);\n foreach($words as $w) {\n if (strlen($w) === 4) \n $res += 1;\n }\n return $res;\n}", "public function get_size($answer) {\n $answer = htmlspecialchars_decode($answer);\n $words = explode(\"|\", $answer);\n $maxlen = max(array_map('strlen', $words));\n return $maxlen;\n }", "public function wordCount()\n {\n return str_word_count($this->value);\n }", "public function getMaxLength() {\n\t\t$length = 0;\n\t\tforeach ($this->list as $line) {\n\t\t\t$length = max($length, mb_strlen($line));\n\t\t}\n\t\treturn $length;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Google Drive instance
public function get_drive_instance() { $instance = new Google_Service_Drive($this->client); return $instance; }
[ "public static function get_drive_client() {\n\t\t$drive_client = self::$drive_client;\n\n\t\tif ( null === $drive_client ) {\n\t\t\t$raw_client = self::get_authorized_raw_client();\n\t\t\t$drive_client = new Drive( $raw_client );\n\t\t\tself::$drive_client = $drive_client;\n\t\t}\n\n\t\treturn $drive_client;\n\t}", "public function getDrive(): \\Google_Service_Drive\n {\n\n // setDrive and getDrive is used for unit-tests...\n if ($this->drive == null) {\n return $this->buildDrive();\n }\n return $this->drive;\n }", "protected function getClient()\n {\n if ($this->client === null) {\n $this->client = new GDriveHelper();\n }\n return $this->client;\n }", "public function buildService() {\n $client=$this->buildClient();\n return new Google_DriveService($client);\n}", "public function getGoogleDriveManager(){\n\n if($this->_googleDriveManager === null){\n\n // Initialize the google drive manager to the folder that is defined on the depot setup\n if(StringUtils::isEmpty($this->_loadedDepotSetup->googleDrive->apiClientRoot)){\n\n throw new UnexpectedValueException('googleDriveManager not available. Check it is correctly configured on turbodepot setup');\n }\n\n $this->_googleDriveManager = new GoogleDriveManager($this->_loadedDepotSetup->googleDrive->apiClientRoot);\n\n if(!StringUtils::isEmpty($this->_loadedDepotSetup->googleDrive->cacheRootPath)){\n\n $this->_googleDriveManager->enableCache($this->_loadedDepotSetup->googleDrive->cacheRootPath,\n $this->_loadedDepotSetup->googleDrive->cacheZone,\n $this->_loadedDepotSetup->googleDrive->listsTimeToLive,\n $this->_loadedDepotSetup->googleDrive->filesTimeToLive);\n }\n\n $this->_googleDriveManager->setServiceAccountCredentials($this->_loadedDepotSetup->googleDrive->accountCredentialsPath);\n }\n\n return $this->_googleDriveManager;\n }", "public function getGoogleClient();", "public static function serviceInstance()\n {\n $client = self::clientInstance();\n $service = new \\Google_Service_Directory($client);\n return $service;\n }", "private function getDisk()\n {\n return Storage::disk('gcs');\n }", "function gf_googlesheets() {\n\treturn GFGoogleSheets::get_instance();\n}", "public function authenticationGoogleOAuth() {\n $logger = $this->container->get('logger');\n $userSecUtil = $this->container->get('user_security_utility');\n\n $credentialsJsonFile = $userSecUtil->getSiteSettingParameter('p12KeyPathFellApp');\n if( !$credentialsJsonFile ) {\n $logger->warning('p12KeyPathFellApp/credentials.json is not defined in Site Parameters. File='.$pkey);\n }\n\n //$client = $this->getClient();\n //$service = new \\Google_Service_Drive($client);\n\n $client = new \\Google_Client();\n\n $client->setApplicationName('Fellowship Applications');\n $client->setAccessType('offline');\n $client->setIncludeGrantedScopes(true);\n $client->setScopes(array('https://www.googleapis.com/auth/drive'));\n //$client->setSubject(\"1040591934373-1sjcosdt66bmani0kdrr5qmc5fibmvk5@developer.gserviceaccount.com\");\n //$client->setDeveloperKey(\"\");\n\n //$scopes = [ Drive::DRIVE ];\n\n //https://console.cloud.google.com/iam-admin\n //Click: \"Service Accounts\"\n //Click: \"Service account 2\"\n //Keys: Add Key => json\n\n //$pkey = __DIR__ . '/../Util/FellowshipApplication-f1d9f98353e5.p12';\n //$credentialsJsonFile = __DIR__ . '/../Util/client_secret_4.json';\n //$credentialsJsonFile = __DIR__ . '/../Util/turnkey-delight.json';\n //$homepage = file_get_contents($credentialsJsonFile);\n //echo $homepage;\n\n //echo \"credentialsJsonFile=$credentialsJsonFile <br>\";\n $client->setAuthConfig($credentialsJsonFile);\n\n // make the request\n //$response = $client->get('drive/v2/files');\n //print_r((string) $response->getBody());\n\n //https://github.com/googleapis/google-api-php-client\n //$service = new \\Google_Service_Drive($client);\n $service = new \\Google\\Service\\Drive($client);\n\n $res = array(\n 'client' => $client,\n 'service' => $service\n );\n\n return $res;\n }", "public static function getGoogle()\n\t{\n\t\tif (!self::$google) {\n\t\t\tjimport('jugrs.google.load');\n\n\t\t\tself::$google = LoadGoogle::getInstance();\n\t\t}\n\t\treturn self::$google;\n\t}", "private function startDriveService() {\n $this->driveService = new Google_DriveService($this->driveClient);\n }", "function shanti_gdrive_get_file($gid) {\n // Returns a files resource: https://developers.google.com/drive/v2/reference/files#resource\n global $user;\n $client = shanti_gdrive_get_client();\n $creds = shanti_gdrive_get_stored_credentials($user->uid);\n $credobj = ($creds) ? json_decode($creds) : FALSE;\n if($credobj && (!isset($credobj->revoked) || $credobj->revoked != TRUE)) {\n $client->setAccessToken($creds);\n $driveService = new Google_Service_Drive($client);\n if(strpos($gid, '?key=') > -1) {\n $pts = explode('?key=', $gid);\n if(isset($pts[1])) {\n $gid = $pts[1];\n if(preg_match('/([^\\&\\#]+)[\\&\\#]/', $gid, $matches)) {\n $gid = $matches[1];\n }\n }\n }\n try { \n $file = $driveService->files->get($gid);\n return $file;\n } catch (Google_Service_Exception $gse) {\n return FALSE;\n }\n }\n}", "public static function getService() {\r\n Embpicamoto_include_library();\r\n require_once 'Zend/Loader.php';\r\n \r\n Zend_Loader::loadClass('Zend_Gdata_ClientLogin');\r\n Zend_Loader::loadClass('Zend_Gdata_Photos');\r\n \r\n $gauth = Embpicamoto_Oauth_Google_Manager::singleton();\r\n\r\n $client = null; #Should cause an interesting exception if neither works\r\n if ($gauth->has_access_token()) { \r\n $client = $gauth->getAccessToken()->getHttpClient($gauth->getConfig());\r\n } else {\r\n \r\n $login_val = Embpicamoto_Settings_Helper::getLogin();\r\n $pass_val = Embpicamoto_Settings_Helper::getPassword();\r\n $client = Zend_Gdata_ClientLogin::getHttpClient($login_val, $pass_val, Zend_Gdata_Photos::AUTH_SERVICE_NAME);\r\n }\r\n\r\n $service = new Zend_Gdata_Photos($client);\r\n\r\n return $service;\r\n }", "public function initDriveService()\n {\n $this->service = new \\Google_Service_Drive($this->client);\n }", "public function getGsAPI()\n\t{\n\t\tif (!isset($this->gsapi))\n\t\t{\n\t\t\t$this->gsapi = new gsAPI(GSAPI_KEY, GSAPI_SECRET);\n\t\t}\n\t\treturn $this->gsapi;\n\t}", "public function get_client() {\n\t\tif ( ! $this->google_client instanceof Google_Site_Kit_Client ) {\n\t\t\t$this->google_client = $this->setup_client();\n\t\t}\n\n\t\treturn $this->google_client;\n\t}", "protected function getDiskInstance()\n {\n return Storage::disk($this->config['disk']);\n }", "public function getOAUTHInstance()\n {\n if (!is_object($this->oauth)) {\n $this->oauth = new PHPMailerOAuthGoogle(\n $this->oauthUserEmail,\n $this->oauthClientSecret,\n $this->oauthClientId,\n $this->oauthRefreshToken\n );\n }\n return $this->oauth;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create and persist a new DMCA notice.
public function createNotice(Request $request) { $data = session()->get('dmca'); $notice = Notice::open($data)->useTemplate($request->template); $notice = Auth::user()->notices()->save($notice); return $notice; }
[ "private function createNotice(Request $request)\n {\n $data = session()->get('dmca'); \n\n $notice = Notice::open($data)->useTemplate($request->input('template'));\n\n $notice = \\Auth::user()->notices()->save($notice);\n\n return $notice;\n\n }", "public function saving(Notice $notice)\n {\n // Cannot put in creating, because saving is fired before creating. And we need company id for check bellow\n if (company()) {\n $notice->company_id = company()->id;\n }\n }", "public function store(NoticeRequest $request)\n {\n $notice = new Notice($request->all());\n\n $notice->save();\n }", "public function creating(notices $notices)\n {\n //code...\n }", "public function create()\n {\n $this->sesClient->verifyDomainIdentity(\n [\n 'Domain' => $this->identity->getIdentity(),\n ]\n );\n }", "public function store(Request $request)\n {\n\n if (! Gate::allows('notice_create')) {\n return abort(401);\n }\n $request->validate([\n 'title'=>'required',\n 'description'=> 'required',\n 'user_type' => 'required',\n 'from_date' =>'required|date',\n 'to_date' =>'required|date'\n ]);\n\n $notice = new Notice([\n 'user_id' => Auth::user()->id,\n 'title'=> $request->post('title'),\n 'description'=> $request->post('description'),\n 'user_type'=> $request->post('user_type'),\n 'from_date'=>$request->post('from_date'),\n 'to_date'=> $request->post('to_date')\n ]);\n \n $notice->save();\n\n return redirect()->route('notice.index');\n }", "public function embargo_expiration_notice() {\n $this->mods->addNote(\"sent \" . date(\"Y-m-d\"), \"admin\", \"embargo_expiration_notice\");\n // log the event in the record history\n $this->premis->addEvent(\"notice\",\n \"Embargo Expiration 60-Day Notification sent by ETD system\",\n \"success\", array(\"software\", \"etd system\"));\n }", "private function newAccountNotification() {\n $this->setCommonAccountFields($this->accountData);\n $this->saveAccountData();\n }", "public function create_announcement() {\n\t\t$this->set_info($_REQUEST, true);\n\t\t$this->insert_data();\n\t\t$this->insert_anno_subtype();\n\t\t$this->redirect();\n\t}", "public function created(Claim $claim)\n {\n //\n }", "public function create(NoteEntity $note);", "public function saveNew(&$notice_attachment)\n\t{\n\t\t$db_connection = get_db_connection();\n\t\t$sucess = true;\n\t\t$notice_id = $notice_attachment->get_notice_id();\n\t\t$filename = $notice_attachment->get_filename();\n\t\t$filepath = $notice_attachment->get_filepath();\n\t\t$table = $this->getTableName();\n\t\t\n\t\t// The notice_attachment_id will be auto-generated.\n\t\t$query = \"insert into $table (notice_id, filename, filepath) \n\t\t\t\tvalues('$notice_id', '$filename', '$filepath')\";\n\t\t$result = mysqli_query($db_connection, $query);\n\n\t\tif(!$result)\n\t\t{\n\t\t\t$sucess = false;\n\t\t\techo '<p>' . mysqli_error($db_connection) . '</p>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// get the newly generated notice_attachment_id\n\t\t\t$notice_attachment_id = mysqli_insert_id($db_connection);\n\t\t\t$notice_attachment->set_notice_attachment_id($notice_attachment_id);\n\t\t}\n\n\t\tmysqli_close($db_connection);\n\t\treturn $sucess;\n\t\t\n\t}", "protected function add_notice( $msg ) {\n\t\t$this->notice = $msg;\n\t}", "private function log()\n {\n /*\n * Commented out due to lack of DB\n try {\n \\Ad\\System\\Mail::create(array(\n 'customer_id' => $this->customer_id,\n 'reference' => $this->reference,\n 'to_email' => $this->to_email,\n 'to_name' => $this->to_name,\n 'from_email' => $this->from_email,\n 'subject' => $this->_mailer->Subject,\n 'body' => $this->_mailer->Body,\n 'token' => $this->token,\n 'status' => 'sent',\n 'created_by' => \\Forge\\Auth::user()->user_id\n //'created_by' => 1\n ));\n } catch (\\Exception $e) {\n // ?\n }\n */\n }", "function gotravel_mikado_add_admin_notice($attributes) {\n\t\t$title = '';\n\t\t$description = '';\n\t\t$notice = '';\n\t\t$hidden_property = '';\n\t\t$hidden_value = '';\n\t\t$hidden_values = array();\n\t\t$parent = '';\n\t\t$name = '';\n\n\t\textract($attributes);\n\n\t\tif(is_object($parent) && !empty($title) && !empty($notice) && !empty($name)) {\n\t\t\t$notice_object = new GoTravelMikadoNotice($title, $description, $notice, $hidden_property, $hidden_value, $hidden_values);\n\t\t\t$parent->addChild($name, $notice_object);\n\n\t\t\treturn $notice_object;\n\t\t}\n\n\t\treturn false;\n\t}", "public static function register_notice()\n {\n $data = array(\n 'notice_type' => 'Notice Type' // error, updated, update-nag\n ,'notice_id' => 'Notice ID'\n ,'capability' => 'Capability'\n ,'role' => 'Role'\n ,'page' => 'Page'\n ,'dismiss' => 'Dismiss'\n ,'id' => 'ID'\n ,'slug' => 'Slug'\n );\n\n piklist::process_parts('notices', $data, array('piklist_notice', 'register_notice_callback'));\n }", "public function set_sdn_notice($response)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $file = new File(self::FILE_SDN_NOTICE);\n\n if ((int)$response['code'] == 0) {\n if ($file->exists())\n $file->delete();\n } else if ((int)$response['code'] >= 1000) {\n if (!$file->exists())\n $file->create('webconfig', 'webconfig', '0640');\n $file->add_lines(json_encode($response) . \"\\n\");\n }\n } catch (Exception $e) {\n // Ignore?\n }\n }", "function ncn_capsulecrm_note_add_note($claim_id, $note) {\nglobal $user;\n\n $claim = get_claim_data($claim_id);\n if ($claim && $claim['user_id'] && $account=user_load($claim['user_id'])) {\n $member_id = isset($account->profile_memberid)?$account->profile_memberid:0;\n if ($member_id && $cc_info=ncn_capsulecrm_get_map_info($member_id)) {\n if ($cc_info['organization_id']) {\n $entry = array();\n $entry['party'] = (object)(array('id'=>(int)$cc_info['organization_id']));\n $entry['type'] = 'note';\n $entry['content'] = \"[claim #$claim_id] - \".$note;\n // $capsulecrm_account = ncn_capsulecrm_account_get_account($user);\n // if ($capsulecrm_account) {\n // $data['creator'] = $capsulecrm_account;\n // }\n $entry = (object)$entry;\n \n $response = capsule_add_entry( (object)(array('entry'=>$entry)) );\n if ($response->code != 201) { \n drupal_set_message(t('Capsule CRM Error: Failed to add an NOTE into Capsule CRM'), 'error');\n return 0; \n }\n $entry_id = $response->entry->id;\n if (is_numeric($entry_id)) {\n watchdog('ncn-capsulecrm', \"Add Note: https://pherona.capsulecrm.com/party/\".$cc_info['organization_id'].\"/history/$entry_id\");\n return $entry_id;\n }\n }\n }\n }\n return 0;\n}", "public function add_notice( $args ) {\n if (empty($args)) return;\n \n if (is_string( $args ) && ! strstr($args, 'content=')) $args = array('content' => $args); // $this->add_notice('instant content!');\n \n $args = wp_parse_args( $args, $this->notice_defaults );\n \n if (empty($args['content'])) return;\n \n $id = ( empty( $args['id'] ) ? md5($args['content']) : $args['id'] );\n unset( $args['id'] );\n \n if ($args['sticky']) {\n if (!empty($args['overwrite']) || (empty($args['overwrite']) && empty($this->sticky_notices[$id]))) {\n $this->sticky_notices[$id] = $args;\n $this->update_notices();\n }\n } else {\n $this->notices[$id] = $args;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add 'woocommerceactive' class to the body tag.
function wildkidzz_woocommerce_active_body_class($classes) { $classes[] = 'woocommerce-active'; return $classes; }
[ "function zakra_woocommerce_active_body_class( $classes ) {\r\n\t$classes[] = 'woocommerce-active';\r\n\r\n\treturn $classes;\r\n}", "function shoper_woocommerce_active_body_class( $classes ) {\n\t$classes[] = 'woocommerce-active';\n\n\treturn $classes;\n}", "function parlo_woocommerce_active_body_class( $classes ) {\n\t$classes[] = 'woocommerce-active';\n\n\treturn $classes;\n}", "function woocommerce_active_body_class( $classes ) {\n\t$classes[] = 'woocommerce-active';\n\n\treturn $classes;\n}", "function fastshop_woocommerce_body_class( $classes ) {\n\tif ( is_woocommerce_activated() ) {\n\t\t$classes[] = 'woocommerce-active';\n\t}\n\n\treturn $classes;\n}", "function storefront_woocommerce_body_class( $classes ) {\n\tif ( is_woocommerce_activated() ) {\n\t\t$classes[] = 'woocommerce-active';\n\t}\n\n\treturn $classes;\n}", "function newsroom_elated_woocommerce_body_class($classes) {\n if (newsroom_elated_is_woocommerce_page()) {\n $classes[] = 'eltd-woocommerce-page';\n if (is_singular('product')) {\n $classes[] = 'eltd-woocommerce-single-page';\n }\n }\n return $classes;\n }", "function variant_page_builder_body_classes($classes) {\n $classes[] = 'variant-active';\n return $classes;\n}", "public function body_class( $classes ) {\n\t\t$classes[] = 'wc-18-tags-active';\n\t\treturn $classes;\n\t}", "public static function opc_woocommerce_body_class($classes) {\n\n\t\tglobal $post;\n\n\t\tif ( empty( $post ) ) {\n\t\t\treturn $classes;\n\t\t}\n\n\t\tif ( $post->ID == self::$shortcode_page_id ) {\n\t\t\t$classes[] = 'woocommerce-page';\n\t\t}\n\n\t\treturn $classes;\n\n\t}", "public function output_body_class( $classes ) {\n\t\tglobal $wp;\n\n\t\tif ( empty( $wp->query_vars ) || !is_array( $wp->query_vars ) ) {\n\t\t\treturn $classes;\n\t\t}\n\n\t\tif (\n\t\t\tarray_key_exists( 'unsubscribe', $wp->query_vars ) ||\n\t\t\tarray_key_exists( 'my-account/email-subscriptions', $wp->query_vars )\n\t\t) {\n\t\t\t$classes[] = 'woocommerce';\n\t\t\t$classes[] = 'woocommerce-page';\n\t\t}\n\n\t\treturn $classes;\n\t}", "public function output_body_class( $classes ) {\n if ( is_page( wc_get_page_id( 'warranty' ) ) ) {\n $classes[] = 'woocommerce';\n $classes[] = 'woocommerce-page';\n }\n\n return $classes;\n }", "public function sc_bodyClasses( $classes ) {\n\n global $post;\n\n if ( isset( $post->post_content ) && has_shortcode( $post->post_content , 'wwof_product_listing' ) ) {\n\n $classes [] = 'wwof-woocommerce';\n $classes [] = 'woocommerce';\n $classes [] = 'woocommerce-page';\n\n }\n\n return apply_filters( 'wwof_filter_body_classes' , $classes );\n\n }", "public function add_body_class( $classes ) {\n\t\t\t$wishlist_page_id = yith_wcwl_object_id( get_option( 'yith_wcwl_wishlist_page_id' ) );\n\n\t\t\tif ( ! empty( $wishlist_page_id ) && is_page( $wishlist_page_id ) ) {\n\t\t\t\t$classes[] = 'woocommerce-wishlist';\n\t\t\t\t$classes[] = 'woocommerce';\n\t\t\t\t$classes[] = 'woocommerce-page';\n\t\t\t}\n\n\t\t\treturn $classes;\n\t\t}", "function add_body_class( $classes ) {\n\n\t$classes[] = 'front-page';\n\treturn $classes;\n\n}", "function vmagazine_lite_woocommerce_wrapper_before() {\n\t\t\t\t$sidebar_class = '';\n\t\t \tif( is_active_sidebar( 'shop-right' ) ){\n\t\t \t\t$sidebar_class = 'sidebar-shop';\n\t\t \t}\n\t\t?>\n <div class=\"vmagazine-lite-container <?php echo esc_attr($sidebar_class)?>\">\n\t\t<div id=\"primary\" class=\"content-area\">\n\t\t\t<main id=\"main\" class=\"site-main\" role=\"main\">\n\t\t<?php\n\t}", "function thyme_add_body_class( $classes ) {\n\n\t$classes[] = 'landing-page';\n\treturn $classes;\n\n}", "function minimize_add_body_class( $classes ) {\n\t$classes[] = 'landing-page';\n\n\treturn $classes;\n}", "static function add_body_class() {\n\t\t$out = array();\n\n\t\tif ( 'boxed' === get_theme_mod( 'layout_mode', 'wide' ) ) {\n\t\t\t$out[] = 'boxed';\n\t\t}\n\n\t\tif ( 'sticky' === get_theme_mod( 'main_navigation_sticky', 'static' ) ) {\n\t\t\t$out[] = 'sticky-navigation';\n\t\t}\n\n\t\treturn implode( ' ', $out );\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show edit sandbox form
function edit(Sandbox $sandbox){ return view('newSandbox')->with('sandbox', $sandbox); }
[ "function showEditForm()\n{\n global $app;\n\n $tpl = new acmsTemplate($this->templatePath . \"edit_form.tpl\");\n $tpl->assign(\"Action\", \"edit\");\n $tpl->assign(\"ChunkID\", $this->ChunkID);\n $tpl->assign(\"ChunkName\", $this->ChunkName);\n $tpl->assign(\"Chunk\", $this->Chunk);\n $tpl->assign(\"Title\", $this->Title);\n $tpl->assign(\"Perms\", $this->Perms);\n\n $app->addBlock(10, CONTENT_ZONE, \"Edit Menu\", $tpl->get());\n}", "public static function edit_form()\n {\n $user = Users::findOne($_SESSION['user']);\n\n View::make('user/edit.html', array('user' => $user));\n }", "public function getShowEdit(){\n\t\t$data=array(\n\t\t\t\"product_id\"=>$_GET['product_id'],\n\t\t\t\"id\"=>$_GET['id'],\n\t\t\t\"key\"=>$_GET['key'],\n\t\t\t\"value\"=>$_GET['value'],\n\t\t\t\"value_type\"=>$_GET['value_type']);\n\t\t$this->setTitle('Edit Meta Data Fields');\n\t\t$this->setContent( $this->getView('shopify/editForm',$data, dirname(__DIR__)) );\n\t}", "public function edit_form()\n {\n return View::make(\"app.edit\");\n }", "protected function _getEditForm()\n {\n }", "function showEditForm()\n{\n global $app;\n\n $tpl = new acmsTemplate($this->templatePath . \"edit_form.tpl\");\n $tpl->assign(\"Action\", \"edit\");\n $tpl->assign(\"ChunkID\", $this->ChunkID);\n $tpl->assign(\"ChunkName\", $this->ChunkName);\n $tpl->assign(\"Filename\", $this->Filename);\n $tpl->assign(\"MimeType\", $this->MimeType);\n $tpl->assign(\"Perms\", $this->Perms);\n if ($this->StoreInDB) {\n $tpl->assign(\"StoreInDBChecked\", \"checked\");\n } else {\n $tpl->assign(\"StoreInDBChecked\", \"\");\n }\n // If we are editing, show them the current image.\n if ($this->ChunkID) {\n $tpl->assign(\"Chunk\", $app->parseChunk(\"^^{{\" . $this->ChunkName . \"}}^^\"));\n } else {\n $tpl->assign(\"Chunk\", \"\");\n }\n\n $app->addBlock(10, CONTENT_ZONE, \"Edit Image\", $tpl->get(\"image_edit_form\"));\n}", "protected function edit() {\n\t}", "public function editAction() {\n\n //TAB CREATION\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_viewsitestore');\n\n //GET STORE ID AND STORE OBJECT\n $store_id = $this->_getParam('id');\n $sitestore = Engine_Api::_()->getItem('sitestore_store', $store_id);\n\n //FORM GENERATION\n $this->view->form = $form = new Sitestore_Form_Admin_Manage_Edit();\n\n if (!empty($sitestore->declined)) {\n return $this->_forward('notfound', 'error', 'core');\n }\n\n $status_storeOption = array();\n $approved = $sitestore->approved;\n if (empty($sitestore->aprrove_date) && empty($approved)) {\n $status_storeOption[\"0\"] = \"Approval Pending\";\n $status_storeOption[\"1\"] = \"Approved Store\";\n $status_storeOption[\"2\"] = \"Declined Store\";\n } else {\n $status_storeOption[\"1\"] = \"Approved\";\n $status_storeOption[\"0\"] = \"Dis-Approved\";\n }\n $form->getElement(\"status_store\")->setMultiOptions($status_storeOption);\n\n if (!$this->getRequest()->isPost()) {\n\n $form->getElement(\"closed\")->setValue($sitestore->closed);\n $form->getElement(\"status_store\")->setValue($sitestore->approved);\n $form->getElement(\"featured\")->setValue($sitestore->featured);\n $form->getElement(\"sponsored\")->setValue($sitestore->sponsored);\n $title = \"<a href='\" . $this->view->url(array('store_url' => $sitestore->store_url), 'sitestore_entry_view') . \"' target='_blank'>\" . $sitestore->title . \"</a>\";\n $form->title_dummy->setDescription($title);\n if (Engine_Api::_()->sitestore()->hasPackageEnable()) {\n $form->package_title->setDescription(\"<a href='\" . $this->view->url(array('route' => 'admin_default', 'module' => 'sitestore', 'controller' => 'package', 'action' => 'packge-detail', 'id' => $sitestore->package_id), 'admin_default') . \"' class ='smoothbox'>\" . ucfirst($sitestore->getPackage()->title) . \"</a>\");\n\n $package = $sitestore->getPackage();\n if ($package->isFree()) {\n\n $form->getElement(\"status\")->setMultiOptions(array(\"free\" => \"NA (Free)\"));\n $form->getElement(\"status\")->setValue(\"free\");\n $form->getElement(\"status\")->setAttribs(array('disable' => true));\n } else {\n $form->getElement(\"status\")->setValue($sitestore->status);\n }\n }\n } elseif ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //PROCESS\n $values = $form->getValues();\n \n if(!empty ($values) && isset ($values['toggle_products_status'])){\n if(isset ($values['toggle_products_status']) && $values['toggle_products_status'] == 2){\n Engine_Api::_()->getDbtable('stores', 'sitestore')->toggleStoreProductsStatus($store_id, 1);\n }elseif(isset ($values['toggle_products_status']) && $values['toggle_products_status'] == 3){\n Engine_Api::_()->getDbtable('stores', 'sitestore')->toggleStoreProductsStatus($store_id, 0);\n }\n }\n \n if ($values['status_store'] == 2) {\n $values['declined'] = 1;\n } else {\n $approved = $values['status_store'];\n }\n $sitestore->setFromArray($values);\n if (!empty($sitestore->declined)) {\n Engine_Api::_()->sitestore()->sendMail(\"DECLINED\", $sitestore->store_id);\n }\n $sitestore->save();\n $db->commit();\n if ($approved != $sitestore->approved) {\n\n return $this->_helper->redirector->gotoRoute(array('module' => 'sitestore', 'controller' => 'admin', 'action' => 'approved', \"id\" => $store_id), \"default\", true);\n }\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }\n }", "public function edit_form(){\n\t\t?>\n\t\t<form action=\"<?php echo get_save_url($this->page) ?>\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t\t<legend>Editing</legend>\n\t\t\t\t<label for=\"text\">Content:</label><br>\n\t\t\t\t<textarea cols=\"78\" rows=\"20\" name=\"text\" id=\"text\"><?php echo $this->file->data; ?></textarea>\n\t\t\t\t<br>\n\n\t\t\t\t<input type=\"submit\" name=\"preview\" value=\"Preview\">\n\t\t\t\t<input type=\"submit\" name=\"save\" value=\"Save\">\n\t\t\t\t<input type=\"hidden\" name=\"updated\" value=\"<?php echo $this->file->time; ?>\">\n\t\t\t</fieldset>\n\t\t</form>\n\t\t<?php\n\t}", "function showSandboxButton()\n {\n if ($this->user->hasRight(Right::SANDBOXUSER)) {\n $this->out->elementStart('li', 'entity_sandbox');\n if ($this->profile->isSandboxed()) {\n $usf = new UnSandboxForm($this->out, $this->profile, $this->r2args);\n $usf->show();\n } else {\n $sf = new SandboxForm($this->out, $this->profile, $this->r2args);\n $sf->show();\n }\n $this->out->elementEnd('li');\n }\n }", "public abstract function fetchAdminEditForm();", "public function testOpenEditForm(): void\n {\n $userId = 3;\n\n $this->setPreventCommits();\n\n $authCookie = $this->getModeratorOAuthCookie();\n\n $response = $this->get(self::RESOURCES_URL . '/' . $userId, [], [], $authCookie);\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertNotContains('Create', (string)$response->getBody());\n $this->assertContains('Update', (string)$response->getBody());\n $this->assertContains('Delete', (string)$response->getBody());\n }", "public function getFormEditInversion(){\r\n Obj::run()->View->render(\"formEditInversion\");\r\n }", "function showApprentice() {\n\t\t\t\t\t$apprentice = Apprentice::find_by_name(params(0));\n\t\t\t\t\t\n\t\t\t\t\t$editForm = new h2o('views/editApprentice.html');\n\t\t\t\t\techo $editForm->render(compact('apprentice'));\n\t\t\t\t}", "public function formEditAsistenciaManual(){\r\n Obj::run()->View->render();\r\n }", "private function editForm()\n {\n $m = $this->getViewModel();\n\n $blog = $m->blog;\n\n $m->isApprover = true; // isApprover()\n\n $stylelist = BlogView::getStyleList();\n\n $id = $blog->id;\n \n \n if ($m->revid === 0) {\n $m->revid = intval($blog->revision);\n }\n\n $m->revision = BlogRevision::findFirst('blog_id='.$id.' and revision='.$m->revid);\n \n // submit choices\n $m->rev_list = [\n 'Save' => 'Save',\n 'Revision' => 'Save as new revision',\n ];\n\n $m->title = '#' . $id;\n $m->stylelist = $stylelist;\n $m->catset = BlogView::getCategorySet($id);\n $m->events = BlogView::getEvents($id);\n $m->metatags = BlogView::getMetaTags($id);\n $m->content = $m->url = $this->url;\n\n return $this->render('blog', 'edit');\n }", "public function editAction();", "public function edit() {\n\n\t\tif ($this->authenticated===false) {\n\t\t\t$this->index();\n\t\t} else {\n\n\t\t\t// Get model type and id\n\t\t\t$this->requestParser();\n\n\t\t\t// Create the helper\n\t\t\t$viewHelper = new View_Admin_Helper($this->model, $this->id);\n\n\t\t\t// Set notice to View if available\n\t\t\t$message = isset($this->message) ? $viewHelper->notice($this->message) : null;\t\t\n\n\t\t\t// Setup the editor View\n\t\t\t$this->data['view'] = $viewHelper->editView();\n\t\t}\n\t}", "function showEditForm( $formCallback=null ) {\n\t\tglobal $wgOut, $wgUser, $wgLang, $wgContLang, $wgMaxArticleSize, $wgTitle, $wgRequest;\n\n\t\t# If $wgTitle is null, that means we're in API mode.\n\t\t# Some hook probably called this function without checking\n\t\t# for is_null($wgTitle) first. Bail out right here so we don't\n\t\t# do lots of work just to discard it right after.\n\t\tif (is_null($wgTitle))\n\t\t\treturn;\n\n\t\t$fname = 'EditPage::showEditForm';\n\t\twfProfileIn( $fname );\n\n\t\t$sk = $wgUser->getSkin();\n\n\t\twfRunHooks( 'EditPage::showEditForm:initial', array( &$this ) ) ;\n\n\t\t#need to parse the preview early so that we know which templates are used,\n\t\t#otherwise users with \"show preview after edit box\" will get a blank list\n\t\t#we parse this near the beginning so that setHeaders can do the title\n\t\t#setting work instead of leaving it in getPreviewText\n\t\t$previewOutput = '';\n\t\tif ( $this->formtype == 'preview' ) {\n\t\t\t$previewOutput = $this->getPreviewText();\n\t\t}\n\n\t\t$this->setHeaders();\n\n\t\t# Enabled article-related sidebar, toplinks, etc.\n\t\t$wgOut->setArticleRelated( true );\n\n\t\tif ( $this->isConflict ) {\n\t\t\t$wgOut->wrapWikiMsg( \"<div class='mw-explainconflict'>\\n$1</div>\", 'explainconflict' );\n\n\t\t\t$this->textbox2 = $this->textbox1;\n\t\t\t$this->textbox1 = $this->getContent();\n\t\t\t$this->edittime = $this->mArticle->getTimestamp();\n\n\t\t\t# MeanEditor: too complicated for visual editing\n\t\t\t$this->noVisualEditor = false;\n\t\t} else {\n\t\t\tif ( $this->section != '' && $this->section != 'new' ) {\n\t\t\t\t$matches = array();\n\t\t\t\tif ( !$this->summary && !$this->preview && !$this->diff ) {\n\t\t\t\t\tpreg_match( \"/^(=+)(.+)\\\\1/mi\", $this->textbox1, $matches );\n\t\t\t\t\tif ( !empty( $matches[2] ) ) {\n\t\t\t\t\t\tglobal $wgParser;\n\t\t\t\t\t\t$this->summary = \"/* \" .\n\t\t\t\t\t\t\t$wgParser->stripSectionName(trim($matches[2])) .\n\t\t\t\t\t\t\t\" */ \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $this->missingComment ) {\n\t\t\t\t$wgOut->wrapWikiMsg( '<div id=\"mw-missingcommenttext\">$1</div>', 'missingcommenttext' );\n\t\t\t}\n\n\t\t\tif ( $this->missingSummary && $this->section != 'new' ) {\n\t\t\t\t$wgOut->wrapWikiMsg( '<div id=\"mw-missingsummary\">$1</div>', 'missingsummary' );\n\t\t\t}\n\n\t\t\tif ( $this->missingSummary && $this->section == 'new' ) {\n\t\t\t\t$wgOut->wrapWikiMsg( '<div id=\"mw-missingcommentheader\">$1</div>', 'missingcommentheader' );\n\t\t\t}\n\n\t\t\tif ( $this->hookError !== '' ) {\n\t\t\t\t$wgOut->addWikiText( $this->hookError );\n\t\t\t}\n\n\t\t\tif ( !$this->checkUnicodeCompliantBrowser() ) {\n\t\t\t\t$wgOut->addWikiMsg( 'nonunicodebrowser' );\n\t\t\t}\n\t\t\tif ( isset( $this->mArticle ) && isset( $this->mArticle->mRevision ) ) {\n\t\t\t// Let sysop know that this will make private content public if saved\n\n\t\t\t\tif ( !$this->mArticle->mRevision->userCan( Revision::DELETED_TEXT ) ) {\n\t\t\t\t\t$wgOut->wrapWikiMsg( \"<div class='mw-warning plainlinks'>\\n$1</div>\\n\", 'rev-deleted-text-permission' );\n\t\t\t\t} else if ( $this->mArticle->mRevision->isDeleted( Revision::DELETED_TEXT ) ) {\n\t\t\t\t\t$wgOut->wrapWikiMsg( \"<div class='mw-warning plainlinks'>\\n$1</div>\\n\", 'rev-deleted-text-view' );\n\t\t\t\t}\n\n\t\t\t\tif ( !$this->mArticle->mRevision->isCurrent() ) {\n\t\t\t\t\t$this->mArticle->setOldSubtitle( $this->mArticle->mRevision->getId() );\n\t\t\t\t\t$wgOut->addWikiMsg( 'editingold' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( wfReadOnly() ) {\n\t\t\t$wgOut->wrapWikiMsg( \"<div id=\\\"mw-read-only-warning\\\">\\n$1\\n</div>\", array( 'readonlywarning', wfReadOnlyReason() ) );\n\t\t\t# MeanEditor: visual editing makes no sense here\n\t\t\t$this->noVisualEditor = true;\n\t\t} elseif ( $wgUser->isAnon() && $this->formtype != 'preview' ) {\n\t\t\t$wgOut->wrapWikiMsg( '<div id=\"mw-anon-edit-warning\">$1</div>', 'anoneditwarning' );\n\t\t} else {\n\t\t\tif ( $this->isCssJsSubpage ) {\n\t\t\t\t# Check the skin exists\n\t\t\t\tif ( $this->isValidCssJsSubpage ) {\n\t\t\t\t\tif ( $this->formtype !== 'preview' ) {\n\t\t\t\t\t\t$wgOut->addWikiMsg( 'usercssjsyoucanpreview' );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$wgOut->addWikiMsg( 'userinvalidcssjstitle', $wgTitle->getSkinFromCssJsSubpage() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$classes = array(); // Textarea CSS\n\t\tif ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {\n\t\t} elseif ( $this->mTitle->isProtected( 'edit' ) ) {\n\t\t\t# Is the title semi-protected?\n\t\t\tif ( $this->mTitle->isSemiProtected() ) {\n\t\t\t\t$noticeMsg = 'semiprotectedpagewarning';\n\t\t\t\t$classes[] = 'mw-textarea-sprotected';\n\t\t\t} else {\n\t\t\t\t# Then it must be protected based on static groups (regular)\n\t\t\t\t$noticeMsg = 'protectedpagewarning';\n\t\t\t\t$classes[] = 'mw-textarea-protected';\n\t\t\t}\n\t\t\t$wgOut->addHTML( \"<div class='mw-warning-with-logexcerpt'>\\n\" );\n\t\t\t$wgOut->addWikiMsg( $noticeMsg );\n\t\t\tLogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle->getPrefixedText(), '', 1 );\n\t\t\t$wgOut->addHTML( \"</div>\\n\" );\n\t\t}\n\t\tif ( $this->mTitle->isCascadeProtected() ) {\n\t\t\t# Is this page under cascading protection from some source pages?\n\t\t\tlist($cascadeSources, /* $restrictions */) = $this->mTitle->getCascadeProtectionSources();\n\t\t\t$notice = \"<div class='mw-cascadeprotectedwarning'>$1\\n\";\n\t\t\t$cascadeSourcesCount = count( $cascadeSources );\n\t\t\tif ( $cascadeSourcesCount > 0 ) {\n\t\t\t\t# Explain, and list the titles responsible\n\t\t\t\tforeach( $cascadeSources as $page ) {\n\t\t\t\t\t$notice .= '* [[:' . $page->getPrefixedText() . \"]]\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$notice .= '</div>';\n\t\t\t$wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', $cascadeSourcesCount ) );\n\t\t}\n\t\tif ( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) ) {\n\t\t\t$wgOut->wrapWikiMsg( '<div class=\"mw-titleprotectedwarning\">$1</div>', 'titleprotectedwarning' );\n\t\t}\n\n\t\tif ( $this->kblength === false ) {\n\t\t\t# MeanEditor: the length will probably be different in HTML\n\t\t\t$this->kblength = (int)(strlen( $this->textbox1 ) / 1024);\n\t\t}\n\t\tif ( $this->tooBig || $this->kblength > $wgMaxArticleSize ) {\n\t\t\t$wgOut->addHTML( \"<div class='error' id='mw-edit-longpageerror'>\\n\" );\n\t\t\t$wgOut->addWikiMsg( 'longpageerror', $wgLang->formatNum( $this->kblength ), $wgLang->formatNum( $wgMaxArticleSize ) );\n\t\t\t$wgOut->addHTML( \"</div>\\n\" );\n\t\t} elseif ( $this->kblength > 29 ) {\n\t\t\t$wgOut->addHTML( \"<div id='mw-edit-longpagewarning'>\\n\" );\n\t\t\t$wgOut->addWikiMsg( 'longpagewarning', $wgLang->formatNum( $this->kblength ) );\n\t\t\t$wgOut->addHTML( \"</div>\\n\" );\n\t\t}\n\n\t\t$q = 'action='.$this->action;\n\t\t#if ( \"no\" == $redirect ) { $q .= \"&redirect=no\"; }\n\t\t$action = $wgTitle->escapeLocalURL( $q );\n\n\t\t$summary = wfMsg( 'summary' );\n\t\t$subject = wfMsg( 'subject' );\n\n\t\t$cancel = $sk->makeKnownLink( $wgTitle->getPrefixedText(),\n\t\t\t\twfMsgExt('cancel', array('parseinline')) );\n\t\t$separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' );\n\t\t$edithelpurl = Skin::makeInternalOrExternalUrl( wfMsgForContent( 'edithelppage' ));\n\t\t$edithelp = '<a target=\"helpwindow\" href=\"'.$edithelpurl.'\">'.\n\t\t\thtmlspecialchars( wfMsg( 'edithelp' ) ).'</a> '.\n\t\t\thtmlspecialchars( wfMsg( 'newwindow' ) );\n\n\t\tglobal $wgRightsText;\n\t\tif ( $wgRightsText ) {\n\t\t\t$copywarnMsg = array( 'copyrightwarning',\n\t\t\t\t'[[' . wfMsgForContent( 'copyrightpage' ) . ']]',\n\t\t\t\t$wgRightsText );\n\t\t} else {\n\t\t\t$copywarnMsg = array( 'copyrightwarning2',\n\t\t\t\t'[[' . wfMsgForContent( 'copyrightpage' ) . ']]' );\n\t\t}\n\n\t\t/* MeanEditor: always disable the toolbar */\n\t\tif ( $wgUser->getOption('showtoolbar') and !$this->isCssJsSubpage ) {\n\t\t\t# prepare toolbar for edit buttons\n\t\t\t$toolbar = '';\n\t\t} else {\n\t\t\t$toolbar = '';\n\t\t}\n\n\t\t// activate checkboxes if user wants them to be always active\n\t\tif ( !$this->preview && !$this->diff ) {\n\t\t\t# Sort out the \"watch\" checkbox\n\t\t\tif ( $wgUser->getOption( 'watchdefault' ) ) {\n\t\t\t\t# Watch all edits\n\t\t\t\t$this->watchthis = true;\n\t\t\t} elseif ( $wgUser->getOption( 'watchcreations' ) && !$this->mTitle->exists() ) {\n\t\t\t\t# Watch creations\n\t\t\t\t$this->watchthis = true;\n\t\t\t} elseif ( $this->mTitle->userIsWatching() ) {\n\t\t\t\t# Already watched\n\t\t\t\t$this->watchthis = true;\n\t\t\t}\n\t\t\t\n\t\t\t# May be overriden by request parameters\n\t\t\tif( $wgRequest->getBool( 'watchthis' ) ) {\n\t\t\t\t$this->watchthis = true;\n\t\t\t}\n\n\t\t\tif ( $wgUser->getOption( 'minordefault' ) ) $this->minoredit = true;\n\n\t\t\t# MeanEditor: User preference\n\t\t\tif( $wgUser->getOption( 'prefer_traditional_editor' ) ) $this->userWantsTraditionalEditor = true;\n\t\t}\n\n\t\t$wgOut->addHTML( $this->editFormPageTop );\n\n\t\tif ( $wgUser->getOption( 'previewontop' ) ) {\n\t\t\t$this->displayPreviewArea( $previewOutput, true );\n\t\t}\n\n\t\t$wgOut->addHTML( $this->editFormTextTop );\n\n\t\t# if this is a comment, show a subject line at the top, which is also the edit summary.\n\t\t# Otherwise, show a summary field at the bottom\n\t\t$summarytext = $wgContLang->recodeForEdit( $this->summary );\n\n\t\t# If a blank edit summary was previously provided, and the appropriate\n\t\t# user preference is active, pass a hidden tag as wpIgnoreBlankSummary. This will stop the\n\t\t# user being bounced back more than once in the event that a summary\n\t\t# is not required.\n\t\t#####\n\t\t# For a bit more sophisticated detection of blank summaries, hash the\n\t\t# automatic one and pass that in the hidden field wpAutoSummary.\n\t\t$summaryhiddens = '';\n\t\tif ( $this->missingSummary ) $summaryhiddens .= Xml::hidden( 'wpIgnoreBlankSummary', true );\n\t\t$autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary );\n\t\t$summaryhiddens .= Xml::hidden( 'wpAutoSummary', $autosumm );\n\t\tif ( $this->section == 'new' ) {\n\t\t\t$commentsubject = '';\n\t\t\tif ( !$wgRequest->getBool( 'nosummary' ) ) {\n\t\t\t\t# Add a class if 'missingsummary' is triggered to allow styling of the summary line\n\t\t\t\t$summaryClass = $this->missingSummary ? 'mw-summarymissed' : 'mw-summary';\n\n\t\t\t\t$commentsubject =\n\t\t\t\t\tXml::tags( 'label', array( 'for' => 'wpSummary' ), $subject );\n\t\t\t\t$commentsubject =\n\t\t\t\t\tXml::tags( 'span', array( 'class' => $summaryClass, 'id' => \"wpSummaryLabel\" ),\n\t\t\t\t\t\t$commentsubject );\n\t\t\t\t$commentsubject .= '&nbsp;';\n\t\t\t\t$commentsubject .= Xml::input( 'wpSummary',\n\t\t\t\t\t\t\t\t\t60,\n\t\t\t\t\t\t\t\t\t$summarytext,\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'id' => 'wpSummary',\n\t\t\t\t\t\t\t\t\t\t'maxlength' => '200',\n\t\t\t\t\t\t\t\t\t\t'tabindex' => '1'\n\t\t\t\t\t\t\t\t\t) );\n\t\t\t}\n\t\t\t$editsummary = \"<div class='editOptions'>\\n\";\n\t\t\tglobal $wgParser;\n\t\t\t$formattedSummary = wfMsgForContent( 'newsectionsummary', $wgParser->stripSectionName( $this->summary ) );\n\t\t\t$subjectpreview = $summarytext && $this->preview ? \"<div class=\\\"mw-summary-preview\\\">\". wfMsg('subject-preview') . $sk->commentBlock( $formattedSummary, $this->mTitle, true ).\"</div>\\n\" : '';\n\t\t\t$summarypreview = '';\n\t\t} else {\n\t\t\t$commentsubject = '';\n\n\t\t\t# Add a class if 'missingsummary' is triggered to allow styling of the summary line\n\t\t\t$summaryClass = $this->missingSummary ? 'mw-summarymissed' : 'mw-summary';\n\n\t\t\t$editsummary = Xml::tags( 'label', array( 'for' => 'wpSummary' ), $summary );\n\t\t\t$editsummary = Xml::tags( 'span', array( 'class' => $summaryClass, 'id' => \"wpSummaryLabel\" ),\n\t\t\t\t\t$editsummary ) . ' ';\n\n\t\t\t$editsummary .= Xml::input( 'wpSummary',\n\t\t\t\t60,\n\t\t\t\t$summarytext,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => 'wpSummary',\n\t\t\t\t\t'maxlength' => '200',\n\t\t\t\t\t'tabindex' => '1'\n\t\t\t\t) );\n\t\t\t\n\t\t\t// No idea where this is closed.\n\t\t\t$editsummary = Xml::openElement( 'div', array( 'class' => 'editOptions' ) )\n\t\t\t\t\t\t\t. $editsummary . '<br/>';\n\t\t\t\t\n\t\t\t$summarypreview = '';\n\t\t\tif ( $summarytext && $this->preview ) {\n\t\t\t\t$summarypreview =\n\t\t\t\t\tXml::tags( 'div',\n\t\t\t\t\t\tarray( 'class' => 'mw-summary-preview' ),\n\t\t\t\t\t\twfMsg( 'summary-preview' ) .\n\t\t\t\t\t\t\t$sk->commentBlock( $this->summary, $this->mTitle )\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t$subjectpreview = '';\n\t\t}\n\t\t$commentsubject .= $summaryhiddens;\n\n\n\t\t# Set focus to the edit box on load, except on preview or diff, where it would interfere with the display\n\t\tif ( !$this->preview && !$this->diff ) {\n\t\t\t$wgOut->setOnloadHandler( 'document.editform.wpTextbox1.focus()' );\n\t\t}\n\t\t$templates = $this->getTemplates();\n\t\t$formattedtemplates = $sk->formatTemplates( $templates, $this->preview, $this->section != '');\n\n\t\t$hiddencats = $this->mArticle->getHiddenCategories();\n\t\t$formattedhiddencats = $sk->formatHiddenCategories( $hiddencats );\n\n\t\tglobal $wgUseMetadataEdit ;\n\t\tif ( $wgUseMetadataEdit ) {\n\t\t\t$metadata = $this->mMetaData ;\n\t\t\t$metadata = htmlspecialchars( $wgContLang->recodeForEdit( $metadata ) ) ;\n\t\t\t$top = wfMsgWikiHtml( 'metadata_help' );\n\t\t\t/* ToDo: Replace with clean code */\n\t\t\t$ew = $wgUser->getOption( 'editwidth' );\n\t\t\tif ( $ew ) $ew = \" style=\\\"width:100%\\\"\";\n\t\t\telse $ew = '';\n\t\t\t$cols = $wgUser->getIntOption( 'cols' );\n\t\t\t/* /ToDo */\n\t\t\t$metadata = $top . \"<textarea name='metadata' rows='3' cols='{$cols}'{$ew}>{$metadata}</textarea>\" ;\n\t\t}\n\t\telse $metadata = \"\" ;\n\n\t\t$recreate = '';\n\t\tif ( $this->wasDeletedSinceLastEdit() ) {\n\t\t\tif ( 'save' != $this->formtype ) {\n\t\t\t\t$wgOut->wrapWikiMsg(\n\t\t\t\t\t\"<div class='error mw-deleted-while-editing'>\\n$1</div>\",\n\t\t\t\t\t'deletedwhileediting' );\n\t\t\t} else {\n\t\t\t\t// Hide the toolbar and edit area, user can click preview to get it back\n\t\t\t\t// Add an confirmation checkbox and explanation.\n\t\t\t\t$toolbar = '';\n\t\t\t\t$recreate = '<div class=\"mw-confirm-recreate\">' .\n\t\t\t\t\t\t$wgOut->parse( wfMsg( 'confirmrecreate', $this->lastDelete->user_name , $this->lastDelete->log_comment ) ) .\n\t\t\t\t\t\tXml::checkLabel( wfMsg( 'recreate' ), 'wpRecreate', 'wpRecreate', false,\n\t\t\t\t\t\t\tarray( 'title' => $sk->titleAttrib( 'recreate' ), 'tabindex' => 1, 'id' => 'wpRecreate' )\n\t\t\t\t\t\t) . '</div>';\n\t\t\t}\n\t\t}\n\n\t\t$tabindex = 2;\n\n\t\t$checkboxes = $this->getCheckboxes( $tabindex, $sk,\n\t\t\tarray( 'minor' => $this->minoredit, 'watch' => $this->watchthis, 'want_traditional_editor' => $this->userWantsTraditionalEditor ));\n\n\t\t$checkboxhtml = implode( $checkboxes, \"\\n\" );\n\n\t\t$buttons = $this->getEditButtons( $tabindex );\n\t\t$buttonshtml = implode( $buttons, \"\\n\" );\n\n\t\t$safemodehtml = $this->checkUnicodeCompliantBrowser()\n\t\t\t? '' : Xml::hidden( 'safemode', '1' );\n\n\t\t$wgOut->addHTML( <<<END\n{$toolbar}\n<form id=\"editform\" name=\"editform\" method=\"post\" action=\"$action\" enctype=\"multipart/form-data\">\nEND\n);\n\n\t\tif ( is_callable( $formCallback ) ) {\n\t\t\tcall_user_func_array( $formCallback, array( &$wgOut ) );\n\t\t}\n\n\t\twfRunHooks( 'EditPage::showEditForm:fields', array( &$this, &$wgOut ) );\n\n\t\t// Put these up at the top to ensure they aren't lost on early form submission\n\t\t$this->showFormBeforeText();\n\n\t\t$wgOut->addHTML( <<<END\n{$recreate}\n{$commentsubject}\n{$subjectpreview}\n{$this->editFormTextBeforeContent}\nEND\n);\n\n\tif ( $this->isConflict || $this->diff ) {\n\t\t# MeanEditor: should be redundant, but let's be sure\n\t\t$this->noVisualEditor = true;\n\t}\n\t# MeanEditor: also apply htmlspecialchars? See $encodedtext\n\t$html_text = $this->safeUnicodeOutput( $this->textbox1 );\n\tif (!($this->noVisualEditor || $this->userWantsTraditionalEditor)) {\n\t\t$this->noVisualEditor = wfRunHooks('EditPage::wiki2html', array($this->mArticle, $wgUser, &$this, &$html_text));\n\t}\n\tif (!$this->noVisualEditor && !$this->userWantsTraditionalEditor) {\n\t\t$this->noVisualEditor = wfRunHooks('EditPage::showBox', array(&$this, $html_text, $rows, $cols, $ew));\n\t}\n\tif (!$this->noVisualEditor && !$this->userWantsTraditionalEditor) {\n\t\t$wgOut->addHTML(\"<input type='hidden' value=\\\"0\\\" name=\\\"wpNoVisualEditor\\\" />\\n\");\n\t} else {\n\t\t$wgOut->addHTML(\"<input type='hidden' value=\\\"1\\\" name=\\\"wpNoVisualEditor\\\" />\\n\");\n\t\t$this->showTextbox1( $classes );\n }\n\n\t\t$wgOut->wrapWikiMsg( \"<div id=\\\"editpage-copywarn\\\">\\n$1\\n</div>\", $copywarnMsg );\n\t\t$wgOut->addHTML( <<<END\n{$this->editFormTextAfterWarn}\n{$metadata}\n{$editsummary}\n{$summarypreview}\n{$checkboxhtml}\n{$safemodehtml}\nEND\n);\n\n\t\t$wgOut->addHTML(\n\"<div class='editButtons'>\n{$buttonshtml}\n\t<span class='editHelp'>{$cancel}{$separator}{$edithelp}</span>\n</div><!-- editButtons -->\n</div><!-- editOptions -->\");\n\n\t\t/**\n\t\t * To make it harder for someone to slip a user a page\n\t\t * which submits an edit form to the wiki without their\n\t\t * knowledge, a random token is associated with the login\n\t\t * session. If it's not passed back with the submission,\n\t\t * we won't save the page, or render user JavaScript and\n\t\t * CSS previews.\n\t\t *\n\t\t * For anon editors, who may not have a session, we just\n\t\t * include the constant suffix to prevent editing from\n\t\t * broken text-mangling proxies.\n\t\t */\n\t\t$token = htmlspecialchars( $wgUser->editToken() );\n\t\t$wgOut->addHTML( \"\\n<input type='hidden' value=\\\"$token\\\" name=\\\"wpEditToken\\\" />\\n\" );\n\n\t\t$this->showEditTools();\n\n\t\t$wgOut->addHTML( <<<END\n{$this->editFormTextAfterTools}\n<div class='templatesUsed'>\n{$formattedtemplates}\n</div>\n<div class='hiddencats'>\n{$formattedhiddencats}\n</div>\nEND\n);\n\n\t\tif ( $this->isConflict && wfRunHooks( 'EditPageBeforeConflictDiff', array( &$this, &$wgOut ) ) ) {\n\t\t\t$wgOut->wrapWikiMsg( '==$1==', \"yourdiff\" );\n\n\t\t\t$de = new DifferenceEngine( $this->mTitle );\n\t\t\t$de->setText( $this->textbox2, $this->textbox1 );\n\t\t\t$de->showDiff( wfMsg( \"yourtext\" ), wfMsg( \"storedversion\" ) );\n\n\t\t\t$wgOut->wrapWikiMsg( '==$1==', \"yourtext\" );\n\t\t\t$this->showTextbox2();\n\t\t}\n\t\t$wgOut->addHTML( $this->editFormTextBottom );\n\t\t$wgOut->addHTML( \"</form>\\n\" );\n\t\tif ( !$wgUser->getOption( 'previewontop' ) ) {\n\t\t\t$this->displayPreviewArea( $previewOutput, false );\n\t\t}\n\n\t\twfProfileOut( $fname );\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called to order the collection It will receive the wrappers and MUST return the wrappers. They are resolved after ordering.
abstract protected function orderCollection(array $wrappers): array;
[ "public function order()\n\t{\n\t}", "public function orderList();", "public function getMigrateOrderCollection()\n {\n $this->ordSer->migrateOrder();\n echo \"*******...Ordered Migration is successful...*********\";\n exit;\n }", "public function stdWrap_orderedStdWrapDataProvider() {}", "public function order_result( $result, Entities\\Collection $collection, $disabled_fields = false ){\n $order = $collection->get_fields_order();\n if($order) {\n $order = ( is_array($order) ) ? $order : unserialize($order);\n\n if ( is_array($result) ){\n $result_ordinate = [];\n $not_ordinate = [];\n\n foreach ( $result as $item ) {\n $id = $item->WP_Post->ID;\n $index = array_search ( $id , array_column( $order , 'id') );\n\n if( $index !== false ) {\n\n // skipping fields disabled if the arg is set\n if( $disabled_fields && !$order[$index]['enable'] ){\n continue;\n }\n\n $result_ordinate[$index] = $item;\n } else {\n $not_ordinate[] = $item;\n }\n }\n\n ksort ( $result_ordinate );\n $result_ordinate = array_merge( $result_ordinate, $not_ordinate );\n\n return $result_ordinate;\n }\n // if the result is a wp query object\n else {\n $posts = $result->posts;\n $result_ordinate = [];\n $not_ordinate = [];\n\n foreach ( $posts as $item ) {\n $id = $item->ID;\n $index = array_search ( $id , array_column( $order , 'id') );\n\n if( $index !== false ){\n $result_ordinate[$index] = $item;\n } else {\n $not_ordinate[] = $item;\n }\n }\n\n ksort ( $result_ordinate );\n $result->posts = $result_ordinate;\n $result->posts = array_merge( $result->posts, $not_ordinate );\n\n return $result;\n }\n }\n return $result;\n }", "protected function orderCollection(BaseCollection $collection)\n {\n $orderColumn = $this->request->param('_order_column');\n $orderBy = $this->request->param('_order_by');\n if ( $orderColumn && $orderBy ) {\n $collection->orderBy( $orderColumn , $orderBy );\n } elseif ( $this->defaultOrder ) {\n $collection->orderBy( $this->defaultOrder[0], $this->defaultOrder[1]);\n }\n }", "private function addSortedObjectsToContainer() {\r\n $objectsGraph = $this->dependencySorter->retrieveSortedObjectsDefinitions(); \r\n for ($i = 0; $i < count($objectsGraph); $i++) {\r\n $this->addObject($objectsGraph[$i]);\r\n };\r\n }", "private function sortCollection() {\n if(empty($this->sortby) || count($this->_collection) < 1) {\n return false;\n } else {\n if($this->sortby === 'price') {\n usort($this->_collection, array($this, \"usortByPrice\"));\n } elseif($this->sortby === 'age') {\n usort($this->_collection, array($this, \"usortByAge\"));\n } elseif($this->sortby === 'lifespan') {\n usort($this->_collection, array($this, \"usortByLifespan\"));\n } elseif($this->sortby === 'name') {\n usort($this->_collection, array($this, \"usortByName\"));\n } elseif($this->sortby === 'pet_type') {\n usort($this->_collection, array($this, \"usortByPetType\"));\n } elseif($this->sortby === 'item_type') {\n usort($this->_collection, array($this, \"usortByItemType\"));\n } elseif($this->sortby === 'color') {\n usort($this->_collection, array($this, \"usortByColor\"));\n }\n }\n }", "public function sortItems()\n {\n $all_items = $this->_items;\n\n //don't bother with sorting new items, just\n //plumk em down where they go\n $new = (isset($all_items['new'])) ? $all_items['new'] : false;\n\n $sorted = array();\n foreach ($all_items as $key => $item) {\n if (!is_object($item)) {\n //probably new array\n continue;\n }\n $sorted[$item->getProcessOrder()][] = $item;\n }\n ksort($sorted);\n $items = array();\n foreach ($sorted as $processOrder) {\n foreach ($processOrder as $item) {\n $items[$item->getId()] = $item;\n }\n }\n if ($new) {\n $items['new'] = $new;\n }\n $this->_items = $items;\n return $this;\n }", "public function getOrderCollection()\n {\n return $this->_orderFactory->create();\n }", "protected function _addCollectionSort()\n {\n $this->_collection->setOrder(\n $this->_getIdFieldName(),\n Varien_Data_Collection::SORT_ORDER_ASC\n );\n }", "private function orderResults()\r\n\t{\r\n\t\tif ($this->session->has('michaeljennings.table.'.$this->key.'.sort')) {\r\n\t\t\t$this->sortBy = $this->session->get('michaeljennings.table.'.$this->key.'.sort');\r\n\t\t\tif ($this->session->has('michaeljennings.table.'.$this->key.'.dir')) {\r\n\t\t\t\t$this->sortDir = 'desc';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (isset($this->sortBy)) {\r\n\t\t\t$this->instance->refreshOrderBy();\r\n\t\t\tif (isset($this->sortDir)) {\r\n\t\t\t\t$this->instance->orderBy($this->sortBy, $this->sortDir);\r\n\t\t\t} else {\r\n\t\t\t\t$this->instance->orderBy($this->sortBy, 'asc');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function sortCollection(?Collection $collection): void;", "function base_sort_orders() {\r\n\t\t// options\r\n\t\t//return array(2, 3, 7);\r\n\t\t//issue #989\r\n\t\treturn array(3, 7);\r\n\t\t\r\n\t}", "public function orderedMap(Closure $orderingCallback): OrderedGroup;", "private function sortByRest() {\r\n $ids = $this->getUniqRestId();\r\n foreach($this->_individual_items as $item) {\r\n $item = (object)$item;\r\n $sorted[$item->id][] = array($item->items, $item->price);\r\n }\r\n $this->_individual_items = $sorted;\r\n }", "public function orderRecords()\n {\n $this->query = \\DB::table(\\DB::raw(\"({$this->query->toSql()}) as sub\"))\n ->mergeBindings($this->query);\n\n if ($this->orderCallback) {\n call_user_func($this->orderCallback, $this->query);\n\n return;\n }\n\n foreach ($this->request->orderableColumns() as $orderable) {\n $column = $this->getColumnName($orderable[ 'column' ], true);\n// $column = $this->columns[ array_search($column, array_column($this->columns, 'name')) ][ 'name' ];\n if (isset($this->columnDef[ 'order' ][ $column ])) {\n $method = $this->columnDef[ 'order' ][ $column ][ 'method' ];\n $parameters = $this->columnDef[ 'order' ][ $column ][ 'parameters' ];\n $this->compileColumnQuery(\n $this->query, $method, $parameters, $column, $orderable[ 'direction' ]\n );\n } else {\n $this->query->orderBy($column, $orderable[ 'direction' ]);\n }\n }\n }", "public function applySortingOrder(\\Doctrine\\Common\\Collections\\Collection $collection) {\n\t\t$sorting = 0;\n\t\tforeach ($collection as $subject) {\n\t\t\tif ($subject instanceof \\OpenAgenda\\Application\\Domain\\Model\\SortableInterface) {\n\t\t\t\t$subject->setSorting(++$sorting);\n\t\t\t}\n\t\t}\n\t}", "private function sortResponses(Collection $responses): Collection\n {\n return $responses->sort(\n function ($current, $previous) {\n return ($current->order < $previous->order) ? -1 : 1;\n }\n )->reverse();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
save the spam setting blacklist and whitelist
public function saveSpam($params) { $dbh = $this->ant->dbh; $userId = $this->user->id; if(!empty($params['blacklist'])) { $sql = "delete from email_settings_spam where user_id='$userId' and value='".$dbh->Escape($params['blacklist'])."'"; $dbh->Query($sql); $sql = "insert into email_settings_spam(user_id, preference, value) values('$userId', 'blacklist_from', '".$dbh->Escape($params['blacklist'])."'); select currval('email_settings_spam_id_seq') as id;"; } else if(!empty($params['whitelist'])) { $sql = "delete from email_settings_spam where user_id='$userId' and value='".$dbh->Escape($params['whitelist'])."'"; $dbh->Query($sql); $sql = "insert into email_settings_spam(user_id, preference, value) values('$userId', 'whitelist_from', '".$dbh->Escape($params['whitelist'])."'); select currval('email_settings_spam_id_seq') as id;"; } $result = $dbh->Query($sql); if ($dbh->GetNumberRows($result)) { $id = $dbh->GetValue($result, 0, "id"); $params['spamId'] = $id; } $this->sendOutputJson($params); return true; }
[ "public function save() \n {\n Yii::$app->getModule('enterprise')->settings->set('email.whitelist', $this->whitelist);\n return true;\n }", "private function saveBan(){\n $this->tmp_list->writeTmpBanUsers($this->file);\n }", "public function addBlacklist(string $blacklist): void;", "public function saved($collectionBlacklist)\n {\n parent::saved($collectionBlacklist);\n\n Log::Debug(\"Saved collection blacklist entry\", ['collection blacklist' => $collectionBlacklist->id]);\n }", "public function saveBlackIP(){\n $ip_address = $this->input->post('ip_address', TRUE);\n if($this->Cms_model->chkBFblacklistIP($ip_address) === FALSE && !empty($ip_address)){\n $data = array(\n 'ip_address' => $ip_address,\n 'note' => $this->input->post('note', TRUE),\n );\n $this->db->set('timestamp_create', 'NOW()', FALSE);\n $this->db->insert('blacklist_ip', $data);\n $this->removeData('whitelist_ip', 'ip_address', $ip_address);\n $this->db->cache_delete_all();\n }\n }", "function saveBlacklist() {\n try {\n $blacklistPage = new Blacklist();\n $blacklistPage->saveBlacklistEntry( isset($_POST['id']) && $_POST['id'] > 0 ? $_POST['id'] : 0,\n $_POST['first_name'], $_POST['last_name'], $_POST['email'], $_POST['notes']);\n\n // saving existing entry; stay on modal dialog\n if (isset($_POST['id']) && $_POST['id'] > 0) {\n ?>\n <div style=\"color:green\">Save Successful.</div>\n <?php\n }\n else {\n // new blacklist entry; reload page\n ?>\n <script type=\"text/javascript\">\n location.reload()\n </script>\n <?php\n }\n\n }\n catch( Exception $e ) {\n ?>\n <div style=\"color:red\"><?= $e->getMessage(); ?></div>\n <?php\n }\n }", "function rssimport_add_to_blacklist($items, $rssimport){\r\n\t$blacklist = $rssimport->blacklist;\r\n\t\r\n\t// turn list into an array\r\n\t$blackarray = explode(',', $blacklist);\r\n\t\r\n\t// add new items to the existing array\r\n\t$itemcount = count($items);\r\n\tfor($i=0; $i<$itemcount; $i++){\r\n\t\t$blackarray[] = $items[$i];\r\n\t}\r\n\t\r\n\t// make sure we don't have duplicate entries\r\n\t$blackarray = array_unique($blackarray);\r\n\t$blackarray = array_values($blackarray);\r\n\t\r\n\t// reform list from array\r\n\t$blacklist = implode(',', $blackarray);\r\n\t\r\n\t$rssimport->blacklist = $blacklist;\r\n}", "public function setInSpam(): void\n {\n $this->spam = 5;\n }", "public static function blacklist(array $blacklist) : void\n {\n self::getSingleton()->blacklist = $blacklist;\n }", "function save() {\n\t\t\t//Log::debug( \"SUH saving settings: \" . print_r( self::$cache, true ) );\n\t\t\tupdate_site_option( self::SETTINGS_KEY, self::$cache );\n\t\t}", "function monsterinsights_settings_save_support() {\n\n}", "public function addBlacklist(string $blacklist): void\n {\n $this->blacklists[] = $blacklist;\n $this->blacklisted = true;\n }", "public function add_whitelist_field() {\n\t\t$whitelist = get_option( $this->setting_whitelist );\n\t\t?>\n\t\t<textarea rows=\"6\" name='<?php echo esc_attr( $this->setting_whitelist ); ?>' class='regular-text code'><?php echo esc_textarea( $whitelist );?></textarea>\n\t\t<?php\n\t}", "function access_plus_unblacklist($token){\r\n\t$blacklist = get_plugin_setting('blacklist', 'access_plus');\r\n\t$blackarray = explode(\",\", $blacklist);\r\n\t\r\n\t$blackarray = access_plus_remove_from_array($token, $blackarray);\r\n\t\r\n\t$blacklist = implode(\",\", $blackarray);\r\n\t\r\n\tset_plugin_setting('blacklist', $blacklist, 'access_plus');\r\n}", "private function set_blacklisted() {\n\t\tglobal $I2_USER;\n\t\t$this->blacklisted = $I2_USER->is_group_member('lostnfound_blacklist');\n\t}", "public function allow_save_settings($allow)\n {\n }", "public function saveSettings(){\n\n $vars = $this->getAllSubmittedVariablesByName();\n\n $vars['email'] = $this->email;\n $vars['firstname'] = $this->firstname;\n $vars['lastname'] = $this->lastname;\n $vars['real_name'] = $this->firstname .' ' .$this->lastname;\n $vars['phone'] = $this->phone;\n\n $vars['name'] = $this->firstname;\n $vars['surname'] = $this->lastname;\n $vars['screen_name'] = $this->firstname;\n\n\n $vars['about_my_artwork'] = $this->getSubmittedVariableByName('about_my_artwork');\n $vars['what_i_like_to_do'] = $this->getSubmittedVariableByName('what_i_like_to_do');\n $vars['experience'] = $this->getSubmittedVariableByName('experience');\n $vars['instructions'] = $this->getSubmittedVariableByName('instructions');\n $vars['aftercare'] = $this->getSubmittedVariableByName('aftercare');\n $vars['apprenticeship'] = $this->getSubmittedVariableByName('apprenticeship');\n\n $this->saveNamedVariables($vars);\n }", "protected function registerBlacklist()\n {\n foreach (config('system.debug_blacklist', []) as $key => $secrets) {\n foreach ($secrets as $secret) {\n $this->blacklist($key, $secret);\n }\n }\n }", "function beforeSave(&$model) {\n\t\tif ($this->_skip || !isset($this->settings[$model->alias]['is_spam'])) {\n\t\t\treturn true;\n\t\t}\n\t\t$field = $this->settings[$model->alias]['is_spam'];\n\t\tif (!$model->hasField($field)) {\n\t\t\treturn true;\n\t\t}\n\t\tif (empty($model->whitelist) || in_array($field, $model->whitelist)) {\n\t\t\t$isSpam = $this->notSpam($model, null, null);\n\t\t\tif (!is_null($isSpam)) {\n\t\t\t\t$isSpam = intval(!$isSpam);\n\t\t\t} elseif ($schema = $model->schema($field)) {\n\t\t\t\tif (empty($schema['null'])) {\n\t\t\t\t\t$isSpam = $schema['default'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$model->data[$model->alias][$field] = $isSpam;\n\t\t}\n\t\treturn true;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Count the number of users in a group
abstract public function CountUsersInGroup(int $gid) : int;
[ "public function get_group_count();", "function num_users_group($groupid) {\n global $COURSE, $DB;\n $sql = \"SELECT COUNT(u.id) as users\n FROM {groups} g\n LEFT JOIN {groups_members} gm ON gm.groupid = g.id\n LEFT JOIN {user} u ON gm.userid = u.id\n WHERE g.id = :groupid\";\n $params['groupid'] = $groupid;\n $db_return = array_values($DB->get_records_sql($sql, $params));\n return $db_return[0]->users;\n}", "function groups_count_group_members($groupid) {\n return count_records('groups_members', 'groupid ', $groupid);\n}", "public function countGroups()\n {\n $map = new Yammer_group();\n return $map->count();\n }", "public function countUsers();", "public static function getUsersCount();", "function countGroupMember(){\n\t\tApp::import('Model', 'Group');\n\t\t$this->Group = new Group();\n\n\t\t$count = $this->Group->find('all', array('fields'=>array('SUM(Group.subscribe_users) as group_member'), 'conditions'=>array('Group.status'=>'1')));\n\t\tif(!empty($count)){\n\t\t\t\t$count = $count[0][0]['group_member'];\n\t\t\t}\n\t\treturn $count;\n\t}", "public function countUser();", "function countMembers($group_key, $include_leaders=true) {\r\n\r\n\t \r\n\t\tglobal $CONN, $CONFIG;\r\n\t \r\n\t\tif ($include_leaders==true) {\r\n\t\t\r\n\t\t\t$sql = \"SELECT COUNT(user_key) FROM {$CONFIG['DB_PREFIX']}group_user_links WHERE group_key='$group_key'\";\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\t$sql = \"SELECT COUNT(user_key) FROM {$CONFIG['DB_PREFIX']}group_user_links WHERE group_key='$group_key' AND access_level_key='2'\";\t\t\r\n\t\t\r\n\t\t} \r\n\t\t \r\n\t\t$rs = $CONN->Execute($sql);\r\n\r\n\t\tif ($rs->EOF) {\r\n\t\t\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\twhile (!$rs->EOF) {\r\n\r\n\t\t\t\t$total_members = $rs->fields[0];\r\n\t\t\t\t$rs->MoveNext();\r\n\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $total_members;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$rs->Close();\r\n\t\t\r\n\t}", "public function getUserCount()\n {\n if ($this->_iUserCount === null) {\n $this->_iUserCount = 0;\n\n // load object\n $oNewsletter = oxNew(\"oxnewsletter\");\n if ($oNewsletter->load($this->getEditObjectId())) {\n // get nr. of users in these groups\n // we do not use lists here as we dont need this overhead right now\n $oDB = oxDb::getDb();\n $blSep = false;\n $sSelectGroups = \" ( oxobject2group.oxgroupsid in ( \";\n\n // remove already added groups\n foreach ($oNewsletter->getGroups() as $oInGroup) {\n if ($blSep) {\n $sSelectGroups .= \",\";\n }\n $sSelectGroups .= $oDB->quote($oInGroup->oxgroups__oxid->value);\n $blSep = true;\n }\n\n $sSelectGroups .= \" ) ) \";\n\n // no group selected\n if (!$blSep) {\n $sSelectGroups = \" oxobject2group.oxobjectid is null \";\n }\n $sShopId = $this->getConfig()->getShopID();\n $sQ = \"select count(*) from ( select oxnewssubscribed.oxemail as _icnt from oxnewssubscribed left join\n oxobject2group on oxobject2group.oxobjectid = oxnewssubscribed.oxuserid\n where ( oxobject2group.oxshopid = '{$sShopId}'\n or oxobject2group.oxshopid is null ) and {$sSelectGroups} and\n oxnewssubscribed.oxdboptin = 1 and ( not ( oxnewssubscribed.oxemailfailed = '1') )\n and (not(oxnewssubscribed.oxemailfailed = '1')) and oxnewssubscribed.oxshopid = '{$sShopId}'\n group by oxnewssubscribed.oxemail ) as _tmp\";\n\n $this->_iUserCount = $oDB->getOne($sQ, false, false);\n }\n }\n\n return $this->_iUserCount;\n }", "public function countPersonOnGroupe($grp)\r\n {\r\n /* ->createQueryBuilder('u')\r\n ->addSelect('COUNT(u)')\r\n ->where('u.groupe = :id')\r\n ->setParameter('id', $grp)\r\n ->getQuery()\r\n ->getSingleScalarResult();*/\r\n }", "public function countMyGroups()\n {\n $membership = $this->createEntity('GroupMembership');\n return $membership->countWhere(\"IdMember = {$this->getLoggedInMember()->getPKValue()} AND Status = 'In'\");\n }", "public static function verifiedUserCount();", "function getUserCountByGroupLink($groups, $criteria = null) {\n $ret = 0;\n \n $sql [] = \"\tSELECT COUNT(DISTINCT u.uid) \" . \"\tFROM \" . $this->_uHandler->db->prefix ( \"users\" ) . \" AS u\" . \"\t\nLEFT JOIN \" . $this->_mHandler->db->prefix ( \"groups_users_link\" ) . \" AS m ON m.uid = u.uid\" . \"\tWHERE 1 = '1'\";\n if (! empty ( $groups )) {\n $sql [] = \"m.groupid IN (\" . implode ( \", \", $groups ) . \")\";\n }\n if (isset ( $criteria ) && is_subclass_of ( $criteria, 'criteriaelement' )) {\n $sql [] = $criteria->render ();\n }\n $sql_string = implode ( \" AND \", array_filter ( $sql ) );\n if (! $result = $this->_uHandler->db->query ( $sql_string )) {\n return $ret;\n }\n list ( $ret ) = $this->_uHandler->db->fetchRow ( $result );\n return $ret;\n }", "function getGroupCount()\n\t{\n\t\treturn count($this->GROUPS);\n\t}", "function tsml_count_groups() {\n\treturn count(tsml_get_all_groups('publish'));\n}", "public function countUsersInGroup($gid, $search = ''): int {\n return 0;\n }", "function GetGroupCountForUser ($parentgroupid, $userid) {\n $path = REST_PATH . 'users/' . $userid . '/groups.xml';\n\n // Call Rest API\n $result = CallRestApi($path);\n\n // Read the returned XML\n $xml = simplexml_load_string($result) or die(\"Error: Cannot create object\");\n \n $count = 0;\n \n foreach ($xml->Groups->Group as $group) { \n \tif ($group->ParentGroupId == $parentgroupid) {\n \t\t$count = $count + 1;\n \t}\n }\n \n return $count;\n}", "public function count_user(){\n\t\treturn ORM::factory('user')->count_all();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the users that inherits a subject. domain is an unreferenced parameter here, may be used in other implementations.
public function getUsers($name, ...$domain);
[ "function users() {\n $ret = array();\n\n foreach($this->domains() as $d=>$domain_object) {\n foreach($domain_object->users() as $user)\n\t$ret[] = \"{$user}@{$d}\";\n }\n\n return $ret;\n }", "function getUsers($domain = null)\n {\n /* Put together the SQL statement. */\n if (is_null($domain)) {\n /* Fetch all users. */\n $binds = $this->_getUserKeyFilter();\n $sql = 'SELECT '. $this->_getTableFields('users') . ' FROM ' . $this->_params['tables']['users'] .\n $binds[0];\n $values = $binds[1];\n } else {\n /* Fetch only users for a domain. */\n $binds = $this->_getUserKeyFilter('AND');\n $sql = 'SELECT '. $this->_getTableFields('users') . ' FROM ' . $this->_params['tables']['users'] .\n ' WHERE ' . $this->_getTableField('users', 'user_name') . ' LIKE ?' . $binds[0] .\n ' ORDER BY user_name';\n array_unshift($binds[1], '%@' . $domain);\n $values = $binds[1];\n }\n\n Horde::logMessage($sql, __FILE__, __LINE__, PEAR_LOG_DEBUG);\n return $this->_db->getAll($sql, $values, DB_FETCHMODE_ASSOC);\n }", "public function getAllUsersByDomain(string $domain): array\n {\n $m = [];\n $g = $this->model['g']['g'];\n $p = $this->model['p']['p'];\n $users = [];\n $index = $this->getDomainIndex('p');\n\n $getUser = function (int $index, array $policies, string $domain, array $m): array {\n if (count($policies) == 0 || count($policies[0]) <= $index) {\n return [];\n }\n $res = [];\n foreach ($policies as $policy) {\n $ok = isset($m[$policy[0]]);\n if ($policy[$index] == $domain && !$ok) {\n $res[] = $policy[0];\n $m[$policy[0]] = [];\n }\n }\n return $res;\n };\n\n $users = array_merge($users, $getUser(2, $g->policy, $domain, $m));\n $users = array_merge($users, $getUser($index, $p->policy, $domain, $m));\n return $users;\n }", "protected function _getRelevantUsers()\n {\n $users = new ArrayCollection();\n\n foreach ($this->_getPhpEnabledDomainsAndSubdomains() as $obj) {\n if (!$users->contains($obj->getUser())) {\n $users->add($obj->getUser());\n }\n }\n\n return $users;\n }", "public function get_subscribed_users()\n {\n $relationConditions = array();\n $relationConditions[] = new EqualityCondition(\n new PropertyConditionVariable(CourseEntityRelation::class_name(), CourseEntityRelation::PROPERTY_COURSE_ID),\n new StaticConditionVariable($this->get_id()));\n $relationConditions[] = new EqualityCondition(\n new PropertyConditionVariable(\n CourseEntityRelation::class_name(),\n CourseEntityRelation::PROPERTY_ENTITY_TYPE),\n new StaticConditionVariable(CourseEntityRelation::ENTITY_TYPE_USER));\n\n return DataManager::retrieves(\n CourseEntityRelation::class_name(),\n new DataClassRetrievesParameters(new AndCondition($relationConditions)))->as_array();\n }", "public function getUsers($domain = null)\n {\n /* Put together the SQL statement. */\n if (is_null($domain)) {\n /* Fetch all users. */\n $sql = 'SELECT ' . $this->_getTableFields('users')\n . ' FROM ' . $this->_params['tables']['users'];\n $values = array();\n } else {\n /* Fetch only users for a domain. */\n $user_field = $this->_getTableField('users', 'user_name');\n $sql = 'SELECT ' . $this->_getTableFields('users')\n . ' FROM ' . $this->_params['tables']['users']\n . ' WHERE ' . $user_field . ' LIKE ?'\n . ' ORDER BY ' . $user_field;\n $values = array('%@' . $domain);\n }\n Horde::logMessage($sql, 'DEBUG');\n return $this->_db->getAll($sql, $values, DB_FETCHMODE_ASSOC);\n }", "function get_admin_users_for_domain($domain = '', $path = '')\n {\n }", "function getSubscribed() {\n\n\t\t$acl_man\t=& Docebo::user()->getAclManager();\n\t\t/*\n\t\t$group_info = $acl_man->getGroup(FALSE, '/lms/course/'.$this->id_course.'/subscribed/alluser');\n\t\t$idst_group = $group_info[ACL_INFO_IDST];\n\n\t\t$members = $acl_man->getGroupAllUser($idst_group);*/\n\t\t$members = array();\n\t\t$re_course= sql_query(\"SELECT idUser FROM \".$GLOBALS['prefix_lms'].\"_courseuser WHERE idCourse = '\".(int)$this->id_course.\"'\");\n\t\twhile(list($idu) = sql_fetch_row($re_course)) {\n\t\t\t$members[$idu] = $idu;\n\t\t}\n\t\treturn $members;\n\t}", "public function getSubdomain();", "function getAllUsers()\n {\n /* Get all users from backend. */\n $users = &$this->getUsers();\n\n /* Determine the domain for each user and plug into array by domain. */\n $users_by_domain = array();\n foreach ($users as $user) {\n $domain_name = Vilma::stripDomain($user['user_name']);\n $users_by_domain[$domain_name][] = $user;\n }\n\n /* Sort by domain. */\n ksort($users_by_domain);\n /* Sort each domain's users by user name. */\n require_once 'Horde/Array.php';\n foreach ($users_by_domain as $key => $val) {\n Horde_Array::arraySort($users_by_domain[$key], 'user_name');\n }\n\n return $users_by_domain;\n }", "public function getUnsubscribedUsers()\n {\n \t$criteria = Criteria::create()->where(Criteria::expr()->eq(\"status\", 2));\n \treturn $this->subsribers_connection->matching($criteria);\n }", "public function getAccountsWithUsers();", "public function getUsers() {\r\n\t\treturn $this->{\"site.relations.user\"}->test(\"groups\", $this->flag, \"&\");\r\n\t}", "function oa_core_get_inherited_users_for_space($space_id, $state = OG_STATE_ACTIVE) {\n $users = oa_core_get_users_for_space($space_id, $state);\n\n if (module_exists('og_subgroups') && function_exists('_og_subgroups_get_inherited_users')) {\n $inherited_users = _og_subgroups_get_inherited_users('node', $space_id);\n foreach ($inherited_users as $uid => $data) {\n foreach ($data as $item) {\n if ($item['membership']->state == $state) {\n $users[$uid] = $item['user'];\n }\n }\n }\n }\n\n return $users;\n}", "public function get_user_domain();", "public function userDomainList()\n {\n $domain_ids = DomainDetail::where('user_id', request('user_id'))->pluck('domain_id');\n\n // get all domains set only to that user\n $domains = Domain::whereIn('id', $domain_ids)->get();\n\n return $domains;\n }", "public function getSuperusers()\n\t{\n\t\t$assignments = $this->_authManager->getAssignmentsByItemName( Rights::module()->superuserName );\n\n\t\t$userIdList = array();\n\t\tforeach( $assignments as $userId=>$assignment )\n\t\t\t$userIdList[] = $userId;\n\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->addInCondition(Rights::module()->userIdColumn, $userIdList);\n\n\t\t$userClass = Rights::module()->userClass;\n\t\t$users = CActiveRecord::model($userClass)->findAll($criteria);\n\t\t$users = $this->attachUserBehavior($users);\n\n\t\t$superusers = array();\n\t\tforeach( $users as $user )\n\t\t\t$superusers[] = $user->name;\n\n\t\t// Make sure that we have superusers, otherwise we would allow full access to Rights\n\t\t// if there for some reason is not any superusers.\n\t\tif( $superusers===array() )\n\t\t\tthrow new CHttpException(403, Rights::t('core', 'There must be at least one superuser!'));\n\n\t\treturn $superusers;\n\t}", "public function getSupersInGoal() {\n\t\t$ret = new ArrayCollection();\n\t\tforeach ($this->roles as $role)\n\t\t\tif ($role->getRole() == UserInGoal::ROLE_SUPER)\n\t\t\t\t$ret->add($role);\n\t\treturn $ret;\n\t}", "public function getMyNoticesUsers()\n {\n\t\t// Get my related departments\n\t\t$related_departments = [];\n\n $c_related = $this->getRelatedDepartments();\n\n if (!$c_related) return [];\n\n foreach ($c_related as $rel){\n\t\t\t$related_departments [] = $rel->id;\n\t\t}\n\n\n\t\t/*\n\t\t *\tGet related Departamental users from my related departments\n\t\t *\n\t\t * Conditions:\n\t\t * - agent ticketit_department in related_departments\n\t\t * - agent person in related_departments\n\t\t*/\n\t\t$related_users = \\PanicHDMember::where('id','!=',$this->id)\n\t\t\t->whereIn('ticketit_department', $related_departments);\n\n\t\t// Get users that are visible by all departments\n\t\t$all_dept_users = \\PanicHDMember::where('ticketit_department','0');\n\n\t\tif (version_compare(app()->version(), '5.3.0', '>=')) {\n\t\t\t$related_users = $related_users->pluck('id')->toArray();\n\t\t\t$related_users = array_unique(array_merge($related_users, $all_dept_users->pluck('id')->toArray()));\n\t\t}else{\n\t\t\t$related_users = $related_users->lists('id')->toArray();\n\t\t\t$related_users = array_unique(array_merge($related_users, $all_dept_users->lists('id')->toArray()));\n\t\t}\n\n\t\treturn $related_users;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register a new domain name Executes the 'Purchase' command on Enom's servers to register a new domain. Note that this command to not fail, it must meet the following requirements: Your Enom account must have enough credits to cover the order amount. The domain name must be valid and available. Number of years must not be less than the minimum number of years required for the specified TLD. Name Servers must be valid and registered. Name servers for .us names must be located in the United States. RegistrantJobTitle and RegistrantFax are required in the contacts array if RegistrantOrganizationName is set.
function registerDomain($domainName, $numYears, $contacts, $nameServers = null, $regLock = true) { $this->_setCommand('Purchase'); if( !$this->_setParseDomain($domainName) ) { $this->_addError("Invalid domain name $domainName"); return $this->_returnError(); } $this->addParam('NumYears', $numYears); if( !is_null($nameServers) ) { for($i=0; $i<count($nameServers); $i++) { $this->addParam( 'NS'.($i+1) , $nameServers[$i] ); } } else { $this->addParam('UseDNS', 'Default'); } if( !$regLock ) { $this->addParam('UnLockRegistrar', '1'); } if( isset($contacts['EmailAddress']) ) { $contacts = array('registrant'=>$contacts); } foreach($contacts as $type=>$info) { switch($type) { case 'registrant': $typeName = 'Registrant'; break; case 'billing': $typeName = 'Billing'; break; case 'auxbilling': $typeName = 'AuxBilling'; break; case 'tech': $typeName = 'Tech'; break; case 'admin': $typeName = 'Admin'; break; default: break; } $this->addParam( $typeName . 'EmailAddress', $info['EmailAddress'] ); $this->addParam( $typeName . 'Fax', $info['Fax'] ); $this->addParam( $typeName . 'Phone', $info['Phone'] ); $this->addParam( $typeName . 'Country', $info['Country'] ); $this->addParam( $typeName . 'PostalCode', $info['PostalCode'] ); if( $info['StateProvinceChoice'] == 'S' ) { $this->addParam( $typeName . 'StateProvinceChoice', 'S' ); $this->addParam( $typeName . 'StateProvince', $info['State'] ); } elseif( $info['StateProvinceChoice'] == 'P' ) { $this->addParam( $typeName . 'StateProvinceChoice', 'Province' ); $this->addParam( $typeName . 'StateProvince', $info['Province'] ); } else { $this->addParam( $typeName . 'StateProvinceChoice', 'Blank' ); $this->addParam( $typeName . 'StateProvince', '' ); } $this->addParam( $typeName . 'City', $info['City'] ); $this->addParam( $typeName . 'Address1', $info['Address1'] ); $this->addParam( $typeName . 'Address2', $info['Address2'] ); $this->addParam( $typeName . 'LastName', $info['LastName'] ); $this->addParam( $typeName . 'FirstName', $info['FirstName'] ); $this->addParam( $typeName . 'JobTitle', $info['JobTitle'] ); $this->addParam( $typeName . 'OrganizationName', $info['OrganizationName'] ); } if( !$this->process() || '0' != $this->response['ErrCount'] ) { return $this->_returnError(); } elseif('200' != $this->response['RRPCode']) { $this->_addError("Invalid RRPCode Returned - ({$this->response['RRPCode']}) {$this->Response['RRPText']}"); return $this->_returnError(); } else { return $this->response['OrderID']; } }
[ "function registerDomain( $params )\n {\n $domain = $params['sld'] . \".\" . $params['tld'];\n $curl_url = $this->_getURL() . \"domains/\" . urlencode($domain) . \"/create\";\n $curl_params = array();\n\n for ($i = 1; $i <= 6; $i++) {\n if (!empty($params['NS'.$i])) {\n $curl_params['ns'][] = array(\"host\" => $params['NS'.$i]['hostname'], \"addr\" => $params['NS'.$i]['ip']);\n }\n }\n\n // stand alone doamins, use default provided in the registrar plugin settings.\n if ( !isset($curl_params['ns']) ) {\n $curl_params['ns'][] = array(\"host\" => $this->settings->get(\"plugin_realtimeregister_NS 1\"));\n $curl_params['ns'][] = array(\"host\" => $this->settings->get(\"plugin_realtimeregister_NS 2\"));\n }\n\n $country = ($params['RegistrantCountry'] == \"UK\" ? \"GB\" : $params['RegistrantCountry']);\n $phone = $this->_convertPhoneNumber($params['RegistrantPhone'], $country, $params['PhoneFormat']);\n\n $curl_params['contact_data']['registrant'] = array(\n 'email' => utf8_encode($params['RegistrantEmailAddress']),\n 'name' => utf8_encode($params['RegistrantFirstName'] . \" \" . $params['RegistrantLastName']),\n 'org' => utf8_encode($params['RegistrantOrganizationName']),\n 'street' => array(utf8_encode($params['RegistrantAddress1'])),\n 'city' => utf8_encode($params['RegistrantCity']),\n 'sp' => utf8_encode($params['RegistrantStateProvince']),\n 'pc' => utf8_encode($params['RegistrantPostalCode']),\n 'cc' => utf8_encode($country),\n 'voice' => utf8_encode($phone)\n );\n\n $curl_params['admin'] = $params['Handle'];\n $curl_params['billing'] = $params['Handle'];\n $curl_params['tech'] = $params['Handle'];\n\n $response = $this->_sendRequest($curl_url, $curl_params);\n\n if (is_a($response, \"CE_Error\")) {\n throw new Exception($response->errMessage);\n }\n return array(1);\n }", "function onlineserver_RegisterDomain($params)\n{\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n\n // registration parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n $registrationPeriod = $params['regperiod'];\n\n /**\n * Nameservers.\n *\n * If purchased with web hosting, values will be taken from the\n * assigned web hosting server. Otherwise uses the values specified\n * during the order process.\n */\n $nameserver1 = $params['ns1'];\n $nameserver2 = $params['ns2'];\n $nameserver3 = $params['ns3'];\n $nameserver4 = $params['ns4'];\n $nameserver5 = $params['ns5'];\n\n $params[\"address1\"]=validate($params[\"address1\"]);\n $params[\"address2\"]=validate($params[\"address2\"]);\n $params[\"city\"]=validate($params[\"city\"]);\n $params[\"state\"]=validate($params[\"state\"]);\n\n\n $firstName = translate($params[\"firstname\"]) ;\n $lastName = translate($params[\"lastname\"]);\n $fullName = translate($params[\"fullname\"]); // First name and last name combined\n $companyName = translate($params[\"companyname\"]);\n $email = $params[\"email\"];\n $address1 = translate($params[\"address1\"]);\n $address2 = translate($params[\"address2\"]);\n $city = translate($params[\"city\"]);\n $state = translate($params[\"state\"]); // eg. TX\n $stateFullName =translate($params[\"fullstate\"]);// eg. Texas\n $postcode = $params[\"postcode\"]; // Postcode/Zip code\n $countryCode = $params[\"countrycode\"]; // eg. GB\n $countryName = translate($params[\"countryname\"]); // eg. United Kingdom\n $phoneNumber = $params[\"phonenumber\"]; // Phone number as the user provided it\n $phoneCountryCode = $params[\"phonecc\"]; // Country code determined based on country\n $phoneNumberFormatted = $params[\"fullphonenumber\"]; // Format: +CC.xxxxxxxxxxxx\n\n\n // domain addon purchase status\n $enableDnsManagement = (bool) $params['dnsmanagement'];\n $enableEmailForwarding = (bool) $params['emailforwarding'];\n $enableIdProtection = (bool) $params['idprotection'];\n\n /**\n * Premium domain parameters.\n *\n * Premium domains enabled informs you if the admin user has enabled\n * the selling of premium domain names. If this domain is a premium name,\n * `premiumCost` will contain the cost price retrieved at the time of\n * the order being placed. The premium order should only be processed\n * if the cost price now matches the previously fetched amount.\n */\n $premiumDomainsEnabled = (bool) $params['premiumEnabled'];\n $premiumDomainsCost = $params['premiumCost'];\n\n // Build Phone Number\n $pos = strpos($phoneNumberFormatted, '.');\n $countryCode2 = substr($phoneNumberFormatted, 0, $pos);\n $areaCode = substr($phoneNumberFormatted, $pos + 1, 3);\n $phoneNumber = substr($phoneNumberFormatted, $pos + 1 + 3);\n\n\n\n // Build post data\n $initials = substr($firstName, 0, 1) . '.' . substr($lastName, 0, 1);\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'owner'=>[\n 'companyName'=>$companyName,\n 'name'=>[\n 'initials' => $initials,\n 'firstName' => $firstName,\n 'lastName' => $lastName\n ],\n 'gender'=>'m',\n \"phone\"=>[\n 'countryCode' => $countryCode2,\n 'areaCode' => $areaCode,\n 'subscriberNumber'=> $phoneNumber\n ],\n 'address' => [\n 'street' => $address1,\n 'number' => \"1\",\n 'zipcode' => $postcode,\n 'city' => $city,\n 'country' => $countryCode\n ],\n \"email\" => $email,\n ],\n 'domain'=> [\n 'name' => $sld,\n 'extension' => $tld\n ],\n 'nameserver'=>[\n [\n 'name'=>$nameserver1\n ],\n [\n 'name'=>$nameserver2\n ],\n [\n 'name'=>$nameserver3\n ],\n [\n 'name'=>$nameserver4\n ],\n [\n 'name'=>$nameserver5\n ]\n ],\n 'additionalData'=>$params['additionalfields'],\n 'idprotection'=>$enableIdProtection,\n ]\n ];\n\n\n if ($premiumDomainsEnabled && $premiumDomainsCost) {\n $postfields['accepted_premium_cost'] = $premiumDomainsCost;\n }\n\n try {\n $api = new ApiClient();\n $api->call('registerDomain', $postfields);\n modifyDomain($params);\n return array(\n 'success' => true,\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "function COCCAepp_RegisterDomain($params) {\n\t# Grab varaibles\n\t$sld = $params[\"sld\"];\n\t$tld = $params[\"tld\"];\n\t$regperiod = $params[\"regperiod\"];\n$domain = \"$sld.$tld\";\n\t# Get registrant details\n\t$RegistrantFirstName = $params[\"firstname\"];\n\t$RegistrantLastName = $params[\"lastname\"];\n\t$RegistrantAddress1 = $params[\"address1\"];\n\t$RegistrantAddress2 = $params[\"address2\"];\n\t$RegistrantCity = $params[\"city\"];\n\t$RegistrantStateProvince = $params[\"state\"];\n\t$RegistrantPostalCode = $params[\"postcode\"];\n\t$RegistrantCountry = $params[\"country\"];\n\t$RegistrantEmailAddress = $params[\"email\"];\n\t$RegistrantPhone = $params[\"fullphonenumber\"];\n\t#Generate Handle\n\t$regHandle = generateHandle();\n\t# Get admin details\n\t$AdminFirstName = $params[\"adminfirstname\"];\n\t$AdminLastName = $params[\"adminlastname\"];\n\t$AdminAddress1 = $params[\"adminaddress1\"];\n\t$AdminAddress2 = $params[\"adminaddress2\"];\n\t$AdminCity = $params[\"admincity\"];\n\t$AdminStateProvince = $params[\"adminstate\"];\n\t$AdminPostalCode = $params[\"adminpostcode\"];\n\t$AdminCountry = $params[\"admincountry\"];\n\t$AdminEmailAddress = $params[\"adminemail\"];\n\t$AdminPhone = $params[\"adminphonenumber\"];\n\t#Generate Handle\n\t$admHandle = generateHandle();\n\t\n\t\n\t\n # Generate array of new nameservers\n $nameservers=array();\n if(!empty($params[\"ns1\"]))\n array_push($nameservers,$params[\"ns1\"]);\n if(!empty($params[\"ns2\"]))\n array_push($nameservers,$params[\"ns2\"]);\n if(!empty($params[\"ns3\"]))\n array_push($nameservers,$params[\"ns3\"]);\n if(!empty($params[\"ns4\"]))\n array_push($nameservers,$params[\"ns4\"]);\n if(!empty($params[\"ns5\"]))\n array_push($nameservers,$params[\"ns5\"]);\n\n# Get client instance\n\ttry {\n\t\t$client = _COCCAepp_Client($domain);\n for($i=0; $i < count($nameservers); $i++) {\n # Get list of nameservers for domain\n \t$result = $client->request($xml = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n <epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\">\n <command>\n <info>\n <host:info\n xmlns:host=\"urn:ietf:params:xml:ns:host-1.0\">\n <host:name>'.$nameservers[$i].'</host:name>\n </host:info>\n </info>\n <clTRID>'.mt_rand().mt_rand().'</clTRID>\n </command>\n </epp>');\n # Parse XML result\n $doc = new DOMDocument();\n $doc->preserveWhiteSpace = false;\n $doc->loadXML($result);\n logModuleCall('COCCAepp', 'GetNameservers', $xml, $result);\n\n # Pull off status\n $coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');\n $msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue;\n # Check the result is ok\n if($coderes == '2303') {\n $request = $client->request($xml ='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n <epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\">\n <command>\n <create>\n <host:create\n xmlns:host=\"urn:ietf:params:xml:ns:host-1.0\">\n <host:name>'.$nameservers[$i].'</host:name> \n </host:create>\n </create>\n <clTRID>'.mt_rand().mt_rand().'</clTRID>\n </command>\n </epp>\n');\n\n # Parse XML result\n $doc= new DOMDocument();\n $doc->loadXML($request);\n logModuleCall('COCCAepp', 'SaveNameservers', $xml, $request);\n\n\n # Pull off status\n $coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');\n $msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue;\n # Check if result is ok\n if(!eppSuccess($coderes)) {\n $values[\"error\"] = \"Could not Create host($nameservers[$i]): Code ($coderes) $msg\";\n return $values;\n }\n }\n }\n\n// End create nameservers /////////\n\n # Generate XML for nameservers\n if ($nameserver1 = $params[\"ns1\"]) {\n $add_hosts = '\n <domain:hostObj>'.$nameserver1.'</domain:hostObj>\n ';\n }\n if ($nameserver2 = $params[\"ns2\"]) {\n $add_hosts .= '\n <domain:hostObj>'.$nameserver2.'</domain:hostObj>\n ';\n }\n if ($nameserver3 = $params[\"ns3\"]) {\n $add_hosts .= '\n <domain:hostObj>'.$nameserver3.'</domain:hostObj>\n ';\n }\n if ($nameserver4 = $params[\"ns4\"]) {\n $add_hosts .= '\n <domain:hostObj>'.$nameserver4.'</domain:hostObj>\n ';\n }\n if ($nameserver5 = $params[\"ns5\"]) {\n $add_hosts .= '\n <domain:hostObj>'.$nameserver5.'</domain:hostObj>\n ';\n }\n\n\t# Create Registrant\n \t$request = $client->request($xml ='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\">\n\t<command>\n\t\t<create>\n\t\t\t<contact:create\n xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\">\n\t\t\t\t<contact:id>'.$regHandle.'</contact:id>\n\t\t\t\t<contact:postalInfo type=\"int\">\n\t\t\t\t\t<contact:name>'.$RegistrantFirstName.' '.$RegistrantLastName.'</contact:name>\n\t\t\t\t\t<contact:org>Example Inc.</contact:org>\n\t\t\t\t\t<contact:addr>\n\t\t\t\t\t\t<contact:street>'.$RegistrantAddress1.'</contact:street>\n\t\t\t\t\t\t<contact:street>'.$RegistrantAddress2.'</contact:street>\n\t\t\t\t\t\t<contact:city>'.$RegistrantCity.'</contact:city>\n\t\t\t\t\t\t<contact:sp>'.$RegistrantStateProvince.'</contact:sp>\n\t\t\t\t\t\t<contact:pc>'.$RegistrantPostalCode.'</contact:pc>\n\t\t\t\t\t\t<contact:cc>'.$RegistrantCountry.'</contact:cc>\n\t\t\t\t\t</contact:addr>\n\t\t\t\t</contact:postalInfo>\n\t\t\t\t<contact:voice x=\"\">'.$params[\"phonenumber\"].'</contact:voice>\n\t\t\t\t<contact:fax></contact:fax>\n\t\t\t\t<contact:email>'.$RegistrantEmailAddress.'</contact:email>\n\t\t\t\t<contact:authInfo>\n\t\t\t\t\t<contact:pw>Afri-'.rand().rand().'</contact:pw>\n\t\t\t\t</contact:authInfo>\n\t\t\t</contact:create>\n\t\t</create>\n\t\t<clTRID>'.mt_rand().mt_rand().'</clTRID>\n\t</command>\n</epp>\n');\n\n # Parse XML result\n $doc= new DOMDocument();\n $doc->loadXML($request);\n # Pull off status\n $coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');\n $msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue;\n if(eppSuccess($coderes)) {\n $values['contact'] = 'Contact Created';\n } else if($coderes == '2302') {\n $values['contact'] = 'Contact Already exists';\n } else {\n $values[\"error\"] = \"RegisterDomain/Reg-create($regHandle): Code ($coderes) $msg\";\n return $values;\n }\n\n $values[\"status\"] = $msg;\n\n //Create Domain Admin\n $request = $client->request($xml ='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n <epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\">\n <command>\n <create>\n <contact:create\n xmlns:contact=\"urn:ietf:params:xml:ns:contact-1.0\">\n\t\t\t\t<contact:id>'.$admHandle.'</contact:id>\n\t\t\t\t<contact:postalInfo type=\"int\">\n\t\t\t\t\t<contact:name>'.$AdminFirstName.' '.$AdminLastName.'</contact:name>\n\t\t\t\t\t<contact:addr>\n\t\t\t\t\t\t<contact:street>'.$AdminAddress1.'</contact:street>\n\t\t\t\t\t\t<contact:street>'.$AdminAddress2.'</contact:street>\n\t\t\t\t\t\t<contact:city>'.$AdminCity.'</contact:city>\n\t\t\t\t\t\t<contact:sp>'.$AdminStateProvince.'</contact:sp>\n\t\t\t\t\t\t<contact:pc>'.$AdminPostalCode.'</contact:pc>\n\t\t\t\t\t\t<contact:cc>'.$AdminCountry.'</contact:cc>\n\t\t\t\t\t</contact:addr>\n\t\t\t\t</contact:postalInfo>\n\t\t\t\t<contact:voice>'.$AdminPhone.'</contact:voice>\n\t\t\t\t<contact:fax></contact:fax>\n\t\t\t\t<contact:email>'.$AdminEmailAddress.'</contact:email>\n\t\t\t\t<contact:authInfo>\n\t\t\t\t\t<contact:pw>Afri-'.rand().rand().'</contact:pw>\n\t\t\t\t</contact:authInfo>\n\t\t\t</contact:create>\n\t\t</create>\n\t\t<clTRID>'.mt_rand().mt_rand().'</clTRID>\n\t</command>\n</epp>\n');\n\n # Parse XML result\n $doc = new DOMDocument();\n $doc->loadXML($request);\n # Pull off status\n $coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');\n $msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue;\n if(eppSuccess($coderes)) {\n $values['contact'] = 'Contact Created';\n } else if($coderes == '2302') {\n $values['contact'] = 'Contact Already exists';\n } else {\n $values[\"error\"] = \"RegisterDomain/Admin Contact-create($admHandle): Code ($coderes) $msg\";\n return $values;\n }\n\n $values[\"status\"] = $msg;\n //Create the Domain\n $request = $client->request($xml = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n <epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\">\n <command>\n <create>\n <domain:create\n xmlns:domain=\"urn:ietf:params:xml:ns:domain-1.0\">\n\t\t\t\t<domain:name>'.$sld.'.'.$tld.'</domain:name>\n<domain:period unit=\"y\">'.$regperiod.'</domain:period>\n\t\t\t\t<domain:ns>'.$add_hosts.'</domain:ns>\n\t\t\t\t<domain:registrant>'.$regHandle.'</domain:registrant>\n\t\t\t\t<domain:contact type=\"admin\">'.$admHandle.'</domain:contact>\n\t\t\t\t<domain:contact type=\"tech\">'.$admHandle.'</domain:contact>\n\t\t\t\t<domain:contact type=\"billing\">'.$admHandle.'</domain:contact>\n\t\t\t\t<domain:authInfo>\n\t\t\t\t\t<domain:pw>CoCcA'.rand().rand().'</domain:pw>\n\t\t\t\t</domain:authInfo>\n\t\t\t</domain:create>\n\t\t</create>\n\t<clTRID>'.mt_rand().mt_rand().'</clTRID>\t\n\t</command>\n</epp>\n');\n\n $doc= new DOMDocument();\n $doc->loadXML($request);\n logModuleCall('COCCAepp', 'RegisterDomain', $xml, $request);\n\n $coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');\n $msg = $doc->getElementsByTagName('msg')->item(0)->nodeValue;\n if(!eppSuccess($coderes)) {\n $values[\"error\"] = \"RegisterDomain/domain-create($sld.$tld): Code ($coderes) $msg\";\n return $values;\n }\n\n $values[\"status\"] = $msg;\n\n return $values;\n\n\t} catch (Exception $e) {\n\t\t$values[\"error\"] = 'RegisterDomain/EPP: '.$e->getMessage();\n\t\treturn $values;\n\t}\n\n\treturn $values;\n}", "function nordname_TransferDomain($params) {\n $apiKey = $params['api_key'];\n $auto_renew = ($params['auto_renew'] == \"on\") ? 'true' : 'false';\n $sandbox = ($params['sandbox'] == \"on\") ? true : false;\n\n // registration parameters\n $sld = idn_to_ascii($params[\"original\"][\"sld\"]);\n $tld = $params['tld'];\n $epp = $params['eppcode'];\n\n // registrant information\n $firstName = $params[\"firstname\"];\n $lastName = $params[\"lastname\"];\n $fullName = $params[\"fullname\"]; // First name and last name combined\n $company = $params[\"companyname\"];\n $email = $params[\"email\"];\n $address1 = $params[\"address1\"];\n $address2 = $params[\"address2\"];\n $city = $params[\"city\"];\n $state = $params[\"state\"]; // eg. TX\n $stateFullName = $params[\"fullstate\"]; // eg. Texas\n $postcode = $params[\"postcode\"]; // Postcode/Zip code\n $countryCode = $params[\"countrycode\"]; // eg. GB\n $countryName = $params[\"countryname\"]; // eg. United Kingdom\n $phoneNumber = $params[\"phonenumber\"]; // Phone number as the user provided it\n $phoneCountryCode = $params[\"phonecc\"]; // Country code determined based on country\n $phoneNumberFormatted = $params[\"fullphonenumber\"]; // Format: +CC.xxxxxxxxxxxx\n \n $body = array(\n 'first_name' => $firstName,\n 'last_name' => $lastName,\n 'address1' => $address1,\n 'city' => $city,\n 'state' => $stateFullName,\n 'zip_code' => $postcode,\n 'country' => $countryCode,\n 'email' => $email,\n 'phone' => $phoneNumberFormatted,\n \"is_registrant\" => true,\n \"language\" => \"en\"\n );\n \n // Add optional fields if they are present.\n if (!empty($company))\n $body[\"company\"] = $company;\n \n if (!empty($address2))\n $body[\"address2\"] = $address2;\n \n // Add extra fields if required by TLD and if present.\n $tld_fields = nordname_get_tld_data($tld, $apiKey)[\"additional_contact_fields\"];\n foreach ($tld_fields as $fields) {\n // First check if condition fields are present and add them.\n if (array_key_exists($fields[\"field_name1\"], $params[\"additionalfields\"]) && !empty($params[\"additionalfields\"][$fields[\"field_name1\"]]))\n $body[$fields[\"field_name1\"]] = $params[\"additionalfields\"][$fields[\"field_name1\"]];\n if (array_key_exists($fields[\"field_name2\"], $params[\"additionalfields\"]) && !empty($params[\"additionalfields\"][$fields[\"field_name2\"]]))\n $body[$fields[\"field_name2\"]] = $params[\"additionalfields\"][$fields[\"field_name2\"]];\n \n $split = explode(\",\", $fields[\"required_fields\"]);\n foreach ($split as $field) {\n if (array_key_exists($field, $params[\"additionalfields\"]) && !empty($params[\"additionalfields\"][$field]))\n $body[$field] = $params[\"additionalfields\"][$field];\n }\n }\n\n try {\n $api = new ApiClient();\n // Create the contact.\n $reply = $api->call(\"POST\", \"contact\", array('api_key' => $apiKey), $body, $sandbox);\n \n $registrant = $reply[\"contact\"];\n // Build post data\n $getfields = array(\n 'api_key' => $apiKey,\n 'authcode' => $epp,\n 'auto_renew' => $auto_renew,\n 'registrant' => $registrant,\n 'admin' => $params[\"auxiliary_contact\"],\n 'tech' => $params[\"auxiliary_contact\"],\n 'billing' => $params[\"auxiliary_contact\"]\n );\n \n try {\n $reply = $api->call(\"POST\", \"domain/transfer/\" . $sld . '.' . $tld, $getfields,$body, $sandbox);\n } catch (\\Exception $e) {\n // If transfer failed, remove the registrant contact in order to keep contact list clean.\n $api->call(\"DELETE\", \"contact/\" . $registrant, array('api_key' => $apiKey), \"\", $sandbox);\n throw $e;\n }\n \n return array(\n 'success' => true,\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "function niclv_RegisterDomain($params)\n{\n\n // user defined configuration values\n $userIdentifier = $params['APIUsername'];\n $apiKey = $params['APIKey'];\n $testMode = $params['TestMode'];\n $accountMode = $params['AccountMode'];\n $emailPreference = $params['EmailPreference'];\n\n // registration parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n $registrationPeriod = $params['regperiod'];\n\n /**\n * Nameservers.\n *\n * If purchased with web hosting, values will be taken from the\n * assigned web hosting server. Otherwise uses the values specified\n * during the order process.\n */\n $nameserver1 = $params['ns1'];\n $nameserver2 = $params['ns2'];\n $nameserver3 = $params['ns3'];\n $nameserver4 = $params['ns4'];\n $nameserver5 = $params['ns5'];\n\n // registrant information\n $firstName = $params[\"firstname\"];\n $lastName = $params[\"lastname\"];\n $fullName = $params[\"fullname\"]; // First name and last name combined\n $companyName = $params[\"companyname\"];\n $email = $params[\"email\"];\n $address1 = $params[\"address1\"];\n $address2 = $params[\"address2\"];\n $city = $params[\"city\"];\n $state = $params[\"state\"]; // eg. TX\n $stateFullName = $params[\"fullstate\"]; // eg. Texas\n $postcode = $params[\"postcode\"]; // Postcode/Zip code\n $countryCode = $params[\"countrycode\"]; // eg. GB\n $countryName = $params[\"countryname\"]; // eg. United Kingdom\n $phoneNumber = $params[\"phonenumber\"]; // Phone number as the user provided it\n $phoneCountryCode = $params[\"phonecc\"]; // Country code determined based on country\n $phoneNumberFormatted = $params[\"fullphonenumber\"]; // Format: +CC.xxxxxxxxxxxx\n $regNumber = $params[customfields1]; // Registration number/Personal code\n\n /**\n * Admin contact information.\n *\n * Defaults to the same as the client information. Can be configured\n * to use the web hosts details if the `Use Clients Details` option\n * is disabled in Setup > General Settings > Domains.\n */\n $adminFirstName = $params[\"adminfirstname\"];\n $adminLastName = $params[\"adminlastname\"];\n $adminFullName = $params[\"adminfullname\"]; \n $adminCompanyName = $params[\"admincompanyname\"];\n $adminEmail = $params[\"adminemail\"];\n $adminAddress1 = $params[\"adminaddress1\"];\n $adminAddress2 = $params[\"adminaddress2\"];\n $adminCity = $params[\"admincity\"];\n $adminState = $params[\"adminstate\"]; // eg. TX\n $adminStateFull = $params[\"adminfullstate\"]; // eg. Texas\n $adminPostcode = $params[\"adminpostcode\"]; // Postcode/Zip code\n $adminCountry = $params[\"admincountry\"]; // eg. GB\n $adminPhoneNumber = $params[\"adminphonenumber\"]; // Phone number as the user provided it\n $adminPhoneNumberFormatted = $params[\"adminfullphonenumber\"]; // Format: +CC.xxxxxxxxxxxx\n\n // domain addon purchase status\n $enableDnsManagement = (bool) $params['dnsmanagement'];\n $enableEmailForwarding = (bool) $params['emailforwarding'];\n $enableIdProtection = (bool) $params['idprotection'];\n\n /**\n * Premium domain parameters.\n *\n * Premium domains enabled informs you if the admin user has enabled\n * the selling of premium domain names. If this domain is a premium name,\n * `premiumCost` will contain the cost price retrieved at the time of\n * the order being placed. The premium order should only be processed\n * if the cost price now matches the previously fetched amount.\n */\n $premiumDomainsEnabled = (bool) $params['premiumEnabled'];\n $premiumDomainsCost = $params['premiumCost'];\n\n // Build post data\n $postfields = array(\n 'username' => $userIdentifier,\n 'password' => $apiKey,\n 'testmode' => $testMode,\n 'domain' => $sld . '.' . $tld,\n 'years' => $registrationPeriod,\n 'nameservers' => array(\n 'ns1' => $nameserver1,\n 'ns2' => $nameserver2,\n 'ns3' => $nameserver3,\n 'ns4' => $nameserver4,\n 'ns5' => $nameserver5,\n ),\n 'contacts' => array(\n 'registrant' => array(\n 'firstname' => $firstName,\n 'lastname' => $lastName,\n 'fullname' => $fullName,\n 'companyname' => $companyName,\n 'email' => $email,\n 'address1' => $address1,\n 'address2' => $address2,\n 'city' => $city,\n 'state' => $state,\n 'zipcode' => $postcode,\n 'country' => $countryCode,\n 'phonenumber' => $phoneNumberFormatted,\n 'regnumber' => $regNumber,\n ),\n 'admin' => array(\n 'firstname' => $adminFirstName,\n 'lastname' => $adminLastName,\n 'fullname' => $adminFirstName.' '.$adminLastName, \n 'companyname' => $adminCompanyName,\n 'email' => $adminEmail,\n 'address1' => $adminAddress1,\n 'address2' => $adminAddress2,\n 'city' => $adminCity,\n 'state' => $adminState,\n 'zipcode' => $adminPostcode,\n 'country' => $adminCountry,\n 'phonenumber' => $adminPhoneNumberFormatted,\n ),\n ),\n 'dnsmanagement' => $enableDnsManagement,\n 'emailforwarding' => $enableEmailForwarding,\n 'idprotection' => $enableIdProtection,\n );\n\n if ($premiumDomainsEnabled && $premiumDomainsCost) {\n $postfields['accepted_premium_cost'] = $premiumDomainsCost;\n }\n\n try {\n $api = new ApiClient();\n $response = $api->call('Register', $postfields);\n\n\n return array(\n 'success' => true,\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "public function registerDomain($request)\n {\n\n // Load the domain api\n $domain_api = new Api\\Domain();\n\n // Split the domain at the extension\n $domain_parts = \\App::get('domainhelper')->splitDomain($request->domain->domain);\n\n $domain_params = array(\n 'SLD' => $domain_parts[0],\n 'TLD' => $domain_parts[1],\n 'NumYears' => $request->years,\n 'IgnoreNSFail' => 'Yes',\n );\n\n // Add the nameservers to the $domain_params array\n $i = 1;\n foreach ($request->nameservers as $nameserver) {\n\n // Enom allows up to 12 nameservers to be set, so ensure no more than\n // that are submitted.\n if ($i <= 12) {\n $domain_params['NS'.$i] = $nameserver;\n $i++;\n }\n }\n\n // Build contact data\n $registrant = \\App::get('domainhelper')->getContact($request->contacts['registrant']);\n $administrative = \\App::get('domainhelper')->getContact($request->contacts['administrative']);\n $technical = \\App::get('domainhelper')->getContact($request->contacts['technical']);\n $billing = \\App::get('domainhelper')->getContact($request->contacts['billing']);\n\n\n // Registrant contact. Not all extensions require this, however we'll set\n // it anyway as it can still be used and reduces the need to do additional\n // unnecessery checks.\n $registrant_contact = array(\n 'RegistrantFirstName' => $registrant->first_name,\n 'RegistrantLastName' => $registrant->last_name,\n 'RegistrantAddress1' => $registrant->address1,\n 'RegistrantAddress2' => $registrant->address2,\n 'RegistrantCity' => $registrant->city,\n 'RegistrantStateProvince' => $registrant->state,\n 'RegistrantPostalCode' => $registrant->postcode,\n 'RegistrantCountry' => \\App::get('domainhelper')->getIsoCode($registrant->country),\n 'RegistrantEmailAddress' => $registrant->email,\n 'RegistrantPhone' => '+' . $registrant->phone_cc . '.' . $registrant->phone,\n );\n\n if ($registrant->company !='') {\n $registrant_contact['RegistrantOrganization'] = $registrant->company;\n\n if ($registrant->job_title == '') {\n $registrant->job_title = 'N/A';\n }\n\n $registrant_contact['RegistrantJobTitle'] = $registrant->job_title;\n\n if ($registrant->fax_cc == '' || $registrant->fax == '') {\n $registrant_contact['RegistrantFax'] = '+' . $registrant->phone_cc . '.' . $registrant->phone;\n } else {\n $registrant_contact['RegistrantFax'] = '+' . $registrant->fax_cc . '.' . $registrant->fax;\n }\n }\n\n // Administrative contact\n $administrative_contact = array(\n 'AdminFirstName' => $administrative->first_name,\n 'AdminLastName' => $administrative->last_name,\n 'AdminAddress1' => $administrative->address1,\n 'AdminAddress2' => $administrative->address2,\n 'AdminCity' => $administrative->city,\n 'AdminStateProvince' => $administrative->state,\n 'AdminPostalCode' => $administrative->postcode,\n 'AdminCountry' => \\App::get('domainhelper')->getIsoCode($administrative->country),\n 'AdminEmailAddress' => $administrative->email,\n 'AdminPhone' => '+' . $administrative->phone_cc . '.' . $administrative->phone\n );\n\n if ($administrative->company !='') {\n $administrative_contact['AdminOrganization'] = $administrative->company;\n\n if ($administrative->job_title == '') {\n $administrative->job_title = 'N/A';\n }\n\n $administrative_contact['AdminJobTitle'] = $administrative->job_title;\n }\n\n // Technical contact\n $technical_contact = array(\n 'TechFirstName' => $technical->first_name,\n 'TechLastName' => $technical->last_name,\n 'TechAddress1' => $technical->address1,\n 'TechAddress2' => $technical->address2,\n 'TechCity' => $technical->city,\n 'TechStateProvince' => $technical->state,\n 'TechPostalCode' => $technical->postcode,\n 'TechCountry' => \\App::get('domainhelper')->getIsoCode($technical->country),\n 'TechEmailAddress' => $technical->email,\n 'TechPhone' => '+' . $technical->phone_cc . '.' . $technical->phone\n );\n\n if ($technical->company !='') {\n $technical_contact['TechOrganization'] = $technical->company;\n\n if ($technical->job_title == '') {\n $technical->job_title = 'N/A';\n }\n\n $technical_contact['TechJobTitle'] = $technical->job_title;\n }\n\n // Billing contact\n $billing_contact = array(\n 'AuxBillingFirstName' => $billing->first_name,\n 'AuxBillingLastName' => $billing->last_name,\n 'AuxBillingAddress1' => $billing->address1,\n 'AuxBillingAddress2' => $billing->address2,\n 'AuxBillingCity' => $billing->city,\n 'AuxBillingStateProvince' => $billing->state,\n 'AuxBillingPostalCode' => $billing->postcode,\n 'AuxBillingCountry' => \\App::get('domainhelper')->getIsoCode($billing->country),\n 'AuxBillingEmailAddress' => $billing->email,\n 'AuxBillingPhone' => '+' . $billing->phone_cc . '.' . $billing->phone\n );\n\n if ($billing->company !='') {\n $billing_contact['AuxBillingOrganization'] = $billing->company;\n\n if ($billing->job_title == '') {\n $billing->job_title = 'N/A';\n }\n\n $billing_contact['AuxBillingJobTitle'] = $billing->job_title;\n }\n\n // Merge contacts into the $domain_params array\n $domain_params = array_merge($domain_params, $registrant_contact, $administrative_contact, $technical_contact, $billing_contact);\n\n if (is_array($request->custom_data)) {\n $domain_params = array_merge($domain_params, $request->custom_data);\n }\n\n $custom_registration_handler = false;\n\n $extension_class = \\App::get('domainhelper')->loadExtensionClass($request->domain);\n\n if ($extension_class && $extension_class->registration_handler) {\n // Some domains may use a custom registration handler if they use a different\n // api call. These will be handled directly in the extension handler class\n // if one exists.\n // This domain extension uses a custom registration handler.\n $result = $extension_class->registerDomain($domain_params);\n } else {\n $result = $domain_api->registerDomain($domain_params);\n }\n\n if (isset($result->actionstatus) && $result->actionstatus == 'Success') {\n $return = new \\stdClass();\n $return->status = '1';\n\n return $return;\n }\n\n $return = new \\stdClass();\n $return->status = '0';\n\n if(isset($result->actionstatusdesc)) {\n $return->response = new \\stdClass();\n $return->response->type = 'error';\n $return->response->message = $result->actionstatusdesc;\n }\n\n return $return;\n }", "public function addDomain($params= ['domain-name'=>'learncloud.com','years'=>'1','ns'=>'ns1.domain.com','ns'=>'ns2.domain.com','customer-id'=>'17579075','reg-contact-id'=>'71548132','admin-contact-id'=>'71548132','tech-contact-id'=>'71548132','billing-contact-id'=>'71548132','invoice-option'=>'KeepInvoice']){\n\n\t\t return $this->callResellerClubEndpoint('domains/register', 'POST' , $params);\n\n\t}", "function ispapi_RegisterDomain($params)\n{\n global $additionaldomainfields;\n\n $values = array();\n $origparams = $params;\n\n $premiumDomainsEnabled = (bool) $params['premiumEnabled'];\n $premiumDomainsCost = $params['premiumCost'];\n\n $params = ispapi_get_utf8_params($params);\n\n if (isset($params[\"original\"])) {\n $params = $params[\"original\"];\n }\n\n $domain = $params[\"sld\"].\".\".$params[\"tld\"];\n\n $registrant = array(\n \"FIRSTNAME\" => $params[\"firstname\"],\n \"LASTNAME\" => $params[\"lastname\"],\n \"ORGANIZATION\" => $params[\"companyname\"],\n \"STREET\" => $params[\"address1\"],\n \"CITY\" => $params[\"city\"],\n \"STATE\" => $params[\"state\"],\n \"ZIP\" => $params[\"postcode\"],\n \"COUNTRY\" => $params[\"country\"],\n \"PHONE\" => $params[\"phonenumber\"],\n \"EMAIL\" => $params[\"email\"]\n );\n if (strlen($params[\"address2\"])) {\n $registrant[\"STREET\"] .= \" , \".$params[\"address2\"];\n }\n\n $admin = array(\n \"FIRSTNAME\" => $params[\"adminfirstname\"],\n \"LASTNAME\" => $params[\"adminlastname\"],\n \"ORGANIZATION\" => $params[\"admincompanyname\"],\n \"STREET\" => $params[\"adminaddress1\"],\n \"CITY\" => $params[\"admincity\"],\n \"STATE\" => $params[\"adminstate\"],\n \"ZIP\" => $params[\"adminpostcode\"],\n \"COUNTRY\" => $params[\"admincountry\"],\n \"PHONE\" => $params[\"adminphonenumber\"],\n \"EMAIL\" => $params[\"adminemail\"]\n );\n if (strlen($params[\"adminaddress2\"])) {\n $admin[\"STREET\"] .= \" , \".$params[\"adminaddress2\"];\n }\n\n $command = array(\n \"COMMAND\" => \"AddDomain\",\n \"DOMAIN\" => $domain,\n \"PERIOD\" => $params[\"regperiod\"],\n \"NAMESERVER0\" => $params[\"ns1\"],\n \"NAMESERVER1\" => $params[\"ns2\"],\n \"NAMESERVER2\" => $params[\"ns3\"],\n \"NAMESERVER3\" => $params[\"ns4\"],\n \"OWNERCONTACT0\" => $registrant,\n \"ADMINCONTACT0\" => $admin,\n \"TECHCONTACT0\" => $admin,\n \"BILLINGCONTACT0\" => $admin\n );\n\n if ($origparams[\"TRANSFERLOCK\"]) {\n $command[\"TRANSFERLOCK\"] = 1;\n }\n\n if ($params[\"dnsmanagement\"]) {\n $command[\"INTERNALDNS\"] = 1;\n }\n\n if ($params[\"idprotection\"]) {\n $command[\"X-ACCEPT-WHOISTRUSTEE-TAC\"] = 1;\n }\n\n if (preg_match('/\\.swiss$/i', $domain)) {\n $command[\"COMMAND\"] = \"AddDomainApplication\";\n $command[\"CLASS\"] = \"GOLIVE\";\n //INTERNALDNS and WHOIS privacy service parameter is not supported in AddDomainApplication command\n unset($command[\"INTERNALDNS\"]);\n unset($command[\"X-ACCEPT-WHOISTRUSTEE-TAC\"]);\n }\n\n ispapi_use_additionalfields($params, $command);\n\n //#####################################################################\n //##################### PREMIUM DOMAIN HANDLING #######################\n //######################################################################\n if ($premiumDomainsEnabled) { //check if premium domain functionality is enabled by the admin\n if (!empty($premiumDomainsCost)) { //check if the domain has a premium price\n $c = array(\n \"COMMAND\" => \"CheckDomains\",\n \"DOMAIN\" => array($domain),\n \"PREMIUMCHANNELS\" => \"*\"\n );\n $check = ispapi_call($c, ispapi_config($origparams));\n if ($check[\"CODE\"] == 200) {\n $registrar_premium_domain_price = $check[\"PROPERTY\"][\"PRICE\"][0];\n $registrar_premium_domain_class = empty($check[\"PROPERTY\"][\"CLASS\"][0]) ? \"AFTERMARKET_PURCHASE_\".$check[\"PROPERTY\"][\"PREMIUMCHANNEL\"][0] : $check[\"PROPERTY\"][\"CLASS\"][0];\n $registrar_premium_domain_currency = $check[\"PROPERTY\"][\"CURRENCY\"][0];\n\n if ($premiumDomainsCost == $registrar_premium_domain_price) { //check if the price displayed to the customer is equal to the real cost at the registar\n $command[\"COMMAND\"] = \"AddDomainApplication\";\n $command[\"CLASS\"] = $registrar_premium_domain_class;\n $command[\"PRICE\"] = $premiumDomainsCost;\n $command[\"CURRENCY\"] = $registrar_premium_domain_currency;\n //INTERNALDNS and WHOIS privacy service parameter is not supported in AddDomainApplication command\n unset($command[\"INTERNALDNS\"]);\n unset($command[\"X-ACCEPT-WHOISTRUSTEE-TAC\"]);\n }\n }\n }\n }\n //#####################################################################\n\n $response = ispapi_call($command, ispapi_config($origparams));\n\n if ($response[\"CODE\"] != 200) {\n $values[\"error\"] = $response[\"DESCRIPTION\"];\n }\n\n if (preg_match('/\\.swiss$/i', $domain)) {\n if ($response[\"CODE\"] == 200) {\n $application_id = $response[\"PROPERTY\"][\"APPLICATION\"][0];\n $values[\"error\"] = \"APPLICATION <#\".$application_id.\"#> SUCCESSFULLY SUBMITTED. STATUS SET TO PENDING UNTIL THE SWISS REGISTRATION PROCESS IS COMPLETED\";\n }\n }\n\n return $values;\n}", "function dns_gateway_RegisterDomain($params)\n{\n try {\n\n // User defined configuration values\n $api_username = $params['API_Username'];\n $api_password = $params['API_Password'];\n $ote_api_username = $params['OTE_API_Username'];\n $ote_api_password = $params['OTE_API_Password'];\n $api_dev_mode = $params['Dev_Mode'];\n\n // Registration parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n $domain = $sld.'.'.$tld;\n $registrationPeriod = (\n $params['regperiod'] > 0\n ? $params['regperiod']\n : 1\n );\n\n //Nameservers\n $nameservers = [];\n for ($n = 1; $n <= 5; $n++) {\n if (isset($params['ns'.$n]) && $params['ns'.$n] != '') {\n $nameservers[] = [\n 'hostname' => $params['ns'.$n],\n 'glue' => []\n ];\n }\n }\n\n // Connect To API\n $api = new DNSAPI();\n $api->setcreds(\n $api_username,\n $api_password,\n $api_dev_mode,\n $ote_api_username,\n $ote_api_password\n );\n\n // Registrant information\n $registrant_info = [\n 'id' => $api->generate_id($domain),\n 'phone' => $params['phonenumberformatted'],\n 'fax' => null,\n 'email' => $params['email'],\n 'contact_address' => [\n [\n 'real_name' => $params['fullname'],\n 'org' => $params['companyname'],\n 'street' => $params['address1'],\n 'street2' => $params['address2'],\n 'street3' => null,\n 'city' => $params['city'],\n 'province' => $params['state'],\n 'code' => $params['postcode'],\n 'country' => $params['countrycode'],\n 'type' => 'int'\n ]\n ]\n ];\n\n // Admin contact information.\n $admin_info = [\n 'id' => $api->generate_id($domain),\n 'phone' => $params['adminfullphonenumber'],\n 'fax' => null,\n 'email' => $params['adminemail'],\n 'contact_address' => [\n [\n 'real_name' => $params['adminfirstname'].\n ' '.$params['adminlastname'],\n 'org' => $params['admincompanyname'],\n 'street' => $params['adminaddress1'],\n 'street2' => $params['adminaddress2'],\n 'street3' => null,\n 'city' => $params['admincity'],\n 'province' => $params['adminstate'],\n 'code' => $params['adminpostcode'],\n 'country' => $params['admincountry'],\n 'type' => 'int'\n ]\n ]\n ];\n\n // Billing contact information.\n $billing_info = [\n 'id' => $api->generate_id($domain),\n 'phone' => $params['adminfullphonenumber'],\n 'fax' => null,\n 'email' => $params['adminemail'],\n 'contact_address' => [\n [\n 'real_name' => $params['adminfirstname'].\n ' '.$params['adminlastname'],\n 'org' => $params['admincompanyname'],\n 'street' => $params['adminaddress1'],\n 'street2' => $params['adminaddress2'],\n 'street3' => null,\n 'city' => $params['admincity'],\n 'province' => $params['adminstate'],\n 'code' => $params['adminpostcode'],\n 'country' => $params['admincountry'],\n 'type' => 'int'\n ]\n ]\n ];\n\n // Tech contact information.\n $tech_info = [\n 'id' => $api->generate_id($domain),\n 'phone' => $params['adminfullphonenumber'],\n 'fax' => null,\n 'email' => $params['adminemail'],\n 'contact_address' => [\n [\n 'real_name' => $params['adminfirstname'].\n ' '.$params['adminlastname'],\n 'org' => $params['admincompanyname'],\n 'street' => $params['adminaddress1'],\n 'street2' => $params['adminaddress2'],\n 'street3' => null,\n 'city' => $params['admincity'],\n 'province' => $params['adminstate'],\n 'code' => $params['adminpostcode'],\n 'country' => $params['admincountry'],\n 'type' => 'int'\n ]\n ]\n ];\n\n /**\n * Premium domain parameters.\n *\n * Premium domains enabled informs you\n * if the admin user has enabled\n * the selling of premium domain names.\n * If this domain is a premium name,\n * `premiumCost` will contain the cost\n * price retrieved at the time of\n * the order being placed. The premium\n * order should only be processed\n * if the cost price now matches the\n * previously fetched amount.\n */\n $premiumDomainsEnabled = (bool) $params['premiumEnabled'];\n $premiumDomainsCost = $params['premiumCost'];\n\n\n // Create Contacts\n $registrant_contact = $api->setcontact($registrant_info);\n $admin_contact = $api->setcontact($admin_info);\n $billing_contact = $api->setcontact($billing_info);\n $tech_contact = $api->setcontact($tech_info);\n\n // Register Domain\n $domain = [\n 'name' => $domain,\n 'period' => $registrationPeriod,\n 'period_unit' => 'y',\n 'autorenew' => false,\n 'authinfo' => $api->generate_password($domain),\n 'hosts' => $nameservers,\n 'contacts' => [\n [\n 'type' => 'registrant',\n 'contact' => [\n 'id' => $registrant_contact\n ]\n ],\n [\n 'type' => 'admin',\n 'contact' => [\n 'id' => $admin_contact\n ]\n ],\n [\n 'type' => 'billing',\n 'contact' => [\n 'id' => $billing_contact\n ]\n ],\n [\n 'type' => 'tech',\n 'contact' => [\n 'id' => $tech_contact\n ]\n ]\n ]\n ];\n\n // Add Premium Charge If Applicable\n if ($premiumDomainsEnabled && $premiumDomainsCost) {\n $domain['charge']['price'] = $premiumDomainsCost;\n }\n\n // Call The Register Domain Function\n $api->register_domain($domain);\n \n return [\n 'success' => true\n ];\n\n } catch (\\Exception $e) {\n return [\n 'error' => $e->getMessage()\n ];\n }\n}", "public function registerDomain(Domain $domain);", "public function registerDomainAction()\n {\n $shop = $this->container->get('models')\n ->getRepository('Shopware\\Models\\Shop\\Shop')\n ->getDefault();\n\n $shopwareId = $this->Request()->get('shopwareID');\n $password = $this->Request()->get('password');\n $domain = $shop->getHost();\n\n try {\n $token = $this->getToken($shopwareId, $password);\n } catch (Exception $e) {\n $this->View()->assign([\n 'success' => false,\n 'message' => $e->getMessage(),\n ]);\n\n return;\n }\n\n $domains = $this->getDomains($token);\n\n if (in_array($domain, $domains)) {\n $this->View()->assign([\n 'success' => true,\n 'message' => $this->get('snippets')\n ->getNamespace('backend/first_run_wizard/main')\n ->get('alreadyRegisteredDomain'),\n ]);\n }\n\n /** @var AccountManagerService $accountManagerService */\n $accountManagerService = $this->container->get('shopware_plugininstaller.account_manager_service');\n\n try {\n $domainHashData = $accountManagerService->getDomainHash($domain, $token);\n } catch (Exception $e) {\n $this->View()->assign([\n 'success' => false,\n 'message' => $e->getMessage(),\n ]);\n\n return;\n }\n\n $filename = $domainHashData['fileName'];\n $fileContent = $domainHashData['content'];\n if (empty($filename) || empty($fileContent)) {\n $this->View()->assign([\n 'success' => false,\n 'message' => 'Could not perform domain validation due to SBP error',\n ]);\n\n return;\n }\n\n /** @var \\Symfony\\Component\\Filesystem\\Filesystem $fileSystem */\n $fileSystem = $this->container->get('file_system');\n $rootDir = $this->container->getParameter('kernel.root_dir');\n $filePath = $rootDir . DIRECTORY_SEPARATOR . $filename;\n\n try {\n $fileSystem->dumpFile($filePath, $fileContent);\n } catch (Exception $e) {\n $this->View()->assign([\n 'success' => false,\n 'message' => $e->getMessage(),\n ]);\n\n return;\n }\n\n try {\n $accountManagerService->verifyDomain($domain, $this->getVersion(), $token);\n } catch (Exception $e) {\n $this->View()->assign([\n 'success' => false,\n 'message' => $e->getMessage(),\n ]);\n $fileSystem->remove($rootDir . DIRECTORY_SEPARATOR . $filename);\n\n return;\n }\n\n try {\n $fileSystem->remove($rootDir . DIRECTORY_SEPARATOR . $filename);\n } catch (Exception $e) {\n $this->View()->assign([\n 'success' => false,\n 'message' => $e->getMessage(),\n ]);\n\n return;\n }\n\n $this->View()->assign([\n 'success' => true,\n 'message' => 'domainRegistered',\n ]);\n }", "public function createDomain($domain) {\r\n $command = $this->createCommand('SystemDomainAddRequest');\r\n if ($domain != '')\r\n $command->appendChild($this->createElementEscape('domain', $domain));\r\n return $command;\r\n }", "function vpopmail_add_domain($domain, $dir, $uid, $gid){}", "function registerORGDomain($domain=\"\", $openSRS=array(), $owner=array(), $admin=array(), $billing=array(), $tech=array() )\n{\n\tif(!($this->checkPhones($owner,$admin,$billing))) { return 0; }\n\treturn $this->registerCOMDomain($domain,$openSRS,$owner,$admin,$billing,$tech);\n}", "public function humsciAddDomain($environment, $domains) {\n $this->connectAcquiaApi();\n foreach (explode(',', $domains) as $domain) {\n $this->say($this->acquiaDomains->create($this->getEnvironmentUuid($environment), $domain)->message);\n }\n }", "function createDomainResolver($domain)\n {\n $this->files->ensureDirExists($this->resolverPath);\n\n $this->files->put($this->resolverPath.'/'.$domain, 'nameserver 127.0.0.1'.PHP_EOL);\n }", "public function addDomain($domain, $tld_id, $action = \"registerDomain\", $authcode=null) {\n\t\t\n\t\tif ( ! empty ( $domain )) {\n\t\t\t\n\t\t\t// Get the price information for the domain product\n\t\t\t$priceInfo = DomainsTlds::getPrice($tld_id, $action);\n\n\t\t\t// Add the domain in the cart\n\t\t\t$domainitem = new CartItem();\n\t\t\t$domainitem->setName($domain)\n\t\t\t\t\t \t->setId($tld_id)\n\t\t\t \t\t \t->setType('domain')\n\t\t\t\t\t\t->setTaxId($priceInfo['tax_id'])\n\t\t\t\t\t\t->setCost($priceInfo['cost'])\n\t\t\t\t\t\t->setUnitprice($priceInfo['price'])\n\t\t\t\t\t\t->setSetupfee($priceInfo['setupfee'])\n\t\t\t\t\t\t->addOption('domain', array (\n\t\t\t\t\t\t\t\t\t\t\t\t'name' => $domain,\n\t\t\t\t\t\t\t\t\t\t\t\t'tld' => $tld_id,\n\t\t\t\t\t\t\t\t\t\t\t\t'action' => $action,\n\t\t\t\t\t\t\t\t\t\t\t\t'authcode' => $authcode\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\n\t\t\t$this->addItem($domainitem);\n\t\t\t\n\t\t\treturn $domainitem;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "public function storeDomainDistinguishedName(string $domain, DistinguishedName $distinguishedName);", "function dns_gateway_RegisterNameserver($params)\n{\n try {\n\n // User defined configuration values\n $api_username = $params['API_Username'];\n $api_password = $params['API_Password'];\n $ote_api_username = $params['OTE_API_Username'];\n $ote_api_password = $params['OTE_API_Password'];\n $api_dev_mode = $params['Dev_Mode'];\n\n // Domain parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n $domain = $sld . '.' . $tld;\n $registrationPeriod = (\n $params['regperiod'] > 0 ?\n $params['regperiod'] :\n 1\n );\n\n // Nameserver parameters\n $nameserver = $params['nameserver'];\n $ipAddress = $params['ipaddress'];\n\n // Connect To API\n $api = new DNSAPI();\n $api->setcreds(\n $api_username,\n $api_password,\n $api_dev_mode,\n $ote_api_username,\n $ote_api_password\n );\n\n // Grab Domain Info\n $domain_list = $api->list_domains($domain);\n $domain_view = $api->view_domain($domain_list[0]['wid']);\n\n // Prepare Hosts\n $hosts = $domain_view['hosts'];\n $hosts[] = [\n 'hostname' => $params['nameserver'],\n 'glue' => [\n [\n 'ip' => $params['ipaddress'],\n 'class_field' => 'v4'\n ]\n ]\n ];\n\n // Update Domain & Hosts\n $update_array = [\n 'name' => $domain,\n 'period' => $registrationPeriod,\n 'period_unit' => 'y',\n 'authinfo' => $api->generate_password($domain),\n 'hosts' => $hosts, \n 'contacts' => $domain_view['contacts'],\n 'autorenew' => false\n ];\n\n $api->update_domain($update_array, $domain_list[0]['wid']);\n\n return true;\n\n } catch (\\Exception $e) {\n return [\n 'error' => $e->getMessage()\n ];\n }\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the default icon messages will be created with.
public function setDefaultIcon($icon) { $this->icon = $icon; }
[ "public abstract function setIcons();", "private function autoSetIcon(): void\n {\n switch (static::class) {\n case Human::class:\n $this->icon = IconEnum::HUMAN;\n break;\n case Ai::class:\n $this->icon = IconEnum::AI;\n break;\n }\n }", "function process_icon()\n\t{\n\t\tglobal $show, $vbphrase;\n\n\t\tif (!$this->forum['allowicons'] OR $this->post['iconid'] == 0)\n\t\t{\n\t\t\tif (!empty($this->registry->options['showdeficon']))\n\t\t\t{\n\t\t\t\t$this->post['iconpath'] = $this->registry->options['showdeficon'];\n\t\t\t\t$this->post['icontitle'] = $vbphrase['default'];\n\t\t\t}\n\t\t}\n\n\t\t$show['messageicon'] = !empty($this->post['iconpath']);\n\t}", "function SetIcons(wxIconBundle $icons){}", "protected function setIconByType()\n {\n $icons = [\n 'success' => 'fa fa-check-circle',\n 'info' => 'fa fa-info-circle',\n 'danger' => 'fa fa-exclamation-triangle',\n 'warning' => 'fa fa-exclamation-triangle',\n ];\n $this->icon = $icons[$this->type] ?? reset($icons);\n }", "function process_icon()\n\t{\n\t\tglobal $show;\n\n\t\t$show['messageicon'] = false;\n\t}", "public function SetIcon() {\n\n if ($this->icon) {\n echo '<link rel=\"shortcut icon\" href=\"'.$this->icon.'.ico\" />';\n }\n }", "protected function initIcons()\n {\n $notBs3 = !$this->isBs(3);\n $prefix = $this->getDefaultIconPrefix();\n foreach (static::$_icons as $icon => $setting) {\n if (!isset($this->$icon)) {\n $css = !$notBs3 ? $setting[0] : $setting[1];\n $this->$icon = Html::tag('i', '', ['class' => $prefix.$css]);\n }\n }\n }", "protected function setDefaults() {\r\n\t\tif ( ! isset( $this->settings['settings'], $this->settings['settings']['type'] ) ) {\r\n\t\t\t$this->settings['settings']['type'] = 'fontawesome'; // Default type for icons\r\n\t\t}\r\n\r\n\t\t// More about this you can read in http://codeb.it/fonticonpicker/\r\n\t\tif ( ! isset( $this->settings['settings'], $this->settings['settings']['hasSearch'] ) ) {\r\n\t\t\t// Whether or not to show the search bar.\r\n\t\t\t$this->settings['settings']['hasSearch'] = true;\r\n\t\t}\r\n\t\tif ( ! isset( $this->settings['settings'], $this->settings['settings']['emptyIcon'] ) ) {\r\n\t\t\t// Whether or not empty icon should be shown on the icon picker\r\n\t\t\t$this->settings['settings']['emptyIcon'] = true;\r\n\t\t}\r\n\t\tif ( ! isset( $this->settings['settings'], $this->settings['settings']['allCategoryText'] ) ) {\r\n\t\t\t// If categorized then use this option\r\n\t\t\t$this->settings['settings']['allCategoryText'] = __( 'From all categories', 'js_composer' );\r\n\t\t}\r\n\t\tif ( ! isset( $this->settings['settings'], $this->settings['settings']['unCategorizedText'] ) ) {\r\n\t\t\t// If categorized then use this option\r\n\t\t\t$this->settings['settings']['unCategorizedText'] = __( 'Uncategorized', 'js_composer' );\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Source for icons, can be passed via \"mapping\" or with filter vc_iconpicker-type-{your_type} (default fontawesome)\r\n\t\t * vc_filter: vc_iconpicker-type-{your_type} (default fontawesome)\r\n\t\t */\r\n\t\tif ( isset( $this->settings['settings'], $this->settings['settings']['source'] ) ) {\r\n\t\t\t$this->source = $this->settings['settings']['source'];\r\n\t\t\tunset( $this->settings['settings']['source'] ); // We don't need this on frontend.(js)\r\n\t\t}\r\n\t}", "function SetIcon(wxIcon $icon){}", "public function setIcon($icon);", "function vcex_add_default_icon_prefix( $icon ) {\n\treturn 'ticon ticon-' . sanitize_html_class( $icon );\n}", "function initDefaultIcon() {\r\n\t\t$reset = false;\r\n\t\t$basename = $this->worker->initDefaultIcon($reset);\r\n\t\tif (!$basename)\r\n\t\treturn false;\r\n\r\n\t\t$cacheDir = $this->getCacheDir();\r\n\t\t$default_cache = $cacheDir.$basename;\r\n\r\n\t\t$key = 'default-icon';\r\n\t\t$default_icon = $this->getopt($key);\r\n\t\tif (!$default_icon OR (!file_exists($default_cache))) {\r\n\t\t\t$this->opts[$key] = $basename;\r\n\t\t\tupdate_option('faviroll', $this->opts);\r\n\t\t}\r\n\r\n\t\treturn $basename;\r\n\t}", "private function setIconPacks()\n {\n \t$arr_icons = array(\n\t\t\t\"active\" \t\t\t\t\t=> \"glyphicon glyphicon-ok\",\n\t\t\t\"add\" \t\t\t\t\t\t=> \"glyphicon glyphicon-plus\",\n \t\t\"aim\"\t\t\t\t\t\t=> \"glyphicon glyphicon-screenshot\",\n \t\t\"announcement\"\t\t\t\t=> \"glyphicon glyphicon-earphone\",\n\t\t\t\"attachment\" \t\t\t\t=> \"glyphicon glyphicon-paperclip\",\n\t\t\t\"back_old\" \t\t\t\t\t=> \"glyphicon glyphicon-arrow-left\",\n\t\t\t\"back\"\t\t\t\t\t\t=> \"glyphicon glyphicon-arrow-left\",\n \t\t\"back_left\"\t\t\t\t\t=> \"glyphicon glyphicon-arrow-left\",\n\t\t\t\"bar-chart\" \t\t\t\t=> \"glyphicon glyphicon-signal\",\n\t\t\t\"behaviours\" \t\t\t\t=> \"glyphicon glyphicon-link\",\n\t\t\t\"bulk\"\t\t\t\t\t\t=> \"glyphicon glyphicon-bullhorn\",\n \t\t\"cache\"\t\t\t\t\t\t=> \"glyphicon glyphicon-flash\",\n \t\t\"campaigns\"\t\t\t\t\t=> \"glyphicon glyphicon-magnet\",\n\t\t\t\"calendar\" \t\t\t\t\t=> \"glyphicon glyphicon-calendar\",\n \t\t\"city\"\t\t\t\t\t\t=> \"glyphicon glyphicon-king\",\n\t\t\t\"comment\" \t\t\t\t\t=> \"glyphicon glyphicon-paperclip\",\n\t\t\t\"comms\" \t\t\t\t\t=> \"glyphicon glyphicon-volume-down\",\n\t\t\t\"contacts\"\t\t\t\t\t=> 'glyphicon glyphicon-user',\n \t\t\"contact_status\"\t\t\t=> \"glyphicon glyphicon-record\",\n \t\t'dashboard'\t\t\t\t\t=> 'glyphicon glyphicon-dashboard',\n\t\t\t\"database\" \t\t\t\t\t=> \"glyphicon glyphicon-oil\",\n\t\t\t\"delete\" \t\t\t\t\t=> \"glyphicon glyphicon-remove\",\n\t\t\t\"duplicate\" \t\t\t\t=> \"glyphicon glyphicon-floppy-disk\",\n \t\t\"edit\"\t\t\t\t\t\t=> \"glyphicon glyphicon-wrench\",\n\t\t\t\"email\" \t\t\t\t\t=> \"glyphicon glyphicon-envelope\",\n\t\t\t\"exit\" \t\t\t\t\t\t=> \"glyphicon glyphicon-off\",\n\t\t\t\"fax\" \t\t\t\t\t\t=> \"glyphicon glyphicon-phone-alt\",\n\t\t\t\"fields\" \t\t\t\t\t=> \"glyphicon glyphicon-th-list\",\n \"inbox\" => \"glyphicon glyphicon-inbox\",\n\t\t\t\"file_manager\" \t\t\t\t=> \"glyphicon glyphicon-file\",\n\t\t\t\"files\" \t\t\t\t\t=> \"glyphicon glyphicon-folder-close\",\n\t\t\t\"forms\" \t\t\t\t\t=> \"glyphicon glyphicon-list-alt\",\n\t\t\t\"groups\" \t\t\t\t\t=> \"glyphicon glyphicon-globe\",\n \t\t\"help\"\t\t\t\t\t\t=> \"glyphicon glyphicon-question-sign\",\n\t\t\t\"html_templates_comms\" \t\t=> \"glyphicon glyphicon-th\",\n\t\t\t\"html_templates_forms\" \t\t=> \"glyphicon glyphicon-th\",\n\t\t\t\"inactive\" \t\t\t\t\t=> \"glyphicon glyphicon-remove-circle\",\n\t\t\t\"info\" \t\t\t\t\t\t=> \"glyphicon glyphicon-option-horizontal\",\n \t\t\"layout\"\t\t\t\t\t=> \"glyphicon glyphicon-blackboard\",\n\t\t\t\"line-chart\" \t\t\t\t=> \"glyphicon glyphicon-stats\",\n \t\t\"link\"\t\t\t\t\t\t=> \"glyphicon glyphicon-resize-small\",\n \t\t\"links\"\t\t\t\t\t\t=> \"glyphicon glyphicon-resize-small\",\n \t\t\"list\"\t\t\t\t\t\t=> \"glyphicon glyphicon-list\",\n\t\t\t\"load\" \t\t\t\t\t\t=> \"glyphicon glyphicon-floppy-open\",\n\t\t\t\"loading\" \t\t\t\t\t=> \"glyphicon glyphicon-transfer\",\n \t\t\"location\"\t\t\t\t\t=> \"glyphicon glyphicon-cloud-upload\",\n \t\t\"look_feel\"\t\t\t\t\t=> \"glyphicon glyphicon-refresh\",\n\t\t\t\"modify\" \t\t\t\t\t=> \"glyphicon glyphicon-pencil\",\n\t\t\t\"next\" \t\t\t\t\t\t=> \"glyphicon glyphicon-arrow-right\",\n\t\t\t\"order\"\t\t\t\t\t\t=> \"glyphicon glyphicon-sort-by-order\",\n \t\t\"panels\"\t\t\t\t\t=> \"glyphicon glyphicon-flag\",\n\t\t\t\"picture\" \t\t\t\t\t=> \"glyphicon glyphicon-picture\",\n\t\t\t\"pie-chart\" \t\t\t\t=> \"glyphicon glyphicon-adjust\",\n \t\t\"preview\"\t\t\t\t\t=> \"glyphicon glyphicon-eye-open\",\n\t\t\t\"print\" \t\t\t\t\t=> \"glyphicon glyphicon-print\",\n\t\t\t\"profile\" \t\t\t\t\t=> \"glyphicon glyphicon-eye-open\",\n \t\t\"profile-admin\"\t\t\t\t=> \"glyphicon glyphicon-folder-close\",\n \t\t\"profiles\"\t\t\t\t\t=> \"glyphicon glyphicon-folder-close\",\n\t\t\t\"refresh\" \t\t\t\t\t=> \"glyphicon glyphicon-refresh\",\n\t\t\t\"report\" \t\t\t\t\t=> \"glyphicon glyphicon-stats\",\n\t\t\t\"roles\" \t\t\t\t\t=> \"glyphicon glyphicon-link\",\n\t\t\t\"save\" \t\t\t\t\t\t=> \"glyphicon glyphicon-floppy-save\",\n\t\t\t\"search\" \t\t\t\t\t=> \"glyphicon glyphicon-zoom-in\",\n\t\t\t\"secure\" \t\t\t\t\t=> \"\",\n\t\t\t\"settings\" \t\t\t\t\t=> \"glyphicon glyphicon-cog\",\n\t\t\t\"sms\" \t\t\t\t\t\t=> \"glyphicon glyphicon-phone-alt\",\n\t\t\t\"status-error\" \t\t\t\t=> \"glyphicon glyphicon-remove\",\n\t\t\t\"status-info\" \t\t\t\t=> \"glyphicon glyphicon-eye-open\",\n\t\t\t\"status-success\" \t\t\t=> \"glyphicon glyphicon-ok\",\n \t\t\"sync\"\t\t\t\t\t\t=> \"glyphicon glyphicon-retweet\",\n\t\t\t\"tables\" \t\t\t\t\t=> \"glyphicon glyphicon-th-large\",\n\t\t\t\"tasks\" \t\t\t\t\t=> \"glyphicon glyphicon-tasks\",\n\t\t\t\"unsecure\" \t\t\t\t\t=> \"\",\n\t\t\t\"tracker\"\t\t\t\t\t=> \"glyphicon glyphicon-filter\",\n\t\t\t\"upload\" \t\t\t\t\t=> \"glyphicon glyphicon-cloup-upload\",\n \t\t\"user-data-acl\"\t\t\t\t=> \"glyphicon glyphicon-bishop\",\n \t\t\"user\"\t\t\t\t\t\t=> \"glyphicon glyphicon-user\",\n \t\t\"users\" \t\t\t\t\t=> \"glyphicon glyphicon-user\",\n\t\t\t\"warning\" \t\t\t\t\t=> \"glyphicon glyphicon-warning-sign\",\n \t\t\"webhook\"\t\t\t\t\t=> \"glyphicon glyphicon-globe\",\n \t);\n\n \tforeach ($arr_icons as $icon => $css) {\n\n $additional_style = \"\";\n\n //set sepcific icon additional styles\n \t\tswitch ($icon)\n \t\t{\n\n case \"active\":\n\t\t\t\t\t$additional_style = \"color: green;\";\n \t\t\t\tbreak;\n\n \t\t\tcase \"inactive\":\n \t\t\tcase \"delete\":\n \t\t\t\t$additional_style = \"color: red;\";\n \t\t\t\tbreak;\n\n \t\t} //end switch\n\n \t\t$icon = str_replace(\"-\", \"_\", strtoupper($icon));\n \t\tif (!defined(\"ICON_SMALL_{$icon}_HTML\"))\n \t\t{\n \t\t\tdefine(\"ICON_SMALL_{$icon}_HTML\", \"<span style=\\\"$additional_style\\\"><span class=\\\"$css\\\"></span></span>\");\n \t\t\tdefine(\"ICON_MEDIUM_{$icon}_HTML\", \"<span style=\\\"$additional_style\\\"><span class=\\\"$css\\\"></span></span>\");\n \t\t\tdefine(\"ICON_LARGE_{$icon}_HTML\", \"<span style=\\\"$additional_style\\\"><span class=\\\"$css\\\"></span></span>\");\n \t\t\tdefine(\"ICON_XLARGE_{$icon}_HTML\", \"<span style=\\\"$additional_style\\\"><span class=\\\"$css\\\"></span></span>\");\n \t\t\tdefine(\"ICON_CSS_{$icon}_CLASS\", $css);\n \t\t}//end if\n \t}//end foreach\n }", "function setButtonIcon($buttonIcon);", "public function createIcon();", "function default_general_icon_settings() {\n\t$defaults = array(\n\t\t'frontend_icons' =>\t'',\n\t\t'the_nav_icons' =>\t'',\n\t\t'cdn_fa' =>\t'',\n\t);\n\treturn apply_filters( 'default_general_icon_settings', $defaults );\n}", "protected function initDefaultButtons()\n {\n $this->initDefaultButton('view', 'eye');\n $this->initDefaultButton('update', 'edit');\n $this->initDefaultButton('delete', 'trash');\n }", "private function setIconPaths()\n {\n // Directory URL and path\n $plugin = CGIT_SOCIALIZE_PLUGIN;\n $dir = 'icons';\n $url = plugin_dir_url($plugin) . $dir;\n $path = plugin_dir_path($plugin) . $dir;\n\n // Apply filters for customization\n $ext = apply_filters('cgit_socialize_icon_extension', '.svg');\n $url = apply_filters('cgit_socialize_icon_url', $url);\n $path = apply_filters('cgit_socialize_icon_path', $path);\n\n // Make sure directories have trailing slashes\n $url = trailingslashit($url);\n $path = trailingslashit($path);\n\n // Add URLs and paths to each network\n foreach ($this->networks as $key => $value) {\n $this->networks[$key]['icon'] = $url . $key . $ext;\n $this->networks[$key]['icon_path'] = $path . $key . $ext;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds the user password reset link email
function buildPwdResetEmail($user_info, $uniq_hash, $build_html = true, $title = null, $from_address = null) { global $fm_name, $__FM_CONFIG; if ($build_html) { $branding_logo = $GLOBALS['FM_URL'] . str_replace('//', '/', str_replace($GLOBALS['RELPATH'], '', getBrandLogo())); $body = <<<BODY <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" style="background-color: #eeeeee;"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>$title</title> </head> <body style="background-color: #eeeeee; font: 13px 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, Verdana, sans-serif; margin: 1em auto; min-width: 600px; max-width: 600px; padding: 20px; padding-bottom: 50px; -webkit-text-size-adjust: none;"> <div style="margin-bottom: -8px;"> <img src="$branding_logo" style="padding-left: 17px;" /> <span style="font-size: 16pt; font-weight: bold; position: relative; top: -16px; margin-left: 10px;">$fm_name</span> </div> <div id="shadow" style="-moz-border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px; -webkit-border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px; border-radius: 0% 0% 100% 100% / 0% 0% 8px 8px; -moz-box-shadow: rgba(0,0,0,.30) 0 2px 3px !important; -webkit-box-shadow: rgba(0,0,0,.30) 0 2px 3px !important; box-shadow: rgba(0,0,0,.30) 0 2px 3px !important;"> <div id="container" style="background-color: #fff; min-height: 200px; margin-top: 1em; padding: 0 1.5em .5em; border: 1px solid #fff; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: inset 0 2px 1px rgba(255,255,255,.97) !important; -moz-box-shadow: inset 0 2px 1px rgba(255,255,255,.97) !important; box-shadow: inset 0 2px 1px rgba(255,255,255,.97) !important;"> <p>Hi {$user_info['user_login']},</p> <p>You (or somebody else) has requested a link to reset your $fm_name password.</p> <p>If you don't want to reset your password, then you can ignore this message.</p> <p>To reset your password, click the following link:<br /> <<a href="{$GLOBALS['FM_URL']}password_reset.php?key=$uniq_hash&login={$user_info['user_login']}">{$GLOBALS['FM_URL']}password_reset.php?key=$uniq_hash&login={$user_info['user_login']}</a>></p> <p>This link expires in {$__FM_CONFIG['clean']['time']}.</p> </div> </div> <p style="font-size: 10px; color: #888; text-align: center;">$fm_name | $from_address</p> </body> </html> BODY; } else { $body = sprintf('Hi %s, You (or somebody else) has requested a link to reset your %s password. If you don\'t want to reset your password, then you can ignore this message. To reset your password, click the following link: %s', $user_info['user_login'], $fm_name, "{$GLOBALS['FM_URL']}password_reset.php?key=$uniq_hash&login={$user_info['user_login']}"); } return $body; }
[ "protected function sendPasswordResetEmail() {\r\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/' . \\App\\Config::SITE_NAME . '/password/reset/' . $this->password_reset_token;\r\n \r\n $text = \"Please click on the following URL to reset your password: $url\";\r\n $html = \"Please click <a href=\\\"$url\\\">here</a> to reset your password.\";\r\n \r\n Mail::send($this->email, 'Password reset', $text, $html);\r\n }", "protected function sendPasswordResetEmail()\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/password/reset/' . $this->password_reset_token;\n\n $text = View::getTemplate('Password/reset_email.txt', ['url' => $url]);\n $html = View::getTemplate('Password/reset_email.html', ['url' => $url]);\n //var_dump($url);\n Mail::send($this->email, 'Changement de mot de passe', $text, $html);\n }", "function SendPasswordResetLink($email){\r\n\r\n$user=$this->GetUserByEmail($email);\r\n\r\nif($user){\r\n\r\n//get Mail's body\r\n$body=$this->renderPartial(\"reset_password_mail\",array(\r\n\r\n\"user\"=>$user,\r\n\"password_link\"=>$this->ResetPasswordLink($user)\r\n\r\n\r\n),true);\r\n\r\n//now send the mail\r\nreturn helpers::get_controller(MAIL)->SendMail($user->email,\"Reset Password\",$body);\r\n\r\n\r\n}\r\n\r\n}", "function sendPasswordResetMail($user){\n\n $verificationLink = $_SERVER[\"SERVER_NAME\"].\"/resetpassword?id=\".$user->id.\"&token=\".VerificationToken::createToken($user);\n\n $context = [\n \"name\" => $user->firstName,\n \"verificationLink\" => $verificationLink,\n ];\n $body = renderToString(\"mail/passwordreset.php\", $context);\n\n sendMail($user->email, \"Password reset request\", $body);\n}", "function ResetPasswordLink($user){\r\n\r\nreturn $this->createAbsoluteURL(USERS.\"/ResetPassword?uh_=\".$this->UserHash($user));\r\n\r\n}", "public function emailPasswordReset()\n {\n $email = $this->getEmailInstance();\n $email->subject('Requested Password Reset')\n ->template('Propeller/Users.reset_password')\n ->send();\n }", "public function getEmailForPasswordReset();", "public function getResetPasswordMailSender();", "public function passwordResetMail() {\n\t\t$email = Input::post('email');\n\t\t$checkEmail = $this->selectBy('email=?',[Input::post('email')],true);\n\t\tif(count($checkEmail)) {\n\t\t\t$id = $checkEmail->id;\n\t\t\t$checkToken = $this->dbRaw(\"SELECT * FROM email_verification WHERE user_id='{$id}'\");\n\n\t\t\tif(count($checkToken)) {\n\t\t\t\t$to = $email;\n\t\t\t\t$token = $checkToken[0]->token;\n\t\t\t\t$subject = \"Password Reset\";\n\t\t\t\t$body = \"Please Click this link to reset password \" . URL . \"user/verify_email.php?\".\"u=\".Secure::encrypt($id).\"&key=\".$token;\n\t\t\t\tif(mail($to, $subject, $body)) {\n\t\t\t\t\tSession::set('success', 'A verification email has been sent to ' .$email);\n\t\t\t\t}else{\n\t\t\t\t\tSession::set('error', 'An error occured while sending email, Please Try again');\t\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t$token = md5(uniqid());\n\t\t\t\t$data = [\n\t\t\t\t\t'email' => $email,\n\t\t\t\t\t'user_id' => $checkEmail->id,\n\t\t\t\t\t'token'\t => $token,\n\t\t\t\t];\n\t\t\t\tif($this->create($data, 'email_verification')) {\n\t\t\t\t\t$to = $email;\n\t\t\t\t\t$subject = \"Password Reset\";\n\t\t\t\t\t$body = \"Please Click this link to reset password \" . URL . \"user/verify_email.php?\".\"u=\".Secure::encrypt($id).\"&key=\".$token;\n\t\t\t\t\tif(mail($to, $subject, $body)) {\n\t\t\t\t\t\tSession::set('success', 'A verification email has been sent to ' .$email);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSession::set('error', 'An error occured while sending email, Please Try again');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tSession::set('error', 'Please Provide a valid email address');\n\t\t}\n\t}", "public function emailPassResetLink($array) { // $user\n\t\t// Save 'user_email' input as global for sticky form action\n\t\t$_SESSION['forgot_pass_email'] = $array['user_email'];\n\t\t// First, lookup the email address user entered to see if it exists. Make sure you specify active user!! \n\t\t$user = $this->_loadUserData(array('user_email'=>$array['user_email'], 'user_active'=>1));\n\t\t//echo 'user: '.var_dump($user);\n\t\t// If there was no match, return false. Also make sure that there are no duplicates.\n\t\tif(count($user) == 0) {\n\t\t\t$_SESSION['error'][] = 'Sorry, we do not have your email address in our records! Please contact the administrator.';\n\t\t\t// Set global for email_reset_active so that correct form is loaded on index.php\n\t\t\t$_SESSION['email_reset_active'] = true;\n\t\t\treturn false;\n\t\t} elseif (count($user) > 1) {\n\t\t\t$_SESSION['error'][] = '*Error! Multiple user email encountered. Please contact the administrator with this message for assistance.';\n\t\t\t$_SESSION['email_reset_active'] = true;\n\t\t\treturn false;\n\t\t}\n \t\t\n \t\t// Save user_id and user_name from user query\n\t\t$user_id = $user[0]['user_id'];\n\t\t$params = array($user_id);\n\t\t$params[] = $user[0]['user_uname'];\n\t\t\n\t\t// Create unique hash to append to URL and add to $params\n\t\t$hash = uniqid(\"\",TRUE);\n\t\t$params[] = $hash;\n\t\t\n\t\t// Add reset_active param value of true (boolean)\n\t\t$params[] = 1;\n\t\t\n\t\t// Add current date and time to $params\n\t\t$params[] = date(\"Y-m-d H:i:s\");\n\t\t\n\t\t// Build entire URL string to provide as link in reset email\n\t\t$urlHash = urlencode($hash);\n\t\t$site = 'http://www.soscompany.net/';\n\t\t//$site = $array['base_url'];\n\t\t$resetPage = \"index.php\";\n\t\t// Note: 'reset_code' is used in $_GET instruction on index.php for reset password form access\n\t\t$fullUrl = $site.$resetPage.\"?reset_code=\".$urlHash;\n\t\t\n\t\t//echo 'user_id: ' + $user_id + 'user_name: ' + $params[1] + ' hash: ' + $hash + 'fullUrl: ' + $fullUrl;\n\t\t\n\t\t/* Insert reset info into reset_pass table. This is the only place query will be used. Keep in this method.\n\t\t * Note that email_id field is actually the user_id value from user table\n\t\t**/\n\t\t$stmt = \"INSERT INTO reset_pass (email_id, user_uname, pass_key, reset_active, create_date)\n\t\t\t\t VALUES (?,?,?,?,?)\";\n\t\t\n\t\t// Prepare and execute statement\n\t\tif(!($stmt = $this->db->prepare($stmt))) {\n\t\t\t$_SESSION['error'][] = \"Error! We were unable to process you reset request. Please see that administrator with this message.\";\n\t\t\t//sendErrorNew($dbo->errorInfo(), __LINE__, __FILE__);\n\t\t\t// Set global for email_reset_active so that correct form is loaded on index.php\n\t\t\t$_SESSION['email_reset_active'] = true;\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// If INSERT is successful, email user reset password link\n\t\tif(!($stmt->execute($params))) {\n\t\t\t$_SESSION['error'][] = \"Error! We were unable to process you reset request. Please see that administrator with this message.\";\n\t\t\t//sendErrorNew($stmt->errorInfo(), __LINE__, __FILE__);\n\t\t\t// Set global for email_reset_active so that correct form is loaded on index.php\n\t\t\t$_SESSION['email_reset_active'] = true;\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Build email message\n\t\t\t$to = $user[0]['user_email'];\n\t\t\t$subject = \"Password Request Confirmation for SOS Service Portal\";\n\t\t\t$msg = \"Dear \".$user[0]['user_fname'].\", \\n\\n\";\n\t\t\t$msg.= \"You have requested a password reset for the SOS Service Portal.\\n\\n\";\n\t\t\t$msg.= \"Please click on this link to reset your password:\\n\";\n\t\t\t$msg.= $fullUrl.\"\\n\\n\";\n\t\t\t$msg.= \"Thank you,\\n\";\n\t\t\t$msg.= \"SOS Admin\";\n\t\t\t//echo 'msg: '.$msg;\n\t\t\t// Make sure to unset global, as lookup and INSERTs were successful. The wrong form will load if you don't!!\n\t\t\tif(isset($_SESSION['email_reset_active'])) {\n\t\t\t\tunset($_SESSION['email_reset_active']);\n\t\t\t}\n\t\t\t// Make sure that email was successful\n\t\t\t$mail_status = mail($to,$subject,$msg);\n\t\t\tif($mail_status) {\n\t\t\t\t$_SESSION['success'][] = \"Your password reset link was emailed successfully! Please check your email.\";\n\t\t\t} else {\n\t\t\t\t$_SESSION['error'][] = \"Whoops! The system processed your request successfully, but your email failed. Please see the administrator!\";\n\t\t\t}\n\t\t\t// No need to return true or false; the SESSION vars take care of the next form load\n\t\t\treturn;\n\t\t}\n\t}", "protected function sendPasswordResetEmail()\n {\n\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/museum/gamify/password/reset/' . $this->reset_token;\n\n $text = View::getTemplate('Password/reset_email.txt', array('url' => $url));\n $html = View::getTemplate('Password/reset_email.html', array('url' => $url));\n\n Mail::send($this->email, 'Password reset request', $text, $html);\n }", "protected function sendPasswordResetEmail()\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/fyp/public/?Admin/Password/reset/' .\n $this->password_reset_token;\n $text = View::getTemplate('Password/reset_email.txt', ['url' => $url]);\n $html = View::getTemplate('Password/reset_email.html', ['url' => $url]);\n\n Mail::send($this->UA_EMAIL, 'Password reset', $text, $html);\n }", "public function getForgotPasswordEmailTemplate();", "function email_reset_token($username) {\n\t\t\n\t$user = new Login();\n\tif($user->get_user_for_field_with_value(\"email\", $username))\n {\n\n\t\t// This is where you would connect to your emailer\n\t\t// and send an email with a URL that includes the token.\n\t\t\n\t\t$data = getResetDetails($username);\n\t\t\t\t\n $email = $data['email'];\n \n $mailer = new PHPMailer();\n \n $mailer->CharSet = 'utf-8';\n \n $mailer->AddAddress($email,$data['name']);\n \n $mailer->Subject = \"Your reset password request\";\n\n $mailer->From = \"passwordReset.com\";\n\t\t\n $scriptFolder = (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) ? 'https://' : 'http://';\n $scriptFolder .= $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']);\n \n $link = $scriptFolder.\n '/resetpwd.php?email='.\n urlencode($email).'&code='.\n urlencode($data['token']);\n\n $mailer->Body =\"Hello \".$data['name'].\"\\r\\n\\r\\n\".\n \"There was a request to reset your password \".\n \"Please click the link below to complete the request: \\r\\n\".$link.\"\\r\\n\".\n \"Regards,\\r\\n\";\n \n if(!$mailer->Send())\n {\n return false;\n }\n return true;\n\t\t\n\t\t\n\n\t} else {\n\t\treturn false;\n\t}\n\t\n}", "public function sendResetLink()\n {\n try {\n\n $post = Input::all();\n\n // Check if the user exists\n $email = $post['email-reset'];\n\n $user = User::where('email', $email)->firstOrFail();\n\n $resetCode = $user->getResetPasswordCode();\n\n $url = URL::route('user.resetPassword', [$resetCode]);\n\n // TODO: Make message multilanguage\n\n $message = '<html><body><p>Klik op de volgende link om uw wachtwoord opnieuw in te stellen: <a href=\"'. $url . '\">' . $url . '</a></p></body></html>';\n\n \t $headers = \"MIME-Version: 1.0\\n\";\n $headers .= \"Content-Type: text/html; charset=ISO-8859-1\\n\";\n\n $result = mail($email, 'Educal: Reset wachtwoord', $message, $headers);\n\n \\Log::info(\"Sent an email to $email, with the reset link: \" . $url);\n\n return Redirect::route('landing')\n ->withInput(['email-success' => 'Er werd een mail gestuurd met verdere instructies.']);\n\n } catch (ModelNotFoundException $ex) {\n\n return Redirect::route('landing')\n ->withInput(['email-reset' => $email])\n ->withErrors([\"message\" => \"Het email adres werd niet gevonden.\"]);\n }\n\n }", "protected function sendPasswordResetEmail()\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/password/reset/' . $this->password_reset_token;\n\n $text = View::getTemplate('Password/reset_email.txt', ['url' => $url]);\n $html = View::getTemplate('Password/reset_email.html', ['url' => $url]);\n\n Mail::send($this->email, 'Password reset', $text, $html);\n }", "public static function getResetPasswordLink() {\n if (!static::isLoggedIn()) {\n $link_text = apply_filters('core_standards/user_login_form/link_text_reset_password', __('Reset Password'));\n return '<a href=\"/wp-login.php?action=lostpassword\" class=\"user-login-form-reset-password-link\">' . $link_text . '</a>';\n }\n }", "function getResetPasswordUrl() {\n \treturn assemble_url('reset_password', array(\n \t 'user_id' => $this->getId(),\n \t 'code' => $this->getPasswordResetKey(),\n \t));\n }", "protected function sendPasswordResetEmail(): void\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/password/reset/' . $this->password_reset_token;\n\n $text = View::getTemplate('Password/reset_email.txt.twig', ['url' => $url]);\n $html = View::getTemplate('Password/reset_email.html.twig', ['url' => $url]);\n\n Mail::send($this->email, 'Password reset', $text, $html);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation kitAssemblyPutEntityAsyncWithHttpInfo Creates a record or updates an existing record.
public function kitAssemblyPutEntityAsyncWithHttpInfo($entity, $select = null, $filter = null, $expand = null, $custom = null) { $returnType = '\Hut6\CranaplusAcumaticaSdk\Model\KitAssemblyModel'; $request = $this->kitAssemblyPutEntityRequest($entity, $select, $filter, $expand, $custom); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = $responseBody->getContents(); if ($returnType !== 'string') { $content = json_decode($content); } } return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; }, function ($exception) { $response = $exception->getResponse(); $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri() ), $statusCode, $response->getHeaders(), $response->getBody() ); } ); }
[ "public function kitAssemblyPutEntityWithHttpInfo($entity, $select = null, $filter = null, $expand = null, $custom = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\KitAssemblyModel';\n $request = $this->kitAssemblyPutEntityRequest($entity, $select, $filter, $expand, $custom);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Hut6\\CranaplusAcumaticaSdk\\Model\\KitAssemblyModel',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Hut6\\CranaplusAcumaticaSdk\\Model\\HttpErrorModel',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Hut6\\CranaplusAcumaticaSdk\\Model\\HttpErrorModel',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Hut6\\CranaplusAcumaticaSdk\\Model\\HttpErrorModel',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function restShopBuilderContentsPutAsyncWithHttpInfo()\n {\n $returnType = 'object';\n $request = $this->restShopBuilderContentsPutRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function restPimAttributesPutAsyncWithHttpInfo()\n {\n $returnType = 'object';\n $request = $this->restPimAttributesPutRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function accountPutEntityAsyncWithHttpInfo($entity, $select = null, $filter = null, $expand = null, $custom = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\AccountModel';\n $request = $this->accountPutEntityRequest($entity, $select, $filter, $expand, $custom);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function leadPutEntityAsyncWithHttpInfo($entity, $select = null, $filter = null, $expand = null, $custom = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\LeadModel';\n $request = $this->leadPutEntityRequest($entity, $select, $filter, $expand, $custom);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function restPimAttributesNamesPutAsyncWithHttpInfo()\n {\n $returnType = 'object';\n $request = $this->restPimAttributesNamesPutRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function customerClassPutEntityAsyncWithHttpInfo($entity, $select = null, $filter = null, $expand = null, $custom = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\CustomerClassModel';\n $request = $this->customerClassPutEntityRequest($entity, $select, $filter, $expand, $custom);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function accountByPeriodInquiryPutEntityAsyncWithHttpInfo($entity, $select = null, $filter = null, $expand = null, $custom = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\AccountByPeriodInquiryModel';\n $request = $this->accountByPeriodInquiryPutEntityRequest($entity, $select, $filter, $expand, $custom);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function shipmentPutEntityAsyncWithHttpInfo($entity, $select = null, $filter = null, $expand = null, $custom = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\ShipmentModel';\n $request = $this->shipmentPutEntityRequest($entity, $select, $filter, $expand, $custom);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function shippingBoxPutEntityAsyncWithHttpInfo($entity, $select = null, $filter = null, $expand = null, $custom = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\ShippingBoxModel';\n $request = $this->shippingBoxPutEntityRequest($entity, $select, $filter, $expand, $custom);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function trialBalancePutEntityAsyncWithHttpInfo($entity, $select = null, $filter = null, $expand = null, $custom = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\TrialBalanceModel';\n $request = $this->trialBalancePutEntityRequest($entity, $select, $filter, $expand, $custom);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function songCurrentSongPutAsyncWithHttpInfo()\n {\n $returnType = '';\n $request = $this->songCurrentSongPutRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function kitAssemblyPutFileAsync($ids, $filename)\n {\n return $this->kitAssemblyPutFileAsyncWithHttpInfo($ids, $filename)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function quotesV2PutAsyncWithHttpInfo($id2, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology, $id)\n {\n $returnType = 'object';\n $request = $this->quotesV2PutRequest($id2, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology, $id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function customerLocationPutEntityAsync($entity, $select = null, $filter = null, $expand = null, $custom = null)\n {\n return $this->customerLocationPutEntityAsyncWithHttpInfo($entity, $select, $filter, $expand, $custom)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function swarmInitAsyncWithHttpInfo($body)\n {\n $returnType = 'string';\n $request = $this->swarmInitRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function ordersV2PutAsyncWithHttpInfo($id2, $amount, $customer_id, $currency_code, $created_utc, $vat_amount, $roundings_amount, $delivered_amount, $delivered_vat_amount, $delivered_roundings_amount, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $your_reference, $our_reference, $invoice_address1, $invoice_address2, $invoice_city, $invoice_country_code, $invoice_customer_name, $invoice_postal_code, $delivery_method_name, $delivery_method_code, $delivery_term_name, $delivery_term_code, $eu_third_party, $customer_is_private_person, $order_date, $status, $number, $modified_utc, $delivery_date, $house_work_amount, $house_work_automatic_distribution, $house_work_corporate_identity_number, $house_work_property_name, $rows, $shipped_date_time, $rot_reduced_invoicing_type, $rot_property_type, $persons, $reverse_charge_on_construction_services, $uses_green_technology, $id)\n {\n $returnType = 'object';\n $request = $this->ordersV2PutRequest($id2, $amount, $customer_id, $currency_code, $created_utc, $vat_amount, $roundings_amount, $delivered_amount, $delivered_vat_amount, $delivered_roundings_amount, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $your_reference, $our_reference, $invoice_address1, $invoice_address2, $invoice_city, $invoice_country_code, $invoice_customer_name, $invoice_postal_code, $delivery_method_name, $delivery_method_code, $delivery_term_name, $delivery_term_code, $eu_third_party, $customer_is_private_person, $order_date, $status, $number, $modified_utc, $delivery_date, $house_work_amount, $house_work_automatic_distribution, $house_work_corporate_identity_number, $house_work_property_name, $rows, $shipped_date_time, $rot_reduced_invoicing_type, $rot_property_type, $persons, $reverse_charge_on_construction_services, $uses_green_technology, $id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function auManagerRosterShiftPutAsyncWithHttpInfo($roster_shift_id, $publish, $business_id, $shift_model, string $contentType = self::contentTypes['auManagerRosterShiftPut'][0])\n {\n $returnType = '';\n $request = $this->auManagerRosterShiftPutRequest($roster_shift_id, $publish, $business_id, $shift_model, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function auEmployingEntityPutAsyncWithHttpInfo($id, $business_id, $employing_entity, string $contentType = self::contentTypes['auEmployingEntityPut'][0])\n {\n $returnType = '\\OpenAPI\\Client\\Model\\AuEmployingEntityModel';\n $request = $this->auEmployingEntityPutRequest($id, $business_id, $employing_entity, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ getDownvoteLevel() Update the different downvote levels coming from the frontend
function getDownvoteLevel($route, $type, $websocketClientIp = '') { global $clientIp; // take client ip from websocket if(empty($websocketClientIp) === false){ $clientIp = $websocketClientIp; } // initialize database $db = new ClientDB(); $admin = checkAdmin($clientIp); if ($admin) { $downvoteLevelQuery = $db->query("SELECT a_downvote_level FROM admins WHERE u_ip = '$clientIp'"); $downvoteLevelArray = $downvoteLevelQuery->fetchArray(SQLITE3_ASSOC); $downvoteLevel = $downvoteLevelArray['a_downvote_level']; // close db $db->close(); unset($db); } else { // close db $db->close(); unset($db); return '{"route":"' . $route . '", "type": "error", "message": "user is not an admin and can not change the downvote level"}'; } return '{"route":"' . $route . '", "type": "' . $type . '", "downvoteLevel":' . $downvoteLevel . '}'; }
[ "function upgrade_level()\n {\n // get actual points and level of the user (maybe we have to upgrade the level)\n $result = query(\"SELECT points, level FROM \". USERS_TABLE . \" WHERE id = ?\", $_SESSION[\"id\"]);\n if ($result === false or count($result[0]) != 2)\n {\n // something got wrong\n return false;\n }\n $points = $result[0][\"points\"];\n $level = $result[0][\"level\"];\n \n // change: 0 for no change, -1 to decrease, 1 to increase.\n $change = 0;\n \n // if the number of points exceed 10^(level + 1).\n if ($points >= pow(10, $level + 1))\n {\n $change = +1;\n }\n // if the number of points dropped under 10^level\n else if ($points < pow(10, $level))\n {\n $change = -1;\n }\n \n // Execute the query only if we have to update the level\n if ($change != 0)\n {\n // update the level\n $result = query(\"UPDATE \" . USERS_TABLE . \" SET level = level + ? WHERE id = ?\", $change, $_SESSION[\"id\"]);\n // if we managed to update the level\n if ($result === false)\n {\n return false;\n }\n }\n \n // return the updated level\n $level = $level + $change;\n return $level;\n }", "public function setDownvote($id,$downvote){\n\t\t$result['success'] = \"true\";\n\t $result['errorCode'] = \"0\";\n\t\ttry{\n\t \t$this->db->where('id', $id);\n\t \t$this->db->update('discussion_thread', array('downvote' => $downvote));\n\t \t$num = $this->db->affected_rows();\n\t \n\t if($num>0){\n\t\t\t\t$result['success'] = \"true\";\n\t\t\t\t$result['errorCode'] = \"0\";\n\t }\t\n\t \n\t\t}catch(Exception $e){\n\t\t\t$result['success'] = \"false\";\n\t $result['errorCode'] = \"1\";\n\t\t}\n\t\treturn $result;\n\t}", "public function getDownvotes()\n {\n return $this->downvotes;\n }", "public function getDownVoteCount()\n {\n return $this->downVoteCount;\n }", "public function getDownvotes()\n {\n return $this['downs'];\n }", "public function down_vote_model()\n {\n //inputs for the method to work\n $postid=$_POST['data'];\n $uid=$this->session->userdata('uid');\n //check_vote returns a 'none' value if not found or the val of the vote is displayed or 'max', 'min'\n $check_vote_result=$this->check_vote();\n\n if ($check_vote_result=='min') {\n //cannot downvote\n echo \"(Min) \";\n } else {\n //able to downvote\n if ($check_vote_result=='none') {\n //insert into db if record doesn't exist\n $data_insert=array(\n 'u_id'=>$uid,\n 'post_id'=>$postid,\n 'val'=>-1,\n 'time_vote'=>time()\n );\n $this->db->insert('votes', $data_insert);\n } else {\n //update val if record exists\n if ($check_vote_result=='max') {\n $check_vote_result=5;\n }\n $check_vote_result_updated=$check_vote_result-1;\n $data_vote_result=array(\n 'val'=>$check_vote_result_updated,\n 'time_vote'=>time()\n );\n $this->db->where('u_id', $uid);\n $this->db->where('post_id', $postid);\n $this->db->update('votes', $data_vote_result);\n }\n }\n //echo total votes result\n echo $this->get_vote_result();\n }", "public function getDownVotes()\n {\n return $this->downVotes;\n }", "public function getDownVotes()\n {\n return (int)$this->downVotes;\n }", "function Downvote(){\n\t\t$reel = Reel::FindById($_POST['reel_id']);\n\t\t$reel->Downvote();\t\t\n\t}", "public function getLevel(){\n return $this->userLevel;\n }", "function procUpdateLevel() {\n global $session, $database, $form;\n /* Username error checking */\n $subuser = $this->checkUsername(\"upduser\");\n\n /* Errors exist, have user correct them */\n if ($form->num_errors > 0) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n header(\"Location: \" . $session->referrer);\n }\n /* Update user level */ else {\n $database->updateUserField($subuser, \"userlevel\", (int) $_POST['updlevel']);\n header(\"Location: \" . $session->referrer);\n }\n }", "function get_product_levels_callback() {\r\n\tglobal $wpdb;\r\n\tif (isset($_POST['Project'])) {\r\n\t\t$project_id = absint($_POST['Project']);\r\n\t\t$project = new ID_Project($project_id);\r\n\t\t\r\n\t\t$product_settings = $project->get_project_settings();\r\n\t\tif (empty($product_settings)) {\r\n\t\t\t$product_settings = $project->get_project_defaults();\r\n\t\t}\r\n\t\t//GETTING the currency symbol\r\n\t\tif (isset($product_settings)) {\r\n\t\t\t$currencyCodeValue = $product_settings->currency_code;\t\r\n\t\t\t$cCode = setCurrencyCode($currencyCodeValue);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$currencyCodeValue = 'USD';\r\n\t\t\t$cCode = '$';\r\n\t\t}\r\n\t\t\r\n\t\t$post_id = $project->get_project_postid();\r\n\t\t\r\n\t\t$level_count = get_post_meta($post_id, 'ign_product_level_count', true);\r\n\t\t$meta_price_1 = get_post_meta( $post_id, \"ign_product_price\", true );\r\n\t\t$options = \"<option data-price='\".id_price_format($meta_price_1).\"' value=\\\"1\\\">\".__('Level', 'ignitiondeck').\" 1: \".apply_filters('id_display_currency', apply_filters('id_price_format', absint($meta_price_1), $post_id), absint($meta_price_1), $post_id).\"</option>\";\r\n\t\tif (isset($level_count) && $level_count > 1) {\r\n\t\t\t\r\n\t\t\tfor ($i=2 ; $i <= $level_count ; $i++) {\r\n\t\t\t\t$meta_price = get_post_meta( $post_id, $name=\"ign_product_level_\".($i).\"_price\", true );\r\n\t\t\t\t$options .= \"<option data-price='\".id_price_format($meta_price, $post_id).\"' value=\\\"\".($i).\"\\\">\".__('Level', 'ignitiondeck').\" \".($i).\": \".($meta_price > 0 ? apply_filters('id_display_currency', apply_filters('id_price_format', $meta_price, $post_id), $meta_price, $post_id) : __('No Price Set', 'ignitiondeck')).\"</option>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\techo $options;\r\n\t}\r\n\texit;\r\n\t\t\t\r\n}", "public function voteUp(){\n return $this->vote(1);\n }", "public function procUpdateLevel() {\n\n /* Username error checking */\n $subuser = $this->checkUsername(\"upduser\");\n\n /* Errors exist, have user correct them */\n if ($this->form->num_errors > 0) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $this->form->getErrorArray();\n header(\"Location: \" . $this->session->referrer);\n }\n /* Update user level */ else {\n $this->connection->updateUserField($subuser, \"userlevel\", (int) $_POST['updlevel']);\n header(\"Location: \" . $this->session->referrer);\n }\n }", "public static function maxLevel()\n\t{\n\t\tif (!auth()->check()) return 0;\n\t\t$member = \\PanicHDMember::find(auth()->user()->id);\n\t\tif ($member->isAdmin()){\n\t\t\treturn 3;\n\t\t}elseif($member->isAgent()){\n\t\t\treturn 2;\n\t\t}else\n\t\t\treturn 1;\n\t}", "public function DetermineLevel(){\n\n\t $UserCompelteTasks = self::has30Task();\n\n\t foreach ($UserCompelteTasks as $key => $User) {\n\n\t if($self::GetDegreeOfTasks($User->id) >= 70){\n\n\t User::where('id',$User->id)->update(['level'=>'1']);\n\n\t }\n\t }//end foreach\n\n }", "public static function testLevelUp(){\n\n $lId = FacebookUtils::getId();\n $goodXp = static::getGoodXp();\n $badXp = static::getBadXp();\n $player = Player::getPlayerById($lId);\n\n if($goodXp->Quantity >= static::getMax() && $badXp->Quantity >=static::getMax()) {\n Resources::updateResources($lId,'badXp', 0);\n Resources::updateResources($lId,'goodXP', 0);\n Utils::updateSetWhere('Player', ['Level' => $player->Level + 1], 'ID = '.$lId);\n $badXp->Quantity = 0;\n $goodXp->Quantity = 0;\n $player->Level++;\n }\n\n return (object) array('badXp' => $badXp->Quantity, 'goodXp' => $goodXp->Quantity, 'level' => $player->Level);\n }", "public function checkLevelBadge(){\n\t\t$level1_limit = 2;\n\t\t$level2_limit = 5;\n\t\t$level3_limit = 10;\n\t\t$level4_limit = 20;\n\t\t$level5_limit = 50;\n\t\tif ($this->level >= $level1_limit && !($this->hasBadge(LEVELBADGE1)) ){ $this->giveBadge(LEVELBADGE1); }\n\t\tif ($this->level >= $level2_limit && !($this->hasBadge(LEVELBADGE2)) ){\t$this->giveBadge(LEVELBADGE2); }\n\t\tif ($this->level >= $level3_limit && !($this->hasBadge(LEVELBADGE3)) ){\t$this->giveBadge(LEVELBADGE3); }\n\t\tif ($this->level >= $level4_limit && !($this->hasBadge(LEVELBADGE4)) ){\t$this->giveBadge(LEVELBADGE4); }\n\t\tif ($this->level >= $level5_limit && !($this->hasBadge(LEVELBADGE5)) ){\t$this->giveBadge(LEVELBADGE5); }\n\t}", "function update_user_level_from_caps() {\n\t\tglobal $wpdb;\n\t\t$this->user_level = array_reduce( array_keys( $this->allcaps ), array( &$this, 'level_reduction' ), 0 );\n\t\tupdate_usermeta( $this->ID, $wpdb->prefix.'user_level', $this->user_level );\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display a listing of countries.
public function index() { return $this->view('geography.countries.index')->with('items', Country::all()); }
[ "public function listCountries()\n {\n TheliaApiException::throwApiExceptionFaultUnless(\n $this->api->checkAccess('configuration',1,0),\n TheliaApiException::ERROR,\n TheliaApiException::E_unavailable);\n\n $query = 'SELECT pd.titre, p.id, p.isocode, p.isoalpha2, p.isoalpha3 FROM '.Pays::TABLE.' p LEFT JOIN '.Paysdesc::TABLE.' pd ON p.id = pd.pays WHERE pd.lang=1';\n\n $countries = $this->api->query_liste($query);\n\n TheliaApiTools::displayResult(array(\"status\" => \"ok\", \"countries\" => $countries));\n\n }", "public function getIndex()\n {\n $countries = $this->countries->findAll();\n\n $this->view('admin.countries.list', compact('countries'));\n }", "public function actionIndex()\n {\n $searchModel = new CountrySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getAllCountries();", "public function listCountries()\n {\n $path = \"/api/v2/definitions/countries\";\n $guzzleParams = [\n 'query' => [],\n 'body' => null\n ];\n return $this->restCall($path, 'GET', $guzzleParams);\n }", "public function getCountriesAction()\n {\n // Load shop repository\n $repository = Shopware()->Models()->getRepository(\\Shopware\\Models\\Country\\Country::class);\n $query = $repository->getCountriesQuery(\n $this->Request()->getParam('filter', []),\n $this->Request()->getParam('sort', []),\n $this->Request()->getParam('start'),\n $this->Request()->getParam('limit')\n );\n\n // Get total result of the query\n $total = Shopware()->Models()->getQueryCount($query);\n\n // Select all shop as array\n $data = $query->getArrayResult();\n\n // Return the data and total count\n $this->View()->assign(['success' => true, 'data' => $data, 'total' => $total]);\n }", "public function get_all_countries_list()\n\t {\n\t \t$query=$this->ApiModel->get_all_countries();\n\t \techo json_encode($query);\n\t }", "function countryList()\n {\n $arrClms = array(\n 'country_id',\n 'name',\n );\n $varOrderBy = 'name ASC ';\n $arrRes = $this->select(TABLE_COUNTRY, $arrClms);\n return $arrRes;\n }", "function countryList() {\n $arrClms = array('country_id', 'name');\n $varWhr = '1 ';\n $varOrderBy = 'name ASC ';\n $arrRes = $this->select(TABLE_COUNTRY, $arrClms, $varWhr, $varOrderBy);\n //pre($arrRes);\n return $arrRes;\n }", "public function getAllCountries()\n {\n $position = 1;\n\n $sortableColumns = ['total_players','total_score','total_points','total_time_played','country_id'];\n\n $orderBy = Request::has('orderBy') && in_array(Request::get('orderBy'),$sortableColumns) ? Request::get('orderBy') : 'total_players';\n $sortDir = Request::has('direction') ? Request::get('direction') : 'desc';\n\n $players = PlayerTotal::CountryAggregate()->orderBy($orderBy,$sortDir)->paginate();\n\n return view('statistics.countries')->with('players',$players)->with('position',$position);\n }", "function countries_list(){\n\t\n\t\t$sql=\"SELECT * FROM \".$this->prefix().\"countries \";\n\t\treturn $this->query($sql);\n\t}", "function displayAvailableCountries() {\n $db = dbConnect();\n $countries = dbGetAllCountries($db); // Récupération des pays\n\n // Création d'une ligne par pays avec comme value le code ISO et comme texte le nom du pays\n foreach($countries as $country) {\n echo \"<option value='\" . $country->getIso_code() . \"'>\" . $country->getName() . \"</option>\";\n }\n }", "public function getCountries();", "public function getCountryList()\n {\n return $this->getAllExternal('res.country', array('code'));\n }", "public function getCountries() {\r\n\t\r\n\t\t$url = $this->_buildURL('countries');\r\n\t\treturn $this->_call($url);\r\n\t}", "public function country_list()\n {\n $result = common_select_values('id, name', 'ad_countries', '', 'result');\n return $result; \n }", "public function get_country_list() {\n\t\t$s = \"SELECT \" . self::COL_NAME . \" FROM \" . self::TBL_COUNTRY;\n\t\treturn $this->run($s, self::COL_NAME);\n\t}", "public function countryList()\n\t{\n\t\t$sql = \"SELECT * FROM api_countries\";\n\t\t$result = mysql_query($sql,$this->connection);\n\t\treturn $result;\n\t}", "public function countryfilterAction()\n {\n $page = $this->params()->fromQuery('page', 1);\n $filter = $this->params()->fromRoute('country', null);\n\n // Filter posts by Country\n $query = $this->entityManager->getRepository(Post::class)->findPostsByCountry($filter);\n\n $adapter = new DoctrineAdapter(new ORMPaginator($query, false));\n $paginator = new Paginator($adapter);\n $paginator->setDefaultItemCountPerPage(15);\n $paginator->setCurrentPageNumber($page);\n\n /* Change layout */\n $this->layout()->setTemplate('layout/layout-front');\n\n /* Latest 3 posts */\n $latestPosts = $this->entityManager->getRepository(Post::class)->findLatestPosts(2);\n\n /* Countries List */\n $countries = $this->entityManager->getRepository(Post::class)->getCountries();\n\n /* Cuisine Types list */\n $types = $this->entityManager->getRepository(Post::class)->getCuisineTypes();\n\n // Render the view template.\n return new ViewModel([\n 'posts' => $paginator,\n 'postManager' => $this->postManager,\n 'countries' => $countries,\n 'types' => $types,\n 'latestPosts' => $latestPosts\n ]);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches what components among self::$COMPATIBLE_COMPONENTS are currently installed. Also checks version numbers to be greater than or equal to the min_version field.
public function getInstalledCompatibleComponents() { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('e.element,e.manifest_cache'); $query->from('#__extensions AS e'); $db->setQuery($query); $options = array(); foreach (self::$COMPATIBLE_COMPONENTS as $comp) { $options[] = $db->quote($comp['component']); //$version = $comp['min_version']; } $query->where('e.element in (' . implode(',', $options) . ')'); $db->setQuery($query); $candidates = $db->loadAssocList('element', 'manifest_cache'); $extensions = array(); foreach (self::$COMPATIBLE_COMPONENTS as $comp) { $option = $comp['component']; $version = $comp['min_version']; $manifest = json_decode($candidates[$option]); if($manifest && $manifest->version && version_compare($manifest->version, $version, '>=')){ $extensions[$option] = $comp; } } return $extensions; }
[ "protected function init_components_list() {\n global $DB;\n $this->log('Loading the list of registered components', amos_cli_logger::LEVEL_DEBUG);\n\n list($branchsql, $params) = $DB->get_in_or_equal(array_keys($this->get_versions()), SQL_PARAMS_NAMED);\n\n $sql = \"SELECT DISTINCT branch, component\n FROM {amos_repository}\n WHERE lang = 'en'\n AND deleted = 0\n AND branch $branchsql\n ORDER BY branch, component\";\n\n $rs = $DB->get_recordset_sql($sql, $params);\n foreach ($rs as $record) {\n if (!isset($this->components[$record->branch])) {\n $this->components[$record->branch] = array();\n }\n $this->components[$record->branch][] = $record->component;\n }\n $rs->close();\n }", "protected static function checkVersions()\n {\n $checkLicense = static::getLicenseFlag();\n foreach (static::$activeModules as $module => $data) {\n if (\\XLite::getInstance()->checkVersion(static::callModuleMethod($module, 'getMajorVersion'), '!=')\n || (\n \\XLite::getInstance()->checkVersion(static::callModuleMethod($module, 'getMajorVersion'), '=')\n && \\XLite::getInstance()->checkMinorVersion(static::callModuleMethod($module, 'getMinorRequiredCoreVersion'), '<')\n )\n ) {\n static::disableModule($module);\n }\n }\n }", "public function check_gf_requirements_plugins_array() {\n\n $requirements = $this->parent->minimum_requirements();\n\t $meets_requirements = array();\n\n\t foreach ( rgar( $requirements, 'plugins', array() ) as $plugin_path => $plugin_requirement ) {\n\n\t\t if ( ! is_array( $plugin_requirement ) ) {\n\t\t\t continue;\n\t\t }\n\n\t\t $name = rgar( $plugin_requirement, 'name' );\n\t\t $version = rgar( $plugin_requirement, 'version' );\n\n\t\t if ( ! $name || ! $version ) {\n\t\t\t continue;\n\t\t }\n\n\t\t if ( ! is_plugin_active( $plugin_path ) ) {\n\t\t\t $meets_requirements['meets_requirements'] = false;\n\n\t\t\t if ( ! $version ) {\n\t\t\t\t $meets_requirements['errors'][] = sprintf( esc_html__( 'Required WordPress plugin is missing: %s.', 'gravityperks' ), $name );\n\n\t\t\t\t continue;\n\t\t\t }\n\n\t\t\t $meets_requirements['errors'][] = sprintf( esc_html__( 'Required WordPress plugin is missing: %1$s (%2$s).', 'gravityperks' ), $name, $version );\n\t\t\t continue;\n\t\t }\n\n\t\t $plugin_data = get_plugin_data( WP_CONTENT_DIR . '/plugins/' . $plugin_path );\n\n\t\t if ( version_compare( rgar( $plugin_data, 'Version' ), $version, '<' ) ) {\n\t\t\t $meets_requirements['errors'][] = sprintf( esc_html__( 'Current %1$s version (%2$s) does not meet minimum %1$s version requirement (%3$s).', 'gravityperks' ), $name, rgar( $plugin_data, 'Version' ), $version );\n\t\t }\n\n\t }\n\n\t return $meets_requirements;\n\n }", "protected function checkPackages()\n {\n require_once 'ModuleInstall/PackageManager/PackageManager.php';\n\n $this->log(\"Checking packages\");\n $pm = $this->getPackageManager();\n $packages = $pm->getinstalledPackages(array('module'));\n foreach ($packages as $pack) {\n if ($pack['enabled'] == 'DISABLED') {\n $this->log(\"Disabled package {$pack['name']} (version {$pack['version']}) detected\");\n continue;\n }\n $this->log(\"Package {$pack['name']} (version {$pack['version']}) detected\");\n if (array_key_exists($pack['name'], $this->packages)) {\n $incompatible = false;\n foreach ($this->packages[$pack['name']] as $req) {\n if (empty($req['version'])) {\n $incompatible = true;\n } elseif ($req['version'] == '*' || version_compare($pack['version'], $req['version'], '<')) {\n $incompatible = true;\n }\n if (!empty($req['author'])) {\n $uh = new UpgradeHistory();\n $uh->retrieve_by_string_fields(\n array('name' => $pack['name'], 'version' => $pack['version']),\n true,\n false\n );\n $manifest = unserialize(base64_decode($uh->manifest));\n $manifest = $manifest['manifest'];\n $scp = strcasecmp($manifest['author'], $req['author']);\n $incompatible = $incompatible && ($req['author'] == '*' || empty($scp));\n }\n\n if (!empty($req['path']) && is_dir($req['path']) &&\n is_callable(array('SugarAutoLoader', 'addDirectory'))\n ) {\n SugarAutoLoader::addDirectory($req['path']);\n }\n\n if ($incompatible) {\n break;\n }\n }\n if ($incompatible) {\n $this->updateStatus(\"incompatIntegration\", $pack['name'], $pack['version']);\n }\n }\n }\n }", "private function updateComponentObjectConditions()\n {\n $db = JFactory::getDbo(); \n \t\t$query\t= $db->getQuery(true);\n\n\t\t// Select the required components from the table.\n\t\t$query->select('a.id, a.joomla_features, a.joomla_parts'); \n\t\t$query->from($db->quoteName('#__componentarchitect_componentobjects').' AS a');\n\n\t\t$db->setQuery($query);\n\n\t\t// Return the result\n\t\t$records = $db->loadObjectList();\n\t\t\n\t\tforeach ($records as $record)\n\t\t{\n\t\t\t$registry = new JRegistry;\n\t\t\t$registry->loadString($record->joomla_features);\n\t\t\t$joomla_features = $registry->toArray();\n\t\t\t$registry = null; //release memory\n\t\t\t\n\t\t\tif (!isset($joomla_features['include_microdata']))\n\t\t\t{\n\t\t\t\t$joomla_features = $this->insert_into_array($joomla_features, 'include_metadata', 'include_microdata', '1', true, false);\n\t\t\t}\n\t\t\t\t\n\t\t\t$registry = new JRegistry;\n\t\t\t$registry->loadArray($joomla_features);\n\t\t\t$joomla_features = (string)$registry;\n\t\t\t$registry = null; //release memory\t\n\t\t\t\n\t\t\t$registry = new JRegistry;\n\t\t\t$registry->loadString($record->joomla_parts);\n\t\t\t$joomla_parts = $registry->toArray();\n\t\t\t$registry = null; //release memory\n\t\t\t\n\t\t\tif (!isset($joomla_parts['generate_plugins_emailcloak']))\n\t\t\t{\n\t\t\t\t$joomla_parts = $this->insert_into_array($joomla_parts, 'generate_plugins_pagebreak', 'generate_plugins_emailcloak', '1', true, false);\n\t\t\t}\n\n\t\t\tif (!isset($joomla_parts['generate_plugins_loadmodule']))\n\t\t\t{\n\t\t\t\t$joomla_parts = $this->insert_into_array($joomla_parts, 'generate_plugins_emailcloak', 'generate_plugins_loadmodule', '1', true, false);\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t$registry = new JRegistry;\n\t\t\t$registry->loadArray($joomla_parts);\n\t\t\t$joomla_parts = (string)$registry;\n\t\t\t$registry = null; //release memory\t\n\t\t\t\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$db->setQuery\n\t\t\t\t(\n\t\t\t\t\t'UPDATE '.$db->quoteName('#__componentarchitect_componentobjects').\n\t\t\t\t\t' SET '.$db->quoteName('joomla_features').' = '.$db->quote($joomla_features).\n\t\t\t\t\t', '.$db->quoteName('joomla_parts').' = '.$db->quote($joomla_parts).\n\t\t\t\t\t' WHERE '.$db->quoteName('id').' = '.$record->id\n\t\t\t\t);\n\t\t\t\t$db->execute();\n\t\t\t}\t\t\t\n\t\t\tcatch (RuntimeException $e)\n\t\t\t{\n\t\t\t\tJFactory::getApplication()->enqueueMessage(JTEXT::sprintf('COM_COMPONENTARCHITECT_INSTALL_ERROR_ON_COMPONENTOBJECT_UPDATE', $record->id), 'warning');\n\t\t\t}\t\n\t\t}\t\n\t}", "static function checkInstall()\n {\n // check if ChatWing component is installed\n if (!JComponentHelper::getComponent('com_chatwing', true)->enabled)\n {\n if (self::DEBUG)\n {\n JFactory::getApplication()->enqueueMessage('ChatWing component is not installed!!', 'error');\n }\n return false;\n }\n else\n {\n return true;\n }\n }", "public function isInstalled()\n\t{\n\t\t$db = JFactory::getDBO();\n\t\t$q = sprintf(\"SELECT * FROM jos_components WHERE parent = 0 AND `option` LIKE 'com_%s' LIMIT 1\",str_replace('_','',$this->name));\n\t\t$db->execute($q);\n\t\treturn ($object = $db->loadObject()) ? $object->id : false;\n\t}", "function isCompatible($pf) {\n\t\tif (! isset ( $this->_packageInfo ['compatible'] )) {\n\t\t\treturn false;\n\t\t}\n\t\tif (! isset ( $this->_packageInfo ['channel'] )) {\n\t\t\treturn false;\n\t\t}\n\t\t$me = $pf->getVersion ();\n\t\t$compatible = $this->_packageInfo ['compatible'];\n\t\tif (! isset ( $compatible [0] )) {\n\t\t\t$compatible = array ($compatible );\n\t\t}\n\t\t$found = false;\n\t\tforeach ( $compatible as $info ) {\n\t\t\tif (strtolower ( $info ['name'] ) == strtolower ( $pf->getPackage () )) {\n\t\t\t\tif (strtolower ( $info ['channel'] ) == strtolower ( $pf->getChannel () )) {\n\t\t\t\t\t$found = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (! $found) {\n\t\t\treturn false;\n\t\t}\n\t\tif (isset ( $info ['exclude'] )) {\n\t\t\tif (! isset ( $info ['exclude'] [0] )) {\n\t\t\t\t$info ['exclude'] = array ($info ['exclude'] );\n\t\t\t}\n\t\t\tforeach ( $info ['exclude'] as $exclude ) {\n\t\t\t\tif (version_compare ( $me, $exclude, '==' )) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (version_compare ( $me, $info ['min'], '>=' ) && version_compare ( $me, $info ['max'], '<=' )) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected function compareVersion()\n {\n $manifest = $this->getManifest();\n $extensionEntity = $this->getExtensionEntity();\n\n if (isset($extensionEntity)) {\n $comparedVersion = version_compare($manifest['version'], $extensionEntity->get('version'), '>=');\n if ($comparedVersion <= 0) {\n $this->throwErrorAndRemovePackage('You cannot install an older version of this extension.');\n }\n }\n }", "private function _setAvailableComponent() {\n foreach ($this->yui_component as $key => $val) {\n $filename = $this->ciwy_path.$key.EXT;\n if(file_exists($filename)) {\n $this->yui_component[$key]['available'] = TRUE;\n } else {\n $this->yui_component[$key]['available'] = FALSE;\n }\n $this->loaded_component[$key] = 0;\n }\n }", "private function _doWeHaveLatestVersion() {\r\n $errorInPlugins = array();\r\n $pluginsArray = array(\r\n 'seaocore' => 'seaddons-core',\r\n 'siteapi' => 'siteapi',\r\n 'siteiosapp' => 'sitemobileiosapp',\r\n 'siteandroidapp' => 'sitemobileandroidapp',\r\n 'advancedactivity' => 'advancedactivity',\r\n 'sitetagcheckin' => 'sitetagcheckin'\r\n );\r\n\r\n if ($_COOKIE['getMobileDependentModulesList']) {\r\n $tempValues = unserialize($_COOKIE['getMobileDependentModulesList']);\r\n } else {\r\n $rss = Zend_Feed::import('http://www.socialengineaddons.com/plugins/feed');\r\n $channel = array(\r\n 'title' => $rss->title(),\r\n 'link' => $rss->link(),\r\n 'description' => $rss->description(),\r\n 'items' => array()\r\n );\r\n $tempValues = $flagArray = array();\r\n foreach ($rss as $item) {\r\n if (in_array($item->ptype(), $pluginsArray)) {\r\n $flagArray['productType'] = $item->ptype();\r\n $flagArray['availableVersion'] = $item->version();\r\n $flagArray['title'] = $item->title();\r\n $tempValues[] = $flagArray;\r\n }\r\n }\r\n\r\n $cookieData = @serialize($tempValues);\r\n setcookie(\"getMobileDependentModulesList\", $cookieData, time() + 86400);\r\n }\r\n foreach ($tempValues as $values) {\r\n if (in_array($values['productType'], $pluginsArray)) {\r\n $flipedArray = array_flip($pluginsArray);\r\n if (!Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled($flipedArray[$values['productType']]))\r\n continue;\r\n\r\n $getModVersion = Engine_Api::_()->getDbtable('modules', 'core')->getModule($flipedArray[$values['productType']]);\r\n $isModSupport = $this->_checkVersion($getModVersion->version, $values['availableVersion']);\r\n if (!empty($isModSupport)) {\r\n $errorInPlugins[] = $values['title'];\r\n }\r\n }\r\n }\r\n\r\n return $errorInPlugins;\r\n }", "public function load_bundled_components () {\n\t\t/*\n\t\tstatic $components = array();\n\n\t\tif ( isset( $components ) )\n\t\t\treturn $components;\n\t\t*/\n\t\t$files = WooDojo_Utils::glob_php( '*.php', GLOB_MARK, $this->config->components_path );\n\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( $headers = $this->get_component( $file ) ) {\n\t\t\t\t$slug = $this->get_component_slug( $file );\n\t\t\t\t$components[$slug] = $headers;\n\t\t\t\t$components[$slug]->filepath = $this->clean_component_path( $file );\n\t\t\t\t$components[$slug]->current_version = $components[$slug]->version;\n\t\t\t}\n\t\t}\n\n\t\treturn $components;\n\t}", "function com_component_updates_FindRemoteComponentWithUpdate($local_component, $remote_components) {\n //error_log(\"local_component: \" . ossn_dump($local_component));\n // sample result\n // [0] => Array\n // (\n // [com_id] => TextareaSupport\n // [latest_version] => 2.1\n // [time_updated] => 1544025492\n // [ossn_version_prefix] => 5.x\n // [works_on_latest_version] => yes\n // [url] => https://www.opensource-socialnetwork.org/component/view/3196/textareasupport\n // )\n if ($remote_components) { \n $return = array();\n $site_version = (double)ossn_site_settings('site_version');\n foreach ($remote_components as $remote_component) {\n // if its not a core component as they arent allowed on component store\n if (substr($local_component, 0, 4) != 'Ossn') {\n // error_log(\"local_component: \" . ossn_dump($local_component));\n // error_log(\"response_payload: \" . ossn_dump($remote_components));\n //if the ids are equals\n if ($local_component->id == $remote_component['com_id']) {\n $minimum_remote_ossn_version = (double)$remote_component['ossn_version_prefix']; // expect string 5.x for example, double makes it 5\n // make sure that the versions arent equal and that the update is compatible with the site version\n if ($local_component->version != $remote_component['version'] && $site_version >= $minimum_remote_ossn_version) {\n $num_local_version = (double)$local_component->version; // will chop a number like 2.1.4 to 2.1\n $num_remote_version = (double)$remote_component['latest_version'];\n $len_local_version = strlen($local_component->version);\n $len_remote_version = strlen($remote_component['latest_version']);\n if ($num_remote_version > $num_local_version) {\n $return = $remote_component;\n }\n elseif ($num_remote_version = $num_local_version && $len_remote_version > $len_local_version) {\n $return = $remote_component;\n }\n }\n }\n } \n }\n return $return;\n }\n}", "public function onBeforeInstall()\n\t{\n\t\treturn $this->isCompatible();\n\t}", "public function register_components( $components = array() ) {\n if ( is_array( $components ) && ! empty( $components ) ) {\n \n foreach ( $components as $name => $directory ) {\n \n if ( array_key_exists( $name, $this->_components ) ) {\n \n $existing_component_version = $this->get_component_version( $this->_components[$name], $name );\n $new_component_version = $this->get_component_version( $directory, $name );\n\n if ( $new_component_version > $existing_component_version ) {\n $this->_components[$name] = $directory; \n }\n \n } else {\n $this->_components[$name] = $directory; \n\n }\n \n }\n \n }\n }", "protected function checkCompatibility()\n {\n // Checks the compatibility between the extension version and the library version.\n // Versions are under the format x.y.z. Compatibility is satisfied if x's are the same\n $libraryVersion = [];\n preg_match('/^([0-9])\\./', ExtensionManagementUtility::getExtensionVersion(AbstractController::LIBRARY_NAME), $libraryVersion);\n\n $extensionVersion = [];\n preg_match('/^([0-9])\\./', $this->libraryConfiguration['general']['version'], $extensionVersion);\n\n if ($libraryVersion[1] != $extensionVersion[1]) {\n return FlashMessages::addError('error.incorrectVersion');\n } else {\n return true;\n }\n }", "private function loadComponentsWithUpdateFile()\n {\n $componentsWithUpdateFile = array();\n\n foreach ($this->componentsWithNewVersion as $name => $versions) {\n $currentVersion = $versions[self::INDEX_CURRENT_VERSION];\n $newVersion = $versions[self::INDEX_NEW_VERSION];\n\n if ($name == 'core') {\n $pathToUpdates = $this->pathUpdateFileCore . '*.php';\n } elseif (ColumnUpdater::isDimensionComponent($name)) {\n $componentsWithUpdateFile[$name][PIWIK_INCLUDE_PATH . '/core/Columns/Updater.php'] = $newVersion;\n } else {\n $pathToUpdates = sprintf($this->pathUpdateFilePlugins, $name) . '*.php';\n }\n\n if (!empty($pathToUpdates)) {\n $files = _glob($pathToUpdates);\n if ($files == false) {\n $files = array();\n }\n\n foreach ($files as $file) {\n $fileVersion = basename($file, '.php');\n if ( // if the update is from a newer version\n version_compare($currentVersion, $fileVersion) == -1\n // but we don't execute updates from non existing future releases\n && version_compare($fileVersion, $newVersion) <= 0\n ) {\n $componentsWithUpdateFile[$name][$file] = $fileVersion;\n }\n }\n }\n\n if (isset($componentsWithUpdateFile[$name])) {\n // order the update files by version asc\n uasort($componentsWithUpdateFile[$name], \"version_compare\");\n } else {\n // there are no update file => nothing to do, update to the new version is successful\n self::recordComponentSuccessfullyUpdated($name, $newVersion);\n }\n }\n\n return $componentsWithUpdateFile;\n }", "protected function _fullCheckUpdateNecessity()\n {\n $appPath = \\Yii::getAlias('@app/');\n $vendorPath = $appPath . 'vendor';\n $lockFilename = $appPath . 'composer.lock';\n $jsonFilename = $appPath . 'composer.json';\n $installedFilename = $vendorPath . '/composer/installed.json';\n\n if (file_exists($jsonFilename) && !is_dir($vendorPath)) {\n $this->_serviceUpdateIsNeeded = true;\n } elseif (file_exists($lockFilename) && file_exists($installedFilename)) {\n $lockedPackages = $this->_mapPackages(json_decode(file_get_contents($lockFilename), true));\n $installedPackages = $this->_mapPackages(json_decode(file_get_contents($installedFilename), true));\n\n foreach ($lockedPackages as $name => $version) {\n if (!isset($installedPackages[$name]) || $installedPackages[$name] != $version) {\n $this->_serviceUpdateIsNeeded = true;\n break;\n }\n }\n if (!$this->_serviceUpdateIsNeeded) {\n $this->_updateComponent->getInfoStorage()->setLastUpdateInfo($this->getInfoKey(), time());\n $this->_updateComponent->getInfoStorage()->saveLastUpdateInfo();\n }\n }\n }", "function addComponents($arrComponents) {\n\t\t\n\t\t$returnVal = false;\n\t\tif($this->intTableKeyValue != \"\") {\n\t\t\t\n\t\t\t$countErrors = 0;\n\t\t\t$intSortNum = 1;\n\t\t\tforeach($arrComponents as $value) {\n\t\t\t\n\t\t\t\tif(trim($value['name']) != \"\" && (isset($value['component_id']) && $this->objComponent->select($value['component_id']))) {\n\t\t\t\t\t$arrColumns = array(\"name\", \"componenttype\", \"required\", \"tooltip\", \"sortnum\");\n\t\t\t\t\t$arrValues = array($value['name'], $value['type'], $value['required'], $value['tooltip'], $intSortNum);\n\t\t\t\t\t\n\t\t\t\t\t$this->MySQL->query(\"DELETE FROM \".$this->MySQL->get_tablePrefix().\"customform_selectvalues WHERE component_id = '\".$value['component_id'].\"'\");\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->objComponent->update($arrColumns, $arrValues)) {\n\t\t\t\t\t\t$countErrors++;\n\t\t\t\t\t}\n\t\t\t\t\telseif($value['type'] == \"select\" || $value['type'] == \"multiselect\") {\n\t\t\t\t\t\n\t\t\t\t\t\t$newComponentID = $this->objComponent->get_info(\"component_id\");\n\t\t\t\t\t\tforeach($value['cOptions'] as $selectValue) {\n\t\t\t\t\t\n\t\t\t\t\t\t\tif(trim($selectValue) != \"\" && !$this->objSelectValue->addNew(array(\"component_id\", \"componentvalue\"), array($newComponentID, $selectValue))) {\n\t\t\t\t\t\t\t\t$countErrors++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$intSortNum++;\n\t\t\t\t}\n\t\t\t\telseif(trim($value['name']) != \"\") {\n\t\t\t\t\t\n\t\t\t\t\t$arrColumns = array(\"customform_id\", \"name\", \"componenttype\", \"required\", \"tooltip\", \"sortnum\");\n\t\t\t\t\t$arrValues = array($this->intTableKeyValue, $value['name'], $value['type'], $value['required'], $value['tooltip'], $intSortNum);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->objComponent->addNew($arrColumns, $arrValues)) {\n\t\t\t\t\t\t$countErrors++;\n\t\t\t\t\t}\n\t\t\t\t\telseif($value['type'] == \"select\" || $value['type'] == \"multiselect\") {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$newComponentID = $this->objComponent->get_info(\"component_id\");\n\t\t\t\t\t\tforeach($value['cOptions'] as $selectValue) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(trim($selectValue) != \"\" && !$this->objSelectValue->addNew(array(\"component_id\", \"componentvalue\"), array($newComponentID, $selectValue))) {\n\t\t\t\t\t\t\t\t$countErrors++;\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$intSortNum++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($countErrors == 0) {\n\t\t\t\t$returnVal = true;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $returnVal;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the regex to only catch existing resources on the route.
public static function resourceRegex() { return '\b('.implode('|', array_keys(static::RESOURCES)).')\b'; }
[ "public function regexp()\n {\n $regexp_path = '';\n $rawpath = $this->_route->getPath();\n\n $path = $this->compileRegularPath($rawpath);\n $path = $this->compileStrictPathParams($path);\n\n return $this->_addRemoveTrailingSlash($path, $this->_route->hasOptionalParameter());\n }", "public function getRewriteRuleRegex() {\n\t\t// Get the regex of the compiled route\n\t\t$routeRegex = $this->getCompiled()->getRegex();\n\t\t// Remove the first part (#^/) of the regex because WordPress adds this already by itself\n\t\t$routeRegex = preg_replace( '/^\\#\\^\\//', '^', $routeRegex );\n\t\t// Remove the modifiers of the regex because WordPress adds this already by itself\n\t\t$routeRegex = preg_replace( '/\\$\\#.*$/', '$', $routeRegex );\n\n\t\treturn $routeRegex;\n\t}", "public function testRouteDoesNotMatchResourceWithWildcard()\n {\n $resource = '/hello';\n $route = new \\Slim\\Route('/hello/:path+', function () {});\n $result = $route->matches($resource);\n $this->assertFalse($result);\n $this->assertEquals(array(), $route->getParams());\n }", "private function prepareRegex(string $route): string {\n $regex = \"^\";\n $routeParts = array_filter(explode('/', $route));\n foreach ($routeParts as $part) {\n if ($part[0] === \"{\" && $part[strlen($part) - 1] === \"}\") {\n $expression = substr($part, 1, -1);\n if (substr_count($expression, \":\") == 1) {\n $parts = explode(':', $expression);\n\n $regex = $regex . \"\\\\/(?P<\" . $parts[0] . \">\" . $parts[1] . \"+)\";\n } else {\n $regex = $regex . \"\\\\/(?P<\" . $expression . \">[^\\\\/]+)\";\n }\n } else {\n $regex = $regex . \"\\\\/\" . $part;\n }\n }\n $regex = $regex . \"$\";\n return $regex;\n }", "public function getURLPattern();", "function get_app_routing_pattern()\n {\n return $this->object->_route_to_regex($this->object->context);\n }", "public function getBaseRoutePattern(): string;", "public function getURLRegex() {\n\t\treturn implode($this->patternRegex);\n\t}", "protected function getRoutePathRedecorationPattern() : string {}", "public static function format_regex()\n\t{\n\t\tif (empty(Resource_Routes::$_format_regex))\n\t\t{\n\t\t\tResource_Routes::$_format_regex = '('.implode('|', Resource::config('formats')).')';\n\t\t}\n\t\treturn Resource_Routes::$_format_regex;\n\t}", "protected abstract function GetRegexPattern();", "function getRoutePathRedecorationPattern() : string ;", "public function testValidMatchResource()\n\t{\n\t\t$resource = new \\Psecio\\Invoke\\Resource('/foo/bar', 'GET');\n\t\t$config = array('route' => '/foo/bar');\n\t\t$regex = new Regex($config);\n\n\t\t$this->assertTrue($regex->evaluate($resource));\n\t}", "public function test_match_fromPatternWithoutVars()\n {\n $route = new Route('GET', '/home', 'test');\n $this->assertTrue(\n $route->match('GET', '/home'),\n 'match() must return true if URI pattern provided is the same as the one specified in constructor.'\n );\n }", "public function getUrlPattern();", "public function test_where_applyRegex()\n {\n $route = (new Route('GET', '/{id}-{slug}', 'test'))\n ->where('slug', '[0-9a-zA-Z-_]+')\n ->where('id', '[0-9]+');\n $this->assertTrue(\n $route->match('GET', '/50-my-post-title'),\n 'match() must return true from valid URI pattern when route was builded with where() method.'\n );\n $this->assertSame(\n ['id' => '50', 'slug' => 'my-post-title'],\n $route->getParams(),\n 'getParams() must return params from URI provided to match() method when Route was built with where() method.'\n );\n $this->assertFalse(\n $route->match('GET', '/test-my-post-title'),\n 'where() method seem to not apply regex correctly.'\n );\n $this->assertFalse(\n $route->match('GET', '/test-my-post-25'),\n 'where() method seem to not apply regex correctly.'\n );\n }", "private function regexWhitelist(){\n if(sizeof($this->whitelist) === 0){\n return '/[\\s\\S]*/';\n } else {\n $whitelistRegex = '/';\n\n for ($i = 0; $i < sizeof($this->whitelist); $i++) {\n $whitelistRegex .= (($whitelistRegex !== '/') ? '|' : '') . '^(http|https):\\/\\/' . $this->whitelist[$i] . '(\\/|$)';\n }\n\n return $whitelistRegex . '/';\n }\n }", "public function get_endpoint_regex() {\n\n return $this->endpoint_regex;\n\n }", "public function generateRegex() {\n\n $this->regex = $this->url;\n $this->regex = str_replace('/', '\\/', $this->regex);\n $this->regex = str_replace(')', ')?', $this->regex);\n $lastMandatoryParam = null;\n\n if (count($this->params['mandatory']) > 0) {\n\n foreach ($this->params['mandatory'] as $param) {\n list(, $regex) = $this->filters[$param];\n $this->regex = str_replace('<' . $param . '>', '(?P<' . $param . '>' . $regex . ')', $this->regex);\n $lastMandatoryParam = $param;\n }\n\n }\n\n if (count($this->params['optional']) > 0) {\n\n foreach (array_reverse($this->params['optional']) as $param) {\n list(, $regex, $precedence) = $this->filters[$param];\n $this->regex = str_replace('<' . $param . '>', '(?P<' . $param . '>' . $regex . ')', $this->regex);\n }\n\n }\n\n $this->regex = '/^' . $this->regex . '$/i';\n return $this->regex;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle the branch "created" event.
public function created(Branch $branch) { // }
[ "public function actionCreate()\n {\n if (Yii::$app->user->can('create-branch')) {\n $model = new Branches();\n\n // Validate with enableAjaxValidation is true in _form\n // Remove this if use 'validationUrl' => Url::toRoute('branches/validation') in _form\n /* if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post()))\n {\n Yii::$app->response->format = 'json';\n return ActiveForm::validate($model);\n }*/\n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->branch_created_date = date('Y-m-d h:m:s');\n\n Yii::$app->response->format = Response::FORMAT_JSON;\n if($model->save()){\n // Yii::$app->session->setFlash('success', 'The branch was successfully created.');\n // echo 'Success';\n return [\n 'message' => 'Success',\n ];\n\n }else{\n // Yii::$app->session->setFlash('error', 'There was an error creating the branch.');\n // echo 'Error';\n return [\n 'message' => 'Error',\n ];\n }\n\n\n // return $this->redirect(['index']);\n\n } else {\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n }\n }else{\n throw new ForbiddenHttpException;\n }\n\n }", "public function createBranch($branch);", "public function testHandleCreateSuccess()\n {\n // Populate data\n $this->_populate();\n \n $response = $this->withSession($this->adminSession)\n ->call('POST', '/branch/create', $this->customBranchData, [], [], ['HTTP_REFERER' => '/branch/create']);\n \n $this->assertRedirectedTo('/branch');\n $this->assertSessionHas('branch-created', '');\n }", "public function createBranch($branch)\n {\n $this->getClient()->run($this, \"branch $branch\");\n }", "public function createBranch($branch) {\n $form_params = array('refspec' => sprintf('refs/heads/%s', $branch));\n $response = $this->request->request(\n 'sites',\n $this->get('id'),\n 'code-branch',\n 'POST',\n compact('form_params')\n );\n return $response['data'];\n }", "public function onPostCreated($event)\n {\n //\n }", "public function create()\n\t{\n\t\t$pagetitle = \"New Branch\";\n\t\treturn View::make('branches.create',compact('pagetitle'));\n\t}", "public function addNewBranchProcess(AddBranchRequest $request)\n {\n \t$branch = new Branch;\n\n \t$profile_id = auth()->guard('admin')->user()->profile->id; \n\n \t$branch->branch_name = $request->branch_name;\n \t\n \t$branch->brand_id = $request->brand_id;\n\n \t$branch->profile_id = $profile_id;\n\n \t$branch->status = 1; // by default approved for admin addition\n\n \t$branch->save();\n\n }", "public function handle(EntityWasCreated $event)\n {\n if ((bool) $event->entity->create_table) {\n Schema::create($event->entity->table_name, function ($table) {\n $table->increments('id');\n $table->timestamps();\n $table->softDeletes();\n });\n event(new TableWasCreatedInDb($event->entity));\n }\n }", "public function testBranchCreate()\n {\n }", "function branchCreate($name, array $options = [])\n {\n }", "public function handleVoucherCreation(VoucherCreatedEvent $event)\n {\n }", "public function actionCreate()\n {\n $model = new Branches();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "private function dispatchCreatedTaskEvent()\n {\n $this->dispatcher->dispatch(\n Task::CREATED,\n new TaskEvent($this->task)\n );\n }", "public function create()\n\t{\n\t\treturn View::make('branches.create');\n\t}", "public function store(CreateBranchRequest $request)\n {\n $input = $request->all();\n\n $branch = $this->branchRepository->create($input);\n\n Flash::success('Branch saved successfully.');\n\n return redirect(route('backend.branches.index'));\n }", "public function created(Brand $brand )\n {\n info('create::observe() '. $this->CACHE_KEY);\n $this->flush($this->CACHE_KEY);\n }", "public function handle(CreatePostCommand $command)\n {\n $post = new Post();\n\n $post->title = $command->getTitle();\n $post->url = $command->getUrl();\n $post->description = $command->getDescription();\n $post->user_id = $command->getUser()->id;\n\n $post->save();\n\n event(new PostWasCreated($post));\n }", "public function created(Loggable $model): void\n {\n $data = $this->buildDataToLog('create', $model);\n\n Change::create($data);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of limit options that should be applied to imports.
public function get_import_limit_type_options( ) { $options = array( 'range' => __( 'By date range', 'the-events-calendar' ), 'count' => __( 'By number of events', 'the-events-calendar' ), 'no_limit' => __( 'Do not limit (not recommended)', 'the-events-calendar' ), ); /** * Filters the options available for the default import limit options. * * @since 4.5.13 * * @param array $options An array of arrays in the format * [ <limit_type> => <limit description> ]. */ $options = apply_filters( 'tribe_aggregator_import_limit_types', $options ); return $options; }
[ "public function getLimitOptions();", "protected function getLimitOptions()\n {\n return $this->limitOptions;\n }", "public function getLimitFields(): array;", "protected function get_import_options() {\n\t\t$options = array(\n\t\t\t'fetch_attachments' => $this->fetch_attachments,\n\t\t\t'default_author' => get_current_user_id(),\n\t\t);\n\n\t\t/**\n\t\t * Filter the importer options used in the admin UI.\n\t\t *\n\t\t * @param array $options Options to pass to WXR_Importer::__construct\n\t\t */\n\t\treturn apply_filters( 'wxr_importer.admin.import_options', $options );\n\t}", "public function getLimits()\n\t{\n\t\treturn array (\n\t\t\t\t\t\t'exclude' \t\t=> array(),\n\t\t\t\t\t\t'lessIsMore'\t=> array(),\n\t\t\t\t\t\t'neg1IsBest'\t=> array(),\n\t\t\t\t\t\t'zeroIsBest'\t=> array( 'g_album_limit', 'g_img_album_limit', 'g_max_upload', 'g_max_transfer', 'g_max_views', 'g_movie_size' ),\n\t\t\t\t);\n\t}", "function getOptionsSupported() {\n\t\treturn array(\tgettext('Attempt threshold') => array('key' => 'failed_access_blocker_attempt_threshold', 'type' => OPTION_TYPE_TEXTBOX,\n\t\t\t\t\t\t\t\t\t\t'desc' => gettext('Admin page requests will be ignored after this many failed tries.')),\n\t\t\t\t\t\t\t\t\tgettext('Minutes to cool off') =>array('key' => 'failed_access_blocker_timeout', 'type' => OPTION_TYPE_TEXTBOX,\n\t\t\t\t\t\t\t\t\t\t'desc' => gettext('The block will be removed after this waiting period.'))\n\t\t);\n\t}", "function get_file_import_options(){\n\t\treturn array(\n\t\t\t'100' => 'Insert Data As New Records',\n\t\t\t'200' => 'Update Existing Records',\n\t\t);\n\t}", "public function getAllowedOptions();", "public function getLimitToChangelist()\n {\n return $this->_options[static::QUERY_LIMIT_TO_CHANGELIST];\n }", "public function getAvailableLimit()\n {\n return [$this->getPagerLimit() => $this->getPagerLimit()];\n }", "function getAutoLimitSettings()\n {\n \treturn $this->autoLimit;\n }", "public function getImportExportOptions()\n {\n $options = [\n [\n 'id' => Config::IMPORT_EXPORT_OPTION_ZONES,\n 'name' => $this->module->l('Zones'),\n ],\n [\n 'id' => Config::IMPORT_EXPORT_OPTION_SETTINGS,\n 'name' => $this->module->l('Settings'),\n ],\n [\n 'id' => Config::IMPORT_EXPORT_OPTION_PRODUCTS,\n 'name' => $this->module->l('Products'),\n ],\n [\n 'id' => Config::IMPORT_EXPORT_OPTION_PRICE_RULES,\n 'name' => $this->module->l('Price rules'),\n ],\n [\n 'id' => Config::IMPORT_EXPORT_OPTION_ADDRESS_TEMPLATES,\n 'name' => $this->module->l('Address templates'),\n ],\n [\n 'id' => Config::IMPORT_EXPORT_OPTION_ALL_ZIP,\n 'name' => $this->module->l('All in ZIP'),\n ],\n ];\n\n\n return $options;\n }", "public static function getCommonImportOptionsList()\n {\n return array(\n 'commonData' => array(),\n 'columnsMetaData' => array(),\n 'warningsAccepted' => false,\n );\n }", "public function getImportableFieldsOptions(): ImportableFieldsOptions;", "public function getDefaultImportOptions();", "public function getLimits()\n {\n return [\n 'method' => 'GET',\n 'path' => 'limits',\n 'params' => [],\n ];\n }", "public function getSendingLimitSelectOptions(): array\n {\n $options = [];\n\n foreach (self::sendingLimitValues() as $key => $data) {\n $wording = __('locale.plans.'.$key);\n $options[] = ['text' => $wording, 'value' => $key];\n }\n\n // exist\n if ($this->getOption('sending_limit') == 'custom') {\n $wording = __('messages.plan.sending_limit.phrase', [\n 'quota_value' => Tool::format_number($this->getOption('sending_quota')),\n 'quota_base' => Tool::format_number($this->getOption('sending_quota_time')),\n 'quota_unit' => $this->getOption('sending_quota_time_unit'),\n ]);\n\n $options[] = ['text' => $wording, 'value' => 'other'];\n }\n\n // Custom\n $options[] = ['text' => 'Custom', 'value' => 'custom'];\n\n return $options;\n }", "function getSelectLimits()\n {\n return $this->SelectLimits;\n }", "private function get_limit_options() {\n $number_of_posts = isset( $this->slide_settings['number_of_posts'] ) ? $this->slide_settings['number_of_posts'] : 3;\n\n $html = \"<input value='{$number_of_posts}' type='number' step='1' min='1' max='30' name='attachment[{$this->slide->ID}][settings][number_of_posts]'>\";\n\n return $html;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
function walkUpdateItem($updateItem);
[ "public function walkUpdateItem($updateItem)\n {\n foreach ($this->_walkers as $walker) {\n $walker->walkUpdateItem($updateItem);\n }\n }", "function walkUpdateClause($updateClause);", "public function walkUpdateClause($updateClause);", "function compileUpdate()\n {\n $updateManager = new UpdateManager;\n $updateManager->table($this->nodes->source->getLeft());\n\n foreach ($this->nodes->restrictions as $expr) {\n $updateManager->where($expr);\n }\n\n foreach ($this->nodes->orders as $order) {\n $updateManager->order($order);\n }\n\n empty($this->nodes->limit) ?:\n $updateManager->take($this->nodes->limit->getExpression());\n\n empty($this->nodes->offset) ?:\n $updateManager->skip($this->nodes->offset->getExpression());\n\n return $updateManager;\n }", "public function compileUpdate(): string\n {\n $sql = $this->compilePartUpdate();\n $sql .= $this->compilePartSet();\n $sql .= $this->compilePartWhere();\n $sql .= $this->compilePartOrderBy();\n $sql .= $this->compilePartLimitOffset();\n return $sql;\n }", "function parseUpdate() {\n $sql_object = new SqlUpdate();\n $this->getToken();\n if ($this->token == 'identifier') {\n $sql_object->addTable($this->lexer->tokenText);\n }\n else {\n throw new SqlParserException('Expected table name', $this->token, $this->lexer);\n }\n\n $this->parseSetFields($sql_object);\n\n while (!is_null($this->token) && $this->token != ')' && $this->token != ')') {\n switch ($this->token) {\n case 'where':\n $conditional = $this->parseSearchClause();\n $sql_object->setConditional($conditional);\n break;\n\n case 'order':\n $this->parseOrderBy($sql_object);\n break;\n\n case 'limit':\n $this->parseLimit($sql_object);\n break;\n\n case ';':\n // @todo: handle multiple sql strings.\n $this->getToken();\n continue;\n\n default:\n throw new SqlParserException('Unexpected clause', $this->token, $this->lexer);\n }\n }\n return $sql_object;\n }", "public function UpdateStatement()\n {\n $updateStatement = new AST\\UpdateStatement($this->UpdateClause());\n\n $updateStatement->whereClause = $this->lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null;\n\n return $updateStatement;\n }", "function updateStmt()\n {\n }", "public function updateItem(Item $item, ItemUpdateStruct $itemUpdateStruct): Item;", "public function update(){\n try {\n // Sparql11update.g:13:3: ( modify | insert | delete | load | clear ) \n $alt2=5;\n $LA2 = $this->input->LA(1);\n if($this->getToken('MODIFY')== $LA2)\n {\n $alt2=1;\n }\n else if($this->getToken('INSERT')== $LA2)\n {\n $alt2=2;\n }\n else if($this->getToken('DELETE')== $LA2)\n {\n $alt2=3;\n }\n else if($this->getToken('LOAD')== $LA2)\n {\n $alt2=4;\n }\n else if($this->getToken('CLEAR')== $LA2)\n {\n $alt2=5;\n }\n else{\n $nvae =\n new NoViableAltException(\"\", 2, 0, $this->input);\n\n throw $nvae;\n }\n\n switch ($alt2) {\n case 1 :\n // Sparql11update.g:14:3: modify \n {\n $this->pushFollow(self::$FOLLOW_modify_in_update54);\n $this->modify();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11update.g:15:5: insert \n {\n $this->pushFollow(self::$FOLLOW_insert_in_update60);\n $this->insert();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 3 :\n // Sparql11update.g:16:5: delete \n {\n $this->pushFollow(self::$FOLLOW_delete_in_update66);\n $this->delete();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 4 :\n // Sparql11update.g:17:5: load \n {\n $this->pushFollow(self::$FOLLOW_load_in_update72);\n $this->load();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 5 :\n // Sparql11update.g:18:5: clear \n {\n $this->pushFollow(self::$FOLLOW_clear_in_update78);\n $this->clear();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "protected function _update()\n\t{\n\t\treturn \"UPDATE {$this->_updateTable} \";\n\t}", "abstract protected function update(Node $node);", "public function updated(Item $item)\n {\n //\n }", "private function updateItemMjolnir(Item $item): void\n {\n }", "private function evaluateUpdate(Statement $statement)\n\t\t{\n\t\t\t$TABLES = $this->evaluateTables($statement);\n\t\t\t$SETS = $this->evaluateSets($statement);\n\t\t\t$WHERE = $this->evaluateWhere($statement);\t\t\t\n\t\t\t\n\t\t\treturn \n\t\t\t\t'UPDATE ' . $TABLES .\n\t\t\t\t' SET ' . $SETS .\n\t\t\t\t$WHERE;\n\t\t}", "function compileQueryUpdate(array $statement);", "protected function parseSingleUpdate($xml) {\n\t\t$composite = new CompositeQuery();\n\t\t$junctions = new CompositeQuery();\n\t\t$query = new UpdateQuery();\n\t\t\n\t\t/* Target table */\n\t\t$query->table = (string) $xml->getName();\n\t\t\n\t\t/* Parse any where clauses present */\n\t\tforeach ($xml->xpath('where') as $where)\n\t\t\t$query->where[] = $this->parseExpressionTree($where, 'disjunction');\n\t\t\n\t\t/* Otherwise, parse the where clause from the attributes */\n\t\tif (!$query->where)\n\t\t\t$query->where[] = $this->attributeConjunction($xml);\n\t\t\t\n\t\tforeach ($xml->children() as $key => $value) {\n\t\t\t/* Parse child tags (ignore where tags, since they have already been handled */\n\t\t\tif ($key != 'where') {\n\t\t\t\tif (is_string($child = $this->firstChild($value)))\n\t\t\t\t\t/* Terminal nodes are considered values */\n\t\t\t\t\t$query->fields[str_replace('\"', '', (string) $key)] = $this->parseValue($child);\n\t\t\t\telse {\n\t\t\t\t\t/* Check to see whether this is a foreign reference list or an expression */\n\t\t\t\t\t$reference = true;\n\t\t\t\t\tif (count($value) == 1)\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t/* If the node has one child, try to parse it as an expression */\n\t\t\t\t\t\t\t$query->fields[str_replace('\"', '', (string) $key)] = $this->parseExpressionTree($value, 'expression');\n\t\t\t\t\t\t\t$reference = false;\n\t\t\t\t\t\t} catch (ParseException $e) {\n\t\t\t\t\t\t\t/* Not an expression, parse as a foreign reference list */\n\t\t\t\t\t\t\t$reference = true;\n\t\t\t\t\t\t}\n\t\t\t\t\tif ($reference)\n\t\t\t\t\t\tforeach ($value as $item) {\n\t\t\t\t\t\t\t/* Parse foreign references */\n\t\t\t\t\t\t\trequire_once('QueryExpression.class.php');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Find the relevant local ids using a subquery */\n\t\t\t\t\t\t\t$subquery = new SelectQuery();\n\t\t\t\t\t\t\t$subquery->select['local_id'] = new QueryProperty('id');\n\t\t\t\t\t\t\t$subquery->from = $query->table;\n\t\t\t\t\t\t\t$subquery->where = $query->where;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (@$item['delete']) {\n\t\t\t\t\t\t\t\t/* Reference is marked to be deleted, create a delete query */\n\t\t\t\t\t\t\t\t$junction = new DeleteQuery();\n\t\t\t\t\t\t\t\t$junction->table = $query->table.'::'.$key;\n\t\t\t\t\t\t\t\t$junction->query = $subquery;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/* Deleting a reference is always based on id */\n\t\t\t\t\t\t\t\t$id = (string) $item['id'];\n\t\t\t\t\t\t\t\tif (!$id)\n\t\t\t\t\t\t\t\t\tthrow new ParseException('Id is required for delete');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/* Generate junction table where clause to match on id */\n\t\t\t\t\t\t\t\t$junction->query->select['foreign_id'] = new QueryValue($this->parseValue($id));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t/* Add foreign reference */\n\t\t\t\t\t\t\t\t$junction = new InsertQuery();\n\t\t\t\t\t\t\t\t$junction->table = $query->table.'::'.$key;\n\t\t\t\t\t\t\t\t$junction->query = $subquery;\n\t\t\t\t\t\t\t\t$id = (string) $item['id'];\n\t\t\t\t\t\t\t\tif (!$id) {\n\t\t\t\t\t\t\t\t\t/* New object: generate insert query and merge with queries */\n\t\t\t\t\t\t\t\t\t$subqueries = $this->parseSingleInsert($item);\n\t\t\t\t\t\t\t\t\t$composite->merge($subqueries);\n\t\t\t\t\t\t\t\t\t$main = $this->getMainQuery($subqueries);\n\t\t\t\t\t\t\t\t\t/* Store remote id as reference to the new object's autoincrement id */\n\t\t\t\t\t\t\t\t\t$junction->query->select['foreign_id'] = new QueryValue(null);\n\t\t\t\t\t\t\t\t\t$junction->query->select['foreign_id']->value = &$main->id;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t/* Store remote id */\n\t\t\t\t\t\t\t\t\t$junction->query->select['foreign_id'] = new QueryValue($id);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/* Store xml attributes as fields in the junction table */\n\t\t\t\t\t\t\t\tforeach($item->attributes() as $field => $value)\n\t\t\t\t\t\t\t\t\tif ($field != 'id')\n\t\t\t\t\t\t\t\t\t\t$junction->query->select[str_replace('\"', '', $field)] = new QueryValue($this->parseValue($value));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$junctions->add($junction);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/* Add the top-level query and the junction table queries */\n\t\t$composite->add($query);\n\t\t$composite->merge($junctions);\n\t\treturn $composite;\n\t}", "public function compileUpdate(Update $query) : CompiledQuery;", "public function grab_sql_updates($sql_update_dir){\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the microphonesAndSpeakers Defines whether builtin microphones or speakers are enabled. Possible values are: notConfigured, enabled, disabled.
public function setMicrophonesAndSpeakers($val) { $this->_propDict["microphonesAndSpeakers"] = $val; return $this; }
[ "public function setMicrophone($on) {\n return $this->client->request(\"mic&on=\" . ($on ? \"1\" : \"0\")) == \"OK\";\n }", "public function setMicrophoneConfiguration(?TeamworkMicrophoneConfiguration $value): void {\n $this->getBackingStore()->set('microphoneConfiguration', $value);\n }", "public function setMicrophoneForceMute($val)\n {\n $this->_propDict[\"microphoneForceMute\"] = boolval($val);\n return $this;\n }", "public function setMicrophoneForceMute(?bool $value): void {\n $this->getBackingStore()->set('microphoneForceMute', $value);\n }", "public function getMicrophone() {\n return $this->client->request(\"mic\") == \"1\";\n }", "public static function showAllSpeakers()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$dao = new DAO('pfe');\n\t\t\t\t$list = array();\n\t\t\t\t$list = $dao->getlist('Speaker');\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t\techo 'Message: ' .$e->getMessage();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\t$dao = null;\n\t\t\t\treturn $list;\n\t\t\t}\n\t\t}", "public function isSpeaker(): bool;", "private function getAllSpeakers()\n\t{\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('*')\n\t\t\t->from('#__conferenceplus_speakers')\n\t\t\t->where($db->qn('enabled') . ' = 1');\n\n\t\t$db->setQuery($query);\n\n\t\t$result = $db->loadAssocList('conferenceplus_speaker_id');\n\n\t\treturn $result;\n\t}", "public function getMicrophoneForceMute()\n {\n if (array_key_exists(\"microphoneForceMute\", $this->_propDict)) {\n return $this->_propDict[\"microphoneForceMute\"];\n } else {\n return null;\n }\n }", "public function listSpeakers();", "public function setSpeakers(?array $value): void {\n $this->getBackingStore()->set('speakers', $value);\n }", "function tbcf_sermon_speakers( $post_id = null ) {\n\n\t$speakers = tbcf_get_terms( $post_id, 'ctc_sermon_speaker' );\n\n\tif ( ! empty( $speakers ) ) {\n\t\treturn $speakers;\n\t}\n\n\treturn false;\n\n}", "protected function audioExtensions()\n {\n return [\n 'mp3',\n 'wav',\n 'wma',\n 'm4a',\n 'ogg'\n ];\n }", "function snax_get_audio_allowed_types() {\n\treturn apply_filters( 'snax_audio_allowed_types', get_option( 'snax_audio_allowed_types', array( 'mp3' ) ) );\n}", "function wp_get_audio_extensions() {\n\t/**\n\t * Filter the list of supported audio formats.\n\t *\n\t * @since 3.6.0\n\t *\n\t * @param array $extensions An array of support audio formats. Defaults are\n\t * 'mp3', 'ogg', 'wma', 'm4a', 'wav'.\n\t */\n\treturn apply_filters( 'wp_audio_extensions', array( 'mp3', 'ogg', 'wma', 'm4a', 'wav' ) );\n}", "public function getMicrophonesAndSpeakers(): ?Enablement {\n $val = $this->getBackingStore()->get('microphonesAndSpeakers');\n if (is_null($val) || $val instanceof Enablement) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'microphonesAndSpeakers'\");\n }", "public function setMobileMedia()\n {\n }", "function wp_get_audio_extensions() {\n\t/**\n\t * Filters the list of supported audio formats.\n\t *\n\t * @since 3.6.0\n\t *\n\t * @param array $extensions An array of support audio formats. Defaults are\n\t * 'mp3', 'ogg', 'flac', 'm4a', 'wav'.\n\t */\n\treturn apply_filters( 'wp_audio_extensions', array( 'mp3', 'ogg', 'flac', 'm4a', 'wav' ) );\n}", "function setDetectMixables($detectMixables) {\n $this->detectMixables = (bool) $detectMixables;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Store a newly created mailbox in storage.
public function store(CreateMailboxRequest $request) { // Mailbox::create($request->all()); return redirect()->route(config('quickadmin.route').'.mailbox.index'); }
[ "public function store(CreateInboxRequest $request)\n\t{\n\t \n\t\tInbox::create($request->all());\n\n\t\treturn redirect()->route(config('quickadmin.route').'.inbox.index');\n\t}", "public function store()\n {\n $this->validate(request(), [\n 'reply_to' => 'required|array|min:1',\n 'reply' => 'required',\n ]);\n\n Event::dispatch('email.create.before');\n\n $uniqueId = time() . '@' . config('mail.domain');\n\n $referenceIds = [];\n\n if ($parentId = request('parent_id')) {\n $parent = $this->emailRepository->findOrFail($parentId);\n\n $referenceIds = $parent->reference_ids ?? [];\n }\n\n $email = $this->emailRepository->create(array_merge(request()->all(), [\n 'source' => 'web',\n 'from' => 'admin@example.com',\n 'user_type' => 'admin',\n 'folders' => request('is_draft') ? ['draft'] : ['outbox'],\n 'name' => auth()->guard()->user()->name,\n 'unique_id' => $uniqueId,\n 'message_id' => $uniqueId,\n 'reference_ids' => array_merge($referenceIds, [$uniqueId]),\n 'user_id' => auth()->guard()->user()->id,\n ]));\n\n if (! request('is_draft')) {\n try {\n Mail::send(new Email($email));\n\n $this->emailRepository->update([\n 'folders' => ['inbox', 'sent'],\n ], $email->id);\n } catch (\\Exception $e) {}\n }\n\n Event::dispatch('email.create.after', $email);\n\n if (request('is_draft')) {\n return response([\n 'data' => new EmailResource($email),\n 'message' => __('admin::app.mail.saved-to-draft'),\n ]);\n }\n\n return response([\n 'data' => new EmailResource($email),\n 'message' => __('admin::app.mail.create-success'),\n ]);\n }", "public function creating(Mailbox $mailbox)\n {\n if (config('mum.mailboxes.homedir')) {\n $mailbox->homedir = getHomedirForMailbox($mailbox->local_part, $mailbox->domain->domain);\n }\n if (config('mum.mailboxes.maildir')) {\n $mailbox->maildir = getMaildirForMailbox($mailbox->local_part, $mailbox->domain->domain);\n }\n }", "private function newMailbox($name){\r\n\t\t$box_table = $this->avalanche()->PREFIX() . \"postoffice_mailbox\";\r\n\t\t// now i have a key to an account\r\n\t\t$sql = \"INSERT INTO $box_table (`name`,`quota`) VALUES ('$name','\" . $this->defaultQuota() . \"')\";\r\n\t\t$result = $this->avalanche()->mysql_query($sql);\r\n\t\t$id = $this->avalanche()->mysql_insert_id();\r\n\t\tif(!is_int($id)){\r\n\t\t\tthrow new Exception(\"could not create Mailbox. id #$id is not an int\");\r\n\t\t}\r\n\t\treturn $this->getMailbox($id);\r\n\t}", "public function store()\n\t{\n\t\t$id = Input::get('id');\n\t\t\n\t\tAuth::user()->storages_id = $id;\n\t\tAuth::user()->save();\n\t}", "public function store()\n {\n $this->validate();\n if (auth()->user()->can('create roles')) {\n $this->createRole();\n $this->resetAllData();\n $this->emit('refreshRolesIndex');\n } else {\n Session::flash('accessDenied', 'no permission to create a role.');\n }\n }", "public function store()\n {\n $this->validate(request(), [\n 'name' => 'required',\n 'subject' => 'required',\n 'content' => 'required',\n ]);\n\n Event::dispatch('settings.email_templates.create.before');\n\n $emailTemplate = $this->emailTemplateRepository->create(request()->all());\n\n Event::dispatch('settings.email_templates.create.after', $emailTemplate);\n\n session()->flash('success', trans('admin::app.settings.email-templates.create-success'));\n\n return redirect()->route('admin.settings.email_templates.index');\n }", "public function store()\n\t{\n\t\t$message = new Message();\n\n\t\t$input = Input::all();\n\n\t\t$message->message = $input['message'];\n\t\t$message->user_id = $input['user_id'];\n\t\t$message->event_id = $input['event_id'];\n\n\t\t$message->save();\n\t}", "public function store(MessageCollection $messages);", "function imap_createmailbox ($imap_stream, $mailbox) {}", "function setMailbox($value) {\n return $this->setFieldValue('mailbox', $value);\n }", "public function save()\n {\n parent::save();\n\n $this->_storeage->saveMessage($this);\n\n $this->_storeage->saveAttachments($this);\n\n $this->_storeage->saveMail($this);\n }", "public function store(CreateMailAttachmentRequest $request)\n {\n $input = $request->all();\n\n $mailAttachment = $this->mailAttachmentRepository->create($input);\n\n Flash::success('Mail Attachment saved successfully.');\n\n return redirect(route('mailAttachments.index'));\n }", "function sqimap_mailbox_create ($imap_stream, $mailbox, $type) {\n global $delimiter;\n if (strtolower($type) == 'noselect') {\n $create_mailbox = $mailbox . $delimiter;\n } else {\n $create_mailbox = $mailbox;\n }\n\n $read_ary = sqimap_run_command($imap_stream, 'CREATE ' .\n sqimap_encode_mailbox_name($create_mailbox),\n true, $response, $message);\n sqimap_subscribe ($imap_stream, $mailbox);\n}", "public function store(CreateCmsEmailQueuesRequest $request)\n {\n $input = $request->all();\n\n $cmsEmailQueues = $this->cmsEmailQueuesRepository->create($input);\n\n Flash::success('Cms Email Queues saved successfully.');\n\n return redirect(route('cmsEmailQueues.index'));\n }", "private function store()\n {\n $settings = [];\n foreach ($this->settings as $key => $value) {\n $settings[$key] = serialize($value);\n }\n $this->files->put($this->filepath, json_encode($settings));\n }", "public function create()\n\t{\n\n\n\t return view('admin.mailbox.create');\n\t}", "public function store(CreateMaillerRequest $request)\n\t{\n\t\t$input = $request->all();\n\n\t\t$mailler = $this->maillerRepository->create($input);\n\n\t\tFlash::success('Mailler saved successfully.');\n\n\t\treturn redirect(route('maillers.index'));\n\t}", "public function persist()\n {\n $filename = $this->getCacheFilename();\n $data = json_encode($this->attendees);\n\n file_put_contents($filename, $data);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
flushMemory Frees any memory associated with images
private function flushMemory($img, $newImage): void { imagedestroy($newImage); imagedestroy($img); }
[ "public function flushImageArray()\n {\n $this->deleteHasCache(self::CACHE_KEY_IMAGE);\n }", "public function free(){\r\n if($this->srcImage) imagedestroy($this->srcImage);\r\n }", "private function flushImageCache(): void\n {\n $this->imagesCache = null;\n $this->variantImages = null;\n }", "function free(){\n\t\t// Delete the all old temporary images\n\t\tif(glob($this->path.\"images/*.png\"))\n\t\tforeach(glob($this->path.\"images/*.png\") as $tmp)\n\t\t\tunlink($tmp);\n\t}", "public function freeMemory()\n {\n $this->_freeMemory();\n foreach ($this->_dataCache as $id=>$c) {\n if (isset($this->_dataCacheIgnoreVisible[$id])) {\n unset($this->_dataCacheIgnoreVisible[$id]);\n }\n $c->_freeMemory();\n }\n foreach ($this->_dataCacheIgnoreVisible as $id=>$c) {\n $c->_freeMemory();\n }\n $this->_dataCache = array();\n $this->_dataCacheIgnoreVisible = array();\n $this->_componentsByClassCache = null;\n $this->_componentsByDbIdCache = null;\n $this->_generatorsForClassesCache = array();\n //Kwf_Component_Generator_Abstract::clearInstances();\n Kwf_Model_Abstract::clearAllRows();\n\n if (function_exists('gc_collect_cycles')) gc_collect_cycles();\n }", "public function clear()\n {\n imagedestroy($this->tmpImage);\n }", "private function clearMemoryBuffer(): void {\n $this->memoryBuffer = null;\n }", "public function clear_memory() {\n\t\t$this->added->clear();\n\t\t$this->removed->clear();\n\t}", "public function free()\n {\n if (is_resource($this->_handle)) {\n imagedestroy($this->_handle);\n }\n\n if (is_resource($this->_target_handle)) {\n imagedestroy($this->_target_handle);\n }\n\n $args = func_get_args();\n\n if (! empty($args)) {\n foreach ($args as $resource) {\n if (is_resource($resource)) {\n imagedestroy($resource);\n }\n }\n }\n }", "private function resetMemory()\n {\n $this->rotateMemory = 0;\n $this->randomCache = [];\n }", "public function finish()\n {\n if($this->img)\n {\n imagedestroy($this->img);\n $this->img = null;\n }\n }", "public function destroy()\n {\n if (is_resource($this->fontRcImg) && is_resource($this->newImgRc)) {\n //Destroing image Memory Resources\n imagedestroy($this->fontRcImg);\n imagedestroy($this->newImgRc);\n\n $this->ext = null;\n $this->fontRcImg = null;\n $this->trans = false;\n $this->newImgRc = null;\n $this->originalSize = null;\n $this->finalSize = null;\n $this->wishedSize = null;\n $this->imgName = null;\n $this->photoX = 0;\n $this->photoY = 0;\n $this->forceScale = false;\n }\n }", "protected function free_memory() {\n if ( function_exists( 'Utils\\\\wp_clear_object_cache' ) ) {\n Utils\\wp_clear_object_cache();\n }\n }", "public function deleteMemories() {\n $this->memories->clear();\n }", "public function destroyImage()\n {\n }", "public function garbageCollect(): void;", "public function flushArrays()\n {\n $this->_filesArray = null;\n $this->_imagesArray = null;\n $this->_foldersArray = null;\n $this->_filtersArray = null;\n $this->deleteHasCache(self::CACHE_KEY_FILE);\n $this->deleteHasCache(self::CACHE_KEY_IMAGE);\n $this->deleteHasCache(self::CACHE_KEY_FOLDER);\n $this->deleteHasCache(self::CACHE_KEY_FILTER);\n }", "function ClearRegisteredImages(){}", "public function __destruct()\n {\n @imagedestroy($this->_imageHandler);\n $fileLocation = CORE_TEMP . 'temp_image' . $this->_time;\n \n if (file_exists($fileLocation)) {\n @unlink($fileLocation);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clean Yeti Theme Option Defaults Returns an associative array that holds all of the default values for all Theme options.
function cleanyeti_get_option_defaults() { // Get the array that holds all // Theme option parameters $option_parameters = cleanyeti_get_option_parameters(); // Initialize the array to hold // the default values for all // Theme options $option_defaults = array(); // Loop through the option // parameters array foreach ( $option_parameters as $option_parameter ) { $name = $option_parameter['name']; // Add an associative array key // to the defaults array for each // option in the parameters array $option_defaults[$name] = $option_parameter['default']; } // Return the defaults array return apply_filters( 'cleanyeti_option_defaults', $option_defaults ); }
[ "public static function get_option_defaults() {\r\n\r\n\t\t\t// Get the array that holds all theme \r\n\t\t\t// font option parameters\r\n\t\t\t$tt_font_parameters = self::get_option_parameters();\r\n\r\n\t\t\t// Initialize the array to hold the default \r\n\t\t\t// values for all of the font options\r\n\t\t\t$tt_font_defaults = array();\r\n\r\n\t\t\t// Loop through the font option parameters array\r\n\t\t\tforeach ( $tt_font_parameters as $tt_font_parameter ) {\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Add an associative array key to the defaults array for each\r\n\t\t\t\t * option in the parameters array\r\n\t\t\t\t */\r\n\t\t\t\t$name = $tt_font_parameter['name'];\r\n\t\t\t\t$tt_font_defaults[ $name ] = $tt_font_parameter['default'];\r\n\t\t\t}\r\n\r\n\t\t\t// Return the defaults array\r\n\t\t\treturn apply_filters( 'tt_font_option_defaults', $tt_font_defaults );\r\n\t\t}", "function mailchimp_rest_api_get_theme_options() {\n\t\t$saved = (array) get_option( 'mailchimp_rest_api_theme_options' );\n\t\t$defaults = array(\n\t\t\t'mailchimp_api_key' => '',\n\t\t\t'mailchimp_list_id' => '',\n\t\t\t'mailchimp_form_key' => '',\n\t\t\t'mailchimp_form_secret' => '',\n\t\t\t'mailchimp_honeypot' => '',\n\t\t\t'mailchimp_origin' => '',\n\t\t);\n\n\t\t$defaults = apply_filters( 'mailchimp_rest_api_default_theme_options', $defaults );\n\n\t\t$options = wp_parse_args( $saved, $defaults );\n\t\t$options = array_intersect_key( $options, $defaults );\n\n\t\treturn $options;\n\t}", "public function get_default_theme_options() {\n return array(\n 'analytics' => '', \n 'flickr_api_key' => '',\n 'instagram_token' => '',\n 'twitter_token' => '',\n 'twitter_token_secret' => '', \n 'twitter_consumer_secret' => '',\n 'twitter_consumer_key' => '',\n 'theme_version' => '1.5'\n );\n }", "function of_get_default_values() {\n\t$output = array();\n\t$config =& _optionsframework_options();\n\tforeach ( (array) $config as $option ) {\n\t\tif ( ! isset( $option['id'] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( ! isset( $option['std'] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( ! isset( $option['type'] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( has_filter( 'of_sanitize_' . $option['type'] ) ) {\n\t\t\t$output[$option['id']] = apply_filters( 'of_sanitize_' . $option['type'], $option['std'], $option );\n\t\t}\n\t}\n\treturn $output;\n}", "function YourTheme_get_theme_options() {\n\t\t$saved = (array) get_option( 'YourTheme_theme_options' );\n\t\t$defaults = array(\n\t\t\t'sample_checkbox' => 'off',\n\t\t\t'sample_text_input' => '',\n\t\t\t'sample_select_options' => '',\n\t\t\t'sample_radio_buttons' => '',\n\t\t\t'sample_textarea' => '',\n\t\t\t'hero_image' => 'http://unsplash.it/1440/900?image=233',\n\t\t\t'hero_title' => 'Lorem Ipsum',\n\t\t\t'hero_subtitle' => 'Dolor Sit Amet Consetitur',\n\t\t\t'hero_cta_label' => 'Call-to-Action',\n\t\t\t'hero_cta_link' => 'http://www.google.dk'\n\t\t);\n\n\t\t$defaults = apply_filters( 'YourTheme_default_theme_options', $defaults );\n\n\t\t$options = wp_parse_args( $saved, $defaults );\n\t\t$options = array_intersect_key( $options, $defaults );\n\n\t\treturn $options;\n\t}", "public function restoreDefaultOptions()\n {\n delete_site_option(GLOBAL_NS.'_options');\n $this->options = $this->default_options;\n return $this->getOptions();\n }", "function blog_way_get_default_color_options() {\n\n $defaults = array();\n\n $defaults['background_color'] = 'ffffff';\n $defaults['body_color'] \t\t\t= '#404040';\n\t\t$defaults['site_title_color'] \t\t= '#222222';\n\t\t$defaults['site_description_color'] = '#818181';\n\t\t$defaults['button_color']\t\t\t= '#202020';\n\t\t$defaults['scrollup_color']\t\t\t= '#ea9920';\n\t\t$defaults['header_bg_color'] \t\t= '#202020';\n\t\t$defaults['menu_color'] \t\t\t= '#ffffff';\n\t\t$defaults['menu_hover_color'] \t\t= '#afafaf';\n\t\t$defaults['headings_color'] \t\t= '#404040';\n\t\t$defaults['meta_color'] \t\t = '#ea9920';\n\t\t$defaults['anchor_color'] \t\t = '#ea9920';\n\t\t$defaults['footer_bg_color'] \t\t= '#202020';\n\t\t$defaults['footer_text_color'] \t = '#787878';\n\n $defaults['reset_colors'] = false;\n\n return $defaults;\n }", "private static function default_settings(){\n\t\t$defaults = array();\n\t\tforeach(Settings::$options as $setting => $config){\n\t\t\t$defaults[$setting] = $config['default'];\n\t\t}\n\t\treturn $defaults;\n\t}", "protected function get_default_settings() {\n\t\treturn [\n\t\t\t'options' => [],\n\t\t\t'multiple' => false,\n\t\t\t'select2options' => [],\n\t\t];\n\t}", "public static function get_settings_defaults(){\r\n\t\t\r\n\t\t$defaults = array();\r\n\t\tforeach( self::init_settings() as $settings ){\r\n\t\t\tforeach( $settings as $setting ){\r\n\t\t\t\tif( isset( $setting['id'] ) && isset( $setting['default'] ) ){\r\n\t\t\t\t\t$defaults[$setting['id']] = $setting['default'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $defaults;\r\n\t\t\r\n\t}", "function optimize_mikado_init_theme_options() {\n\t\tglobal $optimize_mikado_options;\n\t\tglobal $optimize_mikado_Framework;\n\t\tif(isset($optimize_mikado_options['reset_to_defaults'])) {\n\t\t\tif( $optimize_mikado_options['reset_to_defaults'] == 'yes' ) delete_option( \"mkd_options_optimize\");\n\t\t}\n\n\t\tif (!get_option(\"mkd_options_optimize\")) {\n\t\t\tadd_option( \"mkd_options_optimize\",\n\t\t\t\t$optimize_mikado_Framework->mkdOptions->options\n\t\t\t);\n\n\t\t\t$optimize_mikado_options = $optimize_mikado_Framework->mkdOptions->options;\n\t\t}\n\t}", "public static function get_all_styles() {\n\n\t\t$all_styles = get_option( 'mc4wp_form_styles', array() );\n\n\t\tif( ! is_array( $all_styles ) ) {\n\t\t\tdelete_option( 'mc4wp_form_styles' );\n\t\t\treturn array();\n\t\t}\n\n\t\t// merge all theme settings with the defaults array\n\t\tforeach( $all_styles as $form_id => $form_styles ) {\n\t\t\t$all_styles[ $form_id ] = array_merge( self::get_default_form_styles(), $form_styles );\n\t\t}\n\n\t\treturn $all_styles;\n\t}", "function exsearch_get_theme_options() {\n\t\t$saved = (array) get_option( 'exsearch_theme_options' );\n\t\t$defaults = array(\n\t\t\t'post_types' => array(),\n\t\t\t'individual_pages' => '',\n\t\t);\n\n\t\t$defaults = apply_filters( 'exsearch_default_theme_options', $defaults );\n\n\t\t$options = wp_parse_args( $saved, $defaults );\n\t\t$options = array_intersect_key( $options, $defaults );\n\n\t\treturn $options;\n\t}", "private function _parseDefaultTheme() {\n $styles = array();\n if (isset($this->_data[\"default\"])) {\n $default = $this->_data[\"default\"];\n if (count($default)) {\n foreach ($default as $style) {\n $styles []= $style;\n }\n }\n }\n return $styles;\n }", "protected function applicationOptionDefaultValues()\n {\n if (!$this->application) {\n return [];\n }\n\n $result = [];\n foreach ($this->application->getDefinition()->getOptions() as $key => $option) {\n $result[$key] = $option->acceptValue() ? $option->getDefault() : null;\n }\n return $result;\n }", "function pagelines_settings_defaults() {\n\n\t$default_options = array();\n\t\n\t\tforeach(get_option_array( true ) as $menuitem => $options ){\n\t\t\t\n\t\t\tforeach($options as $oid => $o ){\n\n\t\t\t\tif($o['type']=='layout'){\n\t\t\t\t\t\n\t\t\t\t\t$dlayout = new PageLinesLayout;\n\t\t\t\t\t$default_options['layout'] = $dlayout->default_layout_setup();\n\t\t\t\t\t\n\t\t\t\t}elseif( pagelines_is_multi_option($oid, $o) ){\n\t\t\t\t\t\n\t\t\t\t\tforeach($o['selectvalues'] as $multi_optionid => $multi_o)\n\t\t\t\t\t\tif(isset($multi_o['default'])) $default_options[$multi_optionid] = $multi_o['default'];\n\t\t\t\t\t\n\n\t\t\t\t}else{ \n\t\t\t\t\tif(!VPRO && isset($o['version_set_default']) && $o['version_set_default'] == 'pro') \n\t\t\t\t\t\t$default_options[$oid] = null;\n\t\t\t\t\telseif(!VPRO && isset($o['default_free'])) \n\t\t\t\t\t\t$default_options[$oid] = $o['default_free'];\n\t\t\t\t\telseif(isset($o['default'])) \n\t\t\t\t\t\t$default_options[$oid] = $o['default'];\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\treturn apply_filters('pagelines_settings_defaults', $default_options);\n}", "function cupid_get_default_options() {\n\t\n\t$defaults = array();\n\n\ttry {\t\n\t\t// setup defaults array\n\t\t$defaults = array(\n\t\t\t'cupid_forms_admin_email' => '',\n\t\t\t'cupid_table_row_limit'=>10,\n\t\t);\n\t\n\t} catch( Exception $e) {\n\t\t\n\t\t// php error\n\t\t\n\t}\n\t\n\t// return defaults\n\treturn $defaults;\n\t\n\t\n}", "private function get_default_options() {\n // 'option_name' => option_value\n return array(\n // Non-setting options:\n 'jpid_version'\t\t\t\t\t\t\t\t\t => '',\n 'jpid_db_version' => '',\n\n // Setting options:\n 'jpid_snacks_selection_page' => 0,\n 'jpid_drinks_selection_page' => 0,\n 'jpid_checkout_page' => 0,\n 'jpid_payment_confirmation_page' => 0,\n 'jpid_customer_page' => 0,\n 'jpid_order_full_status' => 0,\n 'jpid_order_full_notice' => '',\n 'jpid_order_available_date' => '',\n 'jpid_delivery_days_range' => 4,\n 'jpid_delivery_hours' => array( 'start' => '06:00', 'end' => '21:00' ),\n 'jpid_delivery_cost_method' => 'flat',\n 'jpid_delivery_cost_amount' => 0,\n 'jpid_delivery_locations' => array(),\n 'jpid_bank_payment_title' => '',\n 'jpid_bank_payment_description' => '',\n 'jpid_bank_payment_instructions' => '',\n 'jpid_bank_payment_accounts' => array(),\n );\n }", "function cinerama_edge_init_theme_options_array() {\n\t\tglobal $cinerama_edge_global_options, $cinerama_edge_global_Framework;\n\n\t\t$db_options = get_option( 'edgtf_options_cinerama' );\n\n\t\t//does edgtf_options_cinerama exists in db?\n\t\tif ( is_array( $db_options ) ) {\n\t\t\t//merge with default options\n\t\t\t$cinerama_edge_global_options = array_merge( $cinerama_edge_global_Framework->edgtOptions->options, get_option( 'edgtf_options_cinerama' ) );\n\t\t} else {\n\t\t\t//options don't exists in db, take default ones\n\t\t\t$cinerama_edge_global_options = $cinerama_edge_global_Framework->edgtOptions->options;\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of field complemento
public function getComplemento() { return $this->complemento; }
[ "public function getComplemento()\n {\n return $this->complemento;\n }", "public function getComplement() \n {\n return $this->complement;\n }", "public function getComplement()\r\n {\r\n return $this->complement;\r\n }", "public function getComplement()\n {\n return $this->complement;\n }", "public function getComplementInfo()\n {\n return $this->complementInfo;\n }", "public function getValorNota()\r\n {\r\n return $this->valornota;\r\n }", "public function getContaDebito() {\n return $this->iContaDebito;\n\t}", "function Bit2Val($palabra, $tipo=0)\r\n{\r\n\t/*Valores posibles para tipo\r\n\t0\t-> Entero sin signo\r\n\t1\t-> Entero con signo (primer bit de signo)\r\n\t*/\r\n\t\r\n\t//El valor en decimal es el ascii del caracter\r\n\treturn ord($palabra);\r\n\t\r\n\tswitch ($tipo)\r\n\t{\r\n\t\tcase 0:\r\n\t\t{\r\n\t\t\t$num_decimal=bindec($palabra);\r\n\t\t\treturn $num_decimal;\r\n\t\t}\r\n\t\tcase 1:\r\n\t\t{\r\n\t\t\t$signo=substr($palabra, 0, 1);\r\n\t\t\t$numero_bin=substr($palabra, 1);\r\n\t\t\t$num_decimal=bindec($numero_bin);\r\n\t\t\tif ($signo=='0')\r\n\t\t\t\treturn $num_decimal;\r\n\t\t\telse\r\n\t\t\t\treturn($num_decimal*-1);\r\n\t\t}\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t}\r\n}", "public function getVNumeroCompte() {\n return $this->vNumeroCompte;\n }", "public function getContaDebito() {\n return $this->iContaDebito;\n }", "public function getMotivo_anti()\n {\n return $this->motivo_anti;\n }", "private function contaBissextos(){\n return intval(($this->ano-1)/4) - intval(($this->ano-1)/100) + intval(($this->ano-1)/400);\n }", "public function getNegocio();", "public function getCoNegocio()\n\t{\n\t\treturn $this->co_negocio;\n\t}", "public function getValorOutrosCreditos();", "public function getValordesconto()\n {\n return $this->valordesconto;\n }", "public function getComplementAdress()\n {\n return $this->complementAdress;\n }", "public function getValorOutrosCreditos()\n {\n if (\\Cnab\\Banco::CEF == $this->_codigo_banco) {\n return 0;\n } else {\n return $this->valor_outros_creditos;\n }\n }", "function get_correoElectronico( ) {\n // returns the value of correoElectronico\n return $this->correoElectronico;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Implement getProductDraftApi() method.
public function getProductDraftApi(): ProductDraftApiInterface { }
[ "public function getProductModelDraftApi(): ProductModelDraftApiInterface\n {\n }", "private function getDraftedProduct()\n {\n return $this->session->get('drafted_product', null);\n }", "public function testStoreProductsDraft()\n {\n }", "public function testCreateDrafts()\n {\n }", "public function getPublishedProductApi(): PublishedProductApiInterface\n {\n }", "public function isDraft();", "protected function voucherDraftsV2GetRequest()\n {\n\n $resourcePath = '/v2/voucherdrafts';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function storeProductsDraftWithHttpInfo($body)\n {\n $returnType = '\\RackbeatApp\\Client\\Model\\Product';\n $request = $this->storeProductsDraftRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse()->getBody()->getContents()\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\RackbeatApp\\Client\\Model\\Product',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function testSupplierInvoiceDraftsV2Get()\n {\n }", "public function getIsDraft();", "public function getFeaturedProduct();", "public function setAsDraft();", "public function testDeleteDraft()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function react_wp_rest_get_preview_data(WP_REST_Request $request) {\n\n\t$post = get_post_by_slug($request->get_param('slug'));\n\n\t$post_id = $post->ID;\n\n\t// Revisions are drafts so here we remove the default 'publish' status\n\tremove_action('pre_get_posts', 'set_default_status_to_publish');\n\t\n\tif ( $revisions = wp_get_post_revisions( $post_id, array( 'check_enabled' => false ) )) {\n\t\t$last_revision = reset($revisions);\n\t\t$rev_post = wp_get_post_revision($last_revision->ID);\n\t\t$controller = new WP_REST_Posts_Controller('post');\n\t\t$data = $controller->prepare_item_for_response( $rev_post, $request );\n\t} elseif ( $post = get_post( $post_id ) ) { \n\t\t// There are no revisions, just return the saved parent post\n\t\t$controller = new WP_REST_Posts_Controller('post');\n\t\t$data = $controller->prepare_item_for_response( $post, $request );\n\t} else {\n\t\treturn new WP_Error( 'rest_get_post_preview', 'Post ' . $post_id . ' does not exist',\n\t\t\tarray( 'status' => 404 ) );\n\t}\n\t$response = $controller->prepare_response_for_collection( $data );\n\treturn new WP_REST_Response($response);\n}", "public function agreementDraft() {\n\n }", "public function getDraftsResponse()\n {\n return $this->draftsResponse;\n }", "public function getDraftDocuments() {\n return $this->getDocuments(\"drafts\");\n }", "function rest_get_post_preview(WP_REST_Request $request)\n{\n $post_id = $request->get_param('id');\n // Revisions are drafts so here we remove the default 'publish' status\n remove_action('pre_get_posts', 'set_default_status_to_publish');\n if ($revisions = wp_get_post_revisions($post_id, array( 'check_enabled' => false ))) {\n $last_revision = reset($revisions);\n $rev_post = wp_get_post_revision($last_revision->ID);\n $controller = new WP_REST_Posts_Controller('post');\n $data = $controller->prepare_item_for_response($rev_post, $request);\n } elseif ($post = get_post($post_id)) { // There are no revisions, just return the saved parent post\n $controller = new WP_REST_Posts_Controller('post');\n $data = $controller->prepare_item_for_response($post, $request);\n } else {\n return new WP_Error(\n 'rest_get_post_preview',\n 'Post ' . $post_id . ' does not exist',\n array( 'status' => 404 )\n );\n }\n $response = $controller->prepare_response_for_collection($data);\n return new WP_REST_Response($response);\n}", "public function getProduct();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if title has been set
public function hasTitle(): bool;
[ "public function issetTitle() {\r\n\t\treturn $this->title != NULL;\r\n\t}", "function hasTitle()\n {\n return isset($this->_title);\n }", "public function hasTitle() {\n return $this->getTitle() != null;\n }", "protected function set_title()\n {\n }", "public function isSetTitle()\n {\n return !is_null($this->_fields['Title']['FieldValue']);\n }", "function aton_qodef_post_has_title() {\n\t\treturn get_the_title() !== '';\n\t}", "public function isSetTitle()\n {\n return !is_null($this->_fields['Title']['FieldValue']);\n }", "protected function hasOverridenTitle()\n {\n return !!parent::getTitle();\n }", "function show_title()\n {\n return ($this->show_title==1);\n }", "public function testTitle() {\n\t\t$this->_testGetterSetter('getTitle', 'setTitle');\n\t}", "public function hasTooltipTitle();", "public function hasPageTitle() {\n return !empty($this->_page_title);\n }", "function magazinevibe_edge_post_has_title() {\n\t\treturn get_the_title() !== '';\n\t}", "public function hasTitles()\n {\n return false;\n }", "public function hasTitles()\n {\n return true;\n }", "function superfood_elated_post_has_title() {\n return get_the_title() !== '';\n }", "function affinity_mikado_post_has_title() {\n\t\treturn get_the_title() !== '';\n\t}", "public function set_title($title);", "public function isTitleVisible()\n {\n return true;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the given AVS Number is Valid or Not.
public function validate(String $avsNumber, bool $checkStrict = true): bool { $this->avsNumber = $avsNumber; if (! $this->avsNumber) { throw new AvsNumberNotSetException('AVS Number is not set'); } if (! $this->hasValidFormat($checkStrict)) { return false; } if (! $this->hasValidChecksum()) { return false; } return true; }
[ "public function validateVatNumber($vatNumber);", "public function isValid()\n {\n return $this->checkValidity() === self::VALID_VAT_NUMBER;\n }", "public function isValid($number);", "public function testValidationOfValidVATNumber()\n {\n $vatNumber = new VatNumber('');\n\n $this->assertEquals(VATNumber::VALID_VAT_NUMBER, $vatNumber->validate());\n $this->assertTrue($vatNumber->isValid());\n }", "function isValidNumber()\n\t\t{//_9_5_1_5e60209_1149166999843_924482_375\n\t\t\treturn $this->parseResult;\n\t\t}", "public function isVatValid();", "public function validate()\r\n {\r\n $pattern = '/^(?!219-09-9999|078-05-1120|219099999|078051120)(?!666|000|9\\d{2})\\d{3}-?(?!00)\\d{2}-?(?!0{4})\\d{4}$/';\r\n \r\n if (!preg_match($pattern, $this->_data)) $this->addError('Invalid social security entered.');\r\n\r\n return !sizeof($this->_errors);\r\n }", "public function isValid(){\n\t\t\n\t\treturn $this->number && $this->securityCode;\n\t\t\n\t}", "private function validateNumber()\n\t{\n\t\tif(!is_numeric($this->testValue))\n\t\t{\n\t\t\t$this->returnData['type']='error';\n\t\t\t$this->returnData['message'] = 'The field does not consist of all numbers.';\n\t\t\t$this->returnData['valid'] = false;\n\t\t}\n\t}", "public function CVC_Validate($CVC)\r\n {\r\n $CVC_pattern=\"/^([0-9]{3})$/\"; //enter only 3 digit number \r\n if(!preg_match($CVC_pattern, $CVC)){ //check patteren match\r\n return false;\r\n }\r\n else{\r\n return true;\r\n }\r\n }", "function testIsValidInput_SSN_invalid_03()\n {\n $instance = ESAPI::getValidator();\n $this->assertFalse($instance->isValidInput('test', '(555) 555-5555', 'SSN', 100, false));\n }", "function checkAADHAARCardValidation($AADHAARCardNumber){\r\r\n global $mycms,$cfg;\r\r\n\r\r\n //$AADHAARCardNumber = $mycommoncms->getFieldValue($AADHAARCardNumber);\r\r\n $flag = 0;\r\r\n $AADHAARCardNumberLen = strlen($AADHAARCardNumber);\r\r\n if($AADHAARCardNumberLen!=12){\r\r\n $flag++;\r\r\n }\r\r\n $checkAADHAARCardNumber = checkNumberValidation($AADHAARCardNumber);\r\r\n if($checkAADHAARCardNumber==0){\r\r\n $flag++;\r\r\n }\r\r\n if($flag==0){\r\r\n return 1;\r\r\n }\r\r\n else {\r\r\n return 0;\r\r\n }\r\r\n }", "public function validateVatNumberFormat(string $vatNumber) : bool\n {\n if ($vatNumber === '') {\n return false;\n }\n\n $vatNumber = strtoupper($vatNumber);\n $country = substr($vatNumber, 0, 2);\n $number = substr($vatNumber, 2);\n\n // Country needs to be 2 letters ISO code\n if(strlen($country) !== 2){\n return false;\n }\n\n // 2nd part of VAT ID needs to be at least 1 char long\n if($number == false){\n return false;\n }\n\n $matches = $this->patterns->matches($country, $number);\n\n return $matches;\n }", "function _isCheckNumberValidWithMethod14($bankAccountNumber)\n {\n $weighting = array(2, 3, 4, 5, 6, 7, 0, 0, 0, 0);\n $expectedCheckNumber = substr($bankAccountNumber, strlen($bankAccountNumber) - 1, 1);\n $calculatedCheckNumber = $this->_calculateCheckNumberWithMethod02($bankAccountNumber, $weighting);\n\n // if calculatedCheckNumber is false it is not possible to calculate a check number\n if (is_bool($calculatedCheckNumber)) {\n if (!$calculatedCheckNumber) {\n return false;\n }\n }\n\n return ($expectedCheckNumber == $calculatedCheckNumber);\n }", "function _isCheckNumberValidWithMethod24($bankAccountNumber)\n {\n $weighting = array(1, 2, 3, 1, 2, 3, 1, 2, 3, 1);\n $expectedCheckNumber = substr($bankAccountNumber, strlen($bankAccountNumber) - 1, 1);\n $calculatedCheckNumber = $this->_calculateCheckNumberWithMethod24($bankAccountNumber, $weighting);\n\n return ($expectedCheckNumber == $calculatedCheckNumber);\n }", "function _isCheckNumberValidWithMethod22($bankAccountNumber)\n {\n $weighting = array(3, 1, 3, 1, 3, 1, 3, 1, 3, 1);\n $expectedCheckNumber = substr($bankAccountNumber, strlen($bankAccountNumber) - 1, 1);\n $calculatedCheckNumber = $this->_calculateCheckNumberWithMethod22($bankAccountNumber, $weighting, true);\n\n return ($expectedCheckNumber == $calculatedCheckNumber);\n }", "private function checkNumberValid($number, $numberType=\"ALL\")\n\t\t{\n\t\t\n\t\t\t// Create an array to hold our valid digits\n\t\t\t$valid = Array();\n\t\t\t\n\t\t\t// Valid UK telephone number digits\n\t\t\t$mobileArray = Array(7);\n\t\t\t$landlineArray = Array(1,2);\n\t\t\t\n\t\t\t// Strip spaces from the number\n\t\t\t$thisNumber = (int)str_replace(\" \",\"\",$number);\n\t\t\t\n\t\t\t// Make sure the number starts with a 0\n\t\t\tif ( substr($thisNumber, 0, 1) != \"0\" ) {\n\t\t\t\t$thisNumber = \"0\".$thisNumber;\n\t\t\t}\n\t\t\t\n\t\t\t// Create a selection of valid digits depending on the type required\n\t\t\tif ($numberType == \"ALL\") {\n\t\t\t\t$valid = array_merge($mobileArray, $landlineArray);\n\t\t\t} else if ($numberType == \"MOBILE\") {\n\t\t\t\t$valid = $mobileArray;\n\t\t\t} else if ($numberType == \"LANDLINE\") {\n\t\t\t\t$valid = $landlineArray;\n\t\t\t}\n\n\t\t\t// Get the second digit from the number\n\t\t\t$secondDi = (int)substr($thisNumber, 1, 1);\n\t\t\t\n\t\t\t// Check that the phone number is in the range we require\n\t\t\tif ( in_array($secondDi, $valid) ) {\n\t\t\t\n\t\t\t\t// Run the function to check if it's a valid UK number\n\t\t\t\tif (!$this->checkUKTelephone ($thisNumber, $errorNo, $errorText) ) {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t} else {\n\t\t\t\t\t// If the number is valid then strip the 0 again and return it\n\t\t\t\t\tif (strlen($thisNumber) > 9) {\n\t\t\t\t\t\tif ( substr($thisNumber, 0, 1) == \"0\" ) {\n\t\t\t\t\t\t\t$thisNumber = substr($thisNumber, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (int)$thisNumber;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "public function validateNumber()\n {\n /*\n * Luhn algorithm number checker - (c) 2005-2008 shaman - www.planzero.org\n * This code has been released into the public domain, however please\n * give credit to the original author where possible.\n */\n\n // Set the string length and parity\n $number_length = strlen($this->number);\n $parity = $number_length % 2;\n\n // Loop through each digit and do the maths\n $total = 0;\n for ($i = 0; $i < $number_length; $i++) {\n $digit = $this->number[$i];\n // Multiply alternate digits by two\n if ($i % 2 == $parity) {\n $digit *= 2;\n // If the sum is two digits, add them together (in effect)\n if ($digit > 9) {\n $digit -= 9;\n }\n }\n // Total up the digits\n $total += $digit;\n }\n\n // If the total mod 10 does not equal 0, the number is invalid\n if ($total % 10 != 0) {\n throw new InvalidCreditCardException(\"The credit card number is invalid\");\n }\n }", "function _isCheckNumberValidWithMethod10($bankAccountNumber)\n {\n $weighting = array(2, 3, 4, 5, 6, 7, 8, 9, 10);\n $expectedCheckNumber = substr($bankAccountNumber, strlen($bankAccountNumber) - 1, 1);\n //the calculation of 10 is like 06\n $calculatedCheckNumber = $this->_calculateCheckNumberWithMethod06($bankAccountNumber, $weighting, true);\n\n return ($expectedCheckNumber == $calculatedCheckNumber);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the audioFormat Name of the audio format (AAC, MP3, etc.).
public function getAudioFormat() { if (array_key_exists("audioFormat", $this->_propDict)) { return $this->_propDict["audioFormat"]; } else { return null; } }
[ "public function getAudioFormat()\n {\n return $this->audio_format;\n }", "public function getDefaultFormatClassName()\n {\n return 'AudioFormat';\n }", "function getFormatFilename()\n\n\t{\n\n\t\tglobal $config;\n\n\t\tglobal $config;\n\n\n\n\t\t$bitrate = $this->bitrate;\n\n\t\tfor ($i=0;$i<count($config['audioFormats']);$i++)\n\n\t\t\tif (abs($config['audioFormats'][$i]['bitrate'] - $this->bitrate) < $config['bitrateTolerance'])\n\n\t\t\t\t$bitrate = $config['audioFormats'][$i]['bitrate'];\n\n\t\treturn round($bitrate) . 'kbps_' . $this->channels . 'chn_' . $this->samplerate . 'Hz.' . $this->format;\n\n\t}", "public function getFormat(): string\n {\n return \"wav\";\n }", "public function getAudioCodec()\n\t{\n\t\treturn $this->getFormat()->getAudioCodec();\n\t}", "public function getTheMimeTypeOfThisSoundFormat($sound_format){\n \n if($sound_format == strtolower('mp3')){\n return 'audio/mpeg3';\n }else if($sound_format == strtolower('mp3')){\n return 'audio/x-mpeg-3';\n }else if($sound_format == strtolower('aac')){\n return 'audio/aac';\n }else if($sound_format == strtolower('3gp')){\n return 'audio/3gpp';\n }else if($sound_format == strtolower('aiff')){\n return 'audio/aiff';\n }else if($sound_format == strtolower('aiff')){\n return 'audio/x-aiff';\n }else if($sound_format == strtolower('gsm')){\n return 'audio/x-gsm';\n }else if($sound_format == strtolower('wma')){\n return 'audio/x-ms-wma';\n }else if($sound_format == strtolower('webm')){\n return 'audio/webm';\n }else { \n return 0;\n }\n }", "public function getFormat(): string\n {\n return \"mp3\";\n }", "public function getAudioFileName() {\n\t\treturn $this->getAudioFilePath().$this->getSpeaker().$this->conf['extensions']['audio'];\n\t}", "public static abstract function getFormatName();", "public function setAudioFormat($var)\n {\n GPBUtil::checkString($var, True);\n $this->audio_format = $var;\n\n return $this;\n }", "public function getAudioCodec()\n {\n return $this->audioCodec;\n }", "public function getAudioCodec();", "public function getAudioCodecType()\n {\n return $this->audioCodecType;\n }", "public function getFormat() {\n\t\t\treturn $this->format;\n\t\t}", "public function getFormatId()\n {\n return $this->format_id;\n }", "function GetFormat($format='h')\n\t{\n\t\tif (empty($format)) {\n\t\t\t$format = 'h';\n\t\t} else {\n\t\t\t$format = strval($format);\n\t\t}\n\n\t\t$format = strtolower($format{0}); // only get the first character in case the whole name is passed in.\n\t\tif (!in_array($format, array_keys($this->AllFormats))) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->AllFormats[$format];\n\t}", "public function getFormat();", "public function getFormatCode()\n {\n return $this->formatCode;\n }", "public function getFormat(): string\n {\n if ($this->number instanceof Decimal) {\n return Format::FORMAT_DECIMAL;\n }\n\n if ($this->number instanceof Hexadecimal) {\n return Format::FORMAT_HEXADECIMAL;\n }\n\n return Format::FORMAT_BINARY;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pluck a certain field out of each object in a list.
public static function pluck($list, $field) { foreach ( $list as $key => $value ) { if (is_object($value)) $list[$key] = $value->$field; else $list[$key] = $value[$field]; } return $list; }
[ "public static function pluckRef(&$list, $field) {\n\n\t\tforeach ( $list as &$value ) {\n\n\t\t\tif (is_object($value))\n\t\t\t\t$value = $value->$field;\n\t\t\telse\n\t\t\t\t$value = $value[$field];\n\t\t}\n\n\t\treturn $list;\n\t}", "function list_pluck($list, $field) {\n\treturn \\Phpf\\Util\\Arr::pluck($list, $field);\n}", "function rc_list_pluck( $list, $field, $index_key = null ) {\n return array_column($list, $field, $index_key);\n }", "function list_pluck_ref(&$list, $field) {\n\treturn \\Phpf\\Util\\Arr::pluckRef($list, $field);\n}", "function wc_list_pluck($list, $callback_or_field, $index_key = \\null)\n {\n }", "function pick_fields($item, $fields) {\n $item = (object)$item;\n $values = array();\n\n foreach ($fields as $field) {\n $values[$field] = isset($item->$field) ? $item->$field : null;\n }\n\n return $values;\n}", "public function pluck($field)\n {\n // Remove any other select-values\n $this->select(['*']);\n $this->select([$field]);\n $result = $this->get();\n\n if (!empty($result[0]) && array_key_exists($field, $result[0])) {\n $result = array_unique(array_column($result, $field));\n }\n\n return $result;\n }", "function vw_list_chunk_pluck( $list, $keys_to_plucks = [] ){\n\n\t/** @var array $plucks */\n\t$plucks = $reduced_fields = [];\n\n\t//Negate early\n\tif( ! isset( $keys_to_plucks[ 0 ] ) ){\n\t\treturn $list;\n\t}\n\n\t//Make keys to pluck an associative array\n\tforeach( $keys_to_plucks as $pluck ){\n\t\t$plucks[ $pluck ] = null;\n\t}\n\n\t//Match up the items from required\n\t//keys and intersect with object|array passed.\n\tforeach ( $list as $k => $value ) {\n\t\t/** Added reduced array(s) to returned menus */\n\t\t$reduced_fields[ $k ] = array_intersect_key( (array) $value, $plucks );\n\t}\n\n\treturn $reduced_fields;\n\n}", "function pick_fields( $item, $fields ) {\n\t$values = [];\n\n\tif ( is_object( $item ) ) {\n\t\tforeach ( $fields as $field ) {\n\t\t\t$values[ $field ] = isset( $item->$field ) ? $item->$field : null;\n\t\t}\n\t} else {\n\t\tforeach ( $fields as $field ) {\n\t\t\t$values[ $field ] = isset( $item[ $field ] ) ? $item[ $field ] : null;\n\t\t}\n\t}\n\n\treturn $values;\n}", "function sbx_list_pluck( $list, $callback_or_field, $index_key = null ) {\n\t// Use wp_list_pluck if this isn't a callback.\n\t$first_el = current( $list );\n\tif ( ! is_object( $first_el ) || ! is_callable( array( $first_el, $callback_or_field ) ) ) {\n\t\treturn wp_list_pluck( $list, $callback_or_field, $index_key );\n\t}\n\tif ( ! $index_key ) {\n\t\t/*\n\t\t * This is simple. Could at some point wrap array_column()\n\t\t * if we knew we had an array of arrays.\n\t\t */\n\t\tforeach ( $list as $key => $value ) {\n\t\t\t$list[ $key ] = $value->{$callback_or_field}();\n\t\t}\n\t\treturn $list;\n\t}\n\n\t/*\n\t * When index_key is not set for a particular item, push the value\n\t * to the end of the stack. This is how array_column() behaves.\n\t */\n\t$newlist = array();\n\tforeach ( $list as $value ) {\n\t\t// Get index. @since 3.2.0 this supports a call1.0.0\n\t\tif ( is_callable( array( $value, $index_key ) ) ) {\n\t\t\t$newlist[ $value->{$index_key}() ] = $value->{$callback_or_field}();\n\t\t} elseif ( isset( $value->$index_key ) ) {\n\t\t\t$newlist[ $value->$index_key ] = $value->{$callback_or_field}();\n\t\t} else {\n\t\t\t$newlist[] = $value->{$callback_or_field}();\n\t\t}\n\t}\n\treturn $newlist;\n}", "function pluck($collection, $property)\n{\n $result = \\array_map(function ($value) use ($property) {\n if (is_array($value) && isset($value[$property])) {\n return $value[$property];\n } elseif (\\is_object($value) && isset($value->{$property})) {\n return $value->{$property};\n }\n\n foreach (\\__::split($property, '.') as $segment) {\n if (\\is_object($value)) {\n if (isset($value->{$segment})) {\n $value = $value->{$segment};\n } else {\n return null;\n }\n } else {\n if (isset($value[$segment])) {\n $value = $value[$segment];\n } else {\n return null;\n }\n }\n }\n\n return $value;\n }, (array)$collection);\n\n return \\array_values($result);\n}", "public function pluck($attr) {\r\n return array_map(function($model) use ($attr) { return $model->get($attr); }, $this->models);\r\n }", "public function pick($field)\n {\n $result = array();\n\n foreach ($this->documents as $document) {\n if (isset($document->{$field})) {\n $result[] = $document->{$field};\n }\n }\n\n return $result;\n }", "public function pluck($key)\n {\n return array_map(function($value) use ($key) {\n return $this->_uses($key) ? $this->_get($value, $key) : $value[$key];\n }, $this->items);\n }", "static function pluck ( $a, $prop )\n\t{\n\t\t$out = array();\n\n\t\tfor ( $i=0, $len=count($a) ; $i<$len ; $i++ ) {\n\t\t\t$out[] = $a[$i][$prop];\n\t\t}\n\n\t\treturn $out;\n\t}", "static function pluck ( $a, $prop )\n {\n $out = array();\n for ( $i=0, $len=count($a) ; $i<$len ; $i++ ) {\n $out[] = $a[$i][$prop];\n }\n return $out;\n }", "static function pluck($a, $prop) {\n $out = array();\n for($i = 0, $len = count($a); $i < $len; $i++) $out[] = $a[$i][$prop];\n return $out;\n }", "private function pluck ( $a, $prop )\n\t{\n\t\t$out = array();\n\n\t\tfor ( $i=0, $len=count($a) ; $i<$len ; $i++ ) {\n\t\t\t$out[] = $a[$i][$prop];\n\t\t}\n\n\t\treturn $out;\n\t}", "static function pluck($a, $prop)\n {\n $out = array();\n \n for ($i = 0, $len = count($a); $i < $len; $i ++) {\n $out[] = $a[$i][$prop];\n }\n \n return $out;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the tax query which was used by the main query.
public static function get_main_tax_query() { $tax_query = isset( self::$video_query->tax_query, self::$video_query->tax_query->queries ) ? self::$video_query->tax_query->queries : array(); return $tax_query; }
[ "public static function get_main_tax_query()\n {\n }", "protected function get_main_tax_query()\n {\n }", "public static function get_main_tax_query() {\n $tax_query = isset( self::$movie_query->tax_query, self::$movie_query->tax_query->queries ) ? self::$movie_query->tax_query->queries : array();\n\n return $tax_query;\n }", "function graphql_init_tax_query() {\n\treturn new TaxQuery();\n}", "public function user_tax_query( $user_query = '' ) {\n\t\treturn get_tax_sql( $user_query->tax_query, $GLOBALS['wpdb']->users, 'ID' );\n\t}", "public function getTax() {\n\t\t\t$sql = $this->remoteDb->fetchAll('SELECT * FROM taxcodes WHERE tax_status=1');\n\t\t\treturn $sql;\n\t}", "function maybe_tax_query() {\n\t\tglobal $wpdb;\n\n\t\tif ( empty( $this->tax_query ) || ! is_array( $this->tax_query ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We need to do a bit of detective work depending on the tax_query.\n\t\t$alias = 'swpquerytax';\n\t\t$tax_query = new WP_Tax_Query( (array) $this->tax_query );\n\t\t$tq_sql = $tax_query->get_sql( $alias, 'ID' );\n\t\t$mod = new \\SearchWP\\Mod();\n\n\t\t// If the JOIN is empty, WP_Tax_Query assumes we have a JOIN with wp_posts, so let's make that.\n\t\tif ( ! empty( $tq_sql['join'] ) ) {\n\t\t\t// Queue the assumed wp_posts JOIN using our alias.\n\t\t\t$mod->raw_join_sql( function( $runtime ) use ( $wpdb, $alias ) {\n\t\t\t\treturn \"LEFT JOIN {$wpdb->posts} {$alias} ON {$alias}.ID = {$runtime->get_foreign_alias()}.id\";\n\t\t\t} );\n\n\t\t\t// Queue the WP_Tax_Query JOIN which already has our alias.\n\t\t\t$mod->raw_join_sql( $tq_sql['join'] );\n\n\t\t\t// Queue the WP_Tax_Query WHERE which already has our alias.\n\t\t\t$mod->raw_where_sql( '1=1 ' . $tq_sql['where'] );\n\t\t} else {\n\t\t\t// There's no JOIN here because WP_Tax_Query assumes a JOIN with wp_posts already\n\t\t\t// exists. We need to rebuild the tax_query SQL to use a functioning alias. The Mod\n\t\t\t// will ensure the JOIN, and we can use that Mod's alias to rebuild our tax_query.\n\t\t\t$mod->set_local_table( $wpdb->posts );\n\t\t\t$mod->on( 'ID', [ 'column' => 'id' ] );\n\n\t\t\t$mod->raw_where_sql( function( $runtime ) use ( $tax_query ) {\n\t\t\t\t$tq_sql = $tax_query->get_sql( $runtime->get_local_table_alias(), 'ID' );\n\n\t\t\t\treturn '1=1 ' . $tq_sql['where'];\n\t\t\t} );\n\t\t}\n\n\t\t$this->mods[] = $mod;\n\t}", "public function getBaseQuery() {\r\n return $this->base_query;\r\n }", "public function getItemsForTaxQuery(): ?CatalogQueryItemsForTax\n {\n return $this->itemsForTaxQuery;\n }", "public function get_query() {\n\n\t\treturn $this->active_query;\n\t}", "public function getTaxInput()\n {\n return $this->taxInput;\n }", "public function getTaxForm()\n {\n return $this->tax_form;\n }", "public function getTax(){\n\t\treturn $this->db->get_where('tax',array('delete_status'=>0))->result();\n\t}", "public function getTaxReference();", "public function get_db_tax_query($sql_select = FALSE, $sql_where = FALSE)\n\t{\n\t\t$default_pk = $this->CI->flexi->cart_database['tax']['columns']['id'];\n\t\t\n\t\treturn $this->CI->flexi_cart_admin_model\n\t\t\t->get_table_data($this->CI->flexi->cart_database['tax']['table'], $sql_select, $sql_where, $default_pk, 'tax');\n\t}", "public function getTax()\n {\n return $this->tax;\n }", "public static function get_main_query() {\n\t\treturn self::$task_query;\n\t}", "public function get_main_query() {\n\t\treturn $GLOBALS['wp_the_query'];\n\t}", "public function getTax() {\n return $this->tax;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create request for operation 'createAfterSalesServiceWarrantyUsingPOST'
protected function createAfterSalesServiceWarrantyUsingPOSTRequest($warranty_request) { // verify the required parameter 'warranty_request' is set if ($warranty_request === null || (is_array($warranty_request) && count($warranty_request) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $warranty_request when calling createAfterSalesServiceWarrantyUsingPOST' ); } $resourcePath = '/after-sales-service-conditions/warranties'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // body params $_tempBody = null; if (isset($warranty_request)) { $_tempBody = $warranty_request; } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/vnd.allegro.public.v1+json'] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/vnd.allegro.public.v1+json'], ['application/vnd.allegro.public.v1+json'] ); } // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present if ($headers['Content-Type'] === 'application/json') { $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); } else { $httpBody = $_tempBody; } } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { $multipartContents[] = [ 'name' => $formParamName, 'contents' => $formParamValue ]; } // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); } elseif ($headers['Content-Type'] === 'application/json') { $httpBody = \GuzzleHttp\json_encode($formParams); } else { // for HTTP post (form) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); } } // this endpoint requires OAuth (access token) if ($this->config->getAccessToken() !== null) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } $headers = array_merge( $defaultHeaders, $headerParams, $headers ); $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); }
[ "public function create_warranty() {\n\t\t\t$order_id = $_POST['order_id'];\n\t\t\t$type = $_POST['warranty_request_type'];\n\t\t\t$qtys = $_POST['warranty_qty'];\n\t\t\t$idxs = array_keys( $qtys );\n\t\t\t$requests = array();\n\t\t\t$errors = array();\n\n\t\t\t$order = wc_get_order( $order_id );\n\t\t\t$items = $order->get_items();\n\n\t\t\t$products = array();\n\t\t\tforeach ( $idxs as $i => $idx ) {\n\t\t\t\t$products[] = ! empty( $items[ $idx ]['variation_id'] )\n\t\t\t\t\t? $items[ $idx ]['variation_id']\n\t\t\t\t\t: $items[ $idx ]['product_id'];\n\t\t\t}\n\n\t\t\t$request_id = warranty_create_request( array(\n\t\t\t\t'type' => $type,\n\t\t\t\t'order_id' => $order_id,\n\t\t\t\t'product_id' => $products,\n\t\t\t\t'index' => $idxs,\n\t\t\t\t'qty' => $qtys\n\t\t\t) );\n\n\t\t\tif ( is_wp_error( $request_id ) ) {\n\t\t\t\t$result = $request_id;\n\t\t\t\t$error = $result->get_error_message( 'wc_warranty' );\n\t\t\t\t$errors[] = $error;\n\t\t\t} else {\n\t\t\t\t// save the custom forms\n\t\t\t\t$result = WooCommerce_Warranty::process_warranty_form( $request_id );\n\n\t\t\t\tif ( is_wp_error($result) ) {\n\t\t\t\t\t$errors[] = $result->get_error_messages();\n\t\t\t\t\t$back = 'admin.php?page=warranty_requests&tab=new&order_id=' . $order_id;\n\t\t\t\t\t$back = add_query_arg( 'errors', wp_json_encode($errors), $back );\n\n\t\t\t\t\twarranty_delete_request( $request_id );\n\n\t\t\t\t\twp_redirect( $back );\n\t\t\t\t\texit;\n\t\t\t\t}\n\n\t\t\t\tif ( $order ) {\n\t\t\t\t\t$rma = get_post_meta( $request_id, '_code', true );\n\t\t\t\t\t$message = sprintf(\n\t\t\t\t\t\t__( '<a href=\"admin.php?page=warranties&s=%s\">RMA (%s)</a> has been created for %s', 'wc_warranty' ),\n\t\t\t\t\t\t$rma,\n\t\t\t\t\t\t$rma,\n\t\t\t\t\t\tget_the_title( $items[ $idx ]['product_id'] )\n\t\t\t\t\t);\n\t\t\t\t\t$order->add_order_note( $message );\n\t\t\t\t}\n\n\t\t\t\t// set the initial status and send the emails\n\t\t\t\twarranty_update_status( $request_id, 'new' );\n\t\t\t}\n\n\t\t\t$back = 'admin.php?page=warranties';\n\t\t\t$back = add_query_arg( 'updated', urlencode( __( 'Warranty request created', 'wc_warranty' ) ), $back );\n\n\t\t\tif ( ! empty( $errors ) ) {\n\t\t\t\t$back = add_query_arg( 'errors', wp_json_encode( $errors ), $back );\n\t\t\t}\n\n\t\t\twp_redirect( $back );\n\t\t\texit;\n\t\t}", "public function createAfterSalesServiceImpliedWarrantyUsingPOST($implied_warranty_request)\n {\n list($response) = $this->createAfterSalesServiceImpliedWarrantyUsingPOSTWithHttpInfo($implied_warranty_request);\n return $response;\n }", "protected function createRegularPaymentPOST()\n {\n $IsLive = $this->mode=='TEST'?false:true;\n $paynet = new \\PaynetClient($this->account->secret_key, $IsLive);\n \n $paymentParams \t\t\t\t = new \\PaymentParameters();\n $paymentParams->amount \t = (string) $this->amountFormat($this->order->amount);\n $paymentParams->reference_no \t= (string) $this->order->id;\n $paymentParams->pan \t = $this->card->number;\n $paymentParams->month \t = $this->card->month;\n $paymentParams->year \t = $this->card->year;\n $paymentParams->cvc \t = (string) $this->card->cvv;\n $paymentParams->card_holder_mail= (string) filter_var($this->order->email, FILTER_VALIDATE_EMAIL)?$this->order->email:\"msn@msn.com\";\n $paymentParams->description \t= (string) isset($this->order->description)?$this->order->description:\"\";\n if($this->account->is_installment){\n $paymentParams->instalment \t= (int) $this->order->installment?:0;\n }\n $paymentParams->add_commission \t= $this->account->is_commission?true:false;\n\n if($this->account->ratio_code){\n $paymentParams->ratio_code \t= (string) $this->account->ratio_code;\n }\n if($this->account->agent_id){\n $paymentParams->agent_id \t= (string) $this->account->agent_id;\n }\n $paymentParams->transaction_type= (int) $this->type;\n\n $result \t\t\t= $paynet->PaymentPost($paymentParams);\n $XactId \t\t\t= $result->xact_id;\n $this->data = $result;\n if($result->is_succeed == true and filter_var($this->order->email, FILTER_VALIDATE_EMAIL) and $this->account->is_slip_post==true){\n $SlipParams \t\t\t\t= new \\SlipParameters();\n $SlipParams->xact_id \t \t= (string) $XactId;\n $SlipParams->email \t\t\t= (string) $this->order->email;\n $SlipParams->send_mail\t\t= true;\n $SlipResult\t\t \t\t\t= $paynet->SlipPost($SlipParams);\n }\n return $this;\n }", "public function sellWashServiceOnDebit_post(){\n /*START - Get Current Date Time */\n $currentFullDate=getdate();\n $d=$currentFullDate['mday'];\n $m=$currentFullDate['mon'];\n $y=$currentFullDate['year'];\n $time=date(\"h:i\");\n $today_date=$y.\"-\".$m.\"-\".$d.\"-\".$time;\n /*END - Get Current Date Time */\n\n $shiftID=$this->post('shiftID');\n $empID=$this->post('empID');\n $personID=$this->post('personID');\n $empID=$this->post('empID');\n $amount = $this->post('totalPrice');\n $rest=$this->post('amountRest');\n $totalProfit = $this->post('totalPrice');\n $type = $this->post('type');\n // $type = 'wash';\n $name='غسيل : '.$this->post('nameCar');\n $comment=$this->post('comment');\n if($comment != '')\n $name = $name. '. ملاحظة : '.$comment;\n /* insert into invoice */\n $result = $this->operation_model->add_inv(array(\"amount\"=>$amount,\"empID\"=>$empID,\n \"type\" => $type,'dateTime'=>$today_date,'rest'=>$rest,\"totalProfit\"=>$totalProfit,\n \"shiftID\"=>$shiftID,\"personID\"=>$personID,\"note\"=>$name));\n $str=$this->db->last_query();\n\n /* add debit persone */\n if($rest > 0){\n $this->operation_model->add_debit_person($personID,$rest);\n }\n \n if ($result === 0) {\n $this->response(\"Item information could not be saved. Try again.\", 404);\n } else {\n $this->response(\"success\", 200);\n }\n }", "private function requestCreateOrder() {\n\t\t$data = [\"CREATESO\"];\n\t\t$this->requestDplus($data, $addcustID = false);\n\t}", "public function postAddSalesReps($param);", "public function testCreateBrokerageWithdrawalUsingPost()\n {\n }", "protected function servicePost(Request $request)\n {\n try {\n if ($this->factory->completeServicePayment($request)) {\n \\conference\\Factory\\ServiceFactory::successPost();\n } else {\n \\conference\\Factory\\ServiceFactory::failurePost();\n }\n } catch (\\Exception $e) {\n \\phpws2\\Error::log($e);\n \\conference\\Factory\\ServiceFactory::failurePost();\n }\n exit();\n }", "function developmentproduction_post() {\n\t\t\n\t\tif($this->post('standingorderday')){\n\n\t\t\t$standingorderday = $this->post('standingorderday');\n\t\t\t$orders_object = Orders::ordersService();\n\n\t\t\ttry{\n\t\t\t\t$developmentproduction = $orders_object->MakeProductionOrders(LICENCE, $standingorderday);\n\t\t\t}\n\t\t\tcatch(SoapFault $soapFault){\n\t\t\t\tvar_dump($soapFault);\n \t\techo \"Request :<br>\", htmlentities($orders_object->__getLastRequest()), \"<br>\";\n \t\techo \"Response :<br>\", htmlentities($orders_object->__getLastResponse()), \"<br>\";\n\t\t\t}\n\n\t\t\tif(isset($developmentproduction)){\n \t\t$this->response($developmentproduction, 200);\n \t\t}\n \t\telse{\n \t\t\t$this->response(array('success' => false, 'error' => 'No data found!'), 404);\n \t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->response(array('success'=>false, 'error'=>'Order standingorderday is missing/invalid'), 400);\n\t\t}\n\t}", "protected function salesOrderPostRequest($sale_order_update_dto)\n {\n // verify the required parameter 'sale_order_update_dto' is set\n if ($sale_order_update_dto === null || (is_array($sale_order_update_dto) && count($sale_order_update_dto) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $sale_order_update_dto when calling salesOrderPost'\n );\n }\n\n $resourcePath = '/controller/api/v1/salesorder';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($sale_order_update_dto)) {\n $_tempBody = $sale_order_update_dto;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function postGenerateTransaction()\n\t{\n\t\t//if($this->_isValidRequest())\n\t\t//{\n\t\t\t$params = array(\n\t\t\t\t\t'first_name' => Input::get('first_name'),\n\t\t\t 'last_name' => Input::get('last_name'),\n\t\t\t 'email' => Input::get('email'),\n\t\t\t 'password' => Input::get('password'),\n\t\t\t\t\t'product_id' => Input::get('product_id'),\n\t\t\t\t\t'plan_id' => Input::get('plan_id'),\n\t\t\t\t\t'pay_id' => Input::get('pay_id'),\n\t\t\t\t\t'stripe_token' => Input::get('stripe_token'),\n\t\t\t\t\t'paypal_sub_id' => Input::get('paypal_sub_id'),\n\t\t\t\t\t'amount' => Input::get('amount'),\n\t\t\t\t\t'affiliate_id' => Input::get('affiliate_id'),\n\t\t\t);\n\n\t\t\tif(Transaction::addManually($params))\n\t\t\t{\n\t\t\t\tdie(json_encode(array('data'=>array('success'=>TRUE))));\n\t\t\t}\n\t\t//}\n\t}", "protected function salesOrderV2PostRequest($sale_order_update_dto)\n {\n // verify the required parameter 'sale_order_update_dto' is set\n if ($sale_order_update_dto === null || (is_array($sale_order_update_dto) && count($sale_order_update_dto) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $sale_order_update_dto when calling salesOrderV2Post'\n );\n }\n\n $resourcePath = '/controller/api/v2/salesorder';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($sale_order_update_dto)) {\n $_tempBody = $sale_order_update_dto;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testCreateSaleUsingPost()\n {\n }", "public function CreateWithdrawal(Request\\CreateWithdrawal $req): Response\\CreateWithdrawal\n {\n $res = $this->do(\"POST\", \"/api/1/withdrawals\", $req, true);\n $mapper = new \\JsonMapper();\n return $mapper->map($res, new Response\\CreateWithdrawal);\n }", "protected function createAfterSalesServiceReturnPolicyUsingPOSTRequest($return_policy_request)\n {\n // verify the required parameter 'return_policy_request' is set\n if ($return_policy_request === null || (is_array($return_policy_request) && count($return_policy_request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $return_policy_request when calling createAfterSalesServiceReturnPolicyUsingPOST'\n );\n }\n\n $resourcePath = '/after-sales-service-conditions/return-policies';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n if (isset($return_policy_request)) {\n $_tempBody = $return_policy_request;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/vnd.allegro.public.v1+json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.allegro.public.v1+json'],\n ['application/vnd.allegro.public.v1+json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function stockTransferPOSTRequestPost($accept, $jiwa_stateful = null, $transfer_no = null, $status = null, $transfer_date = null, $reference = null, $logical_warehouse_id = null, $logical_warehouse_description = null, $physical_warehouse_id = null, $physical_warehouse_description = null, $last_saved_by_staff_id = null, $last_saved_by_staff_user_name = null, $last_saved_by_staff_title = null, $last_saved_by_staff_first_name = null, $last_saved_by_staff_surname = null, $last_saved_date_time = null, $created_by_staff_id = null, $created_by_staff_user_name = null, $created_by_staff_title = null, $created_by_staff_first_name = null, $created_by_staff_surname = null, $created_date_time = null, $lines = null, $notes = null, $documents = null, $custom_field_values = null, $stock_transfer_reason_rec_id = null, $stock_transfer_reason_name = null, $stock_transfer_reason_is_default = null, $stock_transfer_reason_write_off_ledger_account_override = null, $stock_transfer_reason_write_off_ledger_account_rec_id = null, $stock_transfer_reason_write_off_ledger_account_no = null, $stock_transfer_reason_write_off_ledger_account_description = null, $stock_transfer_reason_write_on_ledger_account_override = null, $stock_transfer_reason_write_on_ledger_account_rec_id = null, $stock_transfer_reason_write_on_ledger_account_no = null, $stock_transfer_reason_write_on_ledger_account_description = null, $body = null)\n {\n list($response) = $this->stockTransferPOSTRequestPostWithHttpInfo($accept, $jiwa_stateful, $transfer_no, $status, $transfer_date, $reference, $logical_warehouse_id, $logical_warehouse_description, $physical_warehouse_id, $physical_warehouse_description, $last_saved_by_staff_id, $last_saved_by_staff_user_name, $last_saved_by_staff_title, $last_saved_by_staff_first_name, $last_saved_by_staff_surname, $last_saved_date_time, $created_by_staff_id, $created_by_staff_user_name, $created_by_staff_title, $created_by_staff_first_name, $created_by_staff_surname, $created_date_time, $lines, $notes, $documents, $custom_field_values, $stock_transfer_reason_rec_id, $stock_transfer_reason_name, $stock_transfer_reason_is_default, $stock_transfer_reason_write_off_ledger_account_override, $stock_transfer_reason_write_off_ledger_account_rec_id, $stock_transfer_reason_write_off_ledger_account_no, $stock_transfer_reason_write_off_ledger_account_description, $stock_transfer_reason_write_on_ledger_account_override, $stock_transfer_reason_write_on_ledger_account_rec_id, $stock_transfer_reason_write_on_ledger_account_no, $stock_transfer_reason_write_on_ledger_account_description, $body);\n return $response;\n }", "public function debtorPOSTRequestPostAsync($accept, $jiwa_stateful = null, $credit_limit = null, $early_payment_discount_days = null, $early_payment_discount_amount = null, $last_purchase_date = null, $last_payment_date = null, $standing_discount_on_invoices = null, $account_on_hold = null, $current_balance = null, $period1_balance = null, $period2_balance = null, $period3_balance = null, $period4_balance = null, $fx_current_balance = null, $fx_period1_balance = null, $fx_period2_balance = null, $fx_period3_balance = null, $fx_period4_balance = null, $notify_required = null, $web_access = null, $commence_date = null, $trading_status = null, $period_type = null, $uses_fx = null, $is_cash_only = null, $terms_days = null, $terms_type = null, $exclude_from_aging = null, $debtor_is_branch_account = null, $remaining_normal_prepaid_labour_pack_hours = null, $remaining_special_prepaid_labour_pack_hours = null, $fx_decimal_places = null, $prospect_id = null, $account_no = null, $alt_account_no = null, $name = null, $address1 = null, $address2 = null, $address3 = null, $address4 = null, $postcode = null, $phone = null, $fax = null, $email_address = null, $acn = null, $abn = null, $aust_post_dpid = null, $aust_post_bcsp = null, $bank_name = null, $bank_account_no = null, $bank_bsbn = null, $bank_account_name = null, $tax_exemption_no = null, $notify_address = null, $parent_debtor_id = null, $parent_debtor_account_no = null, $parent_debtor_name = null, $price_scheme_id = null, $price_scheme_description = null, $trading_name = null, $company_name = null, $proprietors_name = null, $fax_header = null, $fxid = null, $fx_name = null, $fx_short_name = null, $b_pay_reference = null, $classification = null, $category1 = null, $category2 = null, $category3 = null, $category4 = null, $category5 = null, $contact_names = null, $group_memberships = null, $branch_debtors = null, $delivery_addresses = null, $freight_forwarder_addresses = null, $notes = null, $credit_notes = null, $directors = null, $budgets = null, $debtor_part_numbers = null, $custom_field_values = null, $documents = null, $debtor_systems = null, $debtor_ledgers = null, $body = null)\n {\n return $this->debtorPOSTRequestPostAsyncWithHttpInfo($accept, $jiwa_stateful, $credit_limit, $early_payment_discount_days, $early_payment_discount_amount, $last_purchase_date, $last_payment_date, $standing_discount_on_invoices, $account_on_hold, $current_balance, $period1_balance, $period2_balance, $period3_balance, $period4_balance, $fx_current_balance, $fx_period1_balance, $fx_period2_balance, $fx_period3_balance, $fx_period4_balance, $notify_required, $web_access, $commence_date, $trading_status, $period_type, $uses_fx, $is_cash_only, $terms_days, $terms_type, $exclude_from_aging, $debtor_is_branch_account, $remaining_normal_prepaid_labour_pack_hours, $remaining_special_prepaid_labour_pack_hours, $fx_decimal_places, $prospect_id, $account_no, $alt_account_no, $name, $address1, $address2, $address3, $address4, $postcode, $phone, $fax, $email_address, $acn, $abn, $aust_post_dpid, $aust_post_bcsp, $bank_name, $bank_account_no, $bank_bsbn, $bank_account_name, $tax_exemption_no, $notify_address, $parent_debtor_id, $parent_debtor_account_no, $parent_debtor_name, $price_scheme_id, $price_scheme_description, $trading_name, $company_name, $proprietors_name, $fax_header, $fxid, $fx_name, $fx_short_name, $b_pay_reference, $classification, $category1, $category2, $category3, $category4, $category5, $contact_names, $group_memberships, $branch_debtors, $delivery_addresses, $freight_forwarder_addresses, $notes, $credit_notes, $directors, $budgets, $debtor_part_numbers, $custom_field_values, $documents, $debtor_systems, $debtor_ledgers, $body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function postCreatePayPeriod(){\n \n $pay_period = new TimeTrackingPayPeriod();\n $this->postPayPeriod($pay_period);\n \n }", "protected function salesOrderBasicPostRequest($sale_order_update_dto)\n {\n // verify the required parameter 'sale_order_update_dto' is set\n if ($sale_order_update_dto === null || (is_array($sale_order_update_dto) && count($sale_order_update_dto) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $sale_order_update_dto when calling salesOrderBasicPost'\n );\n }\n\n $resourcePath = '/controller/api/v1/salesorderbasic';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($sale_order_update_dto)) {\n $_tempBody = $sale_order_update_dto;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation dELETEOrderAmountPromotionRulesOrderAmountPromotionRuleId Delete an order amount promotion rule
public function dELETEOrderAmountPromotionRulesOrderAmountPromotionRuleId($order_amount_promotion_rule_id) { $this->dELETEOrderAmountPromotionRulesOrderAmountPromotionRuleIdWithHttpInfo($order_amount_promotion_rule_id); }
[ "public function testDELETEPromotionRulesPromotionRuleId()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testDeleteExpressionInRule() {\n // Setup a rule with one condition.\n $this->testCreateReactionRule();\n\n $this->clickLink('Delete');\n\n /** @var \\Drupal\\Tests\\WebAssert $assert */\n $assert = $this->assertSession();\n $assert->pageTextContains('Are you sure you want to delete Condition: Node is promoted from Test rule?');\n\n $this->pressButton('Delete');\n $assert->pageTextContains('You have unsaved changes.');\n\n $this->pressButton('Save');\n $assert->pageTextContains('Reaction rule Test rule has been updated. ');\n }", "public function testDeleteExpressionInRule() {\n // Setup a rule with one condition.\n $this->testCreateReactionRule();\n\n /** @var \\Drupal\\Tests\\WebAssert $assert */\n $assert = $this->assertSession();\n\n $this->clickLink('Delete');\n $assert->pageTextContains('Are you sure you want to delete Node is promoted from Test rule?');\n\n $this->pressButton('Delete');\n $assert->pageTextContains('You have unsaved changes.');\n\n $this->pressButton('Save');\n $assert->pageTextContains('Reaction rule Test rule has been updated. ');\n }", "public function deleteById($ruleId);", "public function getDeleteRule();", "public function pATCHOrderAmountPromotionRulesOrderAmountPromotionRuleId($order_amount_promotion_rule_id, $order_amount_promotion_rule_update)\n {\n $this->pATCHOrderAmountPromotionRulesOrderAmountPromotionRuleIdWithHttpInfo($order_amount_promotion_rule_id, $order_amount_promotion_rule_update);\n }", "public function delete_rule() {\n global $DB;\n\n if (!empty($this->rule->id)) {\n $DB->delete_records('dataform_rules', array('id' => $this->rule->id));\n }\n return true;\n }", "public function onPromotionDelete(PromotionEvent $event) {\n $this->discountedProductStorage->deleteByPromotionId($event->getPromotion()->id());\n }", "public function deleteById($attachmentruleidxId);", "public function gETFixedAmountPromotionIdOrderAmountPromotionRuleRequest($fixed_amount_promotion_id)\n {\n // verify the required parameter 'fixed_amount_promotion_id' is set\n if ($fixed_amount_promotion_id === null || (is_array($fixed_amount_promotion_id) && count($fixed_amount_promotion_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $fixed_amount_promotion_id when calling gETFixedAmountPromotionIdOrderAmountPromotionRule'\n );\n }\n\n $resourcePath = '/fixed_amount_promotions/{fixedAmountPromotionId}/order_amount_promotion_rule';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($fixed_amount_promotion_id !== null) {\n $resourcePath = str_replace(\n '{' . 'fixedAmountPromotionId' . '}',\n ObjectSerializer::toPathValue($fixed_amount_promotion_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function deleteThemeRule(ThemeRule $themeRule)\n {\n parent::deleteEntity($themeRule);\n }", "public function deletePriceRule($ruleId)\n {\n return $this->client->delete(\"price_rules/{$ruleId}\");\n }", "public function deleteSchedulingRule($rule_id)\n {\n }", "public function pOSTOrderAmountPromotionRules($order_amount_promotion_rule_create)\n {\n $this->pOSTOrderAmountPromotionRulesWithHttpInfo($order_amount_promotion_rule_create);\n }", "function deleteRule($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t// Validate the parameters of the RPC service method.\n\t\t$this->validateMethodParams($params, \"rpc.common.objectuuid\");\n\t\t// Delete the configuration object.\n\t\t$db = \\OMV\\Config\\Database::getInstance();\n\t\t$object = $db->get(\"conf.system.network.iptables.rule\",\n\t\t $params['uuid']);\n\t\t$db->delete($object);\n\t\t// Return the deleted configuration object.\n\t\treturn $object->getAssoc();\n\t}", "public function delete_rule($ruleNumber)\n {\n $rules = Rule::whereNumber($ruleNumber)->delete();\n\n $rulesForDecrease = Rule::where('number', '>', $ruleNumber)->decrement('number');\n\n flash('<i class=\"fa fa-trash\" aria-hidden=\"true\"></i><span> La regla fue eliminada correctamente.</span>')->error();\n return redirect()->back();\n }", "public function planner_delete_planification_rule_meta() {\n \n // Delete planification rule meta\n (new MidrubBaseUserAppsCollectionPlannerHelpers\\Planify)->planner_delete_planification_rule_meta();\n \n }", "public function delete() {\n\t\tglobal $adb;\n\t\t// Delete dependencies\n\t\tif (!empty($this->actions)) {\n\t\t\tforeach ($this->actions as $action) {\n\t\t\t\t$action->delete();\n\t\t\t}\n\t\t}\n\t\tif ($this->ruleid) {\n\t\t\t$adb->pquery('DELETE FROM vtiger_mailscanner_ruleactions WHERE ruleid = ?', array($this->ruleid));\n\t\t\t$adb->pquery('DELETE FROM vtiger_mailscanner_rules WHERE ruleid=?', array($this->ruleid));\n\t\t}\n\t}", "public function removePromotionAdjustments();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new frame for this section. Reference to the returned template is retained by the section for compilation.
public function createFrame():HTMLReportTemplate { $template = new HTMLReportTemplate($this->content); $this->frames[] = $template; return $template; }
[ "private function newTemplate() {\n $tmp = \"{# Template new.html.twig for \" . $this->sinPrefijo . \" #}\\n\";\n $tmp .= \"{# -------------------------------------------------------#}\\n\";\n $tmp .= \"{# CREAR UN REGISTRO NUEVO #}\\n\";\n $tmp .= \"{# -------------------------------------------------------#}\\n\";\n $tmp .= \"{% extends values.controller ~ '/index.html.twig' %}\\n\\n\";\n\n $tmp .= \"{% block navegador %}{% endblock %}\\n\\n\";\n\n $tmp .= \"{% block mantenimiento %}\\n\";\n $tmp .= \" {% include '_global/formNew.html.twig' with {'values': values} %}\\n\";\n $tmp .= \"{% endblock %}\";\n\n $this->templates['new'] = $tmp;\n }", "public function newFrame() {\n $this->frame = new \\WBW\\Bundle\\HighchartsBundle\\API\\Chart\\Chart\\Options3d\\HighchartsFrame();\n return $this->frame;\n }", "public function createFrame()\n {\n $frame = parent::createFrame();\n $frame->setAutoContentLength(false);\n return $frame;\n }", "function createPage() {\n\t\treturn ($this->parseTemplate($this->template));\n\t}", "function fdf_add_template($fdfdoc, $newpage, $filename, $template, $rename) {}", "public function createFrame()\n {\n return $this->getConnection()->createFrame();\n }", "function newBlockTemplate()\n\t{\n\t\t$tpl = new ilTemplate(\"tpl.pd_list_block.html\", true, true, \"Services/PersonalDesktop\");\n\t\t$this->cur_row_type = \"\";\n\t\treturn $tpl;\n\t}", "public function setHTMLPageTemplate(){\n\t\t$this->page = new StandardFrameBaseTemplate();\n\t}", "private function _createNewTemplate()\n {\n $this->model->createNewTemplate();\n $this->view->display($this->model);\n }", "private function create( ) {\n global $_ALIASES;\n\n onapp_debug(__METHOD__);\n\n $template = onapp_get_arg('template');\n\n if (is_null($template))\n $this->show_template_create( );\n else {\n $content =\n \":template_name: \" . $template['_template_name'] . \"\\n\".\n \":from: \". $template['_from'] . \"\\n\".\n \":from_name:\" . $template['_from_name'] . \"\\n\" .\n \":to:\" . $template['_to'] . \"\\n\" .\n \":copy: \" . $template['_copy'] . \"\\n\" .\n \":subject: \" . $template['_subject'] . \"\\n\" .\n \"\". \"\\n\"\n .$template['_message'] . \"\n \";\n\n $path = ONAPP_PATH . ONAPP_DS . 'events' . ONAPP_DS . $template['_new_event'] . ONAPP_DS . 'mail' . ONAPP_DS .'mail';\n\n $k = 1;\n while ( file_exists( $path. $k ) ) $k++;\n\n $written = onapp_file_write( $content, NULL, $path. $k );\n\n if ( $written ) {\n $_SESSION['message'] = 'TEMPLATE_HAS_BEEN_CREATED_SUCCESSFULLY';\n onapp_redirect(ONAPP_BASE_URL . '/' . $_ALIASES['email_templates'] . '?action=view');\n }\n else {\n $error = onapp_string('TEMPLATE_HAS_NOT_BEEN_CREATED_CHECK_EVENTS_FOLDER_PERMISSIONS');\n trigger_error($error);\n $this->show_template_view($error);\n }\n }\n }", "public function createHeader() {\n\t\t$header = new PHPWord_Section_Header($this->_sectionCount);\n\t\t$this->_header = $header;\n\t\treturn $header;\n\t}", "private function createDefaultTemplate()\n\t{\n\t\t$class = get_called_class();\n\t\t$template;\n\t\tswitch ( $class::TEMPLATE_TYPE )\n\t\t{\n\t\t\tcase $class::TEMPLATE_FORM:\n\t\t\t\t$template = new FlexformTemplate();\n\t\t\tbreak;\n\n\t\t\tcase $class::TEMPLATE_GRID:\n\t\t\t\t$template = new FlexgridTemplate();\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$template->name = 'Default';\n\t\t$template->public = 1;\n\t\t$template->type = $class::TEMPLATE_TYPE;\n\t\t$template->FK_user = \\Yii::$app->user->identity->id;\n\t\t$template->modelClass = $this->template_name;\n\t\t$template->current = 1;\n\t\t\n\t\tif( !$template->save() )\n\t\t{\n\t\t\tthrow new Exception('Database error during creating deafault template.\\n'.print_r( $template->getErrors(), true ) );\n\t\t}\n\t\t\n\t\t$template->refresh();\n\t\t$template->setCurrent();\n\t\t\n\t\tforeach ( $this->getDisplayedAttributes() as $key => $value )\n\t\t{\n\t\t\t$tempField = new FlexformField();\n\t\t\t\t\n\t\t\t$tempField->FK_template = $template->id;\n\t\t\t$tempField->name = $value;\n\t\t\t$tempField->order = $key;\n\t\t\t\t\n\t\t\t$tempField->save();\n\t\t}\n\t\t\n\t\treturn $this->template = $template;\n\t}", "public static function create_demo_template(): void {\n global $CFG;\n $systemcontext = \\context_system::instance();\n // Create template.\n $templaterecord = [\n 'name' => get_string('demotmpl', 'tool_certificate'),\n 'contextid' => $systemcontext->id,\n 'shared' => 1,\n ];\n $template = \\tool_certificate\\template::create((object)$templaterecord);\n\n // Create page.\n $page = $template->new_page();\n $pagerecord = [];\n $page->save((object)($pagerecord ?: []));\n\n // Create template elements.\n $str = get_string('demotmplbackground', 'tool_certificate');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'image',\n 'data' => json_encode(['width' => 0, 'height' => 0, 'isbackground' => true]), 'sequence' => 1];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n self::create_demo_element_file($element->get('id'), \"{$CFG->dirroot}/{$CFG->admin}/tool/certificate/pix/background.jpg\");\n\n $str = get_string('demotmplawardedto', 'tool_certificate');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'text', 'data' => $str, 'font' => 'freesans',\n 'fontsize' => 12, 'colour' => '#fff', 'posx' => 25, 'posy' => 25, 'sequence' => 2, 'refpoint' => 0];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n\n $str = get_string('demotmplusername', 'tool_certificate');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'userfield', 'data' => 'fullname',\n 'font' => 'freesansb', 'fontsize' => 26, 'colour' => '#fff', 'posx' => 25, 'posy' => 30, 'sequence' => 3,\n 'refpoint' => 0];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n\n $str = get_string('demotmplforcompleting', 'tool_certificate');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'text', 'data' => $str, 'font' => 'freesans',\n 'fontsize' => 12, 'colour' => '#fff', 'posx' => 25, 'posy' => 52, 'sequence' => 4, 'refpoint' => 0];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n\n $str = get_string('demotmplcoursefullname', 'tool_certificate');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'program', 'font' => 'freesansb',\n 'fontsize' => 26, 'data' => json_encode(['display' => 'coursefullname']), 'colour' => '#fff', 'posx' => 25,\n 'posy' => 57, 'sequence' => 5, 'refpoint' => 0];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n\n $str = get_string('demotmplawardedon', 'tool_certificate');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'text', 'data' => $str,\n 'font' => 'freesans', 'fontsize' => 12, 'colour' => '#fff', 'posx' => 25, 'posy' => 80, 'sequence' => 6,\n 'refpoint' => 0];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n\n $str = get_string('demotmplissueddate', 'tool_certificate');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'date', 'font' => 'freesansb',\n 'fontsize' => 12, 'data' => json_encode(['dateitem' => -1, 'dateformat' => 'strftimedate']), 'colour' => '#fff',\n 'posx' => 49, 'posy' => 80, 'sequence' => 7, 'refpoint' => 0];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n\n $str = get_string('demotmplqrcode', 'tool_certificate');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'code', 'font' => 'freesans',\n 'fontsize' => 12, 'data' => json_encode(['display' => 4]), 'colour' => '#000000',\n 'posx' => 44, 'posy' => 157, 'width' => 35, 'sequence' => 8, 'refpoint' => 1];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n\n $str = get_string('demotmplsignature', 'tool_certificate');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'image', 'posx' => 118, 'posy' => 157,\n 'data' => json_encode(['width' => 50, 'height' => 0, 'isbackground' => false]), 'sequence' => 9];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n self::create_demo_element_file($element->get('id'), \"{$CFG->dirroot}/{$CFG->admin}/tool/certificate/pix/signature.png\");\n\n $elementrecord = ['pageid' => $page->get_id(), 'name' => 'Mary Jones', 'element' => 'text', 'font' => 'freesansb',\n 'fontsize' => 12, 'data' => 'Mary Jones', 'colour' => '#000000', 'posx' => 141, 'posy' => 181, 'sequence' => 10,\n 'refpoint' => 1];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n\n $str = get_string('demotmpldirector', 'tool_certificate');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'text', 'font' => 'freesans',\n 'fontsize' => 12, 'data' => $str, 'colour' => '#000000', 'posx' => 141, 'posy' => 187, 'sequence' => 11,\n 'refpoint' => 1];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n\n $str = get_string('logo', 'admin');\n $elementrecord = ['pageid' => $page->get_id(), 'name' => $str, 'element' => 'image', 'posx' => 223, 'posy' => 179,\n 'data' => json_encode(['width' => 50, 'height' => 0, 'isbackground' => false]), 'sequence' => 12];\n $element = new \\tool_certificate\\persistent\\element(0, (object)$elementrecord);\n $element->save();\n $wplogo = \"{$CFG->dirroot}/{$CFG->admin}/tool/wp/pix/workplacelogo.png\";\n $moodlelogo = \"{$CFG->dirroot}/pix/moodlelogo.png\";\n if (file_exists($wplogo)) {\n self::create_demo_element_file($element->get('id'), $wplogo);\n } else if (file_exists($moodlelogo)) {\n self::create_demo_element_file($element->get('id'), $moodlelogo);\n }\n }", "protected function _template()\n {\n $src = '<tal:block\n\txmlns=\"http://www.w3.org/1999/xhtml\"\n\txmlns:tal=\"http://xml.zope.org/namespaces/tal\"\n\txmlns:metal=\"http://xml.zope.org/namespaces/metal\"\n\txmlns:i18n=\"http://xml.zope.org/namespaces/i18n\"\n\txmlns:phptal=\"http://phptal.org/ns/phptal\"\n>\n\t<tal:block metal:use-macro=\"${ztalMailMacro}\" />\n</tal:block>';\n return array('src' => $src, 'name' => __FILE__);\n }", "public function addTemplate() {\n\t\t\n\t\t$aArgs = func_get_args();\n\t\t\n\t\t$sTemplate = array_shift( $aArgs );\n\t\t\n\t\t$this->_aTemplates[ $sTemplate ] = $aArgs;\n\t\t\n\t\treturn $this;\n\t}", "protected function createTemplate($class = NULL) { \n $template = parent::createTemplate($class);\n\n $ticket = $this->getTicket();\n \n if ($ticket != NULL) {\n $stateName = $ticket->state->id; \n \n $extendedTemplate = __DIR__ . '/../Templates/Ticket/detail.' . strtolower($stateName) . '.latte';\n if (file_exists($extendedTemplate)) { \n $template->setFile($extendedTemplate); \n }\t\t\n }\n return $template;\n }", "public function setShowContext(bool $showContext): TemplateInterface;", "public function createBlock()\n {\n $class = $this->getClass();\n return new $class;\n }", "function __construct(){\n $this->new_frame();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add Format parser to pool
public static function addFormatParserObject(IFormatParserClass $formatParser) { self::$formatParsers[$formatParser->getName()] = [ 'formatName' => $formatParser->getFormatName(), 'parser' => $formatParser ]; }
[ "public function getParser($file, $format, $testOption);", "public static function getFormatParsers() {\n return self::$formatParsers;\n }", "public function createParser();", "private function updateParser () {\n if ($this->component) {\n $this->loadParser($this->component->getHtmlString());\n }\n }", "protected function pushParser()\n {\n if ($this->parser) {\n $entry = array($this->parser, $this->filename, $this->fp); \n array_push($this->parserStack, $entry);\n }\n }", "public function buildParsers(): void;", "public function addFormat($name, $format);", "protected function registerParser()\n {\n $this->app->bind('Coreplex\\Notifier\\Contracts\\TemplateParser', function() {\n return new Parser();\n });\n }", "public function __construct()\n {\n $this->parsers = $this->getAvailableParsers();\n }", "abstract public function getParser();", "protected function getSonata_Formatter_PoolService()\n {\n $a = ${($_ = isset($this->services['sonata.formatter.text.raw']) ? $this->services['sonata.formatter.text.raw'] : $this->get('sonata.formatter.text.raw')) && false ?: '_'};\n\n $this->services['sonata.formatter.pool'] = $instance = new \\Sonata\\FormatterBundle\\Formatter\\Pool('markdown');\n\n $instance->setLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->get('logger')) && false ?: '_'});\n $instance->add('markdown', ${($_ = isset($this->services['sonata.formatter.text.markdown']) ? $this->services['sonata.formatter.text.markdown'] : $this->get('sonata.formatter.text.markdown')) && false ?: '_'}, ${($_ = isset($this->services['sonata.formatter.twig.env.markdown']) ? $this->services['sonata.formatter.twig.env.markdown'] : $this->getSonata_Formatter_Twig_Env_MarkdownService()) && false ?: '_'});\n $instance->add('text', ${($_ = isset($this->services['sonata.formatter.text.text']) ? $this->services['sonata.formatter.text.text'] : $this->get('sonata.formatter.text.text')) && false ?: '_'}, ${($_ = isset($this->services['sonata.formatter.twig.env.text']) ? $this->services['sonata.formatter.twig.env.text'] : $this->getSonata_Formatter_Twig_Env_TextService()) && false ?: '_'});\n $instance->add('rawhtml', $a, ${($_ = isset($this->services['sonata.formatter.twig.env.rawhtml']) ? $this->services['sonata.formatter.twig.env.rawhtml'] : $this->getSonata_Formatter_Twig_Env_RawhtmlService()) && false ?: '_'});\n $instance->add('richhtml', $a, ${($_ = isset($this->services['sonata.formatter.twig.env.richhtml']) ? $this->services['sonata.formatter.twig.env.richhtml'] : $this->getSonata_Formatter_Twig_Env_RichhtmlService()) && false ?: '_'});\n\n return $instance;\n }", "public function addParser(ParserContract $parser, string $extension): void\n {\n self::$supportedParsers[$extension] = $parser;\n }", "public function addParser ($regex, $command, $description, $closure) {\n $this->parsers[] = compact('regex', 'command', 'description', 'closure');\n }", "public function getParser();", "private function add_formats($format_options) {\n\n\t\t$grid = array(\n\t\t 'name' => 'grid', \n\t\t 'width' => $format_options['grid_width'], \n\t\t 'height' => $format_options['grid_height'], \n\t\t 'crop' => ($format_options['grid_crop'] == '1' ? 1 : 0), \n\t\t 'quality' => $format_options['grid_quality'], \n\t\t 'sharpening' => ($format_options['grid_sharpen'] == '1' ? 1 : 0)\n\t\t);\n\n\t\t$thumb = array(\n\t\t 'name' => 'thumb', \n\t\t 'width' => $format_options['thumb_width'], \n\t\t 'height' => $format_options['thumb_height'], \n\t\t 'crop' => ($format_options['thumb_crop'] == '1' ? 1 : 0), \n\t\t 'quality' => $format_options['thumb_quality'], \n\t\t 'sharpening' => ($format_options['thumb_sharpen'] == '1' ? 1 : 0)\n\t\t);\n\n\t\t$large = array(\n\t\t 'name' => 'large', \n\t\t 'width' => $format_options['large_width'], \n\t\t 'height' => $format_options['large_height'], \n\t\t 'crop' => ($format_options['large_crop'] == '1' ? 1 : 0), \n\t\t 'quality' => $format_options['large_quality'], \n\t\t 'sharpening' => ($format_options['large_sharpen'] == '1' ? 1 : 0)\n\t\t);\n\n\t\t$this->format->add($grid);\n\t\t$this->format->add($thumb);\n\t\t$this->format->add($large);\n\n\t\t// Make our formats accessible more easily\n\t\t$this->formats['grid'] = $grid;\n\t\t$this->formats['thumb'] = $thumb;\n\t\t$this->formats['large'] = $large;\n\n\n\t}", "public function provideParser()\n {\n return array(\n array(new AutoloaderFileParser_RegExp()),\n array(new AutoloaderFileParser_Tokenizer())\n );\n }", "abstract public function generateParsers();", "public function getParser($filename);", "private function registerParserFactory()\n\t{\n\t\t$factory = 'Cerbero\\Affiliate\\Parsers\\XmlStringStreamerParserFactory';\n\n\t\t$this->app->bind('Cerbero\\Affiliate\\Parsers\\ParserFactoryInterface', $factory);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests removal of duplicate recipients and replytos.
public function testDuplicateIDNRemoved() { if (!PHPMailer::idnSupported()) { self::markTestSkipped('intl and/or mbstring extensions are not available'); } $this->Mail->clearAllRecipients(); $this->Mail->CharSet = PHPMailer::CHARSET_UTF8; self::assertTrue($this->Mail->addAddress('test@françois.ch')); self::assertFalse($this->Mail->addAddress('test@françois.ch')); self::assertTrue($this->Mail->addAddress('test@FRANÇOIS.CH')); self::assertFalse($this->Mail->addAddress('test@FRANÇOIS.CH')); self::assertTrue($this->Mail->addAddress('test@xn--franois-xxa.ch')); self::assertFalse($this->Mail->addAddress('test@xn--franois-xxa.ch')); self::assertFalse($this->Mail->addAddress('test@XN--FRANOIS-XXA.CH')); $this->buildBody(); self::assertTrue($this->Mail->send(), $this->Mail->ErrorInfo); //There should be only one "To" address and one "Reply-To" address. self::assertCount( 1, $this->Mail->getToAddresses(), 'Bad count of "to" recipients' ); }
[ "private function uniqueRecipients()\n\t{\n\t\t/** @var $search Recipient */\n\t\t$search = Search_Object::create(Recipient::class);\n\t\t$recipients = array_merge(\n\t\t\t[$this->from, $this->reply_to, $this->return_path],\n\t\t\t$this->to, $this->copy_to, $this->blind_copy_to\n\t\t);\n\t\t$already = [];\n\t\tforeach ($recipients as $recipient) {\n\t\t\tif (isset($recipient)) {\n\t\t\t\t$search->email = $recipient->email;\n\t\t\t\t$search->name = $recipient->name;\n\t\t\t\tif (isset($already[strval($search)])) {\n\t\t\t\t\tDao::replace($recipient, $already[strval($search)], false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$already[strval($search)] = $recipient;\n\t\t\t\t\tif ($find = Dao::searchOne($recipient)) {\n\t\t\t\t\t\tDao::replace($recipient, $find, false);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tDao::disconnect($recipient);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function deleteRecipients()\r\n\t{\t \r\n\t for ($i=0 ; $i<count($this->headers['To']) ; $i++)\r\n\t array_splice($this->headers['To'], $i, 1);\r\n\t}", "public function testNoDuplicateReplyToAddresses()\n {\n $this->Mail->CharSet = PHPMailer::CHARSET_UTF8;\n\n self::assertTrue(\n $this->Mail->addReplyTo('test+replyto@françois.ch', 'UTF8 domain'),\n 'Initial address + name not queued'\n );\n self::assertFalse(\n $this->Mail->addReplyTo('test+replyto@françois.ch'),\n 'Duplicate address should not have been queued'\n );\n // For the queue, a duplicate address in a different case is accepted.\n self::assertTrue(\n $this->Mail->addReplyTo('test+replyto@FRANÇOIS.CH'),\n 'Duplicate address, different case address not queued'\n );\n self::assertFalse(\n $this->Mail->addReplyTo('test+replyto@FRANÇOIS.CH'),\n 'Duplicate address, different case should not have been queued twice'\n );\n // An address in punycode does not go into the queue, but gets added straight away.\n self::assertTrue(\n $this->Mail->addReplyTo('test+replyto@xn--franois-xxa.ch'),\n 'Punycode address, no name not added'\n );\n self::assertFalse(\n $this->Mail->addReplyTo('test+replyto@xn--franois-xxa.ch', 'Punycode domain'),\n 'Duplicate punycode address should not have been added, no matter that this one has a name'\n );\n self::assertFalse(\n $this->Mail->addReplyTo('test+replyto@XN--FRANOIS-XXA.CH'),\n 'Duplicate punycode address, different case should not have been added'\n );\n\n // The one accepted punycode address should already be lined up.\n self::assertCount(1, $this->Mail->getReplyToAddresses(), 'Addresses added did not match expected count of 1');\n\n // Check that the non-punycode addresses were added to the queue correctly.\n $queue = $this->getPropertyValue($this->Mail, 'ReplyToQueue');\n self::assertIsArray($queue, 'Queue is not an array');\n self::assertCount(2, $queue, 'Queue does not contain exactly 2 entries');\n self::assertArrayHasKey(\n 'test+replyto@françois.ch',\n $queue,\n 'Queue does not contain an entry for the lowercase address'\n );\n self::assertArrayHasKey(\n 'test+replyto@FRANÇOIS.CH',\n $queue,\n 'Queue does not contain an entry for the uppercase address'\n );\n\n $this->buildBody();\n self::assertTrue($this->Mail->preSend(), $this->Mail->ErrorInfo);\n\n // There should be only one \"Reply-To\" address after preSend().\n self::assertCount(\n 1,\n $this->Mail->getReplyToAddresses(),\n 'Bad count of \"reply-to\" addresses'\n );\n\n $expectedAddress = 'test+replyto@xn--franois-xxa.ch';\n $retrieved = $this->Mail->getReplyToAddresses();\n self::assertCount(1, $retrieved, 'Stored addresses after preSend() is not 1');\n\n // Verify that the registered reply-to address is the initially added lowercase punycode one.\n self::assertArrayHasKey(\n $expectedAddress,\n $retrieved,\n 'ReplyTo property does not contain an entry with this address as the key'\n );\n self::assertCount(\n 2,\n $retrieved[$expectedAddress],\n 'ReplyTo array for this address does not contain exactly two array items'\n );\n self::assertSame(\n $expectedAddress,\n $retrieved[$expectedAddress][0],\n 'ReplyTo array for this address does not contain added address'\n );\n self::assertSame(\n '',\n $retrieved[$expectedAddress][1],\n 'ReplyTo array for this address does not contain added name'\n );\n }", "public function testCanDeleteRecipients()\n {\n $id = rand(1, 99999);\n $this->json('DELETE', \"/recipients/{$id}\")\n ->seeJson([\n 'code' => 200,\n 'status' => true\n ]);\n }", "public function testDeleteRecipient()\n {\n }", "public function test_duplicate_subscriber()\n {\n ApiKey::create(['apikey_value' => Crypt::encryptString(env('MAILERLITE_KEY'))]);\n\n $email = $this->faker->unique()->safeEmail();\n $name = $this->faker->name();\n\n $response = $this->json('POST', '/subscribers', [\n 'email' => $email,\n 'name' => $name,\n 'country' => 'Fake Country'\n ]);\n\n $response->assertStatus(200);\n\n $response = $this->json('POST', '/subscribers', [\n 'email' => $email,\n 'name' => $name,\n 'country' => 'Fake Country'\n ]);\n\n $response->assertStatus(200);\n $response->assertJson([\n 'error' => true,\n 'message' => 'A subscriber with the same email exists.'\n ]);\n }", "public function testHideDuplicates() {\n Yii::app()->params->adminProf = Profile::model()->findByPk(1);\n $contact = $this->contacts('contact1');\n $this->assertEquals(8, $contact->countDuplicates());\n\n $duplicates = $contact->getDuplicates(true);\n $this->assertEquals(8, count($duplicates));\n\n $newDuplicates = $contact->getDuplicates(true);\n $contact->hideDuplicates();\n $this->assertEquals(0, $contact->countDuplicates());\n\n $this->assertEquals(8, count($newDuplicates));\n\n // Spot check the fields of one of the duplicates\n $dupeContact = $this->contacts('contact2');\n $this->assertEquals(1, $dupeContact->dupeCheck);\n $this->assertEquals(0, $dupeContact->visibility);\n $this->assertEquals('Anyone', $dupeContact->assignedTo);\n }", "public function clear_recipients()\n\t{\n\t\t$this->recipients = null;\n\t\treturn true;\n\t}", "public function testMultipleRecipients() {\n // Set multiple whitelisted domain and rerouting emails. Multiple commas and\n // semicolons are added for validation tests.\n $this->configureRerouteEmail(TRUE, 'user1@example.com, user2@example.com,;;,,user@example.com', $this->whitelistedDomain);\n\n // Make sure configured emails were set properly.\n $reroute_to = 'user1@example.com,user2@example.com,user@example.com';\n $this->assertEqual($this->rerouteConfig->get(REROUTE_EMAIL_ADDRESS), $reroute_to, 'Reroute email address was set.');\n $this->assertEqual($this->rerouteConfig->get(REROUTE_EMAIL_WHITELIST), $this->whitelistedDomain, 'Whitelisted value was set.');\n\n // Submit a test email (should be rerouted).\n $to = 'some@not-exist.domain, whitelisted@example.com';\n $this->drupalPostForm('admin/config/development/reroute_email/test', ['to' => $to], t('Send email'));\n\n // Check if the email was rerouted properly.\n $this->assertEmailOriginallyTo($to);\n $this->assertMail('to', $reroute_to, new FormattableMarkup('Email was properly rerouted to the email address: @destination.', ['@destination' => $reroute_to]));\n\n // Submit a test email (should not be rerouted).\n $to = 'whitelisted@example.com, user2@example.com, allowed@example.com';\n $this->drupalPostForm('admin/config/development/reroute_email/test', ['to' => $to], t('Send email'));\n\n // Check if the email was not rerouted.\n $this->assertMail('to', $to, new FormattableMarkup('Email was properly sent the email addresses: @destination.', ['@destination' => $to]));\n }", "public function testDuplicatesDelete()\n {\n }", "public function test_deleteRecipients() {\n\n }", "function purgeReplies() {\n $reply_handler =& xoops_getmodulehandler('reply', 'survey');\n $replies = $reply_handler->getObjects(new Criteria('formid', $this->formid));\n if (count($replies) > 0) {\n return $reply_handler->purge(new Criteria('replyid', \"(\".implode(',', array_keys($replies)).\")\", \"IN\"));\n }\n return true;\n }", "public function testDisallowDuplicateParticipants() {\n $users = $this->generateTestUsers();\n $this->tournamentPlugin->addParticipants($this->tournament, $users);\n $this->tournamentPlugin->addParticipants($this->tournament, $users);\n }", "public function RemoveDuplicateAddresses() {\n\t\t\t/*\n\t\t\t * 1) Obtain household/s of the person.\n\t\t\t * 2) For each household, check for duplication of addresses\n\t\t\t * 3) If duplication found, remove.\n\t\t\t */\t\n\t\t\tif (!$this->__get('_HouseholdParticipation')){\n\t\t\t\t$objHouseholdArray = $this->__get('_HouseholdParticipationArray');\n\t\t\t\tforeach ($objHouseholdArray as $objHousehold) {\n\t\t\t\t\t$objAddressArray = $objHousehold->GetAddressArray();\n\t\t\t\t\t$this->RemoveRedundantAddresses($objAddressArray);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->RemoveRedundantAddresses($this->__get('_HouseholdParticipation'));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t* 1) Get all addresses, both personal and associated households\n\t\t\t* 2) check for duplication of addresses\n\t\t\t* 3) If duplication found, remove. When removing, always remove personal before houshold\n\t\t\t*/\n\t\t\t$objAddressArray = $this->GetAllAssociatedAddressArray(null,false);\n\t\t\t$this->RemoveRedundantAddresses($objAddressArray);\n\t\t}", "public function testClearReplyTos()\n {\n self::assertTrue($this->Mail->addReplyTo('example@example.com'), 'Address not added');\n self::assertTrue($this->Mail->addReplyTo('test@françois.ch'), 'IDN Address not queued');\n\n // Verify there is something to clear.\n $retrieved = $this->Mail->getReplyToAddresses();\n self::assertIsArray($retrieved, 'ReplyTo property is not an array (pre-clear)');\n self::assertCount(1, $retrieved, 'ReplyTo property does not contain exactly one address');\n\n $queue = $this->getPropertyValue($this->Mail, 'ReplyToQueue');\n self::assertIsArray($queue, 'Queue is not an array (pre-clear)');\n self::assertCount(1, $queue, 'Queue does not contain exactly one entry');\n\n $this->Mail->clearReplyTos();\n\n // Verify the clearing was successful.\n $retrieved = $this->Mail->getReplyToAddresses();\n self::assertIsArray($retrieved, 'ReplyTo property is not an array (post-clear)');\n self::assertCount(0, $retrieved, 'ReplyTo property still contains an address');\n\n $queue = $this->getPropertyValue($this->Mail, 'ReplyToQueue');\n self::assertIsArray($queue, 'Queue is not an array (post-clear)');\n self::assertCount(0, $queue, 'Queue still contains an entry');\n }", "public function test_deleteRecipient() {\n\n }", "public function testMarkDuplicate() {\n Yii::app()->params->adminProf = Profile::model()->findByPk(1);\n $contact = $this->contacts('contact1');\n $this->assertEquals(0, $contact->dupeCheck);\n $this->assertEquals(1, $contact->visibility);\n $this->assertEquals('Anyone', $contact->assignedTo);\n $contact->markAsDuplicate();\n $this->assertEquals(1, $contact->dupeCheck);\n $this->assertEquals(0, $contact->visibility);\n $this->assertEquals('Anyone', $contact->assignedTo);\n\n $contact->markAsDuplicate('delete');\n $contact = Contacts::model()->findByPk(1);\n $this->assertEquals(null, $contact);\n\n // Same for accounts\n $account = $this->accounts('account1');\n $this->assertEquals(0, $account->dupeCheck);\n $this->assertEquals('Anyone', $account->assignedTo);\n $account->markAsDuplicate();\n $this->assertEquals(1, $account->dupeCheck);\n $this->assertEquals('Anyone', $account->assignedTo);\n\n $account->markAsDuplicate('delete');\n $account = Accounts::model()->findByPk(1);\n $this->assertEquals(null, $account);\n }", "function deleteReceivers(PageVO &$page)\n {\n global $vgDB, $vgDBPrefix;\n $surveysid = array();\n $surveys = &$page->getSurveys();\n foreach($surveys as &$survey)\n {\n /* @var $survey SurveyVO */\n $surveyChoices =& $survey->getChoices();\n foreach($surveyChoices as &$surveyChoice)\n {\n /* @var $surveyChoice ChoiceVO */\n if($surveyChoice->receiver)\n {\n $success = $vgDB->Execute(\"DELETE FROM {$vgDBPrefix}used_receivers WHERE receiver = ?\", array($surveyChoice->receiver));\n if(! $success)\n throw new SurveyException(\"Failed to delete used receivers\");\n }\n $surveyChoice->receiver = NULL;\n $surveyChoice->SMS = NULL;\n }\n $surveysid[] = array($survey->getSurveyID());\n }\n $success = $vgDB->Execute(\"UPDATE {$vgDBPrefix}choice SET finished = 1 WHERE surveyID = ?\", $surveysid );\n if(! $success)\n throw new SurveyException(\"Could not mark choice as finished\");\n return true;\n }", "public function deleteFromSender()\n\t{\n\t\t//If the recipient deleted it already and now the recipient wants to \n\t\t//delete it, just delete it from the DB as no one wants it anymore\n\t\tif($this->getStatus() == PrivateMessage::STATUS_RECIPIENT_DELETION)\n\t\t\treturn $this->delete();\n\t\t\t\n\t\t//Otherwise, note that the recipient sender the message\n\t\t$this->setStatus(PrivateMessage::STATUS_SENDER_DELETION);\n\t\t\n\t\treturn $this->save();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find a file in a directory matching a basename and an extension Both basename and extension are ordered arrays, the search starts with the first basename and all possible extensions, and continues then with the next basename. If a caseinsensitive find is requested the file names in the filesystem and the passed strings are assumed to be UTF8 encoded. The search is not recursive, only $basedir is searched.
public static function findFile( $basedir, $basenames, $extensions, $caseSensitive = true ) { $searchFilenames = []; foreach ($basenames as $basename) { foreach ($extensions as $ext) { $searchFilenames[] = $basename.$ext; } } $basedirFilenames = []; $basedirFilenamesLc = []; $it = new FilesystemIterator($basedir); foreach ($it as $fileinfo) { if (!$fileinfo->isFile()) { continue; } $basedirFilenames[] = $fileinfo->getFilename(); $basedirFilenamesLc[] = mb_strtolower($fileinfo->getFilename(), 'UTF-8'); } $foundFilename = null; foreach ($searchFilenames as $searchFilename) { $idx = false; if ($caseSensitive) { $idx = array_search($searchFilename, $basedirFilenames); } else { $searchFilenameLc = mb_strtolower($searchFilename, 'UTF-8'); $idx = array_search($searchFilenameLc, $basedirFilenamesLc); } if ($idx !== false) { $foundFilename = $basedirFilenames[$idx]; break; } } if (!$foundFilename) { return false; } // found file; double-check if the file exists (and if it is a file) $fullFilename = $basedir.'/'.$foundFilename; if (!is_file($fullFilename)) { return false; } return $fullFilename; }
[ "public function searchFileForString($string);", "function searchFileByExtension($searchDirectory, $searchExtension, $firstMatch = true) {\n\tif (!is_dir($searchDirectory)) return null;\n\n\t$fileList = scandir($searchDirectory);\n\tif (empty($fileList)) return null;\n\n\t$result = array();\n\n\tforeach($fileList as $file) {\n\t\tif (is_array($searchExtension)) {\n\t\t\t$found = null;\n\t\t\tforeach($searchExtension as $extension) {\n\t\t\t\tif (pathinfo($file, PATHINFO_EXTENSION) == $extension) {\n\t\t\t\t\t$result[] = $file;\n\t\t\t\t\tif ($firstMatch) {\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($found && $firstMatch) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} // end array extension search\n\t\telse {\n\t\t\tif (pathinfo($file, PATHINFO_EXTENSION) == $searchExtension) {\n\t\t\t\t$result[] = $file;\n\t\t\t\tif ($firstMatch) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} // end string extension search\n\t} // end foreach file\n\t\n\tif ($firstMatch) {\n\t\treturn empty($result) ? null : $result[0];\n\t}\n\telse {\n\t\treturn $result;\n\t}\n}", "function findFile($file) {\n\t// Normalizing the first parameter\n\tif (! is_array ( $file )) {\n\t\t$file = array ($file );\n\t}\n\n\t// Checking for the second, the \"hidden\" parameter\n\t// Used for recursion-reasons\n\tif (func_num_args () > 1) {\n\t\t$startDir = func_get_arg ( 1 );\n\t} else {\n\t\t$startDir = dirname ( __FILE__ );\n\t}\n\n\t$subDirectories = array ( );\n\t$dirIt = new DirectoryIterator ( $startDir );\n\n\tforeach ( $dirIt as $dirItem ) {\n\t\tif ($dirItem->isDot ()) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ($dirItem->isDir ()) {\n\t\t\t$subDirectories [] = $dirItem->getPathname ();\n\t\t\tcontinue;\n\t\t}\n\t\tif (in_array ( $dirItem->getFilename (), $file )) {\n\t\t\treturn $dirItem->getPathname ();\n\t\t}\n\t}\n\n\tforeach ( $subDirectories as $directory ) {\n\t\t$result = findfile ( $file, $directory );\n\n\t\tif ($result) {\n\t\t\treturn $result;\n\t\t}\n\t}\n\n\treturn false;\n}", "function find_files(&$matches, $directory, $filename=null, $extension=null, $limit=null,\n $case_sensitive=true, $subdirs=true) {\n // File system objects\n $fsos = scandir($directory);\n foreach ($fsos as $fso) {\n $fso_full = $directory . DS . $fso; \n $parts = pathinfo($fso_full); \n if (is_file($fso_full)\n && (empty($filename)\n || ($case_sensitive && $filename == $parts['filename'])\n || (!$case_sensitive && strcasecmp($filename, $parts['filename'])))\n && (empty($extension)\n || ($case_sensitive && $extension == $parts['extension'])\n || (!$case_sensitive && strcasecmp($extension, $parts['extension'])))) { \n $matches[] = $fso_full;\n if ($limit > 0 && count($matches) >= $limit) return;\n } \n else if (is_dir($fso_full) && $subdirs && $fso != '.' && $fso != '..') {\n find_files($matches, $fso_full, $filename, $extension, $limit, $case_sensitive, $subdirs);\n }\n }\n }", "abstract public function search($files, array $includedFiles);", "public function searchForFiles($basepath, $filename, $filenameAsRex = false){\r\n\t\tif( is_dir($basepath) && is_readable($basepath) ){\r\n\t\t\t$matches = array();\r\n\t\t\t\r\n\t\t\t$dirIterator = new RecursiveDirectoryIterator($basepath);\r\n\t\t\t$itIterator = new RecursiveIteratorIterator($dirIterator, RecursiveIteratorIterator::SELF_FIRST);\r\n\t\t\t\r\n\t\t\tforeach( $itIterator as $file ){\r\n\t\t\t\tif(\r\n\t\t\t\t\t$file->isFile()\r\n\t\t\t\t\t&& (\r\n\t\t\t\t\t\t(!$filenameAsRex &&\t($filename == $file->getFilename()))\r\n\t\t\t\t\t\t|| ($filenameAsRex && preg_match($filename, $file->getFilename()))\r\n\t\t\t\t\t)\r\n\t\t\t\t){\r\n\t\t\t\t\t$matches[] = str_replace(array('\\\\', $basepath), array('/', ''), $file->getPathname());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $matches;\r\n\t\t} else {\r\n\t\t\t$this->throwModuleException(__FUNCTION__.': io-error, given dir no directory or not readable');\r\n\t\t}\r\n\t}", "public function findFilesWithExtension($directory, $extension);", "function TbsSearchInFiles($files, $str, $returnFirstFound = true) {\r\n\r\n\t\t$keys_ok = array();\r\n\r\n\t\t// transform the list of files into a list of available idx\r\n\t\t$keys_todo = array();\r\n\t\t$idx_keys = array();\r\n\t\tforeach($files as $k=>$f) {\r\n\t\t\t$idx = $this->FileGetIdx($f);\r\n\t\t\tif ($idx!==false) {\r\n\t\t\t\t$keys_todo[$k] = $idx;\r\n\t\t\t\t$idx_keys[$idx] = $k;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Search in the current sub-file\r\n\t\tif ( ($this->TbsCurrIdx!==false) && isset($idx_keys[$this->TbsCurrIdx]) ) {\r\n\t\t\t$key = $idx_keys[$this->TbsCurrIdx];\r\n\t\t\t$p = strpos($this->TBS->Source, $str);\r\n\t\t\tif ($p!==false) {\r\n\t\t\t\t$keys_ok[] = array('key' => $key, 'idx' => $this->TbsCurrIdx, 'src' => &$this->TBS->Source, 'pos' => $p, 'curr'=>true);\r\n\t\t\t\tif ($returnFirstFound) return $keys_ok[0];\r\n\t\t\t}\r\n\t\t\tunset($keys_todo[$key]);\r\n\t\t}\r\n\r\n\t\t// Search in the store\r\n\t\tforeach($this->TbsStoreLst as $idx => $s) {\r\n\t\t\tif ( ($idx!==$this->TbsCurrIdx) && isset($idx_keys[$idx]) ) {\r\n\t\t\t\t$key = $idx_keys[$idx];\r\n\t\t\t\t$p = strpos($s['src'], $str);\r\n\t\t\t\tif ($p!==false) {\r\n\t\t\t\t\t$keys_ok[] = array('key' => $key, 'idx' => $idx, 'src' => &$s['src'], 'pos' => $p, 'curr'=>false);\r\n\t\t\t\t\tif ($returnFirstFound) return $keys_ok[0];\r\n\t\t\t\t}\r\n\t\t\t\tunset($keys_todo[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Search in other sub-files (never opened)\r\n\t\tforeach ($keys_todo as $key => $idx) {\r\n\t\t\t$txt = $this->FileRead($idx);\r\n\t\t\t$p = strpos($txt, $str);\r\n\t\t\tif ($p!==false) {\r\n\t\t\t\t$keys_ok[] = array('key' => $key, 'idx' => $idx, 'src' => $txt, 'pos' => $p, 'curr'=>false);\r\n\t\t\t\tif ($returnFirstFound) return $keys_ok[0];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($returnFirstFound) {\r\n\t\t\treturn array('key'=>false, 'idx'=>false, 'src'=>false, 'pos'=>false, 'curr'=>false);\r\n\t\t} else {\r\n\t\t\treturn $keys_ok;\r\n\t\t}\r\n\r\n\t}", "function TbsSearchInFiles($files, $str, $returnFirstFound = true) {\n\n\t\t$keys_ok = array();\n\n\t\t// transform the list of files into a list of available idx\n\t\t$keys_todo = array();\n\t\t$idx_keys = array();\n\t\tforeach($files as $k=>$f) {\n\t\t\t$idx = $this->FileGetIdx($f);\n\t\t\tif ($idx!==false) {\n\t\t\t\t$keys_todo[$k] = $idx;\n\t\t\t\t$idx_keys[$idx] = $k;\n\t\t\t}\n\t\t}\n\n\t\t// Search in the current sub-file\n\t\tif ( ($this->TbsCurrIdx!==false) && isset($idx_keys[$this->TbsCurrIdx]) ) {\n\t\t\t$key = $idx_keys[$this->TbsCurrIdx];\n\t\t\t$p = strpos($this->TBS->Source, $str);\n\t\t\tif ($p!==false) {\n\t\t\t\t$keys_ok[] = array('key' => $key, 'idx' => $this->TbsCurrIdx, 'src' => &$this->TBS->Source, 'pos' => $p, 'curr'=>true);\n\t\t\t\tif ($returnFirstFound) return $keys_ok[0];\n\t\t\t}\n\t\t\tunset($keys_todo[$key]);\n\t\t}\n\n\t\t// Search in the store\n\t\tforeach($this->TbsStoreLst as $idx => $s) {\n\t\t\tif ( ($idx!==$this->TbsCurrIdx) && isset($idx_keys[$idx]) ) {\n\t\t\t\t$key = $idx_keys[$idx];\n\t\t\t\t$p = strpos($s['src'], $str);\n\t\t\t\tif ($p!==false) {\n\t\t\t\t\t$keys_ok[] = array('key' => $key, 'idx' => $idx, 'src' => &$s['src'], 'pos' => $p, 'curr'=>false);\n\t\t\t\t\tif ($returnFirstFound) return $keys_ok[0];\n\t\t\t\t}\n\t\t\t\tunset($keys_todo[$key]);\n\t\t\t}\n\t\t}\n\n\t\t// Search in other sub-files (never opened)\n\t\tforeach ($keys_todo as $key => $idx) {\n\t\t\t$txt = $this->FileRead($idx);\n\t\t\t$p = strpos($txt, $str);\n\t\t\tif ($p!==false) {\n\t\t\t\t$keys_ok[] = array('key' => $key, 'idx' => $idx, 'src' => $txt, 'pos' => $p, 'curr'=>false);\n\t\t\t\tif ($returnFirstFound) return $keys_ok[0];\n\t\t\t}\n\t\t}\n\n\t\tif ($returnFirstFound) {\n\t\t\treturn array('key'=>false, 'idx'=>false, 'src'=>false, 'pos'=>false, 'curr'=>false);\n\t\t} else {\n\t\t\treturn $keys_ok;\n\t\t}\n\n\t}", "public function find_file($dir, $file, $ext = NULL, $array = FALSE)\n\t{\n\t\tif ($ext === NULL)\n\t\t{\n\t\t\t// Use the default extension\n\t\t\t$ext = $this->_file_extension;\n\t\t}\n\t\telseif ($ext)\n\t\t{\n\t\t\t// Prefix the extension with a period\n\t\t\t$ext = '.'.$ext;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Use no extension\n\t\t\t$ext = '';\n\t\t}\n\n\t\t// Create a partial path of the filename\n\t\t$path = $dir.DIRECTORY_SEPARATOR.$file.$ext;\n\n\t\tif ($array OR $dir === 'config' OR $dir === 'i18n' OR $dir === 'messages')\n\t\t{\n\t\t\t// Include paths must be searched in reverse\n\t\t\t$paths = array_reverse(\\Simply::$_paths);\n\n\t\t\t// Array of files that have been found\n\t\t\t$found = array();\n\n\t\t\tforeach ($paths as $dir)\n\t\t\t{\n\t\t\t\tif (is_file($dir.$path))\n\t\t\t\t{\n\t\t\t\t\t// This path has a file, add it to the list\n\t\t\t\t\t$found[] = $dir.$path;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The file has not been found yet\n\t\t\t$found = FALSE;\n\n\t\t\tforeach (\\Simply::$_paths as $dir)\n\t\t\t{\n\t\t\t\tif (is_file($dir.$path))\n\t\t\t\t{\n\t\t\t\t\t// A path has been found\n\t\t\t\t\t$found = $dir.$path;\n\n\t\t\t\t\t// Stop searching\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $found;\n\t}", "function getCasedFilename( $fname, $path=\".\" )\r\n{\r\n $flist = getFileList( $path);\r\n\r\n while( list($ndx,$f) = each( $flist ) )\r\n {\r\n if ( eregi( \"$fname\", $f ) ) {\r\n return $f;\r\n }\r\n } \r\n\r\n return null;\r\n}", "protected function appendSearchPath($str) {\n static $base_files = [];\n $basedir = BASEDIR;\n if (empty($base_files) && !empty($basedir)) {\n $base_files = makefilelist(BASEDIR, \".|..\");\n }\n foreach ($base_files as $files) {\n if (stristr($str, $files)) {\n return $str;\n }\n }\n $str = BASEDIR.$str;\n\n return $str;\n }", "public function searchInside(string $filename, string $search, string $path = ''):bool\n {}", "Function preg_find($pattern, $start_dir='.', $args=NULL) {\n\n\n $files_matched = array();\n\n $fh = opendir($start_dir);\n\n while (($file = readdir($fh)) !== false) {\n if (strcmp($file, '.')==0 || strcmp($file, '..')==0) continue;\n $filepath = $start_dir . '/' . $file;\n if (preg_match($pattern,\n ($args & PREG_FIND_FULLPATH) ? $filepath : $file)) {\n $doadd = is_file($filepath)\n || (is_dir($filepath) && ($args & PREG_FIND_DIRMATCH))\n || (is_dir($filepath) && ($args & PREG_FIND_DIRONLY));\n if ($args & PREG_FIND_DIRONLY && $doadd && !is_dir($filepath)) $doadd = false;\n if ($args & PREG_FIND_NEGATE) $doadd = !$doadd;\n if ($doadd) {\n if ($args & PREG_FIND_RETURNASSOC) { // return more than just the filenames\n $fileres = array();\n if (function_exists('stat')) {\n $fileres['stat'] = stat($filepath);\n $fileres['du'] = $fileres['stat']['blocks'] * 512;\n }\n if (function_exists('fileowner')) $fileres['uid'] = fileowner($filepath);\n if (function_exists('filegroup')) $fileres['gid'] = filegroup($filepath);\n if (function_exists('filetype')) $fileres['filetype'] = filetype($filepath);\n if (function_exists('mime_content_type')) $fileres['mimetype'] = mime_content_type($filepath);\n if (function_exists('dirname')) $fileres['dirname'] = dirname($filepath);\n if (function_exists('basename')) $fileres['basename'] = basename($filepath);\n if (isset($fileres['uid']) && function_exists('posix_getpwuid ')) $fileres['owner'] = posix_getpwuid ($fileres['uid']);\n $files_matched[$filepath] = $fileres;\n } else\n array_push($files_matched, $filepath);\n }\n }\n if ( is_dir($filepath) && ($args & PREG_FIND_RECURSIVE) ) {\n $files_matched = array_merge($files_matched,\n preg_find($pattern, $filepath, $args));\n }\n }\n\n closedir($fh); \n return $files_matched;\n\n}", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "function rsearch($dir, $pattern) {\n $my_files = [];\n $tree = glob(rtrim($dir, '/') . '/*');\n if (is_array($tree)) {\n foreach($tree as $file) {\n if (is_dir($file)) {\n // echo $file . '<br/>';\n $_files = rsearch($file, $pattern);\n $my_files = array_merge( $my_files, $_files );\n } elseif (is_file($file)) {\n if ( strpos( $file, $pattern ) !== false ) $my_files[] = $file;\n }\n }\n }\n\n return $my_files;\n\n\n\n}", "function find_file_in_parent_directories( $basename , $first_directory = null )\n{\n $dir = $first_directory;\n if ( !isset( $dir ) )\n $dir = pathinfo(__FILE__,PATHINFO_DIRNAME);\n\n while(true)\n {\n $filename = $dir.DIRECTORY_SEPARATOR.$basename;\n if ( file_exists( $filename ) )\n {\n return $filename;\n }\n $parent_dir = pathinfo($dir,PATHINFO_DIRNAME);\n if( $parent_dir == $dir )\n {\n throw new Exception( \"could not find \\\"$basename\\\"\" );\n }\n $dir = $parent_dir;\n }\n}", "public static function find($args)\n {\n if (!is_array($args)) {\n $args = preg_split('/\\s+/', $args, -1, PREG_SPLIT_NO_EMPTY);\n }\n $dir = realpath(array_shift($args));\n if (!$dir) {\n return array();\n }\n $patterns = array();\n $depth = 0;\n $do_files = $do_dirs = true;\n $args_count = count($args);\n for ($i = 0; $i < $args_count; $i++) {\n switch ($args[$i]) {\n case '-type':\n if (in_array($args[$i+1], array('d', 'f'))) {\n if ($args[$i+1] == 'd') {\n $do_files = false;\n } else {\n $do_dirs = false;\n }\n }\n $i++;\n break;\n case '-name':\n $name = preg_quote($args[$i+1], '#');\n // our magic characters ? and * have just been escaped,\n // so now we change the escaped versions to PCRE operators\n $name = strtr($name, array('\\?' => '.', '\\*' => '.*'));\n $patterns[] = '('.$name.')';\n $i++;\n break;\n case '-maxdepth':\n $depth = $args[$i+1];\n break;\n }\n }\n $path = System::_dirToStruct($dir, $depth, 0, true);\n if ($do_files && $do_dirs) {\n $files = array_merge($path['files'], $path['dirs']);\n } elseif ($do_dirs) {\n $files = $path['dirs'];\n } else {\n $files = $path['files'];\n }\n if (count($patterns)) {\n $dsq = preg_quote(DIRECTORY_SEPARATOR, '#');\n $pattern = '#(^|'.$dsq.')'.implode('|', $patterns).'($|'.$dsq.')#';\n $ret = array();\n $files_count = count($files);\n for ($i = 0; $i < $files_count; $i++) {\n // only search in the part of the file below the current directory\n $filepart = basename($files[$i]);\n if (preg_match($pattern, $filepart)) {\n $ret[] = $files[$i];\n }\n }\n return $ret;\n }\n return $files;\n }", "function search($start_dirs, $pattern_include = '', $pattern_exclude = '', $pattern_find) {\n\t\tif (!is_array($start_dirs)) {\n\t\t\t$start_dirs = array($start_dirs);\n\t\t}\n\t\tif (!$pattern_find) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!is_array($pattern_find)) {\n\t\t\t$pattern_find = array($pattern_find);\n\t\t}\n\t\t$files = array();\n\t\tforeach ((array)$start_dirs as $_dir_name) {\n\t\t\tforeach ((array)$this->scan_dir($_dir_name, 1, $pattern_include, $pattern_exclude) as $_file_path) {\n\t\t\t\t$files[] = $_file_path;\n\t\t\t}\n\t\t}\n\t\t$files_matched = array();\n\t\tforeach ((array)$files as $_id => $_file_path) {\n\t\t\t$contents = file_get_contents($_file_path);\n\t\t\tforeach ((array)$pattern_find as $p_find) {\n\t\t\t\tif (preg_match($p_find, $contents)) {\n\t\t\t\t\t$files_matched[$_id] = $files[$_id];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $files_matched;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified database, and all the documents and attachments contained within it. Note: To avoid deleting a database, CouchDB will respond with the HTTP status code 400 when the request URL includes a ?rev= parameter. This suggests that one wants to delete a document but forgot to add the document id to the URL.
public function deleteDatabase($db) { $request = new ArkCouchDBRequest(ArkCouchDBRequest::METHOD_DELETE, "/" . urlencode($db)); $response = $this->callApi($request); return $response; // switch($response->responseHTTPCode()){ // case 201: // return $response->getParsed(); // case 400: // case 401: // case 404: // $this->error=$response->getParsedItemByIndex(['error']); // $this->errorReason=$response->getParsedItemByIndex(['reason']); // return false; // default: // $this->error="Unknown response code: ".$response->responseHTTPCode(); // $this->errorReason="as error"; // return false; // } }
[ "public function deleteDocument($rid, $version = null, $database = null);", "public function deleteDatabase($database);", "public function delete(string $database);", "private function delete_db()\n\t{\n\t\tif (count($this->args) < 1)\n\t\t\treturn $this->generateError(404, \"The DELETE method needs a target id.\");\n\t\t$pdo = $this->linkDb();\n\t\t$req = \"DELETE FROM $this->target WHERE \" . $this->target . \"_id = \" . $this->args[0];\n\t\t$res = $pdo->exec($req);\n\t\t$this->ret_code = 204;\n\t\treturn $req;\n\t}", "public function actionDelDocument()\n {\n $docId = Yii::app()->request->getParam('id');\n $userId = Yii::app()->user->idUser;\n\n $check = Archives::model()->checkOwner($userId, $docId);\n if (!$check) {\n $this->redirect(Yii::app()->getBaseUrl() . \"/archives\");\n }\n\n if (isset($docId) && $docId > 0) {\n try {\n $docPath = Archives::model()->findByPk((int)$docId);\n if (isset($docPath) && $docPath !== null) {\n $docPath = $docPath->path;\n }\n Archives::model()->deleteByPk((int)$docId);\n ArchiveSession::model()->deleteAllByAttributes(array(), 'idArchive = :id', array(\":id\" => $docId));\n $link = Yii::getPathOfAlias('webroot') . Yii::app()->params[\"archiveFolderPath\"] . '/' . $docPath;\n if (isset($docPath) && $docPath != \"\" && file_exists($link)) {\n unlink($link);\n }\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }\n $this->redirect(Yii::app()->getBaseUrl() . \"/archives\");\n }", "public function destroyDocument($document);", "function\n delete()\n {\n db_delete(\"document\", $this->id);\n $this->clear();\n }", "private function delete_docs() {\n\t\t$posts = get_posts( [\n\t\t\t'post_type' => Post_Types\\Document::POST_TYPE,\n\t\t\t'numberposts' => - 1,\n\t\t\t'meta_query' => [ // phpcs:ignore\n\t\t\t\t[\n\t\t\t\t\t'key' => '_edgenet_id',\n\t\t\t\t\t'compare' => 'EXISTS',\n\t\t\t\t],\n\t\t\t],\n\t\t] );\n\t\tforeach ( $posts as $post ) {\n\t\t\t$attachment_id = get_post_meta( $post->ID, '_edgenet_wp_attachment_id', true );\n\n\t\t\t// Delete the document from the media library.\n\t\t\twp_delete_attachment( $attachment_id, true );\n\n\t\t\t// Delete the Document post.\n\t\t\twp_delete_post( $post->ID, true );\n\t\t}\n\t}", "public function removeAllFromDatabase(string $database): void\n {\n InvalidDatabaseNameException::assertValidDatabaseName($database);\n\n foreach ($this->findByDatabase($database) as $document) {\n $this->remove($document);\n }\n }", "public function deleteDocument($id) { //id comes from POST when button is clicked\r\n\t\t\t$this->error = '';\r\n\r\n\t\t\tif (!$this->user) {\r\n\t\t\t\t$this->error = \"User not specified. Unable to delete document.\";\r\n\t\t\t\treturn $this->error;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (! $this->mysqli) {\r\n\t\t\t\t$this->error = \"No connection to database. Unable to delete document.\";\r\n\t\t\t\treturn $this->error;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (! $id) {\r\n\t\t\t\t$this->error = \"No id specified for document to delete.\";\r\n\t\t\t\treturn $this->error;\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\t//only users who uploaded document can delete the document\r\n\t\t\t$stmt = $this->mysqli->prepare(\"DELETE FROM documents WHERE uploaderID = ? AND id = ?\");\r\n\t\t\t\r\n\t\t\tif (! ($stmt->bind_param(\"ii\", $this->user->workerID, $id)) ) {\r\n\t\t\t\t$this->error = \"Prepare failed: \" . $this->mysqli->error;\r\n\t\t\t\treturn $this->error;\r\n\t\t\t}\r\n\t\t\tif (! $stmt->execute() ) {\r\n\t\t\t\t$this->error = \"Execute of statement failed: \" . $stmt->error;\r\n\t\t\t\treturn $this->error;\r\n\t\t\t}\r\n \r\n\t\t\t\r\n\t\t\t$stmt->close();\r\n\t\t\t\r\n\t\t\treturn $this->error;\r\n\t\t}", "public function deleteDatabaseOnly() {\n\t\tif(is_numeric($this->ID)) DB::query(\"DELETE FROM \\\"File\\\" WHERE \\\"ID\\\" = $this->ID\");\n\t}", "function doDropDbCollections() {\n\t\t$this->db = xn(\"db\");\n\t\t$db = $this->_mongo->selectDB($this->db);\n\t\tforeach ($db->listCollections() as $collection) {\n\t\t\t$collection->drop();\n\t\t}\n\t\techo '<script language=\"javascript\">\nwindow.parent.frames[\"left\"].location.reload();\n</script>';\n\t\t$this->redirect(\"db\", array( \"db\" => $this->db ), true);\n\t}", "public function deleted(Documents $documents)\n {\n //\n }", "function deleteDocument() {\n global $synAbsolutePath;\n include_once( '../../includes/php/utility.php' );\n $ext = $this->translate( $this->getValue() );\n $mat = $this->compileQry( $this->translatePath($this->mat) );\n $filename = $this->createFilename(false);\n if ($this->multilang == 1) {\n $fileToBeRemoved = $synAbsolutePath . $mat . $filename . '_*';\n } else {\n $fileToBeRemoved = $synAbsolutePath . $mat . $filename . '.*';\n }\n if ( $glob = glob( $fileToBeRemoved ) )\n foreach ( $glob as $filename )\n unlink( $filename );\n }", "function cleanDBonPurge() {\n\n // Clean Document GLPi\n $doc = new Document();\n $doc->getFromDB($this->fields['documents_id']);\n $doc->delete(['id' => $this->fields['documents_id']], true);\n }", "function deleteDocument() {\r\n \tglobal $synAbsolutePath, ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"};\r\n include_once(\"../../includes/php/utility.php\");\r\n\r\n $ext = $this->translate($this->getValue());\r\n $mat = $this->translatePath($this->mat);\r\n $filename = $this->createFilename(false);\r\n $documentRoot = $synAbsolutePath.'/';\r\n $fileToBeRemoved = $documentRoot.$mat.$filename.'*';\r\n foreach (glob($fileToBeRemoved) as $filename){\r\n unlink($filename);\r\n }\r\n }", "function deleteDownloadDocument($doc_id) {\n global $pdo;\n\n $document = getDownloadDocument($doc_id); // get information for file delete\n\n $statement = $pdo->prepare('DELETE FROM `download` WHERE `id` = :id');\n $statement->bindParam(\":id\", $doc_id);\n $statement->execute();\n\n deleteFile($document['file']); // delete file out of database\n}", "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $administrativedocument = Mage::getModel('bs_administrativedoc/administrativedocument');\n $administrativedocument->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_administrativedoc')->__('Administrative Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_administrativedoc')->__('There was an error deleting administrative document.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_administrativedoc')->__('Could not find administrative document to delete.')\n );\n $this->_redirect('*/*/');\n }", "public function multiDeleteDocumentAction() {\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n\n $sitepageitemofthedays = Engine_Api::_()->getItem('sitepage_itemofthedays', (int) $value);\n if (!empty($sitepageitemofthedays)) {\n $sitepageitemofthedays->delete();\n }\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'manage-day-items'));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Funcion para traer el listado de datos de cda_tipo_reporte
protected function listcdatiporeporte(){ $_listcdatiporeporte = CdaTipoReporte::find()->all(); return $_listcdatiporeporte; }
[ "public function getAllReportType()\n {\n // Set result\n $result = array();\n try\n {\n // Get DB Obj\n $dbObj = Thethao_Global::getDB('sport', 'slave');\n\n // Prepare SQL\n $stmt = $dbObj->prepare('CALL sp_sport_getReportType();');\n\n // Execute\n $stmt->execute();\n\n // Get format data\n $formatInstance = new Thethao_Business_Match_Metadata_ReportType();\n\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC))\n array_push($result, $formatInstance->init($row)->getFormatedData());\n\n // Close\n $stmt->closeCursor();\n\n // Release variables\n unset($stmt, $formatInstance);\n }\n catch (Exception $ex)\n {\n Thethao_Global::sendlog($ex, 1);\n }\n return $result;\n }", "public function consultarTipoIndicadores( ){\n\t\t\t$tipoIndicador = new TipoIndicador( $this->persistencia );\n\t\t\treturn $tipoIndicador->consultarTipoIndicador( );ca( );\n\t\t}", "public function _getReporteAll()\n {\n $proyecto = new Admin_Model_DbTable_Proyecto();\n $lista = $proyecto->_getAllExtendido('A');\n\n $respuesta = [];\n $data = [];\n $i = 0;\n foreach ($lista as $item) {\n $data['codigo'] = $item['proyectoid'];\n $data['cliente'] = $item['nombre_comercial'];\n $data['nombre'] = $item['nombre_proyecto'];\n $data['gerente'] = $item['gerente_proyecto'];\n $data['control_proyecto'] = $item['control_proyecto'];\n $data['control_documentario'] = $item['control_documentario'];\n $data['estado'] = $item['estado'];\n\n $respuesta[$i]['proyecto'] = $data;\n\n $rows = $this->_getLEReporte($data['codigo']);\n\n $respuesta[$i]['entregables'] = $rows;\n\n $i++;\n }\n\n $envio = [];\n $j = 0;\n\n for ($i=0; $i < sizeof($respuesta); $i++) {\n if (sizeof($respuesta[$i]['entregables']) != 0) {\n $envio[$j] = $respuesta[$i];\n $j++;\n }\n }\n\n return $envio;\n }", "public function get_company_expense_types() {\n\n\t\t$data['title'] = $this->Xin_model->site_title();\n\t\t$id = $this->uri->segment(4);\n\t\t\n\t\t$data = array(\n\t\t\t'company_id' => $id\n\t\t\t);\n\t\t$session = $this->session->userdata('username');\n\t\tif(!empty($session)){ \n\t\t\t$this->load->view(\"admin/accounting/get_company_expense_types\", $data);\n\t\t} else {\n\t\t\tredirect('admin/');\n\t\t}\n\t\t// Datatables Variables\n\t\t$draw = intval($this->input->get(\"draw\"));\n\t\t$start = intval($this->input->get(\"start\"));\n\t\t$length = intval($this->input->get(\"length\"));\n\t }", "public function get_expense_types() {\n\n\t\t$data['title'] = $this->Xin_model->site_title();\n\t\t$id = $this->uri->segment(4);\n\t\t\n\t\t$data = array(\n\t\t\t'company_id' => $id\n\t\t\t);\n\t\t$session = $this->session->userdata('username');\n\t\tif(!empty($session)){ \n\t\t\t$this->load->view(\"admin/accounting/get_expense_types\", $data);\n\t\t} else {\n\t\t\tredirect('admin/');\n\t\t}\n\t\t// Datatables Variables\n\t\t$draw = intval($this->input->get(\"draw\"));\n\t\t$start = intval($this->input->get(\"start\"));\n\t\t$length = intval($this->input->get(\"length\"));\n\t }", "function mostrarNroxTipoVisitas($desde, $hasta, $tipo, $coduse, $tvisita) {\r\n $sql = \"select r.coduse, r.atendido, count(atendido) AS cantidad\r\n FROM intrareportes as r JOIN aausdb01 as u ON u.coduse = r.coduse \t\t\r\n\t\tWHERE date(r.fecreg) BETWEEN '$desde' AND '$hasta' AND r.tipo = $tipo AND r.coduse = '$coduse' AND atendido = $tvisita GROUP BY r.coduse, r.atendido\";\r\n $result = $this->consultas($sql);\r\n $lista = $this->n_fila($result);\r\n return $lista;\r\n }", "public function reporteTrazabilidadData() {\n \n // return Datatables::of($trazabilidad->trazabilidad())->make(true);\n $trazabilidad = new tercerosHistorico;\n \n return Datatables::of($trazabilidad->trazabilidad())->make(true);\n }", "public static function tipoPago()\n\t{\n\t\t$model = array(\n\t\t\tarray('id' => 'E', 'value' => 'Efectivo'),\n\t\t\tarray('id' => 'D', 'value' => 'Depósito'),\n\t\t\tarray('id' => 'T', 'value' => 'Transferencia'),\n\t\t\tarray('id' => 'C', 'value' => 'Cheque'),\n\t\t);\n\t\treturn CHtml::listData($model, 'id', 'value');\n\t}", "function listarCuentaDocDetalle(){\n $this->objParam->defecto('ordenacion','id_cuenta_doc');\n $this->objParam->defecto('dir_ordenacion','asc');\n\n if(strtolower($this->objParam->getParametro('estado'))=='borrador'){\n $this->objParam->addFiltro(\"(cdoc.estado in (''borrador''))\");\n }\n if(strtolower($this->objParam->getParametro('estado'))=='validacion'){\n $this->objParam->addFiltro(\"(cdoc.estado not in (''borrador'',''contabilizado'',''finalizado'',''anulado''))\");\n }\n if(strtolower($this->objParam->getParametro('estado'))=='entregados'){\n $this->objParam->addFiltro(\"(cdoc.estado in (''contabilizado''))\");\n }\n if(strtolower($this->objParam->getParametro('estado'))=='finalizados'){\n $this->objParam->addFiltro(\"(cdoc.estado in (''finalizado'',''anulado''))\");\n }\n\n if($this->objParam->getParametro('id_gestion')!=''){\n $this->objParam->addFiltro(\"cdoc.id_gestion = \".$this->objParam->getParametro('id_gestion'));\n }\n\n $this->objParam->addParametro('id_funcionario_usu',$_SESSION[\"ss_id_funcionario\"]);\n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam,$this);\n $this->res = $this->objReporte->generarReporteListado('MODCuentaDoc','listarCuentaDocDetalle');\n } else{\n $this->objFunc=$this->create('MODCuentaDoc');\n\n $this->res=$this->objFunc->listarCuentaDocDetalle($this->objParam);\n }\n\n\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "function get_disertacion_reportes()\n {\n $this->db->select('*');\n $this->db->from('estudiante');\n $this->db->join('elabora','elabora.est_codigo=estudiante.est_codigo');\n $query=$this->db->get();\n return $query->result_array();\n\n }", "public function getDetalleDeReporteModel($data){\n\t\t//Consulta SQL para traer las horas de los alumnos del grupo seleccionado segun el id de la unidad\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT al.matricula as matricula, al.nombre as nombre, al.apellidos as apellidos, g.nombre as nombreGrupo, u.nombre as nombreUnidad, a.nombre as nombreActividad, sc.fecha as fecha, sc.hora as hora\nFROM sesion_cai as sc INNER JOIN actividades as a ON sc.id_actividad = a.id\nINNER JOIN unidades as u on u.id = sc.id_unidad\nINNER JOIN alumnos as al on al.id = sc.id_alumno\nINNER JOIN grupos as g on g.id = al.id_grupo\nWHERE sc.id_alumno = :id_alumno and sc.id_unidad = :id_unidad and sc.asistencia = 1\n\n\t\t\t\");\n\t\t//preparacion de parametros\n\t\t$stmt->bindParam(\":id_alumno\", $data['id_alumno']);\n\t\t$stmt->bindParam(\":id_unidad\", $data['id_unidad']);\n\t\t$stmt->execute(); //ejecucion de la consulta\n\t\treturn $stmt->fetchAll(); //se retorna en un array asociativo el resultado de la consulta\n\t\t$stmt->close();\n\t}", "public function list_tipo_calendario() {\n \n /*Recupera los tipos de calendario creados*/\n $query = $this->db->query(\"SELECT\n t.idTipoCalendario,\n t.descCalendario\n FROM tipo_calendario t\n WHERE activo = 'S'\");\n\n if ($query->num_rows() == 0) {\n\n return false;\n\n } else {\n\n return $query->result_array();\n\n }\n\n }", "public function getTypes(){\n $this->table = \"t_type_equipement\";\n $this->champs =['rowid','libelle','etat'];\n $this->condition=[\"etat =\"=>1];\n return $this->__select() ;\n }", "public function listar_exp_reportes_invest($filtros)\n {\n $tabla = '';\n /*$consulta = \"SELECT te.num_exp, tbf.fec_conocimiento, te.fecha_final_exp, te.nombre_investigado, tr.rango_descripcion, ttf.tipo_falta_descrip, tbf.fec_asignacion, te.fecha_final_i_pre, te.diligencias_invest, tep.est_proceso_descrip, te.fecha_final_i, tbf.fec_remision_secretaria, te.observacion FROM tbl_exp_usu teu INNER JOIN tbl_exp te ON teu.exp_id = te.exp_id INNER JOIN tbl_usuario tu ON te.investigador_id = tu.usu_id INNER JOIN tbl_rango tr ON tr.rango_id = te.rango_id INNER JOIN tbl_tipo_falta ttf ON ttf.tipo_falta_id = te.tipo_falta_id INNER JOIN tbl_articulo ta ON ta.tipo_falta_id = ttf.tipo_falta_id INNER JOIN tbl_bitacora_fechas tbf ON tbf.exp_id = te.exp_id INNER JOIN tbl_est_proceso tep ON te.est_proceso_id = tep.est_proceso_id WHERE te.investigador_id = $_SESSION[id_spm] \" . $filtros . \" GROUP BY te.exp_id, ta.n_art AND ta.art_descrip, ttf.tipo_falta_descrip\";*/\n $consulta=\"SELECT te.num_exp, tbf.fec_conocimiento, te.fecha_final_exp, te.nombre_investigado, tr.rango_descripcion, ttf.tipo_falta_descrip, tbf.fec_asignacion, te.fecha_final_i_pre, te.diligencias_invest, tep.est_proceso_descrip, te.fecha_final_i, tbf.fec_remision_secretaria, te.observacion, CONCAT(tu.usu_nombre, ' ', tu.usu_apellido) as nombre FROM tbl_exp te INNER JOIN tbl_usuario tu ON te.investigador_id = tu.usu_id INNER JOIN tbl_rango tr ON tr.rango_id = te.rango_id INNER JOIN tbl_tipo_falta ttf ON ttf.tipo_falta_id = te.tipo_falta_id INNER JOIN tbl_bitacora_fechas tbf ON tbf.exp_id = te.exp_id INNER JOIN tbl_est_proceso tep ON te.est_proceso_id = tep.est_proceso_id WHERE te.investigador_id = $_SESSION[id_spm] \" . $filtros ;\n $conexion = mainModel2::conectar();\n\n $datos = $conexion->query($consulta);\n $datos = $datos->fetchAll();\n\n $tabla .= '<div class=\"table-responsive\">\n <br><br>\n <table id=\"example1\" class=\"table table-striped table-bordered\">\n\n <thead style=\"vertical-align:middle;\">\n <tr>\n <th style=\"vertical-align:middle;\">N° EXPEDIENTE</th>\n <th style=\"vertical-align:middle;\">FECHA CONOCIMIENTO DIDADPOL</th>\n <th style=\"vertical-align:middle;\">FECHA FINAL EXPEDIENTE</th>\n <th style=\"vertical-align:middle;\">NOMBRE COMPLETO</th> \n <th style=\"vertical-align:middle;\">RANGO</th> \n <th style=\"vertical-align:middle;\">TIPO FALTA</th>\n <th style=\"vertical-align:middle;\">FECHA ASIGNACION DE EXPEDIENTE AL INVESTIGADOR</th>\n <th style=\"vertical-align:middle;\">FECHA FINALIZACION INVESTIGACIÓN PRELIMINAR</th>\n <th style=\"vertical-align:middle;\">DILIGENCIAS INVESTIGATIVAS PRACTICADAS</th>\n <th style=\"vertical-align:middle;\">ESTADO ACTUAL DEL PROCESO</th>\n <th style=\"vertical-align:middle;\">FECHA FINALIZACION INVESTIGACIÓN</th>\n <th style=\"vertical-align:middle;\">FECHA REMISION SECRETARIA</th>\n <th style=\"vertical-align:middle;\">OBSEVACIONES</th>\n </tr>\n </thead>\n <tbody>';\n\n foreach ($datos as $rows) {\n $tabla .= '<tr>\n <td style=\"font-size: 18px;\"><span class=\"badge badge badge-dark\">' . $rows['num_exp'] . '</span></td>';\n\n\n $tabla .= '<td class=\"text-center\">' . date('d/m/Y', strtotime($rows['fec_conocimiento'])) . '</td>\n <td class=\"text-center\">' . date('d/m/Y', strtotime($rows['fecha_final_exp'])) . '</td>';\n\n\n $tabla .= '<td class=\" text-center\">';\n $tabla .= '<span class=\"text-center\">' . $rows['nombre_investigado'] . '</span></td>';\n\n $tabla .= '<td class=\" text-center\">';\n $tabla .= '<span class=\"badge badge badge-dark\">' . $rows['rango_descripcion'] . '</span></td>';\n\n $tabla .= '<td class=\" text-center\">';\n $tabla .= '<span class=\"badge badge badge-dark\">' . $rows['tipo_falta_descrip'] . '</span></td>';\n\n $tabla .= '<td class=\" text-center\">';\n $tabla .= $rows['fec_asignacion'] . '</td>';\n\n $tabla .= '<td class=\" text-center\">';\n $tabla .= $rows['fecha_final_i_pre'] . '</td>';\n\n $tabla .= '<td class=\" text-center\">';\n $tabla .= $rows['diligencias_invest'] . '</td>';\n\n $tabla .= '<td class=\" text-center\">';\n $tabla .= $rows['est_proceso_descrip'] . '</td>';\n\n $tabla .= '<td class=\" text-center\">';\n $tabla .= $rows['fecha_final_i'] . '</td>';\n\n $tabla .= '<td class=\" text-center\">';\n $tabla .= $rows['fec_remision_secretaria'] . '</td>';\n\n $tabla .= '<td class=\" text-center\">';\n $tabla .= $rows['observacion'] . '</td>';\n\n $tabla .= '</tr>';\n }\n $tabla .= ' </tbody>\n </table>\n </div>';\n return $tabla;\n }", "public function BuscarDadosPag(){\n require_once('model/filiado_class.php');\n $class = new Acompanhante();\n $rs = $class->SelectDadosPag();\n \n return $rs;\n \n }", "public function TiposPaginas(){\n\t\t\ttry {\n\t\t\t\t$sql = \"SELECT * FROM tipo_pagina\";\n\t\t\t\t//Ejecución de consulta\n\t\t\t\t//$ejePagina = $con -> ejecutar($sql);\t\n\t\t\t\treturn $lista = $this -> con -> ejecutararray($sql);\t\t\t\t\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}", "function f_get_reportes_tabla($cod_tabla){\n\t\tglobal $db;\n\t\t$query =\"\n\t\tselect \t\tcod_reporte_tabla,\n\t\t\t\t\ttxt_nombre \n\t\tfrom \t\treporte_tabla\n\t\twhere\t\tind_activo \t= 1\n\t\tand\t\t\tcod_tabla \t= $cod_tabla\n\t\torder by\ttxt_nombre\";\n\t\t$cursor\t\t = $db->consultar($query);\t\n\t\treturn $cursor;\n\t}", "public function DA_ConsultarTablaTipoDocumento();", "protected function listcdatipofaltante(){\n $_listcdatipofaltante = CdaTipoInfoFaltante::find()->all();\n return $_listcdatipofaltante;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints example step on step AFTER event.
private function printStepOnAfterStepEvent(Formatter $formatter, Event $event) { if (!$event instanceof AfterStepTested) { return; } $this->stepPrinter->printStep($formatter, $this->example, $event->getStep(), $event->getTestResult()); $this->stepSetupPrinter->printTeardown($formatter, $event->getTeardown()); }
[ "public function afterStep(StepEvent $event) {\n\t\t$this->printStep(\n\t\t\t$event->getStep(), $event->getResult(), $event->getDefinition(), $event->getSnippet(), $event->getException()\n\t\t);\n\t}", "public function afterStep($event)\n {\n if ($this->inBackground && $this->isBackgroundPrinted) {\n return;\n }\n\n if (!$this->inBackground && $this->inOutlineExample) {\n $this->delayedStepEvents[] = $event;\n return;\n }\n\n $context = $event->getContext();\n if (isset($context->override_text)) {\n \t$this->override_text = $context->override_text;\n \t$context->override_text = NULL;\n }\n\n $this->printStep(\n $event->getStep(),\n $event->getResult(),\n $event->getDefinition(),\n $event->getSnippet(),\n $event->getException()\n );\n }", "public function afterStep(StepEvent $event)\n {\n if ($this->inBackground && $this->isBackgroundPrinted) {\n return;\n }\n\n if (!$this->inBackground && $this->inOutlineExample) {\n $this->delayedStepEvents[] = $event;\n\n return;\n }\n\n $this->printStep(\n $event->getStep(),\n $event->getResult(),\n $event->getDefinition(),\n $event->getSnippet(),\n $event->getException()\n );\n }", "public function afterOutlineExample(OutlineExampleEvent $event)\n {\n if (StepEvent::FAILED === $event->getResult()) {\n $outline = $event->getOutline();\n $examples = $outline->getExamples();\n $lines = $examples->getRowLines();\n $this->writeln($outline->getFile().':'.$lines[$event->getIteration() + 1]);\n }\n }", "public function renderAfterStep(BehatFormatter $obj): string;", "private function printExampleFooterOnAfterExampleEvent(Formatter $formatter, Event $event, $eventName)\n {\n if (!$event instanceof AfterScenarioTested || ExampleTested::AFTER !== $eventName) {\n return;\n }\n\n $this->examplePrinter->printFooter($formatter, $event->getTestResult());\n $this->exampleSetupPrinter->printTeardown($formatter, $event->getTeardown());\n\n $this->example = null;\n }", "public function afterOutlineExample(OutlineExampleEvent $event)\n {\n $this->fireHooks('afterScenario', $event);\n }", "public function collectBehatStepResult(AfterStepTested $event)\r\n {\r\n $this->behatStepResults[] = ['testResult' => $event->getTestResult(), 'step' => $event->getStep()];\r\n }", "protected function outputSpecificStep() {}", "private function printExampleRowOnAfterExampleEvent(Formatter $formatter, Event $event, $eventName)\n {\n if (!$event instanceof AfterScenarioTested || ExampleTested::AFTER !== $eventName) {\n return;\n }\n\n $example = $event->getScenario();\n\n $this->exampleSetupPrinter->printSetup($formatter, $this->exampleSetup);\n\n foreach ($this->stepBeforeTestedEvents as $beforeEvent) {\n $this->stepSetupPrinter->printSetup($formatter, $beforeEvent->getSetup());\n }\n\n $this->exampleRowPrinter->printExampleRow($formatter, $this->outline, $example, $this->stepAfterTestedEvents);\n\n foreach ($this->stepAfterTestedEvents as $afterEvent) {\n $this->stepSetupPrinter->printTeardown($formatter, $afterEvent->getTeardown());\n }\n\n $this->exampleSetupPrinter->printTeardown($formatter, $event->getTeardown());\n\n $this->exampleSetup = null;\n $this->stepBeforeTestedEvents = array();\n $this->stepAfterTestedEvents = array();\n }", "public function afterStep(StepEvent $event)\n {\n $this->collectStepStats($event);\n }", "private function captureStepStatsOnAfterEvent(Event $event)\n {\n if (!$event instanceof AfterStepTested) {\n return;\n }\n\n $result = $event->getTestResult();\n $step = $event->getStep();\n $text = sprintf('%s %s', $step->getKeyword(), $step->getText());\n $exception = $this->getStepException($result);\n\n $path = $this->getStepPath($event, $exception);\n $error = $exception ? $this->exceptionPresenter->presentException($exception) : null;\n $stdOut = $result instanceof ExecutedStepResult ? $result->getCallResult()->getStdOut() : null;\n\n $resultCode = $result->getResultCode();\n $stat = new StepStatV2($this->scenarioTitle, $this->scenarioPath, $text, $path, $resultCode, $error, $stdOut);\n\n $this->statistics->registerStepStat($stat);\n }", "public function afterOutlineExample(OutlineExampleEvent $event)\n {\n $this->collectScenarioResult($event->getResult());\n }", "private function printHeaderOnAfterExampleEvent(Formatter $formatter, Event $event, $eventName)\n {\n if (!$event instanceof AfterScenarioTested || ExampleTested::AFTER !== $eventName) {\n return;\n }\n\n if ($this->headerPrinted) {\n return;\n }\n\n $feature = $event->getFeature();\n $stepTestResults = $this->getStepTestResults();\n\n $this->tablePrinter->printHeader($formatter, $feature, $this->outline, $stepTestResults);\n $this->headerPrinted = true;\n }", "public function onFinishing(Step $step): void\n {\n }", "public function printStep(Event $event)\n {\n $runner = $event->getSubject();\n $step = $runner->getStep();\n\n if (\n // Not in scenario background\n !(null !== $runner->getParentRunner() &&\n $runner->getParentRunner() instanceof BackgroundRunner &&\n null !== $runner->getParentRunner()->getParentRunner() &&\n $runner->getParentRunner()->getParentRunner() instanceof ScenarioRunner) &&\n\n // Not in outline\n !(null !== $runner->getParentRunner() &&\n null !== $runner->getParentRunner()->getParentRunner() &&\n $runner->getParentRunner()->getParentRunner() instanceof ScenarioOutlineRunner)\n ) {\n // Print step description\n $description = sprintf(' %s %s', $step->getType(), $step->getText());\n $this->output->write(sprintf('<%s>%s</%s>',\n $runner->getStatus(), $description, $runner->getStatus()\n ));\n\n // Print definition path if found one\n if (null !== $runner->getDefinition()) {\n $this->printLineSourceComment(\n mb_strlen($description)\n , $runner->getDefinition()->getFile()\n , $runner->getDefinition()->getLine()\n );\n } else {\n $this->output->writeln('');\n }\n\n // print step arguments\n if ($step->hasArguments()) {\n foreach ($step->getArguments() as $argument) {\n if ($argument instanceof PyStringElement) {\n $this->output->write(sprintf(\"\\033[%sm%s\\033[0m\",\n $this->getStatusColorCode($runner->getStatus()),\n $this->getPyString($argument, 6),\n $this->getStatusColorCode($runner->getStatus())\n ), true, 1);\n } elseif ($argument instanceof TableElement) {\n $this->output->write(sprintf(\"\\033[%sm%s\\033[0m\",\n $this->getStatusColorCode($runner->getStatus()),\n $this->getTableString($argument, 6),\n $this->getStatusColorCode($runner->getStatus())\n ), true, 1);\n }\n }\n }\n\n // Print step exception\n if (null !== $runner->getException()) {\n if ($this->verbose) {\n $error = (string) $runner->getException();\n } else {\n $error = $runner->getException()->getMessage();\n }\n $this->output->write(sprintf(\" \\033[%sm%s\\033[0m\"\n , 'failed' === $runner->getStatus() ? '31' : '33'\n , strtr($error, array(\"\\n\" => \"\\n \"))\n ), true, 1);\n }\n }\n }", "public function printLastResponseOnError(AfterStepScope $event)\n {\n if ($this->fail && !$event->getTestResult()->isPassed()) {\n $this->iSaveScreenshot(true);\n }\n }", "public function renderAfterStep($obj)\n {\n $feature = $obj->getCurrentFeature();\n $scenario = $obj->getCurrentScenario();\n\n $steps = $scenario->getSteps();\n $step = end($steps); //needed because of strict standards\n\n //path displayed only if available (it's not available in undefined steps)\n $strPath = '';\n if (null !== $step->getDefinition()) {\n $strPath = $step->getDefinition()->getPath();\n }\n\n $stepResultClass = '';\n if ($step->isPassed()) {\n $stepResultClass = 'passed';\n }\n if ($step->isFailed()) {\n $stepResultClass = 'failed';\n }\n if ($step->isSkipped()) {\n $stepResultClass = 'skipped';\n }\n if ($step->isPending()) {\n $stepResultClass = 'pending';\n }\n\n $arguments = '';\n $argumentType = $step->getArgumentType();\n\n if ('PyString' == $argumentType) {\n $arguments = '<br><pre class=\"argument\">'.htmlentities($step->getArguments()).'</pre>';\n }\n\n if ('Table' == $argumentType) {\n $arguments = '<br><pre class=\"argument\">'.$this->renderTableNode($step->getArguments()).'</pre>';\n }\n\n $print = '\n <li class=\"'.$stepResultClass.'\">\n <div class=\"step\">\n <span class=\"keyword\">'.$step->getKeyWord().' </span>\n <span class=\"text\">'.htmlentities($step->getText()).' </span>\n <span class=\"path\">'.$strPath.'</span>'\n .$arguments.'\n </div>';\n $exception = $step->getException();\n if (!empty($exception)) {\n $print .= '\n <pre class=\"backtrace\">'.$step->getException().'</pre>';\n if ($scenario->getRelativeScreenshotPath()) {\n $print .= '<a href=\"'.$scenario->getRelativeScreenshotPath().'\">Screenshot</a>';\n }\n }\n $print .= '\n </li>';\n\n return $print;\n }", "public function renderAfterStep($obj)\r\n {\r\n return '';\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WP Super Edit Default User Sets default user settings from most recent TinyMCE scan, sets initial options, and removes unnecessary WordPress options
function wp_super_edit_set_user_default() { global $wp_super_edit, $wp_super_edit_tinymce_default; // Output buffering to get default TinyMCE init - Since it's the core editor we want the DFW(distraction free writing) ob_start(); if ( function_exists( 'wp_editor' ) ) wp_editor( '', 'null', array( 'dfw' => true ) ); else wp_tiny_mce(); ob_end_clean(); $wp_super_edit->register_user_settings( 'wp_super_edit_default', 'Default Editor Settings', $wp_super_edit_tinymce_default, 'single' ); $wp_super_edit->set_option( 'tinymce_scan', $wp_super_edit_tinymce_default ); $wp_super_edit->set_option( 'management_mode', 'single' ); /** * Remove old options for versions 2.2 */ delete_option( 'wp_super_edit_tinymce_scan' ); /** * Remove old options for versions 1.5 */ delete_option( 'superedit_options' ); delete_option( 'superedit_buttons' ); delete_option( 'superedit_plugins' ); }
[ "function hook_twitter_user_settings_alter(&$output) {}", "public function save_defaults() {\n\n $tmp_options = $this->options;\n\n if ( ! empty( $this->pre_fields ) ) {\n foreach ( $this->pre_fields as $field ) {\n if ( ! empty( $field['id'] ) ) {\n $this->options[$field['id']] = ( isset( $this->options[$field['id']] ) ) ? $this->options[$field['id']] : $this->get_default( $field );\n }\n }\n }\n\n if ( $this->args['save_defaults'] && empty( $this->args['show_in_customizer'] ) && empty( $tmp_options ) ) {\n\n if ( $this->args['database'] === 'theme_mod' ) {\n set_theme_mod( $this->unique, $this->options );\n } else {\n update_option( $this->unique, $this->options );\n }\n\n }\n\n }", "public function register_user_settings() {\n\t\tregister_setting( CPT_ONOMIES_OPTIONS_PAGE . '-custom-post-types', 'custom_post_type_onomies_custom_post_types', array( $this, 'update_plugin_options_custom_post_types' ) );\n\t\tregister_setting( CPT_ONOMIES_OPTIONS_PAGE . '-other-custom-post-types', 'custom_post_type_onomies_other_custom_post_types', array( $this, 'update_validate_plugin_options_other_custom_post_types' ) );\n\t}", "function wp_super_edit_tinymce_filter( $initArray ) {\n\tglobal $wp_super_edit;\n\n\tif ( !$wp_super_edit->is_installed ) return $initArray;\n\n\t$initArray = $wp_super_edit->tinymce_settings( $initArray );\n\t\n\t$initArray['relative_urls'] = false;\n\t$initArray['remove_script_host'] = false;\n\t$initArray['convert_urls'] = false;\n\t\n\treturn $initArray;\n}", "function wpml_tm_reset_user_options( array $options ) {\n\t$options[] = WPML_TM_Menus_Management::SKIP_TM_WIZARD_META_KEY;\n\n\treturn $options;\n}", "public function default_options() {\n\t\t\n\t\t$settings = new \\stdClass();\n\t\t\n\t\t$admin = get_user_by( 'email', get_option( 'admin_email' ) );\n\t\t\n\t\tif ( ! isset( $admin->user_email ) ) {\n\t\t\t\n\t\t\t// Default object to avoid warning notices\n\t\t\t$admin = new \\stdClass();\n\t\t\t$admin->user_email = 'nobody@example.com';\n\t\t\t$admin->display_name = 'Not Applicable';\n\t\t}\n\t\t\n\t\t$settings->loaded = false;\n\t\t$settings->hideFuture = 0; // 'hidden' (Show them)\n\t\t$settings->showAdmin = true; // 'hidden' (Show them)\n\t\t$settings->includeFeatured = false; // Show featured image for a sequence member in post listing\n\t\t$settings->lengthVisible = 1; //'lengthVisible'\n\t\t$settings->sortOrder = SORT_ASC; // 'sortOrder'\n\t\t$settings->delayType = 'byDays'; // 'delayType'\n\t\t$settings->allowRepeatPosts = false; // Whether to allow a post to be repeated in the sequence (with different delay values)\n\t\t$settings->showDelayAs = E20R_SEQ_AS_DAYNO; // How to display the time until available\n\t\t$settings->previewOffset = 0; // How many days into the future the sequence should allow somebody to see.\n\t\t$settings->startWhen = 0; // startWhen == immediately (in current_time('timestamp') + n seconds)\n\t\t$settings->sendNotice = 1; // sendNotice == Yes\n\t\t$settings->noticeTemplate = 'new_content.html'; // Default plugin template\n\t\t$settings->noticeSendAs = E20R_SEQ_SEND_AS_SINGLE; // Send the alert notice as one notice per message.\n\t\t$settings->noticeTime = '00:00'; // At Midnight (server TZ)\n\t\t$settings->noticeTimestamp = current_time( 'timestamp' ); // The current time (in UTC)\n\t\t$settings->excerptIntro = __( 'A summary of the post follows below:', \"e20r-sequences\" );\n\t\t$settings->replyto = apply_filters( 'e20r-sequence-default-sender-email', $admin->user_email ); // << Update Name\n\t\t$settings->fromname = apply_filters( 'e20r-sequence-default-sender-name', $admin->display_name ); // << Updated Name!\n\t\t$settings->subject = __( 'New Content ', \"e20r-sequences\" );\n\t\t$settings->dateformat = __( 'm-d-Y', \"e20r-sequences\" ); // Using American MM-DD-YYYY format. << Updated name!\n\t\t$settings->trackGoogleAnalytics = false; // Whether to use Google analytics to track message open operations or not\n\t\t$settings->gaTid = null; // The Google Analytics ID to use (TID)\n\t\t\n\t\t$this->options = $settings; // Save as options for this sequence\n\t\t\n\t\treturn $settings;\n\t}", "function initalizePasswordForcedChangeSettings() {\r\n\r\n }", "function wp_super_edit_buttons_ui() {\n\tglobal $userdata, $wp_super_edit;\n\t\n\t$user = 'wp_super_edit_default';\n\t\n\tswitch ( $wp_super_edit->management_mode ) {\n\t\tcase 'single':\n\t\t\t$user = 'wp_super_edit_default';\n\t\t\tbreak;\n\t\tcase 'roles':\n\t\t\tif ( isset( $_REQUEST['wp_super_edit_manage_role'] ) )\n\t\t\t\t$user = $_REQUEST['wp_super_edit_manage_role'];\n\n\t\t\tif ( isset( $_REQUEST['wp_super_edit_user'] ) ) \n\t\t\t\t$user = $_REQUEST['wp_super_edit_user'];\n\t\t\t\n\t\t\tbreak;\n\t\tcase 'users':\n\t\t\tif ( $wp_super_edit->user_profile == true ) $user = $userdata->user_login; \n\t\t\tbreak;\t\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\t\n\tif ( !$wp_super_edit->check_registered( 'user', $user ) ) {\t\t\t\n\t\t$wp_super_edit->register_new_user( $user );\n\t}\n\t\n\t$current_user = $wp_super_edit->get_user_settings_ui( $user );\n\t\t\t\t\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'tag_type' => 'open',\n\t\t'id' => 'wp_super_edit_settings'\n\t) );\t\t\t\n\t\n\tif ( !$wp_super_edit->user_profile ) wp_super_edit_user_management_ui();\n\t\t\n\t$hidden_form_user = wp_super_edit_html_tag( array(\n\t\t'tag' => 'input',\n\t\t'tag_type' => 'single',\n\t\t'type' => 'hidden',\n\t\t'id' => 'i_wp_super_edit_user',\n\t\t'name' => 'wp_super_edit_user',\n\t\t'value' => $user,\n\t\t'return' => true\n\t) );\n\t\n\t$hidden_form_items = wp_super_edit_html_tag( array(\n\t\t'tag' => 'input',\n\t\t'tag_type' => 'single',\n\t\t'type' => 'hidden',\n\t\t'id' => 'i_wp_super_edit_separators',\n\t\t'name' => 'wp_super_edit_separators',\n\t\t'value' => '',\n\t\t'return' => true\n\t) );\n\t\n\tfor ( $button_row = 1; $button_row <= 4; $button_row += 1) {\n\t\n\t\t$hidden_form_items .= wp_super_edit_html_tag( array(\n\t\t\t'tag' => 'input',\n\t\t\t'tag_type' => 'single',\n\t\t\t'type' => 'hidden',\n\t\t\t'id' => 'i_wp_super_edit_row_' . $button_row,\n\t\t\t'name' => 'wp_super_edit_row_' . $button_row,\n\t\t\t'value' => '',\n\t\t\t'return' => true\n\t\t) );\n\t\t\n\t}\n\t\n\t$action_options = array(\n\t\t'update' => __( 'Update Buttons', 'wp-super-edit' ),\n\t\t'reset_default' => __( 'Reset to Defaults', 'wp-super-edit' ),\n\t\t'set_default' => __( 'Set as Default', 'wp-super-edit' )\n\t);\n\n\tif ( $user == 'wp_super_edit_default' ) {\n\t\tunset( $action_options['set_default'] );\n\t\tunset( $action_options['reset_default'] );\n\t}\n\tif ( $wp_super_edit->user_profile ) unset( $action_options['set_default'] );\n\n\t\n\t$set_default_controls = wp_super_edit_form_select( 'wp_super_edit_action_control', $action_options, 'update', true );\t\t\t\n\n\t$submit_button = wp_super_edit_submit_button( __( 'Update Button Settings For: ', 'wp-super-edit' ) . $current_user['user_nicename'], $hidden_form_user . $hidden_form_items , true, true );\t\t\t\t\t\t\t\t\n\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'tag_type' => 'open',\n\t\t'id' => 'wp_super_edit_button_save'\n\t) );\n\n\twp_super_edit_form( 'buttons', $submit_button . $set_default_controls, false, 'submitButtonConfig();' );\n\t\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'tag_type' => 'close'\n\t) );\n\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'tag_type' => 'open',\n\t\t'id' => 'button_controls'\n\t) );\n\t\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'tag_type' => 'open',\n\t\t'id' => 'button_rows'\n\t) );\n\n\t\n\tfor ( $button_row = 1; $button_row <= 4; $button_row += 1) {\n\t\t\n\t\twp_super_edit_html_tag( array(\n\t\t\t'tag' => 'h3',\n\t\t\t'class' => 'row_title',\n\t\t\t'tag_content' => __( 'Editor Button Row ', 'wp-super-edit' ) . $button_row\n\t\t) );\n\n\t\t\n\t\twp_super_edit_html_tag( array(\n\t\t\t'tag' => 'ul',\n\t\t\t'tag_type' => 'open',\n\t\t\t'id' => 'row_section_' . $button_row,\n\t\t\t'class' => 'row_section'\n\t\t) );\t\t\t\t\n\t\t\n\t\tforeach( $current_user['buttons'][$button_row] as $button_num => $button ) {\n\n\t\t\t$separator = false;\n\t\t\t\n\t\t\tif ( isset( $current_user['buttons'][$button_row][$button_num +1] ) && $current_user['buttons'][$button_row][$button_num +1] == '|' ) $separator = true;\n\t\t\t\n\t\t\tif ( $button == '|' ) continue;\n\n\t\t\tif ( !$wp_super_edit->check_registered( 'button', $button ) ) {\n\t\t\t\t$button_not_registered[] = $button;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\tif ( !isset( $wp_super_edit->active_buttons[$button] ) ) continue;\n\t\t\t\n\t\t\twp_super_edit_make_button_ui( $wp_super_edit->active_buttons[$button], $separator );\n\t\t\t\n\t\t\t$button_used[] = $button;\n\t\t\n\t\t}\n\t\t\n\t\twp_super_edit_html_tag( array(\n\t\t\t'tag' => 'ul',\n\t\t\t'tag_type' => 'close'\n\t\t) );\n\n\t}\n\t\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'tag_type' => 'close'\n\t) );\n\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'tag_type' => 'open',\n\t\t'id' => 'disabled_buttons'\n\t) );\n\t\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'h3',\n\t\t'class' => 'row_title',\n\t\t'tag_content' => __( 'Disabled Buttons', 'wp-super-edit' )\n\t) );\n\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'ul',\n\t\t'tag_type' => 'open',\n\t\t'id' => 'row_section_disabled',\n\t\t'class' => 'row_section'\n\t) );\n\t\n\tforeach ( $wp_super_edit->active_buttons as $button => $button_options ) {\n\t\tif ( in_array( $button, $button_used ) ) continue;\n\t\t\n\t\twp_super_edit_make_button_ui( $wp_super_edit->active_buttons[$button] );\n\n\t}\n\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'ul',\n\t\t'tag_type' => 'close'\n\t) );\t\t\t\t\t\t\t\n\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'tag_type' => 'close'\n\t) );\n\t\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'br',\n\t\t'class' => 'clear',\n\t\t'tag_type' => 'single'\n\t) );\t\t\t\n\t\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'tag_type' => 'close'\n\t) );\t\t\t\n\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'tag_type' => 'close'\n\t) );\n\t\n\twp_super_edit_html_tag( array(\n\t\t'tag' => 'div',\n\t\t'id' => 'wp_super_edit_dialog',\n\t\t'class' => 'hidden'\n\t) );\n\n}", "function people_options_metabox_defaults() {\n return array(\n 'distinct_title' => '',\n 'public_specialiy' => '',\n 'endowed_chair' => '',\n 'people-hero-img' => '',\n 'facebook',\n 'linkedin',\n 'instagram',\n 'twitter'\n );\n}", "function shivanode_wysiwyg_editor_settings_alter(&$settings, $context) {\r\n // Each editor has its own collection of native settings that may be extended\r\n // or overridden. Please consult the respective official vendor documentation\r\n // for details.\r\n if ($context['profile']->editor == 'tinymce') {\r\n // Supported values to JSON data types.\r\n $settings['cleanup_on_startup'] = TRUE;\r\n }\r\n}", "function sfa_restore_toolbar_defaults()\r\n{\r\n\t# Load up current from sfmeta (User)\r\n\t$tbmetauser = sf_get_sfmeta('tinymce_toolbar', 'user');\r\n\t$tbmetadefault = sf_get_sfmeta('tinymce_toolbar', 'default');\r\n\t\r\n\tsf_update_sfmeta('tinymce_toolbar', 'user', $tbmetadefault[0]['meta_value'], $tbmetauser[0]['meta_id']);\r\n\r\n\t$mess= __('Toolbar Restored', \"sforum\").$mess;\r\n\tsfa_message($mess);\r\n\r\n\treturn;\r\n}", "function setup_tinymce_plugin() {\n \n // Check if the logged in WordPress User can edit Posts or Pages\n // If not, don't register our TinyMCE plugin\n \n if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {\n return;\n }\n \n // Check if the logged in WordPress User has the Visual Editor enabled\n // If not, don't register our TinyMCE plugin\n if ( get_user_option( 'rich_editing' ) !== 'true' ) {\n return;\n }\n \n // Setup some filters\n add_filter( 'mce_external_plugins', array( &$this, 'add_tinymce_plugin' ) );\n add_filter( 'mce_buttons', array( &$this, 'add_tinymce_toolbar_button' ) );\n \n }", "function set_user_settings_options($args) {\n\n require_once MIDRUB_BASE_PATH . 'inc/components/user_options.php';\n\n md_set_user_component_options($args);\n \n }", "protected function setUpTinyMcePlugin()\n {\n if (!current_user_can('edit_posts') &&\n !current_user_can('edit_pages') &&\n !get_user_option('rich_editing')) {\n return;\n }\n\n add_filter('mce_external_plugins', array($this, 'addTinyMcePlugin'));\n add_filter('mce_buttons', array($this, 'addTinyMceButtons'));\n add_filter('mce_css', array($this, 'addTinyMceCss'));\n }", "public function initialize_settings() {\n\t\t\n\t\t$default_settings = array();\n\t\tforeach ( $this->settings as $id => $setting ) {\n\t\t\tif ( $setting['type'] != 'heading' )\n\t\t\t\t$default_settings[$id] = $setting['std'];\n\t\t}\n\t\t\n\t\tupdate_option( 'mytheme_options', $default_settings );\n\t\t\n\t}", "private function _default_settings() {\n $this->settings = $this->default_settings;\n $this->remote_auth_settings = $this->default_remote_auth_settings;\n\n $this->_update_settings();\n }", "function save_default_values(){\r\n /* only do it on pages where we save as options and we have fields */\r\n if( !empty( $this->fields ) && !post_type_exists($this->page[0]) ){\r\n foreach( $this->fields as $field ){\r\n if( !empty( $field['default'] ) ){\r\n /* see if we have an option with this name, if we have don't do anything */\r\n $field_saved_value = get_option( $field['id'] );\r\n if( empty( $field_saved_value ) ){\r\n update_option( $field['id'], $field['default'] );\r\n }\r\n }\r\n }\r\n }\r\n }", "function bbp_get_default_user_options()\n{\n}", "private function user_settings() {\n\n\t\t$controller = new Mlp_Redirect_User_Settings();\n\t\t$controller->setup();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find Proxy for a meeting by Principal (User).
public function findOneByPrincipal(Meeting $meeting, User $principal) { return parent::findOneBy(['meeting' => $meeting, 'principal' => $principal]); }
[ "function targetUser() {\n\t\treturn $this->POD->getPerson(array('id'=>$this->targetUserId));\n\t}", "private function _findUser()\n\t{\n\t\t$id = $this->_getParam('id');\n\t\t$username = $this->_getParam('username');\n\n\t\tif (!empty($id)) {\n\t\t\t$user = Doctrine_Core::getTable('Models_Main_Personnel')->findOneByID_number($id);\n\t\t} elseif (!empty($username)) {\n\t\t\t$user = Doctrine_Core::getTable('Models_Main_Personnel')->findOneByUsername($username);\n\t\t}\n\n\t\treturn $user;\n\t}", "public function getAuthenticatedMember();", "public function getConversationPartner() {\n\n $user = Auth::user();\n\n $users = $this->users;\n\n $index = 0;\n foreach ($users as $participant) {\n if ($participant->name === $user->name) break;\n $index++;\n }\n\n if ($index === 1) return $users[0];\n return $users[1];\n }", "public function getDelegateByUsername($username){\n $command = new Command($this->host, self::DELEGATES_GET,\"GET\", $this->enableCache, $this->cacheLifetime, $this->cacheFolder);\n $command->setParam(\"username\", $username);\n $command->execute();\n return $command->getData(\"delegate\");\n }", "function limit_login_guess_proxy() {\n\treturn isset($_SERVER[LIMIT_LOGIN_PROXY_ADDR])\n\t\t? LIMIT_LOGIN_PROXY_ADDR : LIMIT_LOGIN_DIRECT_ADDR;\n}", "public function getFindPerson()\n\t{\n\t\t$this->_makeRequest(Wp_WhitePages_Model_Api::API_REQUEST_METHOD_FINDPERSON);\n\t\treturn $this->_result;\n\t}", "public function getUserInstance()\n {\n $entity = null;\n\n if ($this instanceof \\User) {\n $entity = $this;\n } elseif ($this instanceof \\PortalUser) {\n $this->setPortalId();\n $entity = $this->getRelated('User');\n } else {\n $entity = $this->getPortalUser()->getRelated('User');\n }\n\n $this->checkJoin($this, $entity);\n\n return $entity;\n }", "public function lookupFromProxyAddresses($proxyAddress) {\n\t\t\n\t\t// Use the Sync to WordpPress username and password since anonymous bind can't search.\n\t\t$connectionDetails = new NextADInt_Ldap_ConnectionDetails();\n\t\t$connectionDetails->setUsername($this->configuration->getOptionValue(NextADInt_Adi_Configuration_Options::SYNC_TO_WORDPRESS_USER));\n\t\t$connectionDetails->setPassword($this->configuration->getOptionValue(NextADInt_Adi_Configuration_Options::SYNC_TO_WORDPRESS_PASSWORD));\n\t\t\n\t\t// LDAP_Connection\n\t\t$this->ldapConnection->connect($connectionDetails);\n\n\t\t// check if domain controller is available\n\t\t$domainControllerIsAvailable = $this->ldapConnection->checkPorts();\n\t\t\n\t\tif($domainControllerIsAvailable) {\n\t\t\t$samaccountname = $this->ldapConnection->findByProxyAddress($proxyAddress);\n\t\t\n\t\t\t// If this email address wasn't specified in anyone's proxyAddresses attributes, just return the original value.\n\t\t\tif($samaccountname === false) {\n\t\t\t\treturn $proxyAddress;\n\t\t\t}\n\t\t}\n\n\t\t$this->logger->info(\"Found sAMAccountName '\" . $samaccountname . \"' for proxy address '\" . $proxyAddress . \"'.\");\n\t\t\n\t\t// Return the account we looked up.\n\t\treturn $samaccountname;\t\t\n\t}", "function user_match(){\n\t\t# Try to find a matching wp user for the now-authenticated user's oauth identity\n\t\t$matched_user = $this->match_wp_user($this->identity);\n\n\t\t# No WP user by provider id, search by provider email\n\t\tif( empty($matched_user) && ISSET($this->identity) ){\n\t\t\t$matched_user = $this->match_wp_user_by_email($this->identity);\n\n\t\t\t# If we find a match with this method then we need to link the account\n\t \tif(!empty($matched_user)) $this->link_identity($matched_user->ID);\n\t\t}\n\n\t\treturn $matched_user;\n\t}", "final protected function getPagingViewer() {\n if ($this->internalPaging) {\n return PhabricatorUser::getOmnipotentUser();\n } else {\n return $this->getViewer();\n }\n }", "public function retrieveProxy( $proxyName );", "public function getProxy()\n\t{\n\t\treturn $this->proxyAuth;\n\t}", "public function getPersonIdProxy()\n {\n return $this->personIdProxy;\n }", "public function findRelatedAttendee()\n {\n $result = null;\n\n $calendar = $this->getCalendar();\n if (!$calendar) {\n return $result;\n }\n\n $ownerUser = $calendar->getOwner();\n if (!$ownerUser) {\n return $result;\n }\n\n foreach ($this->getAttendees() as $attendee) {\n if ($attendee->isUserEqual($ownerUser)) {\n $result = $attendee;\n break;\n }\n }\n\n return $result;\n }", "public function getProxyHost();", "function getMessageOwner(\\ezcMail $mail, Model\\UserRepository $usersRepo)\n{\n $emails = Helper\\Email::getTracedRecipients($mail);\n\n // transform all emails to lowercase\n foreach ($emails as &$email) {\n $email = strtolower($email);\n }\n\n $unique = array_unique($emails);\n $users = $usersRepo->findAllByMailboxes($unique);\n\n // map of users to their mailboxes\n $m2u = [];\n foreach ($users as $user) {\n $mailbox = strtolower($user['mailbox']);\n $m2u[$mailbox] = $user;\n }\n\n // find first recipient that is our user\n $user = null;\n foreach ($emails as $email) {\n if (isset($m2u[$email])) {\n $user = $m2u[$email];\n break;\n }\n }\n\n return $user;\n}", "function os2dagsorden_meeting_views_bullet_point_page_access() {\n $q = explode(\"/\", $_GET['q']);\n\n $meeting_id = $q[1];\n $bullet_point_id = $q[3];\n\n return os2dagsorden_access_helper_check_user_has_access_to_bullet_point($meeting_id, $bullet_point_id);\n}", "function getuserbysocket($socket){\n $found=null;\n foreach($this->users as $user){\n if($user->socket==$socket)\n\t\t { \n\t\t $found=$user; \n\t\t break; \n\t\t }\n }\n return $found;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deliveryorderAdditionalTextblocks( ) : Write addional text blocks
private function deliveryorderAdditionalTextblocks() { $additionalTextblocks = $this->confPdf[ 'deliveryorder.' ][ 'content.' ][ 'additionaltextblocks.' ]; // LOOP : additional textblocks foreach ( array_keys( ( array ) $additionalTextblocks ) as $key ) { if ( !stristr( $key, '.' ) ) { continue; } $this->writeTextblock( $additionalTextblocks[ $key ], 'deliveryorder.additionaltextblocks.' . $key ); } // LOOP : additional textblocks }
[ "private function invoiceAdditionalTextblocks()\n {\n $additionalTextblocks = $this->confPdf[ 'invoice.' ][ 'content.' ][ 'additionaltextblocks.' ];\n\n// LOOP : additional textblocks\n foreach ( array_keys( ( array ) $additionalTextblocks ) as $key )\n {\n if ( !stristr( $key, '.' ) )\n {\n continue;\n }\n\n $this->writeTextblock( $additionalTextblocks[ $key ], 'invoice.additionaltextblocks.' . $key );\n }\n// LOOP : additional textblocks\n }", "private function buildTextBlock()\n {\n //====================================================================//\n // Into Text Block\n $this->blocksFactory()->addTextBlock('This widget show only TEXT!!');\n }", "public function wrap_plain_textblocks( $text )\n\t\t{\n\t\t\t$text_nodes = preg_split(\"/\". get_shortcode_regex() .\"/s\", $text );\n\t\t\t\n\t\t\tforeach( $text_nodes as $node ) \n\t\t\t{\t\t\t\t\n\t if( strlen( trim( $node ) ) == 0 || strlen( trim( strip_tags( $node) ) ) == 0) \n\t {\n\t //$text = preg_replace(\"/(\".preg_quote($node, '/').\"(?!\\[\\/))/\", '', $text);\n\t }\n\t else\n\t {\n\t\t\t\t\t$text = preg_replace( \"/(\" . preg_quote( $node, '/' ) . \"(?!\\[\\/))/\", '[av_textblock]$1[/av_textblock]', $text );\n\t\t\t\t \n\t\t\t\t\t$msg_txt = substr( $node, 0, 30 );\n\t\t\t\t\tif( strlen( $node ) > 31 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$msg_txt .= '.....';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif( in_array( $this->parser_state, array( 'auto_repair' ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$msg_tx = sprintf( __( 'Textblock shortcode created around a plain text content to keep it editable: %s', 'avia_framework' ), esc_html( $msg_txt ) );\n\t\t\t\t\t}\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$msg_tx = sprintf( __( 'Check if you need to create a textblock shortcode around a plain text content to keep it editable: %s', 'avia_framework' ), esc_html( $msg_txt ) );\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$msg = array(\n\t\t\t\t\t\t\t'type'\t\t=>\t'warning',\n\t\t\t\t\t\t\t'dashboard'\t=>\t'no',\n\t\t\t\t\t\t\t'message'\t=>\t$msg_tx\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$this->add_parser_message( $msg );\n\t }\n\t }\n\t\t\t\n\t\t\t$text = preg_replace_callback( \"/\". get_shortcode_regex() . \"/s\", array( $this, 'wrap_nested_plain_textblocks' ), $text );\n\t\t\t\n\t\t\treturn $text;\n\t\t}", "protected function _renderOwnTextBlocks($text) {\n\t\treturn preg_replace('/!!!\\s*?(\\w*?)\\\\n(.*?)\\\\n!!!/m', '<div class=\"$1\">$2</div>', $text);\n\t}", "function tpl_block_textformat($params, $content, &$template_object)\n{\n\n\t$style = null;\n\t$indent = 0;\n\t$indent_first = 0;\n\t$indent_char = ' ';\n\t$wrap = 80;\n\t$wrap_char = \"\\n\";\n\t$wrap_cut = false;\n\t$assign = null;\n\n\tif($content == null)\n\t{\n\t\treturn false;\n\t}\n\n extract($params);\n\n\tif($style == 'email')\n\t{\n\t\t$wrap = 72;\n\t}\n\t// split into paragraphs\n\t$paragraphs = preg_split('![\\r\\n][\\r\\n]!',$content);\n\n\tforeach($paragraphs as $paragraph)\n\t{\n\t\tif($paragraph == '')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\t// convert mult. spaces & special chars to single space\n\t\t$paragraph = preg_replace(array('!\\s+!','!(^\\s+)|(\\s+$)!'),array(' ',''),$paragraph);\n\t\t// indent first line\n\t\tif($indent_first > 0)\n\t\t{\n\t\t\t$paragraph = str_repeat($indent_char,$indent_first) . $paragraph;\n\t\t}\n\t\t// wordwrap sentences\n\t\t$paragraph = wordwrap($paragraph, $wrap - $indent, $wrap_char, $wrap_cut);\n\t\t// indent lines\n\t\tif($indent > 0)\n\t\t{\n\t\t\t$paragraph = preg_replace('!^!m',str_repeat($indent_char,$indent),$paragraph);\n\t\t}\n\t\t$output .= $paragraph . $wrap_char . $wrap_char;\n\t}\n\tif($assign != null)\n\t{\n\t\t$template_object->assign($assign,$output);\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\techo $output;\n\t}\n\t//echo $content;\n}", "public function addInsertBlocks() {\n foreach ($this->_explodedBody as $key => $paragraph) {\n if (isset($this->_inserts[$key])) {\n $this->_body = str_replace($paragraph . '</p>', $paragraph . $this->_explodeTag . $this->_inserts[$key], $this->_body);\n }\n else {\n $this->_body = str_replace($paragraph . '</p>', $paragraph . $this->_explodeTag, $this->_body);\n }\n }\n\n $this->_insertedBody = $this->_body;\n\n }", "function TS_VCSC_Add_Textblock_Elements() {\r\n global $VISUAL_COMPOSER_EXTENSIONS;\r\n // Add Advanced Textblock Element\r\n $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VisualComposer_Element = array(\r\n \"name\" => __( \"TS Textblock Advanced\", \"ts_visual_composer_extend\" ),\r\n \"base\" => \"TS_VCSC_Advanced_Textblock\",\r\n \"icon\" \t => \"ts-composer-element-icon-advanced-textblock\",\r\n \"category\" => __( \"Composium\", \"ts_visual_composer_extend\" ),\r\n \"description\" => __(\"Create an advanced textblock\", \"ts_visual_composer_extend\"),\r\n \"admin_enqueue_js\" \t\t=> \"\",\r\n \"admin_enqueue_css\" \t\t=> \"\",\r\n \"params\" => array(\r\n // Textblock Content\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_1\",\r\n \"seperator\"\t\t\t\t\t=> \"Textblock Content\"\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"textarea_html\",\r\n\t\t\t\t\t\t\t\"holder\" \t\t\t\t\t=> \"div\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t\t\t=> __( \"Content\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\"\t\t\t\t=> \"content\",\r\n\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\"description\"\t\t\t\t=> __( \"Create the content for the advanced textblock.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Textblock Link\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_2\",\r\n \"seperator\"\t\t\t\t\t=> \"Textblock Link\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"switch_button\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t \t=> __( \"Link Textbox\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\"\t\t \t=> \"link_textbox\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"description\"\t\t \t=> __( \"Switch the toggle if you want to link the element to another page; will not work if the content itself already includes one or more links.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_ParameterLinkPicker['enabled'] == \"false\" ? \"vc_link\" : \"advancedlinks\"),\r\n\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __(\"Link + Title\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"link_data\",\r\n\t\t\t\t\t\t\t\"description\" \t\t\t\t=> __(\"Provide a link to another page to be used for the element.\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"dependency\" \t=> array( 'element' => \"link_textbox\", 'value' => 'true' ),\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Height Settings\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_3\",\r\n \"seperator\"\t\t\t\t\t=> \"Content Height\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'type' \t\t\t\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'heading' \t\t\t\t\t=> __( 'Content Height: Type', 'ts_visual_composer_extend' ),\r\n\t\t\t\t\t\t\t'param_name' \t\t\t\t=> 'height_type',\r\n\t\t\t\t\t\t\t'value' => array(\r\n\t\t\t\t\t\t\t\t__('Adjust Holder Automatically', 'ts_visual_composer_extend')\t\t=> 'auto',\r\n\t\t\t\t\t\t\t\t__('Use Fixed Height for Holder', 'ts_visual_composer_extend')\t\t=> 'fixed',\r\n\t\t\t\t\t\t\t\t__('Use Maximum Height for Holder', 'ts_visual_composer_extend')\t=> 'maximum',\r\n\t\t\t\t\t\t\t\t__('Use Minimum Height for Holder', 'ts_visual_composer_extend')\t=> 'minimym',\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t'description' \t\t\t\t=> __( 'Select if and how the height for the step content holder shall be set.', 'ts_visual_composer_extend' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Content Height: Fixed\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"height_fixed\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"200\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"960\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> \"px\",\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"height_type\", 'value' => 'fixed' ),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the fixed height for the content holder, no matter the actual height of the content within.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Content Height: Maximum\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"height_maximum\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"200\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"960\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> \"px\",\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"height_type\", 'value' => 'maximum' ),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the maximum height for the content holder; if content height exceeds the maximum, a scrollbar will be provided.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Content Height: Minimum\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"height_minimum\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"200\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"960\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> \"px\",\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"height_type\", 'value' => 'minimum' ),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the minimum height for the content holder, even if the content is actually smaller.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Scrollbar Settings\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_4\",\r\n \"seperator\"\t\t\t\t\t=> \"Scrollbar Settings\",\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"height_type\", 'value' => array('fixed', 'maximum') ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t=> \"switch_button\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t \t=> __( \"Scrollbar: Custom\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\"\t\t \t=> \"scroll_nice\",\r\n\t\t\t\t\t\t\t\"value\" \t=> \"true\",\r\n\t\t\t\t\t\t\t\"description\"\t\t \t=> __( \"Switch the toggle if you want to apply a custom scrollbar to the content section.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"height_type\", 'value' => array('fixed', 'maximum') ),\r\n\t\t\t\t\t\t\t\"group\" \t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"colorpicker\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Scrollbar: Main Color\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"scroll_color\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"#cacaca\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the main color for the scrollbar.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"scroll_nice\", 'value' => 'true' ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"group\" \t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"colorpicker\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Scrollbar: Background Color\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"scroll_background\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"#ededed\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the background color for the scrollbar.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"scroll_nice\", 'value' => 'true' ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"group\" \t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Background Settings\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_5\",\r\n \"seperator\"\t\t\t\t\t=> \"Background Styling\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Background Type\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"background_type\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t__( \"Transparent Background\", \"ts_visual_composer_extend\" )\t\t=> \"transparent\",\r\n\t\t\t\t\t\t\t\t__( \"Solid Color\", \"ts_visual_composer_extend\" )\t\t\t\t=> \"color\",\r\n\t\t\t\t\t\t\t\t__( \"Gradient Background\", \"ts_visual_composer_extend\" )\t\t=> \"gradient\",\r\n\t\t\t\t\t\t\t\t__( \"Background Pattern\", \"ts_visual_composer_extend\" )\t\t\t=> \"pattern\",\r\n\t\t\t\t\t\t\t\t__( \"Custom Image\", \"ts_visual_composer_extend\" )\t\t\t\t=> \"image\",\r\n\t\t\t\t\t\t\t\t__( \"Patternbolt Pattern\", \"ts_visual_composer_extend\" )\t\t=> \"patternbolt\",\r\n\t\t\t\t\t\t\t\t//__( \"Trianglify Pattern\", \"ts_visual_composer_extend\" )\t\t=> \"trianglify\",\r\n\t\t\t\t\t\t\t\t//__( \"Particilify Pattern\", \"ts_visual_composer_extend\" )\t\t=> \"particlify\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the background type for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"admin_label\"\t\t\t\t=> true,\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"colorpicker\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Background Color\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"background_color\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"#ffffff\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the background color for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => array('color', 'image') ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"advanced_gradient\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t\t\t=> __(\"Gradient Background\", \"ts_visual_composer_extend\"),\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\"param_name\"\t\t\t\t=> \"background_gradient\",\r\n\t\t\t\t\t\t\t\"description\"\t\t\t\t=> __('Use the controls above to create a custom gradient background for the element.', 'ts_visual_composer_extend'),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => 'gradient' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"background\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Background Pattern\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"background_pattern\",\r\n\t\t\t\t\t\t\t\"height\" \t\t=> 200,\r\n\t\t\t\t\t\t\t\"pattern\" \t\t=> $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_Background_List,\r\n\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\"encoding\" \t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"empty\"\t\t\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the background pattern for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => 'pattern' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"attach_image\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Background Image\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"background_image\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select an image or pattern to be used as background for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => 'image' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t\t\t=> __( \"Background Size\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\"\t\t\t\t=> \"background_size\",\r\n\t\t\t\t\t\t\t\"width\"\t\t\t\t\t\t=> 150,\r\n\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t__( \"Cover\", \"ts_visual_composer_extend\" ) \t\t\t=> \"cover\",\r\n\t\t\t\t\t\t\t\t__( \"150%\", \"ts_visual_composer_extend\" )\t\t\t=> \"150%\",\r\n\t\t\t\t\t\t\t\t__( \"200%\", \"ts_visual_composer_extend\" )\t\t\t=> \"200%\",\r\n\t\t\t\t\t\t\t\t__( \"Contain\", \"ts_visual_composer_extend\" ) \t\t=> \"contain\",\r\n\t\t\t\t\t\t\t\t__( \"Initial\", \"ts_visual_composer_extend\" ) \t\t=> \"initial\",\r\n\t\t\t\t\t\t\t\t__( \"Auto\", \"ts_visual_composer_extend\" ) \t\t\t=> \"auto\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\"\t\t\t\t=> __( \"Select how the custom background image should be sized.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => 'image' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t\t\t=> __( \"Background Repeat\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\"\t\t\t\t=> \"background_repeat\",\r\n\t\t\t\t\t\t\t\"width\"\t\t\t\t\t\t=> 150,\r\n\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t__( \"No Repeat\", \"ts_visual_composer_extend\" )\t\t=> \"no-repeat\",\r\n\t\t\t\t\t\t\t\t__( \"Repeat X + Y\", \"ts_visual_composer_extend\" )\t=> \"repeat\",\r\n\t\t\t\t\t\t\t\t__( \"Repeat X\", \"ts_visual_composer_extend\" )\t\t=> \"repeat-x\",\r\n\t\t\t\t\t\t\t\t__( \"Repeat Y\", \"ts_visual_composer_extend\" )\t\t=> \"repeat-y\"\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\"\t\t\t\t=> __( \"Select if and how the background image should be repeated.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => 'image' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __( \"Background Position\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"background_position\",\r\n\t\t\t\t\t\t\t\"value\" \t\t\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t__( \"Center Center\", \"ts_visual_composer_extend\" ) \t\t\t\t=> \"center center\",\r\n\t\t\t\t\t\t\t\t__( \"Center Top\", \"ts_visual_composer_extend\" )\t\t\t\t\t=> \"center top\",\r\n\t\t\t\t\t\t\t\t__( \"Center Bottom\", \"ts_visual_composer_extend\" ) \t\t\t\t=> \"center bottom\",\r\n\t\t\t\t\t\t\t\t__( \"Left Top\", \"ts_visual_composer_extend\" ) \t\t\t\t\t=> \"left top\",\r\n\t\t\t\t\t\t\t\t__( \"Left Center\", \"ts_visual_composer_extend\" ) \t\t\t\t=> \"left center\",\r\n\t\t\t\t\t\t\t\t__( \"Left Bottom\", \"ts_visual_composer_extend\" ) \t\t\t\t=> \"left bottom\",\r\n\t\t\t\t\t\t\t\t__( \"Right Top\", \"ts_visual_composer_extend\" ) \t\t\t\t\t=> \"right top\",\r\n\t\t\t\t\t\t\t\t__( \"Right Center\", \"ts_visual_composer_extend\" ) \t\t\t\t=> \"right center\",\r\n\t\t\t\t\t\t\t\t__( \"Right Bottom\", \"ts_visual_composer_extend\" ) \t\t\t\t=> \"right bottom\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t\t\t=> __(\"Select the position of the background image; will have most effect on smaller screens.\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => 'image' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __( \"Patternbolt Pattern\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"patternbolt_type\",\r\n\t\t\t\t\t\t\t\"value\" \t\t\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t__( \"Buseca\", \"ts_visual_composer_extend\")\t\t\t\t\t\t=> \"ts-patternbolt-buseca\",\r\n\t\t\t\t\t\t\t\t__( \"Candy Bold\", \"ts_visual_composer_extend\")\t\t\t\t\t=> \"ts-patternbolt-candy-bold\",\r\n\t\t\t\t\t\t\t\t__( \"Candy Medium\", \"ts_visual_composer_extend\")\t\t\t\t=> \"ts-patternbolt-candy-medium\",\r\n\t\t\t\t\t\t\t\t__( \"Candy Light\", \"ts_visual_composer_extend\")\t\t\t\t\t=> \"ts-patternbolt-candy-light\",\t\t\t\t\r\n\t\t\t\t\t\t\t\t__( \"Cross (Standard) Bold\", \"ts_visual_composer_extend\")\t\t=> \"ts-patternbolt-cross-default-bold\",\r\n\t\t\t\t\t\t\t\t__( \"Cross (Standard) Medium\", \"ts_visual_composer_extend\")\t\t=> \"ts-patternbolt-cross-default-medium\",\r\n\t\t\t\t\t\t\t\t__( \"Cross (Standard) Light\", \"ts_visual_composer_extend\")\t\t=> \"ts-patternbolt-cross-default-light\",\t\t\t\t\r\n\t\t\t\t\t\t\t\t__( \"Cross (Thin) Bold\", \"ts_visual_composer_extend\")\t\t\t=> \"ts-patternbolt-cross-thin-bold\",\r\n\t\t\t\t\t\t\t\t__( \"Cross (Thin) Medium\", \"ts_visual_composer_extend\")\t\t\t=> \"ts-patternbolt-cross-thin-medium\",\r\n\t\t\t\t\t\t\t\t__( \"Cross (Thin) Light\", \"ts_visual_composer_extend\")\t\t\t=> \"ts-patternbolt-cross-thin-light\",\t\t\t\t\r\n\t\t\t\t\t\t\t\t__( \"Horizontal Lines Bold\", \"ts_visual_composer_extend\")\t\t=> \"ts-patternbolt-horizontal-lines-bold\",\r\n\t\t\t\t\t\t\t\t__( \"Horizontal Lines Medium\", \"ts_visual_composer_extend\")\t\t=> \"ts-patternbolt-horizontal-lines-medium\",\r\n\t\t\t\t\t\t\t\t__( \"Horizontal Lines Light\", \"ts_visual_composer_extend\")\t\t=> \"ts-patternbolt-horizontal-lines-light\",\t\t\t\t\r\n\t\t\t\t\t\t\t\t__( \"Diagonal Lines Bold\", \"ts_visual_composer_extend\")\t\t\t=> \"ts-patternbolt-diagonal-lines-bold\",\r\n\t\t\t\t\t\t\t\t__( \"Diagonal Lines Medium\", \"ts_visual_composer_extend\")\t\t=> \"ts-patternbolt-diagonal-lines-medium\",\r\n\t\t\t\t\t\t\t\t__( \"Diagonal Lines Light\", \"ts_visual_composer_extend\")\t\t=> \"ts-patternbolt-diagonal-lines-light\",\t\t\t\t\t\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t\t\t=> __(\"Select which Patternbolt pattern you want to use as background.\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => 'patternbolt' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"colorpicker\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Patternbolt Color\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"patternbolt_color\",\r\n\t\t\t\t\t\t\t\"value\" \t \t\t=> \"#ff9659\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the background color for the pattern blocks.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => 'patternbolt' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t=> __( \"Patternbolt Size\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t=> \"patternbolt_size\",\r\n\t\t\t\t\t\t\t\"value\" \t=> \"40\",\r\n\t\t\t\t\t\t\t\"min\" \t=> \"10\",\r\n\t\t\t\t\t\t\t\"max\" \t=> \"250\",\r\n\t\t\t\t\t\t\t\"step\" \t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t=> 'px',\r\n\t\t\t\t\t\t\t\"description\" \t=> __( \"Define the size of the pattern blocks.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => 'patternbolt' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t=> __( \"Patternbolt Opacity\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t=> \"patternbolt_opacity\",\r\n\t\t\t\t\t\t\t\"value\" \t=> \"75\",\r\n\t\t\t\t\t\t\t\"min\" \t=> \"10\",\r\n\t\t\t\t\t\t\t\"max\" \t=> \"100\",\r\n\t\t\t\t\t\t\t\"step\" \t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t=> '%',\r\n\t\t\t\t\t\t\t\"description\" \t=> __( \"Define the opacity of the pattern blocks.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => 'patternbolt' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Default Font Settings\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_6\",\r\n \"seperator\"\t\t\t\t\t=> \"Font Styling\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'type' \t\t\t\t\t\t=> 'colorpicker',\r\n\t\t\t\t\t\t\t'heading' \t\t\t\t\t=> __( 'Font Color', 'ts_visual_composer_extend' ),\r\n\t\t\t\t\t\t\t'param_name' \t\t\t\t=> 'styling_color',\r\n\t\t\t\t\t\t\t'value'\t\t\t\t\t\t=> '#696969',\r\n\t\t\t\t\t\t\t'description' \t\t\t\t=> __( 'Select the default font color for the element.', 'ts_visual_composer_extend' ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Font Weight\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_weight\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t__( 'Normal', \"ts_visual_composer_extend\" ) => \"normal\",\r\n\t\t\t\t\t\t\t\t__( 'Bolder', \"ts_visual_composer_extend\" ) => \"bolder\",\t\t\t \r\n\t\t\t\t\t\t\t\t__( 'Bold', \"ts_visual_composer_extend\" ) => \"bold\",\r\n\t\t\t\t\t\t\t\t__( 'Light', \"ts_visual_composer_extend\" ) => \"300\",\r\n\t\t\t\t\t\t\t\t__( 'Lighter', \"ts_visual_composer_extend\" ) => \"100\",\r\n\t\t\t\t\t\t\t\t__( 'Default', \"ts_visual_composer_extend\" ) => \"inherit\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the default font weight for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Font Style\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_style\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t__( 'Normal', \"ts_visual_composer_extend\" ) \t=> \"normal\",\r\n\t\t\t\t\t\t\t\t__( 'Italic', \"ts_visual_composer_extend\" ) \t=> \"italic\",\t\t\t \r\n\t\t\t\t\t\t\t\t__( 'Oblique', \"ts_visual_composer_extend\" )\t\t=> \"oblique\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the default font style for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Text Alignment\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_align\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t__( 'Left', \"ts_visual_composer_extend\" )\t\t\t=> \"left\",\r\n\t\t\t\t\t\t\t\t__( 'Right', \"ts_visual_composer_extend\" )\t\t\t=> \"right\",\t\t\t \r\n\t\t\t\t\t\t\t\t__( 'Center', \"ts_visual_composer_extend\" )\t\t\t=> \"center\",\r\n\t\t\t\t\t\t\t\t__( 'Justify', \"ts_visual_composer_extend\" )\t\t=> \"justify\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the default text alignment for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Text Transform\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_transform\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t__( 'None', \"ts_visual_composer_extend\" )\t\t\t=> \"none\",\r\n\t\t\t\t\t\t\t\t__( 'Capitalize', \"ts_visual_composer_extend\" )\t\t=> \"capitalize\",\t\t\t \r\n\t\t\t\t\t\t\t\t__( 'Uppercase', \"ts_visual_composer_extend\" )\t\t=> \"uppercase\",\r\n\t\t\t\t\t\t\t\t__( 'Lowercase', \"ts_visual_composer_extend\" )\t\t=> \"lowercase\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the default text transform for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Text Decoration\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_decoration\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t__( 'None', \"ts_visual_composer_extend\" ) \t=> \"none\",\r\n\t\t\t\t\t\t\t\t__( 'Underline', \"ts_visual_composer_extend\" )\t\t=> \"underline\",\t\t\t \r\n\t\t\t\t\t\t\t\t__( 'Overline', \"ts_visual_composer_extend\" )\t\t=> \"overline\",\r\n\t\t\t\t\t\t\t\t__( 'Line Through', \"ts_visual_composer_extend\" )\t=> \"line-through\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the default font decoration for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"fontsmanager\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t\t\t=> __( \"Font Family\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\"\t\t\t\t=> \"styling_family\",\r\n\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> \"Default:regular\",\r\n\t\t\t\t\t\t\t\"default\"\t\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"connector\"\t\t\t\t\t=> \"styling_font\",\r\n\t\t\t\t\t\t\t\"description\"\t\t\t\t=> __( \"Select the default font family to be used for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"admin_label\"\t\t\t\t=> true,\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"hidden_input\",\r\n\t\t\t\t\t\t\t\"param_name\"\t\t\t\t=> \"styling_font\",\r\n\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> \"default\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Font Size\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_size\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"14\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"10\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> 'px',\r\n\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the font size to be used for the element.\",\r\n\t\t\t\t\t\t\t\"admin_label\"\t\t\t\t=> true,\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Line Height Type\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_linetype\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t__( \"Relative (Based on Font Size)\", \"ts_visual_composer_extend\" )\t=> \"relative\",\r\n\t\t\t\t\t\t\t\t__( \"Fixed Pixels Value\", \"ts_visual_composer_extend\" )\t\t\t\t=> \"fixedpx\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select how the general line height for this element should be determined.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"admin_label\"\t\t\t\t=> true,\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Line Height\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_linerelative\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"150\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"500\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> '%',\r\n\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the relative line height to be used for the element; 100% equals the selected font size.\",\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"styling_linetype\", 'value' => 'relative' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Line Height\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_linefixedpx\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"21\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"12\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"120\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> 'px',\r\n\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the fixed line height in pixels to be used for the element.\",\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"styling_linetype\", 'value' => 'fixedpx' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Text Indentation\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_indent\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"-100\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> 'px',\r\n\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the general text indentation to be used for the element.\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Paddings / Margins\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_7\",\r\n \"seperator\"\t\t\t\t\t=> \"Paddings + Margins\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n ),\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> \"advanced_styling\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __(\"Internal Paddings\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"styling_padding\",\r\n\t\t\t\t\t\t\t\"style_type\"\t\t\t\t=> \"padding\",\r\n\t\t\t\t\t\t\t\"show_main\"\t\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_preview\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_width\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"show_style\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_radius\" \t\t\t\t=> \"false\",\t\t\t\t\t\r\n\t\t\t\t\t\t\t\"show_color\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_unit_width\"\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_unit_radius\"\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"label_width\"\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\"override_all\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"default_positions\"\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t//\"All\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"All\", \"ts_visual_composer_extend\"),\t\"width\" => \"1\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\"Top\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Top\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\"Right\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Right\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\"Bottom\"\t\t\t\t\t\t=> array(\"string\" => __(\"Bottom\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\"Left\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Left\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> \"padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the internal paddings for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> \"advanced_styling\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __(\"External Margins\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"styling_margin\",\r\n\t\t\t\t\t\t\t\"style_type\"\t\t\t\t=> \"margin\",\r\n\t\t\t\t\t\t\t\"show_main\"\t\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_preview\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_width\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"show_style\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_radius\" \t\t\t\t=> \"false\",\t\t\t\t\t\r\n\t\t\t\t\t\t\t\"show_color\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_unit_width\"\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_unit_radius\"\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"label_width\"\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\"override_all\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"default_positions\"\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t//\"All\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"All\", \"ts_visual_composer_extend\"),\t\"width\" => \"1\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\"Top\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Top\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\", \"auto\" => \"false\"),\r\n\t\t\t\t\t\t\t\t\"Right\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Right\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\", \"auto\" => \"true\"),\r\n\t\t\t\t\t\t\t\t\"Bottom\"\t\t\t\t\t\t=> array(\"string\" => __(\"Bottom\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\", \"auto\" => \"false\"),\r\n\t\t\t\t\t\t\t\t\"Left\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Left\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\", \"auto\" => \"true\"),\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> \"margin-top:0px;margin-right:0px;margin-right:auto;margin-bottom:0px;margin-left:0px;margin-left:auto;\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the external margins for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Border Settings\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_8\",\r\n \"seperator\"\t\t\t\t\t=> \"Border Styling\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n ),\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> \"advanced_styling\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __(\"Border Settings\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"styling_border\",\r\n\t\t\t\t\t\t\t\"style_type\"\t\t\t\t=> \"border\",\r\n\t\t\t\t\t\t\t\"show_main\"\t\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_preview\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"show_width\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"show_style\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"show_radius\" \t\t\t\t=> \"true\",\t\t\t\t\t\r\n\t\t\t\t\t\t\t\"show_color\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"show_unit_width\"\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"show_unit_radius\"\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"override_all\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"default_positions\"\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t\"All\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"All\", \"ts_visual_composer_extend\"),\t\"width\" => \"1\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#cccccc\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\"Top\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Top\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#cccccc\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\"Right\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Right\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#cccccc\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\"Bottom\"\t\t\t\t\t\t=> array(\"string\" => __(\"Bottom\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#cccccc\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\"Left\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Left\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#cccccc\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the border settings for each side and corner of the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Display Settings\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_9\",\r\n \"seperator\"\t\t\t\t\t=> \"Display Settings\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Textblock Display\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_display\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t__( \"Block\", \"ts_visual_composer_extend\" )\t\t\t=> \"block\",\r\n\t\t\t\t\t\t\t\t__( \"Inline Block\", \"ts_visual_composer_extend\" )\t=> \"inline-block\",\r\n\t\t\t\t\t\t\t\t__( \"Inline\", \"ts_visual_composer_extend\" )\t\t\t=> \"inline\",\r\n\t\t\t\t\t\t\t\t__( \"Flex\", \"ts_visual_composer_extend\" )\t\t\t=> \"flex\",\r\n\t\t\t\t\t\t\t\t__( \"Inline Flex\", \"ts_visual_composer_extend\" )\t=> \"inline-flex\",\r\n\t\t\t\t\t\t\t\t__( \"Table\", \"ts_visual_composer_extend\" )\t\t\t=> \"table\",\r\n\t\t\t\t\t\t\t\t__( \"Table Cell\", \"ts_visual_composer_extend\" )\t\t=> \"table-cell\",\r\n\t\t\t\t\t\t\t\t__( \"Table Column\", \"ts_visual_composer_extend\" )\t=> \"table-column\",\r\n\t\t\t\t\t\t\t\t__( \"Table Row\", \"ts_visual_composer_extend\" )\t\t=> \"table-row\",\r\n\t\t\t\t\t\t\t\t__( \"Inline Table\", \"ts_visual_composer_extend\" )\t=> \"inline-table\",\r\n\t\t\t\t\t\t\t\t__( \"List Item\", \"ts_visual_composer_extend\" )\t\t=> \"list-item\",\r\n\t\t\t\t\t\t\t\t__( \"Run-In\", \"ts_visual_composer_extend\" )\t\t\t=> \"run-in\",\r\n\t\t\t\t\t\t\t\t__( \"None\", \"ts_visual_composer_extend\" )\t\t\t=> \"none\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the display rule to be used for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Textblock Float\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_float\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t__( \"None\", \"ts_visual_composer_extend\" )\t\t\t=> \"none\",\r\n\t\t\t\t\t\t\t\t__( \"Left\", \"ts_visual_composer_extend\" )\t\t\t=> \"left\",\r\n\t\t\t\t\t\t\t\t__( \"Right\", \"ts_visual_composer_extend\" )\t\t\t=> \"right\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the float rule to be used for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Textblock Width\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_width\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"10\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> '%',\r\n\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the textblock width to be used for the element.\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n // CSS Columns\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_10\",\r\n \"seperator\"\t\t\t\t\t=> \"CSS Columns\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n ),\r\n array(\r\n \"type\" \t => \"messenger\",\r\n \"param_name\" \t => \"messenger\",\r\n \"layout\" => \"info\",\r\n \"size\"\t\t\t\t\t => \"13\",\r\n \"message\" \t => __( \"CSS columns will work best if the wrapper uses a 'block' setting for its display rule (see above). Conflicts with other display rules are possbible, so please use with caution.\", \"ts_visual_composer_extend\" ),\r\n \"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t=> \"switch_button\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t \t=> __( \"Columns: Use CSS Columns\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\"\t\t \t=> \"column_usage\",\r\n\t\t\t\t\t\t\t\"value\" \t=> \"false\",\r\n\t\t\t\t\t\t\t\"description\"\t\t \t=> __( \"Switch the toggle if you want to display the textblock content with automatic CSS columns.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\" \t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Columns: Count\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"column_count\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"2\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"2\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"6\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> '',\r\n\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the maximum number of desired columns for the layout.\",\r\n \"dependency\" \t=> array( 'element' => \"column_usage\", 'value' => 'true' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Columns: Gap\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"column_gap\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"40\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"20\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> 'px',\r\n\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the gap between each column.\",\r\n \"dependency\" \t=> array( 'element' => \"column_usage\", 'value' => 'true' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Columns: Minimum Width\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"column_width\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"200\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"800\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> 'px',\r\n\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the minimum width each column should have for a responsive behavior; set to 0 (zero) for a non-responsive behavior.\",\r\n \"dependency\" \t=> array( 'element' => \"column_usage\", 'value' => 'true' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Columns: Fill Type\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"column_fill\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t__( \"Balance\", \"ts_visual_composer_extend\" )\t\t=> \"balance\",\r\n\t\t\t\t\t\t\t\t__( \"Auto\", \"ts_visual_composer_extend\" )\t\t\t=> \"auto\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the fill behavior for the columns.\", \"ts_visual_composer_extend\" ),\r\n \"dependency\" \t=> array( 'element' => \"column_usage\", 'value' => 'true' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> \"advanced_styling\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __(\"Columns: Separator Style\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"column_rule\",\r\n\t\t\t\t\t\t\t\"style_type\"\t\t\t\t=> \"border\",\r\n\t\t\t\t\t\t\t\"show_main\"\t\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_preview\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_width\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"show_style\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"show_radius\" \t\t\t\t=> \"false\",\t\t\t\t\t\r\n\t\t\t\t\t\t\t\"show_color\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"show_unit_width\"\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"show_unit_radius\"\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"override_all\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"default_positions\"\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t\"All\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"All\", \"ts_visual_composer_extend\"),\t\"width\" => \"1\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#696969\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t),\r\n \"value\" => \"border-style:solid;|border-width:1px;|border-color:#696969;\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the style for the separator between the individual columns.\", \"ts_visual_composer_extend\" ),\r\n \"dependency\" \t=> array( 'element' => \"column_usage\", 'value' => 'true' ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Custom Styling\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_11\",\r\n \"seperator\"\t\t\t\t\t=> \"Custom CSS Code\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"textarea_raw_html\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Custom CSS Code\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"styling_custom\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> base64_encode(\"\"),\r\n\t\t\t\t\t\t\t\"description\" \t \t\t=> __( \"Enter any custom CSS code you want to apply to the textbox container directly here.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t),\t\t\t\t\t\r\n\t\t\t\t\t\t// Segment Styling (H1 - H6, DIV, SPAN, DIV, P)\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_12\",\r\n \"seperator\"\t\t\t\t\t=> \"Segment Styling\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Segment Styling\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"switch_button\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t \t=> __( \"Segment Styling Rules\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\"\t\t \t=> \"styling_override\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"description\"\t\t \t=> __( \"Switch the toggle if you want to define custom rules for individual segements inside the content (i.e. H1-H6, SPAN, etc.).\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\" \t\t\t\t\t=> \"Segment Styling\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'type' \t\t\t\t\t\t=> 'param_group',\r\n\t\t\t\t\t\t\t'heading' \t\t\t\t\t=> __( 'Segment Styles', 'ts_visual_composer_extend' ),\r\n\t\t\t\t\t\t\t'param_name' \t\t\t\t=> 'styling_segments',\r\n\t\t\t\t\t\t\t'description' \t\t\t\t=> __( 'Define the styling for any content segments you might have used.', 'ts_visual_composer_extend' ),\r\n\t\t\t\t\t\t\t'save_always' \t\t\t\t=> true,\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Segment Styling\",\r\n\t\t\t\t\t\t\t\"dependency\" \t=> array( 'element' => \"styling_override\", 'value' => 'true' ),\r\n\t\t\t\t\t\t\t'value' \t\t\t\t\t=> urlencode(json_encode(array(\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'segment_type' \t\t\t\t=> 'h1',\r\n\t\t\t\t\t\t\t\t\t'segment_id'\t\t\t\t=> '',\r\n\t\t\t\t\t\t\t\t\t'segment_class'\t\t\t\t=> '',\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t'segment_display'\t\t\t=> 'block',\r\n\t\t\t\t\t\t\t\t\t'segment_float'\t\t\t\t=> 'none',\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t'segment_color' \t\t\t=> '#696969',\r\n\t\t\t\t\t\t\t\t\t'segment_background'\t\t=> 'transparent',\r\n\t\t\t\t\t\t\t\t\t'segment_weight'\t\t\t=> '300',\r\n\t\t\t\t\t\t\t\t\t'segment_style'\t\t\t\t=> 'normal',\r\n\t\t\t\t\t\t\t\t\t'segment_decoration'\t\t=> 'none',\r\n\t\t\t\t\t\t\t\t\t'segment_family'\t\t\t=> 'Default:regular',\r\n\t\t\t\t\t\t\t\t\t'segment_font'\t\t\t\t=> 'default',\r\n\t\t\t\t\t\t\t\t\t'segment_size'\t\t\t\t=> 36,\r\n\t\t\t\t\t\t\t\t\t'segment_linertype'\t\t\t=> 'relative',\r\n\t\t\t\t\t\t\t\t\t'segment_linerelative'\t\t=> 150,\r\n\t\t\t\t\t\t\t\t\t'segment_linefixedpx'\t\t=> 54,\r\n\t\t\t\t\t\t\t\t\t'segment_indent'\t\t\t=> 0,\r\n\t\t\t\t\t\t\t\t\t'segment_transform'\t\t\t=> 'uppercase',\r\n\t\t\t\t\t\t\t\t\t'segment_align'\t\t\t\t=> 'center',\r\n\t\t\t\t\t\t\t\t\t'segment_padding'\t\t\t=> 'padding-top:10px;padding-right:0px;padding-bottom:20px;padding-left:0px;',\r\n\t\t\t\t\t\t\t\t\t'segment_margin'\t\t\t=> '',\r\n\t\t\t\t\t\t\t\t\t'segment_border'\t\t\t=> '',\r\n 'segment_columnusage' => 'false',\r\n 'segment_columncount' => 2,\r\n 'segment_columngap' => 40,\r\n 'segment_columnrule' => 'border-style:solid;|border-width:1px;|border-color:#696969;',\r\n 'segment_columnfill' => 'balance',\r\n 'segment_columnwidth' => 200,\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t))),\r\n\t\t\t\t\t\t\t'params' \t\t\t\t\t=> array(\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Segment Type\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_type\",\r\n\t\t\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t__( \"H1\", \"ts_visual_composer_extend\" )\t\t\t\t=> \"h1\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"H2\", \"ts_visual_composer_extend\" )\t\t\t\t=> \"h2\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"H3\", \"ts_visual_composer_extend\" )\t\t\t\t=> \"h3\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"H4\", \"ts_visual_composer_extend\" )\t\t\t\t=> \"h4\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"H5\", \"ts_visual_composer_extend\" )\t\t\t\t=> \"h5\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"H6\", \"ts_visual_composer_extend\" )\t\t\t\t=> \"h6\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Paragraph\", \"ts_visual_composer_extend\" )\t\t=> \"p\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"DIV\", \"ts_visual_composer_extend\" )\t\t\t=> \"div\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Span\", \"ts_visual_composer_extend\" )\t\t\t=> \"span\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Link\", \"ts_visual_composer_extend\" )\t\t\t=> \"a\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Image\", \"ts_visual_composer_extend\" )\t\t\t=> \"img\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Figure\", \"ts_visual_composer_extend\" )\t\t\t=> \"figure\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Blockquote\", \"ts_visual_composer_extend\" )\t\t=> \"blockquote\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Strong\", \"ts_visual_composer_extend\" )\t\t\t=> \"strong\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Bold\", \"ts_visual_composer_extend\" )\t\t\t=> \"bold\",\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"admin_label\" \t\t\t\t=> true,\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the segment type you want to style.\", \"ts_visual_composer_extend\" )\r\n\t\t\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"textfield\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Segment ID\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_id\",\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> \"\",\r\n\t\t\t\t\t\t\t\t\t\"admin_label\" \t\t\t\t=> true,\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Enter an unique ID for the segment type you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"textfield\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Segment Class\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_class\",\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> \"\",\r\n\t\t\t\t\t\t\t\t\t\"admin_label\" \t\t\t\t=> true,\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Enter a class name for the segment type you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Segment Display\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_display\",\r\n\t\t\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t__( \"Block\", \"ts_visual_composer_extend\" )\t\t\t=> \"block\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Inline Block\", \"ts_visual_composer_extend\" )\t=> \"inline-block\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Inline\", \"ts_visual_composer_extend\" )\t\t\t=> \"inline\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Flex\", \"ts_visual_composer_extend\" )\t\t\t=> \"flex\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Inline Flex\", \"ts_visual_composer_extend\" )\t=> \"inline-flex\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Table\", \"ts_visual_composer_extend\" )\t\t\t=> \"table\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Table Cell\", \"ts_visual_composer_extend\" )\t\t=> \"table-cell\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Table Column\", \"ts_visual_composer_extend\" )\t=> \"table-column\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Table Row\", \"ts_visual_composer_extend\" )\t\t=> \"table-row\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Inline Table\", \"ts_visual_composer_extend\" )\t=> \"inline-table\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"List Item\", \"ts_visual_composer_extend\" )\t\t=> \"list-item\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Run-In\", \"ts_visual_composer_extend\" )\t\t\t=> \"run-in\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"None\", \"ts_visual_composer_extend\" )\t\t\t=> \"none\",\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the display rule for the segment type you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Segment Float\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_float\",\r\n\t\t\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t__( \"None\", \"ts_visual_composer_extend\" )\t\t\t=> \"none\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Left\", \"ts_visual_composer_extend\" )\t\t\t=> \"left\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Right\", \"ts_visual_composer_extend\" )\t\t\t=> \"right\",\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the float rule for the segment type you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'type' \t\t\t\t\t\t=> 'colorpicker',\r\n\t\t\t\t\t\t\t\t\t'heading' \t\t\t\t\t=> __( 'Segment Background', 'ts_visual_composer_extend' ),\r\n\t\t\t\t\t\t\t\t\t'param_name' \t\t\t\t=> 'segment_background',\r\n\t\t\t\t\t\t\t\t\t'value'\t\t\t\t\t\t=> 'transparent',\r\n\t\t\t\t\t\t\t\t\t'description' \t\t\t\t=> __( 'Select the font color for the segment type you want to style.', 'ts_visual_composer_extend' ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Segment Columns\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_columnusage\",\r\n\t\t\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t__( \"Inherit\", \"ts_visual_composer_extend\" ) => \"false\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Span All\", \"ts_visual_composer_extend\" ) => \"span\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Custom\", \"ts_visual_composer_extend\" )\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select if you want to display the segment content with automatic CSS columns.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t), \r\n array(\r\n \"type\" \t => \"messenger\",\r\n \"param_name\" \t => \"messenger\",\r\n \"layout\" => \"info\",\r\n \"size\"\t\t\t\t\t => \"13\",\r\n \"message\" \t => __( \"CSS columns will work best if the wrapper uses a 'block' setting for its display rule (see above). Conflicts with other display rules are possbible, so please use with caution. Do not define column rules for content shown within a parent wrapper already utilizing a column rule.\", \"ts_visual_composer_extend\" ),\r\n \"dependency\" \t=> array( 'element' => \"segment_columnusage\", 'value' => 'true' ),\r\n ),\r\n array(\r\n \"type\" \t\t=> \"nouislider\",\r\n \"heading\" \t\t=> __( \"Columns: Count\", \"ts_visual_composer_extend\" ),\r\n \"param_name\" \t\t=> \"segment_columncount\",\r\n \"value\" \t\t=> \"2\",\r\n \"min\" \t\t=> \"2\",\r\n \"max\" \t\t=> \"6\",\r\n \"step\" \t\t=> \"1\",\r\n \"unit\" \t\t=> '',\r\n \"description\" \t\t=> \"Define the maximum number of desired columns for the layout.\",\r\n \"dependency\" \t=> array( 'element' => \"segment_columnusage\", 'value' => 'true' ),\r\n ),\r\n array(\r\n \"type\" \t\t=> \"nouislider\",\r\n \"heading\" \t\t=> __( \"Columns: Gap\", \"ts_visual_composer_extend\" ),\r\n \"param_name\" \t\t=> \"segment_columngap\",\r\n \"value\" \t\t=> \"40\",\r\n \"min\" \t\t=> \"20\",\r\n \"max\" \t\t=> \"100\",\r\n \"step\" \t\t=> \"1\",\r\n \"unit\" \t\t=> 'px',\r\n \"description\" \t\t=> \"Define the gap between each column.\",\r\n \"dependency\" \t=> array( 'element' => \"segment_columnusage\", 'value' => 'true' ),\r\n ),\r\n array(\r\n \"type\" \t\t=> \"nouislider\",\r\n \"heading\" \t\t=> __( \"Columns: Minimum Width\", \"ts_visual_composer_extend\" ),\r\n \"param_name\" \t\t=> \"segment_columnwidth\",\r\n \"value\" \t\t=> \"200\",\r\n \"min\" \t\t=> \"0\",\r\n \"max\" \t\t=> \"800\",\r\n \"step\" \t\t=> \"1\",\r\n \"unit\" \t\t=> 'px',\r\n \"description\" \t\t=> \"Define the minimum width each column should have for a responsive behavior; set to 0 (zero) for a non-responsive behavior.\",\r\n \"dependency\" \t=> array( 'element' => \"segment_columnusage\", 'value' => 'true' ),\r\n ),\r\n array(\r\n \"type\" \t\t=> \"dropdown\",\r\n \"heading\" \t\t=> __( \"Columns: Fill Type\", \"ts_visual_composer_extend\" ),\r\n \"param_name\" \t\t=> \"segment_columnfill\",\r\n \"width\" \t\t=> 300,\r\n \"value\" \t\t=> array(\r\n __( \"Balance\", \"ts_visual_composer_extend\" )\t\t=> \"balance\",\r\n __( \"Auto\", \"ts_visual_composer_extend\" )\t\t\t=> \"auto\",\r\n ),\r\n \"description\" \t\t=> __( \"Define the fill behavior for the columns.\", \"ts_visual_composer_extend\" ),\r\n \"dependency\" \t=> array( 'element' => \"segment_columnusage\", 'value' => 'true' ),\r\n ),\r\n array(\r\n \"type\" \t\t\t\t\t\t=> \"advanced_styling\",\r\n \"heading\" \t\t\t\t\t=> __(\"Columns: Separator Style\", \"ts_visual_composer_extend\"),\r\n \"param_name\" \t\t\t\t=> \"segment_columnrule\",\r\n \"style_type\"\t\t\t\t=> \"border\",\r\n \"show_main\"\t\t\t\t\t=> \"false\",\r\n \"show_preview\"\t\t\t\t=> \"false\",\r\n \"show_width\"\t\t\t\t=> \"true\",\r\n \"show_style\"\t\t\t\t=> \"true\",\r\n \"show_radius\" \t\t\t\t=> \"false\",\t\t\t\t\t\r\n \"show_color\"\t\t\t\t=> \"true\",\r\n \"show_unit_width\"\t\t\t=> \"false\",\r\n \"show_unit_radius\"\t\t\t=> \"false\",\r\n \"override_all\"\t\t\t\t=> \"false\",\r\n \"default_positions\"\t\t\t=> array(\r\n \"All\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"All\", \"ts_visual_composer_extend\"),\t\"width\" => \"1\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#696969\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n ),\r\n \"value\" => \"border-style:solid;|border-width:1px;|border-color:#696969;\",\r\n \"description\" \t\t=> __( \"Define the style for the separator between the individual columns.\", \"ts_visual_composer_extend\" ),\r\n \"dependency\" \t=> array( 'element' => \"segment_columnusage\", 'value' => 'true' ),\r\n ),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'type' \t\t\t\t\t\t=> 'colorpicker',\r\n\t\t\t\t\t\t\t\t\t'heading' \t\t\t\t\t=> __( 'Font Color', 'ts_visual_composer_extend' ),\r\n\t\t\t\t\t\t\t\t\t'param_name' \t\t\t\t=> 'segment_color',\r\n\t\t\t\t\t\t\t\t\t'value'\t\t\t\t\t\t=> '#696969',\r\n\t\t\t\t\t\t\t\t\t'description' \t\t\t\t=> __( 'Select the font color for the segment type you want to style.', 'ts_visual_composer_extend' ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Font Weight\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_weight\",\r\n\t\t\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t__( 'Normal', \"ts_visual_composer_extend\" ) => \"normal\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Bolder', \"ts_visual_composer_extend\" ) => \"bolder\",\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t__( 'Bold', \"ts_visual_composer_extend\" ) => \"bold\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Light', \"ts_visual_composer_extend\" ) => \"300\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Lighter', \"ts_visual_composer_extend\" ) => \"100\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Default', \"ts_visual_composer_extend\" ) => \"inherit\",\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the font weight for the segment you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Font Style\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_style\",\r\n\t\t\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t__( 'Normal', \"ts_visual_composer_extend\" ) \t=> \"normal\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Italic', \"ts_visual_composer_extend\" ) \t=> \"italic\",\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t__( 'Oblique', \"ts_visual_composer_extend\" )\t\t=> \"oblique\",\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the font style for the segment you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Text Alignment\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_align\",\r\n\t\t\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t__( 'Left', \"ts_visual_composer_extend\" )\t\t\t=> \"left\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Right', \"ts_visual_composer_extend\" )\t\t\t=> \"right\",\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t__( 'Center', \"ts_visual_composer_extend\" )\t\t\t=> \"center\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Justify', \"ts_visual_composer_extend\" )\t\t=> \"justify\",\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the text alignment for the segment you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Text Transform\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_transform\",\r\n\t\t\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t__( 'None', \"ts_visual_composer_extend\" )\t\t\t=> \"none\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Capitalize', \"ts_visual_composer_extend\" )\t\t=> \"capitalize\",\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t__( 'Uppercase', \"ts_visual_composer_extend\" )\t\t=> \"uppercase\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Lowercase', \"ts_visual_composer_extend\" )\t\t=> \"lowercase\",\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the text transform for the segment you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Text Decoration\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_decoration\",\r\n\t\t\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t__( 'None', \"ts_visual_composer_extend\" ) \t=> \"none\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Underline', \"ts_visual_composer_extend\" )\t\t=> \"underline\",\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t__( 'Overline', \"ts_visual_composer_extend\" )\t\t=> \"overline\",\r\n\t\t\t\t\t\t\t\t\t\t__( 'Line Through', \"ts_visual_composer_extend\" )\t=> \"line-through\",\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the font decoration for the segment you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"edit_field_class\"\t\t\t=> \"vc_col-sm-6 vc_column\",\r\n\t\t\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"fontsmanager\",\r\n\t\t\t\t\t\t\t\t\t\"heading\"\t\t\t\t\t=> __( \"Font Family\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\"\t\t\t\t=> \"segment_family\",\r\n\t\t\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\t\t\"default\"\t\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t\"connector\"\t\t\t\t\t=> \"styling_segments_segment_font\", // add group name to param name\r\n\t\t\t\t\t\t\t\t\t\"description\"\t\t\t\t=> __( \"Select the font to be used for the segment type you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"hidden_input\",\r\n\t\t\t\t\t\t\t\t\t\"param_name\"\t\t\t\t=> \"segment_font\",\r\n\t\t\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> \"default\",\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Font Size\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_size\",\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> \"14\",\r\n\t\t\t\t\t\t\t\t\t\"min\" \t\t=> \"10\",\r\n\t\t\t\t\t\t\t\t\t\"max\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\t\t\"unit\" \t\t=> 'px',\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the font size to be used for the segment type you want to style.\"\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Line Height Type\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_linetpye\",\r\n\t\t\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t__( \"Relative (Based on Font Size)\", \"ts_visual_composer_extend\" )\t=> \"relative\",\r\n\t\t\t\t\t\t\t\t\t\t__( \"Fixed Pixels Value\", \"ts_visual_composer_extend\" )\t\t\t\t=> \"fixedpx\",\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select how the general line height for this section should be determined.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Line Height\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_linerelative\",\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> \"150\",\r\n\t\t\t\t\t\t\t\t\t\"min\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\t\t\"max\" \t\t=> \"500\",\r\n\t\t\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\t\t\"unit\" \t\t=> '%',\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the relative line height to be used for this section; 100% equals the selected font size.\",\r\n\t\t\t\t\t\t\t\t\t\"dependency\" \t=> array( 'element' => \"segment_linetpye\", 'value' => 'relative' ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Line Height\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_linefixedpx\",\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> \"18\",\r\n\t\t\t\t\t\t\t\t\t\"min\" \t\t=> \"10\",\r\n\t\t\t\t\t\t\t\t\t\"max\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\t\t\"unit\" \t\t=> 'px',\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the fixed line height in pixels to be used for this section.\",\r\n\t\t\t\t\t\t\t\t\t\"dependency\" \t=> array( 'element' => \"segment_linetpye\", 'value' => 'fixedpx' ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Text Indentation\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t=> \"segment_indent\",\r\n\t\t\t\t\t\t\t\t\t\"value\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\t\t\t\"min\" \t\t=> \"-100\",\r\n\t\t\t\t\t\t\t\t\t\"max\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\t\t\"step\" \t\t=> \"1\",\r\n\t\t\t\t\t\t\t\t\t\"unit\" \t\t=> 'px',\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the text indentation to be used for the segment type you want to style.\",\r\n\t\t\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Global Styling\",\r\n\t\t\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> \"advanced_styling\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __(\"Internal Paddings\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"segment_padding\",\r\n\t\t\t\t\t\t\t\t\t\"style_type\"\t\t\t\t=> \"padding\",\r\n\t\t\t\t\t\t\t\t\t\"show_main\"\t\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_preview\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_width\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t\"show_style\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_radius\" \t\t\t\t=> \"false\",\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"show_color\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_unit_width\"\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_unit_radius\"\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"label_width\"\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\t\t\"override_all\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"default_positions\"\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t//\"All\" \t\t\t\t\t=> array(\"string\" => __(\"All\", \"ts_visual_composer_extend\"),\t\"width\" => \"1\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Top\" \t\t\t\t\t\t=> array(\"string\" => __(\"Top\", \"ts_visual_composer_extend\"),\t\"width\" => \"5\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Right\" \t\t\t\t\t\t=> array(\"string\" => __(\"Right\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Bottom\" \t\t\t\t\t\t=> array(\"string\" => __(\"Bottom\", \"ts_visual_composer_extend\"),\t\"width\" => \"5\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Left\" \t\t\t\t\t\t=> array(\"string\" => __(\"Left\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the internal paddings for the segment type you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> \"advanced_styling\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __(\"External Margins\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"segment_margin\",\r\n\t\t\t\t\t\t\t\t\t\"style_type\"\t\t\t\t=> \"margin\",\r\n\t\t\t\t\t\t\t\t\t\"show_main\"\t\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_preview\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_width\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t\"show_style\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_radius\" \t\t\t\t=> \"false\",\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"show_color\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_unit_width\"\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_unit_radius\"\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"label_width\"\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\t\t\"override_all\"\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"default_positions\"\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t//\"All\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"All\", \"ts_visual_composer_extend\"),\t\"width\" => \"1\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Top\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Top\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\", \"auto\" => \"false\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Right\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Right\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\", \"auto\" => \"true\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Bottom\"\t\t\t\t\t\t=> array(\"string\" => __(\"Bottom\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\", \"auto\" => \"false\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Left\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Left\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#000000\", \"radius\" => \"0\", \"unitradius\" => \"px\", \"auto\" => \"true\"),\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the external margins for the segment type you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> \"advanced_styling\",\r\n\t\t\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __(\"Border Settings\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"segment_border\",\r\n\t\t\t\t\t\t\t\t\t\"style_type\"\t\t\t\t=> \"border\",\r\n\t\t\t\t\t\t\t\t\t\"show_main\"\t\t\t\t\t=> \"false\",\r\n\t\t\t\t\t\t\t\t\t\"show_preview\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t\"show_width\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t\"show_style\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t\"show_radius\" \t\t\t\t=> \"true\",\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"show_color\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t\"show_unit_width\"\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t\"show_unit_radius\"\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t\"override_all\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\t\t\"default_positions\"\t\t\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\"All\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"All\", \"ts_visual_composer_extend\"),\t\"width\" => \"1\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#cccccc\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Top\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Top\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#cccccc\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Right\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Right\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#cccccc\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Bottom\"\t\t\t\t\t\t=> array(\"string\" => __(\"Bottom\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#cccccc\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Left\"\t\t\t\t\t\t\t=> array(\"string\" => __(\"Left\", \"ts_visual_composer_extend\"),\t\"width\" => \"0\", \"unitwidth\" => \"px\", \"style\" => \"solid\", \"color\" => \"#cccccc\", \"radius\" => \"0\", \"unitradius\" => \"px\"),\r\n\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Define the border for the segment type you want to style.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\t),\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t),\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Shadow Effect\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_13\",\r\n \"seperator\"\t\t\t\t\t=> \"Shadow Effect\",\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => array('color', 'image', 'pattern', 'gradient', 'patternbolt') ),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Animation & Effects\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"dropdown\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Shadow Effect\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"effect_shadow\",\r\n\t\t\t\t\t\t\t\"width\" \t\t=> 300,\r\n\t\t\t\t\t\t\t\"value\" \t\t=> array(\r\n\t\t\t\t\t\t\t\t__( \"None\", \"ts_visual_composer_extend\" ) => \"\",\r\n\t\t\t\t\t\t\t\t__( \"Lifted\", \"ts_visual_composer_extend\" ) => \"lifted\",\r\n\t\t\t\t\t\t\t\t__( \"Raised\", \"ts_visual_composer_extend\" ) => \"raised\",\r\n\t\t\t\t\t\t\t\t__( \"Perspective - Right\", \"ts_visual_composer_extend\" ) => \"perspective-right\",\r\n\t\t\t\t\t\t\t\t__( \"Perspective - Left\", \"ts_visual_composer_extend\" ) => \"perspective-left\",\r\n\t\t\t\t\t\t\t\t__( \"Curved - Horizontal\", \"ts_visual_composer_extend\" ) => \"curved\",\r\n\t\t\t\t\t\t\t\t__( \"Curved - Horizontal (Top)\", \"ts_visual_composer_extend\" ) => \"curved-top\",\r\n\t\t\t\t\t\t\t\t__( \"Curved - Horizontal (Bottom)\", \"ts_visual_composer_extend\" ) => \"curved-bottom\",\r\n\t\t\t\t\t\t\t\t__( \"Curved - Vertical\", \"ts_visual_composer_extend\" ) => \"curved-vertical\",\r\n\t\t\t\t\t\t\t\t__( \"Curved - Vertical (Left)\", \"ts_visual_composer_extend\" ) => \"curved-vertical-left\",\r\n\t\t\t\t\t\t\t\t__( \"Curved - Vertical (Right)\", \"ts_visual_composer_extend\" ) => \"curved-vertical-right\",\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\"admin_label\"\t\t\t\t=> true,\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Select the shadow effect for the advanced textblock.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t=> array( 'element' => \"background_type\", 'value' => array('color', 'image', 'pattern', 'gradient', 'patternbolt') ),\r\n\t\t\t\t\t\t\t\"group\" \t\t\t\t\t=> \"Animation & Effects\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Viewport Animation\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_14\",\r\n \"seperator\"\t\t\t\t\t=> \"Viewport Animation\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Animation & Effects\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"css3animations\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t\t\t=> __(\"Viewport Animation\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"param_name\"\t\t\t\t=> \"effect_viewportclass\",\r\n\t\t\t\t\t\t\t\"prefix\"\t\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\"connector\"\t\t\t\t\t=> \"effect_viewportname\",\r\n\t\t\t\t\t\t\t\"noneselect\"\t\t\t\t=> \"true\",\r\n\t\t\t\t\t\t\t\"default\"\t\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\"description\"\t\t\t\t=> __(\"Select the viewport animation for the advanced textblock.\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Animation & Effects\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"hidden_input\",\r\n\t\t\t\t\t\t\t\"heading\"\t\t\t\t\t=> __( \"Viewport Animation\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\"\t\t\t\t=> \"effect_viewportname\",\r\n\t\t\t\t\t\t\t\"value\"\t\t\t\t\t\t=> \"\",\r\n\t\t\t\t\t\t\t\"admin_label\"\t\t\t\t=> true,\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Animation & Effects\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t\t\t\t\t=> \"viewport_offset\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t\t\t\t=> __( \"Viewport Offset\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t\t\t=> \"effect_viewportoffset\",\r\n\t\t\t\t\t\t\t\"value\" \t\t\t\t\t=> 'bottom-in-view',\r\n\t\t\t\t\t\t\t\"description\" \t\t\t\t=> __(\"Define the offset (top of screen) that should trigger the viewport animation.\", \"ts_visual_composer_extend\"),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t\t\t=> array(\"element\" => \"effect_viewportclass\", \"not_empty\" => true),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Animation & Effects\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"nouislider\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Viewport Delay\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"effect_viewportdelay\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\t\"min\" \t\t=> \"0\",\r\n\t\t\t\t\t\t\t\"max\" \t\t=> \"5000\",\r\n\t\t\t\t\t\t\t\"step\" \t\t=> \"100\",\r\n\t\t\t\t\t\t\t\"unit\" \t\t=> 'ms',\r\n\t\t\t\t\t\t\t\"description\" \t\t=> \"Define the delay in ms after which the animation should start, once initially triggered.\",\r\n\t\t\t\t\t\t\t\"dependency\" \t\t\t\t=> array(\"element\" => \"effect_viewportclass\", \"not_empty\" => true),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Animation & Effects\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\"\t\t\t\t\t\t=> \"switch_button\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Viewport Mobile\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"effect_viewportmobile\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"false\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Switch the toggle if you want to use the viewport animation on mobile devices.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"dependency\" \t\t\t\t=> array(\"element\" => \"effect_viewportclass\", \"not_empty\" => true),\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Animation & Effects\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// Other Conditionals\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"seperator\",\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"seperator_15\",\r\n\t\t\t\t\t\t\t\"seperator\"\t\t\t\t\t=> \"Output Conditions\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Other Settings\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"ts_conditionals\",\r\n\t\t\t\t\t\t\t\"heading\" => __( \"Output Conditions\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"conditionals\",\r\n\t\t\t\t\t\t\t\"connector\"\t\t\t\t\t=> \"restrictions\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Other Settings\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" => \"hidden_input\",\r\n\t\t\t\t\t\t\t\"heading\" => __( \"Output Conditions\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" => \"restrictions\",\r\n\t\t\t\t\t\t\t\"value\" => \"\",\r\n\t\t\t\t\t\t\t\"admin_label\"\t\t => true,\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Other Settings\",\r\n\t\t\t\t\t\t),\t\t\r\n\t\t\t\t\t\t// Other Settings\r\n array(\r\n \"type\" => \"seperator\",\r\n \"param_name\" => \"seperator_16\",\r\n \"seperator\"\t\t\t\t\t=> \"Other Settings\",\r\n\t\t\t\t\t\t\t\"group\"\t\t\t\t\t\t=> \"Other Settings\",\r\n ),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t\t=> \"textfield\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Define ID Name\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t\t=> \"el_id\",\r\n\t\t\t\t\t\t\t\"value\" \t\t=> \"\",\r\n\t\t\t\t\t\t\t\"description\" \t\t=> __( \"Enter an unique ID for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\" \t\t\t\t\t=> \"Other Settings\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"type\" \t=> \"tag_editor\",\r\n\t\t\t\t\t\t\t\"heading\" \t\t=> __( \"Extra Class Names\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"param_name\" \t=> \"el_class\",\r\n\t\t\t\t\t\t\t\"value\" \t=> \"\",\r\n\t\t\t\t\t\t\t\"description\" \t\t \t=> __( \"Enter additional class names for the element.\", \"ts_visual_composer_extend\" ),\r\n\t\t\t\t\t\t\t\"group\" \t\t\t\t\t=> \"Other Settings\",\r\n\t\t\t\t\t\t),\r\n )\r\n );\r\n if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VisualComposer_LeanMap == \"true\") {\r\n return $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VisualComposer_Element;\r\n } else {\t\t\t\r\n vc_map($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VisualComposer_Element);\r\n };\r\n }", "function phpblock($text) {\n }", "protected function RenderContents_Text() {\n\t//$rsLines = $this->LineRecords();\n\t//return $rsLines->RenderText_lines(KS_FMT_TEXT_ORD_LINE);\n\n\t$oPainter = new vcCartDisplay_full_TEXT(NULL);\n\n\t// render order lines\n\t$rsLines = $this->LineRecords();\n\twhile($rsLines->NextRow()) {\n\t $oLine = $rsLines->GetRenderObject_text();\n\t $oPainter->AddLine($oLine);\n\t}\n\n\treturn $oPainter->Render();\n\n }", "function wrapHTMLBlock($text, $additionalClasses = \"\") {\n\t\t$result = '<div ';\n\t\tif ( !empty($additionalClasses) ) {\n\t\t\t$result .= 'class=\"'.$additionalClasses.'\"';\n\t\t}\n\n\t\t$result .= '>'.$text.'</div>';\n\n\t\treturn $result;\n\t}", "private function buildIntroBlock(): void\n {\n //====================================================================//\n // Into Text Block\n $this->blocksFactory()\n ->addTextBlock(\"This is a Demo Text Block!!\".\"You can repeat me as much as you want!\");\n }", "function wrapHTMLDGBlock($text, $additionalClasses = \"\") {\n\t\treturn wrapHTMLBlock($text, \"dgBlock \".$additionalClasses);\n}", "private function printTextToBlock(&$pdf, $text, $w, $h, $x, $y, $lpl = null, $line = 1, $align = 'L', $valign = 'M')\n {\n// $text = str_pad('', 9999, '成績の概要当期の営業');\n if (!is_null($lpl)) {\n if (mb_strlen($text, 'utf-8') > ($lpl * $line)) {\n $text = mb_substr($text, 0, ($lpl * $line), 'utf-8');\n }\n $lines = array();\n for ($i = 0; $i < $line; $i++) {\n if (mb_strlen($text, 'utf-8') > $lpl) {\n $lines[] = mb_substr($text, 0, $lpl, 'utf-8');\n $text = mb_substr($text, $lpl, null, 'utf-8');\n } else {\n $lines[] = $text;\n break;\n }\n }\n $text = implode(\"\\n\", $lines);\n }\n\n $pdf->MultiCell($w, $h, $text, 0, $align, false, 0, $x, $y, true, 0, false, true, $h, $valign);\n }", "private function addTextpartDescriptors()\n {\n if ($this->CorpusText->section_descriptors) {\n foreach ($this->CorpusText->section_descriptors as $section_descriptor) {\n $Textparts = XPath::queryTEI($this->DOMDocument, '//tei:*[@subtype=\"' . $this->CorpusText->highest_subsection . '\"]//*[@type=\"textpart\"][@subtype=\"' . $section_descriptor . '\"]', true);\n foreach ($Textparts as $Textpart) {\n $TextpartDescriptor = $this->DOMDocument->createElement('div');\n $TextpartDescriptor->setAttribute('class', 'textr-remove textr-textpart-descriptor');\n $TextpartDescriptor->textContent = $this->SectionDescriptionLogic($Textpart);\n $Textpart->insertBefore($TextpartDescriptor, $Textpart->firstChild);\n }\n }\n }\n\n\n }", "function text_block_text_custom_callback($text, $text_block, $url_arguments, $host_name, $host_configuration_array)\n{\n return $text;\n}", "public static function blockWrapper($subHeading,$text,$head='setupDivHead',$body='setupDivBody_nobg'){\n\n if(!isset($head)|| $head==\"\")\n $head='setupDivHead';\n\n if(!isset($body) || $body==\"\")\n $body='setupDivBody_nobg';\n ?>\n <div class=\"setupDiv_auto\">\n\n <!--sub heading-->\n <div class=\"<?php echo $head; ?>\">\n\n<?php echo $subHeading; ?>\n\n</div> <!--setupDivBody_Bttm_border-->\n\n\n<div class=\"<?php echo $body; ?>\">\n \n<?php \n/* \n* @var text text content \n*/\n echo $text;\n ?>\n\n</div>\n\n\n </div><!--setupDiv_marginTop-->\n\n<?php\n }", "function render_block_core_footnotes($attributes, $content, $block)\n {\n }", "function acf_parse_save_blocks( $text = '' ) {\n\t\n\t// Search text for dynamic blocks and modify attrs.\n\treturn addslashes(\n\t\tpreg_replace_callback(\n\t\t\t'/<!--\\s+wp:(?P<name>[\\S]+)\\s+(?P<attrs>{[\\S\\s]+?})\\s+(?P<void>\\/)?-->/',\n\t\t\t'acf_parse_save_blocks_callback',\n\t\t\tstripslashes( $text )\n\t\t)\n\t);\n}", "function getBlocks( $text )\n{\n $delimiters = array(\"--------------------------------------\", \"\\\\n\", \n \"=================================================================================\",\n \"====================================== oOo ======================================\");\n $text = str_replace( $delimiters, \"&&&\", $text );\n //now i split the strig using &&& as delimiter\n $textPieces = explode(\"&&&\", $text);\n //print_r( $textPieces );\n return $textPieces;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the referenced entity controller referenced in the field.
public function fieldReferencedEntityController($fieldName, EntityControllerFactoryInterface $entityControllerFactory, $fieldKey = FieldUtil::KEY_TARGET_ID, $idx = 0, $lang = LANGUAGE_NONE);
[ "public function getController(): ?string {\r\n return $this -> routeEntity -> getController();\r\n }", "public function getIdController()\n {\n return $this->idController;\n }", "public function getIdController()\n {\n return $this->id_controller;\n }", "final public function getCascadeController()\n\t{\n\t\treturn $this->cascade_controller;\n\t}", "public function GetController()\n {\n return $this->controller;\n }", "public function getController()\n\t{\n\t\tif($this->_owner instanceof CController)\n\t\t\treturn $this->_owner;\n\t\telse\n\t\t\treturn Yii::app()->getController();\n\t}", "public static function getParentReferenceFieldName();", "function get_term_controller($key = null, $taxonomy = null, $field = 'id', $options = array()) {\n return Term::get_controller($key, $taxonomy, $field, $options);\n }", "public function getController(): object\n {\n return $this->controller;\n }", "public function getController(){\n return $this->controller;\n }", "public function getReferencedField() {\n\t\treturn $this->referenced;\n\t}", "public function getController() {\n return $this->_controller;\n }", "public function getControllerFromDefinition($controller);", "public function controllerIdent()\n {\n return $this->controllerIdent;\n }", "public function getController():SlideTrigger {\r\n\t\treturn $this->control;\r\n\t}", "public function getFormController(){\n\t\treturn $this->formcontroller;\n\t}", "public static function _getReference(){\n if (property_exists(get_called_class(), '_reference'))\n $reference = static::$_reference;\n else {\n $class = strtolower(get_called_class());\n $class = explode('\\\\', $class);\n $class = end($class);\n $reference = substr($class, 0, strlen($class) - strlen('model'));\n }\n\n return $reference;\n }", "function entity_get_controller($entity_type) {\n $controllers = &drupal_static(__FUNCTION__, array());\n if (!isset($controllers[$entity_type])) {\n $type_info = entity_get_info($entity_type);\n $class = $type_info['controller class'];\n $controllers[$entity_type] = new $class($entity_type);\n }\n return $controllers[$entity_type];\n}", "public function getRefContrat() {\n return $this->refContrat;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns list of all categories and teachers used in add and edit course page
public function categories_teachers_Course() { if($this->input->server('REQUEST_METHOD') == "GET") { $categories = $this->Category_model->get_categories(); $teachers = $this->Teacher_model->get_teachers(); if(!$categories || !$teachers) { echo json_encode(array('status' => "error")); return; } echo json_encode(array('status' => "success", "categories" => $categories, "teachers" => $teachers)); return; } }
[ "public function frontpage_combo_list() {\r\n global $CFG;\r\n require_once($CFG->libdir. '/coursecatlib.php');\r\n $chelper = new coursecat_helper();\r\n $chelper->set_subcat_depth($CFG->maxcategorydepth)->\r\n set_categories_display_options(array(\r\n 'limit' => $CFG->coursesperpage,\r\n 'viewmoreurl' => new moodle_url('/course/index.php',\r\n array('browse' => 'categories', 'page' => 1))\r\n ))->\r\n set_courses_display_options(array(\r\n 'limit' => $CFG->coursesperpage,\r\n 'viewmoreurl' => new moodle_url('/course/index.php',\r\n array('browse' => 'courses', 'page' => 1))\r\n ))->\r\n set_attributes(array('class' => 'frontpage-category-combo'));\r\n return $this->coursecat_tree($chelper, coursecat::get(0));\r\n }", "function get_courses($categoryid=\"all\", $sort=\"c.sortorder ASC\", $fields=\"c.*\") {\n\n global $USER, $CFG;\n\n $categoryselect = \"\";\n if ($categoryid != \"all\" && is_numeric($categoryid)) {\n $categoryselect = \"c.category = '$categoryid'\";\n }\n\n $teachertable = \"\";\n $visiblecourses = \"\";\n $sqland = \"\";\n if (!empty($categoryselect)) {\n $sqland = \"AND \";\n }\n if (!empty($USER->id)) { // May need to check they are a teacher\n if (!iscreator()) {\n $visiblecourses = \"$sqland ((c.visible > 0) OR t.userid = '$USER->id')\";\n $teachertable = \"LEFT JOIN {$CFG->prefix}user_teachers t ON t.course = c.id\";\n }\n } else {\n $visiblecourses = \"$sqland c.visible > 0\";\n }\n\n if ($categoryselect or $visiblecourses) {\n $selectsql = \"{$CFG->prefix}course c $teachertable WHERE $categoryselect $visiblecourses\";\n } else {\n $selectsql = \"{$CFG->prefix}course c $teachertable\";\n }\n\n $extrafield = str_replace('ASC','',$sort);\n $extrafield = str_replace('DESC','',$extrafield);\n $extrafield = trim($extrafield);\n if (!empty($extrafield)) {\n $extrafield = ','.$extrafield;\n }\n return get_records_sql(\"SELECT \".((!empty($teachertable)) ? \" DISTINCT \" : \"\").\" $fields $extrafield FROM $selectsql \".((!empty($sort)) ? \"ORDER BY $sort\" : \"\"));\n}", "public function getAll() {\n\n return Auth::user()->categories;\n }", "public function coursesList()\r\n {\r\n if(isset($_SESSION['user_type']) && $_SESSION['user_type'] == 'admin') {\r\n $data=[];\r\n $this->callPage('Courses','admin_courses','success','Courses @ Angel',$data);\r\n return;\r\n }\r\n }", "function getCourses(){\n\t\t$courseModel = new CoursesModel();\n\t\t$this->category = $_GET['subject'];\n\t\t$this->courses = $courseModel->getCourses($this->category);\n\t}", "function get_courses()\t{\n return $this->dbc->get_records(\"course\", array(), 'fullname ASC');\n }", "public static function get_course_filters_data() {\n global $PAGE;\n $filterdata = array();\n $catdata = array();\n $categories = \\core_course_category::make_categories_list();\n $firstcat = true;\n foreach ($categories as $key => $value) {\n $category = new \\stdClass();\n $category->id = $key;\n $category->title = $value;\n $cat = \\core_course_category::get($key);\n $category->courses = $cat->get_courses_count(); \n if ($firstcat) {\n $category->active = true;\n $firstcat = false;\n }\n array_push($catdata, $category);\n }\n $filterdata['catdata'] = $catdata;\n $filterdata['searchhtml'] = $PAGE->get_renderer('core', 'course')->course_search_form('', '', '', 0);\n return $filterdata;\n }", "function educare_toolkit_gcc_as_list( ) {\n\n\n $course_categories = get_terms( 'course_cat' );\n\n $course_category_options = array(esc_html__('All category', 'educare-toolkit')=>'');\n if ( $course_categories ) {\n foreach ( $course_categories as $course_category ) {\n $course_category_options[ $course_category->name ] = $course_category->term_id;\n }\n }\n\n return $course_category_options;\n}", "function categories() {\n $categories = Categories::findByModuleSection($this->active_project, $this->active_module, $this->getControllerName());\n \n if($this->request->isApiCall()) {\n $this->serveData($categories, 'categories');\n } else {\n $this->setTemplate(array(\n 'module' => RESOURCES_MODULE, \n 'controller' => 'categories', \n 'template' => 'list'\n ));\n $this->smarty->assign(array(\n 'categories' => $categories,\n 'can_add_category' => Category::canAdd($this->logged_user, $this->active_project)\n ));\t\n } // if\n }", "function getMyCourses()\n {\n $model = Classregistry::init('Course');\n\n return $model->getCourseByInstructor(self::get('id'));\n }", "function showCourses ()\r\n {\r\n $courses = new course();\r\n $courses->showAllCourseNameInUlList();\r\n }", "public function getCategories();", "function getCourseSelectOptions() {\n\t\techo '<option>'.__('-- My courses --', lepress_textdomain).'</option>';\n\t\t$cats = get_categories('hide_empty=0');\n\t\t$return_value = false;\n\t\tforeach($cats as $cat) {\n\t\t\t$course_meta = new CourseMeta($cat->cat_ID);\n\t\t\tif($course_meta instanceOf CourseMeta) {\n\t\t\t\tif($course_meta->getIsCourse() && !$course_meta->getIsClosed()) {\n\t\t\t\t\tif(!isSet($selected_cat_ID) && !isSet($_GET['c'])) {\n\t\t\t\t\t\t$selected_cat_ID = $cat->cat_ID;\t\n\t\t\t \t\t} else {\n\t\t\t \t\t\t$selected_cat_ID = $this->getSelectedCatID();\t\n\t\t\t \t\t}\n\t\t \t\t\n\t\t\t \t\tif($cat->cat_ID == $selected_cat_ID && $this->getCourseOwner('teacher')) {\n\t\t\t \t\t\t$selected = 'selected=\"selected\"';\t\n\t\t\t \t\t\t$return_value = $selected_cat_ID;\n\t\t\t \t\t} else {\n\t\t\t \t\t\t$selected = '';\t\n\t\t\t \t\t}\n\t\t\t\t\techo\t'<option value=\"teacher-'.$cat->cat_ID.'\" '.$selected.'>'.$cat->name.'</option>';\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn $return_value;\n\t}", "public function get_courses() {\n }", "function getCourseWikiList() {\n return $this->getWikiListByGroup(0);\n }", "public function categories(){\n\t\t\t\n\t\t\tif(Session::get('autenticat') && Session::get('admin') == 1){\n\t\t\t\n\t\t\t\t$this->_view->administradorCategories = $this->_administrador->getCategories();\n\t\t\t\t$this->_view->titol = 'Administrar Categories';\n\t\t\t\t$this->_view->carrega('categories', 'administrador');\n\t\t\t\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t$this->_view->titol = 'Administrar Categories';\n \t\t$this->_view->carrega('categories', 'administrador');\n\t\t\t}\n\t\t\t\n \t}", "public function frontpage_available_courses() {\r\n global $CFG;\r\n require_once($CFG->libdir. '/coursecatlib.php');\r\n\r\n $chelper = new coursecat_helper();\r\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->\r\n set_courses_display_options(array(\r\n 'recursive' => true,\r\n 'limit' => $CFG->frontpagecourselimit,\r\n 'viewmoreurl' => new moodle_url('/course/index.php'),\r\n 'viewmoretext' => new lang_string('fulllistofcourses')));\r\n\r\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\r\n $courses = coursecat::get(0)->get_courses($chelper->get_courses_display_options());\r\n $totalcount = coursecat::get(0)->get_courses_count($chelper->get_courses_display_options());\r\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\r\n // Print link to create a new course, for the 1st available category.\r\n return $this->add_new_course_button();\r\n }\r\n return $this->coursecat_courses($chelper, $courses, $totalcount);\r\n }", "function getAllCourses()\n {\n return $this->_getData('creq_allcourses', self::URL);\n }", "public function get_all(){\n $course=$this->get();\n return ($course);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether there are any "to" addresses in this instance
public function hasTos () { return !empty( $this->to ); }
[ "public function hasTo()\n {\n return $this->get(self::TO) !== null;\n }", "public function hasRecipients()\n {\n return count($this->recipients) > 0;\n }", "public function hasRecipients(): bool\n {\n if ($this->recipients and !$this->recipients->isEmpty()) {\n return true;\n } else {\n return false;\n }\n }", "public function hasAddress() {\n return !empty($this->has_address);\n }", "public function hasAddress()\n {\n return $this->address !== null;\n }", "public function hasRecipient()\n {\n return false;// TODO: Implement hasRecipient() method.\n }", "public function getToAddresses() {\n\t\treturn $this->to;\n\t}", "public function hasToNumber(): bool\n {\n return isset($this->payload['to']);\n }", "public function hasReceivers(): bool\n {\n return !empty($this->receivers);\n }", "public function hasRecipient()\n {\n return $this->recipient !== null;\n }", "public function customerHasAddresses()\n {\n return count($this->getCustomer()->getAddresses()) > 0;\n }", "public function hasFrom()\n {\n return $this->get(self::FROM) !== null;\n }", "public function isSetToPort()\n {\n return !is_null($this->_fields['ToPort']['FieldValue']);\n }", "public function hasAddress(): bool;", "public function isSetShipToAddress()\n {\n return !is_null($this->_fields['ShipToAddress']['FieldValue']);\n\n }", "public function getToAddresses()\n {\n return $this->recipients->getTo();\n }", "public function hasOutgoing(){\n return ($this->sending !== '');\n }", "public function hasRelations()\n {\n if (!$this->getContactAddresses()->isEmpty()\n || !$this->getAccountAddresses()->isEmpty()\n ) {\n return true;\n }\n\n return false;\n }", "public function hasAddress(): bool\n {\n return (bool) $this->loadCount('addresses');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all questions groups
public function getAllQuestionGroup() { return $this->questionGroup->orderBy('title')->whereNull('parent_id')->with([ 'children' => function ($qyery) { $qyery->orderBy('title'); }, ])->get(); }
[ "function GetAllQuestionGroups()\n {\n return $this->config->question_groups;\n }", "public function retrieveAllGroups();", "public function getAllGroups();", "function getAllExam_Groups() {\n\t\t$SQL=\"SELECT * FROM exam_groups\";\n\t\t$this->db->executeQuery($SQL);\n\n\t\t$result = array();\n\t\t$count = 0;\n\n\t\twhile($rs = $this->db->nextRecord())\n\t\t{\n\t\t\t$exam_groups = new Exam_Groups();\n\t\t\t$exam_groups->setId($rs['id']);\n\t\t\t$exam_groups->setName($rs['name']);\n\t\t\t$exam_groups->setBatch_id($rs['batch_id']);\n\t\t\t$exam_groups->setExam_type($rs['exam_type']);\n\t\t\t$exam_groups->setIs_published($rs['is_published']);\n\t\t\t$exam_groups->setResult_published($rs['result_published']);\n\t\t\t$exam_groups->setExam_date($rs['exam_date']);\n\t\t\t$result[$count++] = $exam_groups;\n\t\t}\n\n\t\t$this->db->closeRs();\n\t\treturn $result;\n\n\t}", "public function getGroups();", "public static function getGroups();", "public function groupedQuestions()\n {\n $returnValue = array();\n\n // section -64--88-0-17-1ae5945a:16037f3f6d2:-8000:0000000000000DB1 begin\n\t /** Get list of question ids with number of times they've been answered. */\n\t $sql = $this->Database->prepare(\"SELECT answers_forum.question_id, count(*) as NUM FROM answers_forum GROUP BY question_id ORDER BY NUM DESC\");\n\t $sql->setFetchMode( PDO::FETCH_ASSOC );\n\t $sql->execute();\n\n\t /** converts array into a CSV of question ids from most answered. */\n\t $questionsIds = array();\n\t foreach ($sql->fetchAll() as $questionsId ) {\n\t\t $questionsIds[] = $questionsId['question_id'];\n\t }\n\t $returnValue = $questionsIds;\n // section -64--88-0-17-1ae5945a:16037f3f6d2:-8000:0000000000000DB1 end\n\n return (array) $returnValue;\n }", "public function getGroups(): array;", "public function getAllGroups()\n {\n return $this->get(sprintf(\n '%d/groups?fields=id,name&limit=%d',\n SS_WORKPLACE_COMMUNITY_ID,\n Config::inst()->get('WorkplaceGateway', 'workplace_group_limit')\n ));\n }", "private function getGroups() {\n\t\t$groups = new ofaGroups();\n\t\treturn $groups->multiLoad();\n\t}", "public function getAllQuestions();", "public function findAllMuscleGroups() \n {\n return $this->fetchAll(null, \"muscle_group_name\");\n }", "protected function get_grouped_questions( $questions ) {\n\t\treturn $this->group_by_term( $questions, [ $this->get_config( 'question_groups_taxonomy' ) ] );\n\t}", "public function all_group()\n\t{\n\t\t$this->db->where('group_status = 1');\n\t\t$query = $this->db->get('group');\n\t\t\n\t\treturn $query;\n\t}", "public function getQuestionsGroup()\n {\n return $this->hasOne(QuestionsGroup::className(), ['id' => 'questions_group_id']);\n }", "public function suggestions_groups() {\n\n // Gets Groups\n (new MidrubBaseUserAppsCollectionChatbotHelpers\\Groups)->suggestions_groups();\n\n }", "public function selectAllGroups(){\n $conn = getConnection();\n $groupsCursor = $conn->query(\"SELECT * FROM groups\");\n $groupsArray = array();\n while(($group = $groupsCursor->fetch_assoc()) != null){\n $groupsArray[] = $group;\n }\n return $groupsArray;\n }", "protected function search_groups_all() {\n $wherecat = self::categoryToWhere();\n\n $res = array();\n foreach (array_keys($wherecat) as $cat) {\n // echo \"<b> $cat -> $where : \" . count($groups) . \" results</b><br />\\n\" ; //DEBUG\n $res = array_merge($res, $this->search_groups_category($cat));\n }\n return $res;\n }", "static public function getGroups() {\r\n\r\n\t\tif ( ! self::isUsed() ) {\r\n\t\t\twfDebugLog( \"wikifactory\", __METHOD__ . \": WikiFactory is not used.\\n\", true );\r\n\t\t\treturn array();\r\n\t\t}\r\n\r\n\t\t$groups = array();\r\n\r\n\t\t$dbr = self::db( DB_MASTER );\r\n\r\n\t\t$oRes = $dbr->select(\r\n\t\t\tarray( \"city_variables_pool\", \"city_variables_groups\" ), /*from*/\r\n\t\t\tarray( \"cv_group_id\", \"cv_group_name\" ), /*what*/\r\n\t\t\tarray(), //array( \"cv_group_id in (select cv_variable_group from city_variables_pool)\"\t), /*where*/\r\n\t\t\t__METHOD__\r\n\t\t);\r\n\r\n\t\twhile ( $oRow = $dbr->fetchObject( $oRes ) ) {\r\n\t\t\t$groups[$oRow->cv_group_id] = $oRow->cv_group_name;\r\n\t\t}\r\n\t\t$dbr->freeResult( $oRes );\r\n\r\n\t\treturn $groups;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
grading system by number
function grading($total_number){ if($total_number >= 80){ $grade = array( 'letter_grade' => 'A+', 'grade_point' => '4.00' ); } elseif( $total_number >= 75 && $total_number < 80){ $grade = array( 'letter_grade' => 'A', 'grade_point' => '3.75' ); } elseif( $total_number >= 70 && $total_number < 75){ $grade = array( 'letter_grade' => 'A-', 'grade_point' => '3.50' ); } elseif( $total_number >= 65 && $total_number < 70){ $grade = array( 'letter_grade' => 'B+', 'grade_point' => '3.25' ); } elseif( $total_number >= 60 && $total_number < 65){ $grade = array( 'letter_grade' => 'B', 'grade_point' => '3.00' ); } elseif( $total_number >= 55 && $total_number < 60){ $grade = array( 'letter_grade' => 'B-', 'grade_point' => '2.75' ); } elseif( $total_number >= 50 && $total_number < 55){ $grade = array( 'letter_grade' => 'C+', 'grade_point' => '2.50' ); } elseif( $total_number >= 45 && $total_number < 50){ $grade = array( 'letter_grade' => 'C', 'grade_point' => '2.25' ); } elseif( $total_number >= 40 && $total_number < 45){ $grade = array( 'letter_grade' => 'D', 'grade_point' => '2.00' ); } elseif( $total_number < 40 ){ $grade = array( 'letter_grade' => 'F', 'grade_point' => '0.00' ); } else{ echo "No Number"; } return $grade; }
[ "function curgrade($id){\n\tinclude_once('../graphing/xmlgrapher_crit.php');\n\tinclude('../../../Submission_p_secure_pages/connect.php');\n\t#include_once('../functions/curfunctions.php');\n\t###\n\t#$dumped = dump(\"module_p\", $id);\n\t### change dump to call only assoc_sens and tested status\n\t#$func = \"SELECT assoc_sens,tested_status FROM module_p WHERE id=\".$id;\n\t#$dumped = mysql_query($func,$connection);\n\t\n\tif(findmodassembly($id)==15){\n\t\treturn \"C\";\n\t}\t\n\n\t$crit = xmlgrapher_crit_num(findsensor($id), \"IV\", \"module\", 0);\n\t#echo \"IV crit num: \".$crit.\"<br>\";\n\t$bumpcrit = badbumps_crit($id);\n\t$xraycrit = xray_crit($id);\n\tif($bumpcrit == \"\" || $crit == 0 || $xraycrit == \"\"){\n\t\treturn \"I\";\n\t}\n\n\tif($crit%25 == 0 || $crit%7 == 0 || $bumpcrit == \"C\" || $xraycrit == \"C\"){\n\t\treturn \"C\";\n\t}\n\tif($crit%5 == 0 || $bumpcrit == \"B\" || $xraycrit == \"B\"){\n\t\treturn \"B\";\n\t}\n\t\n\treturn \"A\";\n\t\n}", "function languagelesson_calculate_user_lesson_grade($lessonid, $userid) {\n global $DB;\n $attemptscores = $DB->get_records('languagelesson_attempts', array('lessonid'=>$lessonid, 'userid'=>$userid), null, 'id,score');\n $lessonscore = 0;\n foreach ($attemptscores as $score) {\n $lessonscore += $score->score;\n }\n $DB->set_field('languagelesson_grades', 'grade', $lessonscore, array('lessonid'=>$lessonid, 'userid'=>$userid));\n \n return $lessonscore;\n}", "public function set_status_to_num(){\n\t\t\n\t\tforeach( $this->grades as $cert_id => $cert ){\n\t\t\tforeach( $cert as $asmt_id => $asmt ){\n\t\t\t\t\n\t\t\t\t$this->grades[$cert_id][$asmt_id]['status'] = $this->set_status_num( $asmt['status'] );\n\t\t\t}\n\t\t}\n\t}", "abstract function calculate_final_grade();", "function pretest_update_grade($gradeitems,$question_grades,$courseid,$userid){\n global $DB;\n foreach($gradeitems as $id=>$weights){\n $sum=0;\n $N = 0;\n foreach($weights as $qid=>$weight){\n $q = $question_grades[$qid];\n $grade = $q->fraction ? $q->fraction : 0;\n $sum += $grade*$weight;\n $N += $weight;\n }\n $gradeitem = new grade_item(array('courseid'=>$courseid,'id'=>$id));\n if($sum/$N >= 0.6){\n $finalgrade = $gradeitem->grademax * $sum / $N;\n $gradeitem->update_raw_grade($userid, $finalgrade,$source=null,$feedback=get_string('feedback','local_pretest'));\n }\n\n }\n}", "abstract public function update_grading_grades(stdClass $settings, $restrict=null);", "function upgrade_level()\n {\n // get actual points and level of the user (maybe we have to upgrade the level)\n $result = query(\"SELECT points, level FROM \". USERS_TABLE . \" WHERE id = ?\", $_SESSION[\"id\"]);\n if ($result === false or count($result[0]) != 2)\n {\n // something got wrong\n return false;\n }\n $points = $result[0][\"points\"];\n $level = $result[0][\"level\"];\n \n // change: 0 for no change, -1 to decrease, 1 to increase.\n $change = 0;\n \n // if the number of points exceed 10^(level + 1).\n if ($points >= pow(10, $level + 1))\n {\n $change = +1;\n }\n // if the number of points dropped under 10^level\n else if ($points < pow(10, $level))\n {\n $change = -1;\n }\n \n // Execute the query only if we have to update the level\n if ($change != 0)\n {\n // update the level\n $result = query(\"UPDATE \" . USERS_TABLE . \" SET level = level + ? WHERE id = ?\", $change, $_SESSION[\"id\"]);\n // if we managed to update the level\n if ($result === false)\n {\n return false;\n }\n }\n \n // return the updated level\n $level = $level + $change;\n return $level;\n }", "function _makePercentGrade( $grade_id_or_title, $course_period_id = 0, $staff_id = 0 )\n{\n\tglobal $_BETHEL;\n\n\tif ( ! $grade_id_or_title )\n\t{\n\t\treturn 0;\n\t}\n\n\t$course_period_id = $course_period_id ? $course_period_id : UserCoursePeriod();\n\n\t$staff_id = $staff_id ? $staff_id : User( 'STAFF_ID' );\n\n\t$gradebook_config = ProgramUserConfig( 'Gradebook', $staff_id );\n\n\tif ( ! isset( $_BETHEL['_makeLetterGrade']['courses'][ $course_period_id ] ) )\n\t{\n\t\t$_BETHEL['_makeLetterGrade']['courses'][ $course_period_id ] = DBGet( \"SELECT DOES_BREAKOFF,GRADE_SCALE_ID\n\t\t\tFROM COURSE_PERIODS\n\t\t\tWHERE COURSE_PERIOD_ID='\" . $course_period_id . \"'\" );\n\t}\n\n\t$does_breakoff = $_BETHEL['_makeLetterGrade']['courses'][ $course_period_id ][1]['DOES_BREAKOFF'];\n\n\t$grade_scale_id = $_BETHEL['_makeLetterGrade']['courses'][ $course_period_id ][1]['GRADE_SCALE_ID'];\n\n\tif ( ! isset( $_BETHEL['_makeLetterGrade']['grades'][ $grade_scale_id ] ) )\n\t{\n\t\t$_BETHEL['_makeLetterGrade']['grades'][ $grade_scale_id ] = DBGet( \"SELECT TITLE,ID,BREAK_OFF\n\t\t\tFROM REPORT_CARD_GRADES\n\t\t\tWHERE SYEAR='\" . UserSyear() . \"'\n\t\t\tAND SCHOOL_ID='\" . UserSchool() . \"'\n\t\t\tAND GRADE_SCALE_ID='\" . $grade_scale_id . \"'\n\t\t\tORDER BY BREAK_OFF IS NOT NULL DESC,BREAK_OFF DESC,SORT_ORDER\" );\n\t}\n\t//$grades = array('A+','A','A-','B+','B','B-','C+','C','C-','D+','D','D-','F');\n\n\tforeach ( (array) $_BETHEL['_makeLetterGrade']['grades'][ $grade_scale_id ] as $grade )\n\t{\n\t\t$prev = issetVal( $crnt, 0 );\n\n\t\t$crnt = ( $does_breakoff === 'Y'\n\t\t\t// Use Grade Scale value if Teacher Grade Scale Breakoff value is not set.\n\t\t\t&& isset( $gradebook_config[ $course_period_id . '-' . $grade['ID'] ] ) ?\n\t\t\t$gradebook_config[ $course_period_id . '-' . $grade['ID'] ] :\n\t\t\t$grade['BREAK_OFF'] );\n\n\t\tif ( is_numeric( $grade_id_or_title ) ?\n\t\t\t\t$grade_id_or_title == $grade['ID'] :\n\t\t\t\tmb_strtoupper( $grade_id_or_title ) == mb_strtoupper( $grade['TITLE'] ) )\n\t\t{\n\t\t\treturn ( $crnt + ( $crnt > $prev ? 100 : $prev ) ) / 2;\n\t\t}\n\t}\n\n\treturn 0;\n}", "function quiz_calculate_best_grade($quiz, $attempts) {\n\n switch ($quiz->grademethod) {\n\n case ATTEMPTFIRST:\n foreach ($attempts as $attempt) {\n return $attempt->sumgrades;\n }\n break;\n\n case ATTEMPTLAST:\n foreach ($attempts as $attempt) {\n $final = $attempt->sumgrades;\n }\n return $final;\n\n case GRADEAVERAGE:\n $sum = 0;\n $count = 0;\n foreach ($attempts as $attempt) {\n $sum += $attempt->sumgrades;\n $count++;\n }\n return (float)$sum/$count;\n\n default:\n case GRADEHIGHEST:\n $max = 0;\n foreach ($attempts as $attempt) {\n if ($attempt->sumgrades > $max) {\n $max = $attempt->sumgrades;\n }\n }\n return $max;\n }\n}", "public function grade() {\n\t\t$listSubmission = $this->submissions;\n\t\t$correctAnswer = 0;\n\t\t$wrongAnswer = 0;\n\t\t$blankAnswer = 0;\n\t\t$totalScore = 0;\n\t\t\n\t\tforeach($listSubmission as $submission)\n\t\t\t$submission->grade();\n\t\t\n\t\t/*\n\t\tforeach($listSubmission as $submission) {\n\t\t\t$problem = $submission->problem;\n\n\t\t\tif($submission->answer == null || $submission->answer===\"\") {\n\t\t\t\t$blankAnswer++;\n\t\t\t\t$totalScore += $problem->blank_score;\n\t\t\t} else if($submission->answer == $problem->answer) {\n\t\t\t\t$correctAnswer++;\n\t\t\t\t$totalScore += $problem->correct_score;\n\t\t\t} else {\n\t\t\t\t$wrongAnswer++;\n\t\t\t\t$totalScore += $problem->wrong_score;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t$this->score = $totalScore;\n\t\t$this->correct = $correctAnswer;\n\t\t$this->wrong = $wrongAnswer;\n\t\t$this->blank = $blankAnswer;\n\t\t\n\t\t$this->save();\n\t}", "function gradePoint($grade) {\n\t\n\tif ($grade == \"A+\") {\n\t\t$gradePoint = 4.0;\n\t}\n\t\n\tif ($grade == \"A\") {\n\t\t$gradePoint = 4.0;\n\t} \n\t\n\tif ($grade == \"B\") {\n\t\t$gradePoint = 3.0;\n\t} \n\t\n\tif ($grade == \"C\") {\n\t\t$gradePoint = 2.0;\n\t} \n\t\n\tif ($grade == \"D\") {\n\t\t$gradePoint = 0;\n\t}\n\t\n\tif ($grade == \"F\") {\n\t\t$gradePoint = 1;\n\t} \n\t\n\treturn $gradePoint;\n}", "function turnitintool_processgrade($grade,$part,$owner,$post,$objectid,&$tii,&$loaderbar) {\n $grade=(!empty($grade) OR $grade==0) ? $grade : NULL;\n if ($grade<=$part->maxmarks) { // If grade is LOWER or equal to max grade fine.... RETURN GRADE\n $output=$grade;\n } else { // If grade is HIGHER than max grade correct it.... UPDATE TII GRADE TO MAXMARKS and RETURN MAXMARKS\n $output=$part->maxmarks;\n $post->oid=$objectid;\n $post->score=$output;\n if (!is_null($loaderbar)) {\n $loaderbar->total=$loaderbar->total+1;\n }\n $tii->setGradeMark($post,get_string('correctingovergrade','turnitintool'));\n }\n return $output;\n}", "public function update_maxgrade() {\n global $DB;\n\n $grade = 0;\n foreach ($this->get_main_block()->get_children() as $child) {\n if ($child->is_question()) {\n $question = question_bank::load_question($child->get_element()->id, false);\n $mark = $question->defaultmark;\n $grade += $mark;\n }\n }\n\n if ($grade != $this->maxgrade) {\n $record = new stdClass();\n $record->id = $this->id;\n $record->maxgrade = $grade;\n $DB->update_record('ddtaquiz', $record);\n $this->maxgrade = $grade;\n }\n }", "function updateImportance($sens)\n\t{\n\t\t$_SESSION['importance']=$_SESSION['importance']+(5*$sens);\n\t}", "function quiz_calculate_best_grade($quiz, $attempts) {\n\n switch ($quiz->grademethod) {\n\n case QUIZ_ATTEMPTFIRST:\n foreach ($attempts as $attempt) {\n return $attempt->sumgrades;\n }\n break;\n\n case QUIZ_ATTEMPTLAST:\n foreach ($attempts as $attempt) {\n $final = $attempt->sumgrades;\n }\n return $final;\n\n case QUIZ_GRADEAVERAGE:\n $sum = 0;\n $count = 0;\n foreach ($attempts as $attempt) {\n $sum += $attempt->sumgrades;\n $count++;\n }\n return (float)$sum/$count;\n\n default:\n case QUIZ_GRADEHIGHEST:\n $max = 0;\n foreach ($attempts as $attempt) {\n if ($attempt->sumgrades > $max) {\n $max = $attempt->sumgrades;\n }\n }\n return $max;\n }\n}", "function game_score_to_grade($score, $game) {\n if ($score) {\n return round($score*$game->grade, $game->decimalpoints);\n } else {\n return 0;\n }\n}", "public function getRegenIncreasePerLevel() : float;", "public function process_grade($data)\n {\n global $DB;\n\n $data = (object)$data;\n $oldid = $data->id;\n\n $oldquestionid = $this->get_old_parentid('question');\n $newquestionid = $this->get_new_parentid('question');\n\n if ($this->is_question_created()) {\n $data->questionid = $newquestionid;\n $newitemid = $DB->insert_record('qtype_amthauer6_grades', $data);\n } else {\n $originalrecords = $DB->get_records('qtype_amthauer6_grades', ['questionid' => $newquestionid]);\n foreach ($originalrecords as $record) {\n if ($data->amount == $record->amount && $data->value == $record->value && $data->userid == $record->userid) {\n $newitemid = $record->id;\n }\n }\n }\n if (!$newitemid) {\n $info = new stdClass();\n $info->filequestionid = $oldquestionid;\n $info->dbquestionid = $newquestionid;\n $info->answer = $data->value;\n throw new restore_step_exception('error_question_answers_missing_in_db', $info);\n } else {\n $this->set_mapping('qtype_amthauer6_grades', $oldid, $newitemid);\n }\n }", "public function updateNumRound()\n {\n \t\t\tif($SeaId != SeaType::SEA_4)\n\t\t\t{\n $RId = 1 ;\n foreach($this->Monster as $RoundId => $arr)\n {\n if(empty($arr))\n {\n $RId++ ; \n }\n }\n\n \n $RId = $RId > count($this->Monster)?count($this->Monster): $RId ;\n \n if($this->RoundNum != $RId)\n {\n $this->RoundNum = $RId ;\n Zf_log::write_act_log(Controller::$uId,0,15,'nextRound',0,0,$this->SeaId,$RId);\n }\n}\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify the received response.
public function verifyResponse() { $method = $this->getMethod(); $uuid = $this->getUUID(); $signature = $this->getSignature(); $data = $this->getData(); return $this->verifySignedData($method, $uuid, $signature, $data); }
[ "public function checkResponse()\n {\n $this->setUpValidator();\n $this->setUpStorage();\n $this->setUpGenerator();\n $this->sendClientRequest();\n $this->validateResponse();\n }", "private function responseCheck() {\n if ($this->response == null) {\n return false;\n } else {\n $decoded = json_decode($this->response, true);\n\n if (isset($decoded[\"status\"]) && ($decoded[\"status\"] == \"DECLINED\" )) {\n if ($this->responseStatus == 401) {\n return $this->reSend();\n } else {\n $apiResponse = json_decode($this->response);\n $this->response = \"\";\n $Errors = new Errors;\n return $Errors->setError(\"ApiReason\", $apiResponse->message);\n }\n } else {\n return self::setDataCache();\n }\n }\n// print_r($this->response);\n }", "public function isResponseValid(): bool;", "public function validateResponse(): bool\n {\n $responseArray = json_decode($this->apiResponse, true);\n\n return\n $responseArray['success'] &&\n $responseArray['action'] == $this->reCaptchaAction &&\n $responseArray['score'] >= $this->threshold &&\n $responseArray['hostname'] == $_SERVER['SERVER_NAME'];\n }", "public function handlesResponse(): bool;", "public function verifyrequest()\n {\n }", "public function check_response() \n {\n if (!empty($_POST) && $this->validate_signature()) {\n $posted = wp_unslash($_POST);\n\n do_action('valid-hitpay-notification-request', $posted);\n exit;\n }\n\n wp_die('HitPay Notification Failed', 'HitPay Notification', array('response' => 500));\n }", "Function checkResponse($response)\n\t {\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t//$this->assertContains('\"Status\":1', (string)$response->getBody());\n\t\t//$this->assertNotContains('\"Status\":0', (string)$response->getBody());\n\t\t$this->assertRegExp('/{\"Status\":0,\"Message\":\".*\"}/', (string)$response->getBody());\n\t }", "protected function _checkResponse()\n {\n if (!$this->getCheckout()->getPayboxQuoteId()) {\n $this->norouteAction();\n return;\n }\n\n if (!$this->getCheckout()->getPayboxOrderId()) {\n $this->norouteAction();\n return;\n }\n\n if (!$this->getCheckout()->getPayboxPaymentAction()) {\n $this->norouteAction();\n return;\n }\n\n if (!$this->_payboxResponse) {\n return false;\n }\n\n //check for valid response\n if ($this->getModel()->checkResponse($this->_payboxResponse)) {\n return true;\n }\n\n return true;\n }", "public function checkResponse()\n {\n header('HTTP/1.1 200 OK');\n\n $req = 'cmd=_notify-validate';\n\n foreach ($_POST as $key => $value) {\n $value = urlencode(stripslashes($value));\n $req .= \"&$key=$value\";\n }\n\n $header = \"POST /cgi-bin/webscr HTTP/1.1\\r\\n\";\n $header .= \"Content-Length: \" . strlen($req) . \"\\r\\n\";\n $header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n $header .= \"Host: www\" . ($this->isTestMode() ? '.sandbox' : '') . \".paypal.com\\r\\n\";\n $header .= \"Connection: close\\r\\n\\r\\n\";\n\n $fp = fsockopen('tls://www' . ($this->isTestMode() ? '.sandbox' : '') . '.paypal.com', 443, $errno, $errstr, 30);\n\n if ($fp) {\n fputs($fp, $header . $req);\n\n while (!feof($fp)) {\n $res .= fgets($fp, 1024);\n }\n fclose($fp);\n\n // Process paypal response\n $arr = explode(\"\\r\\n\\r\\n\", $res);\n $arr[1] = trim(preg_replace('/\\d/', '', $arr[1]));\n if (strcmp($arr[1], 'VERIFIED') == 0 || (strcmp($arr[1], 'INVALID') == 0 && $this->isTestMode())) {\n return true;\n }\n }\n\n return false;\n }", "public function verifyRequest()\n {\n }", "public function validateResponse($response);", "function getResponseStatus( $response ) {\n\t\t//this function is only supposed to make sure the communication was well-formed... \n\t\tif ( is_array( $response ) && array_key_exists( 'RESULT', $response ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private function verify_decoded_response( $form, $response ) {\n\t\t$decoded_response = $this->get_decoded_recaptcha_response( $response );\n\n\t\t// No decoded object.\n\t\tif ( ! is_object( $decoded_response ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Not a time that we need to verify the decoded object.\n\t\tif ( ! GFFormDisplay::is_last_page( $form ) || $this->is_on_last_page( $form ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (\n\t\t\t$decoded_response->success === true\n\t\t\t&& ! empty( $decoded_response->token )\n\t\t\t&& gmdate( time() ) <= strtotime( '+1 day', strtotime( $decoded_response->challenge_ts ) )\n\t\t);\n\t}", "private function checkResponseIsSet()\n {\n if ($this->response === null) {\n $this->fail('Must call route() before assertions');\n }\n }", "public function hasResponse()\n {\n return true;\n }", "public function verify() {\n\t\tif(isset($this->controller->request->query['hub_challenge'])) {\n\t\t\techo $this->controller->request->query['hub_challenge'];\n\t\t\tdie();//This is the ugly bit, we just \n\t\t} else {\n\t\t\t$input = file_get_contents(\"php://input\");\n\t\t\tif(hash_hmac('sha1', $input, Configure::read('Instagram.secret')) == $this->controller->request->header('X-Hub-Signature')) {\n\t\t\t\treturn $this->process($input);\t\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function hasResponse()\n\t{\n\t\treturn (isset($this->raw['response']));\n\t}", "protected function checkResponse($response)\n {\n $trans_gif_64 = \"R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\";\n $expectedResponse = base64_decode($trans_gif_64);\n $this->assertEquals($expectedResponse, $response, \"Expected GIF beacon, got: <br/>\\n\" . $response .\"<br/>\\n\");\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation getBarcodeRecognizeWithHttpInfo Recognize barcode from a file on server.
public function getBarcodeRecognizeWithHttpInfo(Requests\GetBarcodeRecognizeRequest $request) { $returnType = '\Aspose\BarCode\Model\BarcodeResponseList'; $request = $this->GetBarcodeRecognizeRequest($request); try { $options = $this->_createHttpClientOption(); try { $response = $this->client->send($request, $options); } catch (RequestException $e) { throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null); } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { if ($statusCode === 401) { $this->_requestToken(); throw new RepeatRequestException('Request must be retried', $statusCode, $response->getHeaders(), $response->getBody()); } throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $request->getUri()), $statusCode, $response->getHeaders(), $response->getBody()); } $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = $responseBody->getContents(); if ($returnType !== 'string') { $content = json_decode($content); } } if ($this->config->getDebug()) { $this->_writeResponseLog($statusCode, $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, [])); } return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize($e->getResponseBody(), '\Aspose\BarCode\Model\BarcodeResponseList', $e->getResponseHeaders()); $e->setResponseObject($data); break; } throw $e; } }
[ "public function getBarcodeRecognize(Requests\\GetBarcodeRecognizeRequest $request)\n {\n try {\n list($response) = $this->getBarcodeRecognizeWithHttpInfo($request);\n return $response;\n } catch (RepeatRequestException $e) {\n list($response) = $this->getBarcodeRecognizeWithHttpInfo($request);\n return $response;\n }\n }", "public function putBarcodeRecognizeFromBody(Requests\\PutBarcodeRecognizeFromBodyRequest $request)\n {\n try {\n list($response) = $this->putBarcodeRecognizeFromBodyWithHttpInfo($request);\n return $response;\n } catch (RepeatRequestException $e) {\n list($response) = $this->putBarcodeRecognizeFromBodyWithHttpInfo($request);\n return $response;\n }\n }", "public function putBarcodeRecognizeFromBodyAsyncWithHttpInfo(Requests\\PutBarcodeRecognizeFromBodyRequest $request)\n {\n $returnType = '\\Aspose\\BarCode\\Model\\BarcodeResponseList';\n $request = $this->PutBarcodeRecognizeFromBodyRequest($request);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, []));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n //$this->_refreshToken();\n throw new RepeatRequestException('Request must be retried', $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function imageOcrPhotoRecognizeBusinessCardWithHttpInfo($image_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\BusinessCardRecognitionResult';\n $request = $this->imageOcrPhotoRecognizeBusinessCardRequest($image_file);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\BusinessCardRecognitionResult',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function convertDocumentAutodetectGetInfoWithHttpInfo($input_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\AutodetectGetInfoResult';\n $request = $this->convertDocumentAutodetectGetInfoRequest($input_file);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\AutodetectGetInfoResult',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function recognizeDetectObjectsWithHttpInfo($image_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\ObjectDetectionResult';\n $request = $this->recognizeDetectObjectsRequest($image_file);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\ObjectDetectionResult',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function editTextTextEncodingDetectWithHttpInfo($input_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\TextEncodingDetectResponse';\n $request = $this->editTextTextEncodingDetectRequest($input_file);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TextEncodingDetectResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function recognizeDetectPeopleWithHttpInfo($image_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\ObjectDetectionResult';\n $request = $this->recognizeDetectPeopleRequest($image_file);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\ObjectDetectionResult',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function recognizeSimilarityCompareWithHttpInfo($base_image, $comparison_image, $recognition_mode = null)\n {\n $returnType = 'string';\n $request = $this->recognizeSimilarityCompareRequest($base_image, $comparison_image, $recognition_mode);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'string',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function validateDocumentAutodetectValidationWithHttpInfo($input_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\AutodetectDocumentValidationResult';\n $request = $this->validateDocumentAutodetectValidationRequest($input_file);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\AutodetectDocumentValidationResult',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function recognizeDetectTextLargeAsyncWithHttpInfo($image_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\TextDetectionResult';\n $request = $this->recognizeDetectTextLargeRequest($image_file);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function scanFileAsyncWithHttpInfo($input_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\VirusScanResult';\n $request = $this->scanFileRequest($input_file);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function getBarcodeGenerateWithHttpInfo(Requests\\GetBarcodeGenerateRequest $request)\n {\n $returnType = '\\SplFileObject';\n $request = $this->GetBarcodeGenerateRequest($request);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\"[{$e->getCode()}] {$e->getMessage()}\", $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null);\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n if ($statusCode === 401) {\n $this->_requestToken();\n throw new RepeatRequestException('Request must be retried', $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $request->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($statusCode, $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, []));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), '\\SplFileObject', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), '\\Aspose\\BarCode\\Model\\ApiErrorResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function v1getCamerasWithHttpInfo()\n {\n $returnType = '\\Samsara\\Php\\Client\\Model\\V1VisionCamerasResponse';\n $request = $this->v1getCamerasRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Samsara\\Php\\Client\\Model\\V1VisionCamerasResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 0:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Samsara\\Php\\Client\\Model\\V1ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function recognizeDetectObjectsAsyncWithHttpInfo($image_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\ObjectDetectionResult';\n $request = $this->recognizeDetectObjectsRequest($image_file);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function barcodeReaderBarcodeReaderGet($apikey = null, $propertiesStartPageIndex = null, $propertiesEndPageIndex = null, $propertiesCustomAreaX = null, $propertiesCustomAreaY = null, $propertiesCustomAreaWidth = null, $propertiesCustomAreaHeight = null, $propertiesCustomAreaLeft = null, $propertiesCustomAreaTop = null, $propertiesCustomAreaWidth2 = null, $propertiesCustomAreaHeight2 = null, $propertiesScanArea = null, $propertiesBarcodeTypesToFindEan8 = null, $propertiesBarcodeTypesToFindGtin8 = null, $propertiesBarcodeTypesToFindEan13 = null, $propertiesBarcodeTypesToFindGtin13 = null, $propertiesBarcodeTypesToFindUpce = null, $propertiesBarcodeTypesToFindUpca = null, $propertiesBarcodeTypesToFindGtin12 = null, $propertiesBarcodeTypesToFindInterleaved2of5 = null, $propertiesBarcodeTypesToFindCirculari2of5 = null, $propertiesBarcodeTypesToFindItf14 = null, $propertiesBarcodeTypesToFindGtin14 = null, $propertiesBarcodeTypesToFindCode39 = null, $propertiesBarcodeTypesToFindCode39Extended = null, $propertiesBarcodeTypesToFindCode39Mod43 = null, $propertiesBarcodeTypesToFindCode39Mod43Extended = null, $propertiesBarcodeTypesToFindPzn = null, $propertiesBarcodeTypesToFindUpu = null, $propertiesBarcodeTypesToFindCode128 = null, $propertiesBarcodeTypesToFindEan2 = null, $propertiesBarcodeTypesToFindEan5 = null, $propertiesBarcodeTypesToFindGs1 = null, $propertiesBarcodeTypesToFindCodabar = null, $propertiesBarcodeTypesToFindTrioptic = null, $propertiesBarcodeTypesToFindPatchCode = null, $propertiesBarcodeTypesToFindGs1DataBarOmnidirectional = null, $propertiesBarcodeTypesToFindGs1DataBarExpanded = null, $propertiesBarcodeTypesToFindGs1DataBarLimited = null, $propertiesBarcodeTypesToFindGs1DataBarStacked = null, $propertiesBarcodeTypesToFindGs1DataBarExpandedStacked = null, $propertiesBarcodeTypesToFindPdf417 = null, $propertiesBarcodeTypesToFindDataMatrix = null, $propertiesBarcodeTypesToFindQrCode = null, $propertiesBarcodeTypesToFindAztec = null, $propertiesBarcodeTypesToFindMaxiCode = null, $propertiesBarcodeTypesToFindMicr = null, $propertiesBarcodeTypesToFindIntelligentMail = null, $propertiesBarcodeTypesToFindRoyalMail = null, $propertiesBarcodeTypesToFindRoyalMailKIX = null, $propertiesBarcodeTypesToFindAustralianPostCode = null, $propertiesBarcodeTypesToFindCodablockF = null, $propertiesBarcodeTypesToFindCode16K = null, $propertiesBarcodeTypesToFindPostNet = null, $propertiesBarcodeTypesToFindMicroPDF = null, $propertiesBarcodeTypesToFindCode93 = null, $propertiesBarcodeTypesToFindMsi = null, $propertiesBarcodeTypesToFindPharmacode = null, $propertiesBarcodeTypesToFindSegment = null, $propertiesBarcodeTypesToFindCircle = null, $propertiesBarcodeTypesToFindOval = null, $propertiesBarcodeTypesToFindCheckbox = null, $propertiesBarcodeTypesToFindHorizontalLine = null, $propertiesBarcodeTypesToFindVerticalLine = null, $propertiesBarcodeTypesToFindUnderlinedField = null, $propertiesBarcodeTypesToFindAll1D = null, $propertiesBarcodeTypesToFindAll2D = null, $propertiesBarcodeTypesToFindAllOMRElements = null, $propertiesBarcodeTypesToFindAll = null, $propertiesOrientation = null, $propertiesSearchNegative = null, $propertiesRequireQuietZones = null, $propertiesMaxNumberOfBarcodesPerPage = null, $propertiesDecodingTimeOut = null, $propertiesLastDecodingTimeOutExceeded = null, $propertiesMaxNumberOfBarcodesPerDocument = null, $propertiesAllowOrphanedSupplementals = null, $propertiesMinimalDataLength = null, $propertiesMediumTrustLevelCompatible = null, $propertiesOptimizedProcessingOfLargeImages = null, $propertiesOptimizedProcessingOfLargeImagesSizeLimit = null, $propertiesRemoveNoize = null, $propertiesNoiseRemovalFilterSize = null, $propertiesNoiseRemovalFilterType = null, $propertiesColorConversionMode = null, $propertiesContrast = null, $propertiesTextEncoding = null, $propertiesTextEncodingCodePage = null, $propertiesTextEncodingUseUTF8 = null, $propertiesPdfReadingMode = null, $propertiesPdfRenderingResolution = null, $propertiesPdfRenderText = null, $outputType = null, $input = null, $inputType = null)\n {\n list($response, $statusCode, $httpHeader) = $this->barcodeReaderBarcodeReaderGetWithHttpInfo ($apikey, $propertiesStartPageIndex, $propertiesEndPageIndex, $propertiesCustomAreaX, $propertiesCustomAreaY, $propertiesCustomAreaWidth, $propertiesCustomAreaHeight, $propertiesCustomAreaLeft, $propertiesCustomAreaTop, $propertiesCustomAreaWidth2, $propertiesCustomAreaHeight2, $propertiesScanArea, $propertiesBarcodeTypesToFindEan8, $propertiesBarcodeTypesToFindGtin8, $propertiesBarcodeTypesToFindEan13, $propertiesBarcodeTypesToFindGtin13, $propertiesBarcodeTypesToFindUpce, $propertiesBarcodeTypesToFindUpca, $propertiesBarcodeTypesToFindGtin12, $propertiesBarcodeTypesToFindInterleaved2of5, $propertiesBarcodeTypesToFindCirculari2of5, $propertiesBarcodeTypesToFindItf14, $propertiesBarcodeTypesToFindGtin14, $propertiesBarcodeTypesToFindCode39, $propertiesBarcodeTypesToFindCode39Extended, $propertiesBarcodeTypesToFindCode39Mod43, $propertiesBarcodeTypesToFindCode39Mod43Extended, $propertiesBarcodeTypesToFindPzn, $propertiesBarcodeTypesToFindUpu, $propertiesBarcodeTypesToFindCode128, $propertiesBarcodeTypesToFindEan2, $propertiesBarcodeTypesToFindEan5, $propertiesBarcodeTypesToFindGs1, $propertiesBarcodeTypesToFindCodabar, $propertiesBarcodeTypesToFindTrioptic, $propertiesBarcodeTypesToFindPatchCode, $propertiesBarcodeTypesToFindGs1DataBarOmnidirectional, $propertiesBarcodeTypesToFindGs1DataBarExpanded, $propertiesBarcodeTypesToFindGs1DataBarLimited, $propertiesBarcodeTypesToFindGs1DataBarStacked, $propertiesBarcodeTypesToFindGs1DataBarExpandedStacked, $propertiesBarcodeTypesToFindPdf417, $propertiesBarcodeTypesToFindDataMatrix, $propertiesBarcodeTypesToFindQrCode, $propertiesBarcodeTypesToFindAztec, $propertiesBarcodeTypesToFindMaxiCode, $propertiesBarcodeTypesToFindMicr, $propertiesBarcodeTypesToFindIntelligentMail, $propertiesBarcodeTypesToFindRoyalMail, $propertiesBarcodeTypesToFindRoyalMailKIX, $propertiesBarcodeTypesToFindAustralianPostCode, $propertiesBarcodeTypesToFindCodablockF, $propertiesBarcodeTypesToFindCode16K, $propertiesBarcodeTypesToFindPostNet, $propertiesBarcodeTypesToFindMicroPDF, $propertiesBarcodeTypesToFindCode93, $propertiesBarcodeTypesToFindMsi, $propertiesBarcodeTypesToFindPharmacode, $propertiesBarcodeTypesToFindSegment, $propertiesBarcodeTypesToFindCircle, $propertiesBarcodeTypesToFindOval, $propertiesBarcodeTypesToFindCheckbox, $propertiesBarcodeTypesToFindHorizontalLine, $propertiesBarcodeTypesToFindVerticalLine, $propertiesBarcodeTypesToFindUnderlinedField, $propertiesBarcodeTypesToFindAll1D, $propertiesBarcodeTypesToFindAll2D, $propertiesBarcodeTypesToFindAllOMRElements, $propertiesBarcodeTypesToFindAll, $propertiesOrientation, $propertiesSearchNegative, $propertiesRequireQuietZones, $propertiesMaxNumberOfBarcodesPerPage, $propertiesDecodingTimeOut, $propertiesLastDecodingTimeOutExceeded, $propertiesMaxNumberOfBarcodesPerDocument, $propertiesAllowOrphanedSupplementals, $propertiesMinimalDataLength, $propertiesMediumTrustLevelCompatible, $propertiesOptimizedProcessingOfLargeImages, $propertiesOptimizedProcessingOfLargeImagesSizeLimit, $propertiesRemoveNoize, $propertiesNoiseRemovalFilterSize, $propertiesNoiseRemovalFilterType, $propertiesColorConversionMode, $propertiesContrast, $propertiesTextEncoding, $propertiesTextEncodingCodePage, $propertiesTextEncodingUseUTF8, $propertiesPdfReadingMode, $propertiesPdfRenderingResolution, $propertiesPdfRenderText, $outputType, $input, $inputType);\n return $response; \n }", "function readBarcode($apiKey, $barcodeTypesToFind, $uploadedFileId) \n{\n $url = \"https://bytescout.io/api/v1/barcodereader/read?apiKey=\" . $apiKey;\n \n // Create Barcode Reader options\n $options = array(\n \"properties\" => array(\n \"startPageIndex\" => 0,\n \"endPageIndex\" => 0,\n \"barcodeTypesToFind\" => array(),\n \"pdfRenderingResolution\" => 300\n ),\n \"inputType\" => \"fileId\",\n \"input\" => $uploadedFileId,\n \"outputType\" => \"content\"\n );\n // Fill selected barcode types\n foreach ($barcodeTypesToFind as &$barcodeType)\n $options[\"properties\"][\"barcodeTypesToFind\"][$barcodeType] = true;\n\n // Create request\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\"Content-type: application/json\"));\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($options));\n // Execute request\n $result = curl_exec($curl);\n \n if (curl_errno($curl))\n {\n // Display request error\n echo \"Error: \" . curl_error($curl);\n }\n else // Display request results\n {\n $status_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n if ($status_code == 200)\n {\n // Display decoding results\n echo \"<div><h2>Decoding Results:</h2><pre>\" . $result . \"</pre></div>\";\n }\n else\n {\n // Display service reported errors\n echo \"<p>Status code: \" . $status_code . \"</p>\"; \n echo \"<p>\" . $result . \"</p>\"; \n }\n }\n \n // Cleanup\n curl_close($curl);\n}", "public function recognizeDetectTextFineAsyncWithHttpInfo($image_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\FineTextDetectionResult';\n $request = $this->recognizeDetectTextFineRequest($image_file);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function recognizeDetectPeopleAsyncWithHttpInfo($image_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\ObjectDetectionResult';\n $request = $this->recognizeDetectPeopleRequest($image_file);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the review state for a given item. Will produce errors if the item doesn't match up with the given value.
public function setReviewState($name, $reviewedValue, $isValid) { if (!isset($this->statusData->$name) || $this->statusData->$name->draft != $reviewedValue) { throw new Exception("Cannot set review of '$name' for non-existent draft", E_MALFORMED_REQUEST); } $item = $this->statusData->$name; $item->reviewed = true; if ($isValid === true) { $item->live = $item->draft; } }
[ "public function setItemNeedReview(?int $value): void {\n $this->getBackingStore()->set('itemNeedReview', $value);\n }", "public function setStatus( int $value ) : \\Aimeos\\MShop\\Common\\Item\\Iface\n\t{\n\t\treturn $this->set( 'review.status', $value );\n\t}", "public function setReview($value)\n {\n $this->review = $value;\n }", "public function itemSetState(OrderItem $item, $state);", "public function set(string $item, $value): void;", "static function setGridItemState($griditem_id=0,$value='')\r\n\t{\r\n\t\t$foundlocation = self::searchGriditemById($griditem_id);\t\t\r\n\t\tif ($foundlocation['scene_id'] != '0')\r\n\t\t{\t\t\t\r\n\t\t\t$itemstate = self::getGridItemItemState($griditem_id,$value);\t\t\t\r\n\t\t\t$iteminfo = self::getGriditemsInfo();\r\n\t\t\t$item = $iteminfo[$foundlocation['scene_id']]['griditems'][$foundlocation['cell_id']];\r\n\t\t\t$item['itemstate_id'] = $itemstate[$griditem_id]->id;\r\n\t\t\t$iteminfo[$foundlocation['scene_id']]['griditems'][$foundlocation['cell_id']] = $item;\r\n\t\t\tself::setGriditemsInfo($iteminfo);\r\n\t\t\tStorydata::set($item['slug'],$value);\t\t\t\r\n\t\t}\r\n\t}", "public function setCode( string $value ) : \\Aimeos\\MShop\\Review\\Item\\Iface\n\t{\n\t\treturn $this->set( 'review.code', $this->checkCode( $value ) );\n\t}", "public function setPost($item, $value){\n\t\t$this->post_valid[$item] = $value;\n\t\t$this->post[$item] = $value;\n\t}", "function setReview($new_review){\n $this->review = (string) $new_review;\n }", "public function setReviews($value)\n {\n $this->reviews = $value;\n }", "protected function setItem(Item $item)\n {\n $this->item = $item;\n }", "public function setReviewNum($value) {\n return $this->set(self::REVIEW_NUM, $value);\n }", "public function setReviewSet(?ReviewSet $value): void {\n $this->getBackingStore()->set('reviewSet', $value);\n }", "private function setCurrentTierItemData($tierItem, \\Magento\\Quote\\Model\\Quote\\Item &$item)\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$tierItem->setItem($item)->setSelected();\n $this->getQuote()->setTotalsCollectedFlag(false);\n\t\t}\n\t}", "public function setValue(DBItem $item, $value){\n\t\t$item->setRealValue($this->name, $value);\n\t}", "protected function set__reviews( $val )\n\t{\n\t\t$this->record_reviews = (int) $val;\n\t}", "public function rateItem($item_id, $user_id, $rating) {\n\n // get current rating if one exists\n $oldRating = $this->findByItemIdAndUserId($item_id, $user_id);\n\n // coerce to range 1-10 (0.5 to 5)\n $rating = min(max($rating, 1), 10);\n\n if (empty($oldRating)) {\n return $this->save(array(\n 'item_id' => $item_id,\n 'user_id' => $user_id,\n 'rating' => $rating\n ));\n } else if ($rating != $oldRating['Rating']['rating']) {\n $oldRating['Rating']['rating'] = $rating;\n return $this->save($oldRating);\n } else {\n // new rating matched old one\n return true;\n }\n }", "protected function set__reviews( $val )\n\t{\n\t\t\n\t}", "private static function _getReviewState($item)\n\t{\n\t\tif (empty($item) || empty($item->reviewed))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\treturn isset($item->live) && $item->live === $item->draft;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Back button handler //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Back button handler submit handler. Since limit_validation_errors = array() is set, values from page 2 will be discarded. We load the page 1 values instead.
function form_reg_user_page_2_back($form, &$form_state) { $form_state['values'] = $form_state['page_values'][1]; $form_state['page_num'] = 1; $form_state['rebuild'] = TRUE; }
[ "public function onBackForm()\n {\n // Load another page\n AdiantiCoreApplication::loadPage('MultiStepMultiFormView', 'onLoadFromSession');\n }", "function back()\r\n\t{\r\n\t\t//leave page\r\n\t\tif ( $this->previousUrl != \"\" ) {\r\n\t\t\t$this->redirect( $this->previousUrl );\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->reload();\r\n\t\t}\r\n\t}", "function OnGoBack(){\n if (strlen($this->host_library_ID))\n $this->library_ID = $this->host_library_ID;\n\n if ($this->is_context_frame)\n\t\t\t$url = \"?package=context&page=contextframe&event=close\";\n\t\telse\n\t\t\t$url =\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&\" . $this->restore;\n\n $this->AfterSubmitRedirect($url);\n }", "protected function _go_back()\n\t{\n\t\tif ($this->_prev_page)\n\t\t{\n\t\t\t$this->request->redirect($this->_prev_page);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->request->redirect('/');\n\t\t}\t\t\n\t}", "function globallink_interface_receive_pager_form_submit($form, &$form_state) {\r\n $op = $form_state['values']['op'];\r\n\r\n if ($op != t('Go')) {\r\n return;\r\n }\r\n\r\n $page_count = $form_state['input']['p_count'];\r\n\r\n if (!is_numeric($page_count) || $page_count < 1) {\r\n form_set_error('', t('Invalid Page Count.'));\r\n }\r\n else {\r\n $_SESSION['globallink_interface_receive_page_count'] = array($page_count);\r\n\r\n return;\r\n }\r\n}", "public final function setBackPage()\n {\n $this->_setVar($this->_back_page, $this->getCurrentPage());\n $_SESSION[self::SESSION_NAME][$this->getPagingModel()][self::SESSION_NAME_BACK] = $this->_back_page;\n }", "public function button_Next_and_back_pagination(){\n\n if (isset($_POST[\"siguiente\"])) { //si ha pulsado el boton siguiente\n $pedidos = new Pedidos(); //llaamos a la clase del modelo models/pedidos.php\n $_POST[\"paginaActual\"]++;//le sumamos 1 al campo input y este dato va a la bbdd modelo pedidos.php funcion showAllPedidosandUser() para que pueda operar con el\n\n $misPedidos = $pedidos->showAllPedidosandUser(); //almacenamos en $misPedidos la llamada al metodo para mostrar todos los pedidos. Y la usamos en la vista que incluimos abajo\n\n $numerodePaginas = $pedidos->countRowPedidos();\n\n\n }\n\n if (isset($_POST[\"anterior\"])) {\n $pedidos = new Pedidos(); //llaamos a la clase del modelo models/pedidos.php\n $_POST[\"paginaActual\"]--;//le restamos 1 al campo input de la pagina actual y este dato va a la bbdd modelo pedidos.php funcion showAllPedidosandUser() para que pueda operar con el\n\n $misPedidos = $pedidos->showAllPedidosandUser(); //almacenamos en $misPedidos la llamada al metodo para mostrar todos los pedidos. Y la usamos en la vista que incluimos abajo\n\n $numerodePaginas = $pedidos->countRowPedidos();\n }\n\n\n\n require_once 'views/layout/header_and_navbar.php';\n require_once \"views/pedido/administrarPedidos.php\";\n\n if ($_POST[\"paginaActual\"]<=1) { //si el numero del input que recibimos de la paginaActual es menor o = a 1 le agregamos el atributo disabled al boton para que no pueda ir para atras mas veces y de error\n\n echo '<script type=\"text/javascript\">' .\n 'document.getElementById(\"anterior\").setAttribute(\"disabled\",\"true\")' .\n '</script>';\n }\n\n if ($_POST[\"paginaActual\"]>=$numerodePaginas) {//si el numero del input que recibimos de la paginaActual es mayor o = al $numerodePaginas le agregamos el atributo disabled al boton para que no pueda ir para siguiente mas veces y de error\n\n echo '<script type=\"text/javascript\">' .\n 'document.getElementById(\"siguiente\").setAttribute(\"disabled\",\"true\")' .\n '</script>';\n }\n\n\n }", "public function beforeGoBack()\n {\n return;\n }", "public function redirectBack()\n {\n $this->redirect($this->getRequest()->previousUrl());\n }", "function islandora_ingest_form_previous_button(array &$form_state) {\n // Before we move back to the previous step we should tell the previous steps\n // to undo whatever its submit handler did.\n $prev_form_step = islandora_ingest_form_get_previous_form_step($form_state);\n $form_id = $prev_form_step['form_id'];\n $submit_callback = $form_id . '_undo_submit';\n $submit = function_exists($submit_callback) ? array('islandora_ingest_form_previous_submit', $submit_callback) : array('islandora_ingest_form_previous_submit');\n return array(\n '#type' => 'submit',\n '#value' => t('Previous'),\n '#name' => 'prev',\n '#submit' => $submit,\n // #limit_validation_errors, is why when the previous button is pressed no\n // values persisted in the form_state, but its also what allows us to go\n // back when validation errors occur. To have a better solution going\n // forward we can either limit validation only on required fields, or we can\n // convert all required fields to use #element_validation functions, and\n // Remove the need for #limit_validation_errors. Or maybe there is some\n // other solution, regardless of what it is, it won't be standard.\n '#limit_validation_errors' => array(),\n );\n}", "private function back(){\n \t$params = array(\n \t\t\t'page'=>intval(I('p')) ? intval(I('p')) : 1,\n \t\t\t'pagesize'=>$this->pagesize,\n \t\t\t'type'=>Status::AfterSaleBack,\n \t);\n \tif (session('distributor_id')) {\n \t\t$params['distributor_id'] = session('distributor_id');\n \t}\n \t$result = $this->afterSalesService()->getPagerList($params);\n \t$this->assign('back_list', $result['list']);\n }", "public function mci_multistep_Form_Page_2_Submit(array &$form, FormStateInterface $form_state) {\n\n $form_state\n ->set('page_values_2', [\n // Keep only first step values to minimize stored data.\n 'color' => $form_state->getValue('color')\n ])\n ->set('page_num', 3)\n ->setRebuild(TRUE);\n }", "function goback(){\n\tif (isset($_POST['exit'])) {\n\t\theader('Location: index.php');\t\t\t// redirect to dashboard\n\t}\n}", "private function __goBack()\n {\n // Address where the user came\n $referer = $_SERVER['HTTP_REFERER'];\n\n if ( empty($referer) ) {\n $this->__goHome();\n }else{\n redirect($referer);\n }\n }", "public function goBackOnePage()\n {\n --$this->transactions[$this->transaction]->currentPage;\n }", "public function goBackWithErrors()\n {\n if (!session_id())\n {\n session_start();\n }\n\n $_SESSION[SESSION_DATA_KEY] = self::$errors;\n\n header('Location: '.$_SERVER['HTTP_REFERER']);\n exit;\n }", "protected function previousPageAction()\n {\n $this->previousPage();\n return $this->renderForm('list');\n }", "function globallink_webform_pager_form_submit($form, &$form_state) {\r\n $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';\r\n\r\n if ($op != t('Go')) {\r\n return;\r\n }\r\n\r\n $page_count = $form_state['input']['p_count'];\r\n\r\n $_SESSION['globallink_webform_page_count'] = array($page_count);\r\n\r\n return;\r\n}", "function returnToPrevPage()\n{\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test getting profile skill by profile id
public function testGetProfileSkillByProfileSkillProfileId(): void { // count the number of rows and save it for later $numRows = $this->getConnection()->getRowCount("profileSkill"); // create a new Profile Skill and insert into mySQL $profileSkill = new ProfileSkill($this->profile->getProfileId(), $this->skill->getSkillId()); $profileSkill->insert($this->getPDO()); // grab the data from mySQL and enforce the fields match our expectations $results = ProfileSkill::getProfileSkillsByProfileSkillProfileId($this->getPDO(), $this->profile->getProfileId()); $this->assertEquals($numRows + 1, $this->getConnection()->getRowCount("profileSkill")); $this->assertCount(1, $results); $this->assertContainsOnlyInstancesOf("Edu\\Cnm\\DeepDiveTutor\\profileSkill", $results); // grab the result from the array and validate it $pdoProfileSkill = $results[0]; $this->assertEquals($pdoProfileSkill->getProfileSkillProfileId(), $this->profile->getProfileId()); $this->assertEquals($pdoProfileSkill->getProfileSkillSkillId(), $this->skill->getSkillId()); }
[ "public function testGetProfileSkillByProfileSkillSkillId(): void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profileSkill\");\n\t\t// create a new Profile Skill and insert into mySQL\n\t\t$profileSkill = new ProfileSkill($this->profile->getProfileId(), $this->skill->getSkillId());\n\t\t$profileSkill->insert($this->getPDO());\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = ProfileSkill::getProfileSkillsByProfileSkillSkillId($this->getPDO(), $this->skill->getSkillId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profileSkill\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\DeepDiveTutor\\\\profileSkill\", $results);\n\t\t// grab the result from the array and validate it\n\t\t$pdoProfileSkill = $results[0];\n\t\t$this->assertEquals($pdoProfileSkill->getProfileSkillProfileId(), $this->profile->getProfileId());\n\t\t$this->assertEquals($pdoProfileSkill->getProfileSkillSkillId(), $this->skill->getSkillId());\n\t}", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testGetProfile()\n\t{\n\t\tprint 'Run test for #getProfile...';\n\t\t$api = new DefaultApi();\n\t\t$response = $this->provideApiKey($api, function ($api, $apiKey) {\n\t\t\treturn $api->getProfile(\n\t\t\t\t(new GetProfileRequest())\n\t\t\t\t\t->setApiKey($apiKey)\n\t\t\t);\n\t\t});\n\t\tprint($response);\n\t\t$this->assertEquals('ok', $response->getStatus());\n\t\t$this->assertNotEmpty($response->getCode());\n\t\t$this->assertNotNull($response->getProfile());\n\t\t$this->assertNotNull($response->getApp());\n\t\t$this->assertNotNull($response->getShareUrl());\n\t\t$this->assertNotNull($response->getRateUrl());\n\t\t$this->assertEquals(0, $response->getCredits());\n\t\t$this->assertEquals(0, $response->getCreditsTrans());\n\t\tprint('');\n\t}", "public function testProfileRead()\n {\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public function testGetProfiles(){\r\n $url = $this->_serviceurl.'expert/get-all-profiles';\r\n $parameters = array(\r\n 'user_token' =>'61eca780461009b470dbee788d846dc8', \r\n );\r\n $objUserWorkout = new \\lib\\Api\\Client($parameters, $this->_accessKey, $this->_secret, $url);\r\n $objUserWorkout->request(); \r\n }", "public function testProfileFindById()\n {\n\n }", "public function testGetProfileByProfileId() {\n\t\t// first, verify mySQL connected O\n\t\t$this->assertNotNull($this->mysqli);\n\n\t\t// second, create a profile to post to mySQL\n\t\t$this->profile = new Profile(null, $this->USER_ID, $this->FIRST_NAME, $this->MIDDLE_NAME, $this->LAST_NAME, $this->REP_SCORE);\n\n\t\t// third, insert the profile to mySQL\n\t\t$this->profile->insert($this->mysqli);\n\n\t\t// fourth, get the user using the static method\n\t\t$staticProfile = Profile::getProfileByProfileId($this->mysqli, $this->PROFILE_ID);\n\n\t\t// finally, compare the fields\n\t\t$this->assertNotNull($staticProfile->getProfileId());\n\t\t$this->assertTrue($staticProfile->getProfileId() > 0);\n\t\t$this->assertIdentical($staticProfile->getProfileId(),\t\t$this->profile->getProfileId());\n\t\t$this->assertIdentical($staticProfile->getUserId(),\t\t\t$this->USER_ID);\n\t\t$this->assertIdentical($staticProfile->getFirstName(),\t\t$this->FIRST_NAME);\n\t\t$this->assertIdentical($staticProfile->getMiddleName(),\t\t$this->MIDDLE_NAME);\n\t\t$this->assertIdentical($staticProfile->getLastName(),\t\t\t$this->LAST_NAME);\n\t\t$this->assertIdentical($staticProfile->getRepScore(),\t\t\t$this->REP_SCORE);\n\t}", "public function test_get_profile() {\n // Create some users.\n $user1 = self::getDataGenerator()->create_user();\n\n $user2 = new stdClass();\n $user2->country = 'AU';\n $user2->city = 'Perth';\n $user2 = self::getDataGenerator()->create_user($user2);\n\n // The person doing the search.\n $this->setUser($user1);\n\n // Get the profile.\n $profile = \\core_message\\api::get_profile($user1->id, $user2->id);\n\n $this->assertEquals($user2->id, $profile->userid);\n $this->assertEmpty($profile->email);\n $this->assertEmpty($profile->country);\n $this->assertEmpty($profile->city);\n $this->assertEquals(fullname($user2), $profile->fullname);\n $this->assertNull($profile->isonline);\n $this->assertFalse($profile->isblocked);\n $this->assertFalse($profile->iscontact);\n }", "public function testProfilePrototypeFindByIdAccessTokens()\n {\n\n }", "public function testProfileFindOne()\n {\n\n }", "public function testProfilePrototypeFindByIdCommunityRoles()\n {\n\n }", "public function testGetSingleProfile()\n {\n $profile = new Profile();\n $profile->setName(\"testProfile\");\n $profile->setDescription(\"testDescription\");\n $profile->setDevices(array(\"kvm\" => (array(\"type\" => \"unix-char\"))));\n $profile->setConfig(array(\"limits.memory\" => \"2GB\"));\n\n $this->em->persist($profile);\n $this->em->flush();\n\n $client = static::createClient();\n\n $client->request(\n 'GET',\n '/profiles/'.$profile->getId(),\n array(),\n array(),\n array(\n 'CONTENT_TYPE' => 'application/json',\n 'HTTP_Authorization' => $this->token\n )\n );\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertContains(\"testProfile\", $client->getResponse()->getContent());\n //TODO Add checks for all content\n\n $profile = $this->em->getRepository(Profile::class)->find($profile->getId());\n $this->em->remove($profile);\n $this->em->flush();\n }", "public function testRoleSkillv1rolesroleIdskills()\n {\n\n }", "public function test_profileFind() {\n\n }", "public function testGetProfile(): void\n {\n $model = ChromeExtensions::load([\n \"profile\" => \"profile\",\n ], $this->container);\n\n $this->assertSame(\"profile\", $model->getProfile());\n }", "public function test_customer_can_retrieve_own_profile_information()\n {\n $user = factory(User::class)->create();\n $response = $this->actingAs($user)->json('get', 'web/me');\n $retrievedUser = json_decode($response->getContent())->user;\n\n $this->assertEquals($retrievedUser->id, $user->id);\n }", "public function getProfile();", "public static function getUserProfileSkills(Profile $profile){\n\t\t$skills = $profile->skills;\n\t\treturn $skills->lists('id');\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
allow to change row data before rendering
public function changeRowData(&$row){}
[ "public function renderRow(): void\n {\n $this->tRow->set($this->model);\n\n if ($this->useHtmlTags) {\n // prepare row-specific HTML tags\n $htmlTags = [];\n\n foreach ($this->hook(Table\\Column::HOOK_GET_HTML_TAGS, [$this->model]) as $ret) {\n if (is_array($ret)) {\n $htmlTags = array_merge($htmlTags, $ret);\n }\n }\n\n foreach ($this->columns as $name => $columns) {\n if (!is_array($columns)) {\n $columns = [$columns];\n }\n $field = is_int($name) ? null : $this->model->getField($name);\n foreach ($columns as $column) {\n $htmlTags = array_merge($column->getHtmlTags($this->model, $field), $htmlTags);\n }\n }\n\n // Render row and add to body\n $this->tRow->dangerouslySetHtml($htmlTags);\n $this->tRow->set('dataId', (string) $this->model->getId());\n $this->template->dangerouslyAppendHtml('Body', $this->tRow->renderToHtml());\n $this->tRow->del(array_keys($htmlTags));\n } else {\n $this->template->dangerouslyAppendHtml('Body', $this->tRow->renderToHtml());\n }\n }", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "public function renderRow()\n {\n if ($this->model->hasRef('updated_by_user_id')) {\n $this->t_row->trySet('user', $this->model->ref('updated_by_user_id')->getTitle());\n }\n\n $diff = $this->model->get('request_diff') ?? [];\n\n if ($this->t_row->hasTag('changes') && count($diff) > 0) {\n $t_change = clone $this->t_row_change;\n $html = '';\n foreach ($diff as $field => [$old_value, $new_value]) {\n if ($field === 'id') {\n continue;\n }\n\n // if field is no more in the model schema\n if (!$this->linkedModel->hasField($field)) {\n continue;\n }\n\n if ($this->isEmptyOrNull($old_value) && $this->isEmptyOrNull($new_value)) {\n continue;\n }\n\n if ($this->linkedModel->getField($field) instanceof Field_SQL_Expression) {\n continue;\n }\n\n $t_change->trySet('field', $this->linkedModel->getField($field)->getCaption());\n $t_change->trySet('old_value', $this->normalizeValue($field, $old_value), false);\n $t_change->trySet('new_value', $this->normalizeValue($field, $new_value), false);\n $html .= $t_change->render();\n }\n $this->t_row->setHTML('changes', $html);\n } else {\n $this->t_row->del('changes');\n }\n\n return parent::renderRow();\n }", "function setRowInfo() {\n $this->_setRowDate();\n $this->_setRowUid();\n }", "function SetRow($row){}", "public function prepareRow($row) {\n return parent::prepareRow($row);\n }", "protected function _prepareRowsAction() {\n \n }", "function formatRow(){\n $this->hook('formatRow');\n }", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\tglobal $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->SEG_LAT->FormValue == $this->SEG_LAT->CurrentValue && is_numeric(ew_StrToFloat($this->SEG_LAT->CurrentValue)))\n\t\t\t$this->SEG_LAT->CurrentValue = ew_StrToFloat($this->SEG_LAT->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->SEG_LONG->FormValue == $this->SEG_LONG->CurrentValue && is_numeric(ew_StrToFloat($this->SEG_LONG->CurrentValue)))\n\t\t\t$this->SEG_LONG->CurrentValue = ew_StrToFloat($this->SEG_LONG->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->FP_Armada->FormValue == $this->FP_Armada->CurrentValue && is_numeric(ew_StrToFloat($this->FP_Armada->CurrentValue)))\n\t\t\t$this->FP_Armada->CurrentValue = ew_StrToFloat($this->FP_Armada->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->FP_Ejercito->FormValue == $this->FP_Ejercito->CurrentValue && is_numeric(ew_StrToFloat($this->FP_Ejercito->CurrentValue)))\n\t\t\t$this->FP_Ejercito->CurrentValue = ew_StrToFloat($this->FP_Ejercito->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->FP_Policia->FormValue == $this->FP_Policia->CurrentValue && is_numeric(ew_StrToFloat($this->FP_Policia->CurrentValue)))\n\t\t\t$this->FP_Policia->CurrentValue = ew_StrToFloat($this->FP_Policia->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// llave\n\t\t// F_Sincron\n\t\t// USUARIO\n\t\t// Cargo_gme\n\t\t// NOM_PE\n\t\t// Otro_PE\n\t\t// NOM_APOYO\n\t\t// Otro_Nom_Apoyo\n\t\t// Otro_CC_Apoyo\n\t\t// NOM_ENLACE\n\t\t// Otro_Nom_Enlace\n\t\t// Otro_CC_Enlace\n\t\t// NOM_PGE\n\t\t// Otro_Nom_PGE\n\t\t// Otro_CC_PGE\n\t\t// Departamento\n\t\t// Muncipio\n\t\t// NOM_VDA\n\t\t// LATITUD\n\t\t// GRA_LAT\n\t\t// MIN_LAT\n\t\t// SEG_LAT\n\t\t// GRA_LONG\n\t\t// MIN_LONG\n\t\t// SEG_LONG\n\t\t// FECHA_ACC\n\t\t// HORA_ACC\n\t\t// Hora_ingreso\n\t\t// FP_Armada\n\t\t// FP_Ejercito\n\t\t// FP_Policia\n\t\t// NOM_COMANDANTE\n\t\t// TESTI1\n\t\t// CC_TESTI1\n\t\t// CARGO_TESTI1\n\t\t// TESTI2\n\t\t// CC_TESTI2\n\t\t// CARGO_TESTI2\n\t\t// Afectados\n\t\t// NUM_Afectado\n\t\t// Nom_Afectado\n\t\t// CC_Afectado\n\t\t// Cargo_Afectado\n\t\t// Tipo_incidente\n\t\t// Riesgo\n\t\t// Parte_Cuerpo\n\t\t// ESTADO_AFEC\n\t\t// EVACUADO\n\t\t// DESC_ACC\n\t\t// Modificado\n\t\t// llave_2\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// llave\n\t\t\t$this->llave->ViewValue = $this->llave->CurrentValue;\n\t\t\t$this->llave->ViewCustomAttributes = \"\";\n\n\t\t\t// F_Sincron\n\t\t\t$this->F_Sincron->ViewValue = $this->F_Sincron->CurrentValue;\n\t\t\t$this->F_Sincron->ViewValue = ew_FormatDateTime($this->F_Sincron->ViewValue, 5);\n\t\t\t$this->F_Sincron->ViewCustomAttributes = \"\";\n\n\t\t\t// USUARIO\n\t\t\tif (strval($this->USUARIO->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`USUARIO`\" . ew_SearchString(\"=\", $this->USUARIO->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `USUARIO`, `USUARIO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `USUARIO`, `USUARIO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->USUARIO, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `USUARIO` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->USUARIO->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->USUARIO->ViewValue = $this->USUARIO->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->USUARIO->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->USUARIO->ViewCustomAttributes = \"\";\n\n\t\t\t// Cargo_gme\n\t\t\t$this->Cargo_gme->ViewValue = $this->Cargo_gme->CurrentValue;\n\t\t\t$this->Cargo_gme->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_PE\n\t\t\tif (strval($this->NOM_PE->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`NOM_PE`\" . ew_SearchString(\"=\", $this->NOM_PE->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PE`, `NOM_PE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PE`, `NOM_PE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_PE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_PE` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->NOM_PE->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->NOM_PE->ViewValue = $this->NOM_PE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->NOM_PE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->NOM_PE->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_PE\n\t\t\t$this->Otro_PE->ViewValue = $this->Otro_PE->CurrentValue;\n\t\t\t$this->Otro_PE->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_APOYO\n\t\t\tif (strval($this->NOM_APOYO->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`NOM_APOYO`\" . ew_SearchString(\"=\", $this->NOM_APOYO->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_APOYO`, `NOM_APOYO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_APOYO`, `NOM_APOYO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_APOYO, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_APOYO` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->NOM_APOYO->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->NOM_APOYO->ViewValue = $this->NOM_APOYO->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->NOM_APOYO->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->NOM_APOYO->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_Nom_Apoyo\n\t\t\t$this->Otro_Nom_Apoyo->ViewValue = $this->Otro_Nom_Apoyo->CurrentValue;\n\t\t\t$this->Otro_Nom_Apoyo->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_CC_Apoyo\n\t\t\t$this->Otro_CC_Apoyo->ViewValue = $this->Otro_CC_Apoyo->CurrentValue;\n\t\t\t$this->Otro_CC_Apoyo->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_ENLACE\n\t\t\tif (strval($this->NOM_ENLACE->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`NOM_ENLACE`\" . ew_SearchString(\"=\", $this->NOM_ENLACE->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_ENLACE`, `NOM_ENLACE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_ENLACE`, `NOM_ENLACE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_ENLACE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_ENLACE` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->NOM_ENLACE->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->NOM_ENLACE->ViewValue = $this->NOM_ENLACE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->NOM_ENLACE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->NOM_ENLACE->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_Nom_Enlace\n\t\t\t$this->Otro_Nom_Enlace->ViewValue = $this->Otro_Nom_Enlace->CurrentValue;\n\t\t\t$this->Otro_Nom_Enlace->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_CC_Enlace\n\t\t\t$this->Otro_CC_Enlace->ViewValue = $this->Otro_CC_Enlace->CurrentValue;\n\t\t\t$this->Otro_CC_Enlace->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_PGE\n\t\t\tif (strval($this->NOM_PGE->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`NOM_PGE`\" . ew_SearchString(\"=\", $this->NOM_PGE->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PGE`, `NOM_PGE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PGE`, `NOM_PGE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_PGE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_PGE` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->NOM_PGE->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->NOM_PGE->ViewValue = $this->NOM_PGE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->NOM_PGE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->NOM_PGE->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_Nom_PGE\n\t\t\t$this->Otro_Nom_PGE->ViewValue = $this->Otro_Nom_PGE->CurrentValue;\n\t\t\t$this->Otro_Nom_PGE->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_CC_PGE\n\t\t\t$this->Otro_CC_PGE->ViewValue = $this->Otro_CC_PGE->CurrentValue;\n\t\t\t$this->Otro_CC_PGE->ViewCustomAttributes = \"\";\n\n\t\t\t// Departamento\n\t\t\t$this->Departamento->ViewValue = $this->Departamento->CurrentValue;\n\t\t\t$this->Departamento->ViewCustomAttributes = \"\";\n\n\t\t\t// Muncipio\n\t\t\t$this->Muncipio->ViewValue = $this->Muncipio->CurrentValue;\n\t\t\t$this->Muncipio->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_VDA\n\t\t\t$this->NOM_VDA->ViewValue = $this->NOM_VDA->CurrentValue;\n\t\t\t$this->NOM_VDA->ViewCustomAttributes = \"\";\n\n\t\t\t// LATITUD\n\t\t\t$this->LATITUD->ViewValue = $this->LATITUD->CurrentValue;\n\t\t\t$this->LATITUD->ViewCustomAttributes = \"\";\n\n\t\t\t// GRA_LAT\n\t\t\t$this->GRA_LAT->ViewValue = $this->GRA_LAT->CurrentValue;\n\t\t\t$this->GRA_LAT->ViewCustomAttributes = \"\";\n\n\t\t\t// MIN_LAT\n\t\t\t$this->MIN_LAT->ViewValue = $this->MIN_LAT->CurrentValue;\n\t\t\t$this->MIN_LAT->ViewCustomAttributes = \"\";\n\n\t\t\t// SEG_LAT\n\t\t\t$this->SEG_LAT->ViewValue = $this->SEG_LAT->CurrentValue;\n\t\t\t$this->SEG_LAT->ViewCustomAttributes = \"\";\n\n\t\t\t// GRA_LONG\n\t\t\t$this->GRA_LONG->ViewValue = $this->GRA_LONG->CurrentValue;\n\t\t\t$this->GRA_LONG->ViewCustomAttributes = \"\";\n\n\t\t\t// MIN_LONG\n\t\t\t$this->MIN_LONG->ViewValue = $this->MIN_LONG->CurrentValue;\n\t\t\t$this->MIN_LONG->ViewCustomAttributes = \"\";\n\n\t\t\t// SEG_LONG\n\t\t\t$this->SEG_LONG->ViewValue = $this->SEG_LONG->CurrentValue;\n\t\t\t$this->SEG_LONG->ViewCustomAttributes = \"\";\n\n\t\t\t// FECHA_ACC\n\t\t\t$this->FECHA_ACC->ViewValue = $this->FECHA_ACC->CurrentValue;\n\t\t\t$this->FECHA_ACC->ViewCustomAttributes = \"\";\n\n\t\t\t// HORA_ACC\n\t\t\t$this->HORA_ACC->ViewValue = $this->HORA_ACC->CurrentValue;\n\t\t\t$this->HORA_ACC->ViewCustomAttributes = \"\";\n\n\t\t\t// Hora_ingreso\n\t\t\t$this->Hora_ingreso->ViewValue = $this->Hora_ingreso->CurrentValue;\n\t\t\t$this->Hora_ingreso->ViewCustomAttributes = \"\";\n\n\t\t\t// FP_Armada\n\t\t\t$this->FP_Armada->ViewValue = $this->FP_Armada->CurrentValue;\n\t\t\t$this->FP_Armada->ViewCustomAttributes = \"\";\n\n\t\t\t// FP_Ejercito\n\t\t\t$this->FP_Ejercito->ViewValue = $this->FP_Ejercito->CurrentValue;\n\t\t\t$this->FP_Ejercito->ViewCustomAttributes = \"\";\n\n\t\t\t// FP_Policia\n\t\t\t$this->FP_Policia->ViewValue = $this->FP_Policia->CurrentValue;\n\t\t\t$this->FP_Policia->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_COMANDANTE\n\t\t\t$this->NOM_COMANDANTE->ViewValue = $this->NOM_COMANDANTE->CurrentValue;\n\t\t\t$this->NOM_COMANDANTE->ViewCustomAttributes = \"\";\n\n\t\t\t// TESTI1\n\t\t\t$this->TESTI1->ViewValue = $this->TESTI1->CurrentValue;\n\t\t\t$this->TESTI1->ViewCustomAttributes = \"\";\n\n\t\t\t// CC_TESTI1\n\t\t\t$this->CC_TESTI1->ViewValue = $this->CC_TESTI1->CurrentValue;\n\t\t\t$this->CC_TESTI1->ViewCustomAttributes = \"\";\n\n\t\t\t// CARGO_TESTI1\n\t\t\t$this->CARGO_TESTI1->ViewValue = $this->CARGO_TESTI1->CurrentValue;\n\t\t\t$this->CARGO_TESTI1->ViewCustomAttributes = \"\";\n\n\t\t\t// TESTI2\n\t\t\t$this->TESTI2->ViewValue = $this->TESTI2->CurrentValue;\n\t\t\t$this->TESTI2->ViewCustomAttributes = \"\";\n\n\t\t\t// CC_TESTI2\n\t\t\t$this->CC_TESTI2->ViewValue = $this->CC_TESTI2->CurrentValue;\n\t\t\t$this->CC_TESTI2->ViewCustomAttributes = \"\";\n\n\t\t\t// CARGO_TESTI2\n\t\t\t$this->CARGO_TESTI2->ViewValue = $this->CARGO_TESTI2->CurrentValue;\n\t\t\t$this->CARGO_TESTI2->ViewCustomAttributes = \"\";\n\n\t\t\t// Afectados\n\t\t\t$this->Afectados->ViewValue = $this->Afectados->CurrentValue;\n\t\t\t$this->Afectados->ViewCustomAttributes = \"\";\n\n\t\t\t// NUM_Afectado\n\t\t\t$this->NUM_Afectado->ViewValue = $this->NUM_Afectado->CurrentValue;\n\t\t\t$this->NUM_Afectado->ViewCustomAttributes = \"\";\n\n\t\t\t// Nom_Afectado\n\t\t\t$this->Nom_Afectado->ViewValue = $this->Nom_Afectado->CurrentValue;\n\t\t\t$this->Nom_Afectado->ViewCustomAttributes = \"\";\n\n\t\t\t// CC_Afectado\n\t\t\t$this->CC_Afectado->ViewValue = $this->CC_Afectado->CurrentValue;\n\t\t\t$this->CC_Afectado->ViewCustomAttributes = \"\";\n\n\t\t\t// Cargo_Afectado\n\t\t\t$this->Cargo_Afectado->ViewValue = $this->Cargo_Afectado->CurrentValue;\n\t\t\t$this->Cargo_Afectado->ViewCustomAttributes = \"\";\n\n\t\t\t// Tipo_incidente\n\t\t\tif (strval($this->Tipo_incidente->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`label`\" . ew_SearchString(\"=\", $this->Tipo_incidente->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$lookuptblfilter = \"`list name`='Incidente'\";\n\t\t\tif (strval($lookuptblfilter) <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->Tipo_incidente, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `label` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->Tipo_incidente->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->Tipo_incidente->ViewValue = $this->Tipo_incidente->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Tipo_incidente->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->Tipo_incidente->ViewCustomAttributes = \"\";\n\n\t\t\t// Riesgo\n\t\t\tif (strval($this->Riesgo->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`label`\" . ew_SearchString(\"=\", $this->Riesgo->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$lookuptblfilter = \"`list name`='Riesgo'\";\n\t\t\tif (strval($lookuptblfilter) <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->Riesgo, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `label` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->Riesgo->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->Riesgo->ViewValue = $this->Riesgo->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Riesgo->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->Riesgo->ViewCustomAttributes = \"\";\n\n\t\t\t// Parte_Cuerpo\n\t\t\t$this->Parte_Cuerpo->ViewValue = $this->Parte_Cuerpo->CurrentValue;\n\t\t\t$this->Parte_Cuerpo->ViewCustomAttributes = \"\";\n\n\t\t\t// ESTADO_AFEC\n\t\t\t$this->ESTADO_AFEC->ViewValue = $this->ESTADO_AFEC->CurrentValue;\n\t\t\t$this->ESTADO_AFEC->ViewCustomAttributes = \"\";\n\n\t\t\t// EVACUADO\n\t\t\tif (strval($this->EVACUADO->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($this->EVACUADO->CurrentValue) {\n\t\t\t\t\tcase $this->EVACUADO->FldTagValue(1):\n\t\t\t\t\t\t$this->EVACUADO->ViewValue = $this->EVACUADO->FldTagCaption(1) <> \"\" ? $this->EVACUADO->FldTagCaption(1) : $this->EVACUADO->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $this->EVACUADO->FldTagValue(2):\n\t\t\t\t\t\t$this->EVACUADO->ViewValue = $this->EVACUADO->FldTagCaption(2) <> \"\" ? $this->EVACUADO->FldTagCaption(2) : $this->EVACUADO->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->EVACUADO->ViewValue = $this->EVACUADO->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->EVACUADO->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->EVACUADO->ViewCustomAttributes = \"\";\n\n\t\t\t// DESC_ACC\n\t\t\t$this->DESC_ACC->ViewValue = $this->DESC_ACC->CurrentValue;\n\t\t\t$this->DESC_ACC->ViewCustomAttributes = \"\";\n\n\t\t\t// Modificado\n\t\t\tif (strval($this->Modificado->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($this->Modificado->CurrentValue) {\n\t\t\t\t\tcase $this->Modificado->FldTagValue(1):\n\t\t\t\t\t\t$this->Modificado->ViewValue = $this->Modificado->FldTagCaption(1) <> \"\" ? $this->Modificado->FldTagCaption(1) : $this->Modificado->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $this->Modificado->FldTagValue(2):\n\t\t\t\t\t\t$this->Modificado->ViewValue = $this->Modificado->FldTagCaption(2) <> \"\" ? $this->Modificado->FldTagCaption(2) : $this->Modificado->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->Modificado->ViewValue = $this->Modificado->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Modificado->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->Modificado->ViewCustomAttributes = \"\";\n\n\t\t\t// llave_2\n\t\t\t$this->llave_2->ViewValue = $this->llave_2->CurrentValue;\n\t\t\t$this->llave_2->ViewCustomAttributes = \"\";\n\n\t\t\t// llave\n\t\t\t$this->llave->LinkCustomAttributes = \"\";\n\t\t\t$this->llave->HrefValue = \"\";\n\t\t\t$this->llave->TooltipValue = \"\";\n\n\t\t\t// F_Sincron\n\t\t\t$this->F_Sincron->LinkCustomAttributes = \"\";\n\t\t\t$this->F_Sincron->HrefValue = \"\";\n\t\t\t$this->F_Sincron->TooltipValue = \"\";\n\n\t\t\t// USUARIO\n\t\t\t$this->USUARIO->LinkCustomAttributes = \"\";\n\t\t\t$this->USUARIO->HrefValue = \"\";\n\t\t\t$this->USUARIO->TooltipValue = \"\";\n\n\t\t\t// Cargo_gme\n\t\t\t$this->Cargo_gme->LinkCustomAttributes = \"\";\n\t\t\t$this->Cargo_gme->HrefValue = \"\";\n\t\t\t$this->Cargo_gme->TooltipValue = \"\";\n\n\t\t\t// NOM_PE\n\t\t\t$this->NOM_PE->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_PE->HrefValue = \"\";\n\t\t\t$this->NOM_PE->TooltipValue = \"\";\n\n\t\t\t// Otro_PE\n\t\t\t$this->Otro_PE->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_PE->HrefValue = \"\";\n\t\t\t$this->Otro_PE->TooltipValue = \"\";\n\n\t\t\t// NOM_APOYO\n\t\t\t$this->NOM_APOYO->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_APOYO->HrefValue = \"\";\n\t\t\t$this->NOM_APOYO->TooltipValue = \"\";\n\n\t\t\t// Otro_Nom_Apoyo\n\t\t\t$this->Otro_Nom_Apoyo->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_Apoyo->HrefValue = \"\";\n\t\t\t$this->Otro_Nom_Apoyo->TooltipValue = \"\";\n\n\t\t\t// Otro_CC_Apoyo\n\t\t\t$this->Otro_CC_Apoyo->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_Apoyo->HrefValue = \"\";\n\t\t\t$this->Otro_CC_Apoyo->TooltipValue = \"\";\n\n\t\t\t// NOM_ENLACE\n\t\t\t$this->NOM_ENLACE->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_ENLACE->HrefValue = \"\";\n\t\t\t$this->NOM_ENLACE->TooltipValue = \"\";\n\n\t\t\t// Otro_Nom_Enlace\n\t\t\t$this->Otro_Nom_Enlace->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_Enlace->HrefValue = \"\";\n\t\t\t$this->Otro_Nom_Enlace->TooltipValue = \"\";\n\n\t\t\t// Otro_CC_Enlace\n\t\t\t$this->Otro_CC_Enlace->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_Enlace->HrefValue = \"\";\n\t\t\t$this->Otro_CC_Enlace->TooltipValue = \"\";\n\n\t\t\t// NOM_PGE\n\t\t\t$this->NOM_PGE->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_PGE->HrefValue = \"\";\n\t\t\t$this->NOM_PGE->TooltipValue = \"\";\n\n\t\t\t// Otro_Nom_PGE\n\t\t\t$this->Otro_Nom_PGE->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_PGE->HrefValue = \"\";\n\t\t\t$this->Otro_Nom_PGE->TooltipValue = \"\";\n\n\t\t\t// Otro_CC_PGE\n\t\t\t$this->Otro_CC_PGE->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_PGE->HrefValue = \"\";\n\t\t\t$this->Otro_CC_PGE->TooltipValue = \"\";\n\n\t\t\t// Departamento\n\t\t\t$this->Departamento->LinkCustomAttributes = \"\";\n\t\t\t$this->Departamento->HrefValue = \"\";\n\t\t\t$this->Departamento->TooltipValue = \"\";\n\n\t\t\t// Muncipio\n\t\t\t$this->Muncipio->LinkCustomAttributes = \"\";\n\t\t\t$this->Muncipio->HrefValue = \"\";\n\t\t\t$this->Muncipio->TooltipValue = \"\";\n\n\t\t\t// NOM_VDA\n\t\t\t$this->NOM_VDA->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_VDA->HrefValue = \"\";\n\t\t\t$this->NOM_VDA->TooltipValue = \"\";\n\n\t\t\t// LATITUD\n\t\t\t$this->LATITUD->LinkCustomAttributes = \"\";\n\t\t\t$this->LATITUD->HrefValue = \"\";\n\t\t\t$this->LATITUD->TooltipValue = \"\";\n\n\t\t\t// GRA_LAT\n\t\t\t$this->GRA_LAT->LinkCustomAttributes = \"\";\n\t\t\t$this->GRA_LAT->HrefValue = \"\";\n\t\t\t$this->GRA_LAT->TooltipValue = \"\";\n\n\t\t\t// MIN_LAT\n\t\t\t$this->MIN_LAT->LinkCustomAttributes = \"\";\n\t\t\t$this->MIN_LAT->HrefValue = \"\";\n\t\t\t$this->MIN_LAT->TooltipValue = \"\";\n\n\t\t\t// SEG_LAT\n\t\t\t$this->SEG_LAT->LinkCustomAttributes = \"\";\n\t\t\t$this->SEG_LAT->HrefValue = \"\";\n\t\t\t$this->SEG_LAT->TooltipValue = \"\";\n\n\t\t\t// GRA_LONG\n\t\t\t$this->GRA_LONG->LinkCustomAttributes = \"\";\n\t\t\t$this->GRA_LONG->HrefValue = \"\";\n\t\t\t$this->GRA_LONG->TooltipValue = \"\";\n\n\t\t\t// MIN_LONG\n\t\t\t$this->MIN_LONG->LinkCustomAttributes = \"\";\n\t\t\t$this->MIN_LONG->HrefValue = \"\";\n\t\t\t$this->MIN_LONG->TooltipValue = \"\";\n\n\t\t\t// SEG_LONG\n\t\t\t$this->SEG_LONG->LinkCustomAttributes = \"\";\n\t\t\t$this->SEG_LONG->HrefValue = \"\";\n\t\t\t$this->SEG_LONG->TooltipValue = \"\";\n\n\t\t\t// FECHA_ACC\n\t\t\t$this->FECHA_ACC->LinkCustomAttributes = \"\";\n\t\t\t$this->FECHA_ACC->HrefValue = \"\";\n\t\t\t$this->FECHA_ACC->TooltipValue = \"\";\n\n\t\t\t// HORA_ACC\n\t\t\t$this->HORA_ACC->LinkCustomAttributes = \"\";\n\t\t\t$this->HORA_ACC->HrefValue = \"\";\n\t\t\t$this->HORA_ACC->TooltipValue = \"\";\n\n\t\t\t// Hora_ingreso\n\t\t\t$this->Hora_ingreso->LinkCustomAttributes = \"\";\n\t\t\t$this->Hora_ingreso->HrefValue = \"\";\n\t\t\t$this->Hora_ingreso->TooltipValue = \"\";\n\n\t\t\t// FP_Armada\n\t\t\t$this->FP_Armada->LinkCustomAttributes = \"\";\n\t\t\t$this->FP_Armada->HrefValue = \"\";\n\t\t\t$this->FP_Armada->TooltipValue = \"\";\n\n\t\t\t// FP_Ejercito\n\t\t\t$this->FP_Ejercito->LinkCustomAttributes = \"\";\n\t\t\t$this->FP_Ejercito->HrefValue = \"\";\n\t\t\t$this->FP_Ejercito->TooltipValue = \"\";\n\n\t\t\t// FP_Policia\n\t\t\t$this->FP_Policia->LinkCustomAttributes = \"\";\n\t\t\t$this->FP_Policia->HrefValue = \"\";\n\t\t\t$this->FP_Policia->TooltipValue = \"\";\n\n\t\t\t// NOM_COMANDANTE\n\t\t\t$this->NOM_COMANDANTE->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_COMANDANTE->HrefValue = \"\";\n\t\t\t$this->NOM_COMANDANTE->TooltipValue = \"\";\n\n\t\t\t// TESTI1\n\t\t\t$this->TESTI1->LinkCustomAttributes = \"\";\n\t\t\t$this->TESTI1->HrefValue = \"\";\n\t\t\t$this->TESTI1->TooltipValue = \"\";\n\n\t\t\t// CC_TESTI1\n\t\t\t$this->CC_TESTI1->LinkCustomAttributes = \"\";\n\t\t\t$this->CC_TESTI1->HrefValue = \"\";\n\t\t\t$this->CC_TESTI1->TooltipValue = \"\";\n\n\t\t\t// CARGO_TESTI1\n\t\t\t$this->CARGO_TESTI1->LinkCustomAttributes = \"\";\n\t\t\t$this->CARGO_TESTI1->HrefValue = \"\";\n\t\t\t$this->CARGO_TESTI1->TooltipValue = \"\";\n\n\t\t\t// TESTI2\n\t\t\t$this->TESTI2->LinkCustomAttributes = \"\";\n\t\t\t$this->TESTI2->HrefValue = \"\";\n\t\t\t$this->TESTI2->TooltipValue = \"\";\n\n\t\t\t// CC_TESTI2\n\t\t\t$this->CC_TESTI2->LinkCustomAttributes = \"\";\n\t\t\t$this->CC_TESTI2->HrefValue = \"\";\n\t\t\t$this->CC_TESTI2->TooltipValue = \"\";\n\n\t\t\t// CARGO_TESTI2\n\t\t\t$this->CARGO_TESTI2->LinkCustomAttributes = \"\";\n\t\t\t$this->CARGO_TESTI2->HrefValue = \"\";\n\t\t\t$this->CARGO_TESTI2->TooltipValue = \"\";\n\n\t\t\t// Afectados\n\t\t\t$this->Afectados->LinkCustomAttributes = \"\";\n\t\t\t$this->Afectados->HrefValue = \"\";\n\t\t\t$this->Afectados->TooltipValue = \"\";\n\n\t\t\t// NUM_Afectado\n\t\t\t$this->NUM_Afectado->LinkCustomAttributes = \"\";\n\t\t\t$this->NUM_Afectado->HrefValue = \"\";\n\t\t\t$this->NUM_Afectado->TooltipValue = \"\";\n\n\t\t\t// Nom_Afectado\n\t\t\t$this->Nom_Afectado->LinkCustomAttributes = \"\";\n\t\t\t$this->Nom_Afectado->HrefValue = \"\";\n\t\t\t$this->Nom_Afectado->TooltipValue = \"\";\n\n\t\t\t// CC_Afectado\n\t\t\t$this->CC_Afectado->LinkCustomAttributes = \"\";\n\t\t\t$this->CC_Afectado->HrefValue = \"\";\n\t\t\t$this->CC_Afectado->TooltipValue = \"\";\n\n\t\t\t// Cargo_Afectado\n\t\t\t$this->Cargo_Afectado->LinkCustomAttributes = \"\";\n\t\t\t$this->Cargo_Afectado->HrefValue = \"\";\n\t\t\t$this->Cargo_Afectado->TooltipValue = \"\";\n\n\t\t\t// Tipo_incidente\n\t\t\t$this->Tipo_incidente->LinkCustomAttributes = \"\";\n\t\t\t$this->Tipo_incidente->HrefValue = \"\";\n\t\t\t$this->Tipo_incidente->TooltipValue = \"\";\n\n\t\t\t// Riesgo\n\t\t\t$this->Riesgo->LinkCustomAttributes = \"\";\n\t\t\t$this->Riesgo->HrefValue = \"\";\n\t\t\t$this->Riesgo->TooltipValue = \"\";\n\n\t\t\t// Parte_Cuerpo\n\t\t\t$this->Parte_Cuerpo->LinkCustomAttributes = \"\";\n\t\t\t$this->Parte_Cuerpo->HrefValue = \"\";\n\t\t\t$this->Parte_Cuerpo->TooltipValue = \"\";\n\n\t\t\t// ESTADO_AFEC\n\t\t\t$this->ESTADO_AFEC->LinkCustomAttributes = \"\";\n\t\t\t$this->ESTADO_AFEC->HrefValue = \"\";\n\t\t\t$this->ESTADO_AFEC->TooltipValue = \"\";\n\n\t\t\t// EVACUADO\n\t\t\t$this->EVACUADO->LinkCustomAttributes = \"\";\n\t\t\t$this->EVACUADO->HrefValue = \"\";\n\t\t\t$this->EVACUADO->TooltipValue = \"\";\n\n\t\t\t// DESC_ACC\n\t\t\t$this->DESC_ACC->LinkCustomAttributes = \"\";\n\t\t\t$this->DESC_ACC->HrefValue = \"\";\n\t\t\t$this->DESC_ACC->TooltipValue = \"\";\n\n\t\t\t// Modificado\n\t\t\t$this->Modificado->LinkCustomAttributes = \"\";\n\t\t\t$this->Modificado->HrefValue = \"\";\n\t\t\t$this->Modificado->TooltipValue = \"\";\n\n\t\t\t// llave_2\n\t\t\t$this->llave_2->LinkCustomAttributes = \"\";\n\t\t\t$this->llave_2->HrefValue = \"\";\n\t\t\t$this->llave_2->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row\n\n\t\t\t// llave\n\t\t\t$this->llave->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->llave->EditCustomAttributes = \"\";\n\t\t\t$this->llave->EditValue = $this->llave->CurrentValue;\n\t\t\t$this->llave->ViewCustomAttributes = \"\";\n\n\t\t\t// F_Sincron\n\t\t\t$this->F_Sincron->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->F_Sincron->EditCustomAttributes = \"\";\n\t\t\t$this->F_Sincron->EditValue = $this->F_Sincron->CurrentValue;\n\t\t\t$this->F_Sincron->EditValue = ew_FormatDateTime($this->F_Sincron->EditValue, 5);\n\t\t\t$this->F_Sincron->ViewCustomAttributes = \"\";\n\n\t\t\t// USUARIO\n\t\t\t$this->USUARIO->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->USUARIO->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `USUARIO`, `USUARIO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `USUARIO`, `USUARIO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->USUARIO, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `USUARIO` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->USUARIO->EditValue = $arwrk;\n\n\t\t\t// Cargo_gme\n\t\t\t$this->Cargo_gme->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Cargo_gme->EditCustomAttributes = \"\";\n\t\t\t$this->Cargo_gme->EditValue = ew_HtmlEncode($this->Cargo_gme->CurrentValue);\n\t\t\t$this->Cargo_gme->PlaceHolder = ew_RemoveHtml($this->Cargo_gme->FldCaption());\n\n\t\t\t// NOM_PE\n\t\t\t$this->NOM_PE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_PE->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PE`, `NOM_PE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PE`, `NOM_PE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_PE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_PE` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->NOM_PE->EditValue = $arwrk;\n\n\t\t\t// Otro_PE\n\t\t\t$this->Otro_PE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_PE->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_PE->EditValue = ew_HtmlEncode($this->Otro_PE->CurrentValue);\n\t\t\t$this->Otro_PE->PlaceHolder = ew_RemoveHtml($this->Otro_PE->FldCaption());\n\n\t\t\t// NOM_APOYO\n\t\t\t$this->NOM_APOYO->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_APOYO->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_APOYO`, `NOM_APOYO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_APOYO`, `NOM_APOYO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_APOYO, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_APOYO` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->NOM_APOYO->EditValue = $arwrk;\n\n\t\t\t// Otro_Nom_Apoyo\n\t\t\t$this->Otro_Nom_Apoyo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_Nom_Apoyo->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_Apoyo->EditValue = ew_HtmlEncode($this->Otro_Nom_Apoyo->CurrentValue);\n\t\t\t$this->Otro_Nom_Apoyo->PlaceHolder = ew_RemoveHtml($this->Otro_Nom_Apoyo->FldCaption());\n\n\t\t\t// Otro_CC_Apoyo\n\t\t\t$this->Otro_CC_Apoyo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_CC_Apoyo->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_Apoyo->EditValue = ew_HtmlEncode($this->Otro_CC_Apoyo->CurrentValue);\n\t\t\t$this->Otro_CC_Apoyo->PlaceHolder = ew_RemoveHtml($this->Otro_CC_Apoyo->FldCaption());\n\n\t\t\t// NOM_ENLACE\n\t\t\t$this->NOM_ENLACE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_ENLACE->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_ENLACE`, `NOM_ENLACE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_ENLACE`, `NOM_ENLACE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_ENLACE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_ENLACE` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->NOM_ENLACE->EditValue = $arwrk;\n\n\t\t\t// Otro_Nom_Enlace\n\t\t\t$this->Otro_Nom_Enlace->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_Nom_Enlace->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_Enlace->EditValue = ew_HtmlEncode($this->Otro_Nom_Enlace->CurrentValue);\n\t\t\t$this->Otro_Nom_Enlace->PlaceHolder = ew_RemoveHtml($this->Otro_Nom_Enlace->FldCaption());\n\n\t\t\t// Otro_CC_Enlace\n\t\t\t$this->Otro_CC_Enlace->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_CC_Enlace->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_Enlace->EditValue = ew_HtmlEncode($this->Otro_CC_Enlace->CurrentValue);\n\t\t\t$this->Otro_CC_Enlace->PlaceHolder = ew_RemoveHtml($this->Otro_CC_Enlace->FldCaption());\n\n\t\t\t// NOM_PGE\n\t\t\t$this->NOM_PGE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_PGE->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PGE`, `NOM_PGE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PGE`, `NOM_PGE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_PGE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_PGE` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->NOM_PGE->EditValue = $arwrk;\n\n\t\t\t// Otro_Nom_PGE\n\t\t\t$this->Otro_Nom_PGE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_Nom_PGE->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_PGE->EditValue = ew_HtmlEncode($this->Otro_Nom_PGE->CurrentValue);\n\t\t\t$this->Otro_Nom_PGE->PlaceHolder = ew_RemoveHtml($this->Otro_Nom_PGE->FldCaption());\n\n\t\t\t// Otro_CC_PGE\n\t\t\t$this->Otro_CC_PGE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_CC_PGE->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_PGE->EditValue = ew_HtmlEncode($this->Otro_CC_PGE->CurrentValue);\n\t\t\t$this->Otro_CC_PGE->PlaceHolder = ew_RemoveHtml($this->Otro_CC_PGE->FldCaption());\n\n\t\t\t// Departamento\n\t\t\t$this->Departamento->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Departamento->EditCustomAttributes = \"\";\n\t\t\t$this->Departamento->EditValue = ew_HtmlEncode($this->Departamento->CurrentValue);\n\t\t\t$this->Departamento->PlaceHolder = ew_RemoveHtml($this->Departamento->FldCaption());\n\n\t\t\t// Muncipio\n\t\t\t$this->Muncipio->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Muncipio->EditCustomAttributes = \"\";\n\t\t\t$this->Muncipio->EditValue = ew_HtmlEncode($this->Muncipio->CurrentValue);\n\t\t\t$this->Muncipio->PlaceHolder = ew_RemoveHtml($this->Muncipio->FldCaption());\n\n\t\t\t// NOM_VDA\n\t\t\t$this->NOM_VDA->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_VDA->EditCustomAttributes = \"\";\n\t\t\t$this->NOM_VDA->EditValue = ew_HtmlEncode($this->NOM_VDA->CurrentValue);\n\t\t\t$this->NOM_VDA->PlaceHolder = ew_RemoveHtml($this->NOM_VDA->FldCaption());\n\n\t\t\t// LATITUD\n\t\t\t$this->LATITUD->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->LATITUD->EditCustomAttributes = \"\";\n\t\t\t$this->LATITUD->EditValue = ew_HtmlEncode($this->LATITUD->CurrentValue);\n\t\t\t$this->LATITUD->PlaceHolder = ew_RemoveHtml($this->LATITUD->FldCaption());\n\n\t\t\t// GRA_LAT\n\t\t\t$this->GRA_LAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->GRA_LAT->EditCustomAttributes = \"\";\n\t\t\t$this->GRA_LAT->EditValue = ew_HtmlEncode($this->GRA_LAT->CurrentValue);\n\t\t\t$this->GRA_LAT->PlaceHolder = ew_RemoveHtml($this->GRA_LAT->FldCaption());\n\n\t\t\t// MIN_LAT\n\t\t\t$this->MIN_LAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->MIN_LAT->EditCustomAttributes = \"\";\n\t\t\t$this->MIN_LAT->EditValue = ew_HtmlEncode($this->MIN_LAT->CurrentValue);\n\t\t\t$this->MIN_LAT->PlaceHolder = ew_RemoveHtml($this->MIN_LAT->FldCaption());\n\n\t\t\t// SEG_LAT\n\t\t\t$this->SEG_LAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->SEG_LAT->EditCustomAttributes = \"\";\n\t\t\t$this->SEG_LAT->EditValue = ew_HtmlEncode($this->SEG_LAT->CurrentValue);\n\t\t\t$this->SEG_LAT->PlaceHolder = ew_RemoveHtml($this->SEG_LAT->FldCaption());\n\t\t\tif (strval($this->SEG_LAT->EditValue) <> \"\" && is_numeric($this->SEG_LAT->EditValue)) $this->SEG_LAT->EditValue = ew_FormatNumber($this->SEG_LAT->EditValue, -2, -1, -2, 0);\n\n\t\t\t// GRA_LONG\n\t\t\t$this->GRA_LONG->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->GRA_LONG->EditCustomAttributes = \"\";\n\t\t\t$this->GRA_LONG->EditValue = ew_HtmlEncode($this->GRA_LONG->CurrentValue);\n\t\t\t$this->GRA_LONG->PlaceHolder = ew_RemoveHtml($this->GRA_LONG->FldCaption());\n\n\t\t\t// MIN_LONG\n\t\t\t$this->MIN_LONG->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->MIN_LONG->EditCustomAttributes = \"\";\n\t\t\t$this->MIN_LONG->EditValue = ew_HtmlEncode($this->MIN_LONG->CurrentValue);\n\t\t\t$this->MIN_LONG->PlaceHolder = ew_RemoveHtml($this->MIN_LONG->FldCaption());\n\n\t\t\t// SEG_LONG\n\t\t\t$this->SEG_LONG->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->SEG_LONG->EditCustomAttributes = \"\";\n\t\t\t$this->SEG_LONG->EditValue = ew_HtmlEncode($this->SEG_LONG->CurrentValue);\n\t\t\t$this->SEG_LONG->PlaceHolder = ew_RemoveHtml($this->SEG_LONG->FldCaption());\n\t\t\tif (strval($this->SEG_LONG->EditValue) <> \"\" && is_numeric($this->SEG_LONG->EditValue)) $this->SEG_LONG->EditValue = ew_FormatNumber($this->SEG_LONG->EditValue, -2, -1, -2, 0);\n\n\t\t\t// FECHA_ACC\n\t\t\t$this->FECHA_ACC->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->FECHA_ACC->EditCustomAttributes = \"\";\n\t\t\t$this->FECHA_ACC->EditValue = ew_HtmlEncode($this->FECHA_ACC->CurrentValue);\n\t\t\t$this->FECHA_ACC->PlaceHolder = ew_RemoveHtml($this->FECHA_ACC->FldCaption());\n\n\t\t\t// HORA_ACC\n\t\t\t$this->HORA_ACC->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->HORA_ACC->EditCustomAttributes = \"\";\n\t\t\t$this->HORA_ACC->EditValue = ew_HtmlEncode($this->HORA_ACC->CurrentValue);\n\t\t\t$this->HORA_ACC->PlaceHolder = ew_RemoveHtml($this->HORA_ACC->FldCaption());\n\n\t\t\t// Hora_ingreso\n\t\t\t$this->Hora_ingreso->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Hora_ingreso->EditCustomAttributes = \"\";\n\t\t\t$this->Hora_ingreso->EditValue = ew_HtmlEncode($this->Hora_ingreso->CurrentValue);\n\t\t\t$this->Hora_ingreso->PlaceHolder = ew_RemoveHtml($this->Hora_ingreso->FldCaption());\n\n\t\t\t// FP_Armada\n\t\t\t$this->FP_Armada->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->FP_Armada->EditCustomAttributes = \"\";\n\t\t\t$this->FP_Armada->EditValue = ew_HtmlEncode($this->FP_Armada->CurrentValue);\n\t\t\t$this->FP_Armada->PlaceHolder = ew_RemoveHtml($this->FP_Armada->FldCaption());\n\t\t\tif (strval($this->FP_Armada->EditValue) <> \"\" && is_numeric($this->FP_Armada->EditValue)) $this->FP_Armada->EditValue = ew_FormatNumber($this->FP_Armada->EditValue, -2, -1, -2, 0);\n\n\t\t\t// FP_Ejercito\n\t\t\t$this->FP_Ejercito->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->FP_Ejercito->EditCustomAttributes = \"\";\n\t\t\t$this->FP_Ejercito->EditValue = ew_HtmlEncode($this->FP_Ejercito->CurrentValue);\n\t\t\t$this->FP_Ejercito->PlaceHolder = ew_RemoveHtml($this->FP_Ejercito->FldCaption());\n\t\t\tif (strval($this->FP_Ejercito->EditValue) <> \"\" && is_numeric($this->FP_Ejercito->EditValue)) $this->FP_Ejercito->EditValue = ew_FormatNumber($this->FP_Ejercito->EditValue, -2, -1, -2, 0);\n\n\t\t\t// FP_Policia\n\t\t\t$this->FP_Policia->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->FP_Policia->EditCustomAttributes = \"\";\n\t\t\t$this->FP_Policia->EditValue = ew_HtmlEncode($this->FP_Policia->CurrentValue);\n\t\t\t$this->FP_Policia->PlaceHolder = ew_RemoveHtml($this->FP_Policia->FldCaption());\n\t\t\tif (strval($this->FP_Policia->EditValue) <> \"\" && is_numeric($this->FP_Policia->EditValue)) $this->FP_Policia->EditValue = ew_FormatNumber($this->FP_Policia->EditValue, -2, -1, -2, 0);\n\n\t\t\t// NOM_COMANDANTE\n\t\t\t$this->NOM_COMANDANTE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_COMANDANTE->EditCustomAttributes = \"\";\n\t\t\t$this->NOM_COMANDANTE->EditValue = ew_HtmlEncode($this->NOM_COMANDANTE->CurrentValue);\n\t\t\t$this->NOM_COMANDANTE->PlaceHolder = ew_RemoveHtml($this->NOM_COMANDANTE->FldCaption());\n\n\t\t\t// TESTI1\n\t\t\t$this->TESTI1->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->TESTI1->EditCustomAttributes = \"\";\n\t\t\t$this->TESTI1->EditValue = ew_HtmlEncode($this->TESTI1->CurrentValue);\n\t\t\t$this->TESTI1->PlaceHolder = ew_RemoveHtml($this->TESTI1->FldCaption());\n\n\t\t\t// CC_TESTI1\n\t\t\t$this->CC_TESTI1->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->CC_TESTI1->EditCustomAttributes = \"\";\n\t\t\t$this->CC_TESTI1->EditValue = ew_HtmlEncode($this->CC_TESTI1->CurrentValue);\n\t\t\t$this->CC_TESTI1->PlaceHolder = ew_RemoveHtml($this->CC_TESTI1->FldCaption());\n\n\t\t\t// CARGO_TESTI1\n\t\t\t$this->CARGO_TESTI1->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->CARGO_TESTI1->EditCustomAttributes = \"\";\n\t\t\t$this->CARGO_TESTI1->EditValue = ew_HtmlEncode($this->CARGO_TESTI1->CurrentValue);\n\t\t\t$this->CARGO_TESTI1->PlaceHolder = ew_RemoveHtml($this->CARGO_TESTI1->FldCaption());\n\n\t\t\t// TESTI2\n\t\t\t$this->TESTI2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->TESTI2->EditCustomAttributes = \"\";\n\t\t\t$this->TESTI2->EditValue = ew_HtmlEncode($this->TESTI2->CurrentValue);\n\t\t\t$this->TESTI2->PlaceHolder = ew_RemoveHtml($this->TESTI2->FldCaption());\n\n\t\t\t// CC_TESTI2\n\t\t\t$this->CC_TESTI2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->CC_TESTI2->EditCustomAttributes = \"\";\n\t\t\t$this->CC_TESTI2->EditValue = ew_HtmlEncode($this->CC_TESTI2->CurrentValue);\n\t\t\t$this->CC_TESTI2->PlaceHolder = ew_RemoveHtml($this->CC_TESTI2->FldCaption());\n\n\t\t\t// CARGO_TESTI2\n\t\t\t$this->CARGO_TESTI2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->CARGO_TESTI2->EditCustomAttributes = \"\";\n\t\t\t$this->CARGO_TESTI2->EditValue = ew_HtmlEncode($this->CARGO_TESTI2->CurrentValue);\n\t\t\t$this->CARGO_TESTI2->PlaceHolder = ew_RemoveHtml($this->CARGO_TESTI2->FldCaption());\n\n\t\t\t// Afectados\n\t\t\t$this->Afectados->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Afectados->EditCustomAttributes = \"\";\n\t\t\t$this->Afectados->EditValue = ew_HtmlEncode($this->Afectados->CurrentValue);\n\t\t\t$this->Afectados->PlaceHolder = ew_RemoveHtml($this->Afectados->FldCaption());\n\n\t\t\t// NUM_Afectado\n\t\t\t$this->NUM_Afectado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NUM_Afectado->EditCustomAttributes = \"\";\n\t\t\t$this->NUM_Afectado->EditValue = ew_HtmlEncode($this->NUM_Afectado->CurrentValue);\n\t\t\t$this->NUM_Afectado->PlaceHolder = ew_RemoveHtml($this->NUM_Afectado->FldCaption());\n\n\t\t\t// Nom_Afectado\n\t\t\t$this->Nom_Afectado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Nom_Afectado->EditCustomAttributes = \"\";\n\t\t\t$this->Nom_Afectado->EditValue = ew_HtmlEncode($this->Nom_Afectado->CurrentValue);\n\t\t\t$this->Nom_Afectado->PlaceHolder = ew_RemoveHtml($this->Nom_Afectado->FldCaption());\n\n\t\t\t// CC_Afectado\n\t\t\t$this->CC_Afectado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->CC_Afectado->EditCustomAttributes = \"\";\n\t\t\t$this->CC_Afectado->EditValue = ew_HtmlEncode($this->CC_Afectado->CurrentValue);\n\t\t\t$this->CC_Afectado->PlaceHolder = ew_RemoveHtml($this->CC_Afectado->FldCaption());\n\n\t\t\t// Cargo_Afectado\n\t\t\t$this->Cargo_Afectado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Cargo_Afectado->EditCustomAttributes = \"\";\n\t\t\t$this->Cargo_Afectado->EditValue = ew_HtmlEncode($this->Cargo_Afectado->CurrentValue);\n\t\t\t$this->Cargo_Afectado->PlaceHolder = ew_RemoveHtml($this->Cargo_Afectado->FldCaption());\n\n\t\t\t// Tipo_incidente\n\t\t\t$this->Tipo_incidente->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Tipo_incidente->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$lookuptblfilter = \"`list name`='Incidente'\";\n\t\t\tif (strval($lookuptblfilter) <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->Tipo_incidente, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `label` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->Tipo_incidente->EditValue = $arwrk;\n\n\t\t\t// Riesgo\n\t\t\t$this->Riesgo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Riesgo->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$lookuptblfilter = \"`list name`='Riesgo'\";\n\t\t\tif (strval($lookuptblfilter) <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->Riesgo, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `label` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->Riesgo->EditValue = $arwrk;\n\n\t\t\t// Parte_Cuerpo\n\t\t\t$this->Parte_Cuerpo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Parte_Cuerpo->EditCustomAttributes = \"\";\n\t\t\t$this->Parte_Cuerpo->EditValue = ew_HtmlEncode($this->Parte_Cuerpo->CurrentValue);\n\t\t\t$this->Parte_Cuerpo->PlaceHolder = ew_RemoveHtml($this->Parte_Cuerpo->FldCaption());\n\n\t\t\t// ESTADO_AFEC\n\t\t\t$this->ESTADO_AFEC->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->ESTADO_AFEC->EditCustomAttributes = \"\";\n\t\t\t$this->ESTADO_AFEC->EditValue = ew_HtmlEncode($this->ESTADO_AFEC->CurrentValue);\n\t\t\t$this->ESTADO_AFEC->PlaceHolder = ew_RemoveHtml($this->ESTADO_AFEC->FldCaption());\n\n\t\t\t// EVACUADO\n\t\t\t$this->EVACUADO->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->EVACUADO->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array($this->EVACUADO->FldTagValue(1), $this->EVACUADO->FldTagCaption(1) <> \"\" ? $this->EVACUADO->FldTagCaption(1) : $this->EVACUADO->FldTagValue(1));\n\t\t\t$arwrk[] = array($this->EVACUADO->FldTagValue(2), $this->EVACUADO->FldTagCaption(2) <> \"\" ? $this->EVACUADO->FldTagCaption(2) : $this->EVACUADO->FldTagValue(2));\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$this->EVACUADO->EditValue = $arwrk;\n\n\t\t\t// DESC_ACC\n\t\t\t$this->DESC_ACC->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->DESC_ACC->EditCustomAttributes = \"\";\n\t\t\t$this->DESC_ACC->EditValue = ew_HtmlEncode($this->DESC_ACC->CurrentValue);\n\t\t\t$this->DESC_ACC->PlaceHolder = ew_RemoveHtml($this->DESC_ACC->FldCaption());\n\n\t\t\t// Modificado\n\t\t\t$this->Modificado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Modificado->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array($this->Modificado->FldTagValue(1), $this->Modificado->FldTagCaption(1) <> \"\" ? $this->Modificado->FldTagCaption(1) : $this->Modificado->FldTagValue(1));\n\t\t\t$arwrk[] = array($this->Modificado->FldTagValue(2), $this->Modificado->FldTagCaption(2) <> \"\" ? $this->Modificado->FldTagCaption(2) : $this->Modificado->FldTagValue(2));\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$this->Modificado->EditValue = $arwrk;\n\n\t\t\t// llave_2\n\t\t\t$this->llave_2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->llave_2->EditCustomAttributes = \"\";\n\t\t\t$this->llave_2->EditValue = $this->llave_2->CurrentValue;\n\t\t\t$this->llave_2->ViewCustomAttributes = \"\";\n\n\t\t\t// Edit refer script\n\t\t\t// llave\n\n\t\t\t$this->llave->HrefValue = \"\";\n\n\t\t\t// F_Sincron\n\t\t\t$this->F_Sincron->HrefValue = \"\";\n\n\t\t\t// USUARIO\n\t\t\t$this->USUARIO->HrefValue = \"\";\n\n\t\t\t// Cargo_gme\n\t\t\t$this->Cargo_gme->HrefValue = \"\";\n\n\t\t\t// NOM_PE\n\t\t\t$this->NOM_PE->HrefValue = \"\";\n\n\t\t\t// Otro_PE\n\t\t\t$this->Otro_PE->HrefValue = \"\";\n\n\t\t\t// NOM_APOYO\n\t\t\t$this->NOM_APOYO->HrefValue = \"\";\n\n\t\t\t// Otro_Nom_Apoyo\n\t\t\t$this->Otro_Nom_Apoyo->HrefValue = \"\";\n\n\t\t\t// Otro_CC_Apoyo\n\t\t\t$this->Otro_CC_Apoyo->HrefValue = \"\";\n\n\t\t\t// NOM_ENLACE\n\t\t\t$this->NOM_ENLACE->HrefValue = \"\";\n\n\t\t\t// Otro_Nom_Enlace\n\t\t\t$this->Otro_Nom_Enlace->HrefValue = \"\";\n\n\t\t\t// Otro_CC_Enlace\n\t\t\t$this->Otro_CC_Enlace->HrefValue = \"\";\n\n\t\t\t// NOM_PGE\n\t\t\t$this->NOM_PGE->HrefValue = \"\";\n\n\t\t\t// Otro_Nom_PGE\n\t\t\t$this->Otro_Nom_PGE->HrefValue = \"\";\n\n\t\t\t// Otro_CC_PGE\n\t\t\t$this->Otro_CC_PGE->HrefValue = \"\";\n\n\t\t\t// Departamento\n\t\t\t$this->Departamento->HrefValue = \"\";\n\n\t\t\t// Muncipio\n\t\t\t$this->Muncipio->HrefValue = \"\";\n\n\t\t\t// NOM_VDA\n\t\t\t$this->NOM_VDA->HrefValue = \"\";\n\n\t\t\t// LATITUD\n\t\t\t$this->LATITUD->HrefValue = \"\";\n\n\t\t\t// GRA_LAT\n\t\t\t$this->GRA_LAT->HrefValue = \"\";\n\n\t\t\t// MIN_LAT\n\t\t\t$this->MIN_LAT->HrefValue = \"\";\n\n\t\t\t// SEG_LAT\n\t\t\t$this->SEG_LAT->HrefValue = \"\";\n\n\t\t\t// GRA_LONG\n\t\t\t$this->GRA_LONG->HrefValue = \"\";\n\n\t\t\t// MIN_LONG\n\t\t\t$this->MIN_LONG->HrefValue = \"\";\n\n\t\t\t// SEG_LONG\n\t\t\t$this->SEG_LONG->HrefValue = \"\";\n\n\t\t\t// FECHA_ACC\n\t\t\t$this->FECHA_ACC->HrefValue = \"\";\n\n\t\t\t// HORA_ACC\n\t\t\t$this->HORA_ACC->HrefValue = \"\";\n\n\t\t\t// Hora_ingreso\n\t\t\t$this->Hora_ingreso->HrefValue = \"\";\n\n\t\t\t// FP_Armada\n\t\t\t$this->FP_Armada->HrefValue = \"\";\n\n\t\t\t// FP_Ejercito\n\t\t\t$this->FP_Ejercito->HrefValue = \"\";\n\n\t\t\t// FP_Policia\n\t\t\t$this->FP_Policia->HrefValue = \"\";\n\n\t\t\t// NOM_COMANDANTE\n\t\t\t$this->NOM_COMANDANTE->HrefValue = \"\";\n\n\t\t\t// TESTI1\n\t\t\t$this->TESTI1->HrefValue = \"\";\n\n\t\t\t// CC_TESTI1\n\t\t\t$this->CC_TESTI1->HrefValue = \"\";\n\n\t\t\t// CARGO_TESTI1\n\t\t\t$this->CARGO_TESTI1->HrefValue = \"\";\n\n\t\t\t// TESTI2\n\t\t\t$this->TESTI2->HrefValue = \"\";\n\n\t\t\t// CC_TESTI2\n\t\t\t$this->CC_TESTI2->HrefValue = \"\";\n\n\t\t\t// CARGO_TESTI2\n\t\t\t$this->CARGO_TESTI2->HrefValue = \"\";\n\n\t\t\t// Afectados\n\t\t\t$this->Afectados->HrefValue = \"\";\n\n\t\t\t// NUM_Afectado\n\t\t\t$this->NUM_Afectado->HrefValue = \"\";\n\n\t\t\t// Nom_Afectado\n\t\t\t$this->Nom_Afectado->HrefValue = \"\";\n\n\t\t\t// CC_Afectado\n\t\t\t$this->CC_Afectado->HrefValue = \"\";\n\n\t\t\t// Cargo_Afectado\n\t\t\t$this->Cargo_Afectado->HrefValue = \"\";\n\n\t\t\t// Tipo_incidente\n\t\t\t$this->Tipo_incidente->HrefValue = \"\";\n\n\t\t\t// Riesgo\n\t\t\t$this->Riesgo->HrefValue = \"\";\n\n\t\t\t// Parte_Cuerpo\n\t\t\t$this->Parte_Cuerpo->HrefValue = \"\";\n\n\t\t\t// ESTADO_AFEC\n\t\t\t$this->ESTADO_AFEC->HrefValue = \"\";\n\n\t\t\t// EVACUADO\n\t\t\t$this->EVACUADO->HrefValue = \"\";\n\n\t\t\t// DESC_ACC\n\t\t\t$this->DESC_ACC->HrefValue = \"\";\n\n\t\t\t// Modificado\n\t\t\t$this->Modificado->HrefValue = \"\";\n\n\t\t\t// llave_2\n\t\t\t$this->llave_2->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "public function setRow($row);", "protected function getRowCallbackFunction(){}", "protected function loadRow() {}", "public function rowPreview()\n {\n }", "public function processRow($row);", "public function prepareRowForUpdate(array $rowData);", "public function refresh() : void\n {\n $this->row = $this->row->getTable()->createSelectionInstance($this->getTableName())->get($this->primaryKey->getValue());\n $this->initiateProperties();\n }", "public function renderListRow()\n {\n global $Security, $CurrentLanguage, $Language;\n\n // Call Row Rendering event\n $this->rowRendering();\n\n // Common render codes\n\n // NIK\n\n // NAMA_PEMILIK\n\n // NO_HP\n\n // NAMA_USAHA\n\n // KALURAHAN\n\n // KAPANEWON\n\n // skor_produksi\n\n // maxskor_produksi\n\n // bobot_produksi\n\n // skor_pemasaran\n\n // maxskor_pemasaran\n\n // bobot_pemasaran\n\n // skor_pemasaranonline\n\n // maxskor_pemasaranonline\n\n // bobot_pemasaranonline\n\n // skor_kelembagaan\n\n // maxskor_kelembagaan\n\n // bobot_kelembagaan\n\n // skor_keuangan\n\n // maxskor_keuangan\n\n // bobot_keuangan\n\n // skor_sdm\n\n // maxskor_sdm\n\n // bobot_sdm\n\n // skor_kelas\n\n // maxskor_kelas\n\n // kelas_umkm\n\n // NIK\n $this->NIK->ViewValue = $this->NIK->CurrentValue;\n $this->NIK->ViewCustomAttributes = \"\";\n\n // NAMA_PEMILIK\n $this->NAMA_PEMILIK->ViewValue = $this->NAMA_PEMILIK->CurrentValue;\n $this->NAMA_PEMILIK->ViewCustomAttributes = \"\";\n\n // NO_HP\n $this->NO_HP->ViewValue = $this->NO_HP->CurrentValue;\n $this->NO_HP->ViewCustomAttributes = \"\";\n\n // NAMA_USAHA\n $this->NAMA_USAHA->ViewValue = $this->NAMA_USAHA->CurrentValue;\n $this->NAMA_USAHA->ViewCustomAttributes = \"\";\n\n // KALURAHAN\n $this->KALURAHAN->ViewValue = $this->KALURAHAN->CurrentValue;\n $this->KALURAHAN->ViewCustomAttributes = \"\";\n\n // KAPANEWON\n $this->KAPANEWON->ViewValue = $this->KAPANEWON->CurrentValue;\n $this->KAPANEWON->ViewCustomAttributes = \"\";\n\n // skor_produksi\n $this->skor_produksi->ViewValue = $this->skor_produksi->CurrentValue;\n $this->skor_produksi->ViewValue = FormatNumber($this->skor_produksi->ViewValue, 2, -2, -2, -2);\n $this->skor_produksi->ViewCustomAttributes = \"\";\n\n // maxskor_produksi\n $this->maxskor_produksi->ViewValue = $this->maxskor_produksi->CurrentValue;\n $this->maxskor_produksi->ViewValue = FormatNumber($this->maxskor_produksi->ViewValue, 2, -2, -2, -2);\n $this->maxskor_produksi->ViewCustomAttributes = \"\";\n\n // bobot_produksi\n $this->bobot_produksi->ViewValue = $this->bobot_produksi->CurrentValue;\n $this->bobot_produksi->ViewValue = FormatNumber($this->bobot_produksi->ViewValue, 0, -2, -2, -2);\n $this->bobot_produksi->ViewCustomAttributes = \"\";\n\n // skor_pemasaran\n $this->skor_pemasaran->ViewValue = $this->skor_pemasaran->CurrentValue;\n $this->skor_pemasaran->ViewValue = FormatNumber($this->skor_pemasaran->ViewValue, 2, -2, -2, -2);\n $this->skor_pemasaran->ViewCustomAttributes = \"\";\n\n // maxskor_pemasaran\n $this->maxskor_pemasaran->ViewValue = $this->maxskor_pemasaran->CurrentValue;\n $this->maxskor_pemasaran->ViewValue = FormatNumber($this->maxskor_pemasaran->ViewValue, 2, -2, -2, -2);\n $this->maxskor_pemasaran->ViewCustomAttributes = \"\";\n\n // bobot_pemasaran\n $this->bobot_pemasaran->ViewValue = $this->bobot_pemasaran->CurrentValue;\n $this->bobot_pemasaran->ViewValue = FormatNumber($this->bobot_pemasaran->ViewValue, 0, -2, -2, -2);\n $this->bobot_pemasaran->ViewCustomAttributes = \"\";\n\n // skor_pemasaranonline\n $this->skor_pemasaranonline->ViewValue = $this->skor_pemasaranonline->CurrentValue;\n $this->skor_pemasaranonline->ViewValue = FormatNumber($this->skor_pemasaranonline->ViewValue, 2, -2, -2, -2);\n $this->skor_pemasaranonline->ViewCustomAttributes = \"\";\n\n // maxskor_pemasaranonline\n $this->maxskor_pemasaranonline->ViewValue = $this->maxskor_pemasaranonline->CurrentValue;\n $this->maxskor_pemasaranonline->ViewValue = FormatNumber($this->maxskor_pemasaranonline->ViewValue, 2, -2, -2, -2);\n $this->maxskor_pemasaranonline->ViewCustomAttributes = \"\";\n\n // bobot_pemasaranonline\n $this->bobot_pemasaranonline->ViewValue = $this->bobot_pemasaranonline->CurrentValue;\n $this->bobot_pemasaranonline->ViewValue = FormatNumber($this->bobot_pemasaranonline->ViewValue, 0, -2, -2, -2);\n $this->bobot_pemasaranonline->ViewCustomAttributes = \"\";\n\n // skor_kelembagaan\n $this->skor_kelembagaan->ViewValue = $this->skor_kelembagaan->CurrentValue;\n $this->skor_kelembagaan->ViewValue = FormatNumber($this->skor_kelembagaan->ViewValue, 2, -2, -2, -2);\n $this->skor_kelembagaan->ViewCustomAttributes = \"\";\n\n // maxskor_kelembagaan\n $this->maxskor_kelembagaan->ViewValue = $this->maxskor_kelembagaan->CurrentValue;\n $this->maxskor_kelembagaan->ViewValue = FormatNumber($this->maxskor_kelembagaan->ViewValue, 2, -2, -2, -2);\n $this->maxskor_kelembagaan->ViewCustomAttributes = \"\";\n\n // bobot_kelembagaan\n $this->bobot_kelembagaan->ViewValue = $this->bobot_kelembagaan->CurrentValue;\n $this->bobot_kelembagaan->ViewValue = FormatNumber($this->bobot_kelembagaan->ViewValue, 0, -2, -2, -2);\n $this->bobot_kelembagaan->ViewCustomAttributes = \"\";\n\n // skor_keuangan\n $this->skor_keuangan->ViewValue = $this->skor_keuangan->CurrentValue;\n $this->skor_keuangan->ViewValue = FormatNumber($this->skor_keuangan->ViewValue, 2, -2, -2, -2);\n $this->skor_keuangan->ViewCustomAttributes = \"\";\n\n // maxskor_keuangan\n $this->maxskor_keuangan->ViewValue = $this->maxskor_keuangan->CurrentValue;\n $this->maxskor_keuangan->ViewValue = FormatNumber($this->maxskor_keuangan->ViewValue, 2, -2, -2, -2);\n $this->maxskor_keuangan->ViewCustomAttributes = \"\";\n\n // bobot_keuangan\n $this->bobot_keuangan->ViewValue = $this->bobot_keuangan->CurrentValue;\n $this->bobot_keuangan->ViewValue = FormatNumber($this->bobot_keuangan->ViewValue, 0, -2, -2, -2);\n $this->bobot_keuangan->ViewCustomAttributes = \"\";\n\n // skor_sdm\n $this->skor_sdm->ViewValue = $this->skor_sdm->CurrentValue;\n $this->skor_sdm->ViewValue = FormatNumber($this->skor_sdm->ViewValue, 2, -2, -2, -2);\n $this->skor_sdm->ViewCustomAttributes = \"\";\n\n // maxskor_sdm\n $this->maxskor_sdm->ViewValue = $this->maxskor_sdm->CurrentValue;\n $this->maxskor_sdm->ViewValue = FormatNumber($this->maxskor_sdm->ViewValue, 2, -2, -2, -2);\n $this->maxskor_sdm->ViewCustomAttributes = \"\";\n\n // bobot_sdm\n $this->bobot_sdm->ViewValue = $this->bobot_sdm->CurrentValue;\n $this->bobot_sdm->ViewValue = FormatNumber($this->bobot_sdm->ViewValue, 0, -2, -2, -2);\n $this->bobot_sdm->ViewCustomAttributes = \"\";\n\n // skor_kelas\n $this->skor_kelas->ViewValue = $this->skor_kelas->CurrentValue;\n $this->skor_kelas->ViewValue = FormatNumber($this->skor_kelas->ViewValue, 2, -2, -2, -2);\n $this->skor_kelas->ViewCustomAttributes = \"\";\n\n // maxskor_kelas\n $this->maxskor_kelas->ViewValue = $this->maxskor_kelas->CurrentValue;\n $this->maxskor_kelas->ViewValue = FormatNumber($this->maxskor_kelas->ViewValue, 2, -2, -2, -2);\n $this->maxskor_kelas->ViewCustomAttributes = \"\";\n\n // kelas_umkm\n $this->kelas_umkm->ViewValue = $this->kelas_umkm->CurrentValue;\n $this->kelas_umkm->ViewCustomAttributes = \"\";\n\n // NIK\n $this->NIK->LinkCustomAttributes = \"\";\n $this->NIK->HrefValue = \"\";\n $this->NIK->TooltipValue = \"\";\n\n // NAMA_PEMILIK\n $this->NAMA_PEMILIK->LinkCustomAttributes = \"\";\n $this->NAMA_PEMILIK->HrefValue = \"\";\n $this->NAMA_PEMILIK->TooltipValue = \"\";\n\n // NO_HP\n $this->NO_HP->LinkCustomAttributes = \"\";\n $this->NO_HP->HrefValue = \"\";\n $this->NO_HP->TooltipValue = \"\";\n\n // NAMA_USAHA\n $this->NAMA_USAHA->LinkCustomAttributes = \"\";\n $this->NAMA_USAHA->HrefValue = \"\";\n $this->NAMA_USAHA->TooltipValue = \"\";\n\n // KALURAHAN\n $this->KALURAHAN->LinkCustomAttributes = \"\";\n $this->KALURAHAN->HrefValue = \"\";\n $this->KALURAHAN->TooltipValue = \"\";\n\n // KAPANEWON\n $this->KAPANEWON->LinkCustomAttributes = \"\";\n $this->KAPANEWON->HrefValue = \"\";\n $this->KAPANEWON->TooltipValue = \"\";\n\n // skor_produksi\n $this->skor_produksi->LinkCustomAttributes = \"\";\n $this->skor_produksi->HrefValue = \"\";\n $this->skor_produksi->TooltipValue = \"\";\n\n // maxskor_produksi\n $this->maxskor_produksi->LinkCustomAttributes = \"\";\n $this->maxskor_produksi->HrefValue = \"\";\n $this->maxskor_produksi->TooltipValue = \"\";\n\n // bobot_produksi\n $this->bobot_produksi->LinkCustomAttributes = \"\";\n $this->bobot_produksi->HrefValue = \"\";\n $this->bobot_produksi->TooltipValue = \"\";\n\n // skor_pemasaran\n $this->skor_pemasaran->LinkCustomAttributes = \"\";\n $this->skor_pemasaran->HrefValue = \"\";\n $this->skor_pemasaran->TooltipValue = \"\";\n\n // maxskor_pemasaran\n $this->maxskor_pemasaran->LinkCustomAttributes = \"\";\n $this->maxskor_pemasaran->HrefValue = \"\";\n $this->maxskor_pemasaran->TooltipValue = \"\";\n\n // bobot_pemasaran\n $this->bobot_pemasaran->LinkCustomAttributes = \"\";\n $this->bobot_pemasaran->HrefValue = \"\";\n $this->bobot_pemasaran->TooltipValue = \"\";\n\n // skor_pemasaranonline\n $this->skor_pemasaranonline->LinkCustomAttributes = \"\";\n $this->skor_pemasaranonline->HrefValue = \"\";\n $this->skor_pemasaranonline->TooltipValue = \"\";\n\n // maxskor_pemasaranonline\n $this->maxskor_pemasaranonline->LinkCustomAttributes = \"\";\n $this->maxskor_pemasaranonline->HrefValue = \"\";\n $this->maxskor_pemasaranonline->TooltipValue = \"\";\n\n // bobot_pemasaranonline\n $this->bobot_pemasaranonline->LinkCustomAttributes = \"\";\n $this->bobot_pemasaranonline->HrefValue = \"\";\n $this->bobot_pemasaranonline->TooltipValue = \"\";\n\n // skor_kelembagaan\n $this->skor_kelembagaan->LinkCustomAttributes = \"\";\n $this->skor_kelembagaan->HrefValue = \"\";\n $this->skor_kelembagaan->TooltipValue = \"\";\n\n // maxskor_kelembagaan\n $this->maxskor_kelembagaan->LinkCustomAttributes = \"\";\n $this->maxskor_kelembagaan->HrefValue = \"\";\n $this->maxskor_kelembagaan->TooltipValue = \"\";\n\n // bobot_kelembagaan\n $this->bobot_kelembagaan->LinkCustomAttributes = \"\";\n $this->bobot_kelembagaan->HrefValue = \"\";\n $this->bobot_kelembagaan->TooltipValue = \"\";\n\n // skor_keuangan\n $this->skor_keuangan->LinkCustomAttributes = \"\";\n $this->skor_keuangan->HrefValue = \"\";\n $this->skor_keuangan->TooltipValue = \"\";\n\n // maxskor_keuangan\n $this->maxskor_keuangan->LinkCustomAttributes = \"\";\n $this->maxskor_keuangan->HrefValue = \"\";\n $this->maxskor_keuangan->TooltipValue = \"\";\n\n // bobot_keuangan\n $this->bobot_keuangan->LinkCustomAttributes = \"\";\n $this->bobot_keuangan->HrefValue = \"\";\n $this->bobot_keuangan->TooltipValue = \"\";\n\n // skor_sdm\n $this->skor_sdm->LinkCustomAttributes = \"\";\n $this->skor_sdm->HrefValue = \"\";\n $this->skor_sdm->TooltipValue = \"\";\n\n // maxskor_sdm\n $this->maxskor_sdm->LinkCustomAttributes = \"\";\n $this->maxskor_sdm->HrefValue = \"\";\n $this->maxskor_sdm->TooltipValue = \"\";\n\n // bobot_sdm\n $this->bobot_sdm->LinkCustomAttributes = \"\";\n $this->bobot_sdm->HrefValue = \"\";\n $this->bobot_sdm->TooltipValue = \"\";\n\n // skor_kelas\n $this->skor_kelas->LinkCustomAttributes = \"\";\n $this->skor_kelas->HrefValue = \"\";\n $this->skor_kelas->TooltipValue = \"\";\n\n // maxskor_kelas\n $this->maxskor_kelas->LinkCustomAttributes = \"\";\n $this->maxskor_kelas->HrefValue = \"\";\n $this->maxskor_kelas->TooltipValue = \"\";\n\n // kelas_umkm\n $this->kelas_umkm->LinkCustomAttributes = \"\";\n $this->kelas_umkm->HrefValue = \"\";\n $this->kelas_umkm->TooltipValue = \"\";\n\n // Call Row Rendered event\n $this->rowRendered();\n\n // Save data for Custom Template\n $this->Rows[] = $this->customTemplateFieldValues();\n }", "function RenderListRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n // Common render codes\n\t\t// tanggal\n\t\t// periode\n\t\t// id\n\t\t// angsuran\n\t\t// masaangsuran\n\t\t// dispensasidenda\n\t\t// plafond\n\t\t// angsuranpokok\n\t\t// angsuranpokokauto\n\t\t// angsuranbunga\n\t\t// angsuranbungaauto\n\t\t// denda\n\t\t// dendapersen\n\t\t// totalangsuran\n\t\t// totalangsuranauto\n\t\t// sisaangsuran\n\t\t// sisaangsuranauto\n\t\t// tanggalbayar\n\t\t// terlambat\n\t\t// bayarpokok\n\t\t// bayarpokokauto\n\t\t// bayarbunga\n\t\t// bayarbungaauto\n\t\t// bayardenda\n\t\t// bayardendaauto\n\t\t// bayartitipan\n\t\t// bayartitipanauto\n\t\t// totalbayar\n\t\t// totalbayarauto\n\t\t// pelunasan\n\t\t// pelunasanauto\n\t\t// finalty\n\t\t// finaltyauto\n\t\t// status\n\t\t// keterangan\n\t\t// tanggal\n\n\t\t$this->tanggal->ViewValue = $this->tanggal->CurrentValue;\n\t\t$this->tanggal->ViewValue = ew_FormatDateTime($this->tanggal->ViewValue, 0);\n\t\t$this->tanggal->ViewCustomAttributes = \"\";\n\n\t\t// periode\n\t\t$this->periode->ViewValue = $this->periode->CurrentValue;\n\t\t$this->periode->ViewCustomAttributes = \"\";\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// angsuran\n\t\t$this->angsuran->ViewValue = $this->angsuran->CurrentValue;\n\t\t$this->angsuran->ViewCustomAttributes = \"\";\n\n\t\t// masaangsuran\n\t\t$this->masaangsuran->ViewValue = $this->masaangsuran->CurrentValue;\n\t\t$this->masaangsuran->ViewCustomAttributes = \"\";\n\n\t\t// dispensasidenda\n\t\t$this->dispensasidenda->ViewValue = $this->dispensasidenda->CurrentValue;\n\t\t$this->dispensasidenda->ViewCustomAttributes = \"\";\n\n\t\t// plafond\n\t\t$this->plafond->ViewValue = $this->plafond->CurrentValue;\n\t\t$this->plafond->ViewCustomAttributes = \"\";\n\n\t\t// angsuranpokok\n\t\t$this->angsuranpokok->ViewValue = $this->angsuranpokok->CurrentValue;\n\t\t$this->angsuranpokok->ViewCustomAttributes = \"\";\n\n\t\t// angsuranpokokauto\n\t\t$this->angsuranpokokauto->ViewValue = $this->angsuranpokokauto->CurrentValue;\n\t\t$this->angsuranpokokauto->ViewCustomAttributes = \"\";\n\n\t\t// angsuranbunga\n\t\t$this->angsuranbunga->ViewValue = $this->angsuranbunga->CurrentValue;\n\t\t$this->angsuranbunga->ViewCustomAttributes = \"\";\n\n\t\t// angsuranbungaauto\n\t\t$this->angsuranbungaauto->ViewValue = $this->angsuranbungaauto->CurrentValue;\n\t\t$this->angsuranbungaauto->ViewCustomAttributes = \"\";\n\n\t\t// denda\n\t\t$this->denda->ViewValue = $this->denda->CurrentValue;\n\t\t$this->denda->ViewCustomAttributes = \"\";\n\n\t\t// dendapersen\n\t\t$this->dendapersen->ViewValue = $this->dendapersen->CurrentValue;\n\t\t$this->dendapersen->ViewCustomAttributes = \"\";\n\n\t\t// totalangsuran\n\t\t$this->totalangsuran->ViewValue = $this->totalangsuran->CurrentValue;\n\t\t$this->totalangsuran->ViewCustomAttributes = \"\";\n\n\t\t// totalangsuranauto\n\t\t$this->totalangsuranauto->ViewValue = $this->totalangsuranauto->CurrentValue;\n\t\t$this->totalangsuranauto->ViewCustomAttributes = \"\";\n\n\t\t// sisaangsuran\n\t\t$this->sisaangsuran->ViewValue = $this->sisaangsuran->CurrentValue;\n\t\t$this->sisaangsuran->ViewCustomAttributes = \"\";\n\n\t\t// sisaangsuranauto\n\t\t$this->sisaangsuranauto->ViewValue = $this->sisaangsuranauto->CurrentValue;\n\t\t$this->sisaangsuranauto->ViewCustomAttributes = \"\";\n\n\t\t// tanggalbayar\n\t\t$this->tanggalbayar->ViewValue = $this->tanggalbayar->CurrentValue;\n\t\t$this->tanggalbayar->ViewValue = ew_FormatDateTime($this->tanggalbayar->ViewValue, 0);\n\t\t$this->tanggalbayar->ViewCustomAttributes = \"\";\n\n\t\t// terlambat\n\t\t$this->terlambat->ViewValue = $this->terlambat->CurrentValue;\n\t\t$this->terlambat->ViewCustomAttributes = \"\";\n\n\t\t// bayarpokok\n\t\t$this->bayarpokok->ViewValue = $this->bayarpokok->CurrentValue;\n\t\t$this->bayarpokok->ViewCustomAttributes = \"\";\n\n\t\t// bayarpokokauto\n\t\t$this->bayarpokokauto->ViewValue = $this->bayarpokokauto->CurrentValue;\n\t\t$this->bayarpokokauto->ViewCustomAttributes = \"\";\n\n\t\t// bayarbunga\n\t\t$this->bayarbunga->ViewValue = $this->bayarbunga->CurrentValue;\n\t\t$this->bayarbunga->ViewCustomAttributes = \"\";\n\n\t\t// bayarbungaauto\n\t\t$this->bayarbungaauto->ViewValue = $this->bayarbungaauto->CurrentValue;\n\t\t$this->bayarbungaauto->ViewCustomAttributes = \"\";\n\n\t\t// bayardenda\n\t\t$this->bayardenda->ViewValue = $this->bayardenda->CurrentValue;\n\t\t$this->bayardenda->ViewCustomAttributes = \"\";\n\n\t\t// bayardendaauto\n\t\t$this->bayardendaauto->ViewValue = $this->bayardendaauto->CurrentValue;\n\t\t$this->bayardendaauto->ViewCustomAttributes = \"\";\n\n\t\t// bayartitipan\n\t\t$this->bayartitipan->ViewValue = $this->bayartitipan->CurrentValue;\n\t\t$this->bayartitipan->ViewCustomAttributes = \"\";\n\n\t\t// bayartitipanauto\n\t\t$this->bayartitipanauto->ViewValue = $this->bayartitipanauto->CurrentValue;\n\t\t$this->bayartitipanauto->ViewCustomAttributes = \"\";\n\n\t\t// totalbayar\n\t\t$this->totalbayar->ViewValue = $this->totalbayar->CurrentValue;\n\t\t$this->totalbayar->ViewCustomAttributes = \"\";\n\n\t\t// totalbayarauto\n\t\t$this->totalbayarauto->ViewValue = $this->totalbayarauto->CurrentValue;\n\t\t$this->totalbayarauto->ViewCustomAttributes = \"\";\n\n\t\t// pelunasan\n\t\t$this->pelunasan->ViewValue = $this->pelunasan->CurrentValue;\n\t\t$this->pelunasan->ViewCustomAttributes = \"\";\n\n\t\t// pelunasanauto\n\t\t$this->pelunasanauto->ViewValue = $this->pelunasanauto->CurrentValue;\n\t\t$this->pelunasanauto->ViewCustomAttributes = \"\";\n\n\t\t// finalty\n\t\t$this->finalty->ViewValue = $this->finalty->CurrentValue;\n\t\t$this->finalty->ViewCustomAttributes = \"\";\n\n\t\t// finaltyauto\n\t\t$this->finaltyauto->ViewValue = $this->finaltyauto->CurrentValue;\n\t\t$this->finaltyauto->ViewCustomAttributes = \"\";\n\n\t\t// status\n\t\t$this->status->ViewValue = $this->status->CurrentValue;\n\t\t$this->status->ViewCustomAttributes = \"\";\n\n\t\t// keterangan\n\t\t$this->keterangan->ViewValue = $this->keterangan->CurrentValue;\n\t\t$this->keterangan->ViewCustomAttributes = \"\";\n\n\t\t// tanggal\n\t\t$this->tanggal->LinkCustomAttributes = \"\";\n\t\t$this->tanggal->HrefValue = \"\";\n\t\t$this->tanggal->TooltipValue = \"\";\n\n\t\t// periode\n\t\t$this->periode->LinkCustomAttributes = \"\";\n\t\t$this->periode->HrefValue = \"\";\n\t\t$this->periode->TooltipValue = \"\";\n\n\t\t// id\n\t\t$this->id->LinkCustomAttributes = \"\";\n\t\t$this->id->HrefValue = \"\";\n\t\t$this->id->TooltipValue = \"\";\n\n\t\t// angsuran\n\t\t$this->angsuran->LinkCustomAttributes = \"\";\n\t\t$this->angsuran->HrefValue = \"\";\n\t\t$this->angsuran->TooltipValue = \"\";\n\n\t\t// masaangsuran\n\t\t$this->masaangsuran->LinkCustomAttributes = \"\";\n\t\t$this->masaangsuran->HrefValue = \"\";\n\t\t$this->masaangsuran->TooltipValue = \"\";\n\n\t\t// dispensasidenda\n\t\t$this->dispensasidenda->LinkCustomAttributes = \"\";\n\t\t$this->dispensasidenda->HrefValue = \"\";\n\t\t$this->dispensasidenda->TooltipValue = \"\";\n\n\t\t// plafond\n\t\t$this->plafond->LinkCustomAttributes = \"\";\n\t\t$this->plafond->HrefValue = \"\";\n\t\t$this->plafond->TooltipValue = \"\";\n\n\t\t// angsuranpokok\n\t\t$this->angsuranpokok->LinkCustomAttributes = \"\";\n\t\t$this->angsuranpokok->HrefValue = \"\";\n\t\t$this->angsuranpokok->TooltipValue = \"\";\n\n\t\t// angsuranpokokauto\n\t\t$this->angsuranpokokauto->LinkCustomAttributes = \"\";\n\t\t$this->angsuranpokokauto->HrefValue = \"\";\n\t\t$this->angsuranpokokauto->TooltipValue = \"\";\n\n\t\t// angsuranbunga\n\t\t$this->angsuranbunga->LinkCustomAttributes = \"\";\n\t\t$this->angsuranbunga->HrefValue = \"\";\n\t\t$this->angsuranbunga->TooltipValue = \"\";\n\n\t\t// angsuranbungaauto\n\t\t$this->angsuranbungaauto->LinkCustomAttributes = \"\";\n\t\t$this->angsuranbungaauto->HrefValue = \"\";\n\t\t$this->angsuranbungaauto->TooltipValue = \"\";\n\n\t\t// denda\n\t\t$this->denda->LinkCustomAttributes = \"\";\n\t\t$this->denda->HrefValue = \"\";\n\t\t$this->denda->TooltipValue = \"\";\n\n\t\t// dendapersen\n\t\t$this->dendapersen->LinkCustomAttributes = \"\";\n\t\t$this->dendapersen->HrefValue = \"\";\n\t\t$this->dendapersen->TooltipValue = \"\";\n\n\t\t// totalangsuran\n\t\t$this->totalangsuran->LinkCustomAttributes = \"\";\n\t\t$this->totalangsuran->HrefValue = \"\";\n\t\t$this->totalangsuran->TooltipValue = \"\";\n\n\t\t// totalangsuranauto\n\t\t$this->totalangsuranauto->LinkCustomAttributes = \"\";\n\t\t$this->totalangsuranauto->HrefValue = \"\";\n\t\t$this->totalangsuranauto->TooltipValue = \"\";\n\n\t\t// sisaangsuran\n\t\t$this->sisaangsuran->LinkCustomAttributes = \"\";\n\t\t$this->sisaangsuran->HrefValue = \"\";\n\t\t$this->sisaangsuran->TooltipValue = \"\";\n\n\t\t// sisaangsuranauto\n\t\t$this->sisaangsuranauto->LinkCustomAttributes = \"\";\n\t\t$this->sisaangsuranauto->HrefValue = \"\";\n\t\t$this->sisaangsuranauto->TooltipValue = \"\";\n\n\t\t// tanggalbayar\n\t\t$this->tanggalbayar->LinkCustomAttributes = \"\";\n\t\t$this->tanggalbayar->HrefValue = \"\";\n\t\t$this->tanggalbayar->TooltipValue = \"\";\n\n\t\t// terlambat\n\t\t$this->terlambat->LinkCustomAttributes = \"\";\n\t\t$this->terlambat->HrefValue = \"\";\n\t\t$this->terlambat->TooltipValue = \"\";\n\n\t\t// bayarpokok\n\t\t$this->bayarpokok->LinkCustomAttributes = \"\";\n\t\t$this->bayarpokok->HrefValue = \"\";\n\t\t$this->bayarpokok->TooltipValue = \"\";\n\n\t\t// bayarpokokauto\n\t\t$this->bayarpokokauto->LinkCustomAttributes = \"\";\n\t\t$this->bayarpokokauto->HrefValue = \"\";\n\t\t$this->bayarpokokauto->TooltipValue = \"\";\n\n\t\t// bayarbunga\n\t\t$this->bayarbunga->LinkCustomAttributes = \"\";\n\t\t$this->bayarbunga->HrefValue = \"\";\n\t\t$this->bayarbunga->TooltipValue = \"\";\n\n\t\t// bayarbungaauto\n\t\t$this->bayarbungaauto->LinkCustomAttributes = \"\";\n\t\t$this->bayarbungaauto->HrefValue = \"\";\n\t\t$this->bayarbungaauto->TooltipValue = \"\";\n\n\t\t// bayardenda\n\t\t$this->bayardenda->LinkCustomAttributes = \"\";\n\t\t$this->bayardenda->HrefValue = \"\";\n\t\t$this->bayardenda->TooltipValue = \"\";\n\n\t\t// bayardendaauto\n\t\t$this->bayardendaauto->LinkCustomAttributes = \"\";\n\t\t$this->bayardendaauto->HrefValue = \"\";\n\t\t$this->bayardendaauto->TooltipValue = \"\";\n\n\t\t// bayartitipan\n\t\t$this->bayartitipan->LinkCustomAttributes = \"\";\n\t\t$this->bayartitipan->HrefValue = \"\";\n\t\t$this->bayartitipan->TooltipValue = \"\";\n\n\t\t// bayartitipanauto\n\t\t$this->bayartitipanauto->LinkCustomAttributes = \"\";\n\t\t$this->bayartitipanauto->HrefValue = \"\";\n\t\t$this->bayartitipanauto->TooltipValue = \"\";\n\n\t\t// totalbayar\n\t\t$this->totalbayar->LinkCustomAttributes = \"\";\n\t\t$this->totalbayar->HrefValue = \"\";\n\t\t$this->totalbayar->TooltipValue = \"\";\n\n\t\t// totalbayarauto\n\t\t$this->totalbayarauto->LinkCustomAttributes = \"\";\n\t\t$this->totalbayarauto->HrefValue = \"\";\n\t\t$this->totalbayarauto->TooltipValue = \"\";\n\n\t\t// pelunasan\n\t\t$this->pelunasan->LinkCustomAttributes = \"\";\n\t\t$this->pelunasan->HrefValue = \"\";\n\t\t$this->pelunasan->TooltipValue = \"\";\n\n\t\t// pelunasanauto\n\t\t$this->pelunasanauto->LinkCustomAttributes = \"\";\n\t\t$this->pelunasanauto->HrefValue = \"\";\n\t\t$this->pelunasanauto->TooltipValue = \"\";\n\n\t\t// finalty\n\t\t$this->finalty->LinkCustomAttributes = \"\";\n\t\t$this->finalty->HrefValue = \"\";\n\t\t$this->finalty->TooltipValue = \"\";\n\n\t\t// finaltyauto\n\t\t$this->finaltyauto->LinkCustomAttributes = \"\";\n\t\t$this->finaltyauto->HrefValue = \"\";\n\t\t$this->finaltyauto->TooltipValue = \"\";\n\n\t\t// status\n\t\t$this->status->LinkCustomAttributes = \"\";\n\t\t$this->status->HrefValue = \"\";\n\t\t$this->status->TooltipValue = \"\";\n\n\t\t// keterangan\n\t\t$this->keterangan->LinkCustomAttributes = \"\";\n\t\t$this->keterangan->HrefValue = \"\";\n\t\t$this->keterangan->TooltipValue = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "abstract public function processRow($row);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run hourly cron updates
public function runHourlyCronUpdate(CronEvent $event) { $app = $this->app; // Fetch youtube info if ($event->output) { $event->output->writeln("<comment> Checking youtube for updates...</comment>"); } $runner = new Runner($app); $results = $runner->run(); $results->then(null, function ($error) use ($app) { $app['logger.system']->error($error->getMessage(), ['event' => 'cron']); })->wait(false); }
[ "public function cron()\n\t{\n\t\tif ($this->tank_auth->is_admin())\n\t\t{\n\t\t\t$last_check = get_setting('fs_cron_autoupgrade');\n\n\t\t\t// hourly cron\n\t\t\tif (time() - $last_check > 3600)\n\t\t\t{\n\t\t\t\t// update autoupgrade cron time\n\t\t\t\t$this->db->update('preferences', array('value' => time()), array('name' => 'fs_cron_autoupgrade'));\n\n\t\t\t\t// load model\n\t\t\t\t$this->load->model('upgrade_model');\n\t\t\t\t// check\n\t\t\t\t$versions = $this->upgrade_model->check_latest(TRUE);\n\n\t\t\t\t// if a version is outputted, save the new version number in database\n\t\t\t\tif ($versions[0])\n\t\t\t\t{\n\t\t\t\t\t$this->db->update('preferences', array('value' => $versions[0]->version . '.' . $versions[0]->subversion . '.' . $versions[0]->subsubversion), array('name' => 'fs_cron_autoupgrade_version'));\n\t\t\t\t}\n\n\t\t\t\t// remove one week old logs\n\t\t\t\t$files = glob($this->config->item('log_path') . 'log*.php');\n\t\t\t\tforeach ($files as $file)\n\t\t\t\t{\n\t\t\t\t\tif (filemtime($file) < strtotime('-7 days'))\n\t\t\t\t\t{\n\t\t\t\t\t\tunlink($file);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// reload the settings\n\t\t\t\tload_settings();\n\t\t\t}\n\t\t}\n\t}", "function hourly_cron() {\n\t\n\t\t//get a random domain and inspect it\n\t\t//this allows us to continously update via cron \n\t\twhile ( $domain = $this->get_random_domain() )\n\t\t\t\t$this->inspect( $domain );\n\t\n\t}", "private function _updateCronStats()\n\t{\n\t $this->load->model('tasks');\n\t $this->tasks->updateCronStats();\n\t}", "public function actionCronHourly()\n {\n switch (date('H')) {\n default: echo \"Nothing to run\\n\";\n }\n echo \"Done!\\n\";\n }", "public function everyHour() {\n $this->cron('0 * * * *');\n }", "private function configureCron()\n\t{\n\t\t// Check, if there are update sets\n\t\tif ($this->getSetAmount() > 0)\n\t\t{\n\t\t\t// Add the cron entry, if it is not present already\n\t\t\tif (!CRON_isEntryPresent(self::CRON_IDENT))\n\t\t\t\tCRON_addJobMinutely(15, HELPER_getApacheUser(), '/m23/bin/m23CronStarter CAutoUpdate.run', self::CRON_IDENT, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Remove the cron entry, if it is there\n\t\t\tif (CRON_isEntryPresent(self::CRON_IDENT))\n\t\t\t\tCRON_rmJob(self::CRON_IDENT);\n\t\t}\n\t}", "public function run_cron() {\n\n\t}", "public function dailyCron()\n {\n if (!$this->_helper->isEnabled()) {\n return;\n }\n $this->updateTotalCount();\n }", "public function amazonFeedUpdateCron()\n {\n\n if (!wp_next_scheduled('update_amazonfeeds_hook')) {\n wp_schedule_event(time(), get_option('amwscp_feed_update_interval'), 'update_amazonfeeds_hook');\n }\n }", "function cron() {\n $now = time();\n\n // Add a small negative buffer (1% of the entire period) to the time to account for slight difference in cron run length.\n $wait_time = $this->period - ($this->period * \\Drupal::config('backup_migrate.settings')->get('schedule.buffer'));\n\n if ($this->is_enabled() && ($now - $this->get('last_run')) >= $wait_time) {\n if ($settings = $this->get_profile()) {\n $settings->destination_id = $this->destination_id;\n $settings->source_id = $this->source_id;\n backup_migrate_perform_backup($settings);\n $this->update_last_run($now);\n $this->remove_expired_backups();\n }\n else {\n backup_migrate_backup_fail(\"Schedule '%schedule' could not be run because requires a profile which is missing.\", array('%schedule' => $schedule->get_name()), $settings);\n }\n }\n }", "function _runCron()\r\t{\r\t\t$this->_extendCron();\r\t}", "function cron() {\n\t\t//look at the clock.\n\t\t$now = strtotime('now');\n\t\t\n\t\t//check for the hack\n\t\tif(Configure::read('debug') != 0 && isset($this->params['named']['time_machine'])){\n\t\t\t$now = strtotime($this->params['named']['time_machine']);\n\t\t}\n\t\t\n\t\t$this->Project->upgradeProjects($now);\n\t}", "static function cron() {\n\t\tself::starter();\n\t\tself::ender();\n\t}", "public function shedule_cron_events() {\n\t\t\t$plugin_version = $this->get_plugin_version();\n\t\t\t$option_version = $this->get_option_version();\n\n\t\t\tif ( $plugin_version !== $option_version ) {\n\t\t\t\t/* dashboard cron */\n\t\t\t\tif ( ! wp_next_scheduled( 'helpful/dashboard/build_cache' ) ) {\n\t\t\t\t\twp_schedule_event( time(), 'twicedaily', 'helpful/dashboard/build_cache' );\n\t\t\t\t}\n\n\t\t\t\t/* refresh version in database */\n\t\t\t\t$this->refresh_option_version();\n\t\t\t}\n\t\t}", "public function cron_handler() {\n\t\t\n\t}", "protected function cronRun() {\n $this->drupalGet('cron/' . \\Drupal::state()->get('system.cron_key'));\n }", "public function actionCron()\r\n\t{\r\n\t\tif (UserGroupsConfiguration::findRule('server_executed_crons') !== true)\r\n\t\t\t\treturn;\r\n\r\n\t\tUGCron::init();\r\n\t\tUGCron::add(new UGCJGarbageCollection);\r\n\t\tUGCron::add(new UGCJUnban);\r\n\t\tforeach (Yii::app()->controller->module->crons as $c) {\r\n\t\t\tUGCron::add(new $c);\r\n\t\t}\r\n\t\tUGCron::run();\r\n\t}", "public function do_cron() {\n\n\t\t// register unlocker\n\t\tregister_shutdown_function( array( $this, 'shutdown_cron' ) );\n\t\t// make a nonce for starting\n\t\t$args = array(\n\t\t\t'httpversion' => '1.1',\n\t\t);\n\n\t\t$req = wp_remote_get( site_url( 'wp-cron.php?doing_wp_cron' ), $args );\n\t\tif ( ! empty( $req['body'] ) ) {\n\t\t\t$this->log();\n\t\t\t$this->log( $req['body'], true );\n\t\t}\n\t\t$this->unlock();\n\n\t}", "private function updateCronInfo()\n {\n $ClearHttpCacheJob = $this->container->get('cron')->getJobByAction('Shopware_CronJob_ClearHttpCache');\n if (null === $ClearHttpCacheJob) {\n return;\n }\n $FfuenfCacheWarmUpJob = $this->container->get('cron')->getJobByAction('Shopware_Components_CronJob_FfuenfCacheWarmUpCron');\n $ClearHttpCacheJobNext = $ClearHttpCacheJob->getNext();\n $ClearHttpCacheJobInterval = $ClearHttpCacheJob->getInterval();\n if ($ClearHttpCacheJobInterval) {\n $FfuenfCacheWarmUpJob->setInterval($ClearHttpCacheJobInterval);\n }\n if ($ClearHttpCacheJobNext) {\n $FfuenfCacheWarmUpJob->setNext($ClearHttpCacheJobNext);\n }\n $this->container->get('cron')->updateJob($FfuenfCacheWarmUpJob);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Substitution should create a new file
public function testSubstituteWithMatchShouldCreateNewFile(): void { $processor = new Processor(self::$defaultOptions); $fileObject = new \SplFileObject('vfs://match.php.dist'); $processor->substitute($fileObject, ['test' => 'works!']); $target = self::$fileSystem->get('/match.php'); self::assertNotNull($target); self::assertEquals('Awesome works!', $target->getContent()); }
[ "protected function createFile() {}", "public function new_file()\n {\n $input = JFactory::getApplication()->input;\n\n $ecr_project = $input->get('ecr_project');\n\n if($input->get('do_action') == 'new_file')\n {\n $reqPath = $input->getPath('act_path');\n $reqName = $input->getPath('act_name');\n\n $path = JPath::clean(JPATH_ROOT.DS.$reqPath.DS.$reqName);\n\n if(is_dir($path))\n {\n EcrHtml::message(array(jgettext('This is a folder'), $path), 'error');\n\n return;\n }\n\n if(is_file($path))\n {\n EcrHtml::message(array(jgettext('The file already exists'), $path), 'error');\n\n return;\n }\n\n //-- @todo file from template\n $template = 'new file';\n\n if( ! is_int(file_put_contents($path, $template)))\n {\n EcrHtml::message(array(jgettext('Unable to create file'), $path), 'error');\n\n return;\n }\n\n //-- Clean the cache\n JFactory::getCache('EasyCreator_'.$ecr_project)->clean();\n\n echo '*OK*';\n\n return;\n }\n\n $this->actForm(jgettext('New file'), 'add', jgettext('Create'));\n $this->processForm('new_file', $ecr_project, 'file', 'new', true, true);\n }", "function writeToFile($parsedTemplate, $title) {\n\t$pathAndFileName = getPathAndFileName($title);\n\n\t$fh = fopen($pathAndFileName, 'a');\n\t$fw = fwrite($fh, $parsedTemplate);\n\tfclose($fh);\n\n\tif ($fw) {\n\t\techo COLOR_GREEN . \"[+] \" . COLOR_END . \"Created successfully: {$pathAndFileName}\\n\";\n\t}\n\telse {\n\t\techo COLOR_RED . \"[-] \" . COLOR_END . \"Failed to create {$pathAndFileName}\\n\";\n\t}\n}", "function create($file=NULL, $content=NULL) {\n\t\t$file = fra_var[\"files_path\"].\"\".$file;\n\t\tif(file_exists($file)) {\n\t\t\tunlink($file);\n\t\t}\t\n\t\tif(file_put_contents($file, $content)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "abstract public function createFile($filename);", "public function createNewFile($mode = null);", "Function createFileLog($pFileName,$ctn){\n $newFile = fopen($pFileName, 'w');\n fwrite($newFile, $ctn);\n fclose($newFile); \n }", "protected function createFile()\n {\n $tmpfile = $this->tmpDir . '/' . $this->hash . '.tex';\n\n $tex = '\\documentclass[12pt]{article}'.\"\\n\";\n \n $tex .= '\\usepackage[utf8]{inputenc}'.\"\\n\";\n\n // Packages\n foreach ($this->packages as $package) {\n $tex .= '\\usepackage{' . $package . \"}\\n\";\n }\n \n $tex .= '\\begin{document}'.\"\\n\";\n $tex .= '\\pagestyle{empty}'.\"\\n\";\n $tex .= '\\begin{displaymath}'.\"\\n\";\n \n $tex .= $this->formula.\"\\n\";\n \n $tex .= '\\end{displaymath}'.\"\\n\";\n $tex .= '\\end{document}'.\"\\n\";\n if (file_put_contents($tmpfile, $tex) === false) {\n throw new \\Exception('Failed to open target file');\n }\n }", "Function createFileLogAdd($pFileName,$ctn){\n $newFile = fopen($pFileName, 'a');\n fwrite($newFile, $ctn);\n fclose($newFile); \n }", "public function createFileStart();", "function process_file($filename, $replace) {\n file_put_contents(\n TARGET_DIR.'/'.$filename,\n preg_replace_callback(\"/{{([\\w_]{1,})}}/\", function ($match) use ($replace) {\n return array_key_exists($match[1], $replace) ? $replace[$match[1]] : '';\n }, file_get_contents(SOURCE_DIR.'/'.$filename))\n );\n}", "private function _insert_test_file()\n {\n }", "private function setNewFileName()\n {\n $fname=date('YmdHis').rand(100,999);\n $this->newFileName=$fname.'.'.$this->fileType;\n }", "function fdf_add_template($fdfdoc, $newpage, $filename, $template, $rename) {}", "function setFileCreationOrUpdate($txt)\n {\n $this->_file_creation_or_update = $txt ;\n }", "public function crear(){\n\t\t$this->archivo = fopen($this->nombre , \"w+\");\n\t}", "function testCreateFileAlreadyExistingAndActive() {\n // Create toto.txt in the release directory\n mkdir($GLOBALS['ftp_frs_dir_prefix'].'/prj/p123_r456');\n touch($GLOBALS['ftp_frs_dir_prefix'].'/prj/p123_r456/toto.txt_1299584197');\n\n $p = new MockProject($this);\n $p->setReturnValue('getUnixName', 'prj');\n\n $r = new FRSRelease();\n $r->setReleaseID(456);\n $r->setPackageID(123);\n $r->setGroupID(111);\n $r->setProject($p);\n\n $f = new FRSFile();\n $f->setFileName('toto.txt_1299584219');\n $f->setRelease($r);\n\n $ff = new FRSFileFactoryTestCreateFiles();\n $ff->setReturnValue('isFileBaseNameExists', True);\n try {\n $ff->createFile($f);\n }\n catch (Exception $e) {\n $this->assertIsA($e, 'FRSFileExistsException');\n }\n\n unlink($GLOBALS['ftp_frs_dir_prefix'].'/prj/p123_r456/toto.txt_1299584197');\n rmdir($GLOBALS['ftp_frs_dir_prefix'].'/prj/p123_r456');\n }", "public function create_java_file(){\n $name_tmp = explode(\"{\",trim($this->source_code));\n $final_name = explode(\"class\", $name_tmp[0]);\n if(sizeof($final_name) > 1){\n $this->program_name = trim($final_name[1]);\n //$my_file = \"programs/\".$this->program_name.'.java';\n $my_file = $this->program_name.'.java';\n $handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file);\n $data = $this->source_code;\n fwrite($handle, $data);\n }\n }", "private function createNewTempFile()\n {\n $this->currentFileLines = 0;\n $this->timestamp = $this->getTimestamp();\n\n $this->filename = $this->filePrefix . '-' . $this->timestamp . self::TEMPORARY_FILE_EXTENSION;\n $absolutePath = $this->filePath . $this->filename;\n\n if (file_exists($absolutePath)) {\n $this->logger->debug(\n MappIntelligenceMessages::$USE_EXISTING_LOG_FILE,\n $this->filename,\n $absolutePath\n );\n } else {\n $this->logger->debug(\n MappIntelligenceMessages::$CREATE_NEW_LOG_FILE,\n $this->filename,\n $absolutePath,\n 'true'\n );\n }\n\n $this->file = $this->getFileResource($absolutePath);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetch via Geofence resource accesses.
public function fetchResourceViaRequest(Geofence $geofence, Resource $resource) { return $geofence->accesses()->with('accessible', 'first_location', 'last_location', 'geofence') ->where('accessible_type', get_class($resource)) ->where('geofence_uuid', $geofence->uuid) ->latest() ->paginate(20); }
[ "function getGeometrieById(): Geometrie\n {\n }", "private function fetchGeoCoordinates()\r\n {\r\n $geoCoordinatesNode = $this->findFirstGrandchild('geo', 'geokoordinaten');\r\n $attributes = $this->fetchLowercasedDomAttributes($geoCoordinatesNode);\r\n \r\n if (\r\n $this->isElementSetAndNonEmpty('laengengrad', $attributes)\r\n && $this->isElementSetAndNonEmpty('breitengrad', $attributes)\r\n ) {\r\n $this->addImportedData('has_coordinates', true);\r\n $this->addImportedData('coordinates_problem', false);\r\n $this->addImportedData('longitude', (float)$attributes['laengengrad']);\r\n $this->addImportedData('latitude', (float)$attributes['breitengrad']);\r\n }\r\n }", "public function fetchGeoData()\n {\n\n $destinationArray = array();\n\n // if an address is given\n if ($this->getAddress()) {\n $destinationArray[] = $this->getAddress();\n $destinationArray[] = $this->getCountry();\n\n // if only a postal code is given\n } elseif ($this->getPostalCode()) {\n $destinationArray[] = $this->getPostalCode();\n $destinationArray[] = $this->getCountry();\n\n // else long AND lat is given (only one of these doesn't work)\n } elseif ($this->getLongitude() && $this->getLatitude()) {\n $destinationArray[] = $this->getLongitude();\n $destinationArray[] = $this->getLatitude();\n\n } else {\n\n $this->getLogger()->log(\n \\TYPO3\\CMS\\Core\\Log\\LogLevel::ERROR,\n 'No valid location given. You must specify an address or a zip-code or longitude and latitude.'\n );\n\n return false;\n }\n\n\n $settings = $this->getSettings();\n\n // is URL not defined, key is interpreted also as not defined\n if ($settings['googleApiUrl']) {\n $apiUrl = $settings['googleApiUrl'];\n $apiKey = $settings['googleApiKey'];\n } else {\n $apiUrl = self::GOOGLE_API_URL;\n $apiKey = self::GOOGLE_API_KEY;\n }\n\n $completeUrlSave = $completeUrl = $apiUrl . '?sensor=false&address={' . urlencode(implode(', ', $destinationArray)) . '}';\n\n // check for additional api key (not mandatory)\n if ($apiKey) {\n $completeUrl .= \"&key=\" . $apiKey;\n }\n\n try {\n\n // set up context if proxy is used\n $aContext = array();\n if ($settings['proxy']) {\n\n $aContext = array(\n 'http' => array(\n 'proxy' => $settings['proxy'],\n 'request_fulluri' => true,\n ),\n );\n\n if ($settings['proxyUsername']) {\n $auth = base64_encode($settings['proxyUsername'] . ':' . $settings['proxyPassword']);\n $aContext['http']['header'] = 'Proxy-Authorization: Basic ' . $auth;\n }\n }\n\n // get data from Google\n $cxContext = stream_context_create($aContext);\n if (ini_get('allow_url_fopen')) {\n $responseJson = file_get_contents($completeUrl, false, $cxContext);\n } else {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Disable SSL verification\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_URL,$completeUrl);\n $responseJson=curl_exec($ch);\n curl_close($ch);\n }\n $response = json_decode($responseJson, true);\n\n // if response is \"OK\", than set retrieved data\n if ($response['status'] == 'OK') {\n\n /** @var \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager $objectManager */\n $objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(ObjectManager::class);\n\n /** @var \\RKW\\RkwGeolocation\\Domain\\Model\\Geolocation $geoLocation */\n $geoLocation = $objectManager->get(\\RKW\\RkwGeolocation\\Domain\\Model\\Geolocation::class);\n\n $geoLocation->setLatitude(\n filter_var(\n $response['results'][0]['geometry']['location']['lat'],\n FILTER_VALIDATE_FLOAT\n )\n );\n $geoLocation->setLongitude(\n filter_var(\n $response['results'][0]['geometry']['location']['lng'],\n FILTER_VALIDATE_FLOAT\n )\n );\n $geoLocation->setFormattedAddress(\n filter_var(\n $response['results'][0]['formatted_address'],\n FILTER_SANITIZE_STRING\n )\n );\n\n $addressComponents = $response['results'][0]['address_components'];\n\n // additional get postalCode\n if (is_array($addressComponents)) {\n foreach ($addressComponents as $component) {\n\n if ($component['types'][0] == 'postal_code') {\n $geoLocation->setPostalCode($component['long_name']);\n break;\n }\n }\n }\n\n $this->getLogger()->log(\n \\TYPO3\\CMS\\Core\\Log\\LogLevel::INFO,\n sprintf(\n 'Successfully received data from Google API for location \"%s\"',\n implode(',', $destinationArray)\n )\n );\n\n return $geoLocation;\n\n }\n\n $this->getLogger()->log(\n \\TYPO3\\CMS\\Core\\Log\\LogLevel::WARNING,\n sprintf(\n 'Google API call for location \"%s\" failed (%s). Reason: %s. %s',\n implode(',', $destinationArray),\n $completeUrlSave,\n $response['status'],\n $response['error_message'])\n );\n\n } catch (\\Exception $e) {\n $this->getLogger()->log(\n \\TYPO3\\CMS\\Core\\Log\\LogLevel::ERROR,\n sprintf('Google API for location \"%s\" call failed (%s). Reason: %s.',\n implode(',', $destinationArray),\n $completeUrlSave,\n $e->getMessage()\n )\n );\n }\n\n return false;\n }", "function geoserver_fetch($url, $request = \"GetFeature\", $args = NULL, $filter = FALSE, $format = 'GML2') {\n global $gBitSystem, $gBitSmarty;\n\n $post = 'SERVICE=WFS&VERSION=1.0.0&REQUEST='.$request;\n\n $post .= '&OUTPUTFORMAT='.$format;\n\n $query_url = $url;\n\n if( !empty( $args ) ) {\n foreach ($args as $arg => $val) {\n if ($filter && strtolower($arg) == 'bbox') {\n\t$gBitSmarty->assign('bbox', $val);\n } elseif ($filter && strtolower($arg) == 'filter') {\n\t$val = html_entity_decode($val);\n\t$f = preg_replace('/<\\/?filter\\s*>/i','',$val);\n\t$f = html_entity_decode($f);\n\t$gBitSmarty->assign('filter', $f);\n } elseif (strtolower($arg) == 'wfs_path') {\n\t$query_url .= $val;\n } elseif (strtolower($arg) == 'offset') {\n\t$gBitSmarty->assign('offset', $val);\n } else {\n\t$post .= '&'.$arg.'='.html_entity_decode($val);\n }\n }\n }\n\n // Get the filter to post\n if( $filter ) {\n $post .= \"&FILTER=\".urlencode($gBitSmarty->fetch('bitpackage:geoserver/'.$filter));\n }\n\n if ($_SERVER['REQUEST_METHOD'] != 'POST') {\n $query_url .= '?'.$post;\n }\n \n // create a new cURL resource\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $query_url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n }\n $result = curl_exec($ch);\n\n if( !$result ) {\n geoserver_exception(curl_error($ch));\n }\n\n $header = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n if( !empty($header) ) {\n header('Content-Type: ' . $header);\n }\n\n curl_close($ch);\n\n // Trick out any URLs in the result\n $result = str_replace($gBitSystem->getConfig('geoserver_url', 'http://localhost:8080/geoserver/'), GEOSERVER_PKG_URI, $result);\n\n echo $result;\n}", "function do_get() {\n $lat = req('lat'); $lon = req('lon');\n validate_num($lat, 'lat', true, -90.0, 90.0);\n validate_num($lon, 'lon', true, -180.0, 180.0);\n $radius = req('radius', DEFAULT_RADIUS);\n validate_num($radius, 'radius', false);\n\n $query = get_query($lat, $lon, min($radius, MAX_RADIUS));\n if( out_fmt() == 'json' )\n get_json($query);\n else\n get($query);\n}", "function get_visitor_geodata()\n{\n\t// Get the geodata based on ip address\n\t$api_url = 'http://ip-api.com/php/';\n\t\n\t$geo = file_get_contents($api_url);\n\t$geo = unserialize($geo);\n\treturn $geo;\n}", "public function getGeo() {\n return $this->get(self::GEO);\n }", "function query_localities_from_publication ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\n\t$xml = '';\n\t$sparql = '\n\tPREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>\nPREFIX dcterms: <http://purl.org/dc/terms/>\n\nCONSTRUCT \n{\n ?specimen geo:lat ?lat . \n ?specimen geo:long ?long .\n ?specimen rdf:type <http://rs.tdwg.org/ontology/voc/TaxonOccurrence#TaxonOccurrence> .\n}\nWHERE \n{ \n ?gb dcterms:isReferencedBy <' . $uri . '> .\n \n ?gb dcterms:relation ?specimen .\n?specimen geo:lat ?lat .\n?specimen geo:long ?long\n}';\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "public function geo_location_get() {\n $google_maps_api_key = getenv('GOOGLE_MAPS_API_KEY');// 'AIzaSyCVuJds4Xvapt_X90V6RYp1nxEmlYWdeFY';\n\n $lat = $this->input->get('lat');\n $long = $this->input->get('long');\n\n if(empty($lat) || empty($long)) {\n $this->response([\n 'message' => lang('text_rest_maps_latlong_missing')\n ], 400);\n }\n\n $geo_params = [\n 'latlng' => \"{$lat},{$long}\",\n 'key' => $google_maps_api_key,\n ];\n $maps_api_url = \"https://maps.googleapis.com/maps/api/geocode/json?\";\n\n $maps_api_url .= urldecode(http_build_query($geo_params));\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $maps_api_url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 60); // Seconds\n $content = trim(curl_exec($ch));\n curl_close($ch);\n $geo_result = json_decode($content, true);\n\n if(empty($geo_result) || (!empty($geo_result) && $geo_result['status'] !== 'OK')) {\n $this->response([\n 'data' => $geo_result,\n 'message' => lang('text_rest_maps_failed')\n ], 400);\n }\n\n $this->response([\n 'data' => $geo_result,\n ], 200);\n }", "private function executeRequest()\n {\n $response = \\GoogleMaps\\GoogleMaps::load('geocoding')\n ->setParam([\n 'address' => $this->place->complete_address\n ])\n ->get();\n\n // sometimes, Google's not entirely sure and will send multiple, but first = best\n return collect(json_decode($response)->results)->first();\n }", "public function getFindsConstituency($constituency) {\n\tini_set(\"memory_limit\",\"256M\");\n\t$twfy = 'http://www.theyworkforyou.com/api/getGeometry?name=' . urlencode($constituency)\n\t. '&output=js&key=CzhqDaDMAgkMEcjdvuGZeRtR';\n\t$data = $this->get($twfy);\n\t$data = json_decode($data);\n\tif(array_key_exists('min_lat',$data)) {\n\t$latmin = $data->min_lat;\n\t$latmax = $data->max_lat;\n\t$longmin = $data->min_lon;\n\t$longmax = $data->max_lon;\n\t$finds = $this->getAdapter();\n\t$select = $finds->select()\n\t\t->from($this->_name,array('id', 'old_findID', 'objecttype',\n\t\t'broadperiod', 'dateFrom' => 'numdate1', 'dateTo' => 'numdate2',\n\t\t'created', 'description' => 'IFNULL(finds.description,\"No description recorded\")', 'findofnote',\n\t\t'secwfstage', 'updated'))\n\t\t->joinLeft('findspots','finds.secuid = findspots.findID', array('county', 'knownas', 'fourFigure',\n\t\t'lat' => 'declat', 'lon' => 'declong', 'easting', \n\t\t'northing'))\n\t\t->joinLeft('finds_images','finds.secuid = finds_images.find_id',array())\n\t\t->joinLeft('slides','slides.secuid = finds_images.image_id',array('i' => 'imageID','filename'))\n\t\t->where('declat > ?',$latmin)\n\t\t->where('declat < ?',$latmax)\n\t\t->where('declong > ?',$longmin)\n\t\t->where('declong < ?',$longmax)\n\t\t->order('finds.id DESC');\n\tif(in_array($this->getRole(),$this->_restricted)){\n\t$select->where('finds.secwfstage > 2');\n\t}\n\treturn $finds->fetchAll($select);\n\t} else {\n\treturn NULL;\n\t}\n\t}", "function springnet_get_geonetwork_ajax($geonet) {\n\t$response = drupal_http_request(\"https://resolve.spring-dvs.org/geosubs/$geonet\");\n\techo $response->data;\n}", "public function postGeofence()\n {\n $sl = request()->input('sl', NULL);\n $name = request()->input('name');\n $radius = request()->input('radius', NULL);\n $lat = request()->input('lat', NULL);\n $lng = request()->input('lng', NULL);\n $zoom = request()->input('zoom', NULL);\n $active = (boolean) request()->input('active', false);\n\n if($sl != NULL)\n {\n $qs = Core\\Secure::string2array($sl);\n $geofence = Models\\Geofence::where('id', $qs['geofence_id'])->where('user_id', '=', Core\\Secure::userId())->first();\n }\n else\n {\n // Verify limit\n $geofence_count = Models\\Geofence::where('user_id', '=', Core\\Secure::userId())->count();\n $geofence_count_limit = \\Auth::user()->plan->limitations['geofences']['max'];\n\n if ($geofence_count >= $geofence_count_limit) {\n return response()->json([\n 'type' => 'error', \n 'msg' => trans('global.account_limit_reached'),\n 'reset' => false\n ]);\n } elseif ($geofence_count >= 100) {\n return response()->json([\n 'type' => 'error', \n 'msg' => trans('geofences::global.geofence_limit_reached'),\n 'reset' => false\n ]);\n }\n $geofence = new Models\\Geofence;\n }\n\n $geofence->user_id = Core\\Secure::userId();\n $geofence->funnel_id = Core\\Secure::funnelId();\n $geofence->name = $name;\n $geofence->radius = $radius;\n $geofence->lat = $lat;\n $geofence->lng = $lng;\n $geofence->zoom = $zoom;\n $geofence->active = $active;\n $geofence->setLocationAttribute($lng . ',' . $lat);\n\n if($geofence->save())\n {\n $response = array(\n 'redir' => '#/geofences'\n );\n }\n else\n {\n $response = array(\n 'type' => 'error', \n 'msg' => $geofence->errors()->first(),\n 'reset' => false\n );\n }\n\n return response()->json($response);\n }", "function getForceAndNhood($lat, $lng) {\n\t// My unique username and password, woo! The API requires this on every query.\n\t$userpass = POLICE_API_KEY;\n\t$url = \"http://policeapi2.rkh.co.uk/api/locate-neighbourhood?q=$lat,$lng\";\n\n\t$curl = curl_init();\n\n\t// Gotta put dat password in.\n\tcurl_setopt($curl, CURLOPT_USERPWD, $userpass);\n\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\n\t// Without this, we just get \"1\" or similar.\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n\n\t$data = curl_exec($curl);\n\n\tcurl_close($curl);\n\n\t// The API returns JSON, and json_decode produces an interesting mix of objects and arrays.\n\t$dataObj = json_decode($data);\n\t\n\treturn $dataObj;\n\t}", "public function geo() {\n $req = $this->curl_req(\"{$this->shodan_stream}/geo?key={$this->apikey}\");\n return json_decode($req, RETURN_TYPE);\n }", "function findGeoObject($name, $featureClassificationSet = \"A,P,V,L,U,R,T,H,S\", $placeClassificationSet = \"0,1,2,3,4,5,6\") {\r\t\t$query = \"SELECT *\";\r\t\t$query .= \" FROM $this->table\";\r\t\t$query .= \" WHERE FC IN ('\".str_replace(\",\", \"','\", $featureClassificationSet).\"') AND PC IN ($placeClassificationSet)\";\r\t\t$query .= \" AND FULL_NAME LIKE '$name'\";\r\t\t$query .= \" ORDER BY SORT_NAME\";\r\t\t$queryResult = $this->queryGeoDB($query);\r\t\treturn $this->transformQueryResult($queryResult);\r\t}", "function geodaten_update_from_result_set($address) {\n $custom_fields = geodaten_get_custom_fields_from_table('geodaten');\n\n if ($address->N == 0) {\n return;\n }\n\n // Walk through all addresses and create geodata entity\n while($address->fetch()) {\n if (!empty($address->lat) && !empty($address->lon)) {\n // Values for api call to create set of geodata\n // information.\n $values = array('entity_id' => $address->id);\n\n // Get geodata and add geodata to values.\n $geodata = geodaten_get_geodata($address->lat, $address->lon);\n \n if (!empty($geodata)) {\n foreach ($geodata as $column => $value) {\n $values[$custom_fields[$column]] = $value;\n }\n \n // Save geodata.\n $status = civicrm_api3('CustomValue', 'create', $values);\n } else {\n echo \"Could not get geodata for \"\n . \"$address->id($address->lat,$address->lon)\\n\";\n }\n\n sleep(2);\n }\n }\n}", "public function actionGeoSearch()\n {\n $request = Yii::app()->request;\n \n $searchType = $request->getParam('searchType', 'byName');\n \n switch ($searchType) {\n case 'byName':\n $where = $request->getParam('q', 'Новосибирск');\n $searchParams = array('q' => $where);\n break;\n case 'byPoint':\n $lat = $request->getParam('lat', '54.991984');\n $lon = $request->getParam('lon', '82.901886');\n $searchParams = array('q' => $lon . ',' . $lat);\n break;\n }\n $searchParams['format'] = 'full';\n //$searchParams['limit'] = 10;\n\n $jst = microtime(true);\n \n try {\n $json = Yii::app()->apiClient->geoSearch($searchParams);\n } catch (Exception $e) {\n $json = '{}';\n }\n\n $jet = microtime(true);\n Yii::trace(print_r($json, true), 'demo.geoSearch.result');\n $xst = microtime(true);\n \n try {\n $xml = Yii::app()->apiClient->geoSearch($searchParams, 'xml');\n } catch (Exception $e) {\n $xml = '';\n }\n \n $xet = microtime(true);\n\n $geoms = json_decode($json);\n switch ($searchType) {\n case 'byName':\n $center = null;\n if (isset($geoms->result) && isset($geoms->result[count($geoms->result) - 1]->centroid)) {\n $center = $geoms->result[count($geoms->result) - 1]->centroid;\n }\n break;\n case 'byPoint':\n $center = 'POINT(' . $lon . ' ' . $lat . ')';\n break;\n }\n\n $this->render('geom_list', array(\n 'geoms' => $geoms,\n 'where' => isset($where) ? $where : null,\n 'lat' => isset($lat) ? $lat : null,\n 'lon' => isset($lon) ? $lon : null,\n 'workingNow' => false,\n 'searchType' => $searchType,\n 'center' => $center,\n 'rawJson' => Helper::jsonPrettify($json),\n 'rawXml' => $xml,\n 'rawRe' => Yii::app()->apiClient->lastRequest,\n 'jsonRespTime' => $jet - $jst,\n 'xmlRespTime' => $xet - $xst,\n ));\n }", "abstract public function getMoreGeocaches(array $params);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the userDomainNameSource UserDomainname attribute that is picked from AAD and injected into this profile before installing on the device. Possible values are: fullDomainName, netBiosDomainName.
public function getUserDomainNameSource() { if (array_key_exists("userDomainNameSource", $this->_propDict)) { if (is_a($this->_propDict["userDomainNameSource"], "\Beta\Microsoft\Graph\Model\DomainNameSource") || is_null($this->_propDict["userDomainNameSource"])) { return $this->_propDict["userDomainNameSource"]; } else { $this->_propDict["userDomainNameSource"] = new DomainNameSource($this->_propDict["userDomainNameSource"]); return $this->_propDict["userDomainNameSource"]; } } return null; }
[ "public function get_user_domain();", "public function getUsernameAADSource()\n {\n if (array_key_exists(\"usernameAADSource\", $this->_propDict)) {\n if (is_a($this->_propDict[\"usernameAADSource\"], \"\\Beta\\Microsoft\\Graph\\Model\\UsernameSource\") || is_null($this->_propDict[\"usernameAADSource\"])) {\n return $this->_propDict[\"usernameAADSource\"];\n } else {\n $this->_propDict[\"usernameAADSource\"] = new UsernameSource($this->_propDict[\"usernameAADSource\"]);\n return $this->_propDict[\"usernameAADSource\"];\n }\n }\n return null;\n }", "public function getFullyQualifiedDomainName();", "public function getDomainUid(): string\n {\n return $this->domain_uid;\n }", "public function getDomain()\n {\n return $this->_user->getDomain();\n }", "public function setUserDomainNameSource($val)\n {\n $this->_propDict[\"userDomainNameSource\"] = $val;\n return $this;\n }", "public function getDomainName()\n {\n $domain = $this->argument('domain') ?: app('domains')->getUsedNow();\n\n $domain = app('domains')->findOrFail($domain);\n\n return $domain->getStudlyName();\n }", "public function getDomainName()\n {\n if (array_key_exists(\"domainName\", $this->_propDict)) {\n return $this->_propDict[\"domainName\"];\n } else {\n return null;\n }\n }", "function getFullyQualifiedDomainName() {\n\t\treturn $this->fqdn;\n\t}", "public function getAdDomainName()\n {\n if (array_key_exists(\"adDomainName\", $this->_propDict)) {\n return $this->_propDict[\"adDomainName\"];\n } else {\n return null;\n }\n }", "protected function getUsernameAttribute()\n {\n return config('adldap_auth.username_attribute', ['username' => $this->getSchema()->accountName()]);\n }", "static public function getDomain()\n {\n $user = self::getUser(true);\n $pos = strpos($user, '@');\n\n return ($pos === false)\n ? false\n : substr($user, $pos + 1);\n }", "static public function getDomain()\n {\n $user = self::getUser(true);\n $pos = strpos($user, '@');\n\n return ($pos !== false)\n ? substr($user, $pos + 1)\n : false;\n }", "private function getLdapDomain(){\n\n $matches = array();\n preg_match_all('/dc=([^,]+)/i', $this->baseDn, $matches);\n\n return implode('.', $matches[1]);\n }", "public function getUsernameSource()\n {\n if (array_key_exists(\"usernameSource\", $this->_propDict)) {\n if (is_a($this->_propDict[\"usernameSource\"], \"\\Beta\\Microsoft\\Graph\\Model\\AndroidUsernameSource\") || is_null($this->_propDict[\"usernameSource\"])) {\n return $this->_propDict[\"usernameSource\"];\n } else {\n $this->_propDict[\"usernameSource\"] = new AndroidUsernameSource($this->_propDict[\"usernameSource\"]);\n return $this->_propDict[\"usernameSource\"];\n }\n }\n return null;\n }", "function getFirstname()\n\t{\n\t\t$this->uid = $this->getUser();\n\t\t$ret = self::getAttribute($this->uid, 'givenname');\n\t\treturn $ret[0];\n\t}", "public function get_domain()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $hostname = $this->get();\n\n if (substr_count($hostname, '.') < 2)\n return $hostname;\n\n $domain = preg_replace('/^([\\w\\-]*)\\./', '', $hostname);\n\n return $domain;\n }", "public static function getActiveDomain(): string {\n\t\treturn self::$activeDomain;\n\t}", "function getDomainName() {\n\t\treturn $this->_DomainName;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the tweet record associated with the EntityTweet.
public function tweet() { return $this->belongsTo('BenBjurstrom\CuratorModel\Tweet'); }
[ "protected function getTweet()\n {\n $tweet = $this\n ->getMockBuilder('\\Stocarul\\TwitterBundle\\Model\\Tweet')\n ->disableOriginalConstructor()\n ->getMock()\n ;\n\n return $tweet;\n }", "public function read_tweets()\n\t{\n\t\t\treturn $this->mongo_db->get('tweets');\n\t}", "private function getTwitterObj()\n {\n return $this->twitter_obj;\n }", "public function entity_tweets()\n {\n return $this->hasMany('BenBjurstrom\\CuratorModel\\EntityTweet', 'keyword_id');\n }", "private function getTwitterObj()\n\t{\n\t\treturn $this->twitter_obj;\n\t}", "public function findTweetById(int $id);", "public function getTweet() : TweetInteractionMetrics\n {\n return $this->tweet;\n }", "public function gettweetsAction () {\n $id = $this->_getParam('event_id');\n \n $tweet = new Core_Model_TweetEntry ();\n \n if (isset ($id)) {\n $value = $tweet->loadByEventId ($id);\n \n if (isset ($value)) {\n return $this->apiControllerHelper->formatOutput($value);\n }\n }\n }", "public function get_tweets()\n {\n return $this->get_twitter_json();\n }", "public function tweets()\n {\n return $this->hasMany(Tweet::class)\n ->latest();\n }", "public function getTwitter()\n {\n return $this->twitter;\n }", "public function getTwitter()\n {\n\n return $this->twitter;\n }", "public function getTwitter()\n\t{\n\t\tif( !is_null($this->sTwitter) )\n\t\t{\n\t\t\tif( $this->sTwitter==='' )\n\t\t\t{\n\t\t\t\t return NULL;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t return $this->sTwitter;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->hydrateFromBDD(array('twitter'));\n\t\t\t$this->callHydrateFromBDDOnGet++;\n\t\t\tif($this->callHydrateFromBDDOnGet>10)\n\t\t\t{\n\t\t\t\techo \"<br />WARNING : trop d'appel en base depuis l'accesseur \". __CLASS__ .\"::\". __FUNCTION__ .\"\";\n\t\t\t}\n\t\t\treturn $this->sTwitter;\n\t\t}\n\t}", "public function getTwitter(){\n\t\t\treturn $this->twitter;\n\t\t}", "public function fetchTweet($id);", "public function getTwitterData()\n {\n return $this->twitterData;\n }", "public function tweet(){\n return $this->belongsTo('App\\User', 'tweetId');\n }", "public function getTwitterData()\n {\n return $this->twitter_data;\n }", "function getLatestTweet(){\n\t\t$this->connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $this->source_user['oauth_token'], $this->source_user['oauth_token_secret']);\n\t\t//print_r($this->connection);\n\t\t$this->result = $this->connection->get('statuses/user_timeline.json?user_id=' . $this->source_user['user_id']);\n\t\t\n\t\t//print_r($this->result);\n\t\t$this->latest_tweet = $this->result[0];\n\t\t//print_r($this->latest_tweet);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the priceType A setting to provide flexibility for the pricing structure of services. Possible values are: undefined, fixedPrice, startingAt, hourly, free, priceVaries, callUs, notSet, unknownFutureValue.
public function setPriceType($val) { $this->_propDict["priceType"] = $val; return $this; }
[ "public function setPricingType(?string $pricingType): void\n {\n $this->pricingType = $pricingType;\n }", "public function setPriceType($priceType)\n {\n $this->priceType = $priceType;\n return $this;\n }", "public function set_price_type($price_type) \n\t{\n\t\t$this->price_type = $price_type;\n\t\treturn $this;\n\t}", "public function setPriceType($type)\n {\n if (!in_array($type, [self::PRICE_NET, self::PRICE_GROSS])) {\n throw new InvalidPriceTypeException;\n }\n $this->type = $type;\n return $this;\n }", "public function setProductType($type)\n {\n $this->originalProductType = $type;\n \n $country = $this->getCustomerCountry();\n \n // If product is not downloadable, new law is not applicable\n if (!in_array($type, $this->downloadable))\n {\n $this->isNewLawApplicable = false;\n }\n \n if (!isset($this->rates[$country][$type]))\n {\n $type = self::STANDARD;\n }\n \n $this->productType = $type;\n }", "public function getPriceType()\n {\n return $this->priceType;\n }", "public function setProductType($productType);", "public function set_price($price = NULL)\n {\n if (is_null($price) || empty($price))\n {\n return $this->set_point_of_initiation_static();\n } else\n {\n $this->point_of_initiation = parent::POINT_OF_INITIATION_DYNAMIC;\n if (is_numeric($price))\n {\n $this->transaction_amount = number_format($price, 2, '.', '');\n } else\n {\n return $this->return_status(FALSE, self::STATUS_INVALID_VALUE, parent::ID_TRANSACTION_AMOUNT);\n }\n }\n return $this->return_status(TRUE);\n }", "private function upgradePriceType(EavSetup $eavSetup)\n {\n $eavSetup->updateAttribute(\n ProductAttributeInterface::ENTITY_TYPE_CODE,\n 'price_type',\n 'frontend_input',\n 'boolean',\n 31\n );\n $eavSetup->updateAttribute(\n ProductAttributeInterface::ENTITY_TYPE_CODE,\n 'price_type',\n 'frontend_label',\n 'Dynamic Price'\n );\n $eavSetup->updateAttribute(ProductAttributeInterface::ENTITY_TYPE_CODE, 'price_type', 'default_value', 0);\n }", "public function setPrice($value);", "public function setPrice($value) {\n\t\t$this->_price = $value;\n\t}", "public function setPrice($price)\n {\n $this->setPrices($price);\n }", "public function setRentPriceType($rentPriceType) {\n\t\t$this->rentPriceType = $rentPriceType;\n\t}", "public function getPriceType()\n {\n if (array_key_exists(\"priceType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"priceType\"], \"\\Microsoft\\Graph\\Model\\BookingPriceType\") || is_null($this->_propDict[\"priceType\"])) {\n return $this->_propDict[\"priceType\"];\n } else {\n $this->_propDict[\"priceType\"] = new BookingPriceType($this->_propDict[\"priceType\"]);\n return $this->_propDict[\"priceType\"];\n }\n }\n return null;\n }", "public function setPrice($price)\n {\n $this->price = round($price, 2);\n }", "public function setPrice($price)\n {\n $this->_price = (float) $price;\n }", "public function setServiceType($serviceType) {\n $this->serviceType = $serviceType;\n }", "public function getPriceType()\n {\n return (int) $this->getConfig('extrafee/general/pricetype');\n }", "public function getPriceType();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a an bool option in the arguments, like $option.
private function setArgumentBool($option, $bool) { if ($bool) { $this->add(sprintf('%s%s', $this->executable->getOptionPrefix(), $option)); } return $this; }
[ "protected function setBool(){\n $this->bool = array(\n\t 'true'=>1,\n\t 'false'=>0,\n\t 'yes'=>1,\n\t 'no'=>0,\n\t\t'on'=>1,\n\t\t'off'=>0,\n\t);\n }", "function enabled(string $option, string $shorthand = \"\"): bool\n{\n return in_array(getopt($shorthand, [$option]), [[$option => false], [$shorthand => false]], true);\n}", "function get_boolean_option( $option ) {\n\t\treturn 'yes' === $this->get_option( $option ) ? true : false;\n\t}", "public function enableOption();", "protected function _setBoolean($name, $value) {}", "function setOption ($option, $setting)\n {\n if (empty($this->arrConstant[$option])) {\n $this->raiseError(\"No such option: $option\");\n return false;\n }\n \n \n switch ($option) {\n case CMD_OUTPUT:\n case CMD_SHUTDOWN:\n case CMD_VERBOSE:\n case CMD_SEQUENCE:\n $this->arrSetting[$option] = $setting;\n return true;\n break;\n \n case CMD_SHELL:\n if (is_executable($setting)) {\n $this->arrSetting[$option] = $setting;\n return true;\n } else {\n $this->raiseError(\"No such shell: $setting\");\n return false;\n }\n break;\n \n \n case CMD_NOHUP:\n if (empty($setting)) {\n $this->arrSetting[$option] = false;\n \n } else if ($location = $this->which(\"nohup\")) {\n $this->arrSetting[$option] = true;\n \n } else {\n $this->raiseError(\"Nohup was not found on your system\");\n return false;\n }\n break;\n \n }\n }", "public function setOptOut($optedout = true)\n\t{\n\t\t$this->optOut = (bool)$optedout;\n\t}", "public function isSet(string $option): bool\n {\n return isset($this->arguments[$option]);\n }", "function ini_get_bool($ini_get_arg) {\n\t$temp = strtolower(ini_get($ini_get_arg));\n\n\tif ($temp == '1' || $temp == 'on' || $temp == 'true') {\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function setOpt(int $option, string $value):bool {\n\t\treturn curl_share_setopt($this->sh, $option, $value);\n\t}", "static function bool(string $name): LeafOption\n {\n return new LeafOption($name, 'bool');\n }", "public function setValueTypeToBool(): void\n {\n $this->valueType = OptionData::VAL_TYPE_BOOL;\n }", "public function set_boolean_values($true = true, $false = false){\r\n $this->true_val = $true;\r\n $this->false_val = $false;\r\n }", "public function hasOption();", "function setOpt()\n\t{\n\t\t$shortopts = \"s::\"; // optional state - boolean or test (true) - defaults to false\n\t\t$shortopts .= \"p::\"; // optional products path - defaults to data/products.txt\n\t\t$shortopts .= \"l::\"; // optional listings path - defaults to data/listings.txt\n\t\t$shortopts .= \"o::\"; // optional output path - defaults to data/listings.txt\n\n\t\t$longopts = array(\n\t\t\t\"state::\", // optional state - boolean or test (true) - defaults to false\n\t\t\t\"products::\", // optional products path - defaults to data/products.txt\n\t\t\t\"listings::\", // optional listings path - defaults to data/listings.txt\n\t\t\t\"output::\", // optional listings path - defaults to data/listings.txt\n\t\t);\n\n\t\treturn $options = getopt($shortopts, $longopts);\n\t}", "public static function isOption($arg)\n {\n if (strpos($arg, '-') === 0) {\n return true;\n }\n\n return false;\n }", "public function daemon($bool = true)\n {\n if ($bool) {\n $this->addParameter(self::OPTION_DAEMON);\n } else {\n $this->removeParameter(self::OPTION_DAEMON);\n }\n }", "public function setOption($name, $value);", "public function setPassedByReference($bool);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests running multiple coding standards.
public function testMultipleCodingStandards() { $files = array( sprintf('%s/src/file1.php', $this->projectDir), ); $tool = new CodeQualityTool($files, array( 'excludeTests' => true, 'projectDir' => $this->projectDir, 'codingStandard' => array('PSR2', 'PSR1'), )); $tool->run(); }
[ "public function testCodingStandardOption()\n {\n $command = $this->getPhpCsExecutable() . ' --extensions=php,inc --standard=myStandard --report=checkstyle ' . getcwd();\n $this->assertEquals(\n $command,\n $this->taskPhpCs(null, 'myStandard')->getCommand()\n );\n }", "public function testMultipleCustomChecks()\n {\n $files = array(\n sprintf('%s/src/assets/style.css', $this->projectDir),\n sprintf('%s/src/assets/script.js', $this->projectDir),\n sprintf('%s/src/assets/script-with-warnings.js', $this->projectDir),\n );\n\n $tool = new CodeQualityTool($files, array(\n 'excludeTests' => true,\n 'projectDir' => $this->projectDir,\n 'codingStandard' => null,\n 'messRules' => null,\n 'customChecks' => array(\n array('cmd' => 'scss-lint', 'ext' => 'css'),\n array('cmd' => 'jscs --preset=jquery', 'ext' => 'js'),\n ),\n ));\n $tool->run();\n }", "public function runPHPCS()\n {\n $this->registerOutOfMemoryShutdownMessage('phpcs');\n\n try {\n Util\\Timing::startTiming();\n Runner::checkRequirements();\n\n if (defined('PHP_CODESNIFFER_CBF') === false) {\n define('PHP_CODESNIFFER_CBF', false);\n }\n\n // Creating the Config object populates it with all required settings\n // based on the CLI arguments provided to the script and any config\n // values the user has set.\n $this->config = new Config();\n\n // Init the run and load the rulesets to set additional config vars.\n $this->init();\n\n // Print a list of sniffs in each of the supplied standards.\n // We fudge the config here so that each standard is explained in isolation.\n if ($this->config->explain === true) {\n $standards = $this->config->standards;\n foreach ($standards as $standard) {\n $this->config->standards = [$standard];\n $ruleset = new Ruleset($this->config);\n $ruleset->explain();\n }\n\n return 0;\n }\n\n // Generate documentation for each of the supplied standards.\n if ($this->config->generator !== null) {\n $standards = $this->config->standards;\n foreach ($standards as $standard) {\n $this->config->standards = [$standard];\n $ruleset = new Ruleset($this->config);\n $class = 'PHP_CodeSniffer\\Generators\\\\'.$this->config->generator;\n $generator = new $class($ruleset);\n $generator->generate();\n }\n\n return 0;\n }\n\n // Other report formats don't really make sense in interactive mode\n // so we hard-code the full report here and when outputting.\n // We also ensure parallel processing is off because we need to do one file at a time.\n if ($this->config->interactive === true) {\n $this->config->reports = ['full' => null];\n $this->config->parallel = 1;\n $this->config->showProgress = false;\n }\n\n // Disable caching if we are processing STDIN as we can't be 100%\n // sure where the file came from or if it will change in the future.\n if ($this->config->stdin === true) {\n $this->config->cache = false;\n }\n\n $numErrors = $this->run();\n\n // Print all the reports for this run.\n $toScreen = $this->reporter->printReports();\n\n // Only print timer output if no reports were\n // printed to the screen so we don't put additional output\n // in something like an XML report. If we are printing to screen,\n // the report types would have already worked out who should\n // print the timer info.\n if ($this->config->interactive === false\n && ($toScreen === false\n || (($this->reporter->totalErrors + $this->reporter->totalWarnings) === 0 && $this->config->showProgress === true))\n ) {\n Util\\Timing::printRunTime();\n }\n } catch (DeepExitException $e) {\n echo $e->getMessage();\n return $e->getCode();\n }//end try\n\n if ($numErrors === 0) {\n // No errors found.\n return 0;\n } else if ($this->reporter->totalFixable === 0) {\n // Errors found, but none of them can be fixed by PHPCBF.\n return 1;\n } else {\n // Errors found, and some can be fixed by PHPCBF.\n return 2;\n }\n\n }", "public function runphpcs()\n {\n if (defined('PHP_CODESNIFFER_CBF') === false) {\n define('PHP_CODESNIFFER_CBF', false);\n }\n\n if (is_file(dirname(__FILE__).'/../CodeSniffer/Reporting.php') === true) {\n include_once dirname(__FILE__).'/../CodeSniffer/Reporting.php';\n } else {\n include_once 'PHP/CodeSniffer/Reporting.php';\n }\n\n PHP_CodeSniffer_Reporting::startTiming();\n $this->checkRequirements();\n $numErrors = $this->process();\n if ($numErrors === 0) {\n exit(0);\n } else {\n exit(1);\n }\n\n }", "private function runPhpcs()\n\t{\n\t\t$this->_exec('phpcs --standard=Joomla ' . __DIR__ . '/src');\n\t}", "public function testCustomChecks()\n {\n $files = array(\n sprintf('%s/src/assets/style.css', $this->projectDir),\n sprintf('%s/src/assets/style-with-warnings.css', $this->projectDir),\n sprintf('%s/src/assets/script.js', $this->projectDir),\n );\n\n $tool = new CodeQualityTool($files, array(\n 'excludeTests' => true,\n 'projectDir' => $this->projectDir,\n 'codingStandard' => null,\n 'messRules' => null,\n 'customChecks' => array(\n array('cmd' => 'scss-lint', 'ext' => 'css'),\n ),\n ));\n $tool->run();\n }", "public function phpcs() {\n $this->_exec(\"$this->phpcs_bin --config-set installed_paths vendor/drupal/coder/coder_sniffer\");\n return $this->_exec(\"$this->phpcs_bin --standard=Drupal $this->src_dir\");\n }", "public function testSupportResistance()\n {\n }", "function printPHPCodeSnifferTestOutput()\n{\n $codes = count($GLOBALS['PHP_CODESNIFFER_SNIFF_CODES']);\n\n echo PHP_EOL.PHP_EOL;\n echo \"Tests generated $codes unique error codes\";\n if ($codes > 0) {\n $fixes = count($GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES']);\n $percent = round(($fixes / $codes * 100), 2);\n echo \"; $fixes were fixable ($percent%)\";\n }\n\n}", "function runkit_lint($code)\n{\n}", "function runtests() {\n\t\t// This is blank, just here when I need it.\n\t}", "public function testBugGH131()\n {\n $dataSource = self::$fixtures . self::GH131;\n $analysers = array('compatibility');\n $metrics = self::$api->run($dataSource, $analysers);\n $versions = $metrics[self::$analyserId]['versions'];\n\n $this->assertEquals(\n array(\n 'php.min' => '5.1.0',\n 'php.max' => '',\n 'php.all' => '5.1.0',\n ),\n $versions\n );\n }", "public static function suite()\n {\n $suite = new PHPUnit_Framework_TestSuite('PHP CodeSniffer Standards');\n\n $isInstalled = !is_file(dirname(__FILE__).'/../../CodeSniffer.php');\n\n if ($isInstalled === false) {\n // We have not been installed.\n $standardsDir = realpath(dirname(__FILE__).'/../../CodeSniffer/Standards');\n } else {\n $standardsDir = '';\n }\n\n $standards = PHP_CodeSniffer::getInstalledStandards(true, $standardsDir);\n\n foreach ($standards as $standard) {\n if ($isInstalled === false) {\n $standardDir = $standardsDir.'/'.$standard.'/Tests/';\n } else {\n $standardDir = dirname(__FILE__).'/'.$standard.'/Tests/';\n }\n\n $standardDir = realpath($standardDir);\n if (is_dir($standardDir) === false) {\n // No tests for this standard.\n continue;\n }\n\n // Locate the actual directory that contains the standard's tests.\n // This is individual to each standard as they could be symlinked in.\n $baseDir = realpath($standardDir.'/../../');\n\n $di = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($standardDir));\n\n foreach ($di as $file) {\n // Skip hidden files.\n if (substr($file->getFilename(), 0, 1) === '.') {\n continue;\n }\n\n // Tests must have the extention 'php'.\n $parts = explode('.', $file);\n $ext = array_pop($parts);\n if ($ext !== 'php') {\n continue;\n }\n\n $filePath = realpath($file->getPathname());\n $className = str_replace($baseDir.DIRECTORY_SEPARATOR, '', $filePath);\n $className = substr($className, 0, -4);\n $className = str_replace(DIRECTORY_SEPARATOR, '_', $className);\n\n include_once $filePath;\n $class = new $className('getErrorList');\n $suite->addTest($class);\n }//end foreach\n }//end foreach\n\n return $suite;\n\n }", "public function testIsThereAnySyntaxError() {\n\t\t$this->assertEquals(Parser::TYPE_CLI, CLI::getParserType(), \"Command Line Interface Config parser type mismatch.\");\n\t}", "public function testCovid19()\n {\n }", "public static function preTesting() {}", "public function testLinter() {\n $linter = new ArcanistAndroidLinter(null);\n $working_copy = ArcanistWorkingCopyIdentity::newFromPath(__FILE__);\n $this->executeTestsInDirectory(\n dirname(__FILE__) . '/java/tests/',\n $linter,\n $working_copy);\n }", "public function testRunLook()\n {\n }", "public function testGetSytnaxFailure() {\n\t\t\t$this->expectException('InvalidArgumentException');\n\t\t\t$this->Helper->_getSyntax('ay dios mio!');\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Execute Expression by using this connection.
public function execute(Expression $expr) { // If custom connection is set, execute again using that if ($this->connection && $this->connection !== $this) { return $expr->execute($this->connection); } throw new Exception('Queries cannot be executed through this connection'); }
[ "public function execute() {\n\t\tself::_normalizeArgs(func_get_args(), $statement, $args);\n\t\treturn $this->executeWith($statement, $args);\n\t}", "public function execute() {\n\t\t\t$connection = \\Leap\\Core\\DB\\Connection\\Pool::instance()->get_connection($this->data_source);\n\t\t\tif ($this->before !== NULL) {\n\t\t\t\tcall_user_func_array($this->before, array($connection));\n\t\t\t}\n\t\t\t$connection->execute($this->command());\n\t\t\tif ($this->after !== NULL) {\n\t\t\t\tcall_user_func_array($this->after, array($connection));\n\t\t\t}\n\t\t}", "public function execute() {\n\t\t$statement = '';\n\t\t\n\t\tforeach ($this->statement as $value)\n\t\t{\n\t\t\t$statement .= '{' . implode ( ',', $value ) . '}';\n\t\t}\n\n\t\tLog4PCR::info ( 'Executed query: ' . $this->workspace . '=>' . $statement );\n\t\t\n\t\treturn new QueryResult($this->pm, $this->pm->query($this->statement));\n\t}", "function Execute()\n\t{\n\t\tif (func_num_args () >= 1)\n\t\t{\n\t\t\t$args = func_get_args ();\n\t\t\tcall_user_func_array ( array (\n\t\t\t\t$this, \"Bind\" \n\t\t\t), $args );\n\t\t}\n\t\t$this->DBAL->QueryCount += 1;\n\t\t\n\t\t$this->DBAL->QueryTimeIn ();\n\t\t$this->Statement->execute ();\n\t\t$this->DBAL->QueryTimeOut ();\n\t\n\t}", "public function subExecute($expression) {\n $result = null;\n\n if($expression instanceof self) {\n $result = $expression->execute();\n } else {\n $result = $expression;\n }\n\n return $result;\n }", "function execute()\n\t{\n\t\tif (func_num_args () >= 1)\n\t\t{\n\t\t\t$args = func_get_args ();\n\t\t\tcall_user_func_array ( array (\n\t\t\t\t$this, \"bindAll\" \n\t\t\t), $args );\n\t\t}\n\t\t$this->DBAL->increaseQueryCount();\n\t\t$args=array_merge(array($this->_query),func_get_args());\n\t\t$this->DBAL->QueryStart ($args);\n\t\t$r=$this->Statement->execute ();\n\t\t$this->DBAL->QueryEnd ();\n\t\treturn $r;\n\t\n\t}", "protected function execute()\n {\n // Log query and binds\n if (self::$logger) {\n self::$logger->debug('SQL Statement: ' . $this->sql);\n self::$logger->debug('SQL Binds: ' . print_r($this->bindValues, true));\n }\n\n // Prepare the query\n $this->statement = self::$dbh->prepare($this->sql);\n\n // Bind values\n foreach ($this->bindValues as $key => $value) {\n // Determine data type\n if (is_int($value)) {\n $paramType = PDO::PARAM_INT;\n } elseif ($value === '') {\n $value = null;\n $paramType = PDO::PARAM_NULL;\n } else {\n $paramType = PDO::PARAM_STR;\n }\n\n $this->statement->bindValue($key + 1, $value, $paramType);\n }\n\n // Execute the query\n if (false === $outcome = $this->statement->execute()) {\n // If false is returned there was a problem so log it\n if (self::$logger) {\n self::$logger->error('PDO Execute Returns False: ' . $this->sql);\n self::$logger->error('PDO SQL Binds: ' . print_r($this->bindValues, true));\n }\n\n return null;\n }\n\n // If a select statement was executed, set fetch mode\n if (stristr($this->sql, 'select')) {\n $this->statement->setFetchMode(PDO::FETCH_CLASS, __NAMESPACE__ . '\\\\' . $this->domainObjectClass);\n }\n\n return $outcome;\n }", "public function execute(){\r\n /*try{\r\n $exec = $this->stmt->execute();\r\n }catch(Exception $e){\r\n $exec = $e;\r\n }\r\n return $exec;*/\r\n return $this->stmt->execute();\r\n }", "public function execute(){\n\t\t$this->stmt->execute();\n\t}", "public function execute()\n {\n $transport = $this->objectmanager->getTransport();\n $rawData = $transport->query($this);\n $queryResult = $this->factory->get(\n 'Query\\QueryResult',\n array(\n $rawData,\n $this->objectmanager,\n )\n );\n return $queryResult;\n }", "function bindAndExecute() {\n\t\t$conn = $this->connection;\n\n\t\tif ($conn === null) {\n\t\t\tthrow new RuntimeException('bindAndExecute cannot be called on a QueryStatement without a connection.');\n\t\t}\n\t\tif ($conn instanceof DBMSSQL && $conn->getDriver() === 'dblib' && function_exists('mb_detect_encoding')) {\n\t\t\treturn $conn->query($this->__toString());\n\t\t}\n\t\tif ($conn instanceof DBSQLite) {\n\t\t\treturn $conn->query($this->__toString());\n\t\t}\n\n\t\t$string = self::embedIdentifiers($this->getString(), array_values($this->identifiers), $conn);\n\n\t\t$result = $conn->prepare($string);\n\t\tforeach ($this->getParams() as $key => $value) {\n\t\t\t$pdo_type = PDO::PARAM_STR;\n\t\t\tif (is_int($value)) {\n\t\t\t\t$pdo_type = PDO::PARAM_INT;\n\t\t\t} elseif (is_null($value)) {\n\t\t\t\t$pdo_type = PDO::PARAM_NULL;\n\t\t\t} elseif (is_bool($value)) {\n\t\t\t\t$value = $value ? 1 : 0;\n\t\t\t\t$pdo_type = PDO::PARAM_INT;\n\t\t\t}\n\t\t\t$result->bindValue($key + 1, $value, $pdo_type);\n\t\t}\n\t\t$result->execute();\n\t\treturn $result;\n\t}", "public function executeQuery(): Result\n {\n return $this->connection->executeQuery(\n $this->getSQL(),\n $this->params,\n $this->paramTypes,\n $this->resultCacheProfile,\n );\n }", "public function exec(){\n\t\t$fullStatement = $this->selectStatement . ' ' . $this->whereStatement . $this->otherStatements . ';';\n\t\t$result = $this->dbHandler->executeSelect($fullStatement, $this->whereArguments);\n\n\t\t//echo $fullStatement;\n\t\t//var_dump($this->whereArguments);\n\n\t\t$this->selectStatement = '';\n\t\t$this->whereStatement = '';\n\t\t$this->otherStatements = '';\n\t\t$this->whereArguments = null;\n\n\t\treturn $result;\n\t}", "public function execute() {\n $sql = $this->_buildSQL();\n \n $rs = $this->db->conn->Execute($sql);\n $this->_rows = array();\n if($rs !== false) {\n while(!$rs->EOF) {\n // FIXME: dependency injection\n $rowIt = new RowIterator($this);\n $rowIt->load($rs->fields);\n \n $this->_rows[] = $rowIt;\n \n $rs->MoveNext();\n }\n }\n \n return( $this->getIterator() );\n }", "public function execute() {\n $start = microtime(true);\n $result = $this->statement->execute();\n $time = microtime(true) - $start;\n LoggedPDO::$log[] = array('query' => '[PS] ' . $this->statement->queryString,\n 'time' => round($time * 1000, 3));\n return $result;\n }", "protected function _execute()\n {\n try {\n $this->_wrapPrepareSql();\n $this->_pdoSt = $this->_pdo->prepare($this->_prepare_sql);\n $this->_bindParams();\n $this->_pdoSt->execute();\n $this->_reset(); // memory-resident mode, singleton pattern, need reset build attr\n // if debug mode, print sql and bind params to stdout\n if ($this->_debug) {\n $this->_pdoSt->debugDumpParams();\n $this->_debug = FALSE; // close debug\n }\n } catch (PDOException $e) {\n // when time out, reconnect\n if ($this->_isTimeout($e)) {\n $this->_closeConnection();\n $this->_connect();\n // retry\n try {\n $this->_wrapPrepareSql();\n $this->_pdoSt = $this->_pdo->prepare($this->_prepare_sql);\n $this->_bindParams();\n $this->_pdoSt->execute();\n $this->_reset();\n // if debug mode, print sql and bind params to stdout\n if ($this->_debug) {\n $this->_pdoSt->debugDumpParams();\n $this->_debug = FALSE; // close debug\n }\n } catch (PDOException $e) {\n throw $e;\n }\n\n } else {\n throw $e;\n }\n }\n\n }", "public function exec()\n\t{\n\t\tif ($this->query_sql === null) {\n\t\t\t$this->compile();\n\t\t}\n\t\tif ($this->log_query) {\n\t\t\terror_log(sprintf(\"SQL Query (exec):\\n%s\", $this->query_sql));\n\t\t}\n\t\tif (empty($this->query_params)) {\n\t\t\t$t = microtime(true);\n\t\t\ttry {\n\t\t\t\t$r = $this->pdo->exec($this->query_sql);\n\t\t\t\tif ($this->log_query) {\n\t\t\t\t\terror_log(sprintf(\"SQL Query time: %F ms (exec).\", (microtime(true) - $t) * 1000));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (\\PDOException $ex) {\n\t\t\t\tthrow new FlupdoException($ex->getMessage(), $ex->getCode(), $ex, $this->query_sql, $this->query_params);\n\t\t\t}\n\t\t\tif ($r === FALSE) {\n\t\t\t\tthrow new FlupdoException(vsprintf(\"SQLSTATE[%s]: Error %s: %s\", $this->pdo->errorInfo()),\n\t\t\t\t\t$this->pdo->errorCode(), null, $this->query_sql, $this->query_params);\n\t\t\t}\n\t\t\treturn $r;\n\t\t} else {\n\t\t\t$stmt = $this->query();\n\t\t\treturn $stmt->rowCount();\n\t\t}\n\t}", "public function execute() {\n\t\t\t// Select is the default - maybe it shouldn't be ?\n\t\t\t$this->queryString = \"SELECT * FROM \".$this->table.\" \";\n\t\t\t$this->appendWhereClause();\n\n\t\t\tif ($this->orderBy) {\n\t\t\t\t$this->queryString .= $this->orderBy->getClauseString();\n\t\t\t}\n\n\t\t\tif ($this->limit || $this->offset) {\n\t\t\t\t$this->addOffsetAndLimit();\n\t\t\t}\n\n\t\t\t$rawResults = $this->executeRawQuery(true);\n\t\t\treturn $this->hydrate($rawResults);\n\t\t}", "public abstract function execute(\\Leap\\Core\\DB\\SQL\\Command $command);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the transport object
public function getTransport() { // use cache when we can if ($this->transport) { return $this->transport; } // create a new transport object $this->transport = $this->createTransport(); return $this->transport; }
[ "protected function getTransport()\n {\n return $this->transport;\n }", "public function transport()\n {\n if (!$this->transport) {\n $this->transport = $this->loadTransport();\n }\n\n return $this->transport;\n }", "public function getTransport ()\n {\n return $this->transport;\n }", "public function getTransport()\n {\n return $this->transport;\n }", "public function getTransport()\n {\n return $this->getKey('Transport');\n }", "function & _getTransport()\n\t{\n\t\tif (empty($this->_transport))\n\t\t{\n\t\t\trequire_once JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_jdefender'.DS.'lib'.DS.'alerts'.DS.'jabber'.DS.'jd_jabber_transport.php';\n\t\t\t\n\t\t\t$params = & $this->_getParams();\n\t\t\t\n\t\t\t$username \t= $params->get('alerts_jabber_username');\n\t\t\t$password \t= $params->get('alerts_jabber_password');\n\t\t\t$server \t= $params->get('alerts_jabber_server');\n\t\t\t\n\t\t\t\n\t\t\t$this->_transport = new JD_Jabber_Transport($username, $password, $server);\n\t\t} \n\t\t\n\t\treturn $this->_transport;\n\t}", "private function _getTransport() {\n switch($this->transportType) {\n case 'smtp':\n return \\Swift_SmtpTransport::newInstance($this->smtpHost, $this->smtpPort)\n ->setUsername($this->smtpLogin)\n ->setPassword($this->smtpPassword)\n ->setEncryption($this->smtpEncryption);\n\n case 'mail':\n return \\Swift_MailTransport::newInstance();\n\n }\n }", "public function getTransporter() {\n\t\treturn $this->_transporter;\n\t}", "public function getTransporte()\n {\n return $this->transporte;\n }", "public function getRealTransport(): TransportInterface\n {\n $mailSettings = !empty($this->mailSettings) ? $this->mailSettings : (array)$GLOBALS['TYPO3_CONF_VARS']['MAIL'];\n unset($mailSettings['transport_spool_type']);\n return $this->getTransportFactory()->get($mailSettings);\n }", "protected static function get_transport() {\n\t\t// caching code, don't bother testing coverage\n\t\t// @codeCoverageIgnoreStart\n\t\tif ( self::$transport !== null ) {\n\t\t\treturn new self::$transport();\n\t\t}\n\t\t// @codeCoverageIgnoreEnd WPCS: comment ok\n\n\t\tif ( empty( self::$transports ) ) {\n\t\t\tself::$transports = array(\n\t\t\t\t'HttpClient_Transport_Native',\n\t\t\t);\n\t\t}\n\n\t\t// find us a working transport\n\t\tforeach ( self::$transports as $class ) {\n\t\t\tif ( !class_exists( $class ) )\n\t\t\t\tcontinue;\n\n\t\t\t$result = call_user_func( array( $class, 'test' ) );\n\t\t\tif ( $result ) {\n\t\t\t\tself::$transport = $class;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif ( self::$transport === null ) {\n\t\t\tthrow new Exception( 'No working transports found', 'notransport' );\n\t\t}\n\n\t\treturn new self::$transport();\n\t}", "public function getTransportType()\r\n {\r\n return $this->transportType;\r\n }", "function _createTransport()\n {\n $transport = new EchoWrapper();\n return $transport;\n }", "public function getTransportEvent()\n {\n return $this->transportEvent;\n }", "public function getTransport(): ?string;", "public function getTransportContract()\n {\n return $this->transportContract;\n }", "public function getTransportType();", "public function getTransport()\n {\n return \\Swift_MailTransport::newInstance();\n }", "public function getTransport(): Swift_SmtpTransport;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register the build command.
protected function registerBuildCommand() { $this->app['command.basset.build'] = $this->app->share(function($app) { $buildPath = $app['path.public'].'/'.$app['config']->get('basset::build_path'); $builder = new FilesystemBuilder($app['files']); $cleaner = new BuildCleaner($app['basset.manifest'], $app['files'], $buildPath); return new BuildCommand($app['basset'], $builder, $app['basset.manifest'], $cleaner, $buildPath, $app['config']->get('basset::gzip', false)); }); }
[ "public function registerBuildCommand()\r\n\t{\r\n\t\t$this->app['grunt.build'] = $this->app->share(function($app)\r\n\t\t{\r\n\t\t\treturn new GruntBuildCommand();\r\n\t\t});\r\n\t}", "public function registerCompileCommand ()\n {\n $this->app['l4gettext.compile'] = $this->app->share(function($app) {\n return new Commands\\CompileCommand();\n });\n $this->commands('l4gettext.compile');\n\n }", "public function registerCommand()\n {\n // app()->singleton('scaffold.generator', function(){\n // return Maker\\ScaffoldCommand::class;\n // });\n app()->singleton('scaffold.maker', function(){\n return new Maker\\MakerCommand;\n });\n app()->singleton('scaffold.remover', function(){\n return new Remover\\RemoverCommand;\n });\n\n $this->commands([\n // 'scaffold.generator',\n Maker\\ScaffoldCommand::class,\n 'scaffold.maker',\n 'scaffold.remover'\n ]);\n }", "protected function registerMakeCommand()\n {\n $this->app->singleton('pluggables.make', function ($app) {\n $handler = new Handlers\\PluggableMakeHandler($app['pluggables'], $app['files']);\n\n return new Console\\PluggableMakeCommand($handler);\n });\n }", "protected function registerCommand()\n {\n $this->app->singleton('rockid.generate', function (){\n return new RockidGenerateCommand();\n });\n $this->commands('rockid.generate');\n }", "protected function registerMakeCommand()\n {\n $this->registerCommand('make', function($app) {\n return new MakeCommand(\n new ModuleMakeHandler($app['arcanedev.moduly'], $app['files'])\n );\n });\n }", "protected function registerRepositoryMakeCommand()\r\n {\r\n $this->app->singleton('command.repository.make', function ($app) {\r\n return new RepositoryMakeCommand($app['files']);\r\n });\r\n }", "public function registerArtisanCommand()\n {\n $this->app->bindShared('livelogger.command.make', function($app)\n {\n return $app->make('Igormatkovic\\Livelogger\\Commands\\LiveloggerGenerateCommand');\n });\n\n $this->commands('livelogger.command.make');\n }", "public function buildCommand(): string;", "public function registerMakeTypeCommand()\n {\n $this->app->singleton('command.graphql.make.type', function ($app) {\n return new \\Folklore\\GraphQL\\Console\\TypeMakeCommand($app['files']);\n });\n }", "protected function registerMakeConditionCommand()\n {\n $this->app->singleton('command.acl.make.condition', function ($app) {\n return $app[MakeConditionCommand::class];\n });\n\n $this->commands('command.acl.make.condition');\n }", "private function registerControllerMakeCommand()\n {\n $this->app->bindShared('command.make.plugin.controller', function ($app)\n {\n return new ControllerMakeCommand($app['files'], $app['plugins']);\n });\n\n $this->commands('command.make.plugin.controller');\n }", "protected function registerThemeCompileCommand()\n {\n $this->app['command.theme.compile'] = $this->app->share(function ($app) {\n return new ThemeCompileCommand;\n });\n\n $this->commands('command.theme.compile');\n }", "protected function registerGenerateCommand()\n {\n $this->app->singleton('command.elo_wrapper.generate', function($app) {\n $generator = new WrapperGenerator($app['files']);\n\n return new GenerateCommand($generator);\n });\n }", "public function register_widget() {\n\n\t\t\tglobal $wp_widget_factory;\n\n\t\t\t$wp_widget_factory->widgets[$this->name] = new Build($this->options);\n\t\t}", "public function buildWatchCommand();", "protected function registerCleanCommand()\n {\n $this->app['command.basset.clean'] = $this->app->share(function($app)\n {\n $buildPath = $app['path.public'].'/'.$app['config']->get('basset::build_path');\n\n $cleaner = new BuildCleaner($app['basset.manifest'], $app['files'], $buildPath);\n\n return new CleanCommand($cleaner);\n });\n }", "public function registerWatchCommand()\r\n\t{\r\n\t\t$this->app['grunt.watch'] = $this->app->share(function($app)\r\n\t\t{\r\n\t\t\treturn new GruntWatchCommand();\r\n\t\t});\r\n\t}", "public function registerArchiveCommand() : void\n {\n $this->app->singleton(\"command.log.archive\", function () {\n return new ArchiveCommand();\n });\n \n array_push($this->commandsToBuild, \"command.log.archive\");\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the HTTP request body body This method returns a readable stream resource. If the asString parameter is set to true, a string is sent instead.
public function getBody($asString = false) { if (is_null($this->body)) { $this->body = fopen('php://input','r'); } if ($asString) { return stream_get_contents($this->body); } return $this->body; }
[ "public static function getRequestBodyStream() {}", "public function getBodyStream();", "function getBodyAsString() {\n\n $body = $this->getBody();\n if (is_string($body)) {\n return $body;\n }\n if (is_null($body)) {\n return '';\n }\n $contentLength = $this->getHeader('Content-Length');\n if (is_int($contentLength) || ctype_digit($contentLength)) {\n return stream_get_contents($body, $contentLength);\n } else {\n return stream_get_contents($body);\n }\n }", "public function getHTTPBody();", "public function getRawBody()\n\t{\n\t\tif (null === $this->_rawBody) {\n\t\t\t$body = file_get_contents('php://input');\n\t\n\t\t\tif (strlen(trim($body)) > 0) {\n\t\t\t\t$this->_rawBody = $body;\n\t\t\t} else {\n\t\t\t\t$this->_rawBody = false;\n\t\t\t}\n\t\t}\n\t\treturn $this->_rawBody;\n\t}", "protected function getRequestBody() {\n\t\t$body = null;\n\t\tif($this->method == 'POST' || $this->method == 'PUT') {\n\t\t\t$body = '';\n\t\t\t$fh = @fopen('php://input', 'r');\n\t\t\tif($fh) {\n\t\t\t\twhile(! feof($fh)) {\n\t\t\t\t\t$chunk = fread($fh, 1024);\n\t\t\t\t\tif(is_string($chunk)) {\n\t\t\t\t\t\t$body .= $chunk;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfclose($fh);\n\t\t\t}\n\t\t}\n\n\t\treturn $body;\n\t}", "public function getRawBody()\n {\n if (null === $this->rawBody) {\n $body = file_get_contents('php://input');\n\n if (strlen(trim($body)) > 0) {\n $this->rawBody = $body;\n } else {\n $this->rawBody = false;\n }\n }\n return $this->rawBody;\n }", "public function getBody()\n\t{\n // If $rawBody is set then we will return it instead of php://input\n $data = ($this->rawBody) ? $this->rawBody : file_get_contents(\"php://input\");\n\n return $data;\n\t}", "public function getRawBody()\n {\n return $this->inputStream;\n }", "function http_get_request_body_stream () {}", "public function getRawBody() {\n\n\t\tif(empty($this->_rawBody)) {\n\n\t\t\t$contents = file_get_contents('php://input');\n\n\t\t\t$this->_rawBody = $contents;\n\n\t\t\treturn $contents;\n\t\t}\n\n\t\treturn $this->_rawBody;\n\t}", "public function body()\n {\n if($this->request['body'] === null)\n {\n $this->request['body'] = file_get_contents('php://input');\n }\n \n return $this->request['body'];\n }", "public function getRawBody()\n {\n static $rawBody;\n if ($rawBody === null) {\n $rawBody = file_get_contents('php://input');\n }\n return $rawBody;\n }", "public static function getRawBody() {}", "public function getRawBody()\n {\n if (array_key_exists('raw_body', $this->_cache))\n {\n return $this->_cache['raw_body'];\n }\n\n $body = file_get_contents('php://input');\n\n return ($this->_cache['raw_body'] = trim($body));\n }", "public function getRawBody()\n {\n if ($this->_rawBody === null) {\n $this->_rawBody = file_get_contents('php://input');\n }\n return $this->_rawBody;\n }", "public function getRawBody()\n {\n if ($this->_rawBody === null) {\n $this->_rawBody = file_get_contents('php://input');\n }\n\n return $this->_rawBody;\n }", "public function getRawBody()\n {\n return file_get_contents('php://input');\n }", "public function createBodyStream(): InputStream;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add one row to the selected entity name on data source.
public function addImportedRow(array $data, $entityName = '') { # Format the imported data so it can be adding tho excel sheet row. $this->addRow(['data' => array_values($data)], $entityName); $this->doSave(); return true; }
[ "function addRowName($rowName) {\n $this->_rowNames[] = $rowName;\n }", "function addRow() {\n $rowIdx = count($this->_rows);\n $this->_rows[$rowIdx] = new papaya_pdf_table_row($this);\n $this->_currentRow = &$this->_rows[$rowIdx];\n $this->_currentRow->index = $rowIdx;\n }", "public function addRow(Row $row) {$this->rows[] = $row;}", "public function setRow( $row ){\n $this->data[] = $row;\n }", "function add(){\n\t\t\t$this->insertData($this->getTblProduct(),$this->getArrayDatas());\n\t}", "public function addRow($index = -1);", "function Ajax_NewOutputRow()\r\n\t{\r\n\t\tif ($this->Ajax_OutputDatasource == null)\r\n\t\t{\r\n\t\t\t$this->Ajax_OutputDatasource = new Datasource();\t\r\n\t\t}\r\n\t\t\r\n\t\t$this->Ajax_CurrentDataRow =& new DataRow();\r\n\t\t\r\n\t\t$this->Ajax_OutputDatasource->AddRow(&$this->Ajax_CurrentDataRow);\r\n\t}", "public function moveToInsertRow();", "public function newRow($class_name, $object, $row);", "public function addRow()\n {\n $args = func_get_args();\n if(count($args) != count($this->columns))\n return;\n\n $this->rows[] = $args;\n }", "function expense_tracker_add_row()\n{\n\t$this->layout='blank';\n\t$s_society_id=(int)$this->Session->read('society_id');\n\t$s_user_id=(int)$this->Session->read('user_id');\n\n\t\t$count = (int)$this->request->query('con');\n\t\t$this->set('count',$count);\n\n\t\t\t$this->loadmodel('accounts_group');\n\t\t\t$conditions=array(\"accounts_id\" => 4);\n\t\t\t$cursor1=$this->accounts_group->find('all',array('conditions'=>$conditions));\n\t\t\t$this->set('cursor1',$cursor1);\n\n\t\t\t\t$this->loadmodel('ledger_sub_account');\n\t\t\t\t$conditions=array(\"ledger_id\" => 15);\n\t\t\t\t$cursor2=$this->ledger_sub_account->find('all',array('conditions'=>$conditions));\n\t\t\t\t$this->set('cursor2',$cursor2);\n}", "public function upsert() {\n\t\tif(false === $this->row_id):\n\t\t\t$this->grid[] = $this->row;\n\t\telse:\n\t\t\tforeach($this->row as $row_key => $row_val):\n\t\t\t\t$this->grid[$this->row_id][$row_key] = $row_val;\n\t\t\tendforeach;\n\t\tendif;\n\t}", "function AddRow ()\r\n {\r\n return ++$this->row_count;\r\n }", "public function getNewRow();", "public function appendRow($row);", "function registerEntity($entity_name) {\r\n\t\r\n\t\tif (is_array($entity_name)) {\r\n\t\t\t$this->entities = array_merge($this->entities, $entity_name);\r\n\t\t} else {\r\n\t\t\t$this->entities[] = $entity_name;\r\n\t\t}\r\n\t}", "public function createRow()\n {\n if( !($this->_table instanceof Zend_Db_Table_Abstract) )\n {\n throw new Zend_Db_Table_Rowset_Exception(\"Unable to create new row in rowset without a table\");\n }\n\n $row = $this->_table->createRow();\n $this->_data[] = $row->toArray();\n $this->_rows[] = $row;\n $this->_count = count($this->_data);\n return $row;\n }", "public function addDataReturnsRecordTitleForInputTypeDataProvider() {}", "public function insertRowInEntityTblDML()\n {\n\t\t$sql = $this->getQueryContent('insertRowInEntityTblDML');\n\t\treturn $this->db->fireFastSqlQuery($sql,'insertRowInEntityTblDML');\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns all bids made by a specific userid for a specific course in a specific round.
public function retrieveBidByUserIDAndCourseAndRound($userid, $course, $round) { $sql = 'select * from bid where userid=:userid and code=:course and round=:round'; $connMgr = new ConnectionManager(); $conn = $connMgr->getConnection(); $stmt = $conn->prepare($sql); $stmt->setFetchMode(PDO::FETCH_ASSOC); $stmt->bindParam(':userid', $userid, PDO::PARAM_STR); $stmt->bindParam(':course', $course, PDO::PARAM_STR); $stmt->bindParam(':round', $round, PDO::PARAM_INT); $stmt->execute(); $result = null; while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $result = new Bid($row['userid'], $row['amount'], $row['code'],$row['section'],$row['status'], $row['round']); } $stmt = null; $conn = null; return $result; }
[ "public function retrieveBidsByUser($userid) {\r\n $sql = \"SELECT * FROM bid WHERE userid = :userid\";\r\n \r\n \r\n $connMgr = new ConnectionManager(); \r\n $conn = $connMgr->getConnection();\r\n\r\n $stmt = $conn->prepare($sql);\r\n $stmt->bindParam(':userid', $userid, PDO::PARAM_STR);\r\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\r\n $stmt->execute();\r\n \r\n $result = array();\r\n\r\n while($row = $stmt->fetch()) {\r\n $result[] = new Section($row['course'],$row['section'],$row['day'],$row['start'],$row['end'],$row['instructor'],$row['venue'],$row['size']);\r\n }\r\n \r\n \r\n return $result;\r\n }", "public function retrieveBidBySectionForRound($course,$section,$status,$round) { \n $sql = \"select * from bid where code=:code and section=:section and status=:status and round=:round\";\n \n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n \n $stmt = $conn->prepare($sql);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->bindParam(':code', $course, PDO::PARAM_STR);\n $stmt->bindParam(':section', $section, PDO::PARAM_STR);\n $stmt->bindParam(':status', $status, PDO::PARAM_STR);\n $stmt->bindParam(':round', $round, PDO::PARAM_INT);\n $stmt->execute();\n \n $result = [];\n \n while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $result[] = new Bid($row['userid'], $row['amount'], $row['code'],$row['section'],$row['status'], $row['round']);\n }\n\n $stmt = null;\n $conn = null; \n return $result;\n\n }", "public function getAllBids($section){\n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n\n $coursesID=$section[0];\n $sectionID=$section[1];\n\n $sql = \"select * from bid where code = '$coursesID' and section = '$sectionID' order by amount desc, userid;\";\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n\n $bids = [];\n while ($row = $stmt->fetch() ) {\n $bids[] = new Bid ( $row['userid'], $row['amount'], $row['code'], $row['section']);\n }\n return $bids;\n\n }", "public function retrieve($userid) { \n $sql = 'select * from bid where userid=:userid';\n \n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n \n \n $stmt = $conn->prepare($sql);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->bindParam(':userid', $userid, PDO::PARAM_STR);\n $stmt->execute();\n \n $result = [];\n \n while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $result[] = new Bid($row['userid'], $row['amount'], $row['code'],$row['section'],$row['status'], $row['round']);\n }\n $stmt = null;\n $conn = null; \n return $result;\n\n }", "public static function getBountiesForUser($userID) {\n\t\t\n\t\t\t$query = \"SELECT SUM( payment ) AS bounty, bounties.target_id, bounties.is_complete, bounties.payment, bounties.target_id, bounties.requester_id,bounties.id, users.id ,users.name,users.level,users.type\n\t\t\t\t\t\tFROM `bounties` \n\t\t\t\t\t\tJOIN users ON ( bounties.target_id = users.id ) \n\t\t\t\t\t\tWHERE bounties.is_complete =0\n\t\t\t\t\t\tAND bounties.target_id !=?\n\t\t\t\t\t\tAND target_id NOT IN (SELECT bounties.target_id FROM bounties WHERE bounties.requester_id = $userID)\n\t\t\t\t\t\tGROUP BY `target_id` \n\t\t\t\t\t\tLIMIT 15\";\n\t\t\n\t\t$objBounties = ConnectionFactory::SelectRowsAsClasses($query, array($userID), __CLASS__);\n\t\treturn $objBounties;\n\t}", "public function getBidByUserIDCourseStatus($userid, $course,$status) {\n $sql = 'select * from bid where userid=:userid and code=:course and status=:status';\n \n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n \n \n $stmt = $conn->prepare($sql);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->bindParam(':userid', $userid, PDO::PARAM_STR);\n $stmt->bindParam(':course', $course, PDO::PARAM_STR);\n $stmt->bindParam(':status', $status, PDO::PARAM_STR);\n $stmt->execute();\n $result = null;\n \n while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $result = new Bid($row['userid'], $row['amount'], $row['code'],$row['section'],$row['status'], $row['round']);\n }\n $stmt = null;\n $conn = null; \n return $result;\n }", "public function bids_ongame_byuser($game_id,$user_id){\n\t\t\t\t$sql = mysqli_query($this->_con,\"SELECT * FROM tbl_userbids where game_id ='$game_id' AND user_id ='$user_id'\");\n\t\t\t\treturn $sql;\n\t\t\n\t}", "public function getRoundsByUser($userId, $courseId = null);", "public function getBidInfo($userid) {\n \n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n\n $sql = \"SELECT * \n FROM BID \n WHERE \n userid=:userid\n \";\n $stmt = $conn->prepare($sql);\n $stmt->bindParam(':userid',$userid,PDO::PARAM_STR);\n \n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $status=$stmt->execute();\n if (!$status){ \n $err=$stmt->errorinfo();\n }\n $mod=[];\n while ($row=$stmt->fetch()){\n $mod[]=new Bid($row['userid'],$row['amount'],$row['code'],$row['section']); \n }\n \n $stmt = null;\n $conn = null;\n\n return $mod;\n }", "public function getBookingsForUser($a_user_id) {\r\n\t\t$set = $this->ilDB->query('SELECT * FROM ' . dbc::BOOKINGS_TABLE . ' WHERE pool_id = ' . $this->ilDB->quote($this->pool_id, 'integer')\r\n\t\t\t. ' AND user_id = ' . $this->ilDB->quote($a_user_id, 'integer') . ' AND (date_from >= \"' . date('Y-m-d H:i:s') . '\"' . ' OR date_to >= \"'\r\n\t\t\t. date('Y-m-d H:i:s') . '\")' . ' ORDER BY date_from ASC');\r\n\t\t$bookings = array();\r\n\t\twhile ($row = $this->ilDB->fetchAssoc($set)) {\r\n\t\t\t$bookings[] = $row;\r\n\t\t}\r\n\r\n\t\treturn $bookings;\r\n\t}", "function get_user_bets($user_id): array\n{\n $sql = \"SELECT rates.id AS rate_id,\n date_format(rates.dt_add, '%d.%m.%y') AS data_rate,\n rate AS rate,\n lots.id as lot_id,\n lots.title AS lot_title,\n categories.title AS category_title,\n lots.img_src AS lot_img,\n lots.end_date as lot_end_date,\n lots.winner_id as winner_id,\n users.contact as author_contact\n FROM rates\n JOIN lots ON lots.id = rates.lot_id\n JOIN users ON users.id = lots.author_id\n JOIN categories ON categories.id = lots.category_id\n WHERE rates.user_id = ?\n ORDER BY lots.end_date desc\";\n \n $bets = db_fetch_data($sql, [$user_id]);\n return $bets;\n}", "public function getBidBySection($course,$section,$status) { \n $sql = \"select * from bid where code=:code and section=:section and status=:status order by userid asc\";\n \n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n \n $stmt = $conn->prepare($sql);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->bindParam(':code', $course, PDO::PARAM_STR);\n $stmt->bindParam(':section', $section, PDO::PARAM_STR);\n $stmt->bindParam(':status', $status, PDO::PARAM_STR);\n $stmt->execute();\n \n $result = [];\n \n while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n \n $result[] = new Bid($row['userid'], $row['amount'], $row['code'],$row['section'],$row['status'], $row['round']);\n }\n \n $stmt = null;\n $conn = null; \n return $result;\n\n }", "function getClippingsByUserId($userId) {\n require_once(dirname(__FILE__) . '/../helpers/database_helper.php');\n\n $sql = sqlSetup();\n $query = \"SELECT * FROM CLIPPINGS WHERE UID=$userId\";\n $result = mysqli_query($sql, $query) or die(\"A MySQL error has occurred.<br />Error: (\" . mysqli_errno($sql) . \") \" . mysqli_error($sql));\n\n $clippings = array();\n while ($obj = mysqli_fetch_object($result)) {\n $clippings[] = $obj;\n }\n return $clippings;\n}", "public function getBorrowersByUserID($user_id) {\n\t\ttry {\n\t\t\t\n\t\t\t$data = $this->invoke('getBorrowersByUserID', array('user_id' => $user_id));\n\t\t\t$results = array();\n\t\t\tforeach ($data as $obj) {\n\t\t\t\tarray_push($results, VCDSoapTools::GetBorrowerObj($obj));\n\t\t\t}\n\t\t\treturn $results;\n\t\t\t\n\t\t} catch (Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}", "function GetBidBy_User($user_login_id)\n\t{\n\t\tglobal $db;\n\t\t$sql= \" SELECT * FROM \".BID_MASTER .\" AS BM \"\n\t\t\t .\" LEFT JOIN \".project_MASTER.\" AS PM ON BM.project_id = PM.project_id\"\n\t\t\t .\" WHERE BM.bid_by_user = '\".$user_login_id.\"' \";\n\t\t$db->query($sql);\n\t}", "public function retrieveByCourseSection($courseSection){\n //this function is used for round clearing\n \n $sql = 'SELECT * FROM bid WHERE course=:course and section=:section order by amount DESC, userid ASC';\n\n $connMgr = new ConnectionManager(); \n $conn = $connMgr->getConnection();\n $stmt = $conn->prepare($sql);\n\n $stmt->bindParam(':course', $courseSection[0], PDO::PARAM_STR);\n $stmt->bindParam(':section', $courseSection[1], PDO::PARAM_STR);\n\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->execute();\n\n $result = array();\n\n while($row = $stmt->fetch()) {\n $result[] = new Bid($row['userid'], $row['amount'], $row['course'], $row['section']);\n }\n\n $stmt = null;\n $conn = null; \n\n return $result;\n }", "public static function getAllBillsByUser($db, $userid) {\n // Prepares and executes the query.\n $query = \"SELECT * From \" . Bill::$table_name . \" WHERE user=:user ORDER BY payment, date DESC\";\n\n $stmt = $db->prepare($query);\n $stmt->bindParam(\":user\", $userid);\n\n $stmt->execute();\n\n // Create a Bill object array\n $bill_array = array();\n\n // Traverses the Resultset of the query Execution.\n // Adds a new element to the array for each record.\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $bill = new Bill($db);\n Bill::updateAttributes($bill, $row);\n // Adds the Bill object to the array\n $bill_array[] = $bill;\n }\n\n return $bill_array;\n }", "public function getBillingsWithUserId($userId)\n {\n $user = User::find($userId);\n\n return $user->cards;\n }", "function getResourceBookingsByUserId($a_iUserId)\n {\n $oResourceBookingSelector = getResourceBookingSelector();\n $oResourceBookingSelector->setUserId($a_iUserId);\n $oResourceBookingCollection = $this->read($oResourceBookingSelector);\n return $oResourceBookingCollection;\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/+ | Funktion: getDeviceDescription | | Erwartet: | | Address ( string ) | | | | Liefert: | | Description_array ( array ) | +
public function getDeviceDescription(string $Address){ if (!$this->GetOnlineState()) return null; $args=array('Address'=>$Address); $filter=array('Description_array'); return self::Call('Control','getDeviceDescription',$args,$filter);; }
[ "public function descriptions()\n {\n return $this->getSNMP()->walk1d( self::OID_IF_DESCRIPTION );\n }", "public function getElectronicDeviceDescription()\n {\n return $this->electronicDeviceDescription;\n }", "public function getDescription(){\n\t\t$this->description .= $this->hardware->getDescription().' + keyboard';\n\t\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->vendor_description;\n\t}", "function getShortDescription();", "public function descriptions()\n {\n return $this->getSNMP()->walk1d( self::OID_ASTERISK_CHANNEL_TYPE_DESCRIPTION );\n }", "public function getSap_desc () {\n\t$preValue = $this->preGetValue(\"sap_desc\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->sap_desc;\n\treturn $data;\n}", "public function getManufacturerDescription()\n {\n $manufacturer = $this->getManufacturer($this->manufacturerId);\n\n return strip_tags($manufacturer->mf_desc);\n }", "public function getLogProgramDescr() {\n try {\n $r = DB::connection('sqlsrv')->select(\"exec bill..programm_type_log_desk_get 1\");\n } catch (\\PDOException $e) {\n Log::debug('getLogDescription EXCEPTION');\n return [];\n }\n $resp = [];\n foreach($r as $program_row) {\n $resp[] = [\n 'program_id' => $program_row->programm_id,\n 'descr' => Helper::cyr($program_row->programm_desk)\n ];\n }\n return $resp;\n }", "public function getProductDescription()\n {\n }", "public function describe($returnDescription = false) {\n\t\t\tglobal $smConsoleOutput;\n\t\t\t\n\t\t\t$description = array(\n\t\t\t\t'address'\t\t=> $this->getAddress1(),\n\t\t\t\t'address2'\t\t=> $this->getAddress2(),\n\t\t\t\t'city'\t\t\t=> $this->getCity(),\n\t\t\t\t'countryCode'\t=> $this->getCountryCode(),\n\t\t\t\t'id'\t\t\t=> $this->getID(),\n\t\t\t\t'latitude'\t\t=> $this->getLatitude(),\n\t\t\t\t'longitude'\t\t=> $this->getLongitude(),\n\t\t\t\t'state'\t\t\t=> $this->getState(),\n\t\t\t\t'title'\t\t\t=> $this->getTitle(),\n\t\t\t\t'zip'\t\t\t=> $this->getZip()\n\t\t\t);\n\t\t\t\n\t\t\t// filter\n\t\t\t$src = array(\"\\\\\", \"/\", \"\\\"\", \"\\n\", \"\\r\", \"\\t\", \"\\x08\", \"\\x0c\");\n\t\t\t$repl = array(\"\\\\\\\\\", \"\\\\/\", \"\\\\\\\"\", \"\\\\n\", \"\\\\r\", \"\\\\t\", \"\\\\f\", \"\\\\b\");\n\t\t\tforeach ($description as $key => $value) {\n\t\t\t\t$description[$key] = str_replace($src, $repl, $value);\n\t\t\t}\n\t\t\t\n\t\t\tif ($returnDescription) {\n\t\t\t\treturn $description;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$smConsoleOutput .= 'console.info(\\'SMLocation ('. $this->getTitle() .')\\'); console.dir(JSON.parse(\\''. json_encode($description) .'\\'));';\n\t\t\t}\n\t\t}", "public function node_descriptions_list() {\r\n global $DB;\r\n if ($this->descriptions === null) {\r\n $istablefilledincorrect = !is_string($this->tablename) || core_text::strlen($this->tablename) == 0;\r\n if (!is_numeric($this->tableid) || $istablefilledincorrect) {\r\n return array();\r\n //throw new coding_exception('Trying to extract descriptions from unknown sources for string');\r\n }\r\n $conditions = array(\" tableid='{$this->tableid}' \", \"tablename = '{$this->tablename}' \");\r\n $records = $DB->get_records_select('block_formal_langs_node_dscr', implode(' AND ', $conditions));\r\n foreach($records as $record) {\r\n $this->descriptions[$record->number] = $record->description;\r\n }\r\n }\r\n return $this->descriptions;\r\n }", "abstract protected function getAttributeDescriptions(): array;", "function RawDescription()\n\t {\n\t \treturn $this->_FetchRawCDR('Description');\n\t }", "public function getDescription(){\r\n if(!$this->description){\r\n $this->getDescriptionFromProduct();\r\n }\r\n else{\r\n return $this->description;\r\n }\r\n }", "function gupnp_device_info_get($root_device): array {}", "public function getDescr()\n {\n return $this->descr;\n }", "abstract public function listDevices();", "function getDescription($phpdoc) {\n // find the position of the first doc tag\n $positions = $this->getTagPos($phpdoc);\n\n if (0 == count($positions))\n $desc = trim($phpdoc); // no doc tags\n else\n $desc = trim(substr($phpdoc, 0, $positions[0]['pos'])); // strip tags\n \n $lines = split($this->PHP_BASE['break'], $desc);\n // 3/8/2002 - Tim Gallagher<timg@sunflowerroad.com> changed this\n // section back to original behavior.\n // I don't like putting the short description with the long description.\n // it muddys the data, and doesn't allow the template author to move them around\n // separate of each other. Instead, what i've done is to put description and short description\n // together in my *templates*. I like this better because I usually start the description\n // with the first line of description, then continue the thought on to the next line(s)\n // this looks better in code too because it flows better.\n // plus, if there is no long description, the short one prints anyway.\n // I don't want to start a code war, so i've defined a variable to allow both behaviors.\n // look in prepend.php for that variable.\n \n if (PHPDOC_SEPARATE_DESCRIPTIONS) {\n $sdesc = trim($lines[0]);\n unset($lines[0]);\n $ldesc = implode(\" \", $lines);\n $description = array ($sdesc, $ldesc);\n } else {\n if (count($lines) == 1 || $desc == '') {\n // only a short description but no long description - or even none of both\n $description = array ($desc, $desc);\n } else {\n $sdesc = trim($lines[0]);\n $description = array($sdesc, $desc);\n }; // end if\n }; // end if\n \n return $description;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a human readable name of the filetype group.
public function get_group_description($group) { if (get_string_manager()->string_exists('group:'.$group, 'core_mimetypes')) { return get_string('group:'.$group, 'core_mimetypes'); } else { return s($group); } }
[ "public function getFiletypelabel() {\n\t\treturn $this->filetypelabel;\n\t}", "public function getName()\n {\n return $this->group->getName();\n }", "function Name(){\n\t\tif(!$this->title) {\n\t\t\t$fs = $this->FieldSet();\n\t\t\t$compositeTitle = '';\n\t\t\t$count = 0;\n\t\t\tforeach($fs as $subfield){\n\t\t\t\t$compositeTitle .= $subfield->Name();\n\t\t\t\tif($subfield->Name()) $count++;\n\t\t\t}\n\t\t\tif($count == 1) $compositeTitle .= 'Group';\n\t\t\treturn ereg_replace(\"[^a-zA-Z0-9]+\",\"\",$compositeTitle);\n\t\t}\n\n\t\treturn ereg_replace(\"[^a-zA-Z0-9]+\",\"\",$this->title);\t\n\t}", "public function getFileType()\n {\n if (!$this->mime || $this->mime === 'directory' || $this->mime === 'dir') {\n return 'dir';\n }\n\n foreach ($this->mimes as $mime => $mime_values) {\n $key = collect($mime_values)->search(function ($mime_value) {\n return preg_match($mime_value, $this->mime);\n });\n\n if ($key !== false) {\n return $mime;\n }\n }\n\n return 'file';\n }", "public function filename()\n {\n return $this->name_space() . '_' . $this->files_hash() . '.' . $this->_type;\n }", "public function get_group_name() {\n\t\t$group = $this->get_group();\n\t\tif ( ! is_object( $group ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn $group->name;\n\t}", "public function getType()\n {\n if (is_file($this->path)) {\n return 'file';\n } elseif (is_link($this->path)) {\n return 'link';\n } elseif (is_dir($this->path)) {\n return 'dir';\n }\n\n return \"Unknown\";\n }", "function theme_pi_group_title($name, $group_type)\n{\n\t$output = '';\n\tif($group_type!=NULL)\n\t{\n\t\t$group_type_text = check_plain(ucfirst($group_type));\n\t}\n\telse\n\t{\n\t\t$group_type = t('None');\n\t}\n\tif($name!=NULL)\n\t{\n\t\t$output_name = $name;\n\t}\n\telse\n\t{\n\t\t$output_name = t('Unknown');\n\t}\n\t$output .= $output_name . \" ($group_type_text)\";\n\treturn $output;\n}", "function getGroupSubpartName()\n\t{\n\t\t// Else: use GROUP\n\t\tif (array_key_exists('legacyMode', $this->conf)) {\n\t\t\tif ($this->conf['legacyMode'] == '2.5') {\n\t\t\t\treturn '###PRODUCTGROUP###';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn '###GROUP###';\n\t}", "protected final static function qualify_group(): string {\r\n $module = JKNAPI::module(static::class);\r\n $qgroup = $module->qualify(static::group());\r\n return sprintf('group_%s', $qgroup);\r\n }", "function getFileType()\n {\n return (string) $this->_sFileType;\n }", "public function getName()\n\t{\n\t\treturn $this->typeRegistry->getNameForType($this->type);\n\t}", "public function getGroupTypeName($group_type_id) {\n\t\treturn SQLQuery::create()->select(\"StudentsGroupType\")->where(\"id\", $group_type_id)->field(\"name\")->executeSingleValue();\n\t}", "protected function getGroupName() {\n return get_class($this);\n }", "private function type( $group ) {\n\t\tif ( $group ) {\n\t\t\t$type = ht_dms_prefix_remover( HT_DMS_GROUP_POD_NAME );\n\t\t}\n\t\telse {\n\t\t\t$type = ht_dms_prefix_remover( HT_DMS_ORGANIZATION_POD_NAME );\n\t\t}\n\n\t\treturn $type;\n\t}", "public function type()\n {\n return (filetype($this->filename));\n }", "function getTypeName() {\n\t\t$arr = $this->getAvailableTypes();\n\t\treturn $arr[$this->data_array['field_type']];\n\t}", "public static function getGroupType();", "public function getPackagedName()\n {\n return Generator::getPackageName() . $this->getContextualPart() . ucfirst(self::uniqueName($this->getCleanName(), $this->getContextualPart()));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Carga capas para region
public function ajax_capas_region(){ header('Content-type: application/json'); $this->load->library("capa/Capa_region_disponibles"); $params = $this->input->post(null, true); $this->capa_region_disponibles->setRegion($params["id"]); echo json_encode(array("lista" => $this->capa_region_disponibles->getListaCapas())); }
[ "private function agregar_capacidad (){\r\n $id_sede=toba::memoria()->get_dato_instancia(0);\r\n \r\n //$aulas_con_capacidad=$this->dep('datos')->tabla('aula')->get_aulas_mas_capacidad($id_sede);\r\n $sql=\"SELECT id_aula, capacidad\r\n FROM aula\r\n WHERE id_sede=$id_sede\";\r\n $aulas_con_capacidad=toba::db('gestion_aulas')->consultar($sql);\r\n \r\n $longitud=count($this->s__horarios_disponibles);\r\n \r\n foreach ($aulas_con_capacidad as $clave=>$valor){\r\n for($i=0;$i<$longitud;$i++){\r\n $elto=$this->s__horarios_disponibles[$i];\r\n if($valor['id_aula'] == $elto['id_aula']){\r\n $this->s__horarios_disponibles[$i]['capacidad']=$valor['capacidad'];\r\n } \r\n }\r\n }\r\n \r\n toba::memoria()->limpiar_datos_instancia();\r\n }", "public function getRegions(){\n\t\t\tif($this->pays){\n\t\t\t \n\t\t\t}else if($this->id){\n\t\t\t\t//recuperation des \n\t\t\t}\n\t\t}", "public function getRegions()\n {\n return array(\n 'ca' => array(\n\t\t\t\t'lang_iso_code' => 'en_CA',\n\t\t\t\t'marketplace' => 'CA',\n\t\t\t\t'name' => __('Amazon Canada', 'awshortcode'),\n\t\t\t\t'suffix' => '-20',\n\t\t\t\t'tld' => 'ca',\n\t\t\t\t'url' => array(\n\t\t\t\t\t'affiliate' => 'https://associates.amazon.ca/',\n\t\t\t\t\t'product' => 'http://www.amazon.ca/dp/[[ASIN]]/?tag=[[ASSOCIATE-ID]]',\n\t\t\t\t\t'tracking' => 'http://www.assoc-amazon.[[TLD]]/e/ir?t=[[ASSOCIATE-ID]]&l=as2&o=3&a=[[ASIN]]',\n\t\t\t\t\t'site' => 'http://www.amazon.ca/'\n ),\n ),\n 'cn' => array(\n\t\t\t\t'lang_iso_code' => 'zh_CN',\n\t\t\t\t'marketplace' => 'CN',\n\t\t\t\t'name' => __('Amazon China', 'awshortcode'),\n\t\t\t\t'suffix' => '-23',\n\t\t\t\t'tld' => 'cn',\n\t\t\t\t'url' => array(\n\t\t\t\t\t'affiliate' => 'https://associates.amazon.cn/',\n\t\t\t\t\t'product' => 'http://www.amazon.cn/dp/[[ASIN]]/?tag=[[ASSOCIATE-ID]]',\n\t\t\t\t\t'tracking' => 'http://www.assoc-amazon.[[TLD]]/e/ir?t=[[ASSOCIATE-ID]]&l=as2&o=3&a=[[ASIN]]',\n\t\t\t\t\t'site' => 'http://www.amazon.cn/'\n ),\n ),\t\t\t\n\t\t\t'de' => array(\n\t\t\t\t'lang_iso_code' => 'de_DE',\n\t\t\t\t'marketplace' => 'DE',\n\t\t\t\t'name' => __('Amazon Germany', 'awshortcode'),\n\t\t\t\t'suffix' => '-21',\n\t\t\t\t'tld' => 'de',\n\t\t\t\t'url' => array(\n\t\t\t\t\t'affiliate' => 'https://partnernet.amazon.de/',\n\t\t\t\t\t'product' => 'http://www.amazon.de/dp/[[ASIN]]/?tag=[[ASSOCIATE-ID]]',\n\t\t\t\t\t'tracking' => 'http://www.assoc-amazon.[[TLD]]/e/ir?t=[[ASSOCIATE-ID]]&l=as2&o=3&a=[[ASIN]]',\n\t\t\t\t\t'site' => 'http://www.amazon.de/'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'es' => array(\n\t\t\t\t'lang_iso_code' => 'es_ES',\n\t\t\t\t'marketplace' => 'ES',\n\t\t\t\t'name' => __('Amazon Spain', 'awshortcode'),\n\t\t\t\t'suffix' => '-21',\n\t\t\t\t'tld' => 'es',\n\t\t\t\t'url' => array(\n\t\t\t\t\t'affiliate' => 'https://afiliados.amazon.es/',\n\t\t\t\t\t'product' => 'http://www.amazon.es/dp/[[ASIN]]/?tag=[[ASSOCIATE-ID]]',\n\t\t\t\t\t'tracking' => 'http://www.assoc-amazon.[[TLD]]/e/ir?t=[[ASSOCIATE-ID]]&l=as2&o=3&a=[[ASIN]]',\n\t\t\t\t\t'site' => 'http://www.amazon.es/'\n\t\t\t\t),\n\t\t\t),\t\t\t\n\t\t\t'fr' => array(\n\t\t\t\t'lang_iso_code' => 'fr_FR',\n\t\t\t\t'marketplace' => 'FR',\n\t\t\t\t'name' => __('Amazon France', 'awshortcode'),\n\t\t\t\t'suffix' => '-21',\n\t\t\t\t'tld' => 'fr',\n\t\t\t\t'url' => array(\n\t\t\t\t\t'affiliate' => 'https://partenaires.amazon.fr/',\n\t\t\t\t\t'product' => 'http://www.amazon.fr/dp/[[ASIN]]/?tag=[[ASSOCIATE-ID]]',\n\t\t\t\t\t'tracking' => 'http://www.assoc-amazon.[[TLD]]/e/ir?t=[[ASSOCIATE-ID]]&l=as2&o=3&a=[[ASIN]]',\n\t\t\t\t\t'site' => 'http://www.amazon.fr/'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'it' => array(\n\t\t\t\t'lang_iso_code' => 'it_IT',\n\t\t\t\t'marketplace' => 'IT',\n\t\t\t\t'name' => __('Amazon Italia', 'awshortcode'),\n\t\t\t\t'suffix' => '-21',\n\t\t\t\t'tld' => 'it',\n\t\t\t\t'url' => array(\n\t\t\t\t\t'affiliate' => 'https://programma-affiliazione.amazon.it/',\n\t\t\t\t\t'product' => 'http://www.amazon.it/dp/[[ASIN]]/?tag=[[ASSOCIATE-ID]]',\n\t\t\t\t\t'tracking' => 'http://www.assoc-amazon.[[TLD]]/e/ir?t=[[ASSOCIATE-ID]]&l=as2&o=3&a=[[ASIN]]',\n\t\t\t\t\t'site' => 'http://www.amazon.it/'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'jp' => array(\n\t\t\t\t'lang_iso_code' => 'ja_JP',\n\t\t\t\t'marketplace' => 'JP',\n\t\t\t\t'name' => __('Amazon Japan', 'awshortcode'),\n\t\t\t\t'suffix' => '-22',\n\t\t\t\t'tld' => 'co.jp',\n\t\t\t\t'url' => array(\n\t\t\t\t\t'affiliate' => 'https://affiliate.amazon.co.jp/',\n\t\t\t\t\t'product' => 'http://www.amazon.co.jp/dp/[[ASIN]]/?tag=[[ASSOCIATE-ID]]',\n\t\t\t\t\t'tracking' => 'http://www.assoc-amazon.[[TLD]]/e/ir?t=[[ASSOCIATE-ID]]&l=as2&o=3&a=[[ASIN]]',\n\t\t\t\t\t'site' => 'http://www.amazon.co.jp/'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'uk' => array(\n\t\t\t\t'lang_iso_code' => 'en_UK',\n\t\t\t\t'marketplace' => 'UK',\n\t\t\t\t'name' => __('Amazon United Kingdom', 'awshortcode'),\n\t\t\t\t'suffix' => '-21',\n\t\t\t\t'tld' => 'co.uk',\n\t\t\t\t'url' => array(\n\t\t\t\t\t'affiliate' => 'https://affiliate-program.amazon.co.uk/',\n\t\t\t\t\t'product' => 'http://www.amazon.co.uk/dp/[[ASIN]]/?tag=[[ASSOCIATE-ID]]',\n\t\t\t\t\t'tracking' => 'http://www.assoc-amazon.[[TLD]]/e/ir?t=[[ASSOCIATE-ID]]&l=as2&o=3&a=[[ASIN]]',\n\t\t\t\t\t'site' => 'http://www.amazon.co.uk/'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'us' => array(\n\t\t\t\t'lang_iso_code' => 'en_US',\n\t\t\t\t'marketplace' => 'US',\n\t\t\t\t'name' => __('Amazon USA', 'awshortcode'),\n\t\t\t\t'suffix' => '-20',\n\t\t\t\t'tld' => 'com',\n\t\t\t\t'url' => array(\n\t\t\t\t\t'affiliate' => 'https://affiliate-program.amazon.com/',\n\t\t\t\t\t'product' => 'http://www.amazon.com/dp/[[ASIN]]/?tag=[[ASSOCIATE-ID]]',\n\t\t\t\t\t'tracking' => 'http://www.assoc-amazon.[[TLD]]/e/ir?t=[[ASSOCIATE-ID]]&l=as2&o=3&a=[[ASIN]]',\n\t\t\t\t\t'site' => 'http://www.amazon.com/'\n\t\t\t\t),\n\t\t\t),\n\t\t);\n }", "public function catRegiones(){\n\t\t$query = $this->db->query(\"SELECT [Subgroup Code] AS region FROM [ASTURIANO].[dbo].[COORPORACION_EL_ASTURIANO\\$Distribution Group Member] WHERE [Subgroup Code] LIKE 'REGION%' GROUP BY [Subgroup Code]\");\n\t\treturn $query->result();\n\t}", "function origins_preprocess_region(&$variables) {}", "public function regionAction()\n {\n\n /* recupero i parametri */\n $id = $this->_getParam('item', 0);\n $ads = $this->_getParam('ads', 0);\n $user = $this->_getParam('user', 0);\n\n $region = new Application_Model_DbTable_Region();\n\n /* tutte le informazioni della regione selezionata */\n $this->view->region = $region->getRegionInfo($id);\n\n /* le altre regioni escluso quella selezionata*/\n $this->view->other = $region->Other_Region($id);\n\n /* tutte le province della regione*/\n $provinces = new Application_Model_DbTable_Provinces();\n $this->view->provinces = $provinces->Parent_Provinces($id);\n\n /**\n * creo l'array con la lista degli annunci\n * mostro a video+array()\n */\n $shop = new Application_Model_DbTable_Shop();\n $fullShop = $shop->fullShopFilter(array('type' => 'region', 'id' => $id, 'ads' => $ads, 'user' => $user));\n $this->view->list = $fullShop;\n $this->view->range = $this->slider_range($fullShop);\n $this->view->type_ads = $this->params->type_ads->toArray();\n $this->view->type_user = $this->params->type_user->toArray();\n $this->view->notfound = $this->params->label_not_found;\n $this->view->icon_type_user = $this->_icon_type_user;\n $this->view->icon_type_ads = $this->_icon_type_ads;\n }", "public function regions(): array;", "public function getRegion();", "function _handleRegion($offset, $length, $attribs)\n {\n }", "function getDatosRegion()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'region'));\n $oDatosCampo->setEtiqueta(_(\"sigla\"));\n $oDatosCampo->setTipo('texto');\n $oDatosCampo->setArgument(6);\n return $oDatosCampo;\n }", "private function carga_imagen() {\n }", "function store_region() {\r\n global $app, $grid, $order_status;\r\n require_once('region.class.php');\r\n require_once('payment.class.php');\r\n\r\n // retrieve the payment\r\n $tbl_payment = new Payment;\r\n $payment = $tbl_payment->get($_SESSION['payment_id']);\r\n\r\n // create the region\r\n $region = new Region;\r\n $region->grid_id = param('grid_id');\r\n // if ($app->setting->user_accounts) $region->user_id = $_SESSION['user_id'];\r\n $region->x = param('x');\r\n $region->y = param('y');\r\n $region->width = param('w');\r\n $region->height = param('h');\r\n $region->image = $_SESSION['image'];\r\n $region->url = param('url');\r\n $region->title = param('title');\r\n $region->alt = param('alt');\r\n $region->email = param('email');\r\n $region->type = param('sponsortype');\r\n\r\n // set the expiration-related dates if necessary\r\n $now = time();\r\n if ($grid->expire_days > 0)\r\n $region->expires_at = Util::epoch_to_datetime($now + $grid->expire_days * 86400);\r\n if ($grid->reminder_days > 0)\r\n $region->reminder_at = Util::epoch_to_datetime($now + ($grid->expire_days - $grid->reminder_days) * 86400);\r\n if ($grid->purge_days > 0)\r\n $region->purge_at = Util::epoch_to_datetime($now + ($grid->expire_days + $grid->purge_days) * 86400);\r\n\r\n // determine region status. region is pending if administrator\r\n // approval is required or if the payment has not been verified.\r\n $region->status = REGION_ACTIVE;\r\n if ($app->setting->approval_required)\r\n $region->status = REGION_PENDING;\r\n if (!$payment->is_verified || $payment->is_error)\r\n $region->status = REGION_PENDING;\r\n if(!$payment->is_error)\r\n $region->status = REGION_ACTIVE;\r\n \r\n // save region and mark grid dirty\r\n $region->save();\r\n $grid->is_dirty = 1;\r\n $grid->save();\r\n $order_status['region_id'] = $region->id();\r\n\r\n // link the payment to the region\r\n $payment->region_id = param('region_id');\r\n $payment->email = param('email');\r\n $payment->amount = param('amount');\r\n $payment->drawing_id = param('drawing_id')?param('drawing_id'):0;\r\n $payment->save();\r\n\r\n // this payment is now finished\r\n unset($_SESSION['payment_id']);\r\n\r\n // send email confirmation\r\n send_confirmation($region, $payment);\r\n}", "public function actualizarCapacidadUbicaciones()\n\t {\n\t \t// Obtenemos todas las ubicaciones\n\t \t$ar_ubicaciones = $this->obtenerTodosUbicaciones();\n\t \t\n\t \tforeach($ar_ubicaciones as $ubicacion)\n\t \t{\n\t \t\t// Buscamos el total de articulos colocados en esa ubicacion\n\t \t\t$total_articulos_ubicacion = $this->obtenerTotalArticulosUbicacion($ubicacion->getIdUbicacion());\n\t \t\t\n\t \t\t$id_ubicacion = $ubicacion->getIdUbicacion();\n\t\t \t$ubicaciones = new Ubicaciones();\n\t\t \t$ubicaciones->setIdUbicacion($id_ubicacion);\n\t\t \t\n\t\t \tif($total_articulos_ubicacion <= 5)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 1;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion <= 10)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 2;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion <= 20)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 3;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion <= 30)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 4;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion <= 40)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 5;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion <= 50)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 6;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion <= 60)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 7;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion <= 70)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 8;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion <= 80)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 9;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion <= 90)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 10;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion < 100)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 11;\n\t\t \t}\n\t\t \telseif($total_articulos_ubicacion >= 100)\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 12;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\t$id_estado_ubicacion = 0;\n\t\t \t}\n\t\t \t\n\t\t \t\n\t\t\t$ubicaciones->setIdEstadoUbicacion($id_estado_ubicacion);\n\t\t \t\n\t\t \t// Actualizamos el Ubicacion en la BD\n\t\t \t$ubicacion_update = UbicacionesPeer::doUpdate($ubicaciones);\n\t \t}\n\t \t\n\t \treturn $ubicacion_update;\n\t }", "function augie_regions() {\n return array(\n 'top' => t('Top'),\n 'bottom' => t('Bottom'),\n 'left' => t('Left'),\n 'right' => t('Right'),\n 'footer' => t('Header'),\n 'search' => t('Search'),\n 'channel' => t('Channel Image'),\n 'gateway' => t('Gateway Sidebar'),\n 'homepage_left' => t('Homepage Left'),\n 'homepage_right' => t('Homepage Right'),\n );\n}", "public function getImageRegion ($width, $height, $x, $y) {}", "function getAmiFor($region,$browser){\n $amazonAMIForRegion[\"us-east-1\"][\"IE_7\"]=\"ami-fe689397\";\n $amazonAMIForRegion[\"us-east-1\"][\"IE_8\"]=\"ami-406f9429\";\n $amazonAMIForRegion[\"us-east-1\"][\"IE_9\"]=\"ami-0f7eae66\";\n $amazonAMIForRegion[\"us-east-1\"][\"Chrome\"]=\"ami-0f7eae66\";\n $amazonAMIForRegion[\"us-east-1\"][\"Firefox\"]=\"ami-0f7eae66\";\n\n\n $amazonAMIForRegion[\"us-west-1\"][\"IE_7\"]=\"ami-919dcfd4\";\n $amazonAMIForRegion[\"us-west-1\"][\"IE_8\"]=\"ami-5982d01c\";\n $amazonAMIForRegion[\"us-west-1\"][\"IE_9\"]=\"ami-f97029bc\";\n $amazonAMIForRegion[\"us-west-1\"][\"Chrome\"]=\"ami-f97029bc\";\n $amazonAMIForRegion[\"us-west-1\"][\"Firefox\"]=\"ami-f97029bc\";\n\n $amazonAMIForRegion[\"us-west-2\"][\"IE_7\"]=\"ami-68a42958\";\n $amazonAMIForRegion[\"us-west-2\"][\"IE_8\"]=\"ami-2ca4291c\";\n $amazonAMIForRegion[\"us-west-2\"][\"IE_9\"]=\"ami-867af7b6\";\n $amazonAMIForRegion[\"us-west-2\"][\"Chrome\"]=\"ami-867af7b6\";\n $amazonAMIForRegion[\"us-west-2\"][\"Firefox\"]=\"ami-867af7b6\";\n\n\n $amazonAMIForRegion[\"sa-east-1\"][\"IE_7\"]=\"ami-622ff07f\";\n $amazonAMIForRegion[\"sa-east-1\"][\"IE_8\"]=\"ami-9c2ff081\";\n $amazonAMIForRegion[\"sa-east-1\"][\"IE_9\"]=\"ami-cc7fa0d1\";\n $amazonAMIForRegion[\"sa-east-1\"][\"Chrome\"]=\"ami-cc7fa0d1\";\n $amazonAMIForRegion[\"sa-east-1\"][\"Firefox\"]=\"ami-cc7fa0d1\";\n\n $amazonAMIForRegion[\"eu-west-1\"][\"IE_7\"]=\"ami-70b18004\";\n $amazonAMIForRegion[\"eu-west-1\"][\"IE_8\"]=\"ami-00b18074\";\n $amazonAMIForRegion[\"eu-west-1\"][\"IE_9\"]=\"ami-33b98747\";\n $amazonAMIForRegion[\"eu-west-1\"][\"Chrome\"]=\"ami-33b98747\";\n $amazonAMIForRegion[\"eu-west-1\"][\"Firefox\"]=\"ami-33b98747\";\n\n\n $amazonAMIForRegion[\"ap-southeast-1\"][\"IE_7\"]=\"ami-38bac26a\";\n $amazonAMIForRegion[\"ap-southeast-1\"][\"IE_8\"]=\"ami-92bac2c0\";\n $amazonAMIForRegion[\"ap-southeast-1\"][\"IE_9\"]=\"ami-385a1e6a\";\n $amazonAMIForRegion[\"ap-southeast-1\"][\"Chrome\"]=\"ami-385a1e6a\";\n $amazonAMIForRegion[\"ap-southeast-1\"][\"Firefox\"]=\"ami-385a1e6a\";\n\n $amazonAMIForRegion[\"ap-northeast-1\"][\"IE_7\"]=\"ami-ba16bcbb\";\n $amazonAMIForRegion[\"ap-northeast-1\"][\"IE_8\"]=\"ami-bc16bcbd\";\n $amazonAMIForRegion[\"ap-northeast-1\"][\"IE_9\"]=\"ami-6a5cea6b\";\n $amazonAMIForRegion[\"ap-northeast-1\"][\"Chrome\"]=\"ami-6a5cea6b\";\n $amazonAMIForRegion[\"ap-northeast-1\"][\"Firefox\"]=\"ami-6a5cea6b\";\n\n\n $ami = $amazonAMIForRegion[$region][str_replace(\" \",\"_\",$browser)];\n return $ami;\n}", "protected function getDefaultRegions() {\n return [];\n }", "function get_load_regions($campos = null, $filtro = null)\r\n{\r\n\t$options = null;\r\n\t#validate if $options is empty\r\n\tif (!isset($campos)) {\t\r\n\t\t$options = \" * \"; \t\r\n\t}else{\r\n\t\t# count campos set \r\n\t\tif (is_array($campos)){\r\n\t\t\t$options = implode(\",\", $campos); \r\n\t\t}\r\n\t}\r\n\r\n\t$where = \" 1 = 1\";\r\n\t\r\n\t#validate if $filter contain\r\n\t\r\n\tif(isset($filtro['RegionId'])){ $where .= \" AND RegionId = {$filtro['RegionId']} \"; } \r\n\tif(isset($filtro['CountryId'])){ $where .= \" AND CountryId = {$filtro['CountryId']} \"; } \r\n\tif(isset($filtro['Region'])){ $where .= \" AND Region = {$filtro['Region']} \"; } \r\n\tif(isset($filtro['Code'])){ $where .= \" AND Code = {$filtro['Code']} \"; } \r\n\tif(isset($filtro['ADM1Code'])){ $where .= \" AND ADM1Code = {$filtro['ADM1Code']} \"; } \r\n\t\r\n\t$sql = \" SELECT\t$options FROM load_regions WHERE $where\";\r\n\t\t\r\n\t// Call poiter to connect \r\n\t$db = new Database();\r\n\r\n\t$db->query($sql);\r\n\r\n\twhile($row = $db->fetchAssoc())\r\n\t{\r\n\t\t$data[] = $row;\r\n\t}\r\n\t$db->close();\r\n\treturn $data;\r\n\r\n}", "public function setFigureInRegions()\n {\n $grid_size = $this->grid->getSize() ;\n\n for($region=1; $region<=$grid_size; $region++) {\n $this->getEventManager()->trigger('log', $this, array('priority' => 'debug', 'message' => 'recherche dans la region ' . $region)) ;\n for($figure=1; $figure<=$grid_size; $figure++) {\n $array = $this->getFigureInRegion($region, $figure) ;\n if($this->isLastFigureInGroup($array)) {\n $this->grid->setFigure($array[0]->getRow(), $array[0]->getCol(), $figure) ;\n $this->getEventManager()->trigger('log', $this, array('priority' => 'debug', 'message' => 'case ' .$array[0]->getRow(). '.' .$array[0]->getCol(). ' : dernière option (reg) ' .$figure)) ;\n }\n } \n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Creates the directory and log file for error handling
public function __construct($log){ $directory = "log"; $logFileName = "log.txt"; $this->create_directory($log."/".$directory); // if(!($this->directory_found($log."/".$directory))){ // //$this->create_directory("log"); // } $this->fileName = $logFileName; $this->directoryName = $log."/".$directory; $this->fullFileLocation = $log."/".$directory."/".$logFileName; $this->errorLog = new ErrorFileHandler($this->directoryName); }
[ "public function createLogDirectory(): void\n {\n $this->files->ensureDirExists(VALET_HOME_PATH.'/Log', user());\n\n $this->files->touch(VALET_HOME_PATH.'/Log/nginx-error.log');\n }", "public static function createLogs() {\n touch(conf::pathBase() . '/logs/access.log');\n touch(conf::pathBase() . '/logs/error.log');\n }", "protected function createLogFile() {}", "private function init_log_dir()\n {\n $file_log_dir = dirname($this->log_path);\n\n // Check if Dir already exists, if not create using mkdir\n if (! is_dir($file_log_dir)) {\n mkdir($file_log_dir, 0777, true);\n\n // Builds a .htaccess file to prevent direct download\n $this->write_htaccess($file_log_dir);\n }\n }", "private function logError() {\n // Test if file is new //\n $new = file_exists($this->log_path) ? FALSE : TRUE;\n\n // Create logs dir if it doesn't already exist //\n if (!is_dir($this->log_dir)) {\n mkdir($this->log_dir, 0755);\n }\n\n // Write message to file //\n $handle = fopen($this->log_path, 'a');\n if ($handle) {\n foreach ($this->error_array as $key => $value) {\n fwrite($handle, $key . ': ' . $value . PHP_EOL);\n }\n fwrite($handle, '-------------------' . PHP_EOL);\n fclose($handle);\n if ($new) {\n chmod($this->log_path, 0755);\n }\n }\n }", "private function initLogFile(){\n if(!\\is_dir($this->getLogsDir())){\n $r = wp_mkdir_p($this->getLogsDir());\n if(!$r){\n $this->error('Unable to create logs directory: '.$this->getLogsDir());\n }else{\n if($this->verbose) \\WP_CLI::log('Logs directory created successfully: '.$this->getLogsDir());\n }\n }\n\n //Generating log file for the session\n $prefix = isset($this->logsFileName) ? $this->logsFileName.'-' : 'wwcsvimporter-logs-';\n $suffix = $this->useDateAndTimeInLogsFileSuffix ? (new \\DateTime())->format('Y-m-d_H-i') : (new \\DateTime())->format('Y-m-d');\n $logFile = $this->getLogsDir().'/'.$prefix.$suffix.'.log';\n $this->setLogfile($logFile);\n try{\n $fs = new Filesystem();\n if(!$fs->exists($logFile)){\n $fs->touch($this->getLogfile());\n }\n if($this->verbose) \\WP_CLI::log('Using log file: '.$logFile);\n }catch (\\Exception $e){\n if($this->verbose) \\WP_CLI::log('Unable to create the log file: '.$logFile);\n $this->skipLog = true;\n }\n }", "function _create_directory()\r\r\n {\r\r\n try {\r\r\n if (!is_dir($this->file_write_path)) {\r\r\n mkdir($this->file_write_path, 0777, true);\r\r\n }\r\r\n } catch (Exception $exception) {\r\r\n echo $exception->getMessage();\r\r\n }\r\r\n }", "function make_file_logger() {\n\t\t\n\t\t$path = owa_coreAPI::getSetting('base', 'error_log_file');\n\t\t//instantiate a a log file\n\t\t$conf = array('name' => 'debug_log', 'file_path' => $path);\n\t\t$this->loggers['file'] = owa_coreAPI::supportClassFactory( 'base', 'logFile', $conf );\n\t}", "private function initiateLog()\n\t{\n\t\tif (!is_file($this->logPath)) {\n\t\t\tif (!file_put_contents(\n\t\t\t\t\t$this->logPath,\n\t\t\t\t\t'[' . $this->getDate() . '] [INIT] [Initiating new log file.]' . PHP_EOL)\n\t\t\t) {\n\t\t\t\tthrow new \\LoggerException('Unable to create new log file ' . $this->logPath);\n\t\t\t}\n\t\t\tchmod($this->logPath, 0664);\n\t\t}\n\t}", "public static function logErrorsToFile()\n {\n ob_start(function() {});\n $logs = [];\n foreach (self::$logs as $log)\n {\n if ($log['type'] === 'ERROR' || $log['type'] === 'EXCEPTION')\n $logs[] = $log;\n }\n require(dirname(__DIR__) . DS . 'Layout' . DS . 'layout.logger_file.php');\n $contents = ob_get_clean();\n $file = Core::$logDir . DS . 'fwlog_errors.log';\n if (is_writable(dirname($file)))\n file_put_contents($file, $contents, FILE_APPEND);\n }", "private static function _initLogFile()\n {\n self::$_sFileLog = str_replace(DIRECTORY_SEPARATOR.'kernel'.DIRECTORY_SEPARATOR.'lib', '', __DIR__).DIRECTORY_SEPARATOR.\n \"data\".DIRECTORY_SEPARATOR.\"log\".DIRECTORY_SEPARATOR.\"php-error.log\";\n\n ini_set(\"log_errors\", 1);\n ini_set(\"error_log\", self::$_sFileLog);\n\n if (file_exists(self::$_sFileLog) === false) { file_put_contents(self::$_sFileLog, ''); }\n }", "protected function logException()\r\n\t{\r\n\t\t$dir_array \t\t= scandir( PATH_LOG );\r\n\t\t$filename \t\t= end( $dir_array );\r\n\r\n\t\tif( stristr( $filename, 'error' ) === false )\r\n\t\t{\r\n\t\t\t$filename = 'error1.log';\r\n\t\t}\r\n\r\n\t\tif ( file_exists( PATH_LOG . $filename ) )\r\n\t\t{\r\n\t\t\tif ( filesize( PATH_LOG . $filename ) > 1024000 )\r\n\t\t\t{\r\n\t\t\t\t$number = substr( $filename, 5, ( stripos( $filename, '.log' ) - 5 ) );\r\n\t\t\t\t$filename = 'error' . ++$number . '.log';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfile_put_contents( PATH_LOG . $filename, $this->parseException() . \"\\n\\n\", FILE_APPEND );\r\n\t}", "public static function logging_make_dir() {\n\t\tif( Logging::access_dir_exists() ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tmkdir( Logging::path() );\n\t\t\tchmod( Logging::path(), 0777 );\n\t\t\treturn false;\n\t\t}\n\t}", "protected function setLogfile() {\n if(!file_exists(DIR_TMP)){\n mkdir(DIR_TMP, 0777, true);\n }\n $this->logfile = DIR_TMP . AString::randString(null, 20);\n while(file_exists($this->logfile)){\n $this->logfile = DIR_TMP . AString::randString(null, 20);\n }\n }", "public function testCreateLogDirFailsToCreateDir()\n {\n $this->_spyErrorLog->enable();\n\n // deny write access to the root folder\n $this->_root->chmod(0555);\n\n $this->assertFalse($this->_root->hasChild('logs'));\n\n $logDir = $this->_root->url() . '/logs';\n\n // do not use the standard mock because it stubs out createLogDir\n $builder = new ContainerBuilder($this->_c);\n $this->assertFalse($builder->createLogDir($logDir));\n\n $this->assertFalse($this->_root->hasChild('logs'));\n\n $this->assertEquals(\n [\"Unable to create log directory: \" . $logDir],\n $this->_spyErrorLog->getInvocations()[0]->getArguments()\n );\n }", "function wlp_createLogFolder() {\r\n\t$error=false;\r\n\tif (!@is_dir (WLP_LOGPATH)) {\r\n\t\tif (!@mkdir (WLP_LOGPATH, 0777)) {\r\n\t\t\t$wlp_on_off=0;\r\n\t\t\tupdate_option('wlp_on_off', 0);\r\n\t\t\t$error=true;\r\n\t\t}\r\n\t}\r\n\r\n\t# check if log folder is writeable\r\n\tif (!@is_writable(WLP_LOGPATH) ) {\r\n\r\n\t\t# trying to set permissions\r\n\t\tif (!@chmod(WLP_LOGPATH, 0777)) {\r\n\t\t\t$wlp_on_off=0;\r\n\t\t\tupdate_option('wlp_on_off', 0);\r\n\t\t\t$error=true;\r\n\t\t}\r\n\t} else {\r\n\t\t# create empty index.html file to hide logs from browsing\r\n\t\t$emptyFile=WLP_LOGPATH.'index.html';\r\n\t\t$fileWrite = fopen($emptyFile, 'a');\r\n\t\tfclose($fileWrite);\r\n\t}\r\n\tif ($error) return false; else return true;\r\n}", "public function createLogFile() {\n\t\tif ( $this->debug ) {\n\t\t\techo \"In createLogFile\\n\";\n\t\t}\n\t\t\n\t\t\t// Check if we must create the file \n\t\t\t\n\t\t$mustCreate\t= false;\n\t\tif ( self::$curLogFile != \"\" ) {\n\t\t\tif ( $this->debug ) {\n\t\t\t\techo \"self::\\$curLogFile already set\\n\";\n\t\t\t}\n\n\t\t\t\t// Get the current date\n\n\t\t\t$curDateStr\t= date( \"Y_m_d\" );\n\t\t\tif ( $this->debug ) {\n\t\t\t\techo \"\\$curDateStr = [$curDateStr]\\n\";\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t// Check if the file already exists, and if the date is correct\n\t\t\t\t\n\t\t\tif ( file_exists( self::$curLogFile )) {\n\t\t\t\tif ( $this->debug ) {\n\t\t\t\t\techo \"File exists\\n\";\n\t\t\t\t}\n\t\t\t\t$fileDate\t= substr( self::$curLogFile, \n\t\t\t\t\t\t\t\t\t\tstrpos( self::$curLogFile, self::$logPrefix ) + strlen( self::$logPrefix ),\n\t\t\t\t\t\t\t\t\t\t10 );\n\t\t\t\tif ( $this->debug ) {\n\t\t\t\t\techo \"\\$fileDate = [$fileDate]\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( strcmp( $fileDate, $curDateStr ) != 0 ) {\n\t\t\t\t\t$mustCreate\t= true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( $this->debug ) {\n\t\t\t\t\techo \"File not found\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t// Check if the name we have can be used\n\n\t\t\t\tif ( strcmp( $curDateStr, self::$logDate ) != 0 ) {\n\t\t\t\t\t$mustCreate\t= true;\t\t\t\t\t\t\t\t\t// No, name is not correct date\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$mustCreate\t= true;\n\t\t}\n\t\tif ( $this->debug ) {\n\t\t\techo \"\\$mustCreate = [\" . ( $mustCreate ? \"true\" : \"false\" ) . \"]\\n\";\n\t\t}\n\t\t\n\t\t\t// Check if we must create it\t\t\n\n\t\tif ( $mustCreate ) {\n\t\t\tself::$logDate\t\t= date( \"Y_m_d\" );\t\t\t\t\t\t// Always save the date we create\n\t\t\tself::$curLogFile\t= $_SERVER[ \"DOCUMENT_ROOT\" ] . \n\t\t\t\t\t\t\t\t\tself::$logDir . \n\t\t\t\t\t\t\t\t\tself::$curLogFile .\n\t\t\t\t\t\t\t\t\tself::$logPrefix . date( \"Y_m_d\" ) . self::$logSuffix;\n\t\t} else {\n\t\t\tif ( $this->debug ) {\n\t\t\t\techo \"curLogFile already set\\n\";\n\t\t\t}\n\t\t}\n\t\tif ( $this->debug ) {\n\t\t\techo \"self::\\$curLogFile = [\" . self::$curLogFile . \"]\\n\";\n\t\t}\n\t\t\n\t\t\t// Check again if the file already exists, we may have created a new name\n\t\n\t\tif ( !file_exists( self::$curLogFile )) {\n\t\t\tif ( $this->debug ) {\n\t\t\t\techo \"This is a new log file\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t$logStamp\t= str_replace( \"{date}\", date( \"m/d/Y\" ), self::$logStamp );\n\t\t\t$logStamp\t= str_replace( \"{time}\", date( \"H:i:s\" ), $logStamp );\n\t\t\t$logStamp\t= str_replace( \"{machine}\", getenv( \"COMPUTERNAME\" ), $logStamp );\n\t\t\t\n\t\t\terror_log( $logStamp, 3, self::$curLogFile );\t\t\t// Stamp the file with a header\n\t\t} else {\n\t\t\tif ( $this->debug ) {\n\t\t\t\techo \"Using existing file\\n\";\n\t\t\t}\n\t\t}\n\t}", "private function _prepare() {\n\t\t\n\t\t$today = date( SimpleConfigs::LOG_FILE_DATE_FORMAT );\n\t\t$log_file_name = $today . SimpleConfigs::LOG_FILE_FORMAT;\n\t\t$log_file = SimpleConfigs::LOG_FILE_FOLDER . DIRECTORY_SEPARATOR . $log_file_name;\n\t\t\n\t\tif ( ! file_exists( SimpleConfigs::LOG_FILE_FOLDER ) ) {\n\t\t\tmkdir( SimpleConfigs::LOG_FILE_FOLDER . DIRECTORY_SEPARATOR );\n\t\t}\n\t\t\n\t\tif ( ! file_exists( $log_file ) ) {\n\t\t\t$this->_setLogFile( $log_file );\n\t\t} else {\n\t\t\t$this->_log_file = $log_file;\n\t\t}\n\t\t\n\t}", "private function writeToFile(): void {\r\n\r\n //Check if error log directory has been set\r\n if(null === $this -> directory) {\r\n throw new BadMethodCallException('Error needs to be written to a log file but no error log directory has been set. Set the error log directory with the \"setLogDirectory()\" method');\r\n }\r\n\r\n $logger = $this -> getLogger();\r\n $logger -> setDirectory($this -> directory);\r\n\r\n $error = $this -> error -> toJson($this -> options['types']);\r\n\r\n if(false === $error) {\r\n\r\n $this -> error -> setContext(null);\r\n $this -> error -> setBacktrace(null);\r\n }\r\n\r\n $logger -> write($error);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case for gETMarketIdAttachments Retrieve the attachments associated to the market.
public function testGETMarketIdAttachments() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
[ "public function testGETInventoryModelIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGETGiftCardRecipientIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGETGiftCardIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGETOrderIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGETShipmentIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGETReturnIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGETSkuIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function gETPriceIdAttachmentsRequest($price_id)\n {\n // verify the required parameter 'price_id' is set\n if ($price_id === null || (is_array($price_id) && count($price_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $price_id when calling gETPriceIdAttachments'\n );\n }\n\n $resourcePath = '/prices/{priceId}/attachments';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($price_id !== null) {\n $resourcePath = str_replace(\n '{' . 'priceId' . '}',\n ObjectSerializer::toPathValue($price_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testGETExternalPromotionIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function gETMarketIdAttachmentsAsync($market_id)\n {\n return $this->gETMarketIdAttachmentsAsyncWithHttpInfo($market_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function getAttachments()\n {\n return (new CatchZohoCRM($this->token, 'Attachments'))\n ->getRelatedRecords($this->recordType, $this->checkId())->getRecordDetails();\n }", "public function getAttachments()\n {\n return $this->getMedia(\"attachment\");\n }", "public function get_attachments($attachments, $get_by_id = FALSE, $attach_details = TRUE)\n {\n if(!$get_by_id)\n {\n for ($i = 0, $count = count($attachments); $i < $count; $i++) \n { \n if($attachments[$i]['entity'] == 'political_party')\n {\n $attachments[$i]['entity_name'] = $this->political_party_model->get_political_party_by_id($attachments[$i]['entity_id'], FALSE, TRUE);\n }\n if($attachments[$i]['entity'] == 'politician')\n {\n $attachments[$i]['entity_name'] = $this->politician_model->get_politician_by_id($attachments[$i]['entity_id'], FALSE,array() , TRUE);\n }\n\n // TRUE is passed\n $attachments[$i]['user_details'] = $this->user_model->get_user_by_id($attachments[$i]['posted_by'], FALSE, array('full_name')); \n }\n }\n else\n {\n $attachments = call_user_func_array('array_merge', $attachments);\n $attachments['user_details'] = $this->user_model->get_user_by_id($attachments['posted_by'], FALSE, array('full_name')); \n // $attachments['posted_time_24hrs'] = $this->format_columned_time();\n }\n return $attachments;\n }", "function get_attachments($id)\n\t{\n\t\t$id = (int)$id;\n\n\t\t$this->db->from('attachments')->where('article_id', $id);\n\n\t\t$query = $this->db->get();\n\n\t\tif ($query->num_rows() == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$data = $query->result_array();\n\n\t\t$i = 0;\n\t\tforeach ($data as $item)\n\t\t{\n\t\t\t$data[$i]['download_path'] = 'uploads/'.$id.'/'.$item['attach_file'];\n\t\t\t$i++;\n\t\t}\n\t\t$query->free_result();\n\n\t\treturn $data;\n\t}", "public function getAttachments()\n {\n return (isset($this->_metadata['_attachments']) ? $this->_metadata['_attachments'] : array());\n }", "public function getAttachments($ticketId)\r\n\t{\r\n\t\t$response = $this->client->request('GET', 'projects/'.$this->projectId.'/tickets/'.$ticketId.'/attachments/')->getBody()->getContents();\r\n\t\t$xml = new \\SimpleXMLElement($response);\r\n\t\tforeach ($xml->attachment as $attachment) {\r\n\t\t\techo '<br>-------------------------------------------------------';\r\n\t\t\techo '<br>-------------------------------------------------------';\r\n\t\t\techo '<br>(Ticket ID: ' . $attachment->{'parent-id'} . ')';\r\n\t\t\techo '<br>(Project ID: ' . $attachment->{'project-id'} . ')';\r\n\t\t\techo '<br>(Attachment ID: ' . $attachment->{'id'} . ')';\r\n\t\t\techo '<br>(File name: ' . $attachment->{'filename'} . ')';\r\n\t\t\techo '<br>(File size: ' . $attachment->{'size'} . ')';\r\n\t\t\techo '<br>-------------------------------------------------------';\r\n\t\t\techo '<br>Created: ' . $attachment->{'created-at'};\r\n\t\t\techo '<br>Last mod: ' . $attachment->{'updated-at'};\r\n\t\t\techo '<br>-------------------------------------------------------';\r\n\t\t\techo '<br>-------------------------------------------------------<br>';\r\n\t\t}\t\r\n\t}", "public function getAttachments()\n {\n return isset($this->data['attachments']) ? $this->data['attachments'] : [];\n }", "public function gETParcelIdAttachmentsRequest($parcel_id)\n {\n // verify the required parameter 'parcel_id' is set\n if ($parcel_id === null || (is_array($parcel_id) && count($parcel_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $parcel_id when calling gETParcelIdAttachments'\n );\n }\n\n $resourcePath = '/parcels/{parcelId}/attachments';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($parcel_id !== null) {\n $resourcePath = str_replace(\n '{' . 'parcelId' . '}',\n ObjectSerializer::toPathValue($parcel_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getEditorAttachments(array $editor_ids);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Is last rebuild arena date available ?
public function isLastRebuildDateAvailable() { $node = $this->getXml()->getElementsByTagName('RebuiltDate'); if ($node !== null && $node->length) { return strtolower($this->getXml()->getElementsByTagName('RebuiltDate')->item(0)->getAttribute('Available')) == 'true'; } return false; }
[ "public function isLastRebuildDateAvailable()\n\t{\n\t\tif(!isset($this->lastRebuildDateAvailable) || $this->lastRebuildDateAvailable === null)\n\t\t{\n\t\t\t$node = $this->getXml()->getElementsByTagName('RebuiltDate');\n\t\t\tif($node !== null && $node->length)\n\t\t\t{\n\t\t\t\t$this->lastRebuildDateAvailable = strtolower($this->getXml()->getElementsByTagName('RebuiltDate')->item(0)->getAttribute('Available')) == 'true';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->lastRebuildDateAvailable = false;\n\t\t\t}\n\t\t}\n\t\treturn $this->lastRebuildDateAvailable;\n\t}", "public function isLastRebuildDateAvailable()\r\n\t{\r\n\t\tif(!isset($this->lastRebuildDateAvailable) || $this->lastRebuildDateAvailable === null)\r\n\t\t{\r\n\t\t\t$node = $this->getXml()->getElementsByTagName('RebuiltDate');\r\n\t\t\tif($node !== null && $node->length)\r\n\t\t\t{\r\n\t\t\t\t$this->lastRebuildDateAvailable = strtolower($this->getXml()->getElementsByTagName('RebuiltDate')->item(0)->getAttribute('Available')) == 'true';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->lastRebuildDateAvailable = self::UNAVAILABLE ;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($this->lastRebuildDateAvailable === self::UNAVAILABLE )\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn $this->lastRebuildDateAvailable;\r\n\t}", "function isMarketplaceUpdateRequired()\n\t{\n\t\t$result_build_date = execQuery('SELECT_SETTINGS_PARAM_BASE_INFO',array('group_name' => 'MARKETPLACE_LAST_BUILD_DATE', 'param_name' => 'MARKETPLACE_LAST_BUILD_DATE'));\n\n\t\t$result_ttl = execQuery('SELECT_SETTINGS_PARAM_BASE_INFO',array('group_name' => 'MARKETPLACE_TTL', 'param_name' => 'MARKETPLACE_TTL'));\n\n\t\t$ttl = '+'.$result_ttl[0]['param_current_value'].' minutes';\n\n\t\t$buildDate = $result_build_date[0]['param_current_value'];\n\n\t\t$xmlExpireTime = strtotime($ttl,$buildDate);\n\t\treturn $xmlExpireTime <= time() ? true : false;\n\t}", "function is_future(): bool {\r\n\t\treturn $this->dt > JKNTime::dt_now();\r\n }", "private function _getLastBuildDate() {\n\t\tif( file_exists( $this->lastBuildFile ) ) {\n\t\t\treturn file_get_contents( $this->lastBuildFile );\n\t\t} else {\n\t\t\treturn $this->_calcLastBuildDate( );\n\t\t}\n\t}", "public function isBuilt()\r\n\t{\r\n\t\treturn ($this->dbMap !== null);\r\n\t}", "public function isLastBuildSuccessful()\n {\n return $this->getLastBuild() === $this->getLastSuccessfulBuild();\n }", "public function isInstanceOutdated()\n\t{\n\t\t$version_info = $this->getLatestVersion();\n\n\t\tif (DP_BUILD_TIME < $version_info['build']) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isBuilt()\n\t{\n\t\treturn ($this->dbMap !== null);\n\t}", "public function isBuilt()\n {\n return ($this->dbMap !== null);\n }", "private function _checkDatabaseNeedsUpdate()\n {\n\n if( file_exists( $this->_databasePath ) ){\n $path = $this->_modulePath . \"/\" . self::GEOIP_DATABASE_PATH;\n //Get creation date of cached database\n $cachedDatabaseUpdateTime = @filemtime( $path );\n\n //Get the timestamp for the first Wednesday of the current month..\n $currentDateTime = new DateTime();\n $monthAndYearAsString = $currentDateTime->format( 'F Y');\n $databaseUpdateDay = new DateTime( 'first wednesday of ' . $monthAndYearAsString );\n $databaseUpdateTime = $databaseUpdateDay->getTimestamp();\n\n //If the cached db is older than the updatetime?\n return ( $databaseUpdateTime > $cachedDatabaseUpdateTime ) ? true : false ;\n }\n return true;\n }", "public function hasLastTimeUsed()\n {\n return $this->last_time_used !== null;\n }", "static function DatabaseIsUpToDate()\r\n {\r\n $cur = CreateDatabase::CurrentDbVersion();\r\n $latest = CreateDatabase::LatestDbVersion();\r\n return $cur == $latest;\r\n }", "function check_config_changed()\n {\n global $emu_config_modified_timestamp;\n\n $script_last_ran = sql_value('SELECT `value` FROM sysvars WHERE name = \"last_emu_import\"', '');\n\n if('' == $script_last_ran)\n {\n return true;\n }\n\n $emu_script_last_ran = strtotime($script_last_ran);\n\n if($emu_config_modified_timestamp > $emu_script_last_ran)\n {\n return true;\n }\n\n return false;\n }", "function isNeeded()\n {\n return !file_exists($this->name)\n or $this->getTimestamp() > filemtime($this->name);\n }", "public function CheckCacheDates () {\n\n if ($this->aDailyStatus [\"refreshedDate\"] == $this->aDailyStatus_cached [\"refreshedDate\"]) {\n return false;\n } else {\n return true;\n }\n\n }", "private function _calcLastBuildDate( ) {\n\t\t$feed = $this->_getFeed();\n\t\t\n\t\t$lastBuildDate \t= date('Ymd-His', strtotime( $feed->channel->lastBuildDate ) );\n\t\t\n\t\t$fh = fopen( $this->lastBuildFile, 'w');\n\t\tfwrite( $fh, $lastBuildDate ); \n\t\tfclose( $fh );\n\t\t\n\t\treturn $lastBuildDate;\n\t}", "function is_update_version() {\n return $this->version['stage'] <= self::latest_stage;\n }", "private function isClosedJob() {\n $deadlineTime = new DrupalDateTime($this->job->field_deadline_to_apply->value, 'UTC');\n $deadlineTime = $deadlineTime->getTimestamp();\n $currentTime = new DrupalDateTime();\n $currentTime = $currentTime->getTimestamp();\n return ($deadlineTime < $currentTime) ? TRUE : FALSE;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new direcciones entity.
public function newAction(Request $request) { $direccione = new direcciones(); $form = $this->createForm('AppBundle\Form\direccionesType', $direccione); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($direccione); $em->flush(); return $this->redirectToRoute('direcciones_show', array('id' => $direccione->getId())); } return $this->render('direcciones/new.html.twig', array( 'direccione' => $direccione, 'form' => $form->createView(), )); }
[ "public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"proveedores_direcciones\",\n \"action\" => \"index\"\n ));\n }\n\n $proveedores_direccione = new ProveedoresDirecciones();\n\n $proveedores_direccione->proveedor_direccion_id = $this->request->getPost(\"proveedor_direccion_id\");\n $proveedores_direccione->proveedor_id = $this->request->getPost(\"proveedor_id\");\n $proveedores_direccione->direccion_id = $this->request->getPost(\"direccion_id\");\n \n\n if (!$proveedores_direccione->save()) {\n foreach ($proveedores_direccione->getMessages() as $message) {\n $this->flash->error($message);\n }\n return $this->dispatcher->forward(array(\n \"controller\" => \"proveedores_direcciones\",\n \"action\" => \"new\"\n ));\n }\n\n $this->flash->success(\"proveedores_direccione was created successfully\");\n return $this->dispatcher->forward(array(\n \"controller\" => \"proveedores_direcciones\",\n \"action\" => \"index\"\n ));\n\n }", "public function createAction()\n {\n $entity = new CentreSante();\n $request = $this->getRequest();\n $form = $this->createForm(new CentreSanteType(), $entity);\n $form->bindRequest($request);\n\n\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('centresante_show', array('id' => $entity->getId())));\n \n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function createAction()\n {\n $entity = new Directors();\n $form = $this->get('cinhetic_public.manager_directors')->createForm($entity);\n\n if($this->get('cinhetic_public.manager_directors')->validation($form, $entity) === true){\n $this->setMessage(\"Le réalisateur a été crée\");\n return $this->redirect($this->generateUrl('directors'));\n }\n\n return $this->render('CinheticPublicBundle:Directors:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function createAction()\n {\n $entity = new Asociados();\n $request = $this->getRequest();\n $form = $this->createForm(new AsociadosType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('asociados_show', array('id' => $entity->getId())));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "static public function insertarDireccion($datosDireccion)\n\t\t{\n\t\t\t$CI = &get_instance();\n\t\t\t// Calle::buscarCalle -> Si no existe se crea la calle\n\t\t\t$callePrincipal = Calle::buscarCalle($datosDireccion->callePrincipal);\n\t\t\t$calleSecundariaA = Calle::buscarCalle($datosDireccion->calleSecundariaA);\n\t\t\t$calleSecundariaB = Calle::buscarCalle($datosDireccion->calleSecundariaB);\n\t\t\t$direccion = new Direccion();\n\t\t\ttry {\n\t\t\t\t$buscar = new stdClass();\n\t\t\t\t$buscar->idCallePrincipal = $callePrincipal->id;\n\t\t\t\t$buscar->idCalleSecundariaA = $calleSecundariaA->id;\n\t\t\t\t$buscar->idCalleSecundariaB = $calleSecundariaB->id;\n\t\t\t\t$buscar->altura = $datosDireccion->altura;\n\t\t\t\tif ($datosDireccion->altura < 0) {\n\t\t\t\t\t$buscar->altura = $datosDireccion->rangoEstimado1;\n\t\t\t\t}else{\n\t\t\t\t\t$buscar->altura = $datosDireccion->altura;\n\t\t\t\t}\n\t\t\t\t//AGREGADO RODRIGO\n\t\t\t\tlog_message('debug', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');\n\t\t\t\tlog_message('debug', \"$datosDireccion->rangoEstimado1\");\n\t\t\t\t$buscar->rangoestimado1 = $datosDireccion->rangoEstimado1;\n\t\t\t\t$buscar->rangoestimado2 = $datosDireccion->rangoEstimado2;\n\t\t\t\t$datos = $CI->DireccionModelo->get_by($buscar);\n\t\t\t\t$direccion->inicializar($datos);\n\t\t\t\tlog_message('debug',\"Inicializando direccion guardada anteriormente... \");\n\t\t\t} catch (MY_BdExcepcion $e) {\n\t\t\t\tlog_message('debug',\"Excepcion en Direccion.insertarDireccion().Insertando nuevo elemento direccion en BD...\");\n\t\t\t\tif ($datosDireccion->altura < 0) {\n\t\t\t\t\t$direccion->altura = $datosDireccion->rangoEstimado1;\n\t\t\t\t}else{\n\t\t\t\t\t$direccion->altura = $datosDireccion->altura;\n\t\t\t\t}\n\t\t\t\t//AGREGADO RODRIGO\n\t\t\t\t$direccion->rangoestimado1 = $datosDireccion->rangoEstimado1;\n\t\t\t\t$direccion->rangoestimado2 = $datosDireccion->rangoEstimado2;\n\t\t\t\t$direccion->callePrincipal = $callePrincipal;\n\t\t\t\t$direccion->calleSecundariaA = $calleSecundariaA;\n\t\t\t\t$direccion->calleSecundariaB = $calleSecundariaB;\n\t\t\t\t$direccion->id = $direccion->save();\n\t\t\t}finally{\n\t\t\t\treturn $direccion;\n\t\t\t}\n\n\t\t}", "public function createAction()\n {\n $entity = new EcoleClasse();\n $request = $this->getRequest();\n $form = $this->createForm(new EcoleClasseType(), $entity);\n $form->bindRequest($request);\n\n\t\t\t\t//TODO \n\t\t\t\t//create empty classes avec la valeur AD par défaut\n\t\t\t\t//send notification to the directror\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n\n\t\t\t\t\t\t$classesCount = $entity->getClassesCount();\n\t\t\t\t $anneeScolaire = $entity->getAnneeScolaire();\n\t\t\t\t $ecole = $entity->getEcole();\n\t\t\t\t for($i = 0; $i < $classesCount; $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t $classe = new Classe();\n\t\t\t\t\t\t $classe->setEcole($ecole);\n\t\t\t\t\t\t $classe->setNomClasse('Classe ' . $i);\n\t\t\t\t\t\t $classe->setAnneeScolaire($anneeScolaire);\n\t\t\t\t\t $em->persist($classe);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n $em->flush();\n \n $this->get('session')->setFlash('notice', 'EcoleClasse a été créé avec succès');\n\n return $this->redirect($this->generateUrl('ecoleclasse_show', array('id' => $entity->getId())));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function createAction()\n {\n $entity = new Tribunal();\n $request = $this->getRequest();\n $form = $this->createForm(new TribunalType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $entity->setHabilitado(true);\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('tribunal_show', array('id' => $entity->getId(),\n 'status' => $this->container->getParameter('EXITO_REGISTRO'),)));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'status' => $this->container->getParameter('FALLO_REGISTRO'),\n );\n }", "public function createAction()\n {\n $entity = new EnfantTiteur();\n $request = $this->getRequest();\n $form = $this->createForm(new EnfantTiteurType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\t\t\t$this->get('session')->setFlash('notice', 'Enfant titeur a été ajouté avec succès');\n\n return $this->redirect($this->generateUrl('enfanttiteur_show', array('id' => $entity->getId())));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function createAction()\n {\n $entity = new Carpeta();\n $request = $this->getRequest();\n $form = $this->createForm(new CarpetaType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('carpeta_show', array('id' => $entity->getId())));\n \n }\n\n /*\n $em = $this->getDoctrine()->getEntityManager();\n $repository=$em->getRepository('IamSoftAndrethaBundle:Carpeta');\n if ($entity->getNumeroReferencia()==0 || $entity->getNumeroReferencia()==null)\n\t $entity->setNumeroReferencia(\n\t \t$repository->getMaxNumeroReferencia(\n\t \t\t$entity->getTipoCarpeta()) + 1);\n\t \t\t*/\n \n return $this->render('IamSoftAndrethaBundle:Carpeta:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function createAction()\r\n\t{\r\n\t\t$entity = new Contenu();\r\n\t\t$request = $this->getRequest();\r\n\t\t$form = $this->createForm(new ContenuType(), $entity);\r\n\t\t$form->bindRequest($request);\r\n\r\n\t\tif ($form->isValid()) {\r\n\t\t\t$em = $this->getDoctrine()->getEntityManager();\r\n\t\t\t$em->persist($entity);\r\n\t\t\t$em->flush();\r\n\r\n\t\t\treturn $this->redirect($this->generateUrl('contenu_show', array('id' => $entity->getId())));\r\n\r\n\t\t}\r\n\r\n\t\treturn $this->render('ExodPortfolioBundle:Contenu:new.html.twig', array(\r\n\t\t\t\t'entity' => $entity,\r\n\t\t\t\t'form' => $form->createView()\r\n\t\t));\r\n\t}", "public function createAction(Request $request)\n {\n\n $em = $this->getDoctrine()->getManager();\n\n //L'utilisateur est nécessaire afin de récupérer ls service dans lequel il se situe\n $user = $this->getUser();\n\n $entreprises = $em->getRepository('MairieVoreppeDemandeTravauxBundle:Entreprise')->getEntreprisePrestataire();\n\n $entity = new DemandeIntentionCT();\n\n $form = $this->createCreateForm($entity, null, $user, $entreprises);\n\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n \n if(count($entity->getAdresses()) > 0) \n {\n foreach($entity->getAdresses() as $uneAdresse)\n {\n $uneAdresse->setTravaux($entity);\n $em->persist($uneAdresse);\n }\n }\n \n //On persist le travaux au travers de la relation avec l'utilisateur\n $user->addTravaux($entity);\n $em->persist($entity);\n\n $em->flush();\n\n return $this->redirect($this->generateUrl('demandeintentionct_show', array('id' => $entity->getId())));\n }\n\n return $this->render('MairieVoreppeDemandeTravauxBundle:DemandeIntentionCT:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function createAction()\n {\n $entity = new AuditorioDia();\n $request = $this->getRequest();\n $form = $this->createForm(new AuditorioDiaType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('auditoriodia_show', array('id' => $entity->getId())));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function createEntity();", "public function createAction()\n {\n $entity = new Categoria();\n $request = $this->getRequest();\n $form = $this->createForm(new CategoriaType(), $entity);\n $form->bindRequest($request);\n \n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n $this->get(\"session\")->setFlash('success',\"Categoria registrada.\");\n return $this->redirect($this->generateUrl('categoriaHome'));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function create()\n\t{\n\t\t$this->auth->restrict('Departements.Content.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_departements())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\t$this->activity_model->log_activity($this->current_user->id, lang('departements_act_create_record').': ' . $insert_id . ' : ' . $this->input->ip_address(), 'departements');\n\n\t\t\t\tTemplate::set_message(lang('departements_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/content/departements');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('departements_create_failure') . $this->departements_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('departements', 'departements.js');\n\n\t\tTemplate::set('toolbar_title', lang('departements'));\n\t\tTemplate::render();\n\t}", "public function createAction()\n {\n $entity = new Direction();\n $request = $this->getRequest();\n $form = $this->createForm(new DirectionType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('direction_show', array('id' => $entity->getId())));\n \n }\n\n return $this->render('cnctfacpBundle:Direction:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function createAction(Request $request)\r\n {\r\n $edl = new DataLegal();\r\n $data = $request->get('sunahip_centrohipicobundle');\r\n if(isset($data['partner']))\r\n {\r\n $fdl = $this->createCreateSocio($edl);\r\n }else\r\n $fdl = $this->createCreateFDL($edl);\r\n\r\n $fdl->handleRequest($request);\r\n\r\n if (/*$fdch->isValid() &&*/ $fdl->isValid()) {\r\n $em = $this->getDoctrine()->getManager();\r\n $user= $this->getUser();\r\n\r\n if(isset($data['partner']))\r\n {\r\n $parent = $em->getRepository(\"CentrohipicoBundle:DataLegal\")->findOneBy(array('usuario'=> $user->getId()));\r\n $edl->setPadre($parent);\r\n $url = $this->generateUrl('datacentrohipico_list_partner');\r\n }else\r\n $url = $this->generateUrl('datacentrohipico_list');\r\n\r\n // Datos Legales\r\n $edl->setFechaRegistro(new \\DateTime());\r\n $edl->setStatus(\"Pendiente\");\r\n $edl->setUsuario($user);\r\n $edl->setCiudad(strtoupper($edl->getCiudad()));\r\n $edl->setIsSocio(false);\r\n /*Persiste*/\r\n $em->persist($edl);\r\n $em->flush();\r\n return $this->redirect($url);\r\n }\r\n\r\n return $this->render('CentrohipicoBundle:DataCentrohipico:new.html.twig', array(\r\n 'fdl' => $fdl->createView()\r\n ));\r\n }", "function create() {\n\t\t\n\t\ttry {\n\t\t\n\t\t\tif (!$this->PermisosComponent->puedeEditar('gastos', 'create'))\n\t\t\t\tthrow new ForbiddenException('No tiene permiso para crear un gasto.'); \n\n\n\t\t\t$params = (isset($_POST))? $_POST : array();\n\t\n\t\t\t// Campos obligatorios\n\t\t\tif (!$this->parametrosRequeridosEn(array('created', 'categoria','monto', 'FP'), $params))\n\t\t\t\tthrow new BadRequestException('Los datos del gasto están incompletos'); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t$gasto = array(\n\t\t\t\t'created'=>$params['created'],\n\t\t\t\t'descripcion'=>$params['descripcion'],\n\t\t\t\t'FP'=>$params['FP'],\n\t\t\t\t'categorias_id'=>$params['categoria']['id'],\n\t\t\t\t'monto'=>$params['monto']);\n\t\t\t\n\t\t\t\n\t\t\t$res = $this->Gastos->setGasto($gasto);\n\t\n\t\t\tif(!($res['success'])){\n\t\t\t\tthrow new BadRequestException($res['msg']);\n\t\t\t}\n\t\t\t\n\t\t\t// Retorna la info de la venta creada\n\t\t\t$gasto['id'] = $res['gasto']['id'];\n\t\t\t$gasto['categoria'] = $params['categoria']['nombre'];\n\t\t\techo $this->json('Gasto', $gasto);\n\t\t\t\n\n\t\t} catch (Exception $e) {\t\n\n\t\t\tif ($e instanceof RequestException) \n\t\t\t\techo $this->json( $e->getMsg(), $e->getData(), $e->getSatusCode() );\n\t\t}\t\n\t}", "public function createAction(Request $request) {\n $entity = new CDeudas();\n $em = $this->getDoctrine()->getManager();\n $form = new CDeudasType();\n\n $data = $request->get('planillas_id');\n\n\n if (isset($data['id']) && !empty($data['id'])) {\n $entity = $em->getRepository('PlanillasCoreBundle:CDeudas')->find($data['id']);\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find CDeudas entity.');\n } else {\n\n\n $form = $this->createEditForm($entity);\n }\n } else {\n //$entity->setMontoRestante(0);\n $form = $this->createCreateForm($entity);\n }\n $form->handleRequest($request);\n if ($form->isValid()) {\n\n if ($entity->getPagado() == 1) {\n $entity->setMontoRestante(0);\n }\n $em->persist($entity);\n $em->flush();\n //poner un mensaje flash\n $this->get('session')->getFlashBag()->add('info', 'Los datos han sido guardados correctamente');\n return $this->redirect($this->generateUrl('cdeudas'));\n }\n\n $this->get('session')->getFlashBag()->add('danger', 'No se pudieron guardar los datos');\n return $this->redirect($this->generateUrl('cdeudas'));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
displaytype can be edit,display, or displayro bk: NOTE: might be a good idea to create a class to use for the layers
function display($displaytype) { global $SESSION; require_once("{$this->cfg->libdir}/smarty/Smarty.class.php"); // ******************************************************************* // prepare and display the positioning board // ******************************************************************* $id = $this->id; $courseid = $this->courseid; $cmid = $this->cmid; $returnurl = $this->returnurl; $question = $this->question; $background = $question->options->backgroundmedia; $mediaobjects = $this->question->options->media; $freestyle = $question->options->freestyle ? 1 : 0; $isreview = ($displaytype == 'displayro'); $backgroundname = 'background'.$background->id; $background->mediatag = $this->dragdrop_tag($question->id, $background, $backgroundname); // the images or media files will be presented on layers. // there are two sets of layers - the hotspot layers, used for positioning the hotspots, // and the display layers, which are used to display the media files in their actual size // In addition, there are container layers, that hold the display layers. // set up the arrays of information about the gap images, $displaylayers = array(); $setformfields = array(); $sethotspots = array(); $setcontainers = array(); $imageborderwidth=0; $mediaborderwidth=2; // flash movies, for one, grab the mouse on mouseover, so an (invisible) border is used for the container $i = 0; $maxheight = 0; $this->evaluate_responses($mediaobjects); $responses = $this->responses; foreach ($mediaobjects as $media) { $mediahotspot = $media->hotspots[$media->primary_hotspot]; $suffix = "{$this->dragdropqcount}_$i"; $container = "container$suffix"; $hotspot = "hotspot$suffix"; $isimage = $this->is_image($media->media); $maxheight = max($maxheight, ($media->displayheight > 0 ? $media->displayheight : $media->height)); $displayname = "gapimage$suffix"; $displaylayers[$i]['tag'] = $this->dragdrop_tag($question->id, $media, $displayname, !$isimage); $displaylayers[$i]['name'] = $displayname; $displaylayers[$i]['id'] = $displayname; $displaylayers[$i]['text'] = $media->questiontext; $displaylayers[$i]['key'] = $media->id; $displaylayers[$i]['width'] = $media->displaywidth ? $media->displaywidth : $media->width; $displaylayers[$i]['height'] = $media->displayheight ? $media->displayheight : $media->height; $displaylayers[$i]['targetx'] = $media->targetx; $displaylayers[$i]['targety'] = $media->targety; if ($displaytype == 'edit') { // hotspot tag and id $sethotspots[$i]['tag'] = '<img src="transparentpixel.gif" id="'. $hotspot . '" title="'. $hotspot . '" style="position:absolute; border:solid red 2px; z-index:99;">'; $sethotspots[$i]['id'] = $hotspot; // size the hotspots $hotspotWidth = 0; $hotspotHeight = 0; if ($mediahotspot->width == 0 && $mediahotspot->height == 0) { $hotspotWidth = floor($media->width / 2); $hotspotHeight = floor($media->height / 2); } else { $hotspotWidth = $mediahotspot->width; $hotspotHeight = $mediahotspot->height; } $sethotspots[$i]['width'] = $hotspotWidth; $sethotspots[$i]['height'] = $hotspotHeight; //position the hotspots $hotspotX = 0; $hotspotY = 0; if ($mediahotspot->x == 0 && $mediahotspot->y == 0 && $mediahotspot->width == 0 && $mediahotspot->height == 0) { //$hotspotX = floor($media->width / 4); //$hotspotY = floor($media->height / 4); $hotspotX = -1; $hotspotY = -1; } else { $hotspotX = $mediahotspot->x; $hotspotY = $mediahotspot->y; } $sethotspots[$i]['x'] = $hotspotX; $sethotspots[$i]['y'] = $hotspotY; } else { $formid = $question->name_prefix.$media->id; // added by harry - beginn // every javascript object knows about his response forms $displaylayers[$i]['responseFormId'] = $formid; // added by harry - end if (isset($this->responses[$media->id])) { $resp = $this->responses[$media->id]; $position = "{$resp->x},{$resp->y},{$resp->width},{$resp->height}"; } else { $position = ''; } //hw: in a review the formfields are nonamed to prevent bad guys from changing the values... if ($isreview) { $draggable = '+NO_DRAG'; $setformfields[] = "<input id=\"$formid\" type=\"hidden\" value=\"$position\" />"; } else { $draggable = ''; $setformfields[] = "<input id=\"$formid\" type=\"hidden\" name=\"$formid\" value=\"$position\" />"; } } $i++; } $gapcount = count($displaylayers); if ($displaytype == 'edit') { $template = 'dragdroparrange.tpl'; } else { $template = 'dragdropshow.tpl'; } // create the page using a template $smarty =& $this->init_smarty("{$this->cfg->dirroot}/question/type/dragdrop/templates"); if ($displaytype == 'edit') $smarty->assign('yuilibs', $this->get_arrange_tpl_yui_libs()); else $smarty->assign('yuilibs', $this->get_view_tpl_yui_libs()); $smarty->assign('title', get_string('dragdroparrange', 'qtype_dragdrop')); $smarty->assign('formaction', $_SERVER['PHP_SELF']); $smarty->assign('id', $id); $smarty->assign('courseid', $courseid); $smarty->assign('cmid', $cmid); $smarty->assign('returnurl', $returnurl); $smarty->assign('gapimages', $displaylayers); $smarty->assign('question', $question); $smarty->assign('background', $background); $smarty->assign('sethotspots', $sethotspots); $smarty->assign('gapcount', $gapcount); $smarty->assign('submitsavereturn', get_string('savereturn', 'qtype_dragdrop')); $smarty->assign('submitsavecontinue', get_string('savecontinue', 'qtype_dragdrop')); $smarty->assign('submitcancel', get_string('cancel')); $smarty->assign('hideimages', get_string('hideimages', 'qtype_dragdrop')); $smarty->assign('hidehotspots', get_string('hidehotspots', 'qtype_dragdrop')); $smarty->assign('showimages', get_string('showimages', 'qtype_dragdrop')); $smarty->assign('showhotspots', get_string('showhotspots', 'qtype_dragdrop')); $smarty->assign('snaphotspots', get_string('snaphotspots', 'qtype_dragdrop')); $smarty->assign('snapimages', get_string('snapimages', 'qtype_dragdrop')); $smarty->assign('setcontainers', $setcontainers); $smarty->assign('maxheight', $maxheight); // added by Harry for javascript - beginn // smarty caching deactivating for development only //$smarty->clear_cache($template); // Javascriptcode for DDGapImage object added here because we need it twice. // In dragdropshow.tpl and in dragdroparrange.tpl. $text = "<script type='text/javascript'>"."\n". "// Our custom drag and drop implementation, extending YAHOO.util.DD"."\n". "YAHOO.util.DDGapImage = function(id, sGroup, config) {"."\n". " YAHOO.util.DDGapImage.superclass.constructor.apply(this, arguments);"."\n". "};"."\n"."\n". "YAHOO.extend(YAHOO.util.DDGapImage, YAHOO.util.DD, {"."\n". " origZ: 0,"."\n". " startPos: false,"."\n". " responseForm: false,"."\n". " backgroundId: false,"."\n". " width: false,"."\n". " height: false,"."\n"."\n". " startDrag: function(x, y) {"."\n". " },"."\n"."\n". " endDrag: function(e) {"."\n". " // Sets the response form values"."\n". " // But I don't know if it is a good idea like this. Perhaps its easier to"."\n". " // do it just before sending the form. Just like in dragdroparrange.tpl."."\n". " this.setFormValues();"."\n". " },"."\n"."\n". " onMouseDown: function(e) {"."\n". " // Brings every dragged object in front."."\n". " var style = this.getEl().style;"."\n"."\n". " // store the original z-index"."\n". " this.origZ = style.zIndex;"."\n"."\n". " // The z-index needs to be set very high so the element will indeed be on top"."\n". " style.zIndex = 99;"."\n". " },"."\n"."\n". " onMouseUp: function(e) {"."\n". " // restore the original z-index"."\n". " this.getEl().style.zIndex = this.origZ;"."\n". " },"."\n"."\n". " onInvalidDrop: function(e) {"."\n". " // Get background position"."\n". " // Can not be stored statically because background can move while window resizing"."\n". " // Restoring the absolute position relative to the background"."\n". " backgroundXY = YAHOO.util.Dom.getXY(this.backgroundId);"."\n"."\n". " myAbsolutPos = new Array();"."\n". " myAbsolutPos[0] = this.startPos[0] + backgroundXY[0];"."\n". " myAbsolutPos[1] = this.startPos[1] + backgroundXY[1];"."\n". " // return to the start position"."\n". " var attr = {"."\n". " points: { to: myAbsolutPos }"."\n". " };"."\n". " // we store this in a dummy for calling the setFormValues function"."\n". " // at the end of the animation"."\n". " var dummy = this;"."\n". " var anim = new YAHOO.util.Motion(this.id, attr, 1, YAHOO.util.Easing.easeOut);"."\n". " anim.onComplete.subscribe(function() {"."\n". " dummy.setFormValues();"."\n". " });"."\n"."\n". " anim.animate();"."\n". " //alert('onInvalidDrop - end');"."\n". " },"."\n"."\n". " initDDGapImage: function() {"."\n". " // Get background position"."\n". " // Can not be stored statically because background can move while window resizing"."\n". " backgroundXY = YAHOO.util.Dom.getXY(this.backgroundId);"."\n"."\n". " // Set original start position"."\n". " // We set it relative to the background"."\n". " if (!this.startPos)"."\n". " myAbsolutPos = YAHOO.util.Dom.getXY(this.id);"."\n". " myRelativePos = new Array();"."\n". " myRelativePos[0] = myAbsolutPos[0] - backgroundXY[0];"."\n". " myRelativePos[1] = myAbsolutPos[1] - backgroundXY[1];"."\n". " this.startPos = myRelativePos;"."\n"."\n". " // Set gapimage position if already moved"."\n". " if(this.responseForm && this.responseForm.value) {"."\n". " // if in view or respond mode"."\n". " pos = this.responseForm.value.split(',');"."\n". " XY = pos.slice(0,2);"."\n". " XY[0] = parseInt(backgroundXY[0]) + parseInt(XY[0]);"."\n". " XY[1] = parseInt(backgroundXY[1]) + parseInt(XY[1]);"."\n". " YAHOO.util.Dom.setXY(this.id, XY);"."\n". " }"."\n". " else if(this.targetx || this.targety) {"."\n". " // if in edit mode"."\n". " XY = new Array();"."\n". " XY[0] = parseInt(backgroundXY[0]) + parseInt(this.targetx);"."\n". " XY[1] = parseInt(backgroundXY[1]) + parseInt(this.targety);"."\n". " YAHOO.util.Dom.setXY(this.id, XY);"."\n". " }"."\n". " },"."\n"."\n". " setFormValues: function() {"."\n". " // Get background position"."\n". " // Can not be stored statically because background can move while window resizing"."\n". " backgroundXY = YAHOO.util.Dom.getXY(this.backgroundId);"."\n"."\n". " // compute the relativ position to background"."\n". " dropAbsolutePos = YAHOO.util.Dom.getXY(this.id);"."\n". " dropAbsoluteX = dropAbsolutePos[0];"."\n". " dropAbsoluteY = dropAbsolutePos[1];"."\n". " dropRelativeX = dropAbsoluteX - backgroundXY[0];"."\n". " dropRelativeY = dropAbsoluteY - backgroundXY[1];"."\n"."\n". " // fill response form values"."\n". " this.responseForm.value = dropRelativeX + ',' + dropRelativeY + ',' + this.width + ',' + this.height;"."\n". " }"."\n". "});"."\n"."\n". "var arrOfGapimageObjects$background->id = new Array();"."\n". "var arrOfGapimages$background->id = new Array();"."\n". "</script>"."\n"."\n"; $smarty->assign('script1', $text); $text = '<script type="text/javascript">'."\n". '// Initializing the background as valid drop target'."\n". 'var background'.$background->id.' = new YAHOO.util.DDTarget(backgroundId'.$background->id.');'."\n"."\n". '// Initializing the gapimages'."\n". 'function init'.$background->id.'() {'."\n". ' for (var i = 0; i < arrOfGapimageObjects'.$background->id.'.length; ++i) {'."\n". ' arrOfGapimages'.$background->id.'[i] = new YAHOO.util.DDGapImage(arrOfGapimageObjects'.$background->id.'[i].name);'."\n". ' arrOfGapimages'.$background->id.'[i].backgroundId = arrOfGapimageObjects'.$background->id.'[i].backgroundId;'."\n". ' arrOfGapimages'.$background->id.'[i].width = arrOfGapimageObjects'.$background->id.'[i].width;'."\n". ' arrOfGapimages'.$background->id.'[i].height = arrOfGapimageObjects'.$background->id.'[i].height;'."\n"; // the arrange template gets another script than the view template if ($displaytype == 'edit') { $text .= ' arrOfGapimages'.$background->id.'[i].targetx = arrOfGapimageObjects'.$background->id.'[i].targetx;'."\n"; $text .= ' arrOfGapimages'.$background->id.'[i].targety = arrOfGapimageObjects'.$background->id.'[i].targety;'."\n"; $text .= ' arrOfGapimages'.$background->id.'[i].initDDGapImage();'."\n"; $text .= ' arrOfHotspots'.$background->id.'[i].gapImage = arrOfGapimages'.$background->id.'[i];'."\n"; $text .= ' arrOfHotspots'.$background->id.'[i].initDDHotSpot();'."\n"; } else { $text .= ' arrOfGapimages'.$background->id.'[i].responseForm = YAHOO.util.Dom.get(arrOfGapimageObjects'.$background->id.'[i].responseFormId);'."\n"; $text .= ' arrOfGapimages'.$background->id.'[i].initDDGapImage();'."\n"; } $text .= ' }'."\n". '}'."\n"."\n". '// calling init() when DOM is ready'."\n". 'YAHOO.util.Event.onDOMReady(init'.$background->id.');'."\n". '</script>'."\n"."\n"; $smarty->assign('script2', $text); // added by Harry for javascript - end /* if ($displaytype == 'display') { $smarty->assign('formfields', $setformfields); } */ //hw: I put this in every view because I need the data for positioning the gapimages $smarty->assign('formfields', $setformfields); $expout = $smarty->display($template); }
[ "public function getDisplayType()\n {\n return $this->display_type;\n }", "public function setDisplayType($display_type)\n {\n $this->display_type = $display_type;\n }", "function getTypeDisplayList()\n{\n return array('record_type_display', 'parent_type_display', 'record_type_display_notes');\n}", "abstract function displayType();", "function _get_selected_display_type_name()\n {\n $retval = '';\n if ($this->object->_displayed_gallery) {\n $retval = $this->object->_displayed_gallery->display_type;\n }\n return $retval;\n }", "public function display()\n {\n return $this->belongsTo('Apiv1\\Repositories\\Models\\DisplayType', 'display_type');\n }", "public function display_type($display = null) {\n\t\tif ($display === null) {\n\t\t\treturn $this->_display_type;\n\t\t}\n\n\t\t$this->_display_type = $display;\n\t\treturn $this;\n\t}", "public function newDisplay();", "function alteraRepresentacao(){\r\n\t\t$retorno = true;\r\n\t\tforeach ($this->grupo as $l){\r\n\t\t\t$l = $this->mapa->getlayerbyname($l);\r\n\t\t\tif ($l->type == MS_LAYER_LINE){\r\n\t\t\t\t$l->set(\"type\",MS_LAYER_POLYGON);\r\n\t\t\t}\r\n\t\t\telseif ($l->type == MS_LAYER_POLYGON){\r\n\t\t\t\t$l->set(\"type\",MS_LAYER_LINE);\r\n\t\t\t}\r\n\t\t\tif (($l->type < 1) || ($l->type > 2)){\r\n\t\t\t\t$retorno = false;\r\n\t\t\t}\r\n\t\t\tif ($this->layer){\r\n\t\t\t\t$this->layer->setMetaData(\"cache\",\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $retorno;\r\n\t}", "public function displayType(): string\n {\n return self::DISPLAY_INLINE;\n }", "public function add_formidable_key_field_display_options( $display ) {\n\t\tif ( $display['type'] == 'key_validator' ) {\n\t\t\t$display['unique'] = true;\n\t\t\t$display['required'] = true;\n\t\t\t$display['read_only'] = false;\n\t\t\t$display['description'] = true;\n\t\t\t$display['options'] = true;\n\t\t\t$display['label_position'] = true;\n\t\t\t$display['css'] = true;\n\t\t\t$display['conf_field'] = false;\n\t\t\t$display['default_value'] = true;\n\t\t\t$display['visibility'] = true;\n\t\t}\n\t\t\n\t\treturn $display;\n\t}", "public function DisplayType()\n {\n return $this->belongsTo(DisplayType::class);\n }", "public function get_display($one, $type, $display_setting)\n\t{\n\t\tswitch ($type) {\n\t\t\tcase 'c1mc': return $this->get_MiddleChinese_detail($one);\n\t\t\tcase 'c2pu': return $this->get_Mandarin_detail($one, $display_setting[0]);\n\t\t\tcase 'c3ct': return $this->get_Cantonese_detail($one, $display_setting[1]);\n\t\t\tcase 'c4sh': case 'c5mn': return $one;\n\t\t\tcase 'c6kr': return $this->get_Korean_detail($one, $display_setting[2]);\n\t\t\tcase 'c7vn': return $this->get_Vietnamese_detail($one, $display_setting[3]);\n\t\t\tcase 'c8jp_go': case 'c9jp_kan': case 'c10jp_tou': case 'c11jp_kwan': case 'c12jp_other': \n\t\t\t\treturn $this->get_Japanese_detail($one, $display_setting[4]);\n\t\t\tdefault:\n\t\t\t\treturn $one;\n\t\t}\n\t\treturn \"\";\n\t}", "public function displayTypeBase()\n\t{\n\t\treturn $this->displayTypeBase;\n\t}", "public static function BackDisplayEdit()\n\t{\n\t\t$Object = Object_Custom::getById(\n\t\t\t$options = array(\n\t\t\t\t'id'\t \t => Util::getvalue('id'),\n\t\t\t\t'model' => 'ProviderModel',\n\t\t\t\t'table' => ProviderModel::$table,\n\t\t\t\t'tables'\t => ProviderModel::$tables,\n\t\t\t\t'module'\t => 'provider',\n\t\t\t\t'state'\t\t => false, \n\t\t\t\t'relations'\t => true,\n\t\t\t\t'multimedas' => true,\n\t\t\t\t'categories' => true\n\t\t\t)\n\t\t);\n\n\n\t\t$Rubros = Rubro::getList(array(\n\t\t\t'parent'=>0,\n\t\t\t'subrubros'=> 1\n\t\t));\n\t\t// $defaults = array(\n\t\t// \t\t'model'\t\t\t=> false,\n\t\t// \t\t'table' \t=> false,\n\t\t// \t\t'tables'\t\t=> false,\n\t\t// \t\t'module'\t\t=> false,\n\t\t// \t\t'id'\t \t\t=> false,\n\t\t// \t\t'state'\t\t \t=> false, \n\t\t// \t\t'relations'\t \t=> true,\n\t\t// \t\t'multimedias'\t=> true,\n\t\t// \t\t'categories' \t=> true,\n\t\t// \t\t'level' \t=> 3, // Arbol de categorias padre\n\t\t// \t\t'internalCall'\t=> false,\n\t\t// \t\t'debug'\t\t\t=> false\n\t\t// );\n\n\t\tif(!$Object) Application::Route(array('modulename'=>'provider'));\n\t\t\n\n\t\tparent::loadAdminInterface();\n\t\tself::$template->setcontent($Object, null, 'object');\n\t\tself::$template->setcontent($Rubros, null, 'rubros');\n\t\tself::$template->add(\"edit.xsl\");\n\t\tself::$template->display();\n\t}", "function &new_display($type = 'page', $title = NULL, $id = NULL) {\n $id = $this->add_display($type, $title, $id);\n\n // Create a handler\n $this->display[$id]->handler = views_get_plugin('display', $this->display[$id]->display_plugin);\n if (empty($this->display[$id]->handler)) {\n // provide a 'default' handler as an emergency. This won't work well but\n // it will keep things from crashing.\n $this->display[$id]->handler = views_get_plugin('display', 'default');\n }\n\n if (!empty($this->display[$id]->handler)) {\n // Initialize the new display handler with data.\n $this->display[$id]->handler->init($this, $this->display[$id]);\n // If this is NOT the default display handler, let it know which is\n if ($id != 'default') {\n $this->display[$id]->handler->default_display = &$this->display['default']->handler;\n }\n }\n\n return $this->display[$id]->handler;\n }", "public function prepareViewDisplay(HubReferenceTypeInterface $type, EntityViewDisplayInterface $display);", "private function buildPreview($type) {\n\n if (is_numeric($this->getContext('value'))) {\n $context['attributes']['src'] = wp_get_attachment_url($this->getContext('value'));\n\n $this->metadata = wp_get_attachment_metadata($this->getContext('value'));\n\n if (isset($this->metadata['poster']) && !empty($this->metadata['poster'])) {\n $context['attributes']['poster'] = $this->imageResize($this->metadata['poster']);\n }\n }\n\n elseif (filter_var($this->getContext('value'), FILTER_VALIDATE_URL) !== FALSE) {\n $context['attributes']['src'] = $this->getContext('value');\n }\n else {\n $this->preview->addClass('wpmedia-preview-empty');\n return;\n }\n\n\n switch ($type) {\n\n case 'image' :\n\n $this\n ->preview\n ->Image($context);\n\n break;\n\n case 'video' :\n\n $context['attributes']['controls'] = true;\n $context['attributes']['preload'] = 'none';\n\n $this\n ->preview\n ->Video($context);\n\n break;\n\n\n case 'audio' :\n\n $context['attributes']['controls'] = true;\n $context['attributes']['preload'] = 'none';\n\n $this\n ->preview\n ->Audio($context);\n\n break;\n\n }\n\n $this->addContext('media_source', $context['attributes']['src']);\n\n }", "public function get_displayType(): int\n {\n // $res is a enumDISPLAYTYPE;\n if ($this->_cacheExpiration == 0) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::DISPLAYTYPE_INVALID;\n }\n }\n $res = $this->_displayType;\n return $res;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Identify which meta package is installed
function get_meta_pkg_name() { global $g; /* XXX: Use pkg annotation */ if (is_pkg_installed(g_get('product_name'))) { return g_get('product_name'); } foreach (g_get('alternativemetaports') as $suffix) { if (is_pkg_installed(g_get('product_name') . '-' . $suffix)) { return g_get('product_name') . '-' . $suffix; } } return false; }
[ "protected function initialPackageMetadata() {\n return [\n \"name\" => \"drupal/core-dev\",\n \"type\" => \"metapackage\",\n \"description\" => \"require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.\",\n \"license\" => \"GPL-2.0-or-later\",\n \"conflict\" => [\n \"webflo/drupal-core-require-dev\" => \"*\",\n ],\n ];\n }", "public function getpackagename(){}", "public function getPackageMetaData() {}", "public function getMetaPath() {\n\t\treturn $this->packagePath . self::DIRECTORY_METADATA;\n\t}", "public function getpackagename()\n {\n }", "public static function getMetaClass(): string;", "function get_base_pkg_name() {\n\tglobal $g;\n\n\t/* XXX: Use pkg annotation */\n\tif (is_pkg_installed(g_get('product_name') . '-base-' . g_get('product_name'))) {\n\t\treturn g_get('product_name') . '-base-' . g_get('product_name');\n\t} else if (is_pkg_installed(g_get('product_name') . '-base')) {\n\t\treturn g_get('product_name') . '-base';\n\t}\n\treturn false;\n}", "function is_site_meta_supported() {}", "function getPackage() {\n return Package::getPackage($this);\n }", "public static function getOsPackageType() { }", "public static function getMetaClass(): string\n {\n return Meta::class;\n }", "public function isInstalled();", "private function getMetaInformation()\n {\n $method = 'meta__query'.$this->method;\n if(\\method_exists($this->class, $method))\n {\n return \\Savant\\AGenericCallInterface::call($this->class, $method);\n }\n else\n {\n return false;\n }\n }", "abstract protected function determinePackagePath(): string;", "function getPackageInformation()\r\n\t{\r\n\t\treturn $this->pi;\r\n\t}", "public static function isMetaDependency($dependency)\n {\n return $dependency === 'php' ||\n strpos($dependency, 'ext-') === 0 ||\n strpos($dependency, 'lib-') === 0 ||\n $dependency === 'composer-plugin-api';\n }", "public function is_package_install() {\n\n\t\tif ( empty( $_SESSION['monstroid_install_type'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$type = esc_attr( $_SESSION['monstroid_install_type'] );\n\n\t\tif ( in_array( $type, array( 'advanced', 'full' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\n\t}", "function getInstallationSource();", "function is_site_meta_supported()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
groupPrices Group the prices for each attribute value in an associative array
protected function groupPrices(array $input, array $special, $attr, $attr_price) { $values = array(); foreach($special as $simple) { //Skip empty values if($input[$attr_price][$simple] === '') { if(self::DEBUG) echo 'Skipping empty value: ' . $input[$attr_price][$simple] . "\n"; continue; } if(isset($values[$input[$attr][$simple]])) { $values[$input[$attr][$simple]][$simple] = str_replace(',', '.', $input[$attr_price][$simple]); } else { $values[$input[$attr][$simple]] = array($simple => str_replace(',', '.', $input[$attr_price][$simple])); } } if(self::DEBUG) { echo 'Grouped values per attribute value:' . "\n"; var_dump($values); } return $values; }
[ "private function organizePrices(): void\n {\n $newGroups = [];\n\n foreach($this->groups as $groups) {\n foreach($groups as $group) {\n $newGroups[(int) $group[\"totalPrice\"]] = $group;\n }\n }\n sort($newGroups);\n\n $this->groups = $newGroups;\n }", "public function getPricesForPriceGroups($record){\n \t$articleId = $record->__get('id');\n \t$sellPriceBackend = new Billing_Backend_SellPrice();\n \t$prices = $sellPriceBackend->getByArticleId($articleId);\n \t$result = array();\n \tforeach($prices as $price){\n \t\t$result[$price->__get('price_group_id')->__get('id')] = array(\n \t\t\t'name' => $price->__get('price_group_id')->__get('name'),\n \t\t\t'price_netto' => $price->__get('price_netto'),\n \t\t\t'price_brutto' => $price->__get('price_brutto'),\n \t\t\t'price2_netto' => 0,\n \t\t\t'price2_brutto' => 0,\n \t\t\t'price2_vat_id' => Billing_Controller_Vat::getInstance()->getByName('0')\n \t\t);\n \t}\n \treturn $result;\n }", "function setProductPrices() : array {\n //Product price array\n return array(\n 'A' => array('1'=>2.00, '4'=>7.00), // product price, group price\n 'B' => array('1'=>12.00), \n 'C' => array('1'=>1.25, '6'=>6.00),\n 'D' => array('1'=>0.15)\n );\n }", "protected function prepareGroupPricesParameters(&$record) \n {\n foreach ($record['groupPrices'] as $key => &$value) {\n $key = $this->sanitiseOtherAttribute($key);\n \n if(is_array($value)){\n $label = $this->sanitiseOtherAttribute($value['label']);\n $value = $this->sanitiseOtherAttribute($value['values']);\n }else {\n $label = $this->sanitiseOtherAttribute($key);\n $value = $this->sanitiseOtherAttribute($value);\n }\n \n if (is_array($value)) {\n $value = implode(\",\", $value);\n }\n\n $value = sprintf(\"%s:%s:%s\", $key, $label, $value);\n }\n\n $record['groupPrices'] = implode(\";\", $record['groupPrices']);\n }", "public function getPriceGroups()\n {\n if (!method_exists($this, 'getPriceGroupSelect')) {\n return;\n }\n\n return $this->db->fetchPairs($this->getPriceGroupSelect());\n }", "public function getListOfMappedPriceGroupKeys();", "public function group_prices()\r\n {\r\n return $this->hasMany(\\App\\VariationGroupPrice::class, 'variation_id');\r\n }", "public function updateAllProductsVipGroupPrice()\n {\n $groupPrice = array();\n $productCollection = Mage::getsingleton('catalog/product')->getResourceCollection()\n ->joinAttribute('price', 'catalog_product/price', 'entity_id')\n ->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility :: VISIBILITY_BOTH,\n Mage_Catalog_Model_Product_Visibility :: VISIBILITY_IN_CATALOG,\n )));\n\n $select = $productCollection->getSelect();\n if ($data = $select->query(PDO::FETCH_ASSOC)->fetchAll()) {\n try {\n // empty table\n $adapter = $this->_getWriteAdapter();\n $adapter->query('Delete From ' . $this->getGroupPriceTablePriceTableName());\n $vipDiscounts = $this->getVipDiscounts();\n $adapter->beginTransaction();\n\n foreach ($data as $_data) {\n foreach ($vipDiscounts as $groupId => $discount) {\n $groupPrice[] = array('entity_id' => $_data['entity_id'],\n 'all_groups' => self::IS_ALL_GROUPS,\n 'customer_group_id' => $groupId,\n 'value' => round($_data['price'] * $discount, 1),\n 'website_id' => $this->getWebsiteId()\n );\n }\n\n $adapter->insertOnDuplicate($this->getGroupPriceTablePriceTableName(), $groupPrice, array(\n 'customer_group_id',\n 'value',\n 'entity_id',\n 'all_groups',\n ));\n }\n\n $adapter->commit();\n //reindex price\n $this->reindexPrice();\n return TRUE;\n } catch (Exception $e) {\n Mage::logException($e);\n return FALSE;\n }\n }\n return TRUE;\n }", "public function getGroupedAttributesForMatching() {\n $aShopAttributes = array();\n\n // First element is pure text that explains that nothing is selected so it should not be added\n // nor in Properties or Variations, it is spliced and used just for forming the final array.\n $aFirstElement = array('' => MLI18n::gi()->get('ConfigFormEmptySelect'));\n\n // Variation attributes\n $aShopVariationAttributes = $this->getVariationAttributes();\n if (!empty($aShopVariationAttributes)) {\n $aShopVariationAttributes['optGroupClass'] = 'variation';\n $aShopAttributes += array(MLI18n::gi()->get('VariationsOptGroup') => $aShopVariationAttributes);\n }\n\n // Product default fields\n $aShopDefaultFieldsAttributes = $this->getDefaultFieldsAttributes();\n if (!empty($aShopDefaultFieldsAttributes)) {\n $aShopDefaultFieldsAttributes['optGroupClass'] = 'default';\n $aShopAttributes += array(MLI18n::gi()->get('ProductDefaultFieldsOptGroup') => $aShopDefaultFieldsAttributes);\n }\n\n // Product features\n $aShopProductFeatures = $this->getProductFeatures();\n if (!empty($aShopProductFeatures)) {\n $aShopProductFeatures['optGroupClass'] = 'property';\n $aShopAttributes += array(MLI18n::gi()->get('PropertiesOptGroup') => $aShopProductFeatures);\n }\n\n return $aFirstElement + $aShopAttributes;\n }", "public function getGroupPriceAttribute()\n {\n if (is_null($this->_groupPriceAttribute)) {\n $attribute = $this->getProductHelper()->getAttribute('group_price');\n if ($attribute) {\n $this->_groupPriceAttribute = $attribute;\n }\n }\n return $this->_groupPriceAttribute;\n }", "public function makeAttributes()\n {\n $combArray = array();\n $combinations = $this->getAttributesGroups($this->context->language->id);\n if (is_array($combinations)) {\n $cImages = $this->getImageUrlCombination();\n foreach ($combinations as $c) {\n $attributeId = $c['id_product_attribute'];\n $priceToConvert = Tools::convertPrice($c['price'], $this->context->currency);\n $price = Tools::displayPrice($priceToConvert, $this->context->currency);\n if (array_key_exists($attributeId, $combArray)) {\n $combArray[$attributeId]['attributes'][$c['group_name']] = array(\n $c['group_name'],\n $c['attribute_name'],\n $c['id_attribute'],\n );\n } else {\n $combArray[$attributeId] = array(\n 'id_product_attribute' => $attributeId,\n 'attributes' => array(\n $c['group_name'] => array(\n $c['group_name'],\n $c['attribute_name'],\n $c['id_attribute'],\n )\n ),\n 'wholesale_price' => isset($c['wholesale_price']) ? $c['wholesale_price'] : '',\n 'price' => $price,\n 'ecotax' => isset($c['ecotax']) ? $c['ecotax'] : '',\n 'weight' => $c['weight'],\n 'reference' => $c['reference'],\n 'ean13' => isset($c['ean13']) ? $c['ean13'] : '',\n 'upc' => isset($c['upc']) ? $c['upc'] : '',\n 'isbn' => isset($c['isbn']) ? $c['isbn'] : '',\n 'supplier_reference' => isset($c['supplier_reference']) ? $c['supplier_reference'] : '',\n 'minimal_quantity' => isset($c['minimal_quantity']) ? $c['minimal_quantity'] : '',\n 'images' => isset($cImages[$attributeId]) ? $cImages[$attributeId] : array(),\n );\n }\n if (LengowMain::compareVersion()) {\n $combArray[$attributeId]['available_date'] = strftime($c['available_date']);\n }\n }\n }\n if (isset($combArray)) {\n foreach ($combArray as $idProductAttribute => $productAttribute) {\n $name = '';\n // in order to keep the same attributes order\n asort($productAttribute['attributes']);\n foreach ($productAttribute['attributes'] as $attribute) {\n $name .= $attribute[0] . ', ';\n }\n if (!$this->variation) {\n $this->variation = rtrim($name, ', ');\n }\n if (LengowMain::compareVersion()) {\n $combArray[$idProductAttribute]['available_date'] = (\n $productAttribute['available_date'] != 0\n ? date('Y-m-d', strtotime($productAttribute['available_date']))\n : '0000-00-00'\n );\n }\n }\n }\n $this->combinations = $combArray;\n }", "public function getAttributeGroups();", "protected function _groupAttributes($attributes)\n {\n $grouped = [];\n if (is_array($attributes)) {\n foreach ($attributes as $field => $fdata) {\n if (is_array($fdata)) {\n $grouped[$field] = $fdata;\n $grouped[$field]['id'] = $this->_getElementId($field);\n $grouped[$field]['name'] = $this->_getElementName($field);\n }\n }\n }\n return $grouped;\n }", "function pizza_pos_order_group_options( $options = array(), $group = array() ) {\t\n\n\t$options = (array)$options;\n\n\tforeach ( $options as $row => $option ) {\n\n\t\t$option = (array)$option;\n\t\t$data = (array)$option['options'];\t\t\n\t\t$data['variation'] = $option['variation'];\n\n\t\t$group[ $option['name'] ][] = $data;\n\n\t}\n\n\treturn $group;\n}", "public function testPriceGroupWithVariants()\n {\n $number = __FUNCTION__;\n $context = $this->getContext();\n\n $data = $this->createPriceGroupProduct($number, $context, true);\n\n $this->helper->createArticle($data);\n\n $listProduct = $this->helper->getListProduct($number, $context, [\n 'useLastGraduationForCheapestPrice' => true,\n ]);\n\n /* @var ListProduct $listProduct */\n static::assertEquals(7, $listProduct->getCheapestPrice()->getCalculatedPrice());\n }", "function groupArray($attribs){\t\t\r\n\t$gr_attrib = array();\t\t\r\n\tforeach ($attribs as $key => $value) {\t\t\r\n\t\tif (array_key_exists($value, $gr_attrib)) {\t\t\r\n\t\t\t $gr_attrib[$value] .= \",$key\";\t\t\r\n\t\t\t} else {\t\t\r\n\t\t\t $gr_attrib[$value] = $key;\t\t\r\n\t\t\t} // endif\t\t\r\n\t\t} // end foreach\t\t\r\n\t$attribs = array_flip($gr_attrib);\t\t\r\n\treturn $attribs;\t\t\r\n\t\t\r\n\t}", "private function priceData($array)\n {\n $prices = [];\n foreach ($array as $obj) {\n $prices[$obj['symbol']] = $obj['price'];\n }\n\n return $prices;\n }", "public function resultToGroups($raw) {\n $ret = array();\n \n // Convert the raw string back to an XML object\n $attrs = simplexml_load_string($raw);\n \n foreach(array_keys($this->groupAttrs) as $gAttr) {\n if(!empty($attrs->$gAttr)) {\n $ret[$gAttr][] = array('value' => (string)$attrs->$gAttr);\n }\n }\n \n // Also check Events, if not empty\n if(!empty($attrs->Events->EventProductCode)) {\n foreach((array)$attrs->Events->EventProductCode as $v) {\n $ret['EventProductCode'][] = array('value' => (string)$v);\n }\n }\n \n // Also check Committees, if not empty\n if(!empty($attrs->Committees->CommitteeName)) {\n foreach((array)$attrs->Committees->CommitteeName as $v) {\n $ret['CommitteeName'][] = array('value' => (string)$v);\n }\n }\n \n return $ret;\n }", "public function getGroupPrice()\n {\n return $this->getPriceModel()->getGroupPrice($this);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns Application Cryptogram. For EMV payments, the cryptogram generated for the payment.
public function getApplicationCryptogram(): ?string { if (count($this->applicationCryptogram) == 0) { return null; } return $this->applicationCryptogram['value']; }
[ "public function generateHash($application)\n {\n $merchantId = Config::get('ingenico.merchantId');\n $txnId = $application->reference_code;\n $amount = $application->approved_loan_emi;\n $itemId = Config::get('ingenico.scheme_code'); //scheme code\n $comAmt = Config::get('ingenico.comAmt'); // commission Amtount\n $accountNo = '';\n $consumerId = $application->reference_code;\n $consumerMobileNo = $application->borrower->mobile_number;\n $consumerEmailId = $application->borrower->email;\n $debitStartDate = Carbon::parse($application->getOriginal('valid_from'))->format('d-m-Y');\n $debitEndDate = Carbon::parse($application->getOriginal('valid_upto'))->format('d-m-Y'); \n $maxAmount = Config::get('ingenico.maxAmount');\n $amountType = Config::get('ingenico.amountType');\n $frequency = Config::get('ingenico.frequency');\n $cardNumber = '';\n $expMonth = '';\n $expYear = '';\n $cvvCode = '';\n $salt = Config::get('ingenico.salt');\n\n $hash = hash('sha256', $merchantId.'|'.$txnId.'|'.$amount.'|'.$accountNo.'|'.$consumerId.'|'.$consumerMobileNo.'|'.$consumerEmailId.'|'.$debitStartDate.'|'.$debitEndDate.'|'.$maxAmount.'|'.$amountType.'|'.$frequency.'|'.$cardNumber.'|'.$expMonth.'|'.$expYear.'|'.$cvvCode.'|'.$salt\n );\n return [\n 'merchantId' => $merchantId,\n 'txnId' => $txnId,\n 'amount' => $amount,\n 'itemId' => $itemId,\n 'comAmt' => $comAmt,\n 'accountNo' => $accountNo,\n 'consumerId' => $consumerId,\n 'consumerMobileNo' => $consumerMobileNo,\n 'consumerEmailId' => $consumerEmailId,\n 'debitStartDate' => $debitStartDate,\n 'debitEndDate' => $debitEndDate,\n 'maxAmount' => $maxAmount,\n 'amountType' => $amountType,\n 'frequency' => $frequency,\n 'cardNumber' => $cardNumber,\n 'expMonth' => $expMonth,\n 'expYear' => $expYear,\n 'cvvCode' => $cvvCode,\n 'salt' => $salt,\n 'hash' => $hash\n ];\n }", "protected function generateAppKey()\n {\n return 'base64:'.base64_encode(\n Encrypter::generateKey('AES-256-CBC')\n );\n }", "public function getLatestCrypto();", "protected function crypt()\n {\n return $this->app()->crypt();\n }", "public function getKeyedMAC()\r\n\t{\r\n\t $fields = sprintf(sfPaymentCIC::CMCIC_PHP1_FIELDS, \r\n\t \t\t\t\t\t\t\t\t\t'',\r\n $this->tpe['number'],\r\n $this->getOrderDate(),\r\n $this->getAmount(),\r\n $this->getCurrency(),\r\n $this->getOrderReference(),\r\n $this->getOrderComment(),\r\n sfPaymentCIC::CMCIC_VERSION,\r\n $this->getLanguage(),\r\n $this->tpe['company']);\r\n\r\n \t//print_r($fields);\r\n return $this->CMCIC_Hmac($fields);\r\n\t}", "public function getCryptKey ()\n {\n return $this->getVendorPassword();\n }", "public function getCrypto(){\n\t\treturn $this->crypto;\n\t}", "private function createAppKey()\n {\n return 'base64:'.base64_encode(random_bytes(config('app.cipher') == 'AES-128-CBC' ? 16 : 32));\n }", "public function getProcessedAppMD5($app, $exclude_file = \"\") {\n \n $app_path = $app->calculateFullPath($this->config[\"paths\"][\"app\"]);\n $cached_app_path = substr_replace($app_path, \"_cache/\", -1); \n \n if (!file_exists($cached_app_path)) {\n return \"\";\n }\n \n $md5sums = array();\n \n if ($exclude_file != \"\") {\n $files = $this->func_find( $cached_app_path, \"f\", \"*\", array($exclude_file, \"*.lock\") );\n } else {\n $files = $this->func_find( $cached_app_path, \"f\", \"*\", array(\"*.lock\") );\n }\n foreach ($files as $file) {\n $md5sums[] = md5_file($file);\n }\n sort($md5sums);\n return md5(implode(\"\", $md5sums));\n }", "public function getCrypto()\n {\n return $this->hasOne(Cryptocurency::className(), ['id' => 'crypto_id']);\n }", "public function calculateMac()\n {\n $mac_string = $this->getVersion();\n \n $mac_string .= '+' .$this->getStamp();\n $mac_string .= '+' .$this->getAmount();\n $mac_string .= '+' .$this->getReference();\n $mac_string .= '+' .$this->getMessage();\n $mac_string .= '+' .$this->getLanguage();\n $mac_string .= '+' .$this->getMerchantId();\n $mac_string .= '+' .$this->getReturnUrl();\n $mac_string .= '+' .$this->getCancelUrl();\n $mac_string .= '+' .$this->getRejectUrl();\n $mac_string .= '+' .$this->getDelayedUrl();\n $mac_string .= '+' .$this->getCountry();\n $mac_string .= '+' .$this->getCurrency();\n $mac_string .= '+' .$this->getDevice();\n $mac_string .= '+' .$this->getContent();\n $mac_string .= '+' .$this->getType();\n $mac_string .= '+' .$this->getAlgorithm();\n $mac_string .= '+' .$this->getDeliveryDate()->format('Ymd');\n $mac_string .= '+' .$this->getFirstName();\n $mac_string .= '+' .$this->getFamilyName();\n $mac_string .= '+' .$this->getAddress();\n $mac_string .= '+' .$this->getPostcode();\n $mac_string .= '+' .$this->getPostOffice();\n $mac_string .= '+' .$this->getMerchantSecret();\n\n return strtoupper(md5($mac_string));\n }", "public function getUserInfoEncryptionAlg()\n {\n return $this->userInfoEncryptionAlg;\n }", "public function getAppCode()\n {\n return apply_filters('bp_trapp_save_app_code', '');\n }", "function generateCryptographicDetails(): CryptographicDetails;", "public function getApplicationRef()\n {\n return sprintf('%s / %d', $this->licence->getLicNo(), $this->id);\n }", "public function getAppKey(): string\n\t{\n\t\treturn $this->appKey;\n\t}", "public function getPaymentHash() : string;", "protected function generateMacString()\n {\n $preparedParams = $this->preparedFields;\n $requestType = $preparedParams['VK_SERVICE'];\n $mac = '';\n\n //TODO: utf8 / iso encoding difference?\n \n foreach ((array)$this->VKOrders[$requestType] as $key) {\n $v = $preparedParams[$key];\n $mac .= str_pad (strlen ($v), 3, '0', STR_PAD_LEFT) . $v;\n }\n\n if(is_readable($this->config['privateKeyPath'])){\n $strKeyC = file_get_contents ($this->config['privateKeyPath']);\n } else {\n throw new Exception('Private key missing');\n }\n\n $key = openssl_pkey_get_private ($strKeyC, '');\n if (!openssl_sign ($mac, $signature, $key)) {\n throw new Exception('Unable to create signature');\n }\n\n openssl_free_key($key);\n\n return base64_encode($signature);\n }", "public function getAppCode(): string\n {\n return $this->getConfig()->get('application.code','');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get current ID of shop group if context is CONTEXT_SHOP or CONTEXT_GROUP
public static function getContextShopGroupId($null_value_without_multishop = false){ if ($null_value_without_multishop && !JeproshopShopModelShop::isFeaturePublished()){ return null; } return self::$context_shop_group_id; }
[ "public static function getContextShopGroupId($nullValueWithoutMultiShop = false){\n if ($nullValueWithoutMultiShop && !JeproshopShopModelShop::isFeaturePublished()){\n return null;\n }\n return self::$context_shop_group_id;\n }", "public function getCurrentShopId()\n {\n $context = Context::getContext();\n if (Shop::isFeatureActive() && $context->cookie->shopContext) {\n $split = explode('-', $context->cookie->shopContext);\n if (count($split) === 2) {\n return intval($split[1]);\n }\n }\n return intval($context->shop->id);\n }", "public function getCurrentCustomerGroupId()\n {\n $groupId = $this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_GROUP);\n if ($groupId !== null) {\n return $groupId;\n }\n\n $groupId = $this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n if ($groupId !== null) {\n return $groupId;\n }\n\n if ($this->customerSession->isLoggedIn()) {\n $groupId = $this->customerSession->getCustomer()->getGroupId();\n }\n if ($groupId !== null) {\n return $groupId;\n }\n\n return $this->groupManagement->getNotLoggedInGroup()->getId();\n }", "protected function getContextShopId(): int\n {\n return $this->context->shop->id;\n }", "function get_customer_group_id() {\n if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') {\n $_cg_id = $_SESSION['sppc_customer_group_id'];\n } else {\n $_cg_id = 0;\n }\n return $_cg_id;\n }", "function get_group_id()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_GROUP_ID);\r\n }", "public function getCurrentCustomerGroup()\n {\n if ($this->_canUseStoreDataFlag) {\n return Mage::getSingleton('customer/session')->getCustomerGroupId();\n }\n $group = Mage_Customer_Model_Group::NOT_LOGGED_IN_ID;\n if (isset($_COOKIE[Potato_FullPageCache_Model_Cache::CUSTOMER_GROUP_ID_COOKIE_NAME]) &&\n (isset($_COOKIE[self::SESSION_NAMESPACE]) && !Potato_FullPageCache_Helper_Data::isCrawler())\n ) {\n $group = $_COOKIE[Potato_FullPageCache_Model_Cache::CUSTOMER_GROUP_ID_COOKIE_NAME];\n }\n return $group;\n }", "public function getCurrentStoreGroupName()\n {\n if ($this->getStoreGroupId() !== null) {\n $group = $this->_storeGroupFactory->create();\n $group->load($this->getStoreGroupId());\n if ($group->getId()) {\n return $group->getName();\n }\n }\n }", "public function getGroupId() {\n\t\treturn $this->request->session()->read('Auth.User.user_group_id');\n\t}", "public static function get_current_group( ) {\n\t\treturn self::get_group_by_blog_id( get_current_blog_id( ) );\n\t}", "private function getCurrentGroup()\n {\n $group = null;\n if(Session::has('ue.backend.role_manager.current_group'))\n $group = Session::get('ue.backend.role_manager.current_group', null);\n if(!empty($group))\n return $group;\n return false;\n }", "private function getCurrentStoreId()\n {\n return $this->storeManager->getStore()->getId();\n }", "private function getShopsystemId()\n {\n return self::SHOPGATE_SHOP_TYPE;\n }", "function getCurrentStoreId() {\n\t\t\treturn $this->getCurrentStore( )->getId( );\n\t\t}", "public function getCurrentSystemId()\n {\n if ($this->systemId === null) {\n $this->systemId = (string)Shop::getDefaultShop()->getId();\n }\n\n return $this->systemId;\n }", "public function getGroupId() {\n\t\treturn $this->Session->read('UserAuth.User.user_group_id');\n\t}", "function getContextId() {\n\t\treturn $this->getData('contextId');\n\t}", "public static function getLoggedInGroupId()\r\n {\r\n return @self::getLoggedInUser()->group_id;\r\n }", "private function getShopId() {\n\t\t\treturn $this->shopId;\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }