query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
must get incubation period from this and ...
public function __construct($victim) { $this->victimId = $victim->id; $this->disease = $victim->diseases; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPeriod() {}", "public function getPeriod();", "abstract protected function get_interval();", "static function getLifetime()\n {\n return new Am_Period(self::MAX_SQL_DATE);\n }", "public function getIncrementing();", "function obtenerPeriodoActual($conexion)\n{\n $anoActual = date('Y');\n $mesActual = date('m');\n\n if ($mesActual > 6) {\n $sentencia = \"select idPeriodo from periodo where AnoInicio=\" . $anoActual;\n } elseif ($mesActual <= 6) {\n $sentencia = \"select idPeriodo from periodo where AnoInicio=\" . ($anoActual - 1);\n }\n\n $conexion->Ejecuto($sentencia);\n $periodo = $conexion->Siguiente();\n return $periodo['idPeriodo'];\n}", "public function getPeriod() : int\n {\n return $this->period;\n }", "function COM_NOW() {\r\n\t$now = new DateTime();\r\n\t$offset = $_SESSION[\"org_TZO\"] - $_SESSION[\"_SITE_CONF\"][\"TZO\"]; //offset from server to organization\r\n\tif ($offset == 0) return $now;\r\n\t$invert = 0;\r\n\tif ($offset < 0) {\r\n\t\t$offset = abs($offset);\r\n\t\t$invert = 1;\r\n\t}\r\n\t$format = \"PT\".$offset.\"H\";\r\n\t$interval = new DateInterval($format);\r\n\t$interval->invert = $invert;\r\n\t$now->add($interval);\r\n\treturn $now;\r\n}", "public function getPeriodfrom()\n {\n return $this->periodfrom;\n }", "function GETPRD()\n{\n $CYMMD1 = $billpay->BPPDAT; /* #664 */\n $PERIOD = 0; /* #666 */\n $acctgper_rows = db::fetchRows($sql, 'DTSDATA.ATGREC'); /* #669 */\n while ($acctgper === $true\n ) {\n if ($CYMMD1 >= $acctgper->ATGSTR\n && $CYMMD1 <= $acctgper->ATGEND\n ) {\n $PERIOD = $acctgper->ATGPER; /* #675 */\n $acctgper = $false; /* #676 */\n } else {\n $acctgper_rows = db::fetchRows($sql, 'DTSDATA.ATGREC'); /* #679 */\n } /* #680 end if */\n } /* #682 end while */\n}", "function get_annual_period_balance($cur='IDR',$acc=null,$eyear=null)\n {\n// transactions.debit, transactions.credit, transactions.vamount, gls.approved');\n \n $this->db->select_sum('transactions.vamount');\n $this->db->select_sum('transactions.debit');\n $this->db->select_sum('transactions.credit');\n \n $this->db->from('gls, transactions, accounts');\n $this->db->where('gls.id = transactions.gl_id');\n $this->db->where('transactions.account_id = accounts.id');\n $this->db->where('YEAR(dates)', $eyear);\n $this->db->where('gls.currency', $cur);\n $this->cek_null($acc,\"transactions.account_id\");\n $this->db->where('gls.approved', 1);\n $this->db->where('accounts.deleted', NULL);\n return $this->db->get(); \n }", "function calculoperiodoanterior ($cuenta, $numcuenta, $periodo, $db){\n\t$sql = \"SELECT importe \n\t\tFROM chartdetails_saldosiniciales\n\t\tWHERE cuenta = '\" . $numcuenta . \"' \n\t\t\t\tand periodo = '\" . $periodo . \"' \n\t\t\t\tand importe <> ''\";\n \t$resultfuncion = DB_query ( $sql, $db );\n\tif ($myrow = DB_fetch_array ( $resultfuncion )){\t\t\t\t\t//echo \"<pre> en IF\";\n\t\t$monto = $myrow['importe'];\t\t\t\t\t\t\t\t\t\t//echo \"<pre> monto = \".$monto;\n\t}else{\n\t\t$monto = 0;\n\t}\n\n\t$sql = \"SELECT groupcodetb,sectioninaccounts,groupname,parentgroupname,level, formula\n\t\t\tFROM accountgroups\n\t\t\tWHERE parentgroupname = '\" . $cuenta . \"'\";\n\t//echo \"<br>\" . $sql;\n\t$Groupss = DB_query ( $sql, $db );\t\t\t\t\t\t\t\t //echo \"<pre>Resultado cuenta hijos --->\".$sql;\n\t$monto_hijo = 0;\n\n\twhile ($myrowg = DB_fetch_array ( $Groupss )) {\n\t\t//echo \"<br>@@: \" . $cuenta . \"==\" . $myrowg['groupname'] . \"==\" . $myrowg['groupcodetb'];\n\t\t$montoanterior = calculoperiodoanterior($myrowg['groupname'], $myrowg['groupcodetb'], $periodo, $db);\n\t\t$monto_hijo = $monto_hijo + $montoanterior;\n\t\n\t}\n\t$monto = $monto_hijo + $monto;\n\t//echo \"<br>**** \" . $monto;\n\treturn $monto;\n}", "public function getRelativeExpiration(): \\DateInterval;", "public function calculate_package_period($period)\n {\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +1 day\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +1 week\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +2 week\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +1 month\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +30 days\");\n $today=Date('Y-m-d');\n if($period==1){\n $date = strtotime(date(\"Y-m-d\", strtotime($today)) . \" +3 month\");\n $membership_end = date(\"Y-m-d\", $date);\n }else if($period==0){\n $membership_end='';\n }\n return array('membership_end'=>$membership_end);\n }", "function getPeriodComparison($fieldname)\n{\n\tif (!(isset($_SESSION['period'])))\n\t{\n\t\t$_SESSION['period'] = \"all\";\n\t}\n\tif ($_SESSION['period'] == \"all\")\n\t{\n return \"\";\n\t}\n else\n {\n\t\treturn \" $fieldname >= '\" . $_SESSION['period'] . \"-01-01'\" .\n\t\t\t\" AND $fieldname <= '\" . $_SESSION['period'] . \"-12-31'\";\n\t}\n}", "function get_start_of_trade_period($acc_number)\n\t{\n\t return $this->db->select('first_order_number')\n\t\t ->from('pamm_tp') \n\t\t ->where(\"number\",$acc_number)\n\t ->order_by('first_order_number', 'DESC')\n\t\t ->get()->result();\n\t}", "function getInterval() {return $this->_interval;}", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "function calcularSiguientePeriodo($periodo){\r\n\t$anio = substr($periodo,0,4);\r\n\t$per = substr($periodo,4,1);\r\n\tif($per==2){\r\n\t\t$per=1;\r\n\t\t$anio++;\r\n\t}else if($per==1){\r\n\t\t$per++;\r\n\t}\r\n\t$periodo=$anio.$per;\r\n\treturn $periodo;\t\r\n\r\n }", "public function getPeriod($data,$date2 = null){\n\n if($date2 != null){\n\n $firstDay = $data;\n $lastDay = $date2;\n $periodos[0] = \"$data,$date2\";\n $dataMax = strtotime($date2);\n }else{\n # Get first day of month\n $firstDay = date(\"j-n-Y\",strtotime($data));\n # Get last day of month\n $lastDay = date(\"t-n-Y\",strtotime($data));\n # First period\n $periodos[0] = $firstDay.','.$lastDay;\n #Define the last date\n $dataMax = strtotime($lastDay);\n }\n\n $z = 1;\n\n $current=0;\n # Get first month\n $month = date(\"n\",strtotime($data));\n # Get first year\n $year = date(\"Y\", strtotime($data));\n # While the current date is less than max date, then continue\n while($current <= $dataMax){\n # Get next month\n $month = $month+1;\n # First date's period\n $p1 = \"1-$month-$year\"; //2014-02-01\n # Last day of date's period\n $p2D = date(\"t\",strtotime($p1)); // 28\n # Get second date's period\n $p2 = \"$p2D-$month-$year\";\n #\n $limit1 = strtotime($p1);\n # Check if first date of this period is bigger than max date\n if( $limit1 >= $dataMax){\n break;\n }\n $periodos[$z] = \"$p1,$p2\";\n if($month >= 12)\n {\n $month = 0;\n $year = $year+1;\n }\n\n $current = strtotime($p2);\n if($current >= $dataMax)\n {\n $p2 = date(\"j-n-Y\",$dataMax);\n $periodos[$z] = \"$p1,$p2\";\n break;\n }\n ++$z;\n\n }\n\n return $periodos;\n // $x = 0;\n\n // # Get current month\n // $mon = date(\"m\",strtotime($data));\n // # Get current year\n // $year = date(\"Y\",strtotime($data));\n // # Get periods previous\n // for($i=1;$i < 7;$i++){\n // # Changes of year\n // if($mon-1 == 0){$mon = 12;$year -= 1;}\n // else{--$mon;}\n\n // # Get first day of month\n // $ini = \"1-$mon-$year\";\n // # Get last day of month\n // $end = date(\"t-n-Y\",strtotime($ini));\n // # Get Period\n // $periodos[$i] = \"$ini,$end\";\n // }\n // # Set period\n // $this->periodos = $periodos;\n // # Return period\n // return $periodos;\n }", "public function getInterval()\n {\n\n }", "function payment_getRenewalPeriod($item) {\n\t\treturn constant(string_strtoupper($item).\"_RENEWAL_PERIOD\");\n\t}", "private function get_interval() {\n\t\treturn 7 * DAY_IN_SECONDS; // 7 days.\n\t}", "function get_amount($date) {\n global $debug;\n $val = null;\n $money = 0;\n //if ($debug) { echo \"comparing value range for this object: \"; print_r($item); }\n foreach ($this->list as $item) {\n if ($item->includes($date)) {\n $val = $item;\n }\n }\n if (!$val) {\n return $money;\n }\n $period = $val->period;\n switch ($period) {\n case 'weekly':\n // this is only debited once every week.\n // make sure it is a multiple of 1 week offset from $val->extra\n $offset_seconds = strtotime($date) - strtotime($val->extra);\n $offset_days = floor($offset_seconds / 86400);\n if ($offset_days % 7 == 0) {\n $money = $val->amount;\n }\n break;\n case 'biweekly':\n // this is only debited once every 2 weeks.\n // make sure it is a multiple of 2 weeks offset from $val->extra\n $offset_seconds = strtotime($date) - strtotime($val->extra);\n $offset_days = floor($offset_seconds / 86400);\n if ($offset_days % 14 == 0) {\n $money = $val->amount;\n }\n break;\n case 'monthly': \n // this is debited once per month\n // make sure the day of month matches the day from $val->extra\n $day_amount = date('d', strtotime($val->extra));\n $day_this = date('d', strtotime($date));\n if ($day_this == $day_amount) {\n $money = $val->amount;\n }\n break;\n case 'semiannual': \n // this is debited once per year\n // make sure the day matches the day from $val->extra\n $day_amount = date('m-d', strtotime($val->extra));\n $day_amount_semi = date('m-d', strtotime(\"+6 months\", strtotime($val->extra)));\n $day_this = date('m-d', strtotime($date));\n if ($day_this == $day_amount || $day_this == $day_amount_semi) {\n $money = $val->amount;\n }\n break;\n case 'annual': \n // this is debited once per year\n // make sure the day matches the day from $val->extra\n $day_amount = date('m-d', strtotime($val->extra));\n $day_this = date('m-d', strtotime($date));\n if ($day_this == $day_amount) {\n $money = $val->amount;\n }\n break;\n case 'once':\n // make sure date matches exactly with $val->extra\n if ($date == $val->extra) {\n $money = $val->amount;\n }\n break;\n case 'daily':\n // always return the same value\n $money = $val->amount;\n break;\n default:\n throw new Exception(\"unkown period '$period'\");\n }\n if ($debug) {\n printf(\"get_amount($date) $val->period, $val->amount, $val->extra -> $money\\n\");\n }\n return $money;\n }", "function recurring_period($recurringstart,$frequency)\n {\n if ($frequency == ILP_RECURRING_DAY){\n //$start\n $strstart = date(\"d-m-Y\",$recurringstart);\n $recurringend = strtotime(\"{$strstart} + 1 day\");\n if ( time() > $recurringstart && time() < $recurringend ) {\n return array('start'=>$recurringstart,'end'=>$recurringend);\n } else {\n return $this->recurring_period($recurringend,$frequency);\n }\n } else {\n $strstart = date(\"d-m-Y\",$recurringstart);\n $recurringend = strtotime(\"{$strstart} + $frequency weeks\");\n if ( time() > $recurringstart && time() < $recurringend ) {\n return array('start'=>$recurringstart,'end'=>$recurringend);\n } else {\n return $this->recurring_period($recurringend,$frequency);\n }\n }\n }", "public function getInvoicePeriod()\n {\n return $this->invoicePeriod;\n }", "public function getPeriod()\n\t{\n\t\treturn $this->period;\n\t}", "function intervalAdd($interval1,$interval2)\n{\n\n $e = new DateTime('00:00');\n $f = clone $e;\n $e->add($interval1);\n $e->add($interval2); \n\n return $f->diff($e);\n}", "private function ano()\n {\n\n $ano = date('Y');\n return $ano + 1;\n }", "function primer_dia_periodo() {\n\n $sql=\"select fecha_inicio from mocovi_periodo_presupuestario where actual=true\";\n $resul=toba::db('designa')->consultar($sql);\n return $resul[0]['fecha_inicio'];\n \n }", "public function getAdvance();", "function exibeAtualMin(){\n return $nmin= (($this->atual * $this->numpage) - $this->numpage)+1;\n }", "function _erpal_contract_helper_cancelation_precalculate_range() {\n return variable_get('cancelation_precalculate_range', 500);\n}", "function periodicite_evt($evt_tmp)\r\n{\r\n\tglobal $trad;\r\n\t////\tJours de la semaine\r\n\tif($evt_tmp[\"periodicite_type\"]==\"jour_semaine\"){\r\n\t\tforeach(explode(\",\",$evt_tmp[\"periodicite_valeurs\"]) as $jour)\t{ @$txt_jours .= $trad[\"jour_\".$jour].\", \"; }\r\n\t\treturn $trad[\"AGENDA_period_jour_semaine\"].\" : \".trim($txt_jours,\", \");\r\n\t}\r\n\t////\tJours du mois\r\n\tif($evt_tmp[\"periodicite_type\"]==\"jour_mois\"){\r\n\t\treturn $trad[\"AGENDA_period_jour_mois\"].\" : \".str_replace(\",\", \", \", $evt_tmp[\"periodicite_valeurs\"]);\r\n\t}\r\n\t////\tMois\r\n\tif($evt_tmp[\"periodicite_type\"]==\"mois\"){\r\n\t\tforeach(explode(\",\",$evt_tmp[\"periodicite_valeurs\"]) as $mois)\t\t{ @$txt_mois .= $trad[\"mois_\".round($mois)].\", \"; }\r\n\t\treturn $trad[\"AGENDA_period_mois\"].\" : \".$trad[\"le\"].\" \".strftime(\"%d\",strtotime($evt_tmp[\"date_debut\"])).\" \".trim($txt_mois,\", \");\r\n\t}\r\n\t////\tAnnée\r\n\tif($evt_tmp[\"periodicite_type\"]==\"annee\"){\r\n\t\treturn $trad[\"AGENDA_period_annee\"].\", \".$trad[\"le\"].\" \".strftime(\"%d %B\",strtotime($evt_tmp[\"date_debut\"]));\r\n\t}\r\n}", "public function getEffectivePeriod()\n {\n return $this->effectivePeriod;\n }", "protected function getPeriodicidad() {\n\t\treturn 'mensual';\n\t}", "public function processData()\n {\n \n $dateTimeStart = new DateTime($this->start);\n \n $dateEnd = $this->end;\n \n if (!$dateEnd) {\n $dateEnd = date('Y-m-d');\n }\n \n $dateTimeEnd = new DateTime($dateEnd);\n $this->yearEnd = $dateTimeEnd->format('Y');\n \n $beginYear = $dateTimeStart->format('Y');\n $this->yearStart = $beginYear;\n \n\n \n $numYears = $this->yearEnd - $this->yearStart;\n \n\n Log::debug( \"Start: {$this->yearStart} End: {$this->yearEnd} Num: {$numYears}\" );\n \n \n if (!$numYears) {\n $numYears = 1;\n }\n \n $this->allYears = [];\n \n for ($num = 0; $num <= $numYears; ++$num) {\n $this->allYears[] = $beginYear;\n ++$beginYear;\n }\n \n if (!$this->active) {\n $this->active = $this->yearEnd;\n }\n \n $active = $this->active;\n \n $this->yearBefore = $active-1;\n $this->yearAfter = $active+1;\n \n // ok ganz simple\n if (count($this->allYears) > 5) {\n\n \n if ($active + 2 >= $this->yearEnd) {\n $active = $this->yearEnd - 2;\n }\n \n if ( ($active - 2) <= $this->yearStart) {\n $active = $this->yearStart + 2;\n }\n \n $this->showYears[] = $active-2;\n $this->showYears[] = $active-1;\n $this->showYears[] = $active;\n $this->showYears[] = $active+1;\n $this->showYears[] = $active+2;\n \n } else {\n \n $this->showYears = $this->allYears;\n }\n \n $this->allYears = array_reverse($this->allYears);\n\n }", "public function getTotalDue();", "public function getNextDueExecution() {}", "function getLastPeriod($period) {\n $queryBuilder = $this->getQueryBuilder();\n $queryBuilder\n ->addSelect('i')\n ->andWhere('i.enabled = 1')\n ->andWhere('i.period = :periodo')\n ->andWhere('i.tmp = 0')\n ->orderBy('i.ref')\n ->setParameter('periodo', $period)\n ;\n //$queryBuilder->orderBy('i.ref');\n\n return $queryBuilder;\n }", "public function getPeriodSinceActive()\n {\n return $this->calculatePeriodDifference($this->last_active);\n }", "function obtain_invested_means_first_period_week($acc_number)\n\t{\n\t return $this->db->select()\n\t\t ->from('pamm_clients_statement') \n\t\t ->where(\"pamm_clients_stat_acc_number\",$acc_number)\n\t\t ->where(\"pamm_clients_stat_date < date_sub(curdate(),INTERVAL 7 DAY)\")\n\t\t ->get()->result();\n\t}", "public function getBaseTotalDue();", "function ultimo_dia_periodo() { \n\n $sql=\"select fecha_fin from mocovi_periodo_presupuestario where actual=true\";\n $resul=toba::db('designa')->consultar($sql); \n return $resul[0]['fecha_fin'];\n }", "function get_period_balance($cur='IDR',$acc=null,$month=null,$year=null,$emonth=null,$eyear=null)\n {\n// transactions.debit, transactions.credit, transactions.vamount, gls.approved');\n \n $this->db->select_sum('transactions.vamount');\n $this->db->select_sum('transactions.debit');\n $this->db->select_sum('transactions.credit');\n \n $this->db->from('gls, transactions, accounts');\n $this->db->where('gls.id = transactions.gl_id');\n $this->db->where('transactions.account_id = accounts.id');\n $this->cek_between_month($month, $emonth);\n $this->cek_between_year($year, $eyear);\n $this->db->where('gls.currency', $cur);\n// $this->db->where('MONTH(dates)', $month);\n// $this->db->where('YEAR(dates)', $year);\n $this->cek_null($acc,\"transactions.account_id\");\n $this->db->where('gls.approved', 1);\n $this->db->where('accounts.deleted', NULL);\n return $this->db->get(); \n }", "function fechaPrestacionXLimite($fprestacion, $fprest_limite) {\r\n $pr = ((strtotime($fprest_limite) - strtotime($fprestacion)) / 86400); //limite de la prestacion - fecha prestacion\r\n $ctrl_fechapresta['debito'] = false;\r\n if ($pr < 0) {\r\n\r\n $ctrl_fechapresta['debito'] = true;\r\n $ctrl_fechapresta['id_error'] = 71;\r\n $ctrl_fechapresta['msj_error'] = 'Fecha de Prestacion supera el limite para el periodo liquidado';\r\n }\r\n return $ctrl_fechapresta;\r\n}", "public function getActivationPeriodAttribute()\n {\n return [$this->{$this->starts_at_field}, $this->{$this->ends_at_field}];\n }", "function nextYear($interval=1){ return $this->_getDate(0,0,$interval); }", "public function getDateFin();", "public function periodoActual()\n\t{\n\t\t$sql = \"SELECT semesterId FROM course_module LEFT JOIN subject_module ON subject_module.subjectModuleId = course_module.subjectModuleId WHERE courseId = '{$this->courseId}' ORDER BY semesterId DESC LIMIT 1\"; \n\t\t$this->Util()->DB()->setQuery($sql);\n\t\t$periodo = $this->Util()->DB()->GetSingle();\n\t\treturn $periodo;\n\t}", "public function getInterval() {}", "function specified_time_intervals($p)\n{\n $patient = \\Session::get('active_patient');\n if (empty($patient->dob)) {\n return true;\n }\n $dob = \\Carbon\\Carbon::parse($patient->dob);\n\n $interval = null;\n $patient_age = null;\n $search = '-';\n\n $gender_specific = ReferenceRange::whereProcedure($p->id)\n ->where('age', 'LIKE', '%' . $search . '%')\n ->whereGender(strtolower($patient->sex))\n ->get();\n\n\n $ranges_default = ReferenceRange::whereProcedure($p->id)\n ->where('age', 'LIKE', '%' . $search . '%')\n ->whereGender('both')\n ->get();\n\n if ($gender_specific->count() > 0) {\n $interval = get_interval($gender_specific, $dob);\n } else {\n $interval = get_interval($ranges_default, $dob);\n }\n\n if (!empty($interval)) {\n return $interval;\n } else {\n return false;\n }\n}", "public function getPeriodto()\n {\n return $this->periodto;\n }", "function get_countdown_values()\n{\n\n $this->initialValues = new self();\n foreach ( $this->columns as $k => $v )\n {\n $this->initialValues->$k = $this->$k;\n }\n\t\t\n $current = new DateTime();\n if ( $this->vehicle->vehicle_code == \"AUT\" ) {\n $this->vehicle->vehicle_id = 0;\n $this->sch_rtpi_last_sent = \"P\"; // for \"Published\"\n if ( $this->predictionParameters->countdown_dep_arr == \"A\" ) {\n if ( $this->pub_eta_sent ) {\n $this->eta_last_sent = $this->pub_eta_sent;\n } else {\n $this->eta_last_sent = $this->rtpi_eta_sent;\n }\n } else {\n if ( $this->pub_etd_sent ) {\n $this->etd_last_sent = $this->pub_etd_sent;\n } else {\n $this->etd_last_sent = $this->rtpi_etd_sent;\n }\n }\n } else {\n $this->sch_rtpi_last_sent = \"R\"; // for \"Real-time\"\n if ( $this->predictionParameters->countdown_dep_arr == \"A\" ) {\n $this->eta_last_sent = $this->rtpi_eta_sent;\n } else {\n $this->etd_last_sent = $this->rtpi_etd_sent;\n }\n\n $currtime = new Datetime();\n $eta_last_sent = DateTime::createFromFormat(\"Y-m-d H:i:s\", $this->eta_last_sent);\n $etd_last_sent = DateTime::createFromFormat(\"Y-m-d H:i:s\", $this->etd_last_sent);\n\n//echo \"PP VAL \", $this->predictionParameters->pred_pub_after, \" \", $this->predictionParameters->disp_pub_after\n // if ( $vehicle more than x minutes away ) use published instead || $disp published instead\n if ( $this->predictionParameters->countdown_dep_arr == \"D\" ) {\n $l_comp_secs = $etd_last_sent->getTimestamp() - $current->getTimestamp();\n } else {\n $l_comp_secs = $eta_last_sent->getTimestamp() - $current->getTimestamp();\n }\n\n if ( $l_comp_secs > $this->predictionParameters->pred_pub_after ) {\n if ( $this->predictionParameters->countdown_dep_arr == \"A\" && $this->pub_eta_sent ) {\n $this->text = $this->text. \" SW->AP\". $l_comp_secs. \">\". $this->predictionParameters->pred_pub_after ;\n $this->sch_rtpi_last_sent = \"P\"; // \"Published\" instead of real-time\n $this->eta_last_sent = $this->pub_eta_sent;\n }\n if ( $this->predictionParameters->countdown_dep_arr == \"D\" && $this->pub_eta_sent ) {\n $this->text = $this->text. \" SW->DP\". $l_comp_secs . \">\". $this->predictionParameters->pred_pub_after;\n $this->sch_rtpi_last_sent = \"P\" ; // \"Published\" instead of real-time\n $this->etd_last_sent = $this->pub_etd_sent;\n }\n }\n\n if ( $l_comp_secs > $this->predictionParameters->disp_pub_after && $this->sch_rtpi_last_sent != \"P\" ) {\n $this->text = $this->text. \" SW->D\";\n $this->sch_rtpi_last_sent = \"P\";\n }\n }\n\n if ( $this->predictionParameters->countdown_dep_arr == \"D\" ) {\n $this->text = $this->text. UtilityDateTime::dateExtract($this->initialValues->etd_last_sent, \"hour to second\"). \"-\". $this->initialValues->sch_rtpi_last_sent;\n } else {\n $this->text = $this->text. UtilityDateTime::dateExtract($this->initialValues->eta_last_sent, \"hour to second\"). \"-\". $this->initialValues->sch_rtpi_last_sent;\n }\n\n}", "public function periodAction() {\n\tif($this->_getParam('id',false)) {\n $id = (int)$this->_getParam('id');\n $this->view->periods = $this->_reeces->getReecePeriodDetail($id);\n $emperors = new Emperors();\n $this->view->reeces = $emperors->getReeceDetail($id);\n $reverses = new RevTypes();\n $this->view->reverses = $reverses->getRevTypeReece($id); \n\t} else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n\t}\n }", "function extra_calc_scenario_two($base, $goal) {\n\tif ($base >= $goal) {\n\t\treturn 0;\n\t} else {\n\t\t$ce_db = access_db();\n\n\t\t$diff = $goal - $base;\n\t\t$curr_data = $_COOKIE['ce_info'];\n\t\t$pieces = explode(\"|\" , $curr_data);\n\t\t$account_id = $pieces[0];\n\t\t$account_name = $pieces[1];\n\t\t$game_id = $pieces[2];\n\t\t$period_id = $pieces[3];\n\t\t$company_id = $pieces[4];\n\t\t$plant_id = $pieces[5];\n\t\t$game_start_date = $pieces[6];\n\t\t$game_period_id = $pieces[7];\n\n\t\t$query = \"SELECT * FROM ce_game WHERE game_id = $game_id AND game_period_id = $game_period_id\";\n\t\t$result = $ce_db->get_results($query, ARRAY_A);\n\t\t$carbon_price = $result[\"carbon_price_last_perd\"];\n\n\n\t}\n}", "public function calculateNextValue() {}", "function calculateProrate($recurring_amount, $current_date, $cycle)\n {\n $next_due_date = $this->utils->getXmonthsAfter($cycle, $this->utils->getDateArray($current_date));\n $prorate_array = array();\n $prorate_array['prorate_amount']= 0;\n $prorate_array['due_date'] = $current_date;\n $prorate_array['next_bill_date']= $next_due_date['year'] . \"-\" . $next_due_date['mon'] . \"-\" . $next_due_date['mday'];\n if ($this->BL->conf['en_prorate'])\n {\n $d1 = $this->utils->getDateArray($current_date);\n $d2 = $this->utils->getDateArray($prorate_array['next_bill_date']);\n $prorate_day = $d1['year'] . \"-\" . $d1['mon'] . \"-\" . $this->BL->conf['prorate_date'];\n if ($d1['mday'] > $this->BL->conf['prorate_date'])\n {\n $prorate_day = $this->utils->beginOfNextMonth($d1['mday'], $d1['mon'], $d1['year'], '%Y-%m') . \"-\" . $this->BL->conf['prorate_date'];\n }\n $d3 = $this->utils->getDateArray($prorate_day);\n $days_in_cycle = $this->utils->dateDiff($d1['mday'], $d1['mon'], $d1['year'], $d2['mday'], $d2['mon'], $d2['year']);\n $prorate_days = $this->utils->dateDiff($d1['mday'], $d1['mon'], $d1['year'], $d3['mday'], $d3['mon'], $d3['year']);\n $amount_per_day= $recurring_amount / $days_in_cycle;\n $next_due_date = $this->utils->getXmonthsAfter($cycle, $this->utils->getDateArray($prorate_day));\n $prorate_array['prorate_amount'] = $this->utils->toFloat($amount_per_day * $prorate_days);\n $prorate_array['due_date'] = $prorate_day;\n $prorate_array['next_bill_date'] = $next_due_date['year'] . \"-\" . $next_due_date['mon'] . \"-\" . $next_due_date['mday'];\n $prorate_array['prorate_day'] = $prorate_day;\n }\n return $prorate_array;\n }", "function datePeriod_start_end($begin, $end)\n{\n $begin = new DateTime($begin);\n\n $end = new DateTime($end.' +1 day');\n\n $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);\n\n foreach ($daterange as $date) {\n $dates[] = $date->format(\"Y-m-d\");\n }\n return $dates;\n}", "#[Shortcut('walk')]\n\tfunction period(\n\t\tstring|DateTime|int $to_date,\n\t\tnull|string|DateInterval $step = null,\n\t\tbool $is_direct_only = true\n\t) {\n\t\t$left = $this;\n\t\t$right = $this->preparePeriodSideValue($to_date);\n\n\t\tif ($is_direct_only && $left > $right) {\n\t\t\t$_mid = $left;\n\t\t\t$left = $right;\n\t\t\t$right = $_mid;\n\t\t}\n\n\t\tif (is_null($step)) {\n\t\t\t$step = $left->diff($right);\n\t\t}\n\t\treturn $left->walk($right, $step);\n\t}", "function obtain_invested_means_first_period_month($acc_number)\n\t{\n\t return $this->db->select()\n\t\t ->from('pamm_clients_statement') \n\t\t ->where(\"pamm_clients_stat_acc_number\",$acc_number)\n\t\t ->where(\"pamm_clients_stat_date < date_sub(curdate(),INTERVAL 30 DAY)\")\n\t\t ->get()->result();\n\t}", "public function vacation_registerPT() {\n\t\t$colaboradores=$this->user_model->getPagination(null);\n\n\t\tforeach ($colaboradores as $colaborador):\n\t\t\t\n\t\t\t$aniversario = date('m-d',strtotime($colaborador->fecha_ingreso));\n\n\t\t\t$ingreso = new DateTime($colaborador->fecha_ingreso);\n\t\t\t$hoy = new DateTime(date('Y-m-d'));\n\t\t\t$diferencia = $ingreso->diff($hoy);\n\t\t\t$ingreso->add(new DateInterval('P'.$diferencia->y.'Y'));\n\t\t\t$actualidad = new DateTime($ingreso->format('Y-m-d'));\n\t\t\t$actualidad->add(new DateInterval('P18M'));\n\t\t\t$caducidad = $actualidad->format('Y-m-d');\n\t\t\t\n\t\t\techo $colaborador->id.\"<br>\".$colaborador->nombre.\"<br>Ingreso: \".$colaborador->fecha_ingreso.\"<br>Años: \".$diferencia->y.\"<br>Cumplimiento: \".$ingreso->format('Y-m-d').\"<br>Caducidad: \".$caducidad.\"<br><br>\";\n//-----------------------------\n\t\t\t/*echo \"<br>\".$colaborador->id.\"<br>\".$colaborador->nombre.\"<br>Ingreso: \".$colaborador->fecha_ingreso;\n\t\t\t$fecha = new DateTime($colaborador->fecha_ingreso);\n\n\t\t\t$hoy = new DateTime(date('Y-m-d'));\n\n\t\t\t\n\t\t\t$diff = $fecha->diff($hoy);\n\n\t\t\t$fecha->add(new DateInterval('P'.$diff->y.'Y'));\n\t\t\techo \"<br>Cumplimiento: \".$fecha->format('Y-m-d').\"<br> Años: \".$diff->y.\"<br>\";\n\t\t\t//echo \"<br>\".$diff->y;\n\n\t\t\t$fv = new DateTime($fecha->format('Y-m-d'));\n\t\t\t$fv->add(new DateInterval('P18M'));\n\t\t\techo \"Caducidad: \".$fv->format('Y-m-d').\"<br>\";*/\n\t\t\t//echo strtotime('+18 month',strtotime($colaborador->fecha_ingreso)).\"<br>\";\n\n\t\t\t/*$fecha = new DateTime($colaborador->fecha_ingreso);\n\t\t\t\t\techo $fecha->add(new DateInterval('P18M'))->format('Y-m-d').\"<br>\";*/\n\t\t// ---------------------------\n\n\t\t\tif($aniversario == date('m-d')):\n\n\t\t\t\t$ingreso=new DateTime($colaborador->fecha_ingreso);\n\t\t\t\t$hoy=new DateTime(date('Y-m-d'));\n\t\t\t\t$diff = $ingreso->diff($hoy);\n\t\t\t\t\n\t\t\t\tswitch ($diff->y):\n\t\t\t\t\tcase 0: $dias=0;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1: $dias=6;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2: $dias=8;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3: $dias=10;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4: $dias=12;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:case 6:case 7:case 8:case 9: $dias=14;\t\t\tbreak;\n\t\t\t\t\tcase 10:case 11:case 12:case 13:case 14: $dias=16;\t\tbreak;\n\t\t\t\t\tcase 15:case 16:case 17:case 18:case 19: $dias=18;\t\tbreak;\n\t\t\t\t\tcase 20:case 21:case 22:case 23:case 24: $dias=20;\t\tbreak;\n\t\t\t\t\tdefault: $dias=22;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tendswitch;\n\t\t\t\t\n\t\t\t\t$ingreso = new DateTime($colaborador->fecha_ingreso);\n\t\t\t\t$hoy = new DateTime(date('Y-m-d'));\n\t\t\t\t$diferencia = $ingreso->diff($hoy);\n\t\t\t\t$ingreso->add(new DateInterval('P'.$diferencia->y.'Y'));\n\t\t\t\t$actualidad = new DateTime($ingreso->format('Y-m-d'));\n\t\t\t\t$actualidad->add(new DateInterval('P18M'));\n\t\t\t\t$caducidad = $actualidad->format('Y-m-d');\n\n\t\t\t\tif($acumulados = $this->solicitudes_model->getAcumulados($colaborador->id)){\n\t\t\t\t\t\n\t\t\t\t\t/*$datos['dias_dos']=$dias;\n\t\t\t\t\t$datos['vencimiento_dos'] = strtotime('+18 month',strtotime($colaborador->fecha_ingreso));\n\t\t\t\t\t$datos['dias_acumulados'] = (int)$acumulados->dias_acumulados + (int)$dias;*/\n\n\t\t\t\t\t$datos['dias_dos'] = $dias;\n\t\t\t\t\t$datos['vencimiento_dos'] = $caducidad;\n\t\t\t\t\t$datos['dias_acumulados'] = (int)$acumulados->dias_acumulados + (int)$dias;\n\t\t\t\t\n\t\t\t\t}else{\n\n\t\t\t\t\t/*$datos['dias_uno']=$dias;\n\t\t\t\t\t$datos['vencimiento_uno'] = strtotime('+18 month',strtotime($colaborador->fecha_ingreso));\n\t\t\t\t\t$datos['dias_acumulados'] = $dias;*/\n\n\t\t\t\t\t$datos['dias_uno'] = $dias;\n\t\t\t\t\t$datos['vencimiento_uno'] = $caducidad;\n\t\t\t\t\t$datos['dias_acumulados'] = $dias;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->solicitudes_model->actualiza_dias_vacaciones($colaborador->id,$datos);\n\n\t\t\tendif;\n\n\t\tendforeach;\nexit;\n\t}", "protected function getDateInterval(){\n\n $dt = new \\DateTime();\n $dt->modify('-1 month');\n $interval['max'] = $dt->format('Ym');\n $dt->modify('-11 months');\n $interval['min'] = $dt->format('Ym');\n\n return $interval;\n }", "public function getAcademic()\n {\n $now = Carbon::now();\n\n $year = $now->year + 4;\n\n return ($now->month >= 8) ? ($year - 1911) : ($year - 1912);\n }", "public function upcomingCredit()\n {\n $where = \"(SELECT DATEDIFF(po.`due_date`, '$this->curDate') AS days) < 14 AND po.`status_paid` = 0\";\n $po = $this->db\n ->from('purchase_order po')\n ->join('principal p', 'p.id_principal = po.id_principal')\n ->where($where)\n ->order_by('po.id_purchase_order asc')\n ->get()\n ->result();\n return $po;\n }", "function get_end_of_trade_period($acc_number)\n\t{\n\t return $this->db->select('last_order_number')\n\t\t ->from('pamm_tp') \n\t\t ->where(\"number\",$acc_number)\n\t ->order_by('first_order_number', 'DESC')\n\t\t ->get()->result();\n\t}", "function get_yr_nxt($cur_date){\n $date_split=split(\"-\",$cur_date);\n return date(\"d-m-Y\",mktime (0,0,0,$date_split[1],$date_split[0],($date_split[2]+1)));\n }", "protected function getThisYearInterval(): array\n\t{\n\t\treturn [\n\t\t\tnew \\DateTime(date('Y-01-01', strtotime(date('Y-m-d')))),\n\t\t\tnew \\DateTime(date('Y-12-t', strtotime(date('Y-m-d'))))\n\t\t];\n\t}", "function WithinScope( $base, $relative_days ) {\n\n $ok_days = array();\n\n $ptr = $this->_current;\n\n// dbg_error_log( \"RRule\", \" WithinScope: Processing list of %d days relative to %s\", count($relative_days), $base->Render() );\n foreach( $relative_days AS $day => $v ) {\n\n $test = new iCalDate($base);\n $days_in_month = $test->DaysInMonth();\n\n// dbg_error_log( \"RRule\", \" WithinScope: Testing for day %d based on %s, with %d days in month\", $day, $test->Render(), $days_in_month );\n if ( $day > $days_in_month ) {\n $test->SetMonthDay($days_in_month);\n $test->AddDays(1);\n $day -= $days_in_month;\n $test->SetMonthDay($day);\n }\n else if ( $day < 1 ) {\n $test->SetMonthDay(1);\n $test->AddDays(-1);\n $days_in_month = $test->DaysInMonth();\n $day += $days_in_month;\n $test->SetMonthDay($day);\n }\n else {\n $test->SetMonthDay($day);\n }\n\n// dbg_error_log( \"RRule\", \" WithinScope: Testing if %s is within scope\", count($relative_days), $test->Render() );\n\n if ( isset($this->_part['UNTIL']) && $test->GreaterThan($this->_part['UNTIL']) ) {\n $this->_finished = true;\n return $ok_days;\n }\n\n // if ( $this->_current >= 0 && $test->LessThan($this->_dates[$this->_current]) ) continue;\n\n if ( !$test->LessThan($this->_first) ) {\n// dbg_error_log( \"RRule\", \" WithinScope: Looks like %s is within scope\", $test->Render() );\n $ok_days[$day] = $test;\n $ptr++;\n }\n\n if ( isset($this->_part['COUNT']) && $ptr >= $this->_part['COUNT'] ) {\n $this->_finished = true;\n return $ok_days;\n }\n\n }\n\n return $ok_days;\n }", "private function getLastPayPeriodEnd(){ $myq = getCurrentPayPeriod();\r\n $result = getQueryResult($this->config, $myq, $debug = false);\r\n $ppArray = $result->fetch_assoc();\r\n $startDate = $ppArray['PPBEG'];\r\n $this->lastPayStart = date('Y-m-d', strtotime('-14 days', strtotime($startDate)));\r\n $endDate = $ppArray['PPEND'];\r\n $this->lastPayEnd = date('Y-m-d', strtotime('-14 days', strtotime($endDate)));\r\n\r\n return $endDate;\r\n }", "public static function experienceCalculator($start_date,$end_date,$is_current){\n $start_date = strtotime($start_date);\n if ($is_current==1 && $end_date==\"Continue\"){\n $end_date = strtotime(date('Y-m-d'));\n }else{\n $end_date = strtotime($end_date);\n }\n $months = 0;\n $years = 0;\n while (strtotime('+1 MONTH', $start_date) < $end_date) {\n $months++;\n $start_date = strtotime('+1 MONTH', $start_date);\n if($months>11){\n $years++;\n $months=0;\n }\n }\n return $years.\" year, \". $months. ' month, '. ($end_date - $start_date) / (60*60*24). ' days';\n }", "function kv_get_recurrent_invoices($date = null)\n{\n // last_sent stores end date of last generated invoice _plus_ 1 (or is empty)\n if ($date) {\n $date = date2sql($date);\n // we can issue invoice after or at last day of covered period\n $sql = \"SELECT *, DATE_ADD(DATE_ADD(IF(`last_sent`='0000-00-00', `begin`, `last_sent`), INTERVAL `monthly` MONTH), INTERVAL `days` DAY) <= '$date'\n AND last_sent < DATE_ADD(`end`, INTERVAL 1 DAY) as overdue\";\n } else\n $sql = \"SELECT * \";\n\n $sql .= \" FROM \" . TB_PREF . \"recurrent_invoices ORDER BY description, group_no, debtor_no\";\n\n return db_query($sql, \"could not get recurrent invoices\");\n}", "public function getCurrentStatus() {\n\n date_default_timezone_set(\"Asia/Calcutta\");\n $time = date('H:i:s');\n $today = date('Y-m-d H:i:s');\n $numOfInstallments = DefaultData::getNumOfInstlByPeriodAndType($this->loan_period, $this->installment_type);\n $first_installment_date = '';\n $paid_aditional_interrest = 0;\n $total_paid_installment = 0;\n\n $INSTALLMENT = new Installment(NULL);\n\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\n $paid_aditional_interrest += $installment[\"additional_interest\"];\n $total_paid_installment = $total_paid_installment + $installment[\"paid_amount\"];\n }\n\n $loan_amount = $numOfInstallments * $this->installment_amount;\n $actual_due = $loan_amount - $total_paid_installment;\n\n //daily installment\n if ($this->installment_type == 30) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+1 day');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d ' . $time);\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n $last_od_amount = 0;\n $od_interest = 0;\n $allod = 0;\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FID = new DateTime($date);\n $FID->modify($modify_range);\n $day_remove = '-1 day';\n $FID->modify($day_remove);\n $second_installment_date = $FID->format('Y-m-d ' . $time);\n $amount = $this->installment_amount;\n $od_night = date(\"Y/m/d\");\n\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n // $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $od_total_amount;\n\n $balance = $paid_all_amount_before_ins_date - $ins_total;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $AllOd = $OD->allOdByLoan();\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n //get daily loan od amount \n if (!$AllOd || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($AllOd) {\n foreach ($AllOd as $key => $allod) {\n if (strtotime($allod['od_date_start']) <= strtotime($date) && strtotime($date) <= strtotime($allod['od_date_end']) && (-1 * ($allod['od_interest_limit'])) > $balance && $allod['od_interest_limit'] < $actual_due) {\n\n $ODDATES = new DateTime($date);\n $ODDATES->modify(' +23 hours +59 minutes +58 seconds');\n\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\n\n $paid_all_amount_before_ins_date1 = 0;\n $before_payment_amounts1 = $INSTALLMENT->getPaidAmountByBeforeDate($od_date_morning, $this->id);\n\n foreach ($before_payment_amounts1 as $before_payment_amount1) {\n $paid_all_amount_before_ins_date1 += $before_payment_amount1['paid_amount'];\n }\n\n $od_interest = $this->getOdIntereset1(-$ins_total + $paid_all_amount_before_ins_date1, $allod['od_interest_limit']);\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n }\n }\n }\n }\n $total_installment_amount += $installment_amount;\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n\n $start->modify($modify_range);\n $x++;\n\n //end of the installment \n if ($numOfInstallments == $x) {\n\n $ODDATES = new DateTime($date);\n $ODDATES->modify('+23 hours +59 minutes +58 seconds');\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\n\n //check log ends with od or installment\n $last_od_date = date('D/M/Y', strtotime($od_date_morning));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n if ($last_od_date == $last_installment_date) {\n $last_loop_od = $od_interest;\n } else {\n $last_loop_od = 0;\n }\n\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+1 day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n $days_between = floor(abs($end - $start) / 86400) - 1;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n $y = 0;\n\n $od_date_start1 = new DateTime($date);\n $od_date_start1->modify('+47 hours +59 minutes +58 seconds');\n\n $defult_val = $days_between;\n\n while ($y <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start1->format('Y-m-d H:i:s');\n //getting echo $od_date; before of date from current od date\n $OLDODDATE = new DateTime($od_date);\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_total_amount = (float) end($od_total);\n\n $od_date_start1->modify($od_dates);\n $y++;\n }\n }\n }\n }\n //weekly installment\n } else if ($this->installment_type == 4) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+7 day');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n\n $date = $start->format('Y-m-d ' . \" 00:00:01\");\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FIDS = new DateTime($date);\n $FIDS->modify($modify_range);\n $day_remove = '-2 seconds';\n\n $FIDS->modify($day_remove);\n $second_installment_date = $FIDS->format('Y-m-d H:i:s');\n\n\n $amount = $this->installment_amount;\n $od_night = date(\"Y/m/d\");\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n $balance = $paid_all_amount_before_ins_date - $ins_total;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total || $actual_due < $od['od_interest_limit']) {\n \n } else {\n if ($od !== false) {\n\n // Declare and define two dates \n $ins_date1 = strtotime($date);\n $ins_date2 = strtotime($second_installment_date);\n\n // Formulate the Difference between two dates \n $diff = abs($ins_date2 - $ins_date1);\n\n $daysbetween = floor(($diff - (floor($diff / (365 * 60 * 60 * 24))) * 365 * 60 * 60 * 24 -\n (floor(($diff - (floor($diff / (365 * 60 * 60 * 24))) * 365 * 60 * 60 * 24) / (30 * 60 * 60 * 24))) * 30 * 60 * 60 * 24) / (60 * 60 * 24));\n\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\n\n $y = 0;\n $od_date_start = new DateTime($date);\n $od_date_start->modify('+23 hours +59 minutes +58 seconds');\n $defult_val = $daysbetween;\n\n while ($y <= $defult_val) {\n\n if ($defult_val <= $daysbetween && $od['od_date_start'] <= $od_date_start) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start->format('Y-m-d H:i:s');\n\n //// od dates range\n $ODDATES = new DateTime($od_date);\n $ODDATES->modify($od_dates);\n\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\n\n $ODDATES->modify($od_date_remove);\n $od_night = $ODDATES->format('Y-m-d H:i:s');\n\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date)) || strtotime($od['od_date_end'] . $time) <= strtotime($od_date)) {\n break;\n }\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n \n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_date_start->modify($od_dates);\n $y++;\n }\n }\n }\n }\n\n if (strtotime(date(\"Y/m/d\")) . \" \" . $time == $date) {\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n } else {\n if (strtotime(date(\"Y/m/d\")) < strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n }\n\n\n $start->modify($modify_range);\n $x++;\n\n if ($numOfInstallments == $x) {\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+7 day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n\n $days_between = floor(abs($end - $start) / 86400) - 1;\n\n $z = 0;\n\n $od_date_start1 = new DateTime($od_night);\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\n $defult_val = $days_between;\n\n\n //if having od after installment end\n if ($od !== false) {\n\n $last_od_date = date('D/M/Y', strtotime($od_night));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n if ($last_od_date == $last_installment_date) {\n $last_loop_od = $od_interest;\n } else {\n $last_loop_od = 0;\n }\n\n while ($z <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date1 = $od_date_start1->format('Y-m-d H:i:s');\n\n //getting brfore of date from current od date\n $OLDODDATE = new DateTime($od_date1);\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($old_od_date) || strtotime(date(\"Y/m/d\")) <= strtotime($od_date1)) {\n break;\n }\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_total_amount = (float) end($od_total);\n\n $od_date_start1->modify($od_dates);\n $z++;\n }\n }\n }\n }\n } else if ($this->installment_type == 1) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+1 months');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $no_of_installments = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d H:i:s');\n\n $paid_amount = 0;\n $last_od_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n $amount = $this->installment_amount;\n\n $FIDS = new DateTime($date);\n $FIDS->modify($modify_range);\n $day_remove = '-2 seconds';\n\n $FIDS->modify($day_remove);\n $second_installment_date = $FIDS->format('Y-m-d H:i:s');\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n $od_night = date(\"Y/m/d\");\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $od_total_amount;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($od !== false) {\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\n\n $y = 0;\n //get month and year from inst date\n $dateValue = strtotime($date);\n $year = date(\"Y\", $dateValue);\n $month = date(\"m\", $dateValue);\n\n $daysOfMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n\n $od_date_start = new DateTime($date);\n\n $od_date_start->modify('+23 hours +59 minutes +58 seconds');\n\n $defult_val = $daysOfMonth - 1;\n\n while ($y <= $defult_val) {\n\n if ($defult_val <= $daysOfMonth - 1 && $this->od_date <= $od_date_start) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start->format('Y-m-d H:i:s');\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date))) {\n break;\n }\n\n $ODDATES = new DateTime($od_date);\n $ODDATES->modify($od_dates);\n\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\n\n $ODDATES->modify($od_date_remove);\n\n $od_night = $ODDATES->format('Y-m-d H:i:s');\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n array_push($od_total, $od_amount_all);\n array_push($od_amount_all_array, $od_interest);\n\n $od_date_start->modify($od_dates);\n $y++;\n }\n }\n }\n }\n\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n\n $start->modify($modify_range);\n $x++;\n\n\n if ($numOfInstallments == $x) {\n\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+' . $daysOfMonth . ' day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n\n $days_between = floor(abs($end - $start) / 86400) - 1;\n\n $z = 0;\n\n $od_date_start1 = new DateTime($od_night);\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\n\n $defult_val = $days_between;\n\n //if having od after installment end\n if ($od !== false) {\n\n $last_od_date = date('D/M/Y', strtotime($od_night));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n// $od_amount_all_array_1 = array();\n while ($z <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date1 = $od_date_start1->format('Y-m-d');\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date1))) {\n break;\n }\n //getting brfore of date from current od date\n $OLDODDATE = new DateTime($od_date1);\n\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n $od_array[] = $od_interest;\n\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_date_start1->modify($od_dates);\n $z++;\n }\n }\n }\n }\n }\n\n $INSTALLMENT = new Installment(NULL);\n $total_paid_installment = 0;\n $paid_aditional_interrest = 0;\n\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\n $paid_aditional_interrest += $installment[\"additional_interest\"];\n $total_paid_installment = $total_paid_installment + $installment[\"paid_amount\"];\n }\n\n $last_od_amount_balance = $od_total_amount - $paid_aditional_interrest;\n\n $all_arress = ($total_paid_installment ) - ($total_installment_amount) - $od_total_amount;\n $system_due = $loan_amount - $total_installment_amount;\n $system_due_num_of_ins = $system_due / $this->installment_amount;\n $actual_due_num_of_ins = $actual_due / $this->installment_amount;\n\n\n\n return [\n 'od_amount' => $od_total_amount,\n 'all_arress' => $all_arress,\n 'all_amount' => $balance,\n 'system-due-num-of-ins' => $system_due_num_of_ins,\n 'system-due' => $system_due,\n 'actual-due-num-of-ins' => $actual_due_num_of_ins,\n 'actual-due' => $actual_due,\n 'receipt-num-of-ins' => $total_paid_installment / $this->installment_amount,\n 'receipt' => $total_paid_installment + $paid_aditional_interrest,\n 'arrears-excess-num-of-ins' => ($total_installment_amount - $total_paid_installment) / $this->installment_amount,\n 'arrears-excess' => ($total_installment_amount) - ($total_paid_installment),\n 'installment_amount' => $amount,\n ];\n }", "function get_installment($rate, $pricipal, $installment, $interest_method = 1, $interval = 1) {\n\n $amount = 0;\n $rate_required = 0;\n if ($interval == 1) {\n //monthly\n $rate_required = (($rate / 12) / 100);\n }else if($interval == 2){\n //weekly\n $rate_required = (($rate / 52) / 100); \n }\n\n if ($interest_method == 1) {\n $up = pow((1 + $rate_required), $installment);\n\n $down = (pow((1 + $rate_required), $installment) - 1);\n\n $amount = (($pricipal * ($up / $down)) * $rate_required);\n } else if ($interest_method == 2) {\n $interest_per_month = $rate_required * $pricipal;\n $amount = ($pricipal / $installment) + $interest_per_month;\n }\n\n return round($amount, 2);\n }", "function getOverallOrderRemain(){\n\t\t$t=0;\n\t\t$a = Order::all();\n\t\tforeach($a as $n){\n\t\t$dur= $n->qty;\n\t\t$sl =Order::where('payment', 'verified')->count();\n\t\t$r=intVal($sl);\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "function get_periodos_activos (){\n \n $fecha=date('Y-m-d');\n $anio_lectivo=date('Y');\n \n $sql_1=\"SELECT t_p.id_periodo,\n t_c.numero || ' ' || 'CUATRIMESTRE' as descripcion \n FROM periodo t_p \n JOIN cuatrimestre t_c ON (t_p.id_periodo=t_c.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)))\";\n $cuatrimestre=toba::db('gestion_aulas')->consultar($sql_1);\n \n $sql_2=\"SELECT t_p.id_periodo,\n 'TURNO DE EXAMEN' || ' ' || t_ef.turno || ' ' || t_ef.numero || ' ' || 'LLAMADO' as descripcion\n FROM periodo t_p \n JOIN examen_final t_ef ON (t_p.id_periodo=t_ef.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)))\";\n $examen_final=toba::db('gestion_aulas')->consultar($sql_2);\n \n $sql_3=\"SELECT t_p.id_periodo,\n 'CURSO DE INGRESO' || ' ' || t_ci.facultad || ' ' || t_ci.nombre as descripcion\n FROM periodo t_p \n JOIN curso_ingreso t_ci ON (t_p.id_periodo=t_ci.id_periodo AND t_p.anio_lectivo=$anio_lectivo\n AND (('$fecha' <= t_p.fecha_inicio) OR ('$fecha' BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)) )\";\n $curso_ingreso=toba::db('gestion_aulas')->consultar($sql_3);\n \n $this->unificar_periodos(&$cuatrimestre, $examen_final);\n \n $this->unificar_periodos(&$cuatrimestre, $curso_ingreso);\n \n return $cuatrimestre; \n \n }", "function get_dy_nxt($cur_date){\n $date_split=split(\"-\",$cur_date);\n return date(\"d-m-Y\",mktime (0,0,0,$date_split[1],($date_split[0]+ 1),$date_split[2]));\n }", "function &GetNext( ) {\n\n if ( $this->_current < 0 ) {\n $next = new iCalDate($this->_first);\n $this->_current++;\n }\n else {\n $next = new iCalDate($this->_dates[$this->_current]);\n $this->_current++;\n\n /**\n * If we have already found some dates we may just be able to return one of those.\n */\n if ( isset($this->_dates[$this->_current]) ) {\n// dbg_error_log( \"RRule\", \" GetNext: Returning %s, (%d'th)\", $this->_dates[$this->_current]->Render(), $this->_current );\n return $this->_dates[$this->_current];\n }\n else {\n if ( isset($this->_part['COUNT']) && $this->_current >= $this->_part['COUNT'] ) // >= since _current is 0-based and COUNT is 1-based\n $this->_finished = true;\n }\n }\n\n if ( $this->_finished ) {\n $next = null;\n return $next;\n }\n\n $days = array();\n if ( isset($this->_part['WKST']) ) $next->SetWeekStart($this->_part['WKST']);\n if ( $this->_part['FREQ'] == \"MONTHLY\" ) {\n// dbg_error_log( \"RRule\", \" GetNext: Calculating more dates for MONTHLY rule\" );\n $limit = 200;\n do {\n $limit--;\n do {\n $limit--;\n if ( $this->_started ) {\n $next->AddMonths($this->_part['INTERVAL']);\n }\n else {\n $this->_started = true;\n }\n }\n while ( isset($this->_part['BYMONTH']) && $limit > 0 && ! $next->TestByMonth($this->_part['BYMONTH']) );\n\n if ( isset($this->_part['BYDAY']) ) {\n $days = $next->GetMonthByDay($this->_part['BYDAY']);\n }\n else if ( isset($this->_part['BYMONTHDAY']) ) {\n $days = $next->GetMonthByMonthDay($this->_part['BYMONTHDAY']);\n }\n else\n $days[$next->_dd] = $next->_dd;\n\n if ( isset($this->_part['BYSETPOS']) ) {\n $days = $next->ApplyBySetpos($this->_part['BYSETPOS'], $days);\n }\n\n $days = $this->WithinScope( $next, $days);\n }\n while( $limit && count($days) < 1 && ! $this->_finished );\n// dbg_error_log( \"RRule\", \" GetNext: Found %d days for MONTHLY rule\", count($days) );\n\n }\n else if ( $this->_part['FREQ'] == \"WEEKLY\" ) {\n// dbg_error_log( \"RRule\", \" GetNext: Calculating more dates for WEEKLY rule\" );\n $limit = 200;\n do {\n $limit--;\n if ( $this->_started ) {\n $next->AddDays($this->_part['INTERVAL'] * 7);\n }\n else {\n $this->_started = true;\n }\n\n if ( isset($this->_part['BYDAY']) ) {\n $days = $next->GetWeekByDay($this->_part['BYDAY'], false );\n }\n else\n $days[$next->_dd] = $next->_dd;\n\n if ( isset($this->_part['BYSETPOS']) ) {\n $days = $next->ApplyBySetpos($this->_part['BYSETPOS'], $days);\n }\n\n $days = $this->WithinScope( $next, $days);\n }\n while( $limit && count($days) < 1 && ! $this->_finished );\n\n// dbg_error_log( \"RRule\", \" GetNext: Found %d days for WEEKLY rule\", count($days) );\n }\n else if ( $this->_part['FREQ'] == \"DAILY\" ) {\n// dbg_error_log( \"RRule\", \" GetNext: Calculating more dates for DAILY rule\" );\n $limit = 100;\n do {\n $limit--;\n if ( $this->_started ) {\n $next->AddDays($this->_part['INTERVAL']);\n }\n\n if ( isset($this->_part['BYDAY']) ) {\n $days = $next->GetWeekByDay($this->_part['BYDAY'], $this->_started );\n }\n else\n $days[$next->_dd] = $next->_dd;\n\n if ( isset($this->_part['BYSETPOS']) ) {\n $days = $next->ApplyBySetpos($this->_part['BYSETPOS'], $days);\n }\n\n $days = $this->WithinScope( $next, $days);\n $this->_started = true;\n }\n while( $limit && count($days) < 1 && ! $this->_finished );\n\n// dbg_error_log( \"RRule\", \" GetNext: Found %d days for DAILY rule\", count($days) );\n }\n\n $ptr = $this->_current;\n foreach( $days AS $k => $v ) {\n $this->_dates[$ptr++] = $v;\n }\n\n if ( isset($this->_dates[$this->_current]) ) {\n// dbg_error_log( \"RRule\", \" GetNext: Returning %s, (%d'th)\", $this->_dates[$this->_current]->Render(), $this->_current );\n return $this->_dates[$this->_current];\n }\n else {\n// dbg_error_log( \"RRule\", \" GetNext: Returning null date\" );\n $next = null;\n return $next;\n }\n }", "protected function getTimePeriods() {\n return array(\n '604800', //7 days \n '2678400', //31 days\n '15552000' //180 dats\n );\n }", "function previousYear($interval=1){ return $this->_getDate(0,0,-$interval); }", "function genUpcomingInvoices($order_id)\n {\n $conf = $this->BL->conf;\n // $conf['u_invoice_date'] is how many months in advance to generate upcoming invoices\n if ($conf['u_invoice_date'] > 0)\n {\n // Force generated invoices to be status \"Upcoming\"\n $this->REQUEST['force_status'] = $this->props->invoice_status[5];\n\n $echo = \"\";\n $continue = false;\n\n $temp = $this->BL->recurring_data($order_id, 0, \"SELECT\");\n $next_due_date = $temp['rec_next_date'];\n $next_due_date_array= $this->utils->getDateArray($next_due_date);\n $restore_actual_due = $next_due_date; //restore later\n\n $delta_date = ($conf['u_invoice_date'] > 12)?floor($conf['u_invoice_date'] / 30):$conf['u_invoice_date'];\n $max_upcoming_date_array = $this->utils->getXmonthsAfter($delta_date, getdate());\n $max_upcoming_date = date('Y-m-d', strtotime($max_upcoming_date_array['year'] . \"-\" . $max_upcoming_date_array['mon'] . \"-\" . $max_upcoming_date_array['mday']));\n\n if ($this->utils->compareDates(\n $max_upcoming_date_array['mday'],$max_upcoming_date_array['mon'],$max_upcoming_date_array['year'],\n $next_due_date_array['mday'], $next_due_date_array['mon'],$next_due_date_array['year'])\n !=-1) // If $max_upcoming_date_arr >= $next_due_date_array\n {\n $continue = true;\n }\n\n while ($continue && $next_due_date<$max_upcoming_date)\n {\n $echo .= \"$next_due_date\\n\";\n $echo .= $this->genInvoice($order_id);\n $temp = $this->BL->recurring_data($order_id, 0, \"SELECT\");\n\n $rec_next_date_array = $this->utils->getDateArray($temp['rec_next_date']);\n $next_due_date_array = $this->utils->getDateArray($next_due_date);\n\n $date_compare1 = $this->utils->compareDates($max_upcoming_date_array['mday'],$max_upcoming_date_array['mon'],$max_upcoming_date_array['year'],$rec_next_date_array['mday'],$rec_next_date_array['mon'],$rec_next_date_array['year']);\n $date_compare2 = $this->utils->compareDates($rec_next_date_array['mday'],$rec_next_date_array['mon'],$rec_next_date_array['year'],$next_due_date_array['mday'],$next_due_date_array['mon'],$next_due_date_array['year']);\n\n if($temp['rec_next_date']<$max_upcoming_date && $temp['rec_next_date']!=$next_due_date)\n {\n $next_due_date = $temp['rec_next_date'];\n }\n else\n {\n $continue = false;\n }\n }\n\n // Restore proper due date\n $sqlUPDATE = \"UPDATE {$this->props->tbl_ord_inv_recs} SET `rec_next_date`='\" . $restore_actual_due . \"' WHERE `rec_ord_id`=\" . intval($order_id);\n $this->dbL->executeUPDATE($sqlUPDATE);\n $echo .= \"Restored due date\\n\";\n }\n return $echo;\n }", "function interestPerCycle($principal, $intRateFactor, $termLength)\n{\n # At the start of the cycle, calculate 30 days of interest and add to principal\n $simple_daily_int = $principal * $intRateFactor;\n # Interest to add equals simple daily interest * days since last payment (30)\n $int_to_add = $simple_daily_int * $termLength;\n return $int_to_add;\n}", "function calc_upgrade($blog_id, $new_amt, $new_level, $new_period) {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$old = $wpdb->get_row(\"SELECT expire, level, term, amount FROM {$wpdb->base_prefix}pro_sites WHERE blog_ID = '$blog_id'\");\r\n\t\tif (!$old)\r\n\t\t\treturn false;\r\n\r\n\t\t//if level is not being raised not an upgrade\r\n\t\tif ($new_level <= $old->level)\r\n\t\t return false;\r\n\r\n\t //some complicated math calculating the prorated amt left and applying it to the price of new plan\r\n\t $diff = $old->expire - time();\r\n\t $duration = $old->term * 30.4166 * 24 * 60 * 60; //number of seconds in the period\r\n\t $left = $duration - ($duration - $diff);\r\n\t if ($left <= 0 || empty($old->amount) || $old->amount <= 0)\r\n\t return false;\r\n\t $prorate_amt = $old->amount * ($left / $duration);\r\n\t $new_duration = $new_period * 30.4166 * 24 * 60 * 60; //number of seconds in the period\r\n\t $first_payment = ($prorate_amt / ($new_amt / $new_duration)) + time(); //return timestamp of first payment date\r\n $first_payment = intval(round($first_payment));\r\n\r\n\t return ($first_payment > time()) ? $first_payment : false;\r\n\t}", "public function getAccelerationPeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ACCELERATION_PERIOD, $payload);\n\n $payload = unpack('V1period', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['period']);\n }", "public function getValidUntil() {\n\t\treturn $this->stamp+Vote::getValidDays()*24*60*60;\n\t}", "function happyBirthday(){\n ++$this->age;\n }", "function get_mnt_nxt($cur_date){\n $date_split=split(\"-\",$cur_date);\n return date(\"d-m-Y\",mktime (0,0,0,($date_split[1]+1),$date_split[0],$date_split[2]));\n }", "protected function calculatePeriods()\n {\n foreach ($this->periods as $period) {\n if ($this->isPeriodAssociatedToBooking($period)) {\n // If this period was already associated to the booking, then we will\n // have to use the pricing at the point when the booking was created\n // for the calculation.\n\n $total = $this->getBookingPeriodPricing($period) * $this->quantity;\n }\n else {\n // If it isn't we will use the period's latest pricing.\n\n $total = $period->pivot->unit_price * $this->quantity;\n }\n\n $this->periodsTotal += $total;\n\n $this->addCalculatedPeriod($period, $total);\n }\n }", "public function takePostBaseOnMonth();", "function getHoursDelayByGid($db, $gid)\n{\n $isnext = 1;\n $delay = 0;\n $inFollowing = 0;\n $sql = \"select sum(horas_retraso),max(horas_retraso),avg(horas_retraso),\n count(contacto_id) from reporte_contactos_asignados where gid='$gid'\n and en_seguimiento='$isnext' and uid > 0\";\n $result = $db->sql_query($sql);\n list($sum, $max, $avg ,$inFollowing) = $db->sql_fetchrow($result);\n if($inFollowing== \"\") $inFollowing=0;\n return array(\"sum\" => $sum, \"max\" => $max, \"avg\" =>$avg, \"follow\" => $inFollowing);\n}", "function existe_periodo ($datos){\n //obtenemos los dias del periodo con el siguiente formato: \n // dias => Array( indice => DiaSeleccionado); Indice empieza en cero\n $dias=$datos['dias']; \n $cuatrimestre=$this->obtener_cuatrimestre();\n $fecha= getdate();\n $anio=$fecha['year'];\n $resultado=TRUE;\n $i=0;\n $longitud=count($dias);\n //Incluir en el join de asignacion_periodo : AND (t_p.fecha_inicio BETWEEN '{$datos['fecha_inicio']}' AND '{$datos['fecha_fin']}')\n while (($i < $longitud) && $resultado){\n// $sql=\"(SELECT t_a.id_asignacion, t_a.finalidad, t_a.hora_inicio, t_a.hora_fin \n// FROM asignacion t_a \n// JOIN aula t_au ON (t_a.id_aula=t_au.id_aula) \n// JOIN asignacion_periodo t_p ON (t_a.id_asignacion=t_p.id_asignacion ) \n// JOIN esta_formada t_f ON (t_p.id_asignacion=t_f.id_asignacion) \n// WHERE t_f.nombre='{$dias[$i]}' AND t_f.cuatrimestre=$cuatrimestre AND t_f.anio=$anio AND t_au.id_aula={$datos['id_aula']} AND ('{$datos['hora_inicio']}' BETWEEN t_a.hora_inicio AND t_a.hora_fin) AND ('{$datos['hora_fin']}' BETWEEN t_a.hora_inicio AND t_a.hora_fin) ) \n// \n// UNION \n// \n// (SELECT t_a.id_asignacion, t_a.finalidad, t_a.hora_inicio, t_a.hora_fin \n// FROM asignacion t_a \n// JOIN aula t_au ON (t_a.id_aula=t_au.id_aula) \n// JOIN asignacion_definitiva t_d ON (t_a.id_asignacion=t_d.id_asignacion)\n// WHERE t_d.nombre='{$dias[$i]}' AND t_d.cuatrimestre=$cuatrimestre AND t_d.anio=$anio AND t_a.id_aula={$datos['id_aula']} AND ('{$datos['hora_inicio']}' BETWEEN t_a.hora_inicio AND t_a.hora_fin) AND ('{$datos['hora_fin']}' BETWEEN t_a.hora_inicio AND t_a.hora_fin) )\";\n// $asignacion=toba::db('gestion_aulas')->consultar($sql);\n $asignaciones=$this->dep('datos')->tabla('asignacion')->get_asignaciones_por_aula($dias[$i], $cuatrimestre, $anio, $datos['id_aula']);\n \n print_r(\"<br><br>Estas son las asignaciones para el dia {$dias[$i]} : <br>\");\n foreach ($asignaciones as $clave=>$valor){\n print_r(\"{$valor['hora_inicio']} {$valor['hora_fin']}\");\n }\n //el formato de este arreglo es : indice => array('id_aula'=>x 'aula'=>y). La función solamente\n //requiere el id_aula\n $aulas=array(array('id_aula'=>$datos['id_aula']));\n \n //obtenemos un arreglo con todos los horarios disponibles\n $horarios_disponibles=$this->obtener_horarios_disponibles($aulas, $asignaciones);\n \n if(!$this->verificar_inclusion_de_horario($datos['hora_inicio'], $datos['hora_fin'])){\n $resultado=FALSE;\n }\n print_r(\"<br><br> Este es el valor de resultado : $resultado <br><br>\");\n $this->s__horarios_disponibles=array();\n $i += 1;\n }\n \n return $resultado;\n }", "public function getYearsOfService() {\n if (!empty($this->hireDate)) {\n if (!empty($this->departureDate)) {\n return $this->departureDate->diff($this->hireDate)->y;\n }\n return $this->hireDate->diff(new \\DateTime('now'))->y;\n }\n return 0;\n }", "public function period_fun($type){\n\t\tif($type == 'D'){\n\t\t\t$st = 'Daily';\n\t\t}else if($type == 'M'){\t\n\t \t\t$st = 'Monthly';\n\t\t}else if($type == 'H'){\n\t\t\t$st = 'Half yearly';\n\t\t}\n\t\treturn $st;\n\t}", "public function period()\n {\n return $this->hasOne(Period::class, 'id', 'id');\n }", "function total_intervals($unit, DeteInterval ...$intervals) {\n $time = 0;\n foreach ($intervals as $interval) {\n $time += $interval->$unit;\n }\n return $time;\n}", "public function definePeriod($period)\n {\n return $period;\n }", "public function get_recurring_period(){\n\t\treturn $this->payment['recurring_period'];\n\t}", "public function validateByGracePeriod() : void\n {\n if (!is_null($this->grace_period_ends)) {\n if (($this->charge_date == $this->grace_period_ends) && !$this->paid) {\n $this->is_active = 0;\n $this->grace_period_ends = Carbon::now()->addDays(Subscription::DEFAULT_GRACE_PERIOD_DAYS)->toDateTimeString();\n }\n } else {\n $this->grace_period_ends = Carbon::now()->addDays(Subscription::DEFAULT_GRACE_PERIOD_DAYS)->toDateTimeString();\n }\n }" ]
[ "0.6753113", "0.6589556", "0.6134364", "0.583444", "0.56457555", "0.5626334", "0.5539664", "0.54743356", "0.54684734", "0.5467975", "0.5451581", "0.541998", "0.54100794", "0.5384997", "0.53394157", "0.5335455", "0.5325753", "0.5322742", "0.5322742", "0.5322742", "0.5322742", "0.5290791", "0.5278572", "0.5268969", "0.5256439", "0.52458584", "0.52280116", "0.52225167", "0.52127206", "0.5206061", "0.5201725", "0.51969475", "0.5194081", "0.5193598", "0.5177108", "0.5164348", "0.5157686", "0.5153937", "0.51536375", "0.5142088", "0.51353645", "0.5128916", "0.51221156", "0.51152587", "0.5095742", "0.50939316", "0.5091876", "0.50881684", "0.50874114", "0.5059597", "0.505018", "0.5043364", "0.5041289", "0.50288045", "0.50273466", "0.50257707", "0.5014036", "0.50028956", "0.4999948", "0.49942476", "0.49938965", "0.49829537", "0.49823448", "0.49789762", "0.4974175", "0.49705896", "0.4969936", "0.49484625", "0.4944866", "0.49445412", "0.49439088", "0.493719", "0.49329785", "0.49328023", "0.4929467", "0.4926731", "0.49240285", "0.49234605", "0.49113798", "0.49037763", "0.49004394", "0.489193", "0.48917988", "0.48882824", "0.48874664", "0.48815438", "0.48765272", "0.487629", "0.48744038", "0.48682848", "0.48678008", "0.48638684", "0.485759", "0.48558173", "0.4848964", "0.48484576", "0.48477995", "0.4847525", "0.48393974", "0.48360804", "0.4835456" ]
0.0
-1
/ showNotes Serve the notes dashboard.
public function showNotes() { return view('notes-dashboard'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listNotesPage()\n {\n $notes = Note::select('id', 'note')->orderBy('id', 'desc')->get();\n foreach ($notes as $note) {\n $note->originalNote = $note->getOriginal('note');\n }\n\n return view('admin.listnotes', ['notes' => $notes]);\n }", "public function show(SubjectNotes $subjectNotes)\n {\n //\n }", "public function show(SubjectNotes $subjectNotes)\n {\n //\n }", "public function index()\n {\n $notes = auth()->user()->notes()->get();\n\n return view('notes')->with(['notes'=>$notes]);\n }", "public function show(Note $note)\n {\n //\n }", "public function show(Note $note)\n {\n //\n }", "public function show(Note $note)\n {\n //\n }", "public function show(Note $note)\n {\n //\n }", "public function show(Note $note)\n {\n //\n }", "public function noteIndex(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $items = $this->Notes->index($user);\n }", "public function noteIndex(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $items = $this->Notes->index($user); \n }", "public function notesAction() {\n\t$notes = new Findofnotereasons();\n\t$this->view->notes = $notes->getReasonsList();\n\t}", "function __viewNotes()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //show text view\n $this->data['visible']['wi_my_note_view'] = 1;\n\n //check if team member has a note for this project\n $notes = $this->mynotes_model->checkNotes($this->project_id, $this->data['vars']['my_id']);\n\n //do it have a note for this project, if not create a blank one\n if ($notes === 0) {\n $this->mynotes_model->newNote($this->project_id, $this->data['vars']['my_id']);\n $this->data['debug'][] = $this->mynotes_model->debug_data;\n }\n\n //reload notes again\n //load team members first\n $this->data['reg_fields'][] = 'mynotes';\n $this->data['fields']['mynotes'] = $this->mynotes_model->getNotes($this->project_id, $this->data['vars']['my_id']);\n $this->data['debug'][] = $this->mynotes_model->debug_data;\n\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n $notes = $this->repository->all();\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $notes,\n ]);\n }\n\n return view('notes.index', compact('notes'));\n }", "public function index()\n {\n $note = Note::all();\n }", "public function index()\n {\n $notes = request()->user()->notes()->paginate(20);\n return NoteResource::collection($notes)->additional([\n 'message' => \"Notes retrieved successfully\",\n 'status' => \"success\"\n ]);\n }", "public function index()\n {\n return Notes::all();\n }", "public function index()\n {\n $contents = Content::where( 'parent_id', 0 )->get();\n\n return view('admin.note.index', compact('contents'));\n }", "public function index()\n {\n $notes = Note::all();\n\n return $this->successReponse($notes);\n }", "public function showSysNotesForPage()\t{\n\t\tglobal $TCA;\n\n\t\t$out='';\n\n\t\t\t// Checking if extension is loaded:\n\t\tif (!t3lib_extMgm::isLoaded('sys_note'))\treturn '';\n\n\t\t\t// Create query for selecting the notes:\n\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','sys_note','pid IN ('.$this->id.') AND (personal=0 OR cruser='.intval($GLOBALS['BE_USER']->user['uid']).')'.t3lib_BEfunc::deleteClause('sys_note').t3lib_BEfunc::versioningPlaceholderClause('sys_note'));\n\n\t\t\t// Executing query:\n\t\t$dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);\n\n\t\t\t// If some notes were found, render them:\n\t\tif ($dbCount)\t{\n\t\t\t$cat = array();\n\n\t\t\t\t// Load full table description:\n\t\t\tt3lib_div::loadTCA('sys_note');\n\n\t\t\t\t// Traverse note-types and get labels:\n\t\t\tif ($TCA['sys_note'] && $TCA['sys_note']['columns']['category'] && is_array($TCA['sys_note']['columns']['category']['config']['items']))\t{\n\t\t\t\tforeach($TCA['sys_note']['columns']['category']['config']['items'] as $el)\t{\n\t\t\t\t\t$cat[$el[1]]=$GLOBALS['LANG']->sL($el[0]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t// For each note found, make rendering:\n\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))\t{\n\n\t\t\t\t\t// Create content:\n\t\t\t\t$iconImg = t3lib_iconWorks::getSpriteIconForRecord('sys_note', $row);\n\t\t\t\t$subject = htmlspecialchars($row['subject']);\n\t\t\t\t$fields = array();\n\t\t\t\t$fields['Author:'] = htmlspecialchars($row['author'].($row['email'] && $row['author'] ? ', ':'').$row['email']);\n\t\t\t\t$fields['Category:'] = htmlspecialchars($cat[$row['category']]);\n\t\t\t\t$fields['Note:'] = nl2br(htmlspecialchars($row['message']));\n\n\t\t\t\t\t// Compile content:\n\t\t\t\t$out.='\n\n\n\t\t\t\t<!--\n\t\t\t\t\tSys-notes for list module:\n\t\t\t\t-->\n\t\t\t\t\t<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" id=\"typo3-dblist-sysnotes\">\n\t\t\t\t\t\t<tr><td colspan=\"2\" class=\"bgColor2\">'.$iconImg.'<strong>'.$subject.'</strong></td></tr>\n\t\t\t\t\t\t<tr><td class=\"bgColor4\">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.category',1).'</td><td class=\"bgColor4\">'.$fields['Category:'].'</td></tr>\n\t\t\t\t\t\t<tr><td class=\"bgColor4\">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.author',1).'</td><td class=\"bgColor4\">'.$fields['Author:'].'</td></tr>\n\t\t\t\t\t\t<tr><td class=\"bgColor4\">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.note',1).'</td><td class=\"bgColor4\">'.$fields['Note:'].'</td></tr>\n\t\t\t\t\t</table>\n\t\t\t\t';\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}", "public function index()\n {\n\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n $projectNotes = $this->repository->all();\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $projectNotes,\n ]);\n }\n\n return view('projectNotes.index', compact('projectNotes'));\n }", "public function index()\n {\n $notes = Note::all();\n\n return response()->success(\"Notes are listed\", NoteResource::collection($notes));\n }", "function getNotes(){\n\n\n\t\theader('Content-Type: application/json');\n\t\t\n\t\t$id = $_GET['id'];\n\t\t$r = new RESPONSE(0);\n\n\t\t//make sure id is present\n\t\tif ($id == \"\" || $id < 1){\n\t\t\t$r->message = \"No data.\";\n\t\t\techo $r->toJSON();\t\n\t\t\treturn false;\n\t\t}\n\n\t\t//create the db\n\t\t$database = createDb();\t\t\n\n\n\n\t\t//get the admin notes\n\t\t$datas = $database->select(\"Note\", \"*\", [\n\t\t\t\"MainContactId\" => $id \n\t\t]);\n\n\n\t\t//parse and format response\n\t\tif( count($datas) > 0){\n\n\t\t\t$r->html .= '<tbody>';\t\n\n\t\t\t foreach ($datas as $row) {\n\t\t\t\t \t\t\t\t\t\t // process the notes\n\t\t\t\t $notes = $row[\"Notes\"];\n\t\t\t\t \n\t\t\t\t if ($notes != \"\"){\n\t\t\t\t\t$r->html .= sprintf('<tr><td>%s</td><td>%s</td></tr>', $row[\"DateTimeEntered\"], $notes);\t \n\t\t\t\t }\n\n\t\t\t }\n\n\n\n\t\t\t$r->html .= '</tbody>';\t\n\t\t\t$r->status = 1;\n\n\t\t}\n\n\t\t//the response\n\t\techo $r->toJSON();\t\n\n\t}", "public function getNotes();", "public function index()\n\t{\n\t\t$veriler = Notes::orderBy('id','DESC')->with('users.classes')->get();\t\n\t\treturn View::make('backend.notes.index',compact('veriler'))->with('title','Kayıtlı Yazılı Notları');\n\t}", "public function index($id)\n {\n $notes = Note::where(['expedient_id' => $id])->paginate(15);\n return view('notes.index', compact('id', 'notes'));\n }", "public function index() {\n $notesService = new NotesService();\n $notes = $notesService->getAllNotes();\n $notesResponseArray = array();\n foreach ($notes as $note) {\n $notesResponseArray[] = Util::getNotesResponse($note);\n }\n return json_encode(array('notes' => $notesResponseArray));\n }", "public function show($id)\n {\n $note = Note::find($id);\n return view('notes.show', compact('note'));\n }", "public function test_notes_list()\n {\n Note::create(['note'] => 'Mi primera nota');\n Note::create(['note'] => 'Segunda nota');\n $this->visit('notes')\n ->see('Mi primera nota')\n ->see('Segunda nota');\n }", "public function show()\n {\n //\n $id=$_POST['id'];\n $note=DB::table('notes')->where('note_id',$id)->get();\n return $note;\n }", "public function index()\n\t{\n\t\t$exam_glass_notes = ExamGlassNote::orderBy('id', 'desc')->paginate(10);\n\n\t\treturn view('exam_glass_notes.index', compact('exam_glass_notes'));\n\t}", "public function index(): View\n {\n $notes = Note::paginate(25);\n\n return view('notes.index', compact('notes'));\n }", "public function index()\n {\n $debitnotes = DebitNote::orderBy('id', 'desc')->get();\n\n return view('debitnotes.index', compact('debitnotes'));\n }", "public static function displayNotes($projectID, $unitID = null) {\n\n if (!is_null($unitID)) {\n $notes = ArmyDB::retrieveNotesByUnitID($unitID);\n } else {\n $notes = ArmyDB::retrieveNotesByProjectID($projectID);\n }\n //var_dump($unitID);\n //var_dump($notes);\n\n echo \"<div class='row'>\";\n echo \"<h1>Comments</h1>\";\n if (empty($notes)) {\n echo \"<div class='list-group col-xs-6 col-md-3'>\";\n echo \"<a href='#' class='list-group-item'>\";\n echo \"<li class='list-group-item list-group-item'>No notes have been created for this.</li>\";\n echo \"</ul>\";\n echo \"</div>\";\n }\n else {\n foreach ($notes as $note) {\n //var_dump($note);\n $poster = $note['poster'];\n $notetext = $note['text'];\n $dateadded = $note['date_added'];\n\n echo \"<div class='list-group col-xs-6 col-md-3'>\";\n echo \"<a href='user.php?username=\" . $poster . \"' class='list-group-item'>\";\n echo \"<li class='list-group-item list-group-item'>$notetext</li>\";\n echo \"<li class='list-group-item list-group-item-danger'>Posted by $poster<br>$dateadded</li>\";\n echo \"</ul>\";\n echo \"</div>\";\n }\n }\n\n\n if (ArmyForm::checkForLogIn()) {\n $poster = $_SESSION['username'];\n echo \"<div class='col-xs-6 col-md-3'>\";\n echo \"<div class='list-group'>\";\n echo \"<a href='#' class='list-group-item'>\";\n echo \"<form role='form' method='post' action='action.php'>\";\n echo \"<textarea class='form-control' rows='3' id='desc' name='notetext' placeholder='Post your note here!'></textarea>\";\n if (isset($unitID)) {\n echo \"<input type='hidden' name='unitid' value='$unitID'>\";\n }\n else {\n echo \"<input type='hidden' name='projectid' value='$projectID'>\";\n }\n echo \"<input type='hidden' name='action' value='addNote'>\";\n echo \"<input type='hidden' name='poster' value='$poster'><input type='submit' class='btn btn-default'>\";\n echo \"</form>\";\n echo \"<p class='list-group-item-text'></p>\";\n echo \"</a>\";\n echo \"</div></div>\";\n }\n\n echo \"</div>\";\n\n }", "public function show(Note $note)\n {\n return view('notes.show', compact('note'));\n }", "public function index()\n {\n return TecnicNote::all();\n }", "public function get_show($id){\n\n\t\t$notes = Note::with(\"tags\", \"user\")->find($id)->toArray();\n\t\treturn Response::json(compact(\"notes\"), 200 );\n\n\t}", "public function index()\n {\n //\n $niveaux = DB::table('niveaux')\n ->join('parcours', 'parcours.id', '=', 'niveaux.parcour_id')\n ->select('niveaux.*', 'parcours.abreviation')\n ->get();\n $parcours = Parcours::all();\n $evaluations = Type_Evaluation::all();\n $etudiants = Etudiants::all();\n //$etudiants->appends(['sort' => 'nom']);\n return view('notes.create', compact('niveaux', 'parcours', 'evaluations', 'etudiants'));\n }", "public function index()\n {\n //\n $notes = Notes::where(\"deleted\", \"=\", \"0\")->orderBy(\"created_at\", \"DESC\")->get();\n return response()->json($notes);\n }", "public function show(NoteInformation $noteInformation)\n {\n //\n }", "function bitsa_notes_viewnotes(){\n\n\t\twp_enqueue_script( 'bitwise_sidebar_content_public_js', plugin_dir_url( __FILE__ ) . '/public/js/bitwise-sidebar-content-public.js', array( 'jquery' ), '1.0.0', false );\n\t\twp_enqueue_script( 'learndash_sidebar_content_public_js', plugin_dir_url( __FILE__ ) . '/public/js/nt_notes.js', array( 'jquery' ), '1.0.0', false );\n\t\twp_enqueue_script( 'learndash_sidebar_print_public_js', plugin_dir_url( __FILE__ ) . '/public/js/nt_notes_lib.js', array( 'jquery' ), '1.0.0', false );\n\t\twp_enqueue_script( 'bitwise_lightbox_html5view', plugin_dir_url( __FILE__ ) . 'public/html5lightbox/html5lightbox.js', array(), '1.0.0', false );\n\t\twp_enqueue_style( 'bitwise_sidebar_content_public', plugin_dir_url( __FILE__ ) . 'public/css/bitwise-sidebar-content-public.css', array(), '1.0.0', 'all' );\n\n\t global $wpdb;\n\t\t$current_user\t= wp_get_current_user();\n\t\t$allowed_roles = array('administrator');\n \t$user_id = $current_user->ID;\n\t\t$table = $wpdb->prefix.'bitscr_notes';\n\t\tif(isset($_GET['currenttopicid'])){\n\t\t\t $currenttopicid = $_GET['currenttopicid'];\n\t\t\t $oldnotes=Bitscr_Common::selecttopicnotes( $user_id,$currenttopicid);\n\t\t\t }else{\n\t\t\t if( array_intersect($allowed_roles, $current_user->roles ) ) { //check if the user have admin access\n \n \t\t\t$oldnotes=Bitscr_Common::selectallnotes();\n \t\t} else{\n\t \t\t\t$oldnotes=Bitscr_Common::selectusernotes( $user_id); //select the notes for particular user\n \t\t }\n\t\t\t }\n\t\t ?>\n\t\t<div class=\"searchdiv\">\n <div class=\"notes_list_filter show_drpd\">\n <label>Show\n <select class=\"data_display\">\n <option value=\"10\">10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n </select> entries</label>\n </div>\n\t\t<div class=\"col-md-6 auto nogap notes_list_filter pull-right\">\n <input class=\"form-control form-control-sm ml-3 w-75 search\" type=\"text\" placeholder=\"Search\" aria-label=\"Search\">\n </div>\n </div> \n <div class=\"notes_list_tablediv\">\n\t\t<form action=\"\" method=\"get\">\n <table class=\"notes-listing notes_list_table\">\n <thead>\n <tr style=\"background-color: black;color: white;\">\n <th>&nbsp;</th>\n <th><?php esc_html_e('Notes','sfwd-lms'); ?></th>\n <?php\n if( array_intersect($allowed_roles, $current_user->roles ) ) { \n ?>\n <th><?php esc_html_e( 'User', 'sfwd-lms' ); ?></th>\n <?php }?>\n \n <th><?php esc_html_e( 'Date', 'sfwd-lms' ); ?></th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n\n \t</tbody>\n \t<tfoot>\n \t<tr>\n \t<td colspan=\"5\">\n <input type=\"submit\" name=\"lds-bulk-download\" class=\"lds-bulk-download\" value=\"<?php esc_attr_e( 'Download Selected', 'sfwd-lms' ); ?>\" type=\"submit\">\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"displaying_message\"></div>\n\t\t<ul class=\"pagination\"> </ul>\n\n </form></div>\n</div>\n\n <?php foreach($oldnotes as $oldnote){?>\n \t<form id=\"singlesubmit<?php echo $oldnote->id;?>\" method=\"get\" action=\"\">\n <input type=\"hidden\" name=\"lds-bulk-action-item[<?php echo $oldnote->topic_id; ?>]\" value=\"<?php echo $oldnote->topic_id; ?>\">\n </form>\n<?php }\n\t}", "public function show($id)\n {\n //\n $note = Notes::find($id);\n return response()->json($note);\n }", "function __editNotes()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //get the note\n $this->__viewNotes();\n\n //visibility\n $this->data['visible']['wi_my_note_edit'] = 1;\n $this->data['visible']['wi_my_note_view'] = 0;\n\n }", "public function newNotePage()\n {\n return view('admin.newnote');\n }", "public function show($id)\n\t{\n\t\t$veriler = Notes::find($id);\n\t\t$users = User::select('id','fullname')->where('status','=','0')->get();\n\t\treturn View::make('backend.notes.edit',compact('veriler','users'))->with('title','Yazılı Notu Düzenle');\n\t}", "public function index()\n {\n return Note::all();\n }", "public function index()\n {\n if(request()->ajax()) {\n\n return datatables()->of(\n Note::latest()->get())\n ->addColumn('action', function ($data) {\n $button = '<button type=\"button\" name=\"edit\" id=\"' . $data->id . '\" class=\"edit btn btn-primary btn-sm\">Edit</button>';\n $button .= '&nbsp;&nbsp;';\n $button .= '<button type=\"button\" name=\"delete\" id=\"' . $data->id . '\" class=\"delete btn btn-danger btn-sm\">Delete</button>';\n return $button;\n })\n ->rawColumns(['action'])\n ->make(true);\n }\n return view('Note.index2');\n// $notes = DB::table('notes')\n// ->orderBy('created_at', 'desc')\n// ->get();\n// return view('Note.index',[\"notes\"=>$notes]);\n }", "public function show(Note $note)\n {\n \treturn response()->json([\n \t\t'MESSAGE' => $note], 200\n\t\t);\n }", "public function show(Note $note)\n {\n $note->load('asset');\n\n return view('admin.notes.show', compact('note'));\n }", "public function show(Note $note)\n {\n return response()->succees('Note successfully retrieved', $note);\n }", "private function get_notes()\n\t{\n\t\t$notes = $this->api->search( Options::get('simplenote__search') );\n\t\t\t\t\n\t\treturn $notes;\n\t}", "public function show(Note $note)\n {\n return response()->success('Selected note is showing', $note);\n }", "public function taskNote($task_id)\n {\n\n $task = task::where('id', $task_id)->first();\n\n $notes = Note::where('task_id', $task_id)->orderBy('id','desc')->get();\n return view('note.index', compact('notes', 'task', 'task_id'));\n }", "public function show($id)\n {\n $note = Note::findOrFail($id);\n\n return view('note.show', compact('note'));\n }", "public function show(Note $note)\n {\n $note->load('card');\n $note->load('user');\n return $note;\n }", "public function actionIndex()\n {\n\n if(!Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId())=='user')\n {\n $auth = Yii::$app->authManager;\n $userRole = $auth->getRole('user');\n $auth->assign($userRole, Yii::$app->user->getId());\n }\n \n $searchModel = new NotetakingNotesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n if (!Yii::$app->user->isGuest) {\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);}\n else{\n return $this->goBack();\n }\n }", "public function show($id)\n {\n $projectNote = $this->repository->find($id);\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $projectNote,\n ]);\n }\n\n return view('projectNotes.show', compact('projectNote'));\n }", "protected function _addNotes()\n\t{\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\treturn Admin_Form_Entity::factory('Script')\n\t\t\t->value(\"$(function (){\n\t\t\t\t$.adminLoad({ path: '/admin/crm/project/note/index.php', additionalParams: 'crm_project_id=\" . $this->_object->id . \"', windowId: '{$windowId}_notes' });\n\t\t\t});\");\n\t}", "public function index()\n {\n return NoteResource::collection(Note::mine()->get());\n }", "public function show(PartnerNote $partnerNote)\n {\n //\n }", "public function actionLoadNotes()\r\n\t{\n\t\tif(isset($_POST['id'])) {\n\t\t\t$employee_id = $_POST['id'];\n\t\t\t$model = $this->loadModel($employee_id, Yii::app()->user->id);\r\n\t\t\techo $model->note;\r\n\t\t\tYii::app()->end();\r\n\t\t}\r\n\t\techo 'no data';\r\n\t}", "public function setNotes($notes)\n {\n $this->notes = $notes;\n\n return $this;\n }", "public function show(Notifications $notifications)\n {\n //\n }", "public function index()\n {\n //\n $kuychecks = Kuycheck::latest()->paginate(5);\n return view('noteview.index', compact('kuychecks'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "public function index()\n {\n $signataires = Signataire::all();\n $noteInformation = NoteInformation::orderByDesc('note_information.created_at')\n ->join('signataires', 'note_information.idSignataire', '=', 'signataires.idSignataire')\n ->get()->values();\n\n return view('noteInformation')->with('noteInformation',$noteInformation)\n ->with('signataires',$signataires);\n }", "public function show($slug)\n {\n\t\t$note = Note::where('slug', $slug)->firstOrFail();\n\t\t$parsedHTML = Parsedown::text($note->content);\n\t\t$note->content = $parsedHTML;\n\t\treturn view('notes.show', compact('note'));\n }", "public function noteAction() {\n\tif($this->_getParam('id',false)) {\n\t$notes = new Findofnotereasons();\n\t$this->view->notes = $notes->getReasonDetails($this->_getParam('id'));\n\t} else {\n throw new Pas_Exception_Param($this->_missingParameter);\n\t}\n\t}", "public function index()\n {\n return Note::orderBy('created_at', 'desc')->get();\n }", "public function show(Notifications $notifications) {\n //\n }", "public function addnotesAction() {\n\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t$this->_helper->layout()->disableLayout();\n\t\t$id = $this->_getParam('taid');\n\t\t$taFinder = new TeachingActivities();\n\t\t$ta = $taFinder->getTa($id);\n\t\t$notes = stripslashes(strip_tags($this->_getParam('value')));\n\t\t$ta->notes = preg_replace('/[\\r\\n]+/', ' ', $notes);\n\t\t$ta->save();\n\t\techo $ta->notes;\n\t}", "function show_note($user_name, $note_name)\n{\n $sql_get_path = \"select note_path from user_notes where holder = '$user_name' and note_title = '$note_name';\";\n\t$res_path = mysql_query($sql_get_path);\n\t$row_path = mysql_fetch_array($res_path);\t\n\n\t$fd = fopen($row_path[\"note_path\"], \"r\") or exit(\"unable to open note\");\n\n echo \"<p><h3>$note_name</h3></p>\";\n\techo \"<p><h4>\";\n\twhile(!feof($fd))\n\t{\n\t\techo fgets($fd).\"<br />\";\n\t}\n\techo \"</h4></p>\";\n\tfclose($fd);\n}", "function displayNotes($custId) {\n $sql = \"SELECT * FROM customerNotes \n WHERE customer_id = $custId\n \";\n \n $result = mysqli_query($GLOBALS[\"con\"], $sql);\n if ($result) {\n $rows = array();\n while ($row = mysqli_fetch_assoc($result)) {\n $rows[] = $row;\n }\n echo json_encode($rows);\n } \n \n }", "public function index() {\n\t\t$this->DeliveryNote->recursive = 0;\n\t\t$this->set('deliveryNotes', $this->paginate()); \n\t}", "public function setNotes($notes = null)\n {\n $this->notes = $notes;\n\n return $this;\n }", "public function create()\n {\n abort_if(Gate::denies('note_management_create'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n $assets = Asset::all()->pluck('name', 'id');\n\n return view('admin.notes.create', compact('assets'));\n }", "public function getExplanatoryNotes() {\n $entries = Explanatorynote::all();\n return response()->json($entries);\n }", "public static function retrieveAllNotes() {\n return R::getAll('SELECT * FROM note');\n }", "public function show($id): View\n {\n $note = Note::findOrFail($id);\n\n return view('notes.show', compact('note'));\n }", "public function index()\n\t{\n try{\n\n $notes = $this->jobChoiceService->note()->index();\n $this->data['results']['notes'] = $notes;\n\n $this->data['status'] = 200;\n } catch (\\Exception $e) {\n $this->data['error'] = $e->getMessage();\n }\n\n return response()->json($this->data, $this->data['status']);\n\t}", "public function indexAction() { \n \n $this->view->notes = $this->_model->findByConsumerId($this->consumer_id);\n $this->view->consumer_id = $this->consumer_id;\n \n if( $this->xhr ) {\n $this->_asJson($this->view->notes->toArray()); \n } \n \n }", "public function test_GetAllNotes(){\n $response = $this->withHeaders([\n 'Content-Type' => 'Application/json',\n 'Authorization'=>'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMjcuMC4wLjE6ODAwMFwvYXBpXC9sb2dpbiIsImlhdCI6MTYyMjg5MjA0MywiZXhwIjoxNjIyODk1NjQ0LCJuYmYiOjE2MjI4OTIwNDQsImp0aSI6IjdUZGY3OVMxOHQxZDJGYTIiLCJzdWIiOjIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.UZoDqQk8Oxysi4fWVo0trMSyduX3GZDB_9k_9iO1OcY'\n \n ])->json('GET', '/api/displayNotes');\n \n $response->assertStatus(200)->assertSuccessful();\n }", "static function add_notes(): void {\r\n\t\tself::add_acf_inner_field(self::divisions, self::notes, [\r\n\t\t\t'label' => 'Notes',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => 'Any notes pertinent to the division.',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '40',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t]\r\n\t\t]);\r\n\t}", "public function edit(Note $note)\n {\n $agents = Agent::orderBy('id','desc')->get();\n return view('dashboard.blog-edit', compact('note', 'agents'));\n }", "public function show($id, $noteId)\n {\n return $this->repository->findWhere(['project_id' => $id, 'id' => $noteId]);\n }", "public function test_cant_show_all_notes_without_auth()\n {\n $response = $this->get('/notes');\n\n $response->assertStatus(Response::HTTP_FOUND);\n\n $response->assertRedirect(route('login'));\n }", "public function getNotes($user_id)\n {\n // Verify user against session\n if ( !isset($_SESSION['user_id']) || $_SESSION['user_id'] != $user_id) {\n $response = \"error\";\n return $response;\n }\n\n $user = \\App\\Models\\User::find($user_id);\n $notes = \\App\\Models\\User::find($user_id)->notes;\n $response = [\"user\" => $user, \"notes\" => $notes];\n return response()->json($response);\n }", "public function index(Request $request)\n {\n abort_if(Gate::denies('note_management_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n if ($request->ajax()) {\n $query = Note::query()\n ->select(sprintf('%s.*', (new Note)->getTable()))\n ->with('asset')\n ->when($request->input('asset_id'), function ($query) use ($request) {\n $query->where('asset_id', $request->input('asset_id'));\n });\n $table = DataTables::of($query);\n\n $table->addColumn('actions', '&nbsp;');\n\n $table->editColumn('actions', function ($row) {\n $crudRoutePart = 'notes';\n $permissionPrefix = 'note_management_';\n\n return view('partials.datatableActions', compact('crudRoutePart', 'row', 'permissionPrefix'));\n });\n\n $table->editColumn('id', function ($row) {\n return $row->id ? $row->id : \"\";\n });\n $table->editColumn('asset', function ($row) {\n return $row->asset ? $row->asset->name : \"\";\n });\n $table->editColumn('text', function ($row) {\n return $row->text ? Str::limit($row->text, 50) : \"\";\n });\n\n $table->rawColumns(['actions']);\n\n return $table->make(true);\n }\n\n return view('admin.notes.index');\n }", "public function get_notes($id)\n {\n $this->db->select ('notes_id, note_title, note_content, note_date')\n ->where ('tbl_users_user_ID', $id);\n\n $result = $this->db->get ('tbl_notes');\n\n return $result;\n }", "public function index(YoyoNotesModel $notesModel, Request $request)\n {\n if ($request->ajax()) {\n $notes = ['results' => $notesModel->getNotes()];\n } else {\n return redirect($this->getBaseUrl());\n }\n\n return $notes;\n }", "public function displayNotes($noteCount = array()){\n\n echo \"[ $50 Notes => \" . $noteCount['50'] . \", $20 Notes => \" . $noteCount['20'] . \" ]\" ;\n echo \"\\n\";\n }", "public function index()\n {\n if (! Gate::allows('news_access')) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('news_delete')) {\n return abort(401);\n }\n $news = News::onlyTrashed()->get();\n } else {\n $news = News::all();\n }\n\n return view('admin.news.index', compact('news'));\n }", "public function show($id)\n\t{\n\t\t$exam_glass_note = ExamGlassNote::findOrFail($id);\n\n\t\treturn view('exam_glass_notes.show', compact('exam_glass_note'));\n\t}", "public function displayNotes($begDate, $endDate, $getNotes) {\r\n\r\nif(isset($getNotes)) { \r\n\r\n $output = \"\";\r\n\r\n $pdo = new PdoMethods();\r\n \r\n $begTimestamp = strtotime($begDate);\r\n $endTimestamp = strtotime($endDate);\r\n\r\n $sql = \"SELECT * FROM date_plus_note WHERE date BETWEEN '$begTimestamp' AND '$endTimestamp' ORDER BY date DESC\";\r\n\r\n $records = $pdo->selectNotBinded($sql);\r\n\r\n if($records) { \r\n \r\n $output = \"<style>\r\n table {\r\n border-collapse: collapse;\r\n border-spacing: 0;\r\n width: 100%;\r\n border: 1px solid #ddd;\r\n }\r\n \r\n th, td {\r\n text-align: left;\r\n padding: 16px;\r\n }\r\n \r\n tr:nth-child(even) {\r\n background-color: #f2f2f2\r\n }\r\n </style>\";\r\n\r\n $output .= \"<table border='1'>\";\r\n $output .= \"<tr><th>Date and Time</th><th>Note</th></tr>\";\r\n \r\n foreach($records as $row) {\r\n $convertedDate = date(\"j/d/Y h:i A\", $row['date']);\r\n $output .= \"<tr><td>\" . $convertedDate . \"</td><td>\" . $row['note'] . \"</td></tr>\";\r\n }\r\n\r\n $output .= \"</table>\";\r\n\r\n } else {\r\n $output = \"No notes found for the date range selected\";\r\n } \r\n \r\n return $output;\r\n\r\n }\r\n\r\n\r\n}", "function show(){\n return view(\"admin.post.list\") ;\n }", "public function get_notes($id){\n $this->db->where('user_id', $id);\n $query = $this->db->get('notes');\n return $query->result();\n }", "public function getResponseNotes();", "public function show($id)\n {\n //\n $kuycheck = Kuycheck::find($id);\n return view('noteview.detail', compact('kuycheck'));\n }", "function authorNotes($id)\n{\n global $app;\n\n // parameter checking\n if (!is_numeric($id)) {\n $app->getLog()->warn('authorNotes: invalid author id ' . $id);\n $app->halt(400, \"Bad parameter\");\n }\n\n $author = $app->calibre->author($id);\n if (is_null($author)) {\n $app->getLog()->debug('authorNotes: author id not found ' . $id);\n $app->notFound();\n }\n $note = $app->bbs->authorNote($id);\n if (!is_null($note)) {\n $author->notes_source = $note->ntext;\n } else {\n $author->notes_source = null;\n }\n if (!empty($author->notes_source)) {\n $markdownParser = new MarkdownExtraParser();\n $author->notes = $markdownParser->transformMarkdown($author->notes_source);\n } else {\n $author->notes = null;\n }\n $app->render('author_notes.html', [\n 'page' => mkPage(getMessageString('author_notes'), 3, 2),\n 'url' => 'authors/' . $id,\n 'author' => $author,\n 'isadmin' => is_admin()]);\n}", "public function notesByDateAction() {\n \n $this->view->consumer_id = $this->consumer_id;\n \n $searchDate = $this->getRequest()->getParam('date', date(\"Y-m-d\"));\n \n $year = $this->getRequest()->getParam('year', false);\n if($year!= false) {\n $searchDate = $year.\"-\"; \n }\n $month = $this->getRequest()->getParam('month', false);\n if($month!= false) {\n $searchDate = $searchDate.$month.\"-\"; \n }\n $day = $this->getRequest()->getParam('day', false); \n if($day!= false) {\n $searchDate = $searchDate.$day; \n }\n \n \n $this->view->notes = $this->_model->findByConsumerIdAndUserId($this->consumer_id,\n $this->user_id,\n $searchDate);\n \n if( $this->xhr ) {\n $this->_asJson($this->view->notes->toArray()); \n } \n \n \n }", "public function index(Request $request)\n {\n\t\t$paginated = Note::published()->paginate(6);\n\t\t$items = collect($paginated->items());\n\t\t\n\t\t// In the first page, set separately the first header ones\n\t\tif ($request->page == \"1\" || ! $request->page) {\n\t\t\t$firstTwo = [$items[0], $items[1]];\n\t\t\t$notes = $items->splice(2);\n\t\t} else {\n\t\t\t$notes = $items;\n\t\t}\n\t\t\n\t\treturn view('notes.index', compact('paginated', 'firstTwo', 'notes'));\n }" ]
[ "0.7586648", "0.75498664", "0.75498664", "0.7492066", "0.72034925", "0.72034925", "0.72034925", "0.72034925", "0.72034925", "0.7177322", "0.7157055", "0.7135483", "0.71336937", "0.7021882", "0.6959551", "0.6957335", "0.6912485", "0.67314005", "0.67012155", "0.6700624", "0.669857", "0.66907626", "0.66366637", "0.66354287", "0.6610909", "0.6577917", "0.6550032", "0.65440285", "0.6529231", "0.6523171", "0.652038", "0.6488874", "0.6484074", "0.64603305", "0.64513755", "0.6446511", "0.6435854", "0.64045674", "0.6394723", "0.63943374", "0.6378844", "0.6374065", "0.6351916", "0.6351677", "0.63497275", "0.63442206", "0.63287705", "0.6307127", "0.6306144", "0.6226766", "0.6216653", "0.6164031", "0.6162929", "0.6149861", "0.6130693", "0.6118634", "0.61136913", "0.61120886", "0.61095554", "0.6037859", "0.60243464", "0.60232", "0.60093695", "0.6002893", "0.6002871", "0.59888923", "0.5983402", "0.5941427", "0.5937126", "0.5929465", "0.591878", "0.59006125", "0.5896402", "0.58950347", "0.58751315", "0.5873903", "0.58716667", "0.5866268", "0.5861561", "0.5855781", "0.5831833", "0.582605", "0.5808944", "0.57955843", "0.57824385", "0.57728046", "0.5762498", "0.5749143", "0.5738349", "0.57356435", "0.573403", "0.57236576", "0.5720609", "0.5717308", "0.57122004", "0.5710504", "0.5693746", "0.56914866", "0.56889814", "0.5677659" ]
0.8146852
0
/ getNotes Get all notes belonging to a user_id. Verifies ownership of user_id against user in session.
public function getNotes($user_id) { // Verify user against session if ( !isset($_SESSION['user_id']) || $_SESSION['user_id'] != $user_id) { $response = "error"; return $response; } $user = \App\Models\User::find($user_id); $notes = \App\Models\User::find($user_id)->notes; $response = ["user" => $user, "notes" => $notes]; return response()->json($response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findNotesByUser(UserInterface $user);", "public function get_notes($id)\n {\n $this->db->select ('notes_id, note_title, note_content, note_date')\n ->where ('tbl_users_user_ID', $id);\n\n $result = $this->db->get ('tbl_notes');\n\n return $result;\n }", "public function get_notes($id){\n $this->db->where('user_id', $id);\n $query = $this->db->get('notes');\n return $query->result();\n }", "function getNotes(){\n\n\n\t\theader('Content-Type: application/json');\n\t\t\n\t\t$id = $_GET['id'];\n\t\t$r = new RESPONSE(0);\n\n\t\t//make sure id is present\n\t\tif ($id == \"\" || $id < 1){\n\t\t\t$r->message = \"No data.\";\n\t\t\techo $r->toJSON();\t\n\t\t\treturn false;\n\t\t}\n\n\t\t//create the db\n\t\t$database = createDb();\t\t\n\n\n\n\t\t//get the admin notes\n\t\t$datas = $database->select(\"Note\", \"*\", [\n\t\t\t\"MainContactId\" => $id \n\t\t]);\n\n\n\t\t//parse and format response\n\t\tif( count($datas) > 0){\n\n\t\t\t$r->html .= '<tbody>';\t\n\n\t\t\t foreach ($datas as $row) {\n\t\t\t\t \t\t\t\t\t\t // process the notes\n\t\t\t\t $notes = $row[\"Notes\"];\n\t\t\t\t \n\t\t\t\t if ($notes != \"\"){\n\t\t\t\t\t$r->html .= sprintf('<tr><td>%s</td><td>%s</td></tr>', $row[\"DateTimeEntered\"], $notes);\t \n\t\t\t\t }\n\n\t\t\t }\n\n\n\n\t\t\t$r->html .= '</tbody>';\t\n\t\t\t$r->status = 1;\n\n\t\t}\n\n\t\t//the response\n\t\techo $r->toJSON();\t\n\n\t}", "public function get_user_notes(){\n $user_id = (int) $_COOKIE['user_id'];\n $sql = 'SELECT * from '. static::$table_name .' AS N JOIN notes_subject AS S';\n $sql .=' ON N.user_id =' .\"'\". self::$database->escape_string($user_id) .\"'\";\n $sql .= ' AND N.user_id = S.user_id AND N.note_id = S.note_id JOIN notes_tag AS T ON N.user_id = T.user_id AND N.note_id = T.note_id';\n\n return static::find_by_sql($sql);\n }", "public function getNotes();", "function get_notes_for_user($user_id)\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. Retrieve all the rows from the table.\n $result = mysqli_query($link, \"\n SELECT *\n FROM tbl_notes\n WHERE tbl_users_id = {$user_id}\n \");\n\n echo mysqli_error($link);\n\n // 3. Disconnect from the database.\n disconnect($link);\n\n // 4. Return the result set.\n return $result;\n }", "public static function retrieveAllNotes() {\n return R::getAll('SELECT * FROM note');\n }", "public function noteIndex(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $items = $this->Notes->index($user); \n }", "public function fetchAllNotes(){\n\t\t$fetchAll = $this->userClsObj->fetchAllNotes();\n\t\treturn $fetchAll;\n\t}", "public function noteIndex(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $items = $this->Notes->index($user);\n }", "public function index()\n {\n $notes = request()->user()->notes()->paginate(20);\n return NoteResource::collection($notes)->additional([\n 'message' => \"Notes retrieved successfully\",\n 'status' => \"success\"\n ]);\n }", "private function get_notes()\n\t{\n\t\t$notes = $this->api->search( Options::get('simplenote__search') );\n\t\t\t\t\n\t\treturn $notes;\n\t}", "public function getResponseNotes();", "public function getTicketNotes($ticketId)\n\t{\n\t\treturn $this->send($this->getHttp()->get(static::URL.'ticket/'.$ticketId.'/notes'));\t\n\t}", "public function getTicketNotes($ticketId)\n\t{\n\t\treturn $this->send($this->getHttp()->get($this->url.'ticket/'.$ticketId.'/notes'));\n\t}", "public function index()\n {\n $notes = auth()->user()->notes()->get();\n\n return view('notes')->with(['notes'=>$notes]);\n }", "public function test_GetAllNotes(){\n $response = $this->withHeaders([\n 'Content-Type' => 'Application/json',\n 'Authorization'=>'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMjcuMC4wLjE6ODAwMFwvYXBpXC9sb2dpbiIsImlhdCI6MTYyMjg5MjA0MywiZXhwIjoxNjIyODk1NjQ0LCJuYmYiOjE2MjI4OTIwNDQsImp0aSI6IjdUZGY3OVMxOHQxZDJGYTIiLCJzdWIiOjIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.UZoDqQk8Oxysi4fWVo0trMSyduX3GZDB_9k_9iO1OcY'\n \n ])->json('GET', '/api/displayNotes');\n \n $response->assertStatus(200)->assertSuccessful();\n }", "public static function exampleNotes(User $user)\n {\n // Pulls the first color in the color relationship\n $color = $user->note_colors()->first();\n\n return [\n [\n 'title' => 'Example Note #1',\n 'description' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\\'s standard dummy text ever since the 1500s.'\n ],\n [\n 'title' => 'Example Note #2',\n 'description' => 'You have the ability to change the color of the note',\n 'color_id' => $color->id\n ],\n ];\n }", "public function get_all_notes() {\n $sql = \"SELECT note_id FROM notes \n\t\tWHERE peducator_id='$this->peducator_id'\";\n $result = mysqli_query($this->connect_to_db, $sql);\n\n $arr = [];\n while ($row = mysqli_fetch_array($result)) {\n array_push($arr, get_note($row['note_id']));\n }\n\n return $arr;\n\n }", "public function get_notes($uid){\n $sql = \"SELECT * FROM notes WHERE uid = :uid\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(\n [\n 'uid'=>$uid\n ]\n );\n\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n\n\n }", "public function index()\n {\n return Notes::all();\n }", "public function getNotes()\n {\n return $this->notes;\n }", "public function getNotes()\n {\n return $this->notes;\n }", "public function getNotes()\n {\n return $this->notes;\n }", "public function getNotes()\n {\n return $this->notes;\n }", "public function getNotes()\n {\n return $this->notes;\n }", "private function getNote($noteId)\n {\n return $this->restClient->get(\n 'note/' . $noteId,\n 'Note',\n ['notes', 'client', 'client-users', 'current-report', 'report-id', 'note-client', 'user']\n );\n }", "function getNotes() {\n\t\treturn $this->notes;\n\t}", "public function notes()\n {\n return $this->hasMany('Synthesise\\Note', 'user_id');\n }", "public function getNotes() {\n return $this->notes;\n }", "public static function retrieveNotesByUnitID($unitID) {\n return R::find('note', 'unitid = ' . $unitID);\n }", "public function actionView($user_id,$id)\n {\n if (!Yii::$app->user->can('seeAllNotes')) $user_id=Yii::$app->user->getId() ;\n return $this->render('view', [\n 'model' => $this->findModel($user_id, $id),\n ]);\n }", "function getNotes($memberID) {\r\n $sql = $this->db->prepare(\"SELECT NOTES.ts, USER.firstname, USER.lastname, note FROM NOTES JOIN USER ON NOTES.leftBy=USER.UserID WHERE about=:memberID ORDER BY ts ASC\");\r\n $result = $sql->execute(array(\r\n \"memberID\" => $memberID\r\n ));\r\n if ($result)\r\n return $sql->fetchAll(PDO::FETCH_ASSOC);\r\n else\r\n return false;\r\n }", "function getNotes($inpworecnum) {\n $userrole = $_SESSION['userrole'];\n $userid = $_SESSION['user'];\n $userrecnum = $_SESSION['userrecnum'];\n $worecnum = \"'\" . $inpworecnum . \"'\";\n $sql = \"select n.create_date, n.notes, u.userid\n from notes n, user u, work_order w\n where n.notes2wo = w.recnum and\n notes2user = u.recnum and\n w.recnum = $worecnum\";\n $result = mysql_query($sql);\n return $result;\n }", "public function getNote($id)\n\t{\n\t\treturn $this->getResourceChildObject('notes', $id);\n\t}", "function getNotes() {\n\t\treturn $this->_Notes;\n\t}", "public function getNotes() {\n\t\treturn $this->_notes;\n\t}", "public function getNotes(array $options = null)\n\t{\n\t\treturn $this->getResourceChildCollection('notes', $options);\n\t}", "function __viewNotes()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //show text view\n $this->data['visible']['wi_my_note_view'] = 1;\n\n //check if team member has a note for this project\n $notes = $this->mynotes_model->checkNotes($this->project_id, $this->data['vars']['my_id']);\n\n //do it have a note for this project, if not create a blank one\n if ($notes === 0) {\n $this->mynotes_model->newNote($this->project_id, $this->data['vars']['my_id']);\n $this->data['debug'][] = $this->mynotes_model->debug_data;\n }\n\n //reload notes again\n //load team members first\n $this->data['reg_fields'][] = 'mynotes';\n $this->data['fields']['mynotes'] = $this->mynotes_model->getNotes($this->project_id, $this->data['vars']['my_id']);\n $this->data['debug'][] = $this->mynotes_model->debug_data;\n\n }", "public function each_user_can_have_many_notes()\n {\n $this->withoutExceptionHandling();\n $this->prepNormalEnv('retailer1', ['create-notes', 'see-notes'], 0 , 1);\n $this->prepOrder(1,0);\n $order = Order::find(1);\n $user = Auth::user();\n factory('App\\Note')->create(['user_id' => $user->id, 'notable_type' => 'App\\Order', 'notable_id' => $order->id]);\n $this->assertInstanceOf(Note::class, $user->notes->find(1));\n }", "function getSomeNotes($fieldstosearch) {\n $this->createAutosession();\n\n // format the query first\n $tempFields = array();\n\n // get all notes, we'll use this later to filter our search results\n\n // todo: check to see if we need this anymore, it's used to prevent a note\n // user from seeing notes that aren't his or his account's. Formerly this\n // check wasn't handled on the server side, but it's supposed to be handled\n // there now. Code here left so as not to break anything\n\n\n $orderby = '';\n\n\n $result = $this->_getEntryList($fieldstosearch, $orderby, array());\n\n //echo \"<pre>\"; var_dump($result); echo \"</pre>\";\n\n if( is_array($result) ) {\n // now we'll filter the results to make sure we only show notes that this\n // user is authorized to view\n\n return $result;\n } else {\n return array();\n }\n }", "function authorNotes($id)\n{\n global $app;\n\n // parameter checking\n if (!is_numeric($id)) {\n $app->getLog()->warn('authorNotes: invalid author id ' . $id);\n $app->halt(400, \"Bad parameter\");\n }\n\n $author = $app->calibre->author($id);\n if (is_null($author)) {\n $app->getLog()->debug('authorNotes: author id not found ' . $id);\n $app->notFound();\n }\n $note = $app->bbs->authorNote($id);\n if (!is_null($note)) {\n $author->notes_source = $note->ntext;\n } else {\n $author->notes_source = null;\n }\n if (!empty($author->notes_source)) {\n $markdownParser = new MarkdownExtraParser();\n $author->notes = $markdownParser->transformMarkdown($author->notes_source);\n } else {\n $author->notes = null;\n }\n $app->render('author_notes.html', [\n 'page' => mkPage(getMessageString('author_notes'), 3, 2),\n 'url' => 'authors/' . $id,\n 'author' => $author,\n 'isadmin' => is_admin()]);\n}", "static public function getAllNotes()\n {\n $notes = array();\n foreach (self::$instances as $i)\n {\n $notes = array_merge($notes, $i->getNotes());\n }\n\n return $notes;\n }", "public function get_notes() {\n return YITH_WCBK()->notes->get_booking_notes( $this->id );\n }", "public static function displayNotes($projectID, $unitID = null) {\n\n if (!is_null($unitID)) {\n $notes = ArmyDB::retrieveNotesByUnitID($unitID);\n } else {\n $notes = ArmyDB::retrieveNotesByProjectID($projectID);\n }\n //var_dump($unitID);\n //var_dump($notes);\n\n echo \"<div class='row'>\";\n echo \"<h1>Comments</h1>\";\n if (empty($notes)) {\n echo \"<div class='list-group col-xs-6 col-md-3'>\";\n echo \"<a href='#' class='list-group-item'>\";\n echo \"<li class='list-group-item list-group-item'>No notes have been created for this.</li>\";\n echo \"</ul>\";\n echo \"</div>\";\n }\n else {\n foreach ($notes as $note) {\n //var_dump($note);\n $poster = $note['poster'];\n $notetext = $note['text'];\n $dateadded = $note['date_added'];\n\n echo \"<div class='list-group col-xs-6 col-md-3'>\";\n echo \"<a href='user.php?username=\" . $poster . \"' class='list-group-item'>\";\n echo \"<li class='list-group-item list-group-item'>$notetext</li>\";\n echo \"<li class='list-group-item list-group-item-danger'>Posted by $poster<br>$dateadded</li>\";\n echo \"</ul>\";\n echo \"</div>\";\n }\n }\n\n\n if (ArmyForm::checkForLogIn()) {\n $poster = $_SESSION['username'];\n echo \"<div class='col-xs-6 col-md-3'>\";\n echo \"<div class='list-group'>\";\n echo \"<a href='#' class='list-group-item'>\";\n echo \"<form role='form' method='post' action='action.php'>\";\n echo \"<textarea class='form-control' rows='3' id='desc' name='notetext' placeholder='Post your note here!'></textarea>\";\n if (isset($unitID)) {\n echo \"<input type='hidden' name='unitid' value='$unitID'>\";\n }\n else {\n echo \"<input type='hidden' name='projectid' value='$projectID'>\";\n }\n echo \"<input type='hidden' name='action' value='addNote'>\";\n echo \"<input type='hidden' name='poster' value='$poster'><input type='submit' class='btn btn-default'>\";\n echo \"</form>\";\n echo \"<p class='list-group-item-text'></p>\";\n echo \"</a>\";\n echo \"</div></div>\";\n }\n\n echo \"</div>\";\n\n }", "public function actionLoadNotes()\r\n\t{\n\t\tif(isset($_POST['id'])) {\n\t\t\t$employee_id = $_POST['id'];\n\t\t\t$model = $this->loadModel($employee_id, Yii::app()->user->id);\r\n\t\t\techo $model->note;\r\n\t\t\tYii::app()->end();\r\n\t\t}\r\n\t\techo 'no data';\r\n\t}", "function findNoteById($id);", "public static function getNotesByClientId(int $clientId) {\n $db = new PDO(DB_SERVER, DB_USER, DB_PW);\n // 2. Prepare the query\n $sql = 'SELECT * FROM notes WHERE clientId = ?';\n $statement = $db->prepare($sql);\n // 3. Run the query\n $success = $statement->execute(\n [$clientId]\n );\n // 4. Handle the results\n $arr = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $notesItem = new Notes($row);\n array_push($arr, $notesItem);\n }\n return $arr;\n }", "protected function getNotesSlideRequest(Requests\\GetNotesSlideRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling getNotesSlide');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling getNotesSlide');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/notesSlide';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'GET');\n }", "function ajax_get_client_internal_notes() {\r\n\r\n if ( !isset( $_POST['id'] ) || !$_REQUEST['id'] ) {\r\n echo json_encode( array( 'id' => '', 'warning' => true ) );\r\n exit;\r\n }\r\n\r\n $id = explode( '_', $_POST['id'] );\r\n\r\n //check id and hash\r\n if ( isset( $id[0] ) && $id[0] && isset( $id[1] ) && md5( 'wpcclientinternalnote_' . $id[0] ) == $id[1] ) {\r\n $client = get_userdata( $id[0] );\r\n\r\n $internal_notes = get_user_meta( $id[0], 'wpc__internal_notes', true );\r\n if ( $internal_notes ) {\r\n echo json_encode( array( 'client_name' => $client->user_login, 'internal_notes' => $internal_notes ) );\r\n } else {\r\n echo json_encode( array( 'client_name' => $client->user_login, 'internal_notes' => '' ) );\r\n }\r\n exit;\r\n }\r\n\r\n echo json_encode( array( 'internal_notes' => '' ) );\r\n exit;\r\n }", "public function getSubNotes($id): array\n {\n if (is_numeric($id)) {\n /** @var Notebook $notebook */\n $note = $this->em->getRepository('ApiBundle:Note')\n ->findOneBy(['id' => $id]);\n\n if ($note) {\n $notebook = $note->getNotebook();\n if ($notebook->getPrivate() === true) {\n if ($notebook->getUser() == $this->tokenStorage->getToken()->getUser()) {\n $notes = $this->em->getRepository('ApiBundle:Note')\n ->findAllSubNotes($note);\n return [\n 'success' => true,\n 'sub_notes' => $notes,\n 'note' => $note->getId()\n ];\n }\n return ['success' => false, 'code' => 403];\n }\n $notes = $this->em->getRepository('ApiBundle:Note')\n ->findAllSubNotes($note);\n return [\n 'success' => true,\n 'sub_notes' => $notes,\n 'note' => $note->getId()\n ];\n }\n return ['success' => false];\n }\n return ['success' => false];\n }", "public function showReceipts($id)\n {\n $user = User::find($id);\n return $user->receipts()->get();\n }", "public static function getNotes($typeID, $type)\n {\n if (!$typeID || !is_numeric($typeID)) {\n return false;\n }\n\n $notes = null;\n global $db;\n $db->where('deleted_at', NULL, 'IS');\n $db->where('type_id', $typeID);\n $db->where('type', $type);\n\n try {\n $notes = $db->get('note');\n } catch (\\Exception $exception) {\n Log::write($exception, $db->getLastError());\n }\n\n return $notes;\n }", "public function get_show($id){\n\n\t\t$notes = Note::with(\"tags\", \"user\")->find($id)->toArray();\n\t\treturn Response::json(compact(\"notes\"), 200 );\n\n\t}", "public function index() {\n $notesService = new NotesService();\n $notes = $notesService->getAllNotes();\n $notesResponseArray = array();\n foreach ($notes as $note) {\n $notesResponseArray[] = Util::getNotesResponse($note);\n }\n return json_encode(array('notes' => $notesResponseArray));\n }", "public function getNotes(NotesRequest $request, $section_tag)\n {\n try {\n return DB::transaction(function() use ($request, $section_tag) {\n $section = Section::where('tag', $section_tag)->first();\n $notes = $section->notes()\n ->whereRaw(\"BINARY section_ref_slug = '$request->slug'\")\n ->orderBy('created_at', 'desc')\n ->paginate(config('chronicle.paginate_amount'));\n\n foreach ($notes as $note) {\n $note->user;\n }\n\n return Response::json([\n 'notes' => $notes\n ]);\n }, config('chronicle.db_attempts'));\n } catch (Exception $e) {\n return Response::json([\n 'sections' => [$e]\n ]);\n }\n }", "public function setNotes($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->notes !== $v) {\n $this->notes = $v;\n $this->modifiedColumns[BiblioTableMap::COL_NOTES] = true;\n }\n\n return $this;\n }", "public static function retrieveNotesByProjectID($projectID) {\n return R::find('note', 'projectid = ' . $projectID);\n }", "public function notesAction() {\n\t$notes = new Findofnotereasons();\n\t$this->view->notes = $notes->getReasonsList();\n\t}", "public function getNotes($offset = 0, $length = null)\n {\n return array_slice($this->notes, $offset, $length);\n }", "public static function notes_delete_all_user_notes($userid){\n\t\t\tglobal $database;\n\n\t\t\t$sql = \"DELETE FROM \" . self::$db_table . \" WHERE \";\n\t\t\t$sql .= \"user_id = $userid\";\n\t\t\t$database->query($sql);\n\t\t\treturn (mysqli_affected_rows($database->connection) == 1)? true : false;\n\t\t}", "function displayNotes($custId) {\n $sql = \"SELECT * FROM customerNotes \n WHERE customer_id = $custId\n \";\n \n $result = mysqli_query($GLOBALS[\"con\"], $sql);\n if ($result) {\n $rows = array();\n while ($row = mysqli_fetch_assoc($result)) {\n $rows[] = $row;\n }\n echo json_encode($rows);\n } \n \n }", "public function actionIndex()\n {\n\n if(!Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId())=='user')\n {\n $auth = Yii::$app->authManager;\n $userRole = $auth->getRole('user');\n $auth->assign($userRole, Yii::$app->user->getId());\n }\n \n $searchModel = new NotetakingNotesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n if (!Yii::$app->user->isGuest) {\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);}\n else{\n return $this->goBack();\n }\n }", "public function listNotesPage()\n {\n $notes = Note::select('id', 'note')->orderBy('id', 'desc')->get();\n foreach ($notes as $note) {\n $note->originalNote = $note->getOriginal('note');\n }\n\n return view('admin.listnotes', ['notes' => $notes]);\n }", "function getStudyGroupNotes( $groupId, $userId, $sessionId )\n {\n // Request the five most recent note postings for this group.\n $groupNotesXML = getStudyGroupNoteDAL( $groupId, 0, 0 );\n $tags = array( 'UserId', 'SessionId', 'StudyGroupId' );\n $values = array( $userId, $sessionId, $groupId );\n return insertXMLTags( $tags, $values, $groupNotesXML );\n }", "public static function getAllNote() : array {\r\n global $config;\r\n $con = new Sql($config[\"host\"], $config[\"database\"], $config[\"username\"], $config[\"password\"]);\r\n $noteGateway = new NoteGateway($con);\r\n return $noteGateway->findAll();\r\n }", "public function getNotes(ParameterMap $paramInstance=null, HeaderMap $headerInstance=null)\n\t{\n\t\t$handlerInstance=new CommonAPIHandler(); \n\t\t$apiPath=\"\"; \n\t\t$apiPath=$apiPath.('/crm/v2/Notes'); \n\t\t$handlerInstance->setAPIPath($apiPath); \n\t\t$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_GET); \n\t\t$handlerInstance->setCategoryMethod(Constants::REQUEST_CATEGORY_READ); \n\t\t$handlerInstance->setParam($paramInstance); \n\t\t$handlerInstance->setHeader($headerInstance); \n\t\treturn $handlerInstance->apiCall(ResponseHandler::class, 'application/json'); \n\n\t}", "function getNoteList()\n {\n $stmt = \"SELECT\n cno_id,\n cno_prj_id,\n cno_customer_id,\n cno_note\n FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"customer_note\n ORDER BY\n cno_customer_id ASC\";\n $res = DB_Helper::getInstance()->getAll($stmt, DB_FETCHMODE_ASSOC);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return array();\n } else {\n for ($i = 0; $i < count($res); $i++) {\n $res[$i]['customer_title'] = self::getTitle($res[$i]['cno_prj_id'], $res[$i]['cno_customer_id']);\n }\n return $res;\n }\n }", "public function show()\n {\n //\n $id=$_POST['id'];\n $note=DB::table('notes')->where('note_id',$id)->get();\n return $note;\n }", "public function getAllCreditNotes()\n {\n $query = $this->select()\n ->order('idCreditNote ASC');\n try {\n $creditNoteRowset = $this->fetchAll($query);\n\n return $creditNoteRowset;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function get_user_note_by_only_noteID($note_id,$user_id, $validate=true){\n $sql = 'select * from notes AS N';\n $sql .=' JOIN notes_subject AS S';\n $sql .=' ON S.note_id =' .\"'\".self::$database->escape_string($note_id) .\"'\";\n $sql .=' AND N.note_id = S.note_id JOIN notes_tag AS T ON T.note_id = '.\"'\". self::$database->escape_string($note_id) .\"' \";\n // login user can not access notes of other users\n if($validate){\n $sql .='WHERE N.access_type =' . \"'Public' \";\n $sql .='OR N.user_id =' . \"'\".h($user_id).\"'\";\n }\n // echo $sql;\n return static::find_by_sql($sql);\n}", "public function ListNotes(\\Grafeas\\V1beta1\\ListNotesRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/grafeas.v1beta1.GrafeasV1Beta1/ListNotes',\n $argument,\n ['\\Grafeas\\V1beta1\\ListNotesResponse', 'decode'],\n $metadata, $options);\n }", "public function get_notes($userid, $gradeitemid, $instn) {\n global $remotedb;\n\n $sql = \"SELECT DISTINCT notes\n FROM {report_myfeedback}\n WHERE userid=? AND gradeitemid=? AND iteminstance=?\";\n $params = array($userid, $gradeitemid, $instn);\n $usernotes = $remotedb->get_record_sql($sql, $params);\n $displaynotes = '';\n if ($usernotes) {\n $displaynotes = $usernotes->notes;\n }\n return $displaynotes;\n }", "public function show($id)\n {\n //\n $note = Notes::find($id);\n return response()->json($note);\n }", "function __updateNotes()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //prevent direct access\n if (!isset($_POST['posted'])) {\n //redirect to 'view' url instead\n $this_url = uri_string();\n $redirect = str_replace('update', 'view', $this_url);\n redirect($redirect);\n }\n\n //save sql here\n $result = $this->mynotes_model->updateNote($this->project_id, $this->data['vars']['my_id'], $this->input->post('mynotes_text'));\n $this->data['debug'][] = $this->mynotes_model->debug_data;\n\n //check\n if ($result) {\n $this->notices('success', $this->data['lang']['lang_request_has_been_completed'], 'noty'); //noty or html\n } else {\n $this->notices('error', $this->data['lang']['lang_request_could_not_be_completed'], 'noty'); //noty or html\n }\n\n //get the note\n $this->__viewNotes();\n\n }", "public function listNotes($project_id, $db)\r\n {\r\n $sql = \"SELECT notes.id, notes_title, notes_date, notes_content FROM notes\r\n join projects ON projects.id = notes.project_id\r\n WHERE projects.id = :project_id\";\r\n\r\n $pst = $db->prepare($sql);\r\n\r\n $pst->bindParam(':project_id', $project_id);\r\n $pst->execute();\r\n $n = $pst->fetchAll(PDO::FETCH_OBJ);\r\n return $n;\r\n }", "public function save($userId,$notes=null)\n\t{ \n $newILOIds = Content::getILOIds($this->content);\n $oldILOIds = array();\n\n # Update existing discussion\n if(!empty($this->id))\n {\n $query = sprintf(\"SELECT content FROM discussion WHERE id='%s'\",pg_escape_string($this->id));\n $result = $GLOBALS['transaction']->query($query);\n $oldILOIds = Content::getILOIds($result[0]['content']);\n $query = sprintf(\"UPDATE discussion SET element_id = '%s', element_type = '%s', content = '%s' WHERE id='%s'\", \n pg_escape_string($this->elementId),\n pg_escape_string($this->elementType),\n pg_escape_string($this->content),\n pg_escape_string($this->id));\n }\n # New discussion\n else\n {\n $query = sprintf(\"INSERT INTO discussion (element_id, element_type, content) VALUES ('%s','%s','%s')\",\n pg_escape_string($this->elementId),\n pg_escape_string($this->elementType),\n pg_escape_string($this->content));\n }\n\n # Run query\n $GLOBALS['transaction']->query($query,\"Query \".$query.\" failed in Discussion::save()\");\n\n $this->id = parent::URIToId($this->path,\"discussion\");\n $revisionRow = new RevisionRow(\"discussion_history\",\"discussion\");\n $revisionRow->loadFromData(null,$this->id,$this->name,$this->content,$userId,null);\n $revisionRow->save();\n \n require_once(\"classes/resources/Lesson.php\");\n Content::checkILOsExist($this->ilos,$newILOIds);\n $this->saveIlos($userId,$newILOIds,$oldILOIds);\n $this->saveCitations();\n\n return true;\n\t}", "public function index(YoyoNotesModel $notesModel, Request $request)\n {\n if ($request->ajax()) {\n $notes = ['results' => $notesModel->getNotes()];\n } else {\n return redirect($this->getBaseUrl());\n }\n\n return $notes;\n }", "function getSalesExecutiveGetNotes($id,$type)\n {\n\t\t$result = array();\n\t\t$date = date('Y-m-d');\n\t\tif($date!=\"\")\n\t\t{\n\t\t\tif($type==2)\n\t\t\t{\n\t\t\t\t$where = \"note_date < '\".$date.\"' AND status!=2\";\n\t\t\t}\n\t\t\telse if($type==1)\n\t\t\t{\n\t\t\t\t$where = \"note_date='\".date('Y-m-d',strtotime($date)).\"'\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$where = \"1=1\";\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$where = \"1=1\";\n\t\t}\n\t\t$data = $this->db->rp_getData('notes',\"*\",$where,\"id DESC\",0);\n\t\twhile($r= mysql_fetch_assoc($data))\n\t\t{\n\t\t\t$sales_executive= explode(\",\",$r['sales_executive']);\n\t\t\t\n\t\t\t\n\t\t\tif(in_array($id,$sales_executive))\n\t\t\t{\n\t\t\t\t$r['created_by_slug'] = $r['created_by'];\n\t\t\t\tif($r['created_by']!=0)\n\t\t\t\t$r['created_by'] = $this->db->rp_getValue(\"sagar\",\"name\",\"id='\".$r['created_by'].\"'\",0);\n\t\t\t\telse\n\t\t\t\t$r['created_by'] =\"\";\t\n\t\t\t\t$r['note_status_slug']= $r['status'];\n\t\t\t\t$r['note_status']= $this->note_status[intval($r['status'])];\n\t\t\t\t$result[] = $r;\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif(!empty($result))\n\t\t{\n\t\t\t$ack=array( \"ack\"=>1,\n\t\t\t\t\t\"ack_msg\"=>\"Successfully Get Sales Executive Notes !!\",\n\t\t\t\t\t\"developer_msg\"=>\"You got it!!\",\n\t\t\t\t\t\"result\"=>$result,\n\t\t\t\t\t);\n\t\t\t\t\treturn $ack;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ack=array( \"ack\"=>0,\n\t\t\t\t\t\"ack_msg\"=>\"No Notes Found !!\",\n\t\t\t\t\t\"developer_msg\"=>\"No notes found!!\",\n\t\t\t\t\t\"result\"=>$result,\n\t\t\t\t\t);\n\t\t\t\t\treturn $ack;\n\t\t}\n\t\t\t\n\t\t\n\t\t\n }", "public function retrieveUserComments($userId)\n {\n return $this->start()->uri(\"/api/user/comment\")\n ->urlSegment($userId)\n ->get()\n ->go();\n }", "function return_notes()\n {\n $data = array();\n $query = $this->pdo->prepare('SELECT * FROM note');\n $query->execute();\n $posts = $query->fetchAll();\n $html = '';\n foreach ($posts as $value) \n {\n $html .= \"<div class='single-note'><div class='note-title'>\".$value['title'].\n \" <img class='delete' id='\".$value['id'].\"' src='img/delete.gif' alt='delete'></div><div class='note-text' id=\".$value['id'].\">\".$value['description'].\"</div></div>\";\n }\n $data['html'] = $html;\n return($data);\n }", "public function setNotes($notes)\n {\n $this->notes = $notes;\n\n return $this;\n }", "public function index()\n {\n $note = Note::all();\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n $notes = $this->repository->all();\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $notes,\n ]);\n }\n\n return view('notes.index', compact('notes'));\n }", "public function getNote($id)\n {\n return Laranote::where('model', get_class($this))\n ->where('model_id', $this->id)\n ->where('id', $id)\n ->first();\n }", "public function getNote(string $id, ParameterMap $paramInstance=null, HeaderMap $headerInstance=null)\n\t{\n\t\t$handlerInstance=new CommonAPIHandler(); \n\t\t$apiPath=\"\"; \n\t\t$apiPath=$apiPath.('/crm/v2/Notes/'); \n\t\t$apiPath=$apiPath.(strval($id)); \n\t\t$handlerInstance->setAPIPath($apiPath); \n\t\t$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_GET); \n\t\t$handlerInstance->setCategoryMethod(Constants::REQUEST_CATEGORY_READ); \n\t\t$handlerInstance->setParam($paramInstance); \n\t\t$handlerInstance->setHeader($headerInstance); \n\t\treturn $handlerInstance->apiCall(ResponseHandler::class, 'application/json'); \n\n\t}", "public function notesWithSoftDelete()\n {\n\n $notes = Note::withTrashed()->get();\n $response = $this->successfulMessage(200, 'Successfully', true, $notes->count(), $notes);\n return response($response);\n\n }", "public function noteAdd(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n } \n $this->Notes->add($user);\n }", "function setNotes($inNotes) {\n\t\tif ( $inNotes !== $this->_Notes ) {\n\t\t\t$this->_Notes = $inNotes;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setNotes($notes = null)\n {\n $this->notes = $notes;\n\n return $this;\n }", "public function generateNotes(Page $page, User $user, $notes, $image_id, $editable)\n\t{\n\t\t$permission = $this->userPermission($user);\n\t\t\n\t\t$add_link = make_link(\"note_add\");\n\t\t$change_link = make_link(\"note_change\");\n\t\t$remove_link = make_link(\"note_remove\");\n\t\t\n\t\t$editable = (isset($editable) && $editable) ? \"true\" : \"false\";\n\t\t\n\t\t$string = <<<JS\n<script type=\"text/javascript\">\n// <![CDATA[\n\n$(window).load(function()\n{\n\tvar annotations = new $(\"#Imagemain\").annotateImage({\n\t\t\taddUrl: \"$add_link\",\n\t\t\tsaveUrl: \"$change_link\",\n\t\t\tdeleteUrl: \"$remove_link\",\n\t\t\tpermission: $permission,\n\t\t\teditable: $editable,\n\t\t\tuseAjax: true,\n\t\t\tredirect: $(\"#main_image\"),\n\t\t\tnotes: [\nJS;\n\t\t\n\t\tforeach($notes as $note)\n\t\t{\n\t\t\t$text = json_encode($note[\"text\"]);\n\t\t\t$string .= <<<JS\n\t\t\t\t{\n\t\t\t\t\t\"top\": $note[y],\n\t\t\t\t\t\"left\": $note[x],\n\t\t\t\t\t\"width\": $note[w],\n\t\t\t\t\t\"height\": $note[h],\n\t\t\t\t\t\"text\": $text,\n\t\t\t\t\t\"id\": \"$note[id]\",\n\t\t\t\t\t\"editable\": true,\n\t\t\t\t\t\"new_note\": false\n\t\t\t\t},\nJS;\n\t\t\t//$string .= \"add_note($note[id], $text, $note[x], $note[y], $note[w], $note[h], $permission);\\n\";\n\t\t}\n\t\t\n\t\t$string .= <<<JS\n\t\t\t]\n\t\t});\n\t$(\"#Imagemain\").data(\"annotations\", annotations);\n});\n// ]]>\n</script>\n\nJS;\n\t\tif($editable)\n\t\t\t$string .= <<<JS\n\t\t\t\n<script type=\"text/javascript\">\n// <![CDATA[\n\n$(window).load(function()\n{\n\t$(\"#main_image\").dblclick(function(e)\n\t{\n\t\tvar offset = $(\"#main_image\").offset();\n\t\t$.add_note_init($image_id, e.pageX - offset.left, e.pageY - offset.top);\n\t});\n});\n\t\t\t\n// ]]>\n</script>\n\nJS;\n\t\t\n\t\treturn($string);\n\t}", "public function showNotes()\n {\n return view('notes-dashboard');\n }", "public function noteAdd(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $this->Notes->add($user);\n }", "public function getCourseNoteByUserIdAndTaskId($userId, $taskId);", "public function test_cant_show_all_notes_without_auth()\n {\n $response = $this->get('/notes');\n\n $response->assertStatus(Response::HTTP_FOUND);\n\n $response->assertRedirect(route('login'));\n }", "public function getExplanatoryNotes() {\n $entries = Explanatorynote::all();\n return response()->json($entries);\n }", "public function index()\n {\n $notes = Note::all();\n\n return $this->successReponse($notes);\n }", "function getNoteDetailsByID($cno_id)\n {\n $stmt = \"SELECT\n cno_prj_id,\n cno_customer_id,\n cno_note\n FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"customer_note\n WHERE\n cno_id = \" . Misc::escapeInteger($cno_id);\n $res = DB_Helper::getInstance()->getRow($stmt, DB_FETCHMODE_ASSOC);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return array();\n } else {\n return $res;\n }\n }", "public function index()\n {\n //\n $notes = Notes::where(\"deleted\", \"=\", \"0\")->orderBy(\"created_at\", \"DESC\")->get();\n return response()->json($notes);\n }" ]
[ "0.77149844", "0.7519682", "0.7513956", "0.74537665", "0.72692925", "0.70584", "0.6970789", "0.676284", "0.66626036", "0.6661945", "0.66522515", "0.6593235", "0.6545869", "0.64458627", "0.63578063", "0.6272248", "0.62368256", "0.6203205", "0.6183898", "0.61711174", "0.6159737", "0.61595887", "0.615172", "0.615172", "0.615172", "0.615172", "0.615172", "0.6135784", "0.6119233", "0.61185503", "0.6081779", "0.607459", "0.60672504", "0.60403395", "0.6023211", "0.601506", "0.6003613", "0.6001019", "0.59686273", "0.59573853", "0.59453887", "0.5930154", "0.59152406", "0.58712447", "0.58525366", "0.5837504", "0.58229166", "0.5819897", "0.5811038", "0.5797129", "0.578892", "0.5786426", "0.57819754", "0.57726794", "0.5759045", "0.5747013", "0.57401353", "0.57253164", "0.5716355", "0.571334", "0.5709361", "0.5706688", "0.5687794", "0.56790406", "0.5671605", "0.5660998", "0.5643618", "0.56407803", "0.5629553", "0.56292754", "0.56117326", "0.5610289", "0.5609347", "0.5604411", "0.55902004", "0.5578588", "0.5573641", "0.55720973", "0.557123", "0.5563103", "0.5561177", "0.5560409", "0.5558415", "0.5547791", "0.55431914", "0.55335695", "0.55306125", "0.55179894", "0.55175745", "0.551327", "0.55128187", "0.55084735", "0.55076534", "0.55005735", "0.5498847", "0.54834086", "0.54824394", "0.54821104", "0.54746795", "0.54684883" ]
0.8481243
0
/ deleteNote Deletes a note based on the note's ID
public function deleteNote($id) { $note = \App\Models\Note::find($id); // Verify user against session $user_id = $note->user_id; if ( !isset($_SESSION['user_id']) || $_SESSION['user_id'] != $user_id) { $response = "error"; return $response; } $note->delete(); return response()->json('success'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DeleteNote($note){\r\n $statement = new DeleteStatement(\"job_note\");\r\n\t\t\t$statement->where(\"id\", $note->getId());\r\n $statement->executeStatement();\r\n }", "function deleteNote(NoteInterface $note);", "public function deleteNote($noteID) {\n $sql = \"DELETE FROM notes WHERE noteID=:noteID\";\n $sth = $this->dbconnection->prepare($sql);\n $sth->bindParam(\"noteID\", $noteID);\n $sth->execute();\n $sth = null;\n }", "public function deleteNote($note_id)\n {\n $note = Note::find($note_id); // or $note = Note::where('id', $note_id)->first();\n $author_deleted = false;\n if (count($note->author->notes) === 1) {\n $note->author->delete();\n $author_deleted = true;\n }\n\n $note->delete();\n $msg = $author_deleted ? 'All notes by author deleted' : 'Note has been deleted';\n\n return redirect()->route('notes')->with([\n 'success' => $msg\n ]);\n }", "public function deleteNote($note_id, $db)\r\n {\r\n $sql = \"DELETE FROM notes\r\n WHERE id=:note_id\";\r\n $pst = $db->prepare($sql);\r\n $pst->bindParam(':note_id', $note_id);\r\n $count = $pst->execute();\r\n return $count;\r\n }", "function delete($note) {\r\n $CI = &get_instance();\r\n $userlogin = getUserLogin();\r\n //collect all cascaded to-be-deleted-id's: none\r\n //check rights\r\n //check, all through the cascade, whether you can read AND edit that object\r\n if (!$userlogin->hasRights('note_edit')\r\n ||\r\n !$CI->accesslevels_lib->canEditObject($note)\r\n ) {\r\n //if not, for any of them, give error message and return\r\n appendErrorMessage(__('Cannot delete note').': '.__('insufficient rights').'.<br/>');\r\n return false;\r\n }\r\n if (empty($note->note_id)) {\r\n appendErrorMessage(__('Cannot delete note').': '.__('erroneous ID').'.<br/>');\r\n return false;\r\n }\r\n //otherwise, delete all dependent objects by directly accessing the rows in the table \r\n $CI->db->delete('notes',array('note_id'=>$note->note_id));\r\n //delete links\r\n $CI->db->delete('notecrossrefid',array('note_id'=>$note->note_id));\r\n $CI->db->delete('notecrossrefid',array('xref_id'=>$note->note_id));\r\n //add the information of the deleted rows to trashcan(time, data), in such a way that at least manual reconstruction will be possible\r\n return true;\r\n }", "public function deleteNote(string $id)\n\t{\n\t\t$handlerInstance=new CommonAPIHandler(); \n\t\t$apiPath=\"\"; \n\t\t$apiPath=$apiPath.('/crm/v2/Notes/'); \n\t\t$apiPath=$apiPath.(strval($id)); \n\t\t$handlerInstance->setAPIPath($apiPath); \n\t\t$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_DELETE); \n\t\t$handlerInstance->setCategoryMethod(Constants::REQUEST_METHOD_DELETE); \n\t\treturn $handlerInstance->apiCall(ActionHandler::class, 'application/json'); \n\n\t}", "public function deleted(AppointmentNote $note)\n {\n //\n }", "public function delete_note($id){\n $sql = \"DELETE FROM notes WHERE id=:id\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(\n [\n 'id' => $id\n ]\n );\n\n return true;\n }", "public function deleteNote($id)\n {\n return Laranote::where('id', $id)\n ->where('model', get_class($this))\n ->where('model_id', $this->id)\n ->first()\n ->delete();\n }", "public function destroy(Note $note)\n {\n \n }", "public function destroy(Note $note)\n {\n //\n }", "public function destroy(Note $note)\n {\n $note->delete();\n \n return 'ok';\n }", "public function delete($id)\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n if ($this->notesModel->deleteNote($id)) {\n flash('post_message', 'post deleted');\n redirect('notes/index');\n } else {\n die('something wrong');\n };\n } else {\n die('something wrong');\n redirect('notes');\n }\n }", "public function deleteAction() {\n \n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n \n\n $del = $this->_model->deleteNote($this->id);\n\n if( $this->xhr ) {\n \n $this->_asJson(array('id' => $this->id,\n 'consumer_id' => $this->consumer_id,\n 'message' => 'Note Removed.',\n 'success' => $del));\n }else{\n \n $this->_helper->flashMessenger->addMessage(array('alert alert-success'=>\"Note Removed.\") ); \n $this->_redirect($this->indexAction . $this->consumer_id);\n \n }\n }", "static function deleteNote($id)\n {\n global $db;\n $db->where('id', $id);\n $data = ['deleted_at' => date('Y-m-d H:i:s')];\n\n if (!self::noteAlreadyDeleted($id)) {\n try {\n $db->where('id', $id);\n $deleted = $db->update('note', $data);\n if ($deleted)\n return true;\n } catch (\\Exception $exception) {\n Log::write($exception, $db->getLastError());\n }\n } else {\n // already deleted\n return false;\n }\n }", "public function deleteNoteAction() {\n try {\n if (!($this->getRequest()->isXmlHttpRequest())) {\n throw new \\Exception('illegal request');\n }\n \n $post = $this->getRequest()->getPost();\n $noteId = $post['nid'];\n \n $errs = array();\n if (empty($noteId)) {\n throw new \\Exception('note identifier not found');\n }\n \n $notes = $this->getSpace()->getNotes();\n $notes = json_decode($notes, true);\n \n if (!empty($notes[$noteId])) {\n unset($notes[$noteId]);\n $notes = json_encode($notes);\n $this->getSpace()->setNotes($notes);\n $this->getEntityManager()->persist($this->getSpace());\n $this->getEntityManager()->flush();\n }\n \n $data = array('err'=>false);\n \n } catch (\\Exception $ex) {\n $data = array('err'=>true, 'info'=>array('ex'=>$ex->getMessage()));\n }\n return new JsonModel(empty($data)?array('err'=>true):$data);/**/\n }", "public function destroy($id, $noteId)\n {\n return $this->repository->delete($noteId);\n }", "public function deleteNote($args) {\n if (!SecurityUtil::checkPermission('IWagendas::', '::', ACCESS_READ)) {\n throw new Zikula_Exception_Fatal($this->__('Sorry! No authorization to access this module.'));\n }\n\n $aid = $this->request->getPost()->get('aid', '');\n if (!$aid) {\n throw new Zikula_Exception_Fatal($this->__('no note id'));\n }\n\n $daid = $this->request->getPost()->get('daid', '');\n\n $deleted = ModUtil::func('IWagendas', 'user', 'deleteNote', array('aid' => $aid,\n 'daid' => $daid));\n if (!is_numeric($deleted))\n throw new Zikula_Exception_Fatal($deleted);\n\n return new Zikula_Response_Ajax(array('aid' => $deleted\n ));\n }", "public function testDeleteNote()\n {\n $this->_instance->deleteNotesOfRecord(\n $this->_objects['record']['model'], \n $this->_objects['record']['backend'], \n $this->_objects['record']['id']\n );\n \n $this->setExpectedException('Tinebase_Exception_NotFound');\n \n $note = $this->_instance->getNote($this->_objects['note']->getId());\n }", "public function destroy(Note $note)\n {\n $note->delete();\n $notebook = $note->notebook_id;\n return redirect(route('notebooks.show', compact('notebook')));\n }", "public function destroy(Note $note)\n {\n abort_if(Gate::denies('note_management_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n $note->delete();\n\n return redirect()->back()->withMessage('Note has been deleted successfully');\n }", "public function DeleteNote(\\Grafeas\\V1beta1\\DeleteNoteRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/grafeas.v1beta1.GrafeasV1Beta1/DeleteNote',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function actionDelete($user_id, $id)\n {\n if (!Yii::$app->user->can('seeAllNotes')) $user_id=Yii::$app->user->getId() ;\n\n if (Yii::$app->user->can('deleteNote')){\n $this->findModel($user_id, $id)->delete();\n\n return $this->redirect(['index']);}else return $this->goBack();\n }", "public function delete($id = null) {\n\t\ttry {\n\t\t\t$result = $this->DeliveryNote->validateAndDelete($id, $this->data);\n\t\t\tif ($result === true) {\n\t\t\t\t$this->Session->setFlash(__('Delivery note deleted', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$this->Session->setFlash($e->getMessage());\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\t\tif (!empty($this->DeliveryNote->data['deliveryNote'])) {\n\t\t\t$this->set('deliveryNote', $this->DeliveryNote->data['deliveryNote']);\n\t\t}\n\t}", "public function destroy(Note $note)\n {\n $note = $note->delete();\n\n $success = \"Blog Deleted\";\n\n return redirect()->back()->with(['data' => $success]);\n }", "public function delete() {\n\n // Does the Note object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"Note::delete(): Attempt to delete an Note object that does not have its ID property set.\", E_USER_ERROR );\n\n // Update the Note\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"UPDATE notes SET note_date=FROM_UNIXTIME(:note_date), note_text=:note_text, note_latitude=:note_latitude, note_longitude=:note_longitude, note_type=:note_type, note_tags=:note_tags, temperature=:temperature, weatherIcon=:weatherIcon, embed=:embed, rsvp=:rsvp, syndication=:syndication, ping=:ping WHERE id = :id\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":note_date\", $this->noteDate, PDO::PARAM_INT );\n $st->bindValue( \":note_text\", $this->noteText, PDO::PARAM_STR );\n $st->bindValue( \":note_longitude\", $this->longitude, PDO::PARAM_STR );\n $st->bindValue( \":note_latitude\", $this->latitude, PDO::PARAM_STR );\n $st->bindValue( \":note_type\", \"removed\", PDO::PARAM_STR );\n $st->bindValue( \":note_tags\", $this->noteTags, PDO::PARAM_STR );\n $st->bindValue( \":weatherIcon\", $this->weatherIcon, PDO::PARAM_STR );\n $st->bindValue( \":temperature\", $this->temperature, PDO::PARAM_STR );\n $st->bindValue( \":embed\", $this->embed, PDO::PARAM_STR );\n $st->bindValue( \":syndication\", $this->syndication, PDO::PARAM_STR );\n $st->bindValue( \":rsvp\", $this->rsvp, PDO::PARAM_STR );\n $st->bindValue( \":ping\", $this->ping, PDO::PARAM_STR );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n\n if ( isset( $this->ping )) :\n\n $source = \"https://calumryan.com/note/\".$this->id;\n $target = $this->ping;\n $client = new IndieWeb\\MentionClient();\n $response = $client->sendWebmention($source, $target, ['vouch'=>$vouch]);\n\n endif;\n\n $conn = null;\n\n\n }", "public function destroy(DeleteNoteRequest $request, Note $note)\n {\n $note->delete();\n return response()->noContent();\n }", "public function removeIdDepositario($note)\n {\n StoriaAssegnazioni::addHistoryAssegnazioneDepositario($this->id_preventivo, $this->id_depositario, 'RIFIUTATO', $note);\n $this->id_depositario = null;\n $this->save();\n }", "public function destroy(Note $note)\n {\n $note->delete();\n\n return response()->success('The note is deleted', []);\n }", "public function destroy(Note $note, Request $request)\n {\n $deleteNote = $request->id;\n Note::destroy($deleteNote);\n return 'Deleted Note' . \" \" . $deleteNote;\n }", "public function destroy(Note $note)\n {\n $note->delete();\n\n return [\n 'success' => true,\n ];\n }", "public function deleteById(int $noteId): bool\n {\n return $this->delete($this->getById($noteId));\n }", "public function forceDeleted(AppointmentNote $note)\n {\n //\n }", "public function destroy($id)\n {\n $note = Note::find($id);\n $expedient = $note['expedient_id'];\n Note::findOrFail($id)->delete();\n return redirect()->route('note.index', $expedient);\n }", "public function destroy($id)\n\t{\n\t\tNotes::find($id)->delete();\n\t\treturn Redirect::route('admin.notes.index');\n\t}", "public function destroy($id)\n\t{\n\t\t$exam_glass_note = ExamGlassNote::findOrFail($id);\n\t\t$exam_glass_note->delete();\n\n\t\treturn redirect()->route('exam_glass_notes.index')->with('message', 'Item deleted successfully.');\n\t}", "function del_author_notes($id)\n{\n global $app;\n\n // parameter checking\n if (!is_numeric($id)) {\n $app->getLog()->warn('del_author_notes: invalid author id ' . $id);\n $app->halt(400, \"Bad parameter\");\n }\n\n $app->getLog()->debug('del_author_notes: ' . $id);\n $del = $app->bbs->deleteAuthorNote($id);\n $resp = $app->response();\n if ($del) {\n $resp->status(200);\n $msg = getMessageString('admin_modified');\n $answer = json_encode(['msg' => $msg]);\n $resp->header('Content-type', 'application/json');\n } else {\n $resp->status(500);\n $resp->header('Content-type', 'text/plain');\n $answer = getMessageString('admin_modify_error');\n }\n $resp->header('Content-Length', strlen($answer));\n $resp->body($answer);\n}", "public function delete(){\n if (empty($this->pad)){\n msg('Your pad is empty.');\n closeNode();\n }else{\n msg('Please send the number of the note you want to delete from your pad :');\n bindNode('deleteNote');\n }\n\n\n }", "public function destroy($id)\n {\n Note::destroy($id);\n\n return redirect('note')->with('flash_message', 'Note deleted!');\n }", "public function destroy($id)\n {\n return Notes::find($id)->delete();\n }", "public static function delete_payment_note() {\n\n check_ajax_referer( 'sumo-pp-delete-payment-note' , 'security' ) ;\n\n wp_send_json( wp_delete_comment( $_POST[ 'delete_id' ] , true ) ) ;\n }", "public function delete(array $params) {\n\t\t$userId = $this->getUserId();\n\t\tif (!$userId) {\n\t\t\tthrow new Exception(MSG_NOT_AUTHORIZED, CODE_NOT_AUTHORIZED);\n\t\t}\n\t\tif (!isset($params['id'])) {\n\t\t\tthrow new Exception(MSG_NOTE_ID_MISSING, CODE_NOTE_ID_MISSING);\n\t\t}\n\n\t\t$noteEntity = new NoteEntity();\n\t\t$noteEntity->setOwnerId($userId);\n\t\t$noteEntity->setId($params['id']);\n\t\t\n\t\treturn $this->_noteDAO->delete($noteEntity);\t\t\n\t}", "public function destroy(Note $note)\n {\n if (! $note->isMine) {\n abort(403);\n }\n\n $note->delete();\n\n return response()->json(['message' => 'Note deleted successfully'], 200);\n }", "public function destroy($id)\n {\n $note = Note::find($id);\n $note->delete();\n return $note;\n }", "public function delete($idPost);", "public function destroy(Note $note)\n {\n $note->delete();\n\n return response()->json();\n }", "public function destroy($id)\n {\n $note = Notes::find($id);\n $note->update([\"deleted\" => '1']);\n\n return response()->json(\"Deleted\");\n //\n }", "public function destroy($id)\n {\n Note::destroy($id);\n //redirection\n return redirect()->route('gnotes.create_note');\n }", "public function destroy($draft_id, $note_id)\n {\n //Check for permission\n $note = Note::where('id', '=', $note_id)->where('draft_id', '=', $draft_id)->get()->first();\n\n if (is_null($note)) {\n return response()->json([\n 'message' => 'Unauthorized'\n ], 401);\n }\n\n //check policy\n $this->authorize('delete', $note);\n\n $note->delete();\n\n //return resource\n return new NoteResource($note);\n }", "public function destroy($id)\n {\n $note = Note::findOrFail($id);\n\n $note->delete();\n\n return $this->successReponse($note);\n }", "public function destroy($id)\n {\n try{\n $TecnicNote = TecnicNote::findOrFail($id);\n $TecnicNote->delete();\n return response()->json('administrador eliminado correctamente');\n }catch(\\Throwable $th){\n return response()->json([$th->getMessage(), $th->getLine()]);\n }\n }", "function textus_delete_annotation($noteid) {\n $rows = textus_db_delete_annotation($noteid);\n if ($rows)\n {\n return $rows;\n }\n}", "public function destroy($id)\n {\n $note = Note::find($id);\n $return = $note->delete();\n if ($return){\n return response([\n 'status' => 'Success',\n 'title' => 'Deleted',\n 'text' => 'User Deleted From Your List!!',\n ]);\n }else{\n return response([\n 'status' => 'error',\n 'title' => 'Error!!',\n 'text' => 'Error While Deleting!!',\n ]);\n }\n }", "public function destroy(Note $note)\n {\n if(!$note->delete()) {\n return response()->errorResponse('Error deleting note');\n }\n\n return response()->success('Note Deleted Successfully');\n }", "function delete_private_note($note_id)\n{\n // If user is not logged in, they will be automatically redirected to project root route.\n if (isset($_COOKIE['sessionToken'])) {\n\n // Brings token data stored.\n $user_data = bring_sessionToken_info_by_sessionToken_value();\n\n $conn = new mysqli(\n $_ENV['onlinenotes_database_server_name'],\n $_ENV['onlinenotes_database_username'],\n $_ENV['onlinenotes_database_password'],\n $_ENV['onlinenotes_database_name']\n );\n\n if ($conn->connect_error) {\n die(\"Database connection failed: \" . $conn->connect_error);\n }\n\n // The note is deleted by their associated owner's ID. This ID is stored inside \n // SESSION variables. This prevents malicious actions on deleting private notes.\n if ($stmt = $conn->prepare(\"DELETE FROM NOTE WHERE ID = ? AND owner_id = ?;\")) {\n $stmt->bind_param(\"is\", $note_id, $user_data['user_id']);\n\n $stmt->execute();\n $stmt->close();\n }\n\n $conn->close();\n $url = \"../../private-notes\";\n header('Location: ' . $url);\n } else {\n $url = \"../../\";\n header('Location: ' . $url);\n }\n}", "public function destroy($id)\n {\n $exposicion = Exposicion::findOrFail($id);\n\n $exposicion->deleteImagesNote();\n $exposicion->deleteGalleryImagesNote();\n $exposicion->delete();\n session()->flash('message', ['type' => 'success', 'message' => 'Nota eliminada.']);\n\n return redirect()->route('notes');\n }", "function delete_note_admin($note_id)\n{\n if ($_SESSION['admin_logged_in']) {\n $conn = new mysqli(\n $_ENV['onlinenotes_database_server_name'],\n $_ENV['onlinenotes_database_username'],\n $_ENV['onlinenotes_database_password'],\n $_ENV['onlinenotes_database_name']\n );\n\n if ($conn->connect_error) {\n die(\"Database connection failed: \" . $conn->connect_error);\n }\n\n if ($stmt = $conn->prepare(\"DELETE FROM NOTE WHERE ID = ?;\")) {\n $stmt->bind_param(\"i\", $note_id);\n\n $stmt->execute();\n $stmt->close();\n }\n\n $conn->close();\n }\n}", "public function deleteRecord ($id);", "public function deleteArticle(int $id);", "public function delete( $id );", "public function delete($document_id);", "function delete_associated_notes($user_id)\n{\n $conn = new mysqli(\n $_ENV['onlinenotes_database_server_name'],\n $_ENV['onlinenotes_database_username'],\n $_ENV['onlinenotes_database_password'],\n $_ENV['onlinenotes_database_name']\n );\n\n if ($conn->connect_error) {\n die(\"Database connection failed: \" . $conn->connect_error);\n }\n\n if ($stmt = $conn->prepare(\"DELETE FROM NOTE WHERE owner_id = ?\")) {\n $stmt->bind_param(\"s\", $user_id);\n\n $stmt->execute();\n $stmt->close();\n }\n\n $conn->close();\n}", "function delete($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);", "public function delete($id);" ]
[ "0.8174124", "0.8152727", "0.79196393", "0.78565", "0.7740544", "0.7735133", "0.7658299", "0.762025", "0.75019085", "0.7457625", "0.73661387", "0.7344581", "0.7300714", "0.7202451", "0.71097136", "0.71067804", "0.7063306", "0.69507635", "0.6902017", "0.6899935", "0.6835571", "0.68324876", "0.68255824", "0.681201", "0.6792584", "0.6789091", "0.67760515", "0.67691386", "0.670291", "0.66958886", "0.66777223", "0.66327125", "0.6605764", "0.6594922", "0.6581465", "0.65704525", "0.6537552", "0.6506197", "0.65055007", "0.6497151", "0.64850765", "0.64611995", "0.6452837", "0.6447806", "0.643192", "0.6418502", "0.64125067", "0.6405137", "0.63765746", "0.6368148", "0.6351576", "0.6341075", "0.63314027", "0.6325003", "0.628511", "0.6276109", "0.62647057", "0.61743325", "0.6164012", "0.6159808", "0.61516124", "0.61499125", "0.614601", "0.61162835", "0.6111771", "0.6111771", "0.6111771", "0.6111771", "0.6111771", "0.6111771", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064", "0.611064" ]
0.78228796
4
/ editNote Edits a note's title and body.
public function editNote(Request $request,$id){ $note = \App\Models\Note::find($id); // Verify user against session $user_id = $note->user_id; if ( !isset($_SESSION['user_id']) || $_SESSION['user_id'] != $user_id) { $response = "error"; return $response; } $note->title = $request->input('title'); $note->body = $request->input('body'); $note->save(); return response()->json($note); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Note $note)\n {\n //\n }", "public function edit(TecnicNote $TecnicNote)\n {\n \n }", "public function editnote(Request $request, Note $note)\n {\n\n Note::where('id', '=', $request->id)\n ->update([\n 'title' => $request->title,\n 'body' => $request->body\n ]);\n\n return \"Done\";\n }", "public function editNote($note_id, $notes_title, $notes_content, $db)\r\n {\r\n $sql = \"UPDATE notes\r\n set notes_title = :notes_title,\r\n notes_content = :notes_content\r\n WHERE id = :note_id\";\r\n\r\n $pst = $db->prepare($sql);\r\n $pst->bindParam(':notes_title', $notes_title);\r\n $pst->bindParam(':notes_content', $notes_content);\r\n $pst->bindParam(':note_id', $note_id);\r\n $count = $pst->execute();\r\n return $count;\r\n }", "public function edit(NoteInformation $noteInformation)\n {\n //\n }", "function edit_notes()\n {\n $query = $this->pdo->prepare('UPDATE note SET description=:description, updated_at=NOW() WHERE id=:id');\n $query->execute(array( ':description' => $_POST['edit-note-text'] ,':id' => $_POST['edit-note-id']));\n \n }", "public function edit(PartnerNote $partnerNote)\n {\n //\n }", "public function edit(Note $note)\n {\n return view('notes.edit', compact('note'));\n }", "public function edit(SubjectNotes $subjectNotes)\n {\n //\n }", "public function edit(SubjectNotes $subjectNotes)\n {\n //\n }", "public function edit(Note $note)\n {\n $agents = Agent::orderBy('id','desc')->get();\n return view('dashboard.blog-edit', compact('note', 'agents'));\n }", "public function edit($id)\n {\n // die($_SERVER['REQUEST_METHOD']);\n if (isset($id)) {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n //Sanitize POST array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n $data = [\n 'id' => $id,\n 'title' => htmlspecialchars(trim($_POST['title'])),\n 'body' => htmlspecialchars(trim($_POST['body'])),\n 'category' => htmlspecialchars(trim($_POST['category'])),\n 'title_err' => '',\n 'body_err' => '',\n ];\n if (empty($_POST['title'])) {\n $data['title_err'] = 'The title should not be empty';\n }\n if (empty($_POST['body'])) {\n $data['body_err'] = 'Fill the note body';\n }\n\n if (empty($data['title_err']) && empty($data['body_err'])) {\n //Store into database\n if ($this->notesModel->updateNote($data)) {\n flash('post_message', 'Update successfully');\n redirect('notes/index');\n }\n } else {\n //Load view with errors\n $this->view('notes/edit', $data);\n }\n } else {\n $note = $this->notesModel->getNoteById($id);\n $cats = $this->notesModel->getCategories();\n //Check if admin/default\n // if ($note->id != $_SESSION['user_id']) {\n // redirect('notes/index');\n // }\n $data = [\n 'id' => $id,\n 'title' => $note->title,\n 'body' => $note->content,\n 'category' => $note->category,\n 'categories' => $cats,\n ];\n $this->view('notes/edit', $data);\n }\n } else {\n redirect('notes');\n }\n }", "public function setNote($note);", "public function editNote($noteId, Request $request)\n {\n //update note data\n $note = Note::find($noteId);\n $note->note = $request->input('content');\n $note->in_reply_to = $request->input('in-reply-to');\n $note->save();\n\n if ($request->input('webmentions')) {\n $wmc = new WebMentionsController();\n $wmc->send($note);\n }\n\n return view('admin.editnotesuccess', ['id' => $noteId]);\n }", "public function update(Note $note)\n {\n $data = request()->validate([\n 'text' => 'required|string',\n ]);\n\n $note->update($data);\n }", "function __editNotes()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //get the note\n $this->__viewNotes();\n\n //visibility\n $this->data['visible']['wi_my_note_edit'] = 1;\n $this->data['visible']['wi_my_note_view'] = 0;\n\n }", "public function edit(Note $note)\n {\n abort_if(Gate::denies('note_management_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n $assets = Asset::all()->pluck('name', 'id');\n\n return view('admin.notes.edit', compact('note', 'assets'));\n }", "public function update(Note $note, NotesRequest $request)\n {\n /*request()->validate([\n 'title' => 'required',\n 'body' => 'required|min:5',\n ]);*/\n $note->update(request()->all());\n return redirect('/notes');\n }", "public function edit($id)\n {\n $note = Note::find($id);\n $contents = Content::where( 'parent_id', 0 )->get();\n\n $chapter_id = Content::where( 'id', $note->chapter_id )->first();\n $subject_id = Content::where( 'id', $chapter_id->parent_id )->first();\n $class_id = Content::where( 'id', $subject_id->parent_id )->first();\n\n $content_id = [\n 'chapter_id' => $chapter_id->id,\n 'subject_id' => $subject_id->id,\n 'class_id' => $class_id->id,\n ];\n\n\n return view('admin.note.edit', compact('note', 'contents', 'content_id'));\n }", "public function edit() {\n\n\t\t$db = Manager::getDatabase();\n\n\t\t$title = $_POST['title'];\n\t\t$content = $_POST['content'];\n\t\t$commentId = (int) $_POST['commentId'];\n\t\t$chapterId = (int) $_POST['chapterId'];\n\n\t\tif (!empty($title) && !empty($content) && !empty($commentId)) {\n\t\t\t\n\t\t\t$title = Str::secured($_POST['title']);\n\t\t\t$content = Str::secured($_POST['content']);\n\t\t\t\n\t\t\t$commentManager = new CommentManager();\n\n\t\t\tif ($commentManager->idExist($db, $commentId)) {\n\t\t\t\t\n\t\t\t\t$commentManager->update($db, $commentId, $title, $content);\n\t\t\t}\n\t\t}\n\n\t\t$hiddenChapterId = Str::encrypt($chapterId);\n\t\theader('Location: ./index.php?controller=reading&id=' . $hiddenChapterId);\n\n\t}", "function modifyNote($note) {\n $tmpArray = $this->_bind($note);\n\n $tmpArray = $this->prepareString($tmpArray);\n\n\t\t$result = $this->_setEntry($tmpArray);\n\n return $result;\n }", "function UpdateNote($note){\r\n $statement = new UpdateStatement(\"job_note\");\r\n $statement->addParameter(\"note_date\", $note->getNoteDate());\r\n $statement->addParameter(\"note_name\", $note->getNoteName());\r\n $statement->addParameter(\"note\", $note->getNote());\r\n $statement->where(\"id\", $note->getId());\r\n $statement->where(\"job_id\", $note->getJobId());\r\n $statement->executeStatement();\r\n }", "public function updateAction() {\n \n $this->_form->customSubmitBtn = $this->xhr; \n $this->_form->build( $this->uri,\n $this->consumer_id,\n $this->user_id,\n $this->id);\n \n $data = $this->_model->readNote($this->id)->toArray();\n $this->_form->populate($data);\n \n $this->result = Main_Forms_Handler::onPost($this->_form,\n $this->post,\n $this->_model,\n \"updateNote\",\n $this->params,\n $this->_helper,\n $this->indexAction . $this->consumer_id,\n \"Note updated.\",\n $this->xhr);\n \n \n $this->_onSubmit();\n \n }", "public function update(Request $request, Note $note)\n {\n \n }", "public function edit(NewsReplie $newsReplie)\n {\n //\n }", "function setNoteText(){\n $html = \"\";\n \n $this->aFields[\"note\"]->editable = true;\n $this->aFields[\"note\"]->value = $html;\n }", "public function edit($id)\n\t{\n\t\t\n\t\t# Instantiating an object of the Note class\n\t\t$note = new Note();\n\t\t$note = $note->getNote($id);\n\t\t\n\t\tif(sizeof($note) == 0)\n\t\t{\n\t\t\t$note = ['Error' => 'No note. Please try again.'];\n\t\t}\n\t\t\n\t\t#return\n\t\treturn $note;\n\t}", "public function setNote($note) {\n\n $this->note = $note;\n }", "public function edit($id)\n {\n $note = Note::find($id);\n return view('notes.update', compact('note'));\n }", "public function actionSaveNotes()\r\n\t{\n\t\tif(isset($_POST['note']) && isset($_POST['id'])) {\n\t\t\t$employee_id = $_POST['id'];\n\t\t\t$model = $this->loadModel($employee_id, Yii::app()->user->id);\r\n\t\t\t$model->note = $_POST['note'];\n\t\t\t//var_dump($model);die;\r\n\t\t\t$model->save();\r\n\t\t\techo nl2br($model->note);\r\n\t\t}\r\n\t}", "public function update_note($id,$title,$note){\n $sql = \"UPDATE notes SET title = :title, note = :note ,updated_at = NOW() WHERE id=:id\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(\n [\n 'id' => $id,\n 'title' => $title,\n 'note' => $note\n ]\n );\n\n return $stmt;\n }", "public function edit(Notifikasi $notifikasi)\n {\n //\n }", "public function edit($id, $newTitle = null, $newDescription = null);", "public function edit($id)\n {\n $note = Note::findOrFail($id);\n\n return view('note.edit', compact('note'));\n }", "public function edit(Answere $answere)\n {\n //\n }", "public function edit(ToDo $toDo)\n {\n //\n }", "public function edit(post $post)\n {\n //\n }", "public function edit()\n {\n $id = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $post = $this->post->getPost($id); // je récupère le post\n\n // j'arrive en post car des données sont saisies dans le formulaire\n if($this->request->parameterExist('title') && $this->request->parameterExist('content')) {\n\n $this->post->updatePost(\n $this->request->getParameter('title'),\n $this->request->getParameter('content'),\n $id\n );\n\n $this->redirect(\"admin\", \"post/\" . $post['id']); // une fois le post créé, je redirige vers la vue Admin/post/iddupost\n }\n\n // j'arrive sur la vue en Get\n $this->buildView(array('post'=>$post));\n }", "function update($note) {\r\n $CI = &get_instance();\r\n //check access rights (by looking at the original note in the database, as the POST\r\n //data might have been rigged!)\r\n $userlogin = getUserLogin();\r\n $user = $CI->user_db->getByID($userlogin->userID());\r\n $note_testrights = $CI->note_db->getByID($note->note_id);\r\n if ( ($note_testrights == null) \r\n ||\r\n (!$userlogin->hasRights('note_edit'))\r\n || \r\n (!$CI->accesslevels_lib->canEditObject($note_testrights))\r\n )\r\n {\r\n\t appendErrorMessage(__('Edit note').': '.__('insufficient rights').'.<br/>');\r\n\t return;\r\n }\r\n \r\n //start update\r\n $updatefields = array('text'=>$note->text);\r\n\r\n $CI->db->update(\"notes\", $updatefields,array('note_id'=>$note->note_id));\r\n \r\n\r\n //remove old xref ids\r\n $CI->db->delete('notecrossrefid', array('note_id' => $note->note_id)); \r\n //set crossref ids\r\n $xref_ids = getCrossrefIDsForText($note->text);\r\n foreach ($xref_ids as $xref_id) {\r\n $CI->db->insert('notecrossrefid', array('xref_id'=>$xref_id,'note_id'=>$note->note_id));\r\n }\r\n \r\n return True;\r\n }", "function edit_author_notes($id)\n{\n global $app;\n\n // parameter checking\n if (!is_numeric($id)) {\n $app->getLog()->warn('edit_author_notes: invalid author id ' . $id);\n $app->halt(400, \"Bad parameter\");\n }\n\n $app->getLog()->debug('edit_author_notes: ' . $id);\n $note_data = $app->request()->post();\n $app->getLog()->debug('edit_author_notes: note ' . var_export($note_data, true));\n try {\n $markdownParser = new MarkdownExtraParser();\n $html = $markdownParser->transformMarkdown($note_data['ntext']);\n $author = $app->calibre->author($id);\n $note = $app->bbs->editAuthorNote($id, $author->name, $note_data['mime'], $note_data['ntext']);\n } catch (Exception $e) {\n $note = null;\n }\n $resp = $app->response();\n if (!is_null($note)) {\n $resp->status(200);\n $msg = getMessageString('admin_modified');\n $note2 = $note->getProperties();\n $note2['html'] = $html;\n $answer = json_encode(['note' => $note2, 'msg' => $msg]);\n $resp->header('Content-type', 'application/json');\n } else {\n $resp->status(500);\n $resp->header('Content-type', 'text/plain');\n $answer = getMessageString('admin_modify_error');\n }\n $resp->header('Content-Length', strlen($answer));\n $resp->body($answer);\n}", "public function edit_postAction() {\r\n\t\t$info = $this->getPost(array('id', 'sort', 'title', 'channel_id', 'link', 'start_time', 'end_time','hits', 'status'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$ret = Gou_Service_Notice::updateNotice($info, intval($info['id']));\r\n\t\tif (!$ret) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功.'); \t\t\r\n\t}", "public function edit() {\n\t\t$data['pagetitle'] = 'Dashboard - Edit Posts';\n\n\t\t$data['postid'] = $viewmodel->getPostById($postid['id'] );\n\t\tView::renderAdminTemplate($data, \"App/Views/admin/edit/index.php\") ;\n\t}", "public static function set_edit_form(Fieldset $form, $note = null)\n\t{\n\t\t$form->add('title', '* Title <em class=\"validation-info\">(2 to 128 caracters long)</em>',\n\t\t\t\tarray(\t'id' => 'title',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'value' => !empty($note) ? $note->title : ''),\n\t\t\t\tarray_merge(\n\t\t\t\t\t\tstatic::get_common_rules('title'),\n\t\t\t\t\t\tarray(array('unique_update', 'title'))));\n\n\t\t$form->add('body', '* Body',\n\t\t\t\tarray(\t'id' => 'body',\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'value' => !empty($note) ? $note->body : ''),\n\t\t\t\tstatic::get_common_rules('body'));\n\n\t\t$form->add('publish', null,\n\t\t\t\tarray(\t'type' => 'submit',\n\t\t\t\t\t\t'value' => 'publish'));\n\t\t$form->add('draft', null,\n\t\t\t\tarray(\t'type' => 'submit',\n\t\t\t\t\t\t'value' => 'draft'));\n\t\t$form->add('cancel', null,\n\t\t\t\tarray(\t'type' => 'submit',\n\t\t\t\t\t\t'value' => 'cancel'));\n\n\t}", "public function setNote($text){\r\n $this->note = $text;\r\n }", "public function editAction()\n {\n\n $id = $this->getRouteParams(\"id\");\n\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n $id = $_POST['id'];\n $title = $_POST['title'];\n $content = $_POST['content'];\n\n\n try {\n\n $post = PostService::update($id, $title, $content);\n\n View::renderTemplate('Posts/editPost.html', [\n 'post' => $post\n ]);\n return;\n\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n\n } else {\n $post = PostService::readOne($id);\n View::renderTemplate('Posts/editPost.html', [\n 'post' => $post\n ]);\n }\n\n }", "public function edit(Exercise $exercise){\n //\n }", "public function updated(AppointmentNote $note)\n {\n //\n }", "public function ask_edit($id, $answer, $title = '')\n\t{\n\t\t$sql = \"UPDATE \".$this->table_ask.\" SET text = ?, title = ? WHERE id = ?\";\n\t\t$data = array($answer, $title, $id);\n\t\t$query = $this->db->query($sql, $data);\t\n\t}", "public function edit(comment $comment)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Post $post)\n {\n //\n }", "public function edit(Journalentery $journalentery)\n {\n //\n }", "public function edit(Post $post) {\n //\n }", "public function edit(JournalEntry $entry)\n {\n //\n }", "public function addNote($note)\n {\n }", "public function edit(Receipt $receipt)\n {\n //\n }", "public function edit(Tipo_documento $tipo_documento)\n {\n //\n }", "public function edit($id, $content)\n {\n }", "public function editNotePage($noteId)\n {\n $note = Note::find($noteId);\n $note->originalNote = $note->getOriginal('note');\n\n return view('admin.editnote', ['id' => $noteId, 'note' => $note]);\n }", "public function edit(Post $post)\n {\n //\n }", "public function update(Request $request, Note $note)\n {\n $note->access = $request->access;\n $note->description = $request->description;\n $note->user_id = auth()->user()->id;\n $note->agent_id = $request->agent_id;\n $note->save();\n\n $success = \"Blog Updated\";\n\n return redirect( route('home') )->with(['data' => $success]);\n }", "public function edit(Postulado $postulado)\n {\n //\n }", "function modify_note($module_key,$link_key) {\r\n\r\n\tglobal $CONN, $CONFIG;\r\n\t$body = $_POST['body'];\r\n\t$sql = \"UPDATE {$CONFIG['DB_PREFIX']}notes SET note='$body' WHERE module_key='$module_key'\";\t\r\n\tif ($CONN->Execute($sql) === false) {\r\n\t\r\n\t\t$message = 'There was an error modifying your note: '.$CONN->ErrorMsg().' <br />';\r\n\t\treturn $message;\r\n\t\t\r\n\t} else {\t \r\n\t\r\n\t\t\treturn true; \r\n\t}\r\n\r\n}", "public function update(NoteCreateRequest $request, Note $note)\n {\n $data = $request->all();\n $note->update($data);\n $notebook = $note->notebook_id;\n return redirect(route('notebooks.show', compact('notebook')));\n }", "public function editIssue($key, $id, $body)\n {\n $this->manager->getCard($id)\n ->setDescription($body)\n ->save();\n\n }", "public function edit($id)\n {\n $todo = Todo::findOrFail($id);\n $this->todo_id = $id;\n $this->name = $todo->name;\n $this->content = $todo->content;\n \n $this->openModal();\n }", "public function edit(Problem $problem)\n {\n //\n }", "public function edit()\n {\n session_start();\n\n // Falls der Benutzer eingeloggt ist wird ihm die Edit View angezeigt, ansonsten ein Fehler\n if (isset($_SESSION['isLoggedIn']) && !empty($_SESSION['isLoggedIn'])) {\n $post = $this->postRepository->readById($_GET['id']);\n $view = new View('post/edit');\n $view->title = 'Post editieren';\n $view->post = $post;\n $view->display();\n } else {\n header('Location: /user/index/?error=Du bist nicht eingeloggt!');\n }\n }", "public function edit($id)\n {\n\n $projectNote = $this->repository->find($id);\n\n return view('projectNotes.edit', compact('projectNote'));\n }", "public function edit(Notification $notification)\n {\n //\n }", "public function edit(Notification $notification)\n {\n //\n }", "public function edit($id)\n {\n $post = \\App\\Models\\Post::findOrFail($id);\n $this->post_id = $id;\n $this->title = $post->title;\n $this->body = $post->body;\n\n $this->openModal();\n }", "public function edit($id)\n\t{\n\t\t$exam_glass_note = ExamGlassNote::findOrFail($id);\n\n\t\treturn view('exam_glass_notes.edit', compact('exam_glass_note'));\n\t}", "public function edit(news $news)\n {\n //\n }", "public function edit(news $news)\n {\n //\n }", "public function update()\n {\n $note_id=$_POST['note_id'];\n $new_title=$_POST['title'];\n $new_tag=$_POST['tag'];\n $note=DB::table('notes')->where('note_id',$note_id)->update(['title'=>$new_title,'tag'=>$new_tag]);\n// $note=DB::table('notes')->where('note_id',$note_id)->get();\n return $note;\n }", "public function edit(Comment $comment)\n {\n //\n }", "public function edit(Comment $comment)\n {\n //\n }", "public function edit(Comment $comment)\n {\n //\n }", "public function edit(Comment $comment)\n {\n //\n }", "public function edit(Comment $comment)\n {\n //\n }", "public function edit(Comment $comment)\n {\n //\n }", "public function edit(Comment $comment)\n {\n //\n }", "public function edit(Comment $comment)\n {\n //\n }", "public function edit(Comment $comment)\n {\n //\n }" ]
[ "0.8414705", "0.7915074", "0.76056266", "0.74378467", "0.74200344", "0.72463846", "0.72347724", "0.7033852", "0.7031743", "0.7031743", "0.6990008", "0.6956392", "0.6895081", "0.68190575", "0.6818797", "0.67946965", "0.66887563", "0.66047263", "0.6572095", "0.6562304", "0.65536934", "0.65345854", "0.6523817", "0.6518556", "0.6482351", "0.6447619", "0.6432106", "0.64097524", "0.6409339", "0.6353216", "0.63316196", "0.63239855", "0.6309072", "0.6300292", "0.6274781", "0.6265245", "0.625843", "0.6243818", "0.6241572", "0.62330174", "0.6221953", "0.6209079", "0.6203816", "0.61644274", "0.61585194", "0.6156271", "0.6155311", "0.61514544", "0.6142874", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.6133103", "0.61294425", "0.6129319", "0.61265945", "0.6118757", "0.6116086", "0.6115896", "0.61081135", "0.60991967", "0.60929686", "0.6090013", "0.6084698", "0.6083185", "0.6081995", "0.607329", "0.60726476", "0.60706395", "0.605998", "0.60468704", "0.60432637", "0.60432637", "0.6040322", "0.6034711", "0.60145056", "0.60145056", "0.6000263", "0.5996519", "0.5996519", "0.5996519", "0.5996519", "0.5996519", "0.5996519", "0.5996519", "0.5996519", "0.5996519" ]
0.68265706
13
/ saveNote Saves a brand new note.
public function saveNote(Request $request) { $note = \App\Models\Note::create($request->all()); // Verify user against session $user_id = $note->user_id; if ( !isset($_SESSION['user_id']) || $_SESSION['user_id'] != $user_id) { $response = "error"; return $response; } return response()->json($note); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save(KnsprNote $note);", "public function saveNote(array $note);", "public function setNote($note);", "public function save()\n {\n\n $url = parse_url($this->params->url);\n $path = $url['path'];\n $note = new Note(array('url' => $path));\n $note->load();\n\n // Get the new note config\n\n $config = json_decode($this->params->config);\n\n // Can we read or edit it?\n\n $can_read = $this->can_read($note);\n $can_edit = $can_read ? $this->can_edit($note) : FALSE;\n\n // Edit the note (if allowed)\n\n $old_notes = $note->notes;\n if ($config->notes)\n {\n $note->notes = json_encode($config->notes);\n $note->words = Note::words($config->notes);\n }\n if ($config->photo) $note->photo = $config->photo;\n if ($config->paper) $note->paper = $config->paper;\n if ($config->readers) $note->readers = $config->readers;\n if ($config->editors) $note->editors = $config->editors;\n if ($can_edit) $note->save();\n $this->render->data = array(\n 'now' => time(),\n 'diff' => $can_read ? $this->diff($old_notes, $note->notes) : NULL,\n 'paper' => $can_read ? $note->paper : 'secret',\n 'photo' => $note->photo,\n 'readers' => $note->readers,\n 'editors' => $note->editors,\n 'is_owner' => $this->is_owner,\n 'can_read' => $can_read,\n 'can_edit' => $can_edit,\n 'notelist' => $this->recent(),\n );\n\n // Log the info\n\n $action = $can_edit ? 'saved' : 'viewed';\n Log::info($this->host_ip . \" $action a note at $path\");\n }", "public function actionSaveNotes()\r\n\t{\n\t\tif(isset($_POST['note']) && isset($_POST['id'])) {\n\t\t\t$employee_id = $_POST['id'];\n\t\t\t$model = $this->loadModel($employee_id, Yii::app()->user->id);\r\n\t\t\t$model->note = $_POST['note'];\n\t\t\t//var_dump($model);die;\r\n\t\t\t$model->save();\r\n\t\t\techo nl2br($model->note);\r\n\t\t}\r\n\t}", "public function setNote($note) {\n\n $this->note = $note;\n }", "function save_note_to_disk ($note_id, $content) {\n \n if (!file_exists ('notes')) {\n # MAKE DIRECTORY\n mkdir ('notes');\n }\n \n $filename = \"notes/{$note_id}.txt\";\n \n if (!$handler = fopen ($filename, 'w+')) {\n return FALSE;\n }\n \n fwrite ($handler, $content);\n \n fclose ($handler);\n \n return TRUE;\n \n }", "public function addNote($note)\n {\n }", "function AddNote($note){\r\n $statement = new InsertStatement(\"job_note\");\r\n $statement->addParameter(\"job_id\", $note->getJobId());\r\n $statement->addParameter(\"note_date\", $note->getNoteDate());\r\n $statement->addParameter(\"note_name\", $note->getNoteName());\r\n $statement->addParameter(\"note\", $note->getNote());\r\n $statement->executeStatement();\r\n }", "public function insert(Note $note) {\n $req = $this->_db->prepare('INSERT INTO note(restaurant, note, id_profil, date_time) VALUES(:restaurant, :note, :id_profil, :date_time)');\n $req->bindValue(':restaurant', strtolower($note->getRestaurant()));\n $req->bindValue(':note', $note->getNote());\n $req->bindValue(':id_profil', $note->getId_profil());\n $req->bindValue(':date_time', $note->getDate_time());\n $req->execute();\n }", "public function store()\n\t{\t\n\t\t\n\t\t# instantiate\t\n\t\t$note = new Note();\n\t\t\n\t\t$note = $note->postNote(['content'=>Input::get('content'), 'title' => Input::get('title'), 'project_id'=>Input::get('id'), 'project_title'=> Input::get('project_title'),'user_id'=> Auth::id()]);\n\t\t\n\t\t# method returns success or error\n\t\tif($note == 'error')\n\t\t{\n\t\t\t\t\n\n\t\t\t# PK\n\t\t\treturn Redirect::to('projects/'. Input::get('id'))->withErrors('Error saving note. Please try again')->withInput();\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t#Flash message\n\t\t\tSession::flash('flash_message_success', 'Note created!');\n\t\t\t\n\t\t\treturn Redirect::to('projects/'. Input::get('id'));\n\t\t\t\n\t\t}\n\t}", "public function setNote(?string $note): void\n {\n $this->note['value'] = $note;\n }", "function addNote()\n {\n $replace = array();\n\n //current logged in user details\n $userInfo = $this->userInfo();\n\n $patientId = $this->value('patient_id');\n\n $msg = \"\";\n\n //save button clicked!\n if(\"Save\" == $this->value('submitted'))\n {\n $newNote = $this->value('note');\n\n if(strlen(trim($newNote)) == 0)\n {\n $msg = '<div style=\"padding-left:5px;color:red;\">Please enter a note for this patient.</div>';\n }\n else\n {\n $insertArr = array(\n 'patient_id' => $patientId,\n 'provider_id' => $userInfo['user_id'],\n 'note' => $this->encrypt_data($this->value('note')),\n 'created' => date('Y-m-d H:i:s', time())\n );\n\n $result = $this->insert('notepad', $insertArr);\n\n /* if(!$result)\n {\n $msg = '<div style=\"padding-left:5px;\">Failed adding a note.</div>';\n } */\n }\n $privateKey = $this->config['private_key'];\n\n // patient details\n $query = \"SELECT \n AES_DECRYPT(UNHEX(name_first),'{$privateKey}') as name_first,\n AES_DECRYPT(UNHEX(name_last),'{$privateKey}') as name_last \n FROM \n user WHERE user_id = \" . $patientId;\n $result = $this->execute_query($query);\n\n $row = $this->fetch_array($result);\n\n $replace = $this->notesList($patientId);\n $patientName = $row['name_first'] . \"&nbsp;&nbsp;\" . $row['name_last'];\n $replace['patient_id'] = $patientId;\n $replace['patientName'] = $patientName;\n $replace['statusMessage'] = $msg;\n }\n else\n {\n $replace = $this->notesList($patientId);\n }\n\n $replace['patient_id'] = $patientId;\n\n $this->output = $this->build_template($this->get_template(\"addNote\"), $replace);\n }", "public function store(Request $request)\n {\n $note = new Note();\n\n $note->titulo = $request->titulo;\n $note->descripcion = $request->descripcion;\n $note->favorito = $request->favorito;\n $note->save();\n print(\"Nota creada\");\n }", "public function createNote($note)\n {\n $laranote = Laranote::create([\n 'model' => get_class($this),\n 'model_id' => $this->{$this->primaryKey},\n 'note' => $note\n ]);\n\n return $laranote;\n }", "public function store(Note $note) {\n $this->authorize('update', $note);\n $data = request()->validate([\n 'title' => 'required|string'\n ]);\n\n $tag = Tag::firstOrCreate([\n 'title' => $data['title']\n ], [\n // Add the user when creating\n 'user_id' => auth()->id()\n ]);\n\n if(!$note->tags->contains($tag->id))\n $note->tags()->attach($tag->id);\n\n return $note->load('tags');\n }", "public function store(NoteCreateRequest $request)\n {\n $data = $request->all();\n Note::create($data);\n // Get the notbook id and send to the notebook show view\n $notebook = $request->notebook_id;\n return redirect(route('notebooks.show', compact('notebook')));\n }", "public function storeNote(StylistNoteFormRequest $request, Stylist $stylist, StylistNote $note)\n\t{\n\t\t\n\t\t$input = $request->all();\n\t\t\n\t\tStylistNote::create($input);\n\t\t\n\t\treturn redirect()->back()->with('message', 'Note added');\n\t}", "public function SaveNote($note)\n {\n $dataArray = $this->getAllNotes();\n\n if (array_key_exists($note->getNoteID(), $dataArray)) {\n try {\n $dbh = new \\PDO('sqlite:' . $this->fileName);\n $dbh->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n $sql = \"UPDATE note SET subjectLine='\" . $note->getSubjectLine() . \"', authorName='\" . $note->getAuthorName() . \"', date='\" . $note->getDate() . \"', noteBody='\" . $note->getNoteBody() . \"', numOfChar=\" . $note->getNumOfChar() . \" WHERE id=\" . $note->getNoteID();\n // $sql = \"UPDATE note SET subjectLine= :subjectLine, authorName= :authorName , date= :date, noteBody= :noteBody, numOfChar= :numOfChar WHERE id= :id\";\n\n\n // Prepare statement\n $stmt = $dbh->prepare($sql);\n/*\n $stmt->bindParam(':subjectLine',$note->getSubjectLine() , PDO::PARAM_STR, 12);\n $stmt->bindParam(':authorName', $note->getAuthorName() , PDO::PARAM_STR, 12);\n $stmt->bindParam(':noteBody', $note->getNoteBody() , PDO::PARAM_STR, 12);\n $stmt->bindParam(':date', $note->getDate() , PDO::PARAM_STR, 12);\n $stmt->bindParam(':numOfChar', $note->getNumOfChar(), PDO::PARAM_INT);\n $stmt->bindParam(':id', $note->getNoteID(), PDO::PARAM_INT);\n*/\n // execute the query\n $stmt->execute();\n\n // echo a message to say the UPDATE succeeded\n echo $stmt->rowCount() . \" records UPDATED successfully\";\n } catch (PDOException $e) {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n\n $conn = null;\n\n } else {\n //echo \"No note key found\";\n try {\n $dbh = new \\PDO('sqlite:' . $this->fileName);\n $dbh->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\n\n $dbh->exec(\"INSERT INTO note (subjectLine,noteBody,authorName,date,numOfChar) VALUES ('\" . $note->getSubjectLine() . \"','\" . $note->getNoteBody() . \"','\" . $note->getAuthorName() . \"','\" . $note->getDate() . \"',\" . $note->getNumOfChar() . \")\");\n\n\n $dbh = null;\n } catch (PDOException $e) {\n echo $e->getMessage();\n echo '<a href=\"index.php\" role=\"button\" class=\"btn btn-primary btn-lg\">Home</a>';\n exit(0);\n }\n }\n\n\n }", "static function addNote($note)\n {\n global $db;\n $id = NULL;\n\n if (self::isValidNote($note)) {\n\n $note = self::castNote($note);\n try {\n $id = $db->insert('note', $note);\n } catch (\\Exception $exception) {\n Log::write($exception, $db->getLastError());\n }\n }\n\n return $id;\n }", "public function saveSellerNotes($id, $notes){\n dibi::update('orders', array('seller_notes' => $notes))\n ->where('order_id = %i', $id)->execute();\n }", "public function store(StoreNoteRequest $request)\n {\n $note = Note::create($request->validated());\n\n return redirect()->route('admin.notes.index')->withMessage('Note has been added successfully');\n }", "function saveText($userID, $note){\n\t\t\n\t\t//call function in dbDials.php\n\t\treturn newAnnotation($userID, $note);\n\t}", "function saveSampleNotes() {\n\t \n\t \n\t \n\t $data = $this->input->post();\n\t \t \t \n\t if ($this->products_model->saveSampleNotes($data)) {\n\t \n\t \tdie(nl2br($data['notes']));\t \t \n\t \t \t \n\t } else {\n\t\t \n\t\t die(\"ERROR\");\n\t\t \n\t }\n\t \t \n\t \n\t \n }", "function add($note) {\r\n $CI = &get_instance();\r\n //check access rights (!)\r\n $userlogin = getUserLogin();\r\n $user = $CI->user_db->getByID($userlogin->userID());\r\n $publication = $CI->publication_db->getByID($note->pub_id);\r\n if ( ($publication == null) \r\n ||\r\n (!$userlogin->hasRights('note_edit'))\r\n || \r\n (!$CI->accesslevels_lib->canEditObject($publication))\r\n ) \r\n {\r\n\t appendErrorMessage(__('Add note').': '.__('insufficient rights').'.<br/>');\r\n\t return;\r\n } \r\n //add new note\r\n $CI->db->insert(\"notes\", array('text' => $note->text,\r\n 'pub_id' => $note->pub_id,\r\n 'user_id' => $userlogin->userId()));\r\n $new_id = $CI->db->insert_id();\r\n $note->note_id = $new_id;\r\n $CI->accesslevels_lib->initNoteAccessLevels($note); \r\n //set crossref ids\r\n $xref_ids = getCrossrefIDsForText($note->text);\r\n foreach ($xref_ids as $xref_id) {\r\n $CI->db->insert(\"notecrossrefid\", array('xref_id'=>$xref_id, 'note_id'=>$note->note_id));\r\n }\r\n \r\n return $new_id;\r\n }", "public function addNote($note)\n {\n $notes = trim($this->getNodeText('/p:package/p:notes'));\n if ($notes != '*') {\n $new_notes = \"\\n* \" . $note . \"\\n\" . $notes . \"\\n \";\n } else {\n $new_notes = \"\\n* \" . $note . \"\\n \";\n }\n $this->replaceTextNode('/p:package/p:notes', $new_notes);\n\n $release = $this->_fetchCurrentRelease();\n if ($release !== null) {\n $this->replaceTextNodeRelativeTo(\n './p:notes', $release, $new_notes . ' '\n );\n }\n }", "public function save($userId,$notes=null)\n\t{ \n $newILOIds = Content::getILOIds($this->content);\n $oldILOIds = array();\n\n # Update existing discussion\n if(!empty($this->id))\n {\n $query = sprintf(\"SELECT content FROM discussion WHERE id='%s'\",pg_escape_string($this->id));\n $result = $GLOBALS['transaction']->query($query);\n $oldILOIds = Content::getILOIds($result[0]['content']);\n $query = sprintf(\"UPDATE discussion SET element_id = '%s', element_type = '%s', content = '%s' WHERE id='%s'\", \n pg_escape_string($this->elementId),\n pg_escape_string($this->elementType),\n pg_escape_string($this->content),\n pg_escape_string($this->id));\n }\n # New discussion\n else\n {\n $query = sprintf(\"INSERT INTO discussion (element_id, element_type, content) VALUES ('%s','%s','%s')\",\n pg_escape_string($this->elementId),\n pg_escape_string($this->elementType),\n pg_escape_string($this->content));\n }\n\n # Run query\n $GLOBALS['transaction']->query($query,\"Query \".$query.\" failed in Discussion::save()\");\n\n $this->id = parent::URIToId($this->path,\"discussion\");\n $revisionRow = new RevisionRow(\"discussion_history\",\"discussion\");\n $revisionRow->loadFromData(null,$this->id,$this->name,$this->content,$userId,null);\n $revisionRow->save();\n \n require_once(\"classes/resources/Lesson.php\");\n Content::checkILOsExist($this->ilos,$newILOIds);\n $this->saveIlos($userId,$newILOIds,$oldILOIds);\n $this->saveCitations();\n\n return true;\n\t}", "public function store(NotePostRequest $request)\n {\n $note = Note::create($request->all());\n\n return response(['success' => true, 'data'=> $note]);\n }", "public function appendNoteToFile(Note $note, string $filename){\n }", "public function addNote($note)\n {\n if (! is_string($note)) {\n throw new Exception('$note must be a string');\n }\n\n if (is_null($this->notes)) {\n $this->loadNotes();\n }\n\n $this->notes[] = $note;\n }", "public function saveNotes(){\n\t \t$note = $this->input->post('notes');\n\t \t$barcode = $this->input->post('child_barcode');\n\n\t \t$update_note = $this->db->query(\"UPDATE LZ_DEKIT_US_DT SET PIC_NOTES = '$note' WHERE BARCODE_PRV_NO = $barcode\");\n\n\t \tif($update_note){\n\t \t\treturn 1;\n\t \t}else{\n\t \t\treturn 0;\n\t \t}\n\n\t }", "function createNote();", "protected function saveDeckNoteReturn()\n {\n $request = $this->request();\n $player = $this->getCurrentPlayer();\n\n $this->result()->setCurrent('Decks');\n\n $this->assertParamsNonEmpty(['current_deck']);\n $deckId = $request['current_deck'];\n\n $deck = $this->dbEntity()->deck()->getDeckAsserted($deckId);\n\n // validate deck ownership\n if ($deck->getUsername() != $player->getUsername()) {\n throw new Exception('Can only manipulate own deck', Exception::WARNING);\n }\n\n $this->result()->setCurrent('Decks_note');\n\n $this->assertParamsExist(['content']);\n\n $this->service()->deck()->saveNote($deck, $request['content']);\n\n $this->result()\n ->setCurrent('Decks_edit')\n ->setInfo('Deck note saved');\n }", "static private function add_note($id, $note) {\r\n\r\n if(!apply_filters('gravityforms_constant_contact_add_notes_to_entries', true) || !class_exists('RGFormsModel')) { return; }\r\n\r\n RGFormsModel::add_note($id, 0, __('Gravity Forms Constant Contact Add-on'), $note);\r\n }", "function UpdateNote($note){\r\n $statement = new UpdateStatement(\"job_note\");\r\n $statement->addParameter(\"note_date\", $note->getNoteDate());\r\n $statement->addParameter(\"note_name\", $note->getNoteName());\r\n $statement->addParameter(\"note\", $note->getNote());\r\n $statement->where(\"id\", $note->getId());\r\n $statement->where(\"job_id\", $note->getJobId());\r\n $statement->executeStatement();\r\n }", "public function setNote(\\NOKA\\PHPUBL\\UBL\\Common\\BasicComponents\\Note $note)\n {\n $this->note = $note;\n return $this;\n }", "public function update(Note $note)\n {\n $data = request()->validate([\n 'text' => 'required|string',\n ]);\n\n $note->update($data);\n }", "public function store()\n\t{\n\t\t$post = array(\n\t\t\t'user_id'=>Input::get('user_id'),\n\t\t\t'type'=>Input::get('type'),\n\t\t\t'note'=>Input::get('note'),\n\t\t\t'info'=>Input::get('info')\n\t\t);\n\t\t\n\t\tNotes::create($post);\n\t\treturn Redirect::route('admin.notes.index');\n\t\t\n\t\t\n\t}", "public function addNoteAction() {\n try {\n if (!($this->getRequest()->isXmlHttpRequest())) {\n throw new \\Exception('illegal request');\n }\n \n \n $post = $this->getRequest()->getPost();\n $note = $post['note'];\n $errs = array();\n if (empty($note)) {\n $errs['note'] = array('Note cannot be empty');\n }\n \n if (!empty($errs)) {\n return new JsonModel(array('err'=>true, 'info'=>$errs));\n }\n \n $notes = $this->getSpace()->getNotes();\n $notes = json_decode($notes, true);\n if (empty($notes)) {\n $notes = array();\n }\n \n $noteIdx = time();\n $notes[$noteIdx] = $note;\n $noteCnt = count($notes);\n $notes = json_encode($notes);\n \n $this->getSpace()->setNotes($notes);\n $this->getEntityManager()->persist($this->getSpace());\n $this->getEntityManager()->flush();\n\n $data = array('err'=>false, 'cnt'=>$noteCnt, 'id'=>$noteIdx);\n \n } catch (\\Exception $ex) {\n $data = array('err'=>true, 'info'=>array('ex'=>$ex->getMessage()));\n }\n return new JsonModel(empty($data)?array('err'=>true):$data);/**/\n }", "public function editnote(Request $request, Note $note)\n {\n\n Note::where('id', '=', $request->id)\n ->update([\n 'title' => $request->title,\n 'body' => $request->body\n ]);\n\n return \"Done\";\n }", "public function updateBackupNote()\n {\n $encrypt = $this->services['encrypt'];\n $file_name = $encrypt->decode($this->getPost('backup'));\n $backup_type = stripslashes_deep($this->getPost('backup_type'));\n $note_text = stripslashes_deep($this->getPost('note_text')); \n if($note_text && $file_name)\n {\n $path = rtrim($this->settings['working_directory'], DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$backup_type;\n $this->services['backup']->getDetails()->addDetails($file_name, $path, array('note' => $note_text));\n echo json_encode(array('success'));\n }\n exit;\n }", "public function writeToFile($todo)\n {\n //clear whitespace at end of file.\n $todo = trim($todo);\n $savePath = $this->getSavePath();\n\n $file = fopen($savePath, \"a+\");\n if(fwrite($file, $todo.\"\\n\"))\n fclose($file);\n else {\n throw new Exception(\"Unable to save file\");\n }\n }", "public function setNote($text){\r\n $this->note = $text;\r\n }", "public function setNote($note)\n {\n $this->note = $note;\n return $this;\n }", "public function setNote($note)\n {\n $this->note = $note;\n return $this;\n }", "public function store(NotesRequest $request)\n {\n //cual muestra todos los datos que llegan a través de las peticiones\n //helper dd() muestra el contenido de una variable y detiene la \n //ejecución del sistema\n //request()->all() veo todo lo que me llega del formulario\n //request()->NombreDelCampo para un campo en especifico\n //dd(request()->all());\n\n //vamos a guardar de 2 formas\n //esta es la primera\n /*$note = new Note; //instanciamos el modelo Note\n $note->title = request()->title;\n $note->body = request()->body;\n $note->important = is_null(request()->important) ? 0 : 1;\n $note->save();*/\n\n //Y esta la segunda\n //para validar uasaremos el metodo validate\n /*$data=request()->validate([\n 'title' => 'required',\n 'body' => 'required|min:5',\n 'important' => 'required',\n ]);\n Note::create($data);\n */\n //Note::create($request->all());//otra forma de guardar\n Note::create(request()->all());\n return redirect('/notes');\n //return back();//nos retornaria a la ruta anterior.\n\n\n }", "public function add_note()\n {\n\n $cols = \"`desc`\";\n\n $value =\n \" '\" . $this->obj->all_data->notes->get_desc() . \"' \";\n\n\n $insert = $this->obj->insert(\"notes\", $cols, $value);\n return $insert;\n }", "function modifyNote($note) {\n $tmpArray = $this->_bind($note);\n\n $tmpArray = $this->prepareString($tmpArray);\n\n\t\t$result = $this->_setEntry($tmpArray);\n\n return $result;\n }", "public function setNote($note)\r\n {\r\n $this->note = $note;\r\n\r\n return $this;\r\n }", "public function restored(AppointmentNote $note)\n {\n //\n }", "public function writeNotes()\n {\n if (is_null($this->notes)) {\n throw new Exception('$notes is null');\n }\n\n $fh = fopen($this->pageNotesPath(), 'w');\n fwrite($fh, implode(\"\\n\", $this->notes));\n fclose($fh);\n }", "public function store(StoreNoteRequest $request): NoteResource\n {\n return new NoteResource(\n User\n ::find($request->input('author_id'))\n ->notes()\n ->create($request->all())\n );\n }", "public function update(NoteCreateRequest $request, Note $note)\n {\n $data = $request->all();\n $note->update($data);\n $notebook = $note->notebook_id;\n return redirect(route('notebooks.show', compact('notebook')));\n }", "function deleteNote(NoteInterface $note);", "public function edit(Note $note)\n {\n //\n }", "public function CreateNote(\\Grafeas\\V1beta1\\CreateNoteRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/grafeas.v1beta1.GrafeasV1Beta1/CreateNote',\n $argument,\n ['\\Grafeas\\V1beta1\\Note', 'decode'],\n $metadata, $options);\n }", "public function setNote(string $note) : self\n {\n $this->initialized['note'] = true;\n $this->note = $note;\n return $this;\n }", "public function created(Note $note): void\n {\n if (auth()->user()->client_id) {\n $mail = $this->mailQueue->create($note->notable, [\n 'to' => [$note->notable->user->email],\n 'cc' => [config('bt.mailDefaultCc')],\n 'bcc' => [config('bt.mailDefaultBcc')],\n 'subject' => trans('bt.note_notification'),\n 'body' => $note->formatted_note,\n 'attach_pdf' => config('bt.attachPdf'),\n ]);\n\n $this->mailQueue->send($mail->id);\n }\n }", "public function store(ProjectNoteCreateRequest $request)\n {\n\n try {\n\n $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n $projectNote = $this->repository->create($request->all());\n\n $response = [\n 'message' => 'ProjectNote created.',\n 'data' => $projectNote->toArray(),\n ];\n\n if ($request->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect()->back()->with('message', $response['message']);\n } catch (ValidatorException $e) {\n if ($request->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }", "public function setNote($note)\n {\n $this->note = $note;\n\n return $this;\n }", "public function setNote($note)\n {\n $this->note = $note;\n\n return $this;\n }", "public function setNote($note)\n {\n $this->note = $note;\n\n return $this;\n }", "public function store(Requests\\NotesRequest $request)\n {\n if($request->input('type') == 'lead'){\n $lead = $this->leadsRepositoryEloquent->findWhere([\"id\" => $request->input('type_id')])->first();\n $request->merge(['branch_id' => $lead->branch_id]);\n }elseif($request->input('type') == 'opportunity'){\n $lead = $this->opportunityRepositoryEloquent->findWhere([\"id\" => $request->input('type_id')])->first();\n $request->merge(['branch_id' => $lead->branch_id]);\n }elseif($request->input('type') == 'account'){\n $lead = $this->accountsRepositoryEloquent->findWhere([\"id\" => $request->input('type_id')])->first();\n $request->merge(['branch_id' => $lead->branch_id]);\n }elseif($request->input('type') == 'contact'){\n $lead = $this->contactRepositoryEloquent->findWhere([\"id\" => $request->input('type_id')])->first();\n $request->merge(['branch_id' => $lead->branch_id]);\n }elseif($request->input('type') == 'activity'){\n $lead = $this->activityRepositoryEloquent->findWhere([\"id\" => $request->input('type_id')])->first();\n $request->merge(['branch_id' => $lead->branch_id]);\n }\n\n\n $note = $this->repository->store($request);\n\n return response()->json((new NotesTransformer())->transform($note));\n }", "public function testAddNote()\n { \n $this->_instance->addNote($this->_objects['note']);\n \n $note = $this->_instance->getNote($this->_objects['note']->getId());\n \n $this->assertEquals($this->_objects['note']->note, $note->note); \n }", "public function AbuseReportSaveNotes($abuseReport, $notes){\n\t\t\tif($abuseReport instanceof WebUI\\AbuseReport){\n\t\t\t\t$abuseReport = $abuseReport->Number();\n\t\t\t}else if(is_string($abuseReport) === true && ctype_digit($abuseReport) === true){\n\t\t\t\t$abuseReport = (integer)$abuseReport;\n\t\t\t}\n\n\t\t\tif(is_integer($abuseReport) === false){\n\t\t\t\tthrow new InvalidArgumentException('Abuse report number must be specified as an integer.');\n\t\t\t}else if(is_string($notes) === false){\n\t\t\t\tthrow new InvalidArgumentException('Abuse report notes must be specified as a string.');\n\t\t\t}\n\n\t\t\t$result = $this->makeCallToAPI('AbuseReportSaveNotes', false, array(\n\t\t\t\t'Number' => $abuseReport, \n\t\t\t\t'Notes' => trim($notes)\n\t\t\t), array(\n\t\t\t\t'Finished' => array('boolean'=>array())\n\t\t\t));\n\n\t\t\treturn $result->Finished;\n\t\t}", "function DeleteNote($note){\r\n $statement = new DeleteStatement(\"job_note\");\r\n\t\t\t$statement->where(\"id\", $note->getId());\r\n $statement->executeStatement();\r\n }", "public function saveNotes(Request $request, $slug)\n {\n $this->verifyProject($slug);\n\n $content = json_decode($request->getContent(), true);\n $timestamp = isset($content['timestamp']) ? $content['timestamp'] / 1000 : 0;\n\n $note = \\App\\Note::where('project_id', $this->project->id)->where('timestamp', $timestamp)->first();\n if (is_null($note)) {\n $note = new \\App\\Note;\n $note->timestamp = $timestamp;\n } else {\n if (empty($content['note'])) {\n $note->delete();\n }\n }\n $note->note = $content['note'];\n\n $this->project->notes()->save($note);\n return 200;\n }", "public function addNote($userId, $note) {\n $this->clearCache($userId);\n $user = $this->db->findOne(array('_id' => $this->_toMongoId($userId)));\n \n if (!$user) return 'Invalid user id.';\n \n $note = $this->clean($note);\n \n if (empty($note)) return 'Invalid note.';\n \n $this->db->update(array('_id' => $this->_toMongoId($userId)), \n array('$push' => array(\n 'notes' => array(\n 'user' => MongoDBRef::create('users', Session::getVar('_id')),\n 'date' => time(),\n 'text' => substr($note, 0, 160)\n ))));\n }", "public function addNote($messageId, $note) {\n return $this->_post(\n $this->_serverPath['addNote'],\n array(\n 'id' => $messageId,\n 'note' => $note\n )\n );\n\t}", "public function saveNota(){\t\t \r\n\t\t$this->notas_model->saveNotas($_POST);\r\n\t}", "public function addNote($project_id, $student_id, $notes_title, $notes_content, $db)\r\n {\r\n $sql= \"INSERT INTO notes (project_id, student_id, notes_title, notes_content)\r\n VALUES (:project_id, :student_id, :notes_title, :notes_content)\";\r\n\r\n $pst = $db->prepare($sql);\r\n\r\n $pst->bindParam(':project_id', $project_id);\r\n $pst->bindParam(':student_id', $student_id);\r\n $pst->bindParam(':notes_title', $notes_title);\r\n $pst->bindParam(':notes_content', $notes_content);\r\n\r\n $count = $pst->execute();\r\n return $count;\r\n }", "public function store(Request $request)\n {\n $notes=new Notes();\n $user_id=Auth::user()->id;\n $notes->subject=$request->subject;\n $notes->topic=$request->topic;\n if($request->hasfile('notes'))\n {\n $file = $request->file('notes');\n $extension = $file->getClientOriginalExtension(); // getting image extension\n $filename =time().'.'.$extension;\n $file->move('notes', $filename);\n }\n\n $notes->notes_file=$filename;\n $notes->description=$request->desc;\n $notes->user_id=$user_id;\n $notes->branch=$request->branch;\n $notes->date = Carbon::now()->format('Y-m-d');\n $notes->save();\n return redirect(\"subnotes/$notes->subject\");\n\n }", "public function store(NoteRequest $request)\n {\n $note = auth()->user()->notes()->create($request->all());\n\n return new NoteResource($note);\n }", "function update($note) {\r\n $CI = &get_instance();\r\n //check access rights (by looking at the original note in the database, as the POST\r\n //data might have been rigged!)\r\n $userlogin = getUserLogin();\r\n $user = $CI->user_db->getByID($userlogin->userID());\r\n $note_testrights = $CI->note_db->getByID($note->note_id);\r\n if ( ($note_testrights == null) \r\n ||\r\n (!$userlogin->hasRights('note_edit'))\r\n || \r\n (!$CI->accesslevels_lib->canEditObject($note_testrights))\r\n )\r\n {\r\n\t appendErrorMessage(__('Edit note').': '.__('insufficient rights').'.<br/>');\r\n\t return;\r\n }\r\n \r\n //start update\r\n $updatefields = array('text'=>$note->text);\r\n\r\n $CI->db->update(\"notes\", $updatefields,array('note_id'=>$note->note_id));\r\n \r\n\r\n //remove old xref ids\r\n $CI->db->delete('notecrossrefid', array('note_id' => $note->note_id)); \r\n //set crossref ids\r\n $xref_ids = getCrossrefIDsForText($note->text);\r\n foreach ($xref_ids as $xref_id) {\r\n $CI->db->insert('notecrossrefid', array('xref_id'=>$xref_id,'note_id'=>$note->note_id));\r\n }\r\n \r\n return True;\r\n }", "public function update(Request $request, Note $note)\n {\n $note->access = $request->access;\n $note->description = $request->description;\n $note->user_id = auth()->user()->id;\n $note->agent_id = $request->agent_id;\n $note->save();\n\n $success = \"Blog Updated\";\n\n return redirect( route('home') )->with(['data' => $success]);\n }", "function insertNote(){\n\t\t$this->db->insert('form_notes', $_POST);\n\t\treturn $this->db->insert_id();\n\t}", "protected function _Store_Note() {\n\t\tglobal $wpdb; \n // Submission table name (including wp prefix)\n $entry_notes_table = $this->Get_Notes_Table(); \n // Retrieve the storage data\n $store_note = $this->store_note;\n // If there are no store fields, return out\n if (!$store_note || !is_array($store_note)) { return array(); }\n // Check for an existing record\n $existing = $wpdb->get_row($wpdb->prepare(\"SELECT uuid FROM $entry_notes_table WHERE form_uuid = %s AND entry_uuid = %s AND uuid = %s\", $store_note['form_uuid'], $store_note['uuid'], $store_note['uuid']));\n // If a record was returned\n if ($existing) { die('existing');\n // Attempt to store the entry data\n $result = $wpdb->update($entry_notes_table, $store_note, array('uuid' => $existing->uuid));\n } // Otherwise attempt to insert a new record \n else { $result = $wpdb->insert($entry_notes_table, $store_note); }\n // If the insert failed\n if ($result === false) { die('Note value failed to insert'); }\n // Store the result id\n $this->store_note['id'] = $wpdb->insert_id; \n // Return the inserted id\n return $this->store_note;\n }", "public function update(Note $note, NotesRequest $request)\n {\n /*request()->validate([\n 'title' => 'required',\n 'body' => 'required|min:5',\n ]);*/\n $note->update(request()->all());\n return redirect('/notes');\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n \"newTaskNote\"=>\"required|string|max:20000\",\n \"taskID\"=>\"required|integer\",\n ]);\n $task_note = new TaskNote;\n $task_note->report = $request->newTaskNote;\n $task_note->task_id = $request->taskID;\n $task_note->save();\n $task = Task::find($request->taskID);\n return redirect(redirect()->getUrlGenerator()->previous() . \"#TP\". $task->time_period_id);\n }", "public function store(NotesStoreRequest $noteRequest, YoyoNotesModel $noteModel)\n {\n $transaction = $noteModel->insertNotes([\n 'note_title' => $noteRequest->get('txtNoteTitle'),\n 'note_text' => $noteRequest->get('txtNoteText'),\n ]);\n\n $message = ($transaction) ? $this->getCustomMessages()['sysMsgSaveSuccess'] : $this->getCustomMessages()['sysMsgApiError'];\n\n return json_encode([\n 'transaction' => $transaction,\n 'message' => $message\n ]);\n }", "public function save() {\n $questionId = request('question');\n $answerTitle = request('answer_title');\n\n $answer = new Answer();\n $answer->question_id = $questionId;\n $answer->title = $answerTitle;\n $answer->save();\n\n return redirect('/poll/answers?question=' . $questionId);\n }", "function save()\n {\n }", "function save()\n {\n }", "public function add_note($data){\n $this->db->insert('notes', $data);\n \t return $idOfInsertedData = $this->db->insert_id();\n }", "public function getNote()\r\n {\r\n return $this->note;\r\n }", "public function addToNote(\\horstoeko\\ubl\\entities\\cbc\\Note $note)\n {\n $this->note[] = $note;\n return $this;\n }", "public function addToNote(\\horstoeko\\ubl\\entities\\cbc\\Note $note)\n {\n $this->note[] = $note;\n return $this;\n }", "public function addToNote(\\horstoeko\\ubl\\entities\\cbc\\Note $note)\n {\n $this->note[] = $note;\n return $this;\n }", "public function store(Request $request)\n {\n $note = Note::create([\n 'title'=> $request->title,\n 'category'=> 1,\n 'body'=> $request->body,\n 'position'=> 0,\n 'pinned'=> 0,\n ]);\n\n return 'Done';\n\n }", "public function changeNoteInFile(Note $note, string $filename){\n }", "function delete($note) {\r\n $CI = &get_instance();\r\n $userlogin = getUserLogin();\r\n //collect all cascaded to-be-deleted-id's: none\r\n //check rights\r\n //check, all through the cascade, whether you can read AND edit that object\r\n if (!$userlogin->hasRights('note_edit')\r\n ||\r\n !$CI->accesslevels_lib->canEditObject($note)\r\n ) {\r\n //if not, for any of them, give error message and return\r\n appendErrorMessage(__('Cannot delete note').': '.__('insufficient rights').'.<br/>');\r\n return false;\r\n }\r\n if (empty($note->note_id)) {\r\n appendErrorMessage(__('Cannot delete note').': '.__('erroneous ID').'.<br/>');\r\n return false;\r\n }\r\n //otherwise, delete all dependent objects by directly accessing the rows in the table \r\n $CI->db->delete('notes',array('note_id'=>$note->note_id));\r\n //delete links\r\n $CI->db->delete('notecrossrefid',array('note_id'=>$note->note_id));\r\n $CI->db->delete('notecrossrefid',array('xref_id'=>$note->note_id));\r\n //add the information of the deleted rows to trashcan(time, data), in such a way that at least manual reconstruction will be possible\r\n return true;\r\n }", "function save(iEntityComment $entity);", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }" ]
[ "0.83454335", "0.7729073", "0.697553", "0.68953866", "0.68503076", "0.6614791", "0.66095835", "0.6603925", "0.64650977", "0.6356148", "0.6257381", "0.6253141", "0.6253115", "0.6226344", "0.6163769", "0.6151909", "0.61509985", "0.61213213", "0.6120648", "0.61052173", "0.60557336", "0.6046437", "0.6034355", "0.59841543", "0.5948171", "0.59239805", "0.5919989", "0.59143025", "0.59089506", "0.5907247", "0.5903519", "0.5879891", "0.5874845", "0.5874399", "0.58319986", "0.5829709", "0.58260065", "0.58012706", "0.57358164", "0.5708287", "0.5700027", "0.5698622", "0.5692045", "0.56793517", "0.56793517", "0.5662016", "0.56493694", "0.56418186", "0.5640806", "0.562842", "0.5626326", "0.5617561", "0.5607257", "0.56019676", "0.560195", "0.55983365", "0.5595889", "0.5586053", "0.558262", "0.557255", "0.557255", "0.557255", "0.5570722", "0.55620843", "0.5560048", "0.55572116", "0.55309445", "0.5524712", "0.5522431", "0.54855794", "0.5473441", "0.5467851", "0.5465695", "0.545326", "0.54492205", "0.54164696", "0.5375739", "0.5365968", "0.53657037", "0.53480583", "0.53453815", "0.53446704", "0.53446704", "0.5334003", "0.53237736", "0.5314958", "0.5314958", "0.5314958", "0.531343", "0.5304554", "0.5301155", "0.52991223", "0.52967936", "0.52967936", "0.52967936", "0.52967936", "0.52967936", "0.52967936", "0.52967936", "0.52967936" ]
0.6122344
17
Display a listing of the resource.
public function index() { $prosStudents = ProspectiveStudent::simplePaginate(5); return view('admin.prosStudent.index', compact('prosStudents')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('admin.prosStudent.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request, [ 'fullname' => 'required', // 'first_name' => 'required', // 'last_name' => 'required', 'gender' => 'required', 'email' => 'required | email', 'dob' => 'required | date', 'phone' => 'required', 'image' => 'required | file', 'address' => 'required', 'localOfOrigin' => 'required', 'stateOfOrigin' => 'required', 'country' => 'required', //'status' => 'required', ]); $image = $request->file('image'); $slug = str_slug($request->title); if (isset($image)) { $currentDate = Carbon::now()->toDateString(); $imagename = $slug . '-' . $currentDate . '-' . uniqid() . '.' . $image->getClientOriginalExtension(); if (!file_exists('uploads/images')) { mkdir('uploads/images', 0777, true); } $image->move('uploads/images', $imagename); } else { $imagename = 'default.png'; } $prosStudent = new ProspectiveStudent(); $prosStudent->fullname = $request->fullname; // $prosStudent->first_name = $request->first_name; // $prosStudent->last_name = $request->last_name; $prosStudent->gender = $request->gender; $prosStudent->email = $request->email; $prosStudent->dob = date('Y-m-d', strtotime($request->dob)); //$prosStudent->dob = $request->dob; $prosStudent->phone = $request->phone; $prosStudent->image = $imagename; $prosStudent->address = $request->address; $prosStudent->localOfOrigin = $request->localOfOrigin; $prosStudent->stateOfOrigin = $request->stateOfOrigin; $prosStudent->country = $request->country; if(isset($request->status)) { $prosStudent->status = 'enable'; } else { $prosStudent->status = 'disable'; } $prosStudent->save(); return redirect()->route('prosstudent.index')->with('successMsg', 'Prospective Student Saved Successfully!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show(Resena $resena)\n {\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function show()\n\t{\n\t\t\n\t}", "public function get_resource();", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public abstract function display();", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "abstract public function resource($resource);", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233183", "0.81894475", "0.6830127", "0.6498529", "0.6496276", "0.6469191", "0.64627224", "0.63619924", "0.6308743", "0.62809277", "0.6218707", "0.61915004", "0.617914", "0.6172935", "0.6137578", "0.6118736", "0.6107122", "0.6106576", "0.60931313", "0.60798067", "0.6046669", "0.60386544", "0.60193497", "0.59882426", "0.5963477", "0.59618807", "0.5952755", "0.5929829", "0.59192723", "0.59065384", "0.59065384", "0.59065384", "0.590592", "0.58923435", "0.5870325", "0.5868533", "0.58685124", "0.5851443", "0.5815833", "0.58149886", "0.58143586", "0.580419", "0.58004224", "0.5793256", "0.57887405", "0.57840455", "0.5782294", "0.5760476", "0.5757928", "0.57578564", "0.57453394", "0.5745187", "0.5741311", "0.5738201", "0.5738201", "0.5730195", "0.5727921", "0.5727622", "0.5724217", "0.5724217", "0.5724217", "0.5724217", "0.5724217", "0.5724217", "0.5724217", "0.5724217", "0.5724217", "0.5724217", "0.5720258", "0.5714068", "0.57106924", "0.5709095", "0.57058644", "0.57057875", "0.5704414", "0.5704414", "0.57021624", "0.56991994", "0.5692151", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576", "0.5686576" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $prosStudent = ProspectiveStudent::findOrFail($id); return view('admin.prosStudent.edit', compact('prosStudent')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $this->validate($request, [ // 'first_name' => 'required', // 'last_name' => 'required', 'fullname' => 'required', 'gender' => 'required', 'email' => 'required | email', 'dob' => 'required | date', 'phone' => 'required | numeric', //'image' => 'required | file', 'address' => 'required', 'localOfOrigin' => 'required', 'stateOfOrigin' => 'required', 'country' => 'required', //'status' => 'required', ]); $image = $request->file('image'); $slug = str_slug($request->title); $prosStudent = ProspectiveStudent::findOrFail($id); if (isset($image)) { $currentDate = Carbon::now()->toDateString(); $imagename = $slug . '-' . $currentDate . '-' . uniqid() . '.' . $image->getClientOriginalExtension(); if (!file_exists('uploads/images')) { mkdir('uploads/images', 0777, true); } $image->move('uploads/images', $imagename); } else { $imagename = $prosStudent->image; } $prosStudent->fullname = $request->fullname; // $prosStudent->first_name = $request->first_name; // $prosStudent->last_name = $request->last_name; $prosStudent->gender = $request->gender; $prosStudent->email = $request->email; $prosStudent->dob = date('Y-m-d', strtotime($request->dob)); $prosStudent->phone = $request->phone; $prosStudent->image = $imagename; $prosStudent->address = $request->address; $prosStudent->localOfOrigin = $request->localOfOrigin; $prosStudent->stateOfOrigin = $request->stateOfOrigin; $prosStudent->country = $request->country; if(isset($request->status)) { $prosStudent->status = 'enable'; } else { $prosStudent->status = 'disable'; } $prosStudent->save(); return redirect()->route('prosstudent.index')->with('successMsg', 'Prospective Student Updated Successfully!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { //dd($id); $prosStudent = ProspectiveStudent::findOrFail($id); $prosStudent->delete(); return redirect()->route('prosstudent.index')->with('successMsg', 'Prospective Student Deleted Successfully!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Run the database seeds.
public function run() { for ($i = 0; $i < 5; $i++){ $editalUser = Factory::factoryForModel('EditalUser')->create(); $user = User::find($editalUser->user_id); foreach ($user->familias as $f){ DB::table('edital_user_familia')->insert( [ 'edital_user_id' => $editalUser->id, 'familia_id' => $f->id, ]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8014072", "0.7980389", "0.7977261", "0.79545176", "0.7951285", "0.7949779", "0.79447794", "0.79427236", "0.7938544", "0.7937133", "0.7933888", "0.7892658", "0.78813094", "0.7879304", "0.78790134", "0.7875582", "0.78718805", "0.7870327", "0.7851507", "0.78506047", "0.7841656", "0.7834773", "0.782799", "0.7819246", "0.7809116", "0.7803176", "0.7802559", "0.7800953", "0.7799208", "0.77958846", "0.77905864", "0.7788729", "0.7786444", "0.7778857", "0.7777666", "0.7765372", "0.77626014", "0.7762562", "0.77622634", "0.77615577", "0.7760895", "0.77596897", "0.7757152", "0.7753893", "0.77497184", "0.77495176", "0.77468747", "0.77301675", "0.77291715", "0.772798", "0.7716827", "0.77145964", "0.7714208", "0.7713344", "0.77125347", "0.771253", "0.7711237", "0.77112275", "0.77108705", "0.7710304", "0.7705747", "0.77048707", "0.770442", "0.77041996", "0.77028614", "0.77021116", "0.77008957", "0.7698864", "0.76987725", "0.7697583", "0.76966494", "0.76945114", "0.7692977", "0.7691408", "0.76907796", "0.7688464", "0.7687695", "0.7686974", "0.7686826", "0.76851374", "0.7684132", "0.7679417", "0.7678492", "0.76778567", "0.76769906", "0.76728696", "0.7671034", "0.76692134", "0.7668971", "0.7668952", "0.7666531", "0.7662757", "0.7662455", "0.76616526", "0.765996", "0.7656754", "0.765413", "0.76537156", "0.76526105", "0.76523715", "0.7652133" ]
0.0
-1
Create a new notification instance.
public function __construct(User $user, $application) { $this->user = $user; $this->application = $application; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create($notification){\n }", "public static function createNotification($type, $eventid){\n\t\t$notification = new Notification; \n\t\t$notification->type = $type;\n\t\t$notification->eventid = $eventid;\n\t\t$notification->time = date('Y-m-d H:i:s');\n\t\t$notification->save();\n\t\treturn $notification;\n\t}", "public function create($payload)\n {\n return $this->notification->create($payload);\n }", "public static function create( array $info ) {\n\t\t$obj = new Notification();\n\t\tstatic $validFields = [ 'event', 'user' ];\n\n\t\tforeach ( $validFields as $field ) {\n\t\t\tif ( isset( $info[$field] ) ) {\n\t\t\t\t$obj->$field = $info[$field];\n\t\t\t} else {\n\t\t\t\tthrow new InvalidArgumentException( \"Field $field is required\" );\n\t\t\t}\n\t\t}\n\n\t\tif ( !$obj->user instanceof User ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid user parameter, expected: User object' );\n\t\t}\n\n\t\tif ( !$obj->event instanceof Event ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid event parameter, expected: Event object' );\n\t\t}\n\n\t\t// Notification timestamp should be the same as event timestamp\n\t\t$obj->timestamp = $obj->event->getTimestamp();\n\t\t// Safe fallback\n\t\tif ( !$obj->timestamp ) {\n\t\t\t$obj->timestamp = wfTimestampNow();\n\t\t}\n\n\t\t// @Todo - Database insert logic should not be inside the model\n\t\t$obj->insert();\n\n\t\treturn $obj;\n\t}", "private function createNotification($id, $request)\n {\n $count = Notification::max('count');\n\n $notification = Notification::create([\n 'model_id' => $id,\n 'count' => intval($count) + 1,\n 'type' => $request->get('ntype'),\n 'subject' => $request->get('subject'),\n 'message' => $request->get('message'),\n 'sent_at' => Carbon::now(),\n ]);\n }", "public function maybe_create_notification() {\n\t\tif ( ! $this->should_show_notification() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $this->notification_center->get_notification_by_id( self::NOTIFICATION_ID ) ) {\n\t\t\t$notification = $this->notification();\n\t\t\t$this->notification_helper->restore_notification( $notification );\n\t\t\t$this->notification_center->add_notification( $notification );\n\t\t}\n\t}", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "protected function createNotificationInstance($data)\n {\n if ($data === false) {\n return null;\n }\n\n /** @var Notification $model */\n $model = Instance::ensure($this->dataClass, Notification::class);\n\n if (!empty($data['id'])) {\n $model->setId($data['id']);\n }\n\n $model->setType($data['type']);\n $model->setData(is_string($data['data']) ? Json::decode($data['data']) : $data['data']);\n $model->setUserId($data['user_id']);\n $model->setTimestamp($data['created_at']);\n $model->setRead((bool)$data['is_read']);\n $model->setOwner($this->owner);\n\n return $model;\n }", "public function create()\n\t{\n\t\tlog::info('inside create method of user-notifications controller');\n\t}", "public function created(Notification $notification)\n {\n $this->sendBroadcast($notification);\n }", "public function newNotification($event)\n {\n return new ExampleNotification($event);\n }", "public function create()\n {\n $this->authorize('create', Notification::class);\n\n return view('rb28dett_notifications::create');\n }", "public function actionCreate()\n {\n $model = new Notification();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->notification_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }", "public function create() {\n return View::make('notifications.create');\n }", "protected function create_notification_email_object()\n\t{\n\t\t$category = $this->category();\n\n\t\t$email = new Charcoal_Email;\n\t\t$email->to = $this->get_notified_email_address();\n\t\t$email->reply_to = $this->get_lead_email_address();\n\n\t\tif ( $category ) {\n\t\t\t$email->subject = $category->p('confirmation_email_subject')->text();\n\t\t\t$email->from = $category->p('confirmation_email_from')->text();\n\t\t\t$email->cc = $category->v('confirmation_email_cc');\n\t\t\t$email->bcc = $category->v('confirmation_email_bcc');\n\t\t}\n\n\t\treturn $email;\n\t}", "public function create()\n {\n return view ('notifications.create');\n }", "protected function emitNotificationCreated(Notification $notification) {}", "public function __construct($new_postNotification)\n {\n //\n $this->postNotification = $new_postNotification;\n\n }", "public static function createFromArray($fields) \n\t{\n\t\t$notification = new Notification();\n\t\tself::populate($notification,$fields);\n\t\treturn $notification;\n\t}", "public function create()\n {\n return view('admin.notifications.create');\n }", "public function create()\n {\n return view('admin.notifications.create');\n }", "function notify($user_id, $message)\n{\n return (new Notification([\n 'user_id' => $user_id,\n 'message' => $message\n ]))->save();\n}", "public function actionCreate() {\n\t\t$model = new Notification();\n\t\t$model->created_by = Yii::$app->user->identity->id;\n\n\t\tif ($model->load(Yii::$app->request->post())) {\n\n\t\t\tif ($model->send_to != '') {\n\t\t\t\t$model->send_to = implode(',', $model['send_to']);\n\t\t\t}\n\t\t\t$model->sent_time = date('Y-m-d H:i:s');\n\t\t\t$model->save();\n\t\t\t/*if ($model->save()) {\n\t\t\t\t$send_to = explode(',', $model['send_to']);\n\t\t\t\tforeach ($send_to as $key => $value) {\n\t\t\t\t\tif ($value == 'all') {\n\t\t\t\t\t\t$userId = 'allUser';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$user = User::find()->where(['id' => $value])->one();\n\t\t\t\t\t\t$userId = $user['phone'];\n\t\t\t\t\t}\n\t\t\t\t\tYii::$app->Utility->pushNotification($userId, $model['notification_name'], $model['content']);\n\t\t\t\t}\n\t\t\t}*/\n\t\t\tYii::$app->getSession()->setFlash('successStatus', 'Data saved successfully!');\n\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t}\n\n\t\treturn $this->render('create', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}", "public function notification(Notification $notification, array $parameters = []);", "public function create()\n {\n return view('notifications.create');\n }", "public function __construct($notification)\n {\n parent::__construct($notification);\n }", "public function notification();", "public function notification();", "public function notificationsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $notification = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($notification['from'] instanceof Users) {\n $this->di->setShared('userData', $notification['from']);\n }\n\n if (!$notification['to'] instanceof Users) {\n echo 'Attribute TO has to be a User' . PHP_EOL;\n return;\n }\n\n if (!class_exists($notification['notification'])) {\n echo 'Attribute notification has to be a Notificatoin' . PHP_EOL;\n return;\n }\n $notificationClass = $notification['notification'];\n\n if (!$notification['entity'] instanceof Model) {\n echo 'Attribute entity has to be a Model' . PHP_EOL;\n return;\n }\n\n $user = $notification['to'];\n\n //instance notification and pass the entity\n $notification = new $notification['notification']($notification['entity']);\n //disable the queue so we process it now\n $notification->disableQueue();\n\n //run notify for the specifiy user\n $user->notify($notification);\n\n $this->log->info(\n \"Notification ({$notificationClass}) sent to {$user->email} - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::NOTIFICATIONS, $callback);\n }", "public function create()\n {\n return view('Admin.Notification_Management.notifications');\n }", "public static function fake()\n {\n static::swap($fake = new NotificationFake);\n\n return $fake;\n }", "public function new_notification_is_created ($notification) {\n $user = $this->get_session_user();\n $eventdata = new \\core\\message\\message();\n $eventdata->courseid = 1;\n $eventdata->name = 'fake_notification';\n $eventdata->component = 'block_culactivity_stream';\n $eventdata->userfrom = $user;\n $eventdata->subject = $notification;\n $eventdata->fullmessage = $notification;\n $eventdata->fullmessageformat = FORMAT_PLAIN;\n $eventdata->fullmessagehtml = $notification;\n $eventdata->smallmessage = $notification;\n $eventdata->notification = 1;\n $eventdata->userto = $user;\n $messageid = message_send($eventdata);\n\n if (!$messageid) {\n throw new Exception(get_string('messageerror', 'block_culactivity_stream'));\n }\n }", "public function push($notification, $notifiable);", "public function __construct() {\r\n $this->setEntity('mst_notification');\r\n }", "public function create($type, $data, $userId)\n {\n $data = [\n 'type' => $type,\n 'data' => Json::encode($data),\n 'user_id' => $userId,\n 'created_at' => time(),\n 'is_read' => 0\n ];\n\n $notification = $this->createNotificationInstance($data);\n $this->saveNotification($notification);\n return $notification;\n }", "public function Create()\n {\n parent::Create();\n\n //Properties\n $this->RegisterPropertyInteger('InputTriggerID', 0);\n $this->RegisterPropertyString('NotificationLevels', '[]');\n $this->RegisterPropertyBoolean('TriggerOnChangeOnly', false);\n $this->RegisterPropertyBoolean('AdvancedResponse', false);\n $this->RegisterPropertyString('AdvancedResponseActions', '[]');\n\n //Profiles\n if (!IPS_VariableProfileExists('BN.Actions')) {\n IPS_CreateVariableProfile('BN.Actions', 1);\n IPS_SetVariableProfileIcon('BN.Actions', 'Information');\n IPS_SetVariableProfileValues('BN.Actions', 0, 0, 0);\n }\n\n //Variables\n $this->RegisterVariableInteger('NotificationLevel', $this->Translate('Notification Level'), '');\n $this->RegisterVariableBoolean('Active', $this->Translate('Notifications active'), '~Switch');\n $this->RegisterVariableInteger('ResponseAction', $this->Translate('Response Action'), 'BN.Actions');\n\n //Actions\n $this->EnableAction('ResponseAction');\n\n //Timer\n $this->RegisterTimer('IncreaseTimer', 0, 'BN_IncreaseLevel($_IPS[\\'TARGET\\']);');\n\n $this->EnableAction('Active');\n }", "public function register_notifications();", "public function create()\n {\n $notification = DB::table('notifications')\n ->get(); \n return view ('admin/assignBadgeToUser')->with('notification', $notification);\n }", "public function __construct(protected NotificationRepository $notificationRepository)\n {\n }", "protected function createNotification($responseData)\n {\n $socketMock = $this->getMock(\n 'RequestStream\\\\Stream\\\\Socket\\\\SocketClient',\n array('create', 'write', 'read', 'selectRead', 'setBlocking', 'is', 'close')\n );\n\n $socketMock->expects($this->once())\n ->method('selectRead')\n ->will($this->returnValue(true));\n\n $socketMock->expects($this->once())\n ->method('read')\n ->with(6)\n ->will($this->returnValue($responseData));\n\n $notification = new Notification;\n $payload = new PayloadFactory;\n $connection = new Connection(__FILE__);\n\n $notification->setConnection($connection);\n $notification->setPayloadFactory($payload);\n\n $ref = new \\ReflectionProperty($connection, 'socketConnection');\n $ref->setAccessible(true);\n $ref->setValue($connection, $socketMock);\n\n return $notification;\n }", "protected function notification() {\n\t\t$reason = $this->indexing_helper->get_reason();\n\n\t\t$presenter = $this->get_presenter( $reason );\n\n\t\treturn new Yoast_Notification(\n\t\t\t$presenter,\n\t\t\t[\n\t\t\t\t'type' => Yoast_Notification::WARNING,\n\t\t\t\t'id' => self::NOTIFICATION_ID,\n\t\t\t\t'capabilities' => 'wpseo_manage_options',\n\t\t\t\t'priority' => 0.8,\n\t\t\t]\n\t\t);\n\t}", "function custom_node_create_notification($uid, $title, $message) {\n $creator_uid = 1; // Admin user.\n $node = custom_new_node_create($creator_uid, 'notification', $title, 1);\n \n $node->set('field_user', $uid);\n $node->set('body', $message);\n $node->save();\n \n if (!$node->id()) {\n \\Drupal::logger('custom')->error(t('Notification FAILED to store.'));\n }\n \n return $node;\n}", "public function store(Request $request)\n {\n return Notification::create($request->input());\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): TrainingReminderNotification {\n return new TrainingReminderNotification();\n }", "public function __construct(NotificationTrigger $notification_trigger)\n {\n $this->notification_trigger = $notification_trigger;\n }", "public function setResource($notification)\n {\n return new NotificationResource($notification);\n }", "public function __construct($notification_id)\n {\n $this->notification_id = $notification_id;\n }", "public function create()\n {\n return view('Notifications/create');\n }", "public function getNotification(MessageInstanceInterface $message)\n {\n return new DefaultNotification($message, $this->formatterRegistry->get($message->getType()));\n }", "public function sendPostCreateNewNotifications(ApiTester $I)\n {\n $data = [\n 'entityClass' => 'user',\n 'entityId' => 1,\n 'category' => 'info',\n 'message' => fake::create()->text(20),\n 'userId' => 1\n ];\n $I->saveNotifications([\n $data['entityClass'], ' ',\n $data['entityId'], ' ',\n $data['category'], ' ',\n $data['message'], ' ',\n $data['userId'], ' '\n ], 'notifications.txt');\n $I->sendPOST($this->route, $data);\n $this->userID = $I->grabDataFromResponseByJsonPath('$.id');\n $I->seeResponseCodeIs(201);\n }", "public static function createFromArray($fields) \n\t{\n\t\t$notificationType = new NotificationType();\n\t\tself::populate($notificationType,$fields);\n\t\treturn $notificationType;\n\t}", "public function create()\n\t{\n\t\t$searchTerm = Input::get('searchTerm');\n\n $createNotification = new CreateNotificationCommand($searchTerm);\n\n $result = $createNotification->execute();\n\n $result = $result ? \"You're Signed Up!\" : \"You're Already Signed Up for This Term!\";\n\n return $result;\n\t}", "#[Route('/notification/create', name: 'create_notification')]\n public function create(NotifierInterface $notifier, EntityManagerInterface $entityManager, Request $request): Response\n {\n $notification = (new Notification('Notification from Duck Tales'))\n ->content('You got some contributions to review. Please look at the Quack #' . $request->get('warned_id'))\n ->importance(Notification::IMPORTANCE_HIGH);\n\n\n $admins = [];\n $admins = array_map(fn ($duck) => $duck->hasRoleAdmin() ? $duck->getEmail() : NULL, $entityManager->getRepository(Duck::class)->findAll());\n\n // foreach ($admins as $admin) {\n // $recipient = new Recipient(\n // $admin\n // );\n // $notifier->send($notification, $recipient);\n // }\n $recipient = new Recipient(\n '[email protected]'\n );\n $notifier->send($notification, $recipient);\n\n\n // Send the notification to the recipient\n\n\n return $this->redirectToRoute('quacks');\n }", "function wd_notification() {\n return WeDevs_Notification::init();\n}", "public function notificationsOnCreate(NotificationBuilder $builder)\n {\n $notification = new Notification();\n $notification\n ->setTitle('Nouvelle Reclamation')\n ->setDescription(' A été crée')\n ->setRoute('#')\n // ->setParameters(array('id' => $this->userToClaim))\n ;\n //$notification->setIcon($this->getUserr()->getUsername());\n $notification->setUser1($this->getUser()->getUsername());\n $notification->setUser2($this->getUserToClaim());\n $builder->addNotification($notification);\n\n return $builder;\n }", "public function create()\n {\n\n $email_id = date('Y-m-d_H-i-s') . '.' . $this->template;\n $email_data = [\n 'title' => $this->template, \n 'data' => serialize($this->data), \n 'email' => $this->to,\n 'id' => $email_id,\n 'date' => date('Y-m-d H:i:s')\n ];\n\n Storage::putYAML('statamify/emails/' . $email_id, $email_data);\n\n }", "public function create()\n {\n //\n $this->message->sendMessage();\n }", "public function create()\n {}", "public function create() {}", "public function create() {\n\t\t\t//\n\t\t}", "public static function invalidNotificationType()\n {\n return new static('Notification Type provided is invalid.');\n }", "public function createNotification($type, $text, $destination)\r\n {\r\n \t$data = $this->call(array(\"notification\"=>array(\"type\"=>$type, \"text\"=>$text, \"destination\"=>$destination)), \"POST\", \"notifications.json\");\r\n \treturn $data;\r\n }", "public function __construct($title, $sender, $notification)\n {\n $this->title = $title;\n $this->sender = $sender;\n $this->notification = $notification;\n }", "public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }", "public function create(){}", "static function get_notificationById($id) {\r\n global $db;\r\n \r\n $id = $db->escape_string($id);\r\n \r\n $query = \"SELECT * FROM `notification` WHERE Notification_id = ?\";\r\n \r\n $statement = $db->prepare($query);\r\n\t\t\r\n\t\tif ($statement == FALSE) {\r\n\t\t\tdisplay_db_error($db->error);\r\n\t\t}\r\n \r\n $statement->bind_param(\"i\", $id);\r\n \r\n $statement->execute();\r\n \r\n $statement->bind_result($id, $message, $objectReference, $objectId, $seen, $timeStamp);\r\n \r\n $statement->fetch();\r\n \r\n $notification = new notification($id, $message, $objectReference, $objectId, $seen, $timeStamp);\r\n \r\n $statement->close();\r\n \r\n return $notification;\r\n }", "public function __construct(PushNotification $push)\n {\n $this->push = $push;\n }", "public function addNotification($id, $message, $type = 'status');", "public function create( $arrayNotifikasi )\n {\n // return $arrayNotifikasi;\n $notif = new Notifikasi;\n $notif->id_pembuat = $arrayNotifikasi[0];\n $notif->id_penerima = $arrayNotifikasi[1];\n $notif->jenis = $arrayNotifikasi[2];\n $notif->msg = $arrayNotifikasi[3];\n $notif->icon = $arrayNotifikasi[4];\n $notif->bg = $arrayNotifikasi[5];\n $notif->tgl_dibuat = $arrayNotifikasi[6];\n $notif->link = $arrayNotifikasi [7];\n $notif->save();\n }", "public static function createInstance()\n {\n return new MailMessage('[email protected]');\n }", "public function testPushNotification(){\n $noti=new Notification();\n $data=' {\n\t \"to\": \"/topics/important\",\n\t \"notification\": {\n\t \t\"title\": \"Hola Mundo\",\n\t\t \"body\": \"Mensaje de prueba\",\n\t\t \"icon\":\"http://www.alabamapublica.com/wp-content/uploads/sites/43/2017/06/cntx170619019-150x150.jpg\"\n\t\t \"click_action\": \"https://critica-xarkamx.c9users.io\"\n\t }\n }';\n $this->assertArrayHasKey(\"message_id\",$noti->sendPushNotification($data));\n }", "public static function notify($member) {\n $notification = Model_Notification::factory('notification');\n\n if(is_numeric($member)) {\n $notification->to = $member;\n } else if(is_object($member) && $member instanceof Model_Member) {\n $notification->to = $member->id;\n } else if(is_object($member) && $member instanceof Model_Blab) {\n\t\t\t$notification->to = $member->getCommentees();\n\t\t}\n\n\t\t$notification->from = Session::instance()->get('user_id');\n \n $notification->unread = 1;\n\n\t\t$notification->created = date('Y-m-d h:i:s');\n\n return $notification;\n }", "public function insert(int $toUserID, string $subject, string $message, int $typeId, array $data = [])\n {\n return Notification::create([\n 'user_id' => $toUserID,\n 'subject' => $subject,\n 'message' => $message,\n 'notification_type_id' => $typeId,\n 'data' => $data,\n ]);\n }", "public function create()\n {\n //TODO\n }", "public function __construct($notifiable)\n {\n $this->notifiable = $notifiable;\n }", "public function create()\n {\n //\n return view('admin/notifacation/create');\n }", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function __construct(AppNotification $notification, User $user)\n {\n $this->notification = $notification;\n $this->user = $user;\n }", "public function create() {\r\n }", "public function __construct($data)\n {\n \n\n $usuario_reserva = User::find($data->id_user);\n $coordinador = User::find($usuario_reserva->departamento->coordinador->id);\n\n $mensaje = new \\stdClass();\n $mensaje->user = $usuario_reserva->name.' '.$usuario_reserva->last_name;\n $mensaje->userid = $usuario_reserva->id;\n $mensaje->recipient = $coordinador->name.' '.$coordinador->last_name;\n $mensaje->recipientid = $coordinador->id;\n $mensaje->reservaid = $data->id;\n $mensaje->datereserva = date('Y-m-d H:i:s');\n $mensaje->text = 'ah generado una reserva';\n $notificacion = new Notificaciontest($mensaje);\n \n $coordinador->notify($notificacion);\n $this->notif = $mensaje;\n }", "public function createDefaultNotificationRule();", "protected function getNotification_Type_PostService()\n {\n $instance = new \\phpbb\\notification\\type\\post(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }", "public function create()\n {\n }", "public function create()\n {\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}" ]
[ "0.8276063", "0.72309536", "0.7192113", "0.71250874", "0.7123231", "0.70414555", "0.6982398", "0.6982398", "0.6982398", "0.69165224", "0.6844303", "0.68205667", "0.6801263", "0.6776018", "0.6589725", "0.6531073", "0.6507233", "0.65047646", "0.6503655", "0.64437956", "0.6413495", "0.63943607", "0.63801765", "0.63801765", "0.63660526", "0.6356052", "0.63232195", "0.6300968", "0.6284887", "0.6273382", "0.6273382", "0.6221624", "0.62077844", "0.619149", "0.61460197", "0.6113097", "0.6109519", "0.61056155", "0.6096373", "0.6080448", "0.6076801", "0.6062714", "0.6056816", "0.60528165", "0.6042198", "0.6041384", "0.6038984", "0.5998163", "0.5980277", "0.5966818", "0.5965131", "0.59510165", "0.5944954", "0.5924184", "0.59172565", "0.5905665", "0.5863749", "0.5857545", "0.5847215", "0.58452827", "0.5823396", "0.5817765", "0.5809837", "0.5806915", "0.58051187", "0.57956886", "0.5786479", "0.5761696", "0.5759299", "0.57588416", "0.57455844", "0.5729732", "0.57241285", "0.5722245", "0.571779", "0.57008874", "0.56909657", "0.5688866", "0.56850773", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.56795263", "0.567875", "0.5671056", "0.56691873", "0.56688094", "0.5668", "0.5668", "0.5666241", "0.5666241", "0.5666241" ]
0.0
-1
Get the notification's delivery channels.
public function via($notifiable) { return [WebhookChannel::class]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNotificationChannels()\n {\n if (array_key_exists(\"notificationChannels\", $this->_propDict)) {\n return $this->_propDict[\"notificationChannels\"];\n } else {\n return null;\n }\n }", "public function getDistributionChannels();", "public function getDeliveryChannel() {\n return $this->params[\"original\"][\"delivery_channel\"];\n }", "public function getChannels()\n {\n return $this->channels;\n }", "public function getChannels();", "public function getDistributionChannels()\n {\n return $this->distributionChannels;\n }", "public function getChannels()\n {\n return $this->Channels;\n }", "public function getAllChannels()\n {\n return $this->_channel;\n }", "public function via($notifiable)\n {\n $channels = [];\n if ($notifiable->setting->is_bid_cancelled_notification_enabled) {\n $channels = ['database']; // note: no Messenger yet like the other one's. App is still not approved, and there's the business registration requirement so..\n \n if ($notifiable->fcm_token) {\n $channels[] = FcmChannel::class;\n }\n }\n return $channels;\n }", "public function viaNotificationChannels()\n {\n return UserNotificationChannel::with('notification_channel')->get()->filter(function ($item) {\n return $item->muted_at == null;\n })->pluck('notification_channel.name');\n }", "public function channels()\n {\n return $this->send('channels');\n }", "public function getOrderChannels()\n\t{\n\t\t$request = $this->request('order_channels');\n\n\t\tif (!$request) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$decoded = $request->asArray();\n\t\treturn $decoded['data'];\n\t}", "public function channels()\n {\n $payloads = [\n 'code' => $this->channelCode,\n ];\n\n return $this->request('get', 'merchant/payment-channel', $payloads);\n }", "public function all(): array\n {\n return $this->channels;\n }", "public function getActiveNotificationChannelsOptions()\n {\n \treturn $this->getChannelOptions();\n }", "public function getAllChannels()\n {\n return Channel::all();\n }", "public function getSupplyChannels();", "public function getChannels()\n\t{\n\t\t$channels = App::make('ChannelRepository')->getChannels();\n\t\t\n\t\treturn App::make('Apiv1\\Transformers\\ChannelTransformer')->transformCollection($channels, $this->user);\n\t}", "public function via($notifiable)\n {\n $channel = ($this->channel == 'sms') ? 'nexmo' : $this->channel;\n return [$channel];\n }", "public function get_channels()\n {\n }", "public function getDeliveryChannel($i = 0)\n {\n if (isset($this->destinationList[$i]['DeliveryChannel'])) {\n return $this->destinationList[$i]['DeliveryChannel'];\n } else {\n return false;\n }\n }", "public function getDeliveries()\n {\n return $this->deliveries;\n }", "public function channels(){\n return $this->channelCollection->map(function ($item, $key) {\n return ['channel' => $item['channel']];\n });\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function via($notifiable)\n\t{\n\t\tif (!isset($this->notifitable)) {\n\t\t\t$this->notifitable = $notifiable;\n\t\t}\n\t\t$channels = ['db'];\n\t\tif (in_array('esms', $this->data['types'])) {\n\t\t\t$channels[] = 'esms';\n\t\t}\n\t\tif (in_array('email', $this->data['types'])) {\n\t\t\t$channels[] = 'mail';\n\t\t}\n\n\t\treturn $channels;\n\t}", "public function getChannel()\n {\n return $this->getData(self::CHANNEL);\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function via($notifiable)\n {\n return [FcmChannel::class];\n }", "public function broadcastOn() {\n return [\n new Channel('messages.' . $this->userReceiver->id . '.' . $this->currentUser->email),\n new Channel('messages.' . $this->currentUser->id . '.' . $this->userReceiver->email),\n ];\n }", "public function broadcastOn()\n {\n return [config('messenger.redis_channel', 'notification')];\n }", "public function via($notifiable): array\n {\n return [DiscordChannel::class];\n }", "public function via($notifiable)\n {\n return [WhatsappChannel::class, SmsChannel::class];\n }", "public function getSupplyChannels()\n {\n return $this->supplyChannels;\n }", "public function getChannel();", "public function getAllChannels()\n {\n return Channel::with('subChannel.display')->active()->alive()->get()->toArray();\n }", "public function setNotificationChannels($val)\n {\n $this->_propDict[\"notificationChannels\"] = $val;\n return $this;\n }", "public function getIncludeChannels()\n {\n return $this->include_channels;\n }", "public function getDelivery()\n {\n return $this->delivery;\n }", "public static function getChannels($aspect)\n {\n return self::getMetaProperty($aspect, 'channel');\n }", "public function broadcastOn()\n {\n return new Channel('notifications');\n }", "public function getAll(){\n\t\t$Channels = \\Channel::all();\n\t\treturn $Channels;\n\t}", "public function via( $notifiable )\n\t{\n\t\treturn [ OneSignalChannel::class ];\n\t}", "public function via($notifiable)\n {\n return [PushNotificationChannel::class];\n }", "public function channels(): ChannelsService;", "public function getNotificationTypes()\n {\n return $this->notifications;\n }", "public function getChannelList()\n {\n return Channel::with('subChannel.display')->get();\n }", "public function list_channels($exclude_archived=true) {\n\n $method=\"channels.list\";\n $payload['exclude_archived'] = $exclude_archived;\n\n $result = $this->apicall($method, $payload);\n if (isset($result['channels'])) {\n return $result['channels'];\n } else {\n return false;\n }\n }", "public function getChannel()\n {\n \treturn $this->_channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "function channelInfo()\n\t{\n\t\treturn $this->_channel;\n\t}", "public function broadcastOn()\n {\n return ['my-channel'];\n }", "public function via($notifiable)\n {\n return [SendGridChannel::class];\n }", "public function getChannel()\n {\n return $this->Channel;\n }", "public function getChannel()\n {\n return $this->Channel;\n }", "public function getChannel()\n {\n if (! $this->channel) {\n $this->set();\n }\n\n return $this->channel;\n }", "public function broadcastOn()\n {\n return ['channel-status'];\n }", "public function broadcastOn()\n {\n return [\n new Channel('sanityDeployment.' . $this->sanityDeployment->id),\n new Channel('sanityMainRepo.' . $this->sanityDeployment->sanityMainRepo->id),\n ];\n }", "public function via($notifiable)\n {\n return [DiscordChannel::class];\n }", "public static function getChannels() {\n\t\t$channels = [];\n\t\ttry {\n\t\t\t$mapper = new ObjectMapper();\n\t\t\t$response = self::getResponse();\n\t\t\t$data = json_decode( $response, true );\n\t\t\tif ( count( $data['Channels'] ) > 0 ) {\n\t\t\t\tforeach ( $data['Channels'] as $dataProject ) {\n $channels[] = $mapper->mapJson( json_encode( $dataProject ), Channel::class );\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( \\Exception $e ) {\n\t\t\tthrow $e;\n\t\t}\n\n\t\treturn $channels;\n\t}", "public function getListDeliveryStatus()\n {\n return $this->client->makeRequest('deliverystatus', 'GET');\n }", "public function onChannels(): ?array\n {\n return null;\n }", "public function getChannel()\n\t{\n\t\treturn $this->channel;\n\t}", "public function via($notifiable): array\n {\n return [TelegramChannel::class];\n }", "public function getChannel() {\n return $this->channel;\n }", "public function getChannels()\n {\n return Channel::with('subChannel.category', 'subChannel.display')->whereNull('parent_channel')->active()->get()->toArray();\n }", "public function getDestinationChannel();", "public function getJoinDefaultChannels()\n {\n return $this->joinDefaultChannels;\n }", "function hpm_channels( $mutations ) {\n $mutation = $mutations[0];\n $object = $mutation->action == 'create' ?\n $mutation->property_value :\n hpm_object( $mutation->object_type, $mutation->object_id );\n $channels = [];\n switch ($mutation->object_type) {\n case 'message':\n case 'resource':\n if ( $object->project_id === NULL ) {\n $channels = ['members'];\n } else {\n $channels[] = 'private-managers';\n $project = hpm_object( 'project', $object->project_id );\n if ( $project->contractor_id !== NULL ) {\n $channels[] = 'private-contractor-' . $project->contractor_id;\n }\n }\n break;\n case 'package':\n $channels = ['private-managers'];\n break;\n case 'person':\n case 'project':\n $channels = ['members'];\n break;\n case 'time':\n $channels = ['private-managers'];\n $worker = hpm_object( 'person', $object->worker_id );\n if ( $worker->role == 'contractor' ) {\n $channels[] = 'private-contractor-' . $object->worker_id;\n }\n break;\n default: break;\n }\n return $channels;\n}", "public function getDistributionChannel()\n {\n return $this->distributionChannel instanceof ChannelReferenceBuilder ? $this->distributionChannel->build() : $this->distributionChannel;\n }", "private function getChannels()\r\n {\r\n static $channels;\r\n\r\n if (empty($channels)) {\r\n // Store the cache forever.\r\n $cache_key = 'categoryFirst';\r\n $channels = \\SCache::sear($cache_key, function () {\r\n $categories = $this->all();\r\n $channels = [];\r\n foreach ($categories as $category) {\r\n if ($category['bclassid'] == 0) {\r\n $channels[] = $category;\r\n }\r\n }\r\n return $channels;\r\n });\r\n }\r\n\r\n return $channels;\r\n }", "public function via($notifiable)\n {\n return [NetgsmChannel::class];\n }", "public function getChannels()\n {\n $size = $this->getImageSize();\n\n return $size['channels'];\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], NotificationChannel::class);\n }", "public function notifications()\n {\n $notifications = $this->get(\"/api/v1/conversations?as_user_id=sis_user_id:mtm49\");\n return $notifications;\n }", "public function via($notifiable)\n {\n return [WebPushChannel::class];\n }", "public function via($notifiable)\n {\n return [WebPushChannel::class];\n }", "public function getActiveChannels(string $format = 'xml'): array\n {\n $response = $this->prepareHttpClient('/mailer/channel/list', ['format' => $format])\n ->send();\n\n if ($format === 'csv') {\n return $this->parseResponse($response);\n }\n\n $xml = new SimpleXMLElement($this->parseResponse($response));\n\n $channels = [];\n foreach ($xml->children() as $channel) {\n $channels[] = [\n 'date' => new DateTime((string) $channel->attributes()->date),\n 'name' => (string) $channel->attributes()->name,\n 'info' => (string) $channel->attributes()->info,\n ];\n }\n\n return $channels;\n }", "public function via($notifiable)\n {\n $array = ['database', 'fcm'];\n\n if (setting('twilio_disabled') != true &&\n !blank(setting('twilio_from')) &&\n !blank(setting('twilio_account_sid')) &&\n !blank(setting('twilio_account_sid'))\n ) {\n array_push($array, TwilioChannel::class);\n }\n\n if (setting('mail_disabled') != true &&\n !blank(setting('mail_host')) &&\n !blank(setting('mail_username')) &&\n !blank(setting('mail_password')) &&\n !blank(setting('mail_port')) &&\n !blank(setting('mail_from_name')) &&\n !blank(setting('mail_from_address'))\n ) {\n array_push($array, 'mail');\n }\n\n return $array;\n }", "public function getChannel(): Channel\n {\n return $this->channel;\n }", "public function via($notifiable) {\n return [OneSignalChannel::class];\n }", "public function getChannelNames()\n {\n $array = [];\n\n foreach ($this->channels as $channel) {\n $array[$channel->name] = $channel->name;\n }\n\n return $array;\n }", "public function getNotifications()\n {\n return $this->_notifications;\n }", "public function getChannels(){\n\t\t//TODO: Change query\n\t\t$query = sprintf(\"SELECT idChannel FROM Channels limit 1\");\n\n\t\t$this->dbObj->Query($query);\n\n\t\tif ($this->dbObj->numErr) {\n\t\t\t$this->parent->SetError(5);\n\t\t}\n\n\t\t$out = NULL;\n\t\twhile (!$this->dbObj->EOF) {\n\t \t\t$out[] = $this->dbObj->GetValue(\"idChannel\");\n\t\t\t$this->dbObj->Next();\n\t\t}\n\n\t \treturn $out;\n\t}", "public function via($notifiable)\n {\n $via = [];\n\n foreach ($this->sendibleTraits() as $trait) {\n $viaNameFromTrait = $this->getViaNameFromTrait($trait);\n\n if ($this->shouldBeSentVia($viaNameFromTrait, $notifiable)) {\n $via[] = $this->{$viaNameFromTrait . 'Channel'}();\n }\n }\n\n return $via;\n }", "public function via($notifiable)\n {\n return [CustomDbChannel::class, 'mail'];\n }", "public function via($notifiable)\n {\n return [FacebookChannel::class];\n }", "public function getChannels()\n {\n $channels = $this->channels->getAll();\n $channelList = [];\n\n // Cycle through all of the channels and setup data for them\n foreach ($channels as $channel) {\n $message = $this->chat->getLatestByChannel($channel->id);\n\n $channelList[] = [\n 'name' => $channel->name_trim,\n 'messages' => $channel->messages,\n 'last_message' => strtotime($message['created_at']),\n ];\n }\n\n return json_encode(array_reverse($channelList));\n }", "public function getChannel()\n {\n return $this->_access->getChannel();\n }", "public function getChannel(): string {\n\t\t\treturn $this->channel;\n\t\t}", "public function getChannel($storeId = null);", "public function channels()\n {\n return $this->belongsToMany('App\\Channel');\n }", "public function broadcastOn()\n {\n return ['whatcanido-channel'];\n }", "public function getNotificationgroups()\n {\n return isset($this->notificationgroups) ? $this->notificationgroups : null;\n }", "public function via($notifiable)\n {\n $now = Carbon::now();\n $createdAt = Carbon::parse($notifiable->created_at);\n $dayFive = $createdAt->copy()->addDays(5)->startOfDay();\n $daySix = $createdAt->copy()->addDays(6)->endOfDay();\n if ($now->between($dayFive, $daySix)) {\n $this->isDayFive = $now->between($dayFive, $dayFive->copy()->endOfDay()) ? true : false;\n return [LineBotNotificationChannel::class];\n }\n\n return [];\n }", "public function broadcastOn()\n {\n return new Channel('doctor-notification');\n }", "public function via($notifiable)\n {\n return [OneSignalChannel::class];\n }" ]
[ "0.78077316", "0.7333707", "0.7127785", "0.7089724", "0.7087921", "0.70300424", "0.69931364", "0.6973003", "0.6951073", "0.6927183", "0.68472975", "0.67785895", "0.6697527", "0.6530563", "0.65100604", "0.6496754", "0.6474866", "0.6446399", "0.643471", "0.6423392", "0.64229727", "0.63781494", "0.63726985", "0.6277284", "0.6276724", "0.6276724", "0.6276724", "0.6234952", "0.6203739", "0.6179071", "0.6179071", "0.61232203", "0.61158967", "0.61088634", "0.6020671", "0.5995534", "0.5985168", "0.59301424", "0.5916712", "0.5912588", "0.5911691", "0.5896299", "0.5893216", "0.5889689", "0.5887195", "0.5878091", "0.586549", "0.58512723", "0.5812232", "0.5805207", "0.5800807", "0.57906127", "0.5786768", "0.5786768", "0.57807684", "0.5779888", "0.57715005", "0.57678837", "0.57678837", "0.5766476", "0.5754385", "0.57491064", "0.5742647", "0.5735341", "0.5732727", "0.57325697", "0.5728877", "0.57221526", "0.57207775", "0.57169145", "0.5712525", "0.5694798", "0.5688528", "0.5683845", "0.5683054", "0.5682042", "0.567513", "0.5663718", "0.5659599", "0.5652422", "0.5652422", "0.5630605", "0.5630334", "0.56298393", "0.5625376", "0.5625225", "0.56192815", "0.56115615", "0.5607237", "0.5602894", "0.5584222", "0.55823225", "0.55728054", "0.5566249", "0.5554496", "0.555214", "0.5549145", "0.55454457", "0.5544404", "0.55443466", "0.5544159" ]
0.0
-1
Get the webhook representation of the notification.
public function toWebhook($notifiable) { return [ 'type' => 'beta_notification', 'message' => $this->user->username . ' has just created a Beta Application. Click here to view the application: ' . route('admin.applications.show', $this->application), ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function webhook()\n {\n return $this->meetingRepository->webhook();\n }", "public function getDecodedWebhook() {\n return $this->decodedWebhook;\n }", "public function getWebhookInfo(){\n return $this->make_http_request(__FUNCTION__);\n }", "public function getNotification()\n {\n return $this->notification;\n }", "public function retrieveWebhooks()\n {\n return $this->start()->uri(\"/api/webhook\")\n ->get()\n ->go();\n }", "public function getJSON()\n {\n if (!$this->verified) {\n throw new WebhookMessageException('First verify the response before accessing json payload');\n }\n return json_decode($this->getPayload(), true);\n }", "public function getWebhookInfo()\n {\n return current($this->sendRequest('GET', 'getWebhookInfo'));\n }", "public function webhook()\n {\n $bodyReceived = file_get_contents('php://input');\n\n // Receive HTTP headers that you received from PayPal webhook.\n $headers = getallheaders();\n\n /**\n * Uppercase all the headers for consistency\n */\n $headers = array_change_key_case($headers, CASE_UPPER);\n\n $signatureVerification = new \\PayPal\\Api\\VerifyWebhookSignature();\n $signatureVerification->setWebhookId(env('PAYPAL_WEBHOOK_ID'));\n $signatureVerification->setAuthAlgo($headers['PAYPAL-AUTH-ALGO']);\n $signatureVerification->setTransmissionId($headers['PAYPAL-TRANSMISSION-ID']);\n $signatureVerification->setCertUrl($headers['PAYPAL-CERT-URL']);\n $signatureVerification->setTransmissionSig($headers['PAYPAL-TRANSMISSION-SIG']);\n $signatureVerification->setTransmissionTime($headers['PAYPAL-TRANSMISSION-TIME']);\n\n $webhookEvent = new \\PayPal\\Api\\WebhookEvent();\n $webhookEvent->fromJson($bodyReceived);\n $signatureVerification->setWebhookEvent($webhookEvent);\n $request = clone $signatureVerification;\n\n try {\n $output = $signatureVerification->post($this->apiContext);\n } catch(\\Exception $ex) {\n print_r($ex->getMessage());\n exit(1);\n }\n\n $verificationStatus = $output->getVerificationStatus();\n $responseArray = json_decode($request->toJSON(), true);\n\n $event = $responseArray['webhook_event']['event_type'];\n\n if ($verificationStatus == 'SUCCESS')\n {\n switch($event)\n {\n case 'BILLING.SUBSCRIPTION.CANCELLED':\n case 'BILLING.SUBSCRIPTION.SUSPENDED':\n case 'BILLING.SUBSCRIPTION.EXPIRED':\n case 'BILLING_AGREEMENTS.AGREEMENT.CANCELLED':\n\n // $user = User::where('payer_id',$responseArray['webhook_event']['resource']['payer']['payer_info']['payer_id'])->first();\n $this->updateStatus($responseArray['webhook_event']['resource']['payer']['payer_info']['payer_id'], 0);\n break;\n }\n }\n echo $verificationStatus;\n exit(0);\n }", "public function toWebPush($notifiable, $notification)\n {\n return (new WebPushMessage)\n ->title($this->event->title . '!')\n ->body('Det går nu att anmäla sig till ett nytt lan!');\n }", "public function getNotification()\n\t{\n\t\treturn $this->notification;\n\t}", "public function getPayload()\n {\n return @json_decode($this->body);\n }", "public function getWebhookInfo(): Request\n {\n return $this->request('getWebhookInfo');\n }", "public function getWebhookConfigRaw()\n {\n $url = SmartwaiverRoutes::getWebhookConfig();\n return $this->sendRawGetRequest($url);\n }", "public function getWebhookResponse() {\n return 'OK';\n }", "public function getPayload();", "public function getPayload();", "public function getPayload();", "public function getPayload()\n {\n return $this->request->getJsonRawBody();\n }", "function getNotificationMessage($request, $notification) {\n\t\t// Allow hooks to override default behavior\n\t\t$message = null;\n\t\tHookRegistry::call('NotificationManager::getNotificationMessage', array(&$notification, &$message));\n\t\tif($message) return $message;\n\n\t\tswitch ($notification->getType()) {\n\t\t\tcase NOTIFICATION_TYPE_PUBLISHED_ISSUE:\n\t\t\t\treturn __('notification.type.issuePublished');\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_SUCCESS:\n\t\t\t\treturn __('gifts.giftRedeemed');\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_NO_GIFT_TO_REDEEM:\n\t\t\t\treturn __('gifts.noGiftToRedeem');\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_GIFT_ALREADY_REDEEMED:\n\t\t\t\treturn __('gifts.giftAlreadyRedeemed');\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_GIFT_INVALID:\n\t\t\t\treturn __('gifts.giftNotValid');\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_SUBSCRIPTION_TYPE_INVALID:\n\t\t\t\treturn __('gifts.subscriptionTypeNotValid');\n\t\t\tcase NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_SUBSCRIPTION_NON_EXPIRING:\n\t\t\t\treturn __('gifts.subscriptionNonExpiring');\n\t\t\tcase NOTIFICATION_TYPE_BOOK_REQUESTED:\n\t\t\t\treturn __('plugins.generic.booksForReview.notification.bookRequested');\n\t\t\tcase NOTIFICATION_TYPE_BOOK_CREATED:\n\t\t\t\treturn __('plugins.generic.booksForReview.notification.bookCreated');\n\t\t\tcase NOTIFICATION_TYPE_BOOK_UPDATED:\n\t\t\t\treturn __('plugins.generic.booksForReview.notification.bookUpdated');\n\t\t\tcase NOTIFICATION_TYPE_BOOK_DELETED:\n\t\t\t\treturn __('plugins.generic.booksForReview.notification.bookDeleted');\n\t\t\tcase NOTIFICATION_TYPE_BOOK_MAILED:\n\t\t\t\treturn __('plugins.generic.booksForReview.notification.bookMailed');\n\t\t\tcase NOTIFICATION_TYPE_BOOK_SETTINGS_SAVED:\n\t\t\t\treturn __('plugins.generic.booksForReview.notification.settingsSaved');\n\t\t\tcase NOTIFICATION_TYPE_BOOK_SUBMISSION_ASSIGNED:\n\t\t\t\treturn __('plugins.generic.booksForReview.notification.submissionAssigned');\n\t\t\tcase NOTIFICATION_TYPE_BOOK_AUTHOR_ASSIGNED:\n\t\t\t\treturn __('plugins.generic.booksForReview.notification.authorAssigned');\n\t\t\tcase NOTIFICATION_TYPE_BOOK_AUTHOR_DENIED:\n\t\t\t\treturn __('plugins.generic.booksForReview.notification.authorDenied');\n\t\t\tcase NOTIFICATION_TYPE_BOOK_AUTHOR_REMOVED:\n\t\t\t\treturn __('plugins.generic.booksForReview.notification.authorRemoved');\n\t\t\tdefault:\n\t\t\t\treturn parent::getNotificationMessage($request, $notification);\n\t\t}\n\t}", "public function getWebhookUpdatesRaw(): ?string\n {\n if (!$this->webhookUpdatesRaw) {\n $this->webhookUpdatesRaw = file_get_contents('php://input') ?: null;\n\n }\n return $this->webhookUpdatesRaw;\n }", "public function routeNotificationForSlack()\n {\n return Config::get('base.slack_webhook_url');\n }", "public function getNotificationUrl() {\n return (string) $this->getValue('notification_url');\n }", "public function webhook(Request $request): Response\n {\n return call_user_func($this->webHookController, $request);\n }", "public function toWebPush($notifiable, $notification)\n {\n $push = (new WebPushMessage)\n ->title($this->title)\n ->icon('assets/front/img/pushnotification_icon.png')\n ->action($this->buttonText, $this->buttonURL);\n\n if (!empty($this->message)) {\n $push = $push->body($this->message);\n }\n\n return $push;\n }", "public function webhook()\n {\n $this->paymentSettings = $this->getPaymentSettings();\n $payload = file_get_contents(\"php://input\");\n $signature = (isset($_SERVER['HTTP_X_PAYSTACK_SIGNATURE']) ? $_SERVER['HTTP_X_PAYSTACK_SIGNATURE'] : '');\n /* It is a good idea to log all events received. Add code *\n * here to log the signature and body to db or file */\n if (!$signature) {\n // only a post with paystack signature header gets our attention\n exit();\n }\n // confirm the event's signature\n if ($signature !== hash_hmac('sha512', $payload, $this->paymentSettings['secret_key'])) {\n // silently forget this ever happened\n exit();\n }\n $webhook_response = json_decode($payload, true);\n if ('charge.success' != $webhook_response['event']) {\n exit;\n }\n try {\n $orderId = $this->updatePaymentStatus($webhook_response['data']['reference']);\n } catch (Exception $e) {\n // Invalid payload\n http_response_code(400);\n exit();\n }\n http_response_code(200);\n exit();\n }", "public function getEventPayload()\n {\n return $this->eventPayload;\n }", "public function toDiscord($notifiable)\n {\n\n return WebhookMessage::create()\n ->data([\n 'payload_json' => [\n 'content' => \"A new loadout is available for all on Saberfront Live: **\" . $this->loadout->loadout_name. \"**!\"\n ]\n ])\n ->userAgent(\"SaberfrontVm/DB2 1.0\");\n\n }", "public function routeNotificationForSlack()\n {\n return env('SLACK_WEBHOOK_URL');\n }", "public function slackWebhookUrl()\n {\n return $this->getNotificationChannel('slack')['settings']['webhook_url'] ?? null;\n }", "public function webhook(array $data = [])\n {\n return $this->sanitizeTo($data);\n }", "public function getWebhookConfig()\n {\n $url = SmartwaiverRoutes::getWebhookConfig();\n $this->sendGetRequest($url);\n\n try\n {\n // Return the retrieved webhook\n return new SmartwaiverWebhook($this->lastResponse->responseData);\n }\n catch(InvalidArgumentException $e)\n {\n throw new SmartwaiverSDKException(\n $this->lastResponse->getGuzzleResponse(),\n $this->lastResponse->getGuzzleBody(),\n $e->getMessage()\n );\n }\n }", "public function getPayload()\r\n\t{\r\n\t\treturn $this->getDecodedBody()->getBody();\r\n\t}", "public function toWebPush($notifiable, $notification)\n {\n $user_name = auth()->user()->name;\n $user_image = auth()->user()->profile_image;\n\n $startedFollow = \\Lang::get('notifications.startedFollow');\n $openProfile = \\Lang::get('notifications.openProfile');\n\n return (new WebPushMessage)\n ->title($user_name . ' ' . $startedFollow)\n ->icon('/storage/profile_image_nano/' . $user_image)\n ->action($openProfile, 'open_profile')\n ->data( $this->getReturn() );\n }", "public function get_webhooks() {\n\n\t\t$this->method = 'GET';\n\t}", "public function getPayload()\n {\n return $this->payload;\n }", "public function getPayload()\n {\n return $this->payload;\n }", "public function getPayload()\n {\n return $this->payload;\n }", "public function getPayload()\n {\n return $this->payload;\n }", "public function getPayload()\n {\n return $this->payload;\n }", "public function getPayload() {\n return $this->payload;\n }", "public function getPayload() {\n return $this->payload;\n }", "public function webHook()\n {\n// try\n// {\n\n $this->bodyObject = json_decode($this->bodyReceived);\n\n if (!is_object($this->bodyObject))\n {\n \\Log::error('[Parse Body Failed] invalid body');\n throw new \\Exception('Invalid request null');\n }\n\n return $this->bodyObject;\n\n// if ($this->TtgPaymentHistory->checkDuplicateWebHook($this->bodyObject->id))\n// {\n// throw new \\Exception('[NOTICE] web hook already saved, web hook id:' . $this->bodyObject->id);\n// }\n//\n// if ($this->TtgPaymentHistory->checkDuplicateAgreementPayment($this->bodyObject->resource))\n// {\n// throw new \\Exception('[NOTICE] agreement payment already saved, sub id:' . $this->bodyObject->resource->billing_agreement_id . \", trans id: \" . $this->bodyObject->resource->id);\n// }\n\n\n\n// } catch (\\Exception $e)\n// {\n \\Log::error('error web hook');\n// $this->PayPal->payPalLog('[Save Event Data Failed] event type:\"' . $this->bodyObject->event_type . '\" web hook id:\"' . $this->bodyObject->id . '\"', $e);\n// $this->response->statusCode(501);\n// $this->response->body($e->getMessage());\n// $this->response->send();\n// }\n // this is necessary\n// exit();\n }", "public function toArray($notifiable)\n {\n return $this->message;\n }", "public function getWebhookId()\n {\n return Mage::getStoreConfig('trello_api/webhook/id');\n }", "public function getPayload()\n {\n return $this->source['payload'];\n }", "public function getPayload() {\n return $this->_payload;\n }", "public function webhook(){\r\n\t\t\r\n\t\t$json = array();\r\n\r\n\t\tif($this->request->server['REQUEST_METHOD'] == 'POST'){\r\n\t\t\t\r\n\t\t\t$post = array();\r\n\t\t\tif(isset($this->request->post['coin_short_name']) && $this->request->post['coin_short_name'] != '' && isset($this->request->post['address']) && $this->request->post['address'] != '' && isset($this->request->post['type']) && $this->request->post['type'] != ''){\r\n\t\t\t\t$post = $this->request->post;\r\n\t\t\t}else{\r\n\t\t\t\t$post_json = json_decode(file_get_contents('php://input'),TRUE);\r\n\r\n\t\t\t\tif(isset($post_json['coin_short_name']) && $post_json['coin_short_name'] != '' && isset($post_json['address']) && $post_json['address'] != '' && isset($post_json['type']) && $post_json['type'] != '' ){\r\n\t\t\t\t\t$post = $post_json;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t$json['msg'] = \"Required paramters are not found\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!empty($post)){\r\n\r\n\t\t\t\tif($post['type'] == 'receive'){\r\n\t\t\t\t\t$this->load->model('checkout/order');\r\n\r\n\t\t\t\t\t$address = $post['address'];\r\n\r\n\t\t\t\t\t/*** check if address exists in oc_coinremitter_order ***/\r\n\t\t\t\t\t$this->load->model('extension/coinremitter/payment/coinremitter');\r\n\t\t\t\t\t$order_info = $this->model_extension_coinremitter_payment_coinremitter->getOrderByAddress($address);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!empty($order_info)){\r\n\r\n\t\t\t\t\t\tif($order_info['payment_status'] == 'pending' || $order_info['payment_status'] == 'under paid'){\r\n\r\n\t\t\t\t\t\t\t$orderId = $order_info['order_id'];\r\n\r\n\t\t\t\t\t\t\t$order_cart = $this->model_checkout_order->getOrder($orderId);\r\n\t\t\t\t\t\t\tif(!empty($order_cart)){\r\n\r\n\t\t\t\t\t\t\t\t/*** check if expired time of invoice is defined or not. If defined then check if invoice has any transaction or not. If no transaction is found and invoice time is expired then change invoice status as expired ***/\r\n\r\n\t\t\t\t\t\t\t\t/*** Get webhook by address***/\r\n\t\t\t\t\t\t\t\t$status = '';\r\n\t\t\t\t\t\t\t\tif(isset($order_info['expire_on']) && $order_info['expire_on'] != ''){\r\n\t\t\t\t\t\t\t\t\tif(time() >= strtotime($order_info['expire_on'])){\r\n\t\t\t\t\t\t\t\t\t\t$getWebhookByAddressRes = $this->model_extension_coinremitter_payment_coinremitter->getWebhookByAddress($address);\t\r\n\t\t\t\t\t\t\t\t\t\tif(empty($getWebhookByAddressRes)){\r\n\t\t\t\t\t\t\t\t\t\t\t//update payment_status,status as expired\r\n\t\t\t\t\t\t\t\t\t\t\t$status = 'expired';\r\n\t\t\t\t\t\t\t\t\t\t\t$update_arr = array('payment_status' => $status);\r\n\t\t\t\t\t\t\t\t\t\t\t$this->model_extension_coinremitter_payment_coinremitter->updateOrder($orderId,$update_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t$update_arr = array('status' => ucfirst($status));\r\n\t\t\t\t\t\t\t\t\t\t\t$this->model_extension_coinremitter_payment_coinremitter->updatePaymentStatus($orderId,$update_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif($order_cart['order_status'] != 'Canceled'){\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** Update order history status to canceled, add comment ***/\r\n\t\t\t\t\t\t $comments = 'Order #'.$orderId;\r\n\t\t\t\t\t\t $is_customer_notified = true;\r\n\t\t\t\t\t\t $this->model_checkout_order->addHistory($orderId, 7, $comments, $is_customer_notified); // 7 = Canceled\t\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif($status == ''){\r\n\r\n\t\t\t\t\t\t\t\t\t$coin = $post['coin_short_name'];\r\n\t\t\t\t\t\t\t\t\t$trxId = $post['id'];\r\n\r\n\t\t\t\t\t\t\t\t\t/*** now get wallet data from oc_coinremitter_wallet with use of coin ***/\r\n\t\t\t\t\t\t\t\t\t$wallet_info = $this->model_extension_coinremitter_payment_coinremitter->getWallet($coin);\r\n\t\t\t\t\t\t\t\t\tif(!empty($wallet_info)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t/*** now get transaction from coinremitter api call ***/\r\n\t\t\t\t\t\t\t\t\t\t$get_trx_params = array(\r\n\t\t\t\t\t\t\t\t\t\t\t'url'\t\t=> 'get-transaction',\r\n\t\t\t\t\t\t\t\t\t\t\t'api_key'\t=>\t$wallet_info['api_key'],\r\n\t\t\t\t\t\t 'password'\t=>\t$wallet_info['password'],\r\n\t\t\t\t\t\t 'id'\t\t=>\t$trxId,\r\n\t\t\t\t\t\t 'coin'\t\t=>\t$coin\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\t\t\t$getTransaction = $this->obj_curl->commonApiCall($get_trx_params);\r\n\t\t\t\t\t\t\t\t\t\tif(!empty($getTransaction) && isset($getTransaction['flag']) && $getTransaction['flag'] == 1){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t$transaction = $getTransaction['data'];\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif(isset($transaction['type']) && $transaction['type'] == 'receive'){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** now check if transaction exists in oc_coinremitter_webhook or not if does not exist then insert else update confirmations ***/\r\n\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$webhook_info = $this->model_extension_coinremitter_payment_coinremitter->getWebhook($transaction['id']);\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(empty($webhook_info)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//insert record\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$insert_arr = array(\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order_id' => $orderId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'address' => $transaction['address'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'transaction_id' => $transaction['id'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'txId' => $transaction['txid'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'explorer_url' => $transaction['explorer_url'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'paid_amount' => $transaction['amount'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'coin' => $transaction['coin_short_name'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'confirmations' => $transaction['confirmations'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'paid_date' => $transaction['date']\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$inserted_id = $this->model_extension_coinremitter_payment_coinremitter->addWebhook($insert_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($inserted_id > 0){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$json['flag'] = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$json['msg'] = \"Inserted successfully\";\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$json['msg'] = \"system error. Please try again later.\";\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//update confirmations if confirmation is less than 3\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($webhook_info['confirmations'] < 3){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$update_confirmation = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'confirmations' => $transaction['confirmations'] <= 3 ? $transaction['confirmations'] : 3 \r\n\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$this->model_extension_coinremitter_payment_coinremitter->updateTrxConfirmation($webhook_info['transaction_id'],$update_confirmation);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$json['flag'] = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$json['msg'] = \"confirmations updated successfully\";\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** order paid process start ***/\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** Now, get all webhook transactions which have lesser than 3 confirmations ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\t$webhook_res = $this->model_extension_coinremitter_payment_coinremitter->getSpecificWebhookTrxByAddress($address);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** Get wallet info if and only if webhook_res has atleast one data ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($webhook_res)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($webhook_res as $webhook) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/*** Get confirmation from coinremitter api (get-transaction) ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$get_trx_params['id'] = $webhook['transaction_id']; \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$getTransactionRes = $this->obj_curl->commonApiCall($get_trx_params);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!empty($getTransactionRes) && isset($getTransactionRes['flag']) && $getTransactionRes['flag'] == 1){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$transactionData = $getTransactionRes['data'];\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$update_confirmation = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'confirmations' => $transactionData['confirmations'] <= 3 ? $transactionData['confirmations'] : 3 \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\t$this->model_extension_coinremitter_payment_coinremitter->updateTrxConfirmation($webhook['transaction_id'],$update_confirmation);\r\n\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** Get sum of paid amount of all transations which have 3 or more than 3 confirmtions ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\t$total_paid_res = $this->model_extension_coinremitter_payment_coinremitter->getTotalPaidAmountByAddress($address);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t$total_paid = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(isset($total_paid_res['total_paid']) && $total_paid_res['total_paid'] > 0 ){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$total_paid = $total_paid_res['total_paid'];\r\n\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\r\n\t\t\t\t\t\t\t\t\t\t\t\t$status = '';\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($total_paid == $order_info['crp_amount']){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$status = 'paid';\r\n\t\t\t\t\t\t\t\t\t\t\t\t}else if($total_paid > $order_info['crp_amount']){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$status = 'over paid';\r\n\t\t\t\t\t\t\t\t\t\t\t\t}else if($total_paid != 0 && $total_paid < $order_info['crp_amount']){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$status = 'under paid';\r\n\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\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($status != ''){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//update payment_status,status\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$update_arr = array('payment_status' => $status);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->model_extension_coinremitter_payment_coinremitter->updateOrder($orderId,$update_arr);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$update_arr = array('status' => ucfirst($status));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->model_extension_coinremitter_payment_coinremitter->updatePaymentStatus($orderId,$update_arr);\r\n\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\tif($status == 'paid' || $status == 'over paid' || $status == 'under paid'){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/*** Update order status as complete ***/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->add_order_success_history($orderId);\r\n\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}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t/*** order paid process end ***/\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$json['flag'] = 0; \r\n\t\t\t\t\t\t\t\t\t\t\t\t$json['msg'] = 'Transaction type is not receive';\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\t$msg = 'Something went wrong while getting transactions. Please try again later'; \r\n\t\t\t\t\t\t\t\t\t\t\tif(isset($getTransaction['msg']) && $getTransaction['msg'] != ''){\r\n\t\t\t\t\t\t\t\t\t\t\t\t$msg = $getTransaction['msg']; \r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t$json['flag'] = 0; \r\n\t\t\t\t\t\t\t\t\t\t\t$json['msg'] = $msg; \r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t\t\t\t\t$json['msg'] = \"Wallet not found\";\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t\t\t\t$json['msg'] = \"Order is expired\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t\t\t$json['msg'] = \"Order not found\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t\t$json['msg'] = \"Order status is neither a 'pending' nor a'under paid'\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t\t$json['msg'] = \"Address not found\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t\t$json['msg'] = \"Invalid type\";\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$json['flag'] = 0;\r\n\t\t\t\t$json['msg'] = \"Required paramters are not found\";\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$json['flag'] = 0;\r\n\t\t\t$json['msg'] = \"Only post request allowed\";\r\n\t\t}\r\n\t\t\r\n\t\t$this->response->addHeader('Content-Type: application/json');\r\n\t\t$this->response->setOutput(json_encode($json));\r\n\t}", "function getPayload();", "public function getWebhookUrl()\n\t{\n\t\t// TODO check loalhost\n\t\treturn 'http://'.$_SERVER['HTTP_HOST'].$this->getServiceLocator()->get('viewHelperManager')->get('url')->__invoke('hooks');\n\t}", "public function getPayload(): string\n {\n return $this->payload;\n }", "public function user_notification(){\n $apiData = array();\n $this->loadModel('Post');\n $this->loadModel('Event');\n $this->loadModel('Notification');\n $id = $this->Auth->user('id');\n $notification = $this->Notification->getNotification($id);\n if(!empty($notification)) {\n $data = array();\n $keyValue = Hash::combine($notification ,'{n}.Notification.object_id','{n}.Notification.object_id','{n}.Notification.object_type');\n foreach ($keyValue as $key => $value) {\n switch($key){\n case OBJECT_TYPE_EVENT: \n $data[OBJECT_TYPE_EVENT] = $this->Event->getEventNotification(array_values($value));\n break;\n case OBJECT_TYPE_POST:\n $data[OBJECT_TYPE_POST] = $this->Post->getPostNotification(array_values($value));\n break;\n case OBJECT_TYPE_LEAVE:\n $data[OBJECT_TYPE_LEAVE] = $this->Leave->getLeaveNotification(array_values($value));\n break;\n case OBJECT_TYPE_BIRTHADAY:\n $data[OBJECT_TYPE_BIRTHADAY] = $this->Birthday->getBirthdayNotification(array_values($value));\n break;\n default:\n echo \"No information available for that day.\";\n break;\n }\n } \n }\n if(!empty($data)) {\n $apiData = $this->getFormatedData($notification, $data);\n }\n return $apiData;\n }", "public function getUpdateNotification(){\n\t\t//render the view\n\t\treturn $this->renderView('update-notification-partial');\n\t}", "function webhooks()\n {\n return new Webhooks($this->accessToken, $this->spaceId, $this->cacher);\n }", "public function payload()\n {\n $payload = parent::payload();\n\n $payload['job'] = $this->handler;\n\n $payload['data'] = unserialize($payload['Message']);\n\n return $payload;\n }", "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 get_notification_get(){\n $notification = $this->model->getAllwhere('notification');\n\n $resp = array(\n 'rccode' => 1,\n 'message' => 'SUCCESS',\n 'notification' => (!empty($notification) ) ? $notification: [],\n );\n $this->response($resp);\n }", "public function getPayload(){\n return $this->EventData;\n }", "public function notify()\n {\n $notification = $this->notify->getNotifications();\n\n JavaScript::put([\n 'notify' => $notification,\n ]);\n\n return $notification;\n }", "public function webhook(Request $request): Response\n {\n if (Webhook::isNotSecure($request)) {\n abort(401, 'Unauthorized request.');\n }\n\n if ($request->header('X-GitHub-Event') === Webhook::PUSH_EVENT) {\n $payload = json_decode($request->getContent());\n $project = Project::where('repository', $payload->repository->full_name)->firstOrFail();\n\n $deployment = new Deployment([\n 'commit' => $payload->head_commit->id,\n 'commit_url' => $payload->repository->full_name\n ]);\n\n StartDeployment::dispatch($project, $deployment);\n }\n\n return response(['success' => 'Webhook event received successfully.']);\n }", "public static function current()\n {\n if (!self::$_currentMessage) {\n self::$_currentMessage = new WebhookMessage(array(\n 'headers' => apache_request_headers(),\n 'payload' => file_get_contents('php://input'),\n ));\n }\n return self::$_currentMessage;\n }", "public function getNotificationEndpoint($notifiable)\n {\n /*\n |--------------------------------------------------------------------------\n | Create your own mailable and notification\n |--------------------------------------------------------------------------\n |\n | You can even create your own mailable and notification,\n | just remember that the link for the notification is:\n | $link = config('json-api-auth.new_password_form_url') . \"?token={$this->token}&email={$notifiable->getEmailForPasswordReset()}\";\n |\n | The reason to work with a url from config file, is to set a url for a\n | reset password form,totally separated from the server app\n |\n | The frontend app would have to grab the token and email query string params\n | from the url, to automatically fill this inputs,\n | this is simple with javascript using something like this:\n |\n | const queryString = window.location.search;\n |\n | const urlParams = new URLSearchParams(queryString);\n |\n | const token = urlParams.get('token')\n |\n | const email = urlParams.get('email')\n |\n */\n\n if(! $endpoint = config('json-api-auth.new_password_form_url')) {\n throw ValidationException::withMessages([\n 'message' => 'There is no domain set in config/json-api-auth.php as new_password_form_url, please add a frontend endpoint to send email with the link.'\n ]);\n }\n\n return $endpoint . \"?token={$this->token}&email={$notifiable->getEmailForPasswordReset()}\";\n }", "public function webhookHandler()\n {\n // Get Update\n $update = $this->telegram->commandsHandler(true);\n\n // Get Message\n $message = $update->getMessage();\n\n // Edge Case?\n if ($message === null) {\n return 'Ok';\n }\n\n // Track Data\n $this->logChatroom($message);\n\n // Okie Doke\n return 'Ok';\n }", "public function getRefundsNotificationUrl(): ?string\n {\n return $this->configuration[ConfigurationInterface::REFUNDS_NOTIFICATION_URL] ?? null;\n }", "public function getJsonPayloadAttribute(): string\n {\n return $this->attributes['payload'] ?? self::DEFAULT_PAYLOAD;\n }", "public function getMailBodyHTML(Notification $notification) : string;", "public function webhook(Request $request, EventDispatcherInterface $eventDispatcher)\n {\n $id = $request->request->get('id');\n\n //-- find payment by externalId === mollie id\n $payment = $this->getDoctrine()->getRepository(Payment::class)->findOneBy([\n 'externalId' => $id\n ]);\n\n $typeHandler = $this->get('comsa_booking_payment_method_mollie');\n\n //-- Check payment status through webhook\n $isPaid = $typeHandler->checkPayment($payment);\n\n if (!$isPaid){\n return new Response('Status has not changed', Response::HTTP_OK);\n }\n\n //-- If checkpayment returns true, set paymentCompletedAt to current datetime\n $payment->setPaid();\n $this->getDoctrine()->getManager()->flush();\n\n //-- Trigger email event\n $typeHandler->afterSuccessWebhook($payment);\n\n return new Response('Status has been updated', Response::HTTP_OK);\n }", "public function getNotify()\n {\n return $this->notify;\n }", "public function getNotificationEmail() {}", "public static function get_webhook_url() {\n\t\treturn add_query_arg( 'wc-api', 'wc_stripe', trailingslashit( get_home_url() ) );\n\t}", "public function getNotificationUUID(): string\n {\n return $this->rawData['notificationUUID'];\n }", "public function getList()\n {\n $_params = array();\n return $this->master->call('webhooks/list', $_params);\n }", "public function getJsonPayload() {\n $body = isset($_REQUEST['payload']) ? $_REQUEST['payload'] : null;\n if (empty($body)) {\n $body = null;\n }\n $payload = json_decode($body, true);\n if ($payload === null) {\n $payload = json_decode(wp_unslash($body), true);\n }\n\n return !empty($payload) ? $payload : [];\n }", "public function getNotificationAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $qb = $em->createQueryBuilder();\n $result = $qb->select('n.id, n.type, n.levelCode, n.levelDescription,'\n . 'n.priority, n.priorityCode, n.title, n.description,'\n . 'n.isActive, n.statusRead, n.createdAt, n.createdAtDate, n.createdAtTime')\n ->from('ESERVMAINProfileBundle:EservVUserNotification', 'n')\n ->where('n.fosUserId = :uid')\n ->setParameter('uid', $this->get('security.context')->getToken()->getUser()->getId())\n ->orderBy('n.createdAt','DESC')\n ->addOrderBy('n.priorityOrder', 'DESC') \n ->getQuery()\n ;\n \n $FormattedQuery = $this->container->get('core_function_services')->GetOutputFormat($result, 'array');\n\n return $this->render('ESERVMAINProfileBundle:UserNotification:view.html.twig', array(\n 'notifications' => $FormattedQuery, \n )); \n\n }", "public function receiveWebhook(Request $request)\n {\n try {\n $request->validate([\n 'entry.*.messaging' => 'required',\n 'object' => 'required|string',\n ]);\n } catch (\\Illuminate\\Validation\\ValidationException $e) {\n abort(404);\n }\n\n // If the request is a message to a Facebook page,\n // we will process the message and send a reply\n if ($request->input('object') === 'page') {\n $this->service->processMessengerEntry($request->input('entry'));\n\n return response('OK');\n }\n\n return abort(404);\n }", "public function getLadderNotify()\n {\n return $this->get(self::_LADDER_NOTIFY);\n }", "public function getNotification($key)\n {\n return $this->getConfigByKey(\"notifications.{$key}\");\n }", "public function create(\\Marat555\\Eventbrite\\Factories\\Entity\\Webhook $webhook);", "protected function buildPayload($notifiable, Notification $notification)\n {\n return [\n 'id' => $notification->id,\n 'model_name' => $this->getData($notifiable, $notification)['object_type'],\n 'model_id' => $this->getData($notifiable, $notification)['object_id'],\n 'type' => get_class($notification),\n 'group_type' => $notification->groupType ?? null,\n 'group_id' => $notification->groupId ?? null,\n 'data' => $this->getData($notifiable, $notification),\n 'read_at' => null,\n ];\n }", "public function getEvent() {\n $request = $this->getRequest();\n\n if (request('type') == 'event_callback') {\n $event = $request['event'];\n } else {\n $event = $request;\n }\n\n return $event;\n }", "public function getPayload(): array;", "public function getPayload(): array;", "function getNotification(){\n\n\n}", "public function retrieveWebhook($webhookId = NULL)\n {\n return $this->start()->uri(\"/api/webhook\")\n ->urlSegment($webhookId)\n ->get()\n ->go();\n }", "public function webhook(Request $request)\n {\n $verified = Flutterwave::verifyWebhook();\n \n // if it is a charge event, verify and confirm it is a successful transaction\n if ($verified && $request->event == 'charge.completed' && $request->data->status == 'successful') {\n $verificationData = Flutterwave::verifyPayment($request->data['id']);\n if ($verificationData['status'] === 'success') {\n // process for successful charge\n \n }\n \n }\n \n // if it is a transfer event, verify and confirm it is a successful transfer\n if ($verified && $request->event == 'transfer.completed') {\n \n $transfer = Flutterwave::transfers()->fetch($request->data['id']);\n \n if($transfer['data']['status'] === 'SUCCESSFUL') {\n // update transfer status to successful in your db\n } else if ($transfer['data']['status'] === 'FAILED') {\n // update transfer status to failed in your db\n // revert customer balance back\n } else if ($transfer['data']['status'] === 'PENDING') {\n // update transfer status to pending in your db\n }\n \n }\n }", "private function useWebHook(): ResponseObject\n {\n $update = $this->api->getWebhookUpdate();\n\n return $this->dispatchUpdateEvent($update);\n }", "function getNotify() {\r\r\n\t\treturn $this->notify;\r\r\n\t}", "public function getFormWebhooks($formId)\n {\n $response = $this->client->request(\"GET\", \"form/{$formId}/webhooks\");\n return $response[\"content\"];\n }", "public function getRefreshPayload(): string\n {\n return $this->refreshPayload;\n }", "public function get()\n {\n $data = array_reverse(array_map('unserialize', file('notification')));\n\n return [\"list\", $data];\n }", "public function lastNotify()\n {\n return $this->notifications()->first();\n }", "public function handleWebhook()\n {\n $payload = (array) json_decode(Request::getContent(), true);\n \n $method = 'handle'.studly_case(str_replace('.', '_', $payload['type']));\n \n if (method_exists($this, $method)) {\n return $this->{$method}($payload);\n }\n else {\n return $this->missingMethod();\n }\n }", "public function get_payload() {\n\t\tif ( ! empty( $this->data->payload ) )\n\t\t\treturn json_decode( $this->data->payload );\n\t\telse\n\t\t\treturn false;\n\t}", "private function getPayload()\n {\n if (count($this->_messages) === 1) {\n return $this->_messages[0]->getContent();\n }\n\n $payload = [];\n foreach ($this->_messages as $message) {\n $payload[] = $message->getContent();\n }\n\n return $payload;\n\n }", "public function get_portfolio_notification();", "public function toTelegram($notifiable)\n {\n dd($notifiable);\n echo $notifiable . \"--\";\n // return '123';\n// return (new MailMessage)\n// ->line('The introduction to the notification.')\n// ->action('Notification Action', url('/'))\n// ->line('Thank you for using our application!');\n }", "public function toBroadcast($notifiable)\n {\n return new BroadcastMessage($this->getReturn());\n }", "public function get_notification($notification_id) {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,0);\n \n // Get notification data by $notification_id\n $get_notification = $this->notifications->get_notification($notification_id, $this->user_id);\n \n if ( $get_notification ) {\n \n echo json_encode($get_notification);\n \n }\n \n }", "public function get_payload();", "public function get_push_notification()\n {\n $this->load->library('wsresponse');\n $this->load->library('wschecker');\n $this->wsresponse->setOptionsResponse();\n\n $this->load->model('rest_model');\n $get_arr = is_array($this->input->get(NULL, TRUE)) ? $this->input->get(NULL, TRUE) : array();\n $post_arr = is_array($this->input->post(NULL, TRUE)) ? $this->input->post(NULL, TRUE) : array();\n $post_params = array_merge($get_arr, $post_arr);\n\n try {\n if ($this->config->item('WS_RESPONSE_ENCRYPTION') == \"Y\") {\n $post_params = $this->wschecker->decrypt_params($post_params);\n }\n $verify_res = $this->wschecker->verify_webservice($post_params);\n if ($verify_res['success'] != \"1\") {\n $this->wschecker->show_error_code($verify_res);\n }\n\n $unique_id = $post_params[\"unique_id\"];\n $data = $temp = array();\n if (empty($unique_id)) {\n throw new Exception(\"Please send unique id for this notification\");\n }\n $extra_cond = $this->db->protect(\"mpn.vUniqueId\") . \" = \" . $this->db->escape($unique_id);\n $data_arr = $this->rest_model->getPushNotify($extra_cond);\n\n if (!is_array($data_arr) || count($data_arr) == 0) {\n throw new Exception(\"Data not found for this unique id\");\n }\n $variables = json_decode($data_arr[0]['tVarsJSON'], true);\n if (is_array($variables) && count($variables) > 0) {\n foreach ($variables as $vk => $vv) {\n if ($vv['key'] != \"\") {\n $temp[$vv['key']] = $vv['value'];\n }\n }\n }\n $temp['code'] = $data_arr[0]['eNotifyCode'];\n $temp['title'] = $data_arr[0]['vTitle'];\n $temp['body'] = $data_arr[0]['tMessage'];\n\n $data[0] = $temp;\n $settings_arr['success'] = 1;\n $settings_arr['message'] = \"Push notification data found\";\n } catch (Exception $e) {\n $settings_arr['success'] = 0;\n $settings_arr['message'] = $e->getMessage();\n }\n $responce_arr['settings'] = $settings_arr;\n $responce_arr['data'] = $data;\n $this->wsresponse->sendWSResponse($responce_arr);\n }", "public static function parse($signature, $payload)\n {\n return Configuration::gateway()->webhookNotification()->parse($signature, $payload);\n }" ]
[ "0.7286365", "0.6495325", "0.6422673", "0.63111573", "0.62259024", "0.6203615", "0.61567265", "0.613993", "0.6105526", "0.60857826", "0.60328573", "0.602549", "0.6016591", "0.5934224", "0.59274966", "0.59274966", "0.59274966", "0.5924149", "0.5891058", "0.5890732", "0.58716106", "0.58404124", "0.5831617", "0.58280796", "0.58128023", "0.5785404", "0.5784504", "0.57737", "0.57714236", "0.57685757", "0.57347286", "0.5726555", "0.5719541", "0.5691403", "0.5674781", "0.5674781", "0.5674781", "0.5674781", "0.5674781", "0.56397504", "0.56397504", "0.55909806", "0.55878544", "0.55722976", "0.5564367", "0.5563878", "0.5551524", "0.55461323", "0.5511718", "0.5502236", "0.5489621", "0.548914", "0.54761124", "0.54701537", "0.54669726", "0.54593754", "0.5453749", "0.5407378", "0.5403244", "0.53987235", "0.5396768", "0.5389673", "0.5362097", "0.53604776", "0.53530824", "0.5335873", "0.5321373", "0.53195786", "0.53085226", "0.5280658", "0.5276825", "0.52746236", "0.52622867", "0.5260486", "0.5259895", "0.5257912", "0.5253028", "0.52452654", "0.52452457", "0.52430683", "0.52430683", "0.5240221", "0.52350384", "0.52343804", "0.52274704", "0.5223862", "0.521444", "0.5212861", "0.5210782", "0.5209289", "0.5198451", "0.51981664", "0.5188209", "0.51881206", "0.5184691", "0.5174978", "0.51708823", "0.5155976", "0.51553786", "0.51536036" ]
0.64150274
3
Gets a list of template packs.
protected function readTemplatePacks() { if ($this->items) { $sql = "SELECT pack.*, COUNT(template.templateID) AS templates FROM wcf".WCF_N."_template_pack pack LEFT JOIN wcf".WCF_N."_template template ON (template.templatePackID = pack.templatePackID) GROUP BY pack.templatePackID ORDER BY ".($this->sortField != 'templates' ? 'pack.' : '').$this->sortField." ".$this->sortOrder; $result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage); while ($row = WCF::getDB()->fetchArray($result)) { $this->templatePacks[] = $row; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplateList() {\n\t\t$aArgs = func_get_args();\n\t\t$aRet = call_user_func_array( array( $this, 'getTemplates' ), $aArgs );\n\t\treturn implode( '|', $aRet );\n\t}", "public function getTemplates (){\n $dir = conf::pathHtdocs() . \"/templates\";\n $templates = file::getFileList($dir, array('dir_only' => true));\n\n $ary = array ();\n foreach ($templates as $val){\n $info = $this->getSingleTemplate($val);\n if (empty($info)) {\n continue;\n }\n $ary[] = $info;\n }\n return $ary;\n }", "function templates()\n {\n return [];\n }", "public function getTemplates(){\n\t\n\t\tif( empty($this->_templates) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 't.tmpl_id AS value, t.tmpl_name AS text' );\n\t\t\t$query->from( '#__zbrochure_templates AS t' );\n\t\t\t$query->where( 't.tmpl_published = 1' );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_templates = $this->_db->loadObjectList();\n\n\t\t}\n\t\t\n\t\treturn $this->_templates;\n\t\n\t}", "public function readCollectionOfPossibleTemplatesToBeInstalledFromFileSystem(){\n\t\t$rootTemplateFoldersToBeMapped = array();\n\t\t$rootTemplateFoldersToBeMapped = $this->searchFolderForTemplatesToBeMapped($this->absoluteRootTemplatesBasePath);\n\t\t//Get all Extension Templates below Root Folders\n\t\t$templateFoldersToBeMapped = array();\n\t\tforeach($rootTemplateFoldersToBeMapped as $rootTemplateFolder) {\n\t\t\t$extensionTempateFoldersToBeMappedFromThisRootTemplate = $this->searchFolderForTemplatesToBeMapped($this->absoluteRootTemplatesBasePath . $rootTemplateFolder . '/' . $this->subFolderNameForExtensionTemplateStructure . '/');\n\n\t\t\tforeach($extensionTempateFoldersToBeMappedFromThisRootTemplate as $extensionTempateFoldersToBeMappedFromThisRootTemplate) {\n\t\t\t\t$templateFoldersToBeMapped[] = $rootTemplateFolder . '/' . $this->subFolderNameForExtensionTemplateStructure . '/' . $extensionTempateFoldersToBeMappedFromThisRootTemplate;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//merge extension and root template folders\n\t\t$templateFoldersToBeMapped = array_merge(\n\t\t\t$rootTemplateFoldersToBeMapped, \n\t\t\t$templateFoldersToBeMapped\n\t\t);\n\t\t\n\t\treturn $templateFoldersToBeMapped;\n\t}", "function ListTemplates()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $Config;\r\n\t\t\t\r\n\t\t\t$sql = \"select * from templates order by TemplateDisplayName asc\" ; \r\n\t\t\treturn $this->get_results($sql);\t\t\r\n\t }", "function getTemplates() {\n\n // Lets load the data if it doesn't already exist\n if (empty($this->_data)) {\n\n // constructs the query\n $query = ' SELECT * '\n . ' FROM #__templateck';\n\n // retrieves the data\n $this->_data = $this->_getList($query);\n }\n\n return $this->_data;\n }", "public function getAllSlideTemplates() {\n return $this->container->get('doctrine')\n ->getRepository('Os2DisplayCoreBundle:SlideTemplate')\n ->findAll();\n }", "public function getTemplates() {\n\n\t\t$aArgs = func_get_args();\n\t\t$aRet = array();\n\t\t\n\t\tforeach ( $this->_aTemplates as $sTemplate => $aGroup ) {\n\t\t\t$bMatch = TRUE;\n\t\t\tforeach ( $aArgs as $sMatchGroup ) {\n\t\t\t\tif ( !in_array( $sMatchGroup, $aGroup ) ) {\n\t\t\t\t\t$bMatch = FALSE;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( $bMatch ) $aRet[] = $sTemplate;\n\t\t}\n\t\t\n\t\treturn $aRet;\n\t}", "function _get_templates()\n\t{\n\t\t$location = FILESYSTEM_PATH .'modules/customcats/templates/cattemplates/';\n\t\t$filelist=array();\n\t\tif ($handle = opendir($location))\n\t\t{\n\t\t\twhile (false !== ($file = readdir($handle)))\n\t\t\t{\n\t\t\t\tif ($file != \".\" && $file != \"..\" && $file!=\".svn\" && $file!=\"index.htm\")\n\t\t\t\t{\n\t\t\t\t\t$filelist[]=$file;\n\t\t\t\t}\n\t\t\t}\n \t\t\tclosedir($handle);\n\t\t}\n\t\treturn $filelist;\n\t}", "public function get_templates()\n {\n $template = new MailTemplate();\n return $template->findAll();\n }", "public function getTemplates()\n {\n $finder = Finder::create()\n ->files()\n ->name('*.sql')\n ->in($this->rootDir.'/../templates')\n ;\n\n $templates = [];\n\n /** @var SplFileInfo $file */\n foreach ($finder as $file) {\n $templates[] = $file->getRelativePathname();\n }\n\n return $templates;\n }", "public function index() {\n $templates = Template::all();\n return $templates;\n }", "public function viewProvider()\n {\n $config = $this->getMartyConfig();\n $templateDir = $config['templateDir'];\n $templates = [];\n $it = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($templateDir));\n /** @var \\SplFileInfo $file */\n foreach ($it as $file) {\n if ($file->isFile() && $file->getExtension() == 'tpl') {\n $templateName = substr($file->getPathname(), strlen($templateDir) + 1);\n $templateId = str_replace(['/', '.tpl'], ['.', ''], $templateName);\n $templates[$templateId] = [$templateName];\n }\n }\n\n return $templates;\n }", "public static function msgTemplatesList(){\n $accessToken = WxApi::accessToken();\n $offset = 0;\n $count = 5;\n $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=' . $accessToken;\n $postFields = json_encode(array(\n // \"access_token\" => $accessToken,\n \"offset\" => 0,\n \"count\" => 5,\n ));\n $api = curl_init();\n curl_setopt($api, CURLOPT_URL, $url);\n curl_setopt($api, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($api, CURLOPT_HEADER, false);\n curl_setopt($api, CURLOPT_POST, true);\n curl_setopt($api, CURLOPT_POSTFIELDS, $postFields);\n $listObj = curl_exec($api);\n curl_close($api);\n $listObj = json_decode($listObj);\n if($listObj->errcode != 0){\n return NULL;\n }else{\n return $listObj->list;\n // return json_encode($listObj->list);\n }\n }", "public function getAllTemplates() {\n $pages = Templates::templates()->get();\n\n return response()->json($pages);\n }", "public function getTemplates()\n {\n $templates = SSViewer::get_templates_by_class(static::class, '', __CLASS__);\n // Prefer any custom template\n if ($this->getTemplate()) {\n array_unshift($templates, $this->getTemplate());\n }\n return $templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "public function getChildren()\r\n\t{\r\n\t\t/* @var $adminTemplateModel XenForo_Model_AdminTemplate */\r\n\t\t$adminTemplateModel = XenForo_Model::create('XenForo_Model_AdminTemplate');\r\n\t\t$addon = $this->_addonId;\r\n\r\n\t\t$output = array();\r\n\t\tforeach ($adminTemplateModel->getAdminTemplatesByAddOn($addon) as $title => $template)\r\n\t\t{\r\n\t\t\t$output[] = new GeekPoint_AdminDAVi_File_AdminTemplate($addon, $title, $template);\r\n\t\t}\r\n\r\n\t\treturn $output;\r\n\t}", "private function find_templates () {\r\n\t\t$results = array();\r\n\r\n\t\t$files = WooDojo_Utils::glob_php( '*.php', GLOB_MARK, $this->templates_dir );\r\n\r\n\t\tif ( is_array( $files ) && count( $files ) > 0 ) {\r\n\t\t\tforeach ( $files as $k => $v ) {\r\n\t\t\t\t$data = $this->get_template_data( $v );\r\n\t\t\t\tif ( is_object( $data ) && isset( $data->title ) ) {\r\n\t\t\t\t\t$results[$v] = $data->title;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $results;\r\n\t}", "public function getPackProducts($presenter){\n $pack_items = Pack::isPack($this->product->id) ? Pack::getItemTable($this->product->id, $this->context->language->id, true) : [];\n $assembler = new ProductAssembler($this->context);\n\n $presentedPackItems = [];\n foreach ($pack_items as $item) {\n $presentedPackItems[] = $presenter->present(\n $this->getProductPresentationSettings(),\n $assembler->assembleProduct($item),\n $this->context->language\n );\n }\n\n return $presentedPackItems;\n }", "private function getPlatesFolders(): array\r\n {\r\n $folders = $this->template->getFolders();\r\n $r = new \\ReflectionProperty($folders, 'folders');\r\n $r->setAccessible(true);\r\n \r\n return $r->getValue($folders);\r\n }", "public function getAllSMSTemplates()\n {\n $selectTempsql = 'SELECT temp_id, temp_name FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $selectTempsql .= ' WHERE 1 Order By temp_name ASC';\n $templateRes = Db::getInstance()->ExecuteS($selectTempsql);\n return $templateRes;\n }", "public function getAllTemplates(){ //return all templates in database to the select to choose from templates\n return TemplatesResource::collection(TemplateProject::all());\n }", "public function getTemplates() {\n $pages = Templates::templates()->paginate(Templates::getPageSize());\n\n return response()->json($pages);\n }", "public function getPushoverTemplateDropdownValues()\n\t{\n\t\t$templates = [];\n\n\t\t$finder = new FileFinder();\n\t\t$finder->setOption('name_regex', '/^.*\\.ss$/');\n\n $parent = $this->getFormParent();\n\t\t\n if (!$parent) {\n return [];\n }\n\n $pushoverTemplateDirectory = $parent->config()->get('pushover_template_directory');\n $templateDirectory = ModuleResourceLoader::resourcePath($pushoverTemplateDirectory);\n\n if (!$templateDirectory) {\n\t\t\treturn [];\n }\n\t\t\n $found = $finder->find(BASE_PATH . DIRECTORY_SEPARATOR . $templateDirectory);\n\n\t\tforeach ($found as $key => $value) {\n\t\t\t$template = pathinfo($value);\n $absoluteFilename = $template['dirname'] . DIRECTORY_SEPARATOR . $template['filename'];\n\n // Optionally remove vendor/ path prefixes\n $resource = ModuleResourceLoader::singleton()->resolveResource($templateDirectory);\n if ($resource instanceof ModuleResource && $resource->getModule()) {\n $prefixToStrip = $resource->getModule()->getPath();\n } else {\n $prefixToStrip = BASE_PATH;\n }\n $templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);\n\n // Optionally remove \"templates/\" prefixes\n if (preg_match('/(?<=templates\\/).*$/', $templatePath, $matches)) {\n $templatePath = $matches[0];\n }\n\n $templates[$templatePath] = $template['filename'];\n }\n return $templates;\n\t}", "function getTemplates( $cwd = '.' ) {\n\n // New list\n $templates = array();\n\n // Use cache\n if ( !is_file( \"{$cwd}/tmp/cache/templates.cache\" ) ) {\n\n // Handle themes here\n $list = browse( \"{$cwd}/templates/\", false, true, false );\n\n // Loop\n foreach ( $list as $dir ) {\n\n // Definitions?\n if ( is_file( \"{$cwd}/templates/{$dir}/manifest.json\" ) ) {\n\n // Get json\n $loadedFile = json_decode( file_get_contents( \"{$cwd}/templates/{$dir}/manifest.json\" ), true );\n\n // Verify List - Do not append unless manifest is correct\n if ( !empty( $loadedFile[ 'name' ] ) && is_file( \"{$cwd}/templates/{$dir}/{$loadedFile['template']}\" ) ) {\n\n // This is JSON from the template\n $templates[ $dir ] = $loadedFile;\n\n // Add full path to the variable\n $templates[ $dir ][ 'path' ] = \"/templates/{$dir}\";\n\n }\n\n }\n\n }\n\n // Sort them ascending\n asort( $templates );\n\n // Store cache\n file_put_contents( \"{$cwd}/tmp/cache/templates.cache\", json_encode( $templates ) );\n\n } else {\n\n return json_decode( file_get_contents( \"{$cwd}/tmp/cache/templates.cache\" ), true );\n\n }\n\n return $templates;\n\n }", "protected function getTemplates()\r\n\t{\r\n\t\t$templates = array();\r\n\t\tforeach ($this->getProjectDao()->getAllModelTemplates() as $template)\r\n\t\t\t$templates[$template->ID] = $template->Template;\r\n\t\treturn $templates;\r\n\t}", "public function retrieveMessageTemplates()\n {\n return $this->start()->uri(\"/api/message/template\")\n ->get()\n ->go();\n }", "public static function getTemplateGroup($strPrefix)\n {\n $arrTemplates = array();\n\n // Get the default templates\n foreach (\\TemplateLoader::getPrefixedFiles($strPrefix) as $strTemplate)\n {\n $arrTemplates[$strTemplate][] = 'root';\n }\n\n $arrCustomized = glob(TL_ROOT . '/templates/' . $strPrefix . '*');\n\n // Add the customized templates\n if (is_array($arrCustomized))\n {\n foreach ($arrCustomized as $strFile)\n {\n $strTemplate = basename($strFile, strrchr($strFile, '.'));\n $arrTemplates[$strTemplate][] = $GLOBALS['TL_LANG']['MSC']['global'];\n }\n }\n\n // Show the template sources (see #6875)\n foreach ($arrTemplates as $k=>$v)\n {\n $arrTemplates[$k] = $k;\n }\n\n // Sort the template names\n ksort($arrTemplates);\n\n return $arrTemplates;\n }", "public function get_available_templates($contextid) {\n\n $fs = get_file_storage();\n $files = $fs->get_area_files($contextid, 'mod_surveypro', SURVEYPRO_TEMPLATEFILEAREA, 0, 'sortorder', false);\n if (empty($files)) {\n return array();\n }\n\n $templates = array();\n foreach ($files as $file) {\n $templates[] = $file;\n }\n\n return $templates;\n }", "public function GetSavedTemplates() {\n\t\t$templates = &drupal_static(__FUNCTION__, NULL, $this->reset);\n\n\t\tif (!isset($templates)) {\n\t\t\t$templates = db_select('{'.ACQUIA_COMPOSER_TEMPLATES_TABLE.'}', 'ac')\n\t\t\t\t->fields('ac')\n\t\t\t\t->execute()\n\t\t\t\t->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t\tif (!count($templates)) {\n\t\t\t\t$templates = array();\n\t\t\t}\n\t\t}\n\t\treturn $templates;\n\t}", "function getPrintTemplates(){\r\n require $this->sRessourcesFile;\r\n if (in_array(\"print_templates\", $this->aSelectedFields)){\r\n $aParams['sSchemaVmap'] = array('value' => $this->aProperties['schema_vmap'], 'type' => 'schema_name');\r\n $aParams['group_id'] = array('value' => $this->aValues['my_vitis_id'], 'type' => 'number');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getGroupPrintTemplates'], $aParams);\r\n\t\t$sListPrintTemplateId = \"\";\r\n\t\t$aListPrintTemplateName = array();\r\n\t\twhile($aLigne=$this->oConnection->oBd->ligneSuivante ($oPDOresult)) {\r\n\t\t\tif ($sListPrintTemplateId == \"\"){\r\n\t\t\t\t$sListPrintTemplateId = $aLigne[\"printtemplate_id\"];\r\n\t\t\t}else{\r\n\t\t\t\t$sListPrintTemplateId .= \"|\".$aLigne[\"printtemplate_id\"];\r\n\t\t\t}\r\n $aListPrintTemplateName[] = $aLigne[\"name\"];\r\n\t\t}\r\n\t\t$oPDOresult=$this->oConnection->oBd->fermeResultat();\r\n $this->aFields['print_templates'] = $sListPrintTemplateId;\r\n $this->aFields['print_templates_label'] = implode(',', $aListPrintTemplateName);\r\n }\r\n }", "public function get()\n {\n return $this->templates;\n }", "public function getAllScreenTemplates() {\n return $this->container->get('doctrine')\n ->getRepository('Os2DisplayCoreBundle:ScreenTemplate')\n ->findAll();\n }", "protected function getAvailableTemplates( )\n\t{\n\t\t$available_templates = $this->getConfig( 'templates' );\n\n\t\treturn $available_templates;\n\t}", "public function getWaiverTemplates()\n {\n $url = SmartwaiverRoutes::getWaiverTemplates();\n $this->sendGetRequest($url);\n\n try\n {\n // Map array data from API JSON response to a SmartwaiverWaiver object\n $templates = array_map(function ($data) {\n return new SmartwaiverTemplate($data);\n }, $this->lastResponse->responseData);\n }\n catch(InvalidArgumentException $e)\n {\n throw new SmartwaiverSDKException(\n $this->lastResponse->getGuzzleResponse(),\n $this->lastResponse->getGuzzleBody(),\n $e->getMessage()\n );\n }\n\n // Return array of retrieved templates\n return $templates;\n }", "public function getShowTemplates();", "function customcert_get_templates() {\n global $DB;\n\n return $DB->get_records_menu('customcert_template', array(), 'name ASC', 'id, name');\n}", "private function packageItems()\n {\n /**\n * Defined variables\n */\n $request = $this->getRequest();\n $paramNameRequest = $request->getParam('m');\n\n $packageName = str_replace('_', '/', $paramNameRequest);\n\n $searchCriteriaBuilder = $this->searchCriteria;\n $searchCriteria = $searchCriteriaBuilder->addFilter(\n 'name',\n $packageName,\n 'eq'\n )->create();\n $packagesFiles = $this->packagesRepository->getList($searchCriteria);\n $packagesItems = $packagesFiles->getItems();\n\n return $packagesItems;\n }", "function bp_attachments_get_template_stack( $stack = array() ) {\n\treturn array_merge( $stack, array( bp_attachments_get_templates_dir() ) );\n}", "public function fetchAll()\n {\n $templateTypeTable = new Api_Model_DbTable_TemplateType();\n\n $rowset = $templateTypeTable->fetchAll(null, 'name');\n\n $templateTypes = new Set();\n foreach ($rowset as $row) {\n $templateType = Type::factory($row);\n\n $templateTypes->addItem($templateType);\n }\n\n return $templateTypes;\n }", "function getAllPageTemplates() {\n global $wpdb;\n return $wpdb->get_col(\"SELECT DISTINCT meta_value FROM wp_postmeta WHERE meta_key = '_wp_page_template'\"); \n }", "public function getTemplates() : array\n {\n return [\n 'paths' => [\n 'elements' => [__DIR__ . '/../templates/'],\n ],\n ];\n }", "public function getPackageList() {\n return $this->packageDao->getPackageList();\n }", "public function getPackageList()\r\n {\r\n $directory = Mage::getBaseDir('design') . DS . 'frontend';\r\n return $this->_listDirectories($directory);\r\n }", "public function getAvailableTemplate()\r\n {\r\n $panels = $this->_panel->getCollection()\r\n ->addFieldToFilter('status', '1');\r\n $listPanel = array();\r\n foreach ($panels as $panel) {\r\n $listPanel[] = array('label' => $panel->getName(),\r\n 'value' => $panel->getId());\r\n }\r\n // echo 'test';\r\n // die();\r\n return $listPanel;\r\n }", "static public function listTemplates($type)\n {\n $templates = array();\n\n $_templates = Horde::loadConfiguration('templates.php', '_templates', 'whups');\n foreach ($_templates as $name => $info) {\n if ($info['type'] == $type) {\n $templates[$name] = $info['name'];\n }\n }\n\n return $templates;\n }", "public function getTemplatesByPattern($pattern)\n {\n File::resolveFilepath($pattern);\n\n $templates = array();\n foreach ($this->_scriptdir as $dir) {\n if (true === is_array(glob($dir . DIRECTORY_SEPARATOR . $pattern))) {\n $templates = array_merge($templates, glob($dir . DIRECTORY_SEPARATOR . $pattern));\n }\n }\n\n return $templates;\n }", "public function getItemTemplates()\n\t{\n\t\treturn $this->getTemplateGroup('item_');\n\t}", "public static function getTemplatesUsed()\n {\n return static::$allTemplates;\n }", "public function getMailTemplates()\n {\n $arrTemplates = array();\n $objTemplates = Database::getInstance()->execute(\"SELECT id,name,category FROM tl_mail_templates ORDER BY category, name\");\n\n while( $objTemplates->next() )\n {\n if ($objTemplates->category == '')\n {\n $arrTemplates[$objTemplates->id] = $objTemplates->name;\n }\n else\n {\n $arrTemplates[$objTemplates->category][$objTemplates->id] = $objTemplates->name;\n }\n }\n\n return $arrTemplates;\n }", "public function get_template_parts()\n {\n }", "public function getTemplateNames() {\n\t\treturn array_keys(self::$_config->template->toArray());\n\t}", "public function getCreatedTemplates ()\n {\n // Get all the templates\n $table = DB::select('select id_template, name_template, created_at, icon from ezz_templates');\n return response()->json([\n 'templates' => $table\n ], 200);\n }", "public function getTemplateList($isMilestoneType=true)\n {\n $templateList = $this->tnaTemplateRepository->getByType($isMilestoneType);\n return $this->respondWithCollection($templateList, new TNATemplateTransformer, 'template list');\n }", "public function getTemplates()\n\t{\n\t\t$templates = [\n\t\t\t'br' => '<br/>',\n\t\t\t'e' => '',\n\t\t\t'i' => '',\n\t\t\t'p' => '<p><xsl:apply-templates/></p>',\n\t\t\t's' => ''\n\t\t];\n\n\t\tforeach ($this->configurator->tags as $tagName => $tag)\n\t\t{\n\t\t\tif (isset($tag->template))\n\t\t\t{\n\t\t\t\t$templates[$tagName] = (string) $tag->template;\n\t\t\t}\n\t\t}\n\n\t\tksort($templates);\n\n\t\treturn $templates;\n\t}", "public function getAllPacks( array $a = array() ){\r\n\t\t$limit = MAX_DISPLAY_COUNT; $start =0; $orderBy = ' ORDER BY pack_id DESC '; $where ='';\r\n\r\n\t\tif( isset($a['limit']) && $a['limit'] != '' ){\r\n\t\t\t$limit = (int)$a['limit'];\r\n\t\t}\r\n\t\t\r\n\t\tif( isset($a['orderby']) && $a['orderby'] != '' ){\r\n\t\t\t$orderBy = $a['orderby'];\r\n\t\t}\r\n\r\n\t\tif( isset($a['start']) && $a['start'] != '' ){\r\n\t\t\t$start = (int)$a['start'];\r\n\t\t}\r\n\t\t\t\r\n\t\tif( isset($a['where']) && $a['where'] != '' ){\r\n\t\t\t$where .= $a['where'];\r\n\t\t}\r\n\t\t\t$where .= \" AND status!='-1' \";\r\n\t\t\r\n\t\t$this->sSql = \"SELECT * FROM `pack_mstr` WHERE 1 $where $orderBy LIMIT $start, $limit\";\r\n\t\t$res = $this->oMysqli->query( $this->sSql );\r\n\t\treturn $res;\r\n\t}", "function tidyt_get_simple_feed_templates($name){\n $templates = array();\n $paged = array();\n\n $paged = tidyt_get_paged_template_functions($name);\n\n $templates = array_merge($paged, $templates);\n\n return $templates;\n}", "public function getTemplateListByCategories ( )\n {\n $categories = $this->categoryDao->getCategories();\n $lang = OW::getLanguage();\n \n $list = array();\n foreach ( $categories as $cat )\n {\n $tpls = $this->findTemplatesByCategory($cat->id);\n \n if ( !$tpls )\n {\n continue;\n }\n \n $tplList = array();\n foreach ( $tpls as $tpl )\n {\n $tplList[$tpl->id] = array(\n 'id' => $tpl->id,\n 'categoryId' => $tpl->categoryId, \n 'price' => floatval($tpl->price), \n 'imageUrl' => $this->getGiftFileUrl($tpl->id, $tpl->uploadTimestamp, $tpl->extension)\n );\n }\n \n $list[$cat->id] = array(\n 'title' => $lang->text('virtualgifts', 'category_'.$cat->id),\n 'tpls' => $tplList\n );\n }\n \n return $list;\n }", "public function get_post_templates()\n {\n }", "public function getTemplatesFromDB();", "public function getAll()\n {\n return $this->database->getAll('Extension', 'slicerpackages');\n }", "function GetDocumentTemplates()\n\t{\n\t\t$result = $this->sendRequest(\"GetDocumentTemplates\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function medigroup_mikado_blog_templates() {\n\n $templates = array();\n $grid_templates = medigroup_mikado_blog_grid_types();\n $full_templates = medigroup_mikado_blog_full_width_types();\n foreach($grid_templates as $grid_template) {\n array_push($templates, 'blog-'.$grid_template);\n }\n foreach($full_templates as $full_template) {\n array_push($templates, 'blog-'.$full_template);\n }\n\n return $templates;\n\n }", "public static function all(): array\n {\n $it = new DirectoryIterator(plugins_path('/summer/login/skins'));\n $it->rewind();\n $result = [];\n foreach ($it as $fileinfo) {\n if (!$fileinfo->isDir() || $fileinfo->isDot()) {\n continue;\n }\n $theme = static::load($fileinfo->getFilename());\n $result[] = $theme;\n }\n return $result;\n }", "public function get_themes()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $folder = new Folder(self::PATH_THEMES);\n\n $theme_list = array();\n $folder_list = $folder->get_listing();\n\n foreach ($folder_list as $theme) {\n $file = new File(self::PATH_THEMES . '/' . $theme . '/info/info');\n\n if (!$file->exists())\n continue;\n\n // FIXME info/info -> deploy/info.php\n include self::PATH_THEMES . '/' . $theme . '/info/info';\n $theme_list[$theme] = $package;\n }\n\n // TODO: Sort by name, but key by theme directory\n return $theme_list;\n }", "public function getTemplates()\n {\n return [\n 'paths' => [\n 'app' => ['templates/app'],\n 'error' => ['templates/error'],\n 'layout' => ['templates/layout'],\n 'oauth' => ['templates/oauth'],\n ],\n ];\n }", "public function getTemplates($setId) {\n $select = $this->getDatabase()\n ->select()\n ->from(self::TEMPLATES_TABLE)\n ->where('statisticSetId = ?', $setId);\n\n $data = $select->fetchAll();\n\n $result = array();\n foreach ($data as $item) {\n $result[] = (int)$item['statisticTemplateId'];\n }\n\n return $result;\n }", "public function getPaths(): array\n {\n $templatePaths = [];\n\n $paths = $this->blade->getFinder()->getPaths();\n $hints = $this->blade->getFinder()->getHints();\n\n foreach ($paths as $path) {\n $templatePaths[] = new TemplatePath($path);\n }\n foreach ($hints as $namespace => $paths) {\n foreach ($paths as $path) {\n $templatePaths[] = new TemplatePath($path, $namespace);\n }\n }\n\n return array_reverse($templatePaths);\n }", "public function getStoneTemplateTypes() {\r\n\t\t//@TODO: Insert Stone Template Types into the datebase, create table\r\n\t\t$temp = array();\r\n\t\t\t$temp[1] = array('id' => 1, 'name' => 'Gemstone');\r\n\t\t\t$temp[2] = array('id' => 2, 'name' => 'Pearl');\r\n\t\t\t$temp[3] = array('id' => 3, 'name' => 'Diamond');\r\n\t\t\t$temp[4] = array('id' => 4, 'name' => 'Jadeite');\r\n\t\t\t$temp[5] = array('id' => 5, 'name' => 'Opal');\r\n\t\treturn $temp;\r\n\r\n\t}", "public function getPack()\n {\n return $this->get(self::_PACK);\n }", "public function getTemplates()\n {\n return [\n 'paths' => [\n 'app' => [__DIR__ . '/../templates/app'],\n 'error' => [__DIR__ . '/../templates/error'],\n 'layout' => [__DIR__ . '/../templates/layout'],\n 'mail' => [__DIR__ . '/../templates/mail'],\n ],\n ];\n }", "function campaignTemplates() {\n $params = array();\n return $this->callServer(\"campaignTemplates\", $params);\n }", "public function getTemplates()\n {\n return $this->hasMany(Template::className(), ['atk_id' => 'id']);\n }", "public function getImports();", "function skcw_get_templates_list() {\n\tif (!empty($_GET['page']) && $_GET['page'] == 'code-to-widget') { return; }\n\t$template_path = get_option('skcw_template_directory');\n\tif (empty($template_path)) { return false; }\n\n\t$templates = wp_cache_get('skcw_templates', 'skcw_templates');\n\tif (!is_array($templates) || empty($templates)) {\n\t\t$templates = array();\n\t}\n\telse {\n\t\treturn $templates;\n\t}\n\t\n\t$templ_dir = @opendir($template_path);\n\tif (!$templ_dir) { return false; }\n\t\n\twhile (($file = readdir($templ_dir)) !== false) {\n\t\tif (is_file(trailingslashit($template_path).$file) && is_readable(trailingslashit($template_path).$file)) {\n\t\t\t$template_data = file_get_contents(trailingslashit($template_path).$file);\n\t\t\tif (preg_match('|Widget Name: (.*)$|mi', $template_data, $widget_name)) {\n\t\t\t\t$widget_name = $widget_name[1];\n\t\t\t}\n\t\t\tif (preg_match('|Widget Description: (.*)$|mi', $template_data, $widget_description)) {\n\t\t\t\t$widget_description = $widget_description[1];\n\t\t\t}\n\t\t\tif (preg_match('|Widget Title: (.*)$|mi', $template_data, $widget_title)) {\n\t\t\t\t$widget_title = $widget_title[1];\n\t\t\t}\n\t\t\tif (!empty($widget_name) && !empty($widget_description)) {\n\t\t\t\t$widget_classname = sanitize_title('skcw-'.$widget_name);\n\t\t\t\t$templates[$widget_classname] = array(\n\t\t\t\t\t\t'file' => $file,\n\t\t\t\t\t\t'widget_name' => $widget_name,\n\t\t\t\t\t\t'widget_classname' => $widget_classname,\n\t\t\t\t\t\t'widget_description' => $widget_description,\n\t\t\t\t\t\t'widget_title' => $widget_title\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\t@closedir($templ_dir);\n\tupdate_option('skcw_templates_list',$templates);\n\twp_cache_set('skcw_templates', $templates, 'skcw_templates');\n\treturn is_array($templates) ? $templates : false;\n}", "function GetTemplates($userid=0)\n\t{\n\t\t$this->GetDb();\n\n\t\t$qry = \"SELECT templateid, name, ownerid FROM \" \n\t\t . SENDSTUDIO_TABLEPREFIX \n\t\t . \"templates\";\n\t\t\n\t\tif ($userid) {\n\t\t\t$qry .= \" AS t, \" . SENDSTUDIO_TABLEPREFIX \n\t\t\t . \" usergroups_access AS a \"\n\t\t\t . \" WHERE \"\n\t\t\t . \" a.resourceid = t.templateid AND \" \n\t\t\t . \" a.resourcetype = 'templates' \";\n\t\t\t$qry .= \" OR t.ownerid='\" . $this->Db->Quote($userid) . \"'\";\n\t\t} else {\n\t\t\tif (!$this->TemplateAdmin()) {\n\t\t\t\t$qry .= \" WHERE ownerid='\" . $this->Db->Quote($this->userid) . \"'\";\n\t\t\t\t\n\t\t\t\tif (!empty($this->access['templates'])) {\n\t\t\t\t\t$qry .= \" OR templateid IN (\" . implode(',', $this->access['templates']) . \")\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$qry .= \" OR isglobal='1'\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$qry .= \" ORDER BY LOWER(name) ASC\";\n\n\t\t$templates = array();\n\t\t$result = $this->Db->Query($qry);\n\t\t\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t$templates[$row['templateid']] = $row['name'];\n\t\t}\n\n\t\treturn $templates;\n\t}", "public function getModulTemplates()\n\t{\n\t\treturn $this->getTemplateGroup('mod_bn_');\n\t}", "private function findTemplates($path) {\n $dir_iterator = new \\RecursiveDirectoryIterator($path, \\RecursiveDirectoryIterator::FOLLOW_SYMLINKS);\n $iterator = new \\RecursiveIteratorIterator($dir_iterator, \\RecursiveIteratorIterator::SELF_FIRST);\n\n $screens = [];\n $slides = [];\n foreach ($iterator as $info) {\n $pathName = $info->getPathname();\n\n if (pathinfo($pathName, PATHINFO_EXTENSION) == 'json' && strpos($pathName, '/templates/') > -1) {\n if (strpos($pathName, '/slides/') > -1) {\n $slides[] = $pathName;\n }\n else if (strpos($pathName, '/screens/') > -1) {\n $screens[] = $pathName;\n }\n }\n }\n\n return [\n 'screens' => $screens,\n 'slides' => $slides,\n ];\n }", "public function getGathercontentTemplate();", "public static function get_available_templates( $type ) {\n $paths = glob( get_template_directory() . \"/portfolio/$type*.php\" );\n $names = array();\n\n foreach ( $paths as $path ) {\n $file_data = get_file_data( $path, array( 'Portfolio Style' ) );\n $names[] = $file_data[0];\n }\n\n return $names;\n }", "protected function resolveTemplate($template)\n {\n $blocks = array();\n foreach ($template->getBlockNames() as $name) {\n $blocks[$name] = $template;\n }\n\n return $blocks;\n }", "public function getPackages()\n {\n $packages = $this->getShipment()->getPackages();\n if (!$packages) {\n return [];\n }\n return $this->json->unserialize($packages);\n }", "public function getTiles() {\n\t\t$tiles = $this->repository->getTiles();\n\n\t\treturn $tiles;\n\t}", "protected function templatesSelectList(){\n $selectList = array('' => 'Default (Vertical List)');\n foreach( $this->templateAndDirectoryList() AS $fileSystemHandle => $path ){\n if( strpos($fileSystemHandle, '.') !== false ){\n $selectList[ $fileSystemHandle ] = substr($this->getHelper('text')->unhandle($fileSystemHandle), 0, strrpos($fileSystemHandle, '.'));\n }else{\n $selectList[ $fileSystemHandle ] = $this->getHelper('text')->unhandle($fileSystemHandle);\n }\n }\n return $selectList;\n }", "public static function allBundles(): Collection;", "private function get_packing_items() {\n\t\t$product_pane = $this->dom->find( '#j-product-desc' );\n\t\tif ( ! $product_pane ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$packaging_list = $product_pane[0]->find( '.product-packaging-list' );\n\t\tif ( ! $packaging_list ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$items = $packaging_list[0]->find( 'li.packaging-item' );\n\t\tif ( ! $items ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn $items;\n\t}", "function voyage_mikado_blog_templates() {\n\n $templates = array();\n $grid_templates = voyage_mikado_blog_grid_types();\n $full_templates = voyage_mikado_blog_full_width_types();\n foreach($grid_templates as $grid_template) {\n array_push($templates, 'blog-'.$grid_template);\n }\n foreach($full_templates as $full_template) {\n array_push($templates, 'blog-'.$full_template);\n }\n\n return $templates;\n\n }", "public static function getModules(){\n if(!function_exists('the_flexible_field') || !function_exists('get_row_layout')) return;\n while(the_flexible_field('underpin_flex_content')) TemplateLoader::getTemplate(str_replace('_', '-', get_row_layout()));\n }", "function templates()\r\n\t{\r\n\t\t$websitepath = $this->website_path;\r\n\t\t$theme = $this->theme;\r\n\t\t$directory = $_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.'';\r\n\t\tif(file_exists($directory))\r\n\t\t{\r\n\t\t\tif ($handle = opendir($_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.'')) { \r\n\t\t\t\t$i = 0;\r\n\t\t\t\twhile (false !== ($file = readdir($handle)))\r\n\t\t\t\t{ \r\n\t\t\t\t\tif ($file != \".\" && $file != \"..\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(!is_dir($_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file.''))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$myFile = $_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file;\r\n\t\t\t\t\t\t\t$fh = fopen($myFile, 'r');\r\n\t\t\t\t\t\t\t$theData = fread($fh, 5000);\r\n\t\t\t\t\t\t\tfclose($fh);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$pos = strrpos($theData, \"{{{{{KSD Template\");\r\n\t\t\t\t\t\t\tif ($pos === false) { // note: three equal signs\r\n\t\t\t\t\t\t\t\t//die(\"Not a template.\");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$array1 = explode(\"}}}}}\",$theData);\r\n\t\t\t\t\t\t\t\t$array2 = explode(\"{{{{{\",$array1[0]);\r\n\t\t\t\t\t\t\t\t$data = $array2[1];\r\n\t\t\t\t\t\t\t\t$array3 = explode(\",\",$data);\r\n\t\t\t\t\t\t\t\t$filearray[$i]['file'] = $file; \r\n\t\t\t\t\t\t\t\t$filearray[$i]['name'] = $array3[1]; \r\n\t\t\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}// END while\t\r\n\t\t\t\tclosedir($handle);\r\n\t\t\t} \r\n\t\t} else {\r\n\t\t\techo(\"$directory <br />NOT EXISTS\");\r\n\t\t}\r\n\t\treturn $filearray;\r\n\t}", "public function getPackages(): array\n {\n return $this->packagesClasses;\n }", "public function listPackages()\n {\n return $this->_access->getPackageList()->listPackages();\n }", "function wpsl_get_templates() {\n\n $templates = array(\n array(\n 'id' => 'default',\n 'name' => __( 'Default', 'wpsl' ),\n 'path' => WPSL_PLUGIN_DIR . 'frontend/templates/default.php'\n ),\n array(\n 'id' => 'below_map',\n 'name' => __( 'Show the store list below the map', 'wpsl' ),\n 'path' => WPSL_PLUGIN_DIR . 'frontend/templates/store-listings-below.php'\n )\n );\n\n return apply_filters( 'wpsl_templates', $templates );\n}", "public function getEnabledSlideTemplates() {\n return $this->container->get('doctrine')\n ->getRepository('Os2DisplayCoreBundle:SlideTemplate')\n ->findByEnabled(TRUE);\n }", "public function getPackages()\n {\n $packages = array();\n foreach( $this->getCategories() as $category ) {\n $packages[ $category->name ] = $category->getPackages();\n }\n return $packages;\n }", "protected function _loadTemplates()\n {\n $this->_tpl = array();\n $dir = Solar_Class::dir($this, 'Data');\n $list = glob($dir . '*.php');\n foreach ($list as $file) {\n \n // strip .php off the end of the file name to get the key\n $key = substr(basename($file), 0, -4);\n \n // load the file template\n $this->_tpl[$key] = file_get_contents($file);\n \n // we need to add the php-open tag ourselves, instead of\n // having it in the template file, becuase the PEAR packager\n // complains about parsing the skeleton code.\n // \n // however, only do this on non-view files.\n if (substr($key, 0, 4) != 'view') {\n $this->_tpl[$key] = \"<?php\\n\" . $this->_tpl[$key];\n }\n }\n }", "public function retrieveEmailTemplates()\n {\n return $this->start()->uri(\"/api/email/template\")\n ->get()\n ->go();\n }", "public function getEmailTemplates()\n {\n try {\n return json_decode($this->filesystem->get($this->storagePath));\n } catch (Exception $e) {\n return [];\n }\n }" ]
[ "0.6702066", "0.66720784", "0.64137053", "0.6387438", "0.6259804", "0.62138903", "0.6208592", "0.6207784", "0.61945754", "0.6194118", "0.61514205", "0.60846865", "0.6058789", "0.6031115", "0.60243315", "0.598843", "0.5973893", "0.59452254", "0.59452254", "0.59428704", "0.59198046", "0.59183294", "0.5910602", "0.58981436", "0.58761686", "0.58759415", "0.5874771", "0.58722156", "0.5847496", "0.5755458", "0.57373595", "0.57235783", "0.5706797", "0.56753445", "0.56593615", "0.56195986", "0.56121624", "0.55924046", "0.5589392", "0.5584632", "0.5574304", "0.55569834", "0.5552683", "0.55525833", "0.5539512", "0.55347586", "0.5524457", "0.5513005", "0.55100566", "0.5506283", "0.5485137", "0.54617095", "0.54235506", "0.5420748", "0.5419862", "0.5411052", "0.54077923", "0.54075575", "0.540735", "0.54018277", "0.5394365", "0.5384558", "0.53826535", "0.5369083", "0.53572285", "0.5336267", "0.53295064", "0.5313049", "0.5311515", "0.5306564", "0.5303704", "0.5299298", "0.5298016", "0.52974856", "0.5297235", "0.5296998", "0.52875215", "0.5287033", "0.52776784", "0.52774465", "0.52597314", "0.5259565", "0.5250279", "0.52381337", "0.5234839", "0.5228526", "0.52080846", "0.5208075", "0.5203898", "0.51999915", "0.51994354", "0.5196475", "0.5177325", "0.5175061", "0.5175031", "0.51704824", "0.51679564", "0.51648587", "0.51621467", "0.51497114" ]
0.73900837
0
Initialize a Clock object
protected function setUp() { $this->clock = new Clock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clock(): Clock\n {\n return new Clock($this);\n }", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'truman_sign_clock_widget',\n\t\t\t__( 'Clock Widget', 'truman-digital-sign-theme' ),\n\t\t\tarray( 'description' => __( 'Shows a clock with time and date', 'truman-digital-sign-theme' ), )\n\t\t);\n\t}", "public function __construct()\n {\n $this->dateTime = new Time('now', 'Asia/Jakarta', 'id_ID');\n }", "public function __construct() {\n\t\t$this->startTime = self::getMicrotime();\n\t}", "public function __construct() {\n $widget_options = array( 'classname' => 'clock_widget', 'description' => 'The Wordpress Clock Widget' );\n parent::__construct( 'clock_widget', 'Wordpress Clock Widget', $widget_options );\n }", "public function __construct($arg, Clock $clock= null) {\n if ($arg instanceof Rate) {\n $this->rate= $arg;\n } else {\n $this->rate= new Rate($arg, Per::$SECOND);\n }\n $this->clock= $clock ?: new SystemClock();\n }", "public static function init_timer()\n {\n if (!isset(self::$timer)) {\n $time_now = self::get_miliseconds_now();\n self::$timer = new TimerModel($time_now);\n }\n }", "private function __construct()\n {\n $this->time = time();\n }", "public function __construct() {\n $this->time = time();\n }", "public static function create(int $clock, int $rand): self\n {\n return new self($clock, $rand);\n }", "protected function initializeTimeTracker() {}", "public function __construct()\n {\n $this->_timeStart = (float)microtime(true); \n parent::__construct();\n }", "public function __construct()\n {\n $this->startTime = microtime(true);\n parent::__construct();\n }", "protected function _initTimer()\n {\n $this->_timer->reset();\n $timeout = $this->_options[self::OPT_FIRST_DIGIT_TIMEOUT];\n $this->_timer->setOptions( array( Streamwide_Engine_Timer_Timeout::OPT_DELAY => $timeout ) );\n }", "function __construct() {\n\t\t$this->time = time();\n\t\t$this->startSession();\n\t}", "public function __construct()\n {\n $this->local_time = time();\n }", "function __construct() {\n $this->start_time = microtime(true);\n }", "public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "public function __construct($type = 0, $time = null) {\n \n $this->setType($type);\n $this->startedAt = false;\n $this->stoppedAt = false;\n \n parent::__construct($time);\n }", "public function __construct()\n {\n $timeStamp = time();\n $month = date('n', $timeStamp);\n $year = date('Y', $timeStamp);\n $this->calendarMonth = new CalendarMonth($month, $year);\n }", "protected function __construct() {\n\t\t\t$objSystemTimezone = new DateTimeZone(date_default_timezone_get());\n\t\t\t$this->intSystemOffset = $objSystemTimezone->getOffset(new DateTime('now', new DateTimeZone('Europe/London'))) - (date('I') * 3600);\n\t\t}", "public function __construct(Time $time)\n {\n parent::__construct();\n $this->time = $time;\n }", "public function __construct()\n\t{\n\t\t$this->setTimeStamp();\n\t}", "public function __construct()\n {\n $this->startedAt = Date::now();\n\n parent::__construct();\n }", "public function __construct()\n\t{\n\t\tsession_start();\n\t\t$this->timer = microtime();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->timestamp = time();\n\t}", "public function __construct( DateTime $currentTime, DateTime $testTime)\n\t{\t\n\t\t$this->difference = $currentTime->getTimestamp() - $testTime->getTimestamp();\n $this->thiss = $this;\n\t\t$current = IntlCalendar::fromDateTime($currentTime,null);\n\t\t$time = IntlCalendar::fromDateTime($testTime,null)->getTime();\n\n\t\t$this->currentTime = $current;\n\t\t$this->testTime = $time;\n\t}", "public function __construct(\n StateManagerInterface $state_manager,\n TimeInterface $time\n ) {\n $this->stateManager = $state_manager;\n $this->time = $time;\n }", "public function __construct() {\n $round = apc_fetch('game_round');\n if ($round === false) {\n $this->start_round();\n }\n\n $board = apc_fetch('game_board');\n if ($board === false) {\n $board = $this->__reload_board($round);\n }\n \n $this->_BOARD = $board;\n $this->_ROUND = $round;\n }", "protected function setUp() {\n $this->object = new pTime(10, 20, 5, 100);\n }", "public function __construct()\n {\n $this->dateTimeZone = SettingFacade::get('app_timezone');\n }", "function ___init () { if ( isset ( $this->glob->config['website']['time-zone'] ) )\r\n $this->glob->date = new DateTime ( null, new DateTimeZone ( $this->glob->config['website']['time-zone'] ) ) ;\r\n else // No? Just use the server's time-zone\r\n $this->glob->date = new DateTime ( null ) ;\r\n\r\n $this->_register_resource ( XS_MODULE, '_api/modules/datetime' ) ;\r\n \r\n }", "public function __construct()\n {\n $this->setLockedSince(new \\DateTime(\"0000-00-00 00:00:00\"));\n $this->setCreated(new \\DateTime());\n $this->setModified(new \\DateTime());\n $this->setLastError(new \\DateTime(\"0000-00-00 00:00:00\"));\n $this->hasError = false;\n $this->isActive = true;\n $this->lastRunTime = 0;\n $this->notifyOnError = true;\n }", "protected function __construct() \n {\n // We want to our daemon to tick once every 1 second.\n $this->loop_interval = 1.00;\n\n // Set our Lock Provider\n $this->plugin('lock', new Core_Lock_File($this));\n $this->lock->daemon_name = __CLASS__;\n $this->lock->ttl = $this->loop_interval;\n $this->lock->path = '/var/run/';\n\n $this->plugin('ini', new Core_Plugin_Ini());\n $this->ini->filename = 'vigu.ini';\n\n parent::__construct();\n }", "public function getSmallVClock() {}", "function initialize() {\n $this->set_openingtag(\"<TIME[attributes]>\");\n $this->set_closingtag(\"</TIME\");\n }", "function __construct() {\n\t\t// TODO: Form validation on number text box\n\t\t$minutes = $_POST['time']; // Grab number of minutes from input box named 'time'\n\t\t$seconds = 59; // Init seconds at 59\n\t\tcountdown($minutes, $seconds); // Starts countdown\n\t}", "function __construct() {\n parent::__construct();\n \n date_default_timezone_set('Europe/London');\n \n $this->updateTime = date('Y-m-d H:m:s', strtotime('now'));\n \n\n }", "public function _construct() {\n if (!self::$lastExecutionTime)\n self::$lastExecutionTime = time();\n }", "public function __construct($options = null) {\n Configurator::configure($this, $options);\n $this->criadoEm = new \\DateTime('now');\n $this->criadoEm->setTimezone(new \\DateTimeZone('America/Sao_Paulo'));\n $this->alteradoEm = new \\DateTime('now');\n $this->alteradoEm->setTimezone(new \\DateTimeZone('America/Sao_Paulo')); \n }", "public static function GetClock() {\n\n\t\t$params = array(\n\t\t\t\"fct\" => \"getclock\",\n\t\t);\n\n\t\treturn self::sendRequestAndGetObject( $params );\n\t}", "function clock_start($key = 'main') {\n $time = explode(' ', microtime());\n $start = (float)$time[0] + (float)$time[1];\n $GLOBALS['_clock_'][$key]['start'] = $start;\n return $start;\n }", "public function clockIn(): ClockInRequestBuilder {\n return new ClockInRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public static function get(): Timer\n {\n return new self();\n }", "public function __construct(Container $container) {\n parent::__construct($container);\n $this->_container = $container->get(TimerContainer::class);\n }", "public function init()\n {\n $this->hoje = new DateTime('now');\n $this->diasBaseLine = $this->numdiasbaseline;\n $this->diasReal = $this->numdiasrealizados;\n }", "public function testStart() {\n $timer = new timer( false );\n\n // It should return a starting number\n $this->assertGreaterThan( 0, $timer->start() );\n\t}", "public function construct(CakeEvent $event) {\n\t\t$this->__startTime = time();\n\t}", "public static function setUpBeforeClass()\n {\n // We use the ClockMock on Time class which is used on both sides of the test:\n // the test class and the tested class\n ClockMock::register(Time::class);\n }", "public function __construct(){\n\t\t$this->logged_in_date_time = time();\n\t}", "public function __construct($time = 'now', DateTimeZone $timezone = NULL)\n{\n\tif(is_int($time))$time=\"@$time\";if(is_array($time))$time=self::fromArray($time);if($timezone)parent::__construct($time, $timezone);else parent::__construct($time);\n}", "public function setSyncTime(): void\n {\n }", "public function __construct() {\n\t\t\t$this->schedules = wp_get_schedules();\n\t\t}", "function __construct(){\r\n $this->timestamp = time();\r\n }", "public function __construct()\n {\n $this->repeatDays = array();\n $this->repeatExceptions = array();\n\n $this->repeatCount = 0;\n }", "public function __construct($time = null, $tz = null)\n {\n if ($time instanceof DateTimeInterface) {\n $time = $this->constructTimezoneFromDateTime($time, $tz)->format('Y-m-d H:i:s.u');\n }\n\n if (is_numeric($time) && (!\\is_string($time) || !preg_match('/^\\d{1,14}$/', $time))) {\n $time = static::createFromTimestampUTC($time)->format('Y-m-d\\TH:i:s.uP');\n }\n\n // If the class has a test now set and we are trying to create a now()\n // instance then override as required\n $isNow = empty($time) || $time === 'now';\n\n if (method_exists(static::class, 'hasTestNow') &&\n method_exists(static::class, 'getTestNow') &&\n static::hasTestNow() &&\n ($isNow || static::hasRelativeKeywords($time))\n ) {\n static::mockConstructorParameters($time, $tz);\n }\n\n // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127\n if (!str_contains((string) .1, '.')) {\n $locale = setlocale(LC_NUMERIC, '0'); // @codeCoverageIgnore\n setlocale(LC_NUMERIC, 'C'); // @codeCoverageIgnore\n }\n\n try {\n parent::__construct($time ?: 'now', static::safeCreateDateTimeZone($tz) ?: null);\n } catch (Exception $exception) {\n throw new InvalidFormatException($exception->getMessage(), 0, $exception);\n }\n\n $this->constructedObjectId = spl_object_hash($this);\n\n if (isset($locale)) {\n setlocale(LC_NUMERIC, $locale); // @codeCoverageIgnore\n }\n\n self::setLastErrors(parent::getLastErrors());\n }", "public function init()\n {\n\t\t$this->_temporizador = new Trf1_Admin_Timer ();\n\t\t$this->_temporizador->Inicio ();\n\t\t\n $this->view->titleBrowser = 'e-Sosti';\n }", "function __construct($start = FALSE)\n\t{\n\t\t$this->is_running = $start;\n\t\t$this->counter = 0;\n\t\tif( $start ){\n\t\t\t$this->running_since = self::timeMillisecondsAsFloat();\n\t\t}\n\t}", "public function __construct()\n {\n $this->middleware('auth');\n date_default_timezone_set('Asia/Bangkok');\n $this->curr_raw_time = getdate();\n $this->curr_date = $this->curr_raw_time['year'] . '-' . $this->curr_raw_time['mon'] . '-' . $this->curr_raw_time['mday'];\n $this->curr_date_time = $this->curr_raw_time['year'] . '-' . $this->curr_raw_time['mon'] . '-' . $this->curr_raw_time['mday'] . ' ' . $this->curr_raw_time['hours'] . ':' . $this->curr_raw_time['minutes'] . ':' . $this->curr_raw_time['seconds'];\n }", "public static function init()\n\t{\n\t\tCronJob::getInstance();\n\t}", "public function __construct()\n\t{\n\t\tdate_default_timezone_set('Asia/Shanghai'); //时区配置\n\t}", "public function __construct(){\n $this->Num_operacion = time();\n }", "protected function startTimer()\r\n\t{\r\n\t\tlist($usec, $sec) = explode(\" \",$this->time);\r\n\t\t$this->startTime = ((float)$usec + (float)$sec);\r\n\t\treturn;\r\n\t}", "public function __construct(Stopwatch $stopwatch = null)\n {\n if (isset($_SERVER[\"REQUEST_TIME_FLOAT\"])) {\n $this->start = $_SERVER[\"REQUEST_TIME_FLOAT\"];\n } else {\n $this->start = microtime(true);\n }\n\n if (null === $stopwatch) {\n $stopwatch = new Stopwatch;\n }\n $this->stopwatch = $stopwatch;\n }", "public static function set_login_times()\n {\n $sessiontime = self::get_miliseconds_now();\n\n $timer = &self::$timer;\n $timer->__set('session_start', $sessiontime);\n $timer->__set('session_checkpoint', $sessiontime);\n }", "public function init(){}", "public function init(){}", "public function getBigVClock() {}", "public function __construct()\n {\n\n $this->begindatum = new \\DateTime();\n $this->einddatum = new \\DateTime();\n\n }", "function timer(): Timer\n{\n return new Timer;\n}", "public function initialize()\n {\n if ($timezone = $this->session->get('identity-timezone')) {\n date_default_timezone_set($timezone);\n }\n }", "public function init()\n\t{ \n\t\t# Return if no countoff is needed\n\t\tif ($this->countoff<1) return;\n\t\t\n\t\t# initialize event array\n\t\t$this->events = array();\n\t\t\n\t\tif ($this->initRestTicks) {\n\t\t\t# Add a brief rest and then all notes off and all sound off to relevant channels here\n\t\t\tfor($ix=0; $ix<$this->track_total; $ix++) {\n\t\t\t\t$this->track_ix = $ix;\n\t\t\t\t\n\t\t\t\t# for all channels in this track\n\t\t\t\tforeach($this->channels[$this->track_ix] as $chan) {\n\t\t\t\t\t$this->addEvent(0,176+$chan,123,0);\n\t\t\t\t\t$this->addEvent(0,176+$chan,7,0);\n\t\t\t\t}\n\t\t\t\t$this->addEvent($this->initRestTicks,176+$this->channels[$this->track_ix][0],7,0);\n\t\t\t\t$this->addEvent($this->initRestTicks,176+$this->channels[$this->track_ix][0],7,$this->mVol);\n\t\t\t}\n\t\t}\n\t\t\n\t\t# Put in the initial countoff\n\t\tfor($i=0; $i<$this->timeSig; $i++) { \n\t\t\t$vol = ($i==0) ? 127 : 70;\n\t\t\t$this->addEvent(0,153,37,$vol);\n\t\t\t$this->addEvent($this->ticksPerBeat,153,37,0);\n\t\t}\n\t\t\n\t\t# record where this track starts for looping purposes\n\t\t$this->loopStart[$this->track_ix] = count($this->events[$this->track_ix]);\n\t}", "private function __construct(){\r\n $this->ttl_by_type = array(\r\n 'short' => 300 , // 5 minutes\r\n 'default' => 7200, // 2 hours\r\n 'halfday' => 43200, // 12 hours\r\n 'day' => 86400, // 24 hours\r\n 'week' => 604800, // 7 days\r\n 'month' => 2592000, // 30 days (1 month)\r\n 'longterm' => 15811200 // 183 days (6 months)\r\n );\r\n }", "public function TimerStart()\r\n\t{\r\n\t\t$parts = explode( \" \", microtime() );\r\n\t\t$this->time_diff = 0;\r\n\t\t$this->time_start = $parts[1].substr( $parts[0],1 );\r\n\t}", "public function __construct()\n {\n\n $time_zone= get_time_zone()->app_time_zone;\n date_default_timezone_set($time_zone);\n\n }", "public function __construct(float $time)\n {\n $this->time = $time;\n }", "public function __construct($options = null) {\n Configurator::configure($this, $options);\n $this->data = new \\DateTime('now');\n $this->data->setTimezone(new \\DateTimeZone('America/Sao_Paulo'));\n }", "public function __construct()\n {\n $this->_inotify = Watcher::getInstance();\n }", "final private function __construct()\n {\n \t$this->init();\n }", "public function __construct()\n {\n $now = new \\DateTime();\n $this->number = 'CR' . $now->format('Y') . $now->format('m') . '-';\n $this->dateCreation = new \\DateTime();\n $this->dateEnlevement = new \\DateTime();\n $this->heureEnlevement = new \\DateTime('14:00');\n $this->dateRetour = new \\DateTime('NOW + 2 day');\n $this->heureRetour = new \\DateTime('14:00');\n $this->effectue = false;\n $this->annule = false;\n $this->factureRecue = false;\n $this->mailSent = false;\n $this->nbJoursExploit = 1;\n $this->avecHayon = false;\n }", "public function __construct($timeslots)\n {\n $this->timeslots = $timeslots;\n }", "public function __construct()\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->start();\n\t\t\t\t}", "function __construct() {\t\t\n\t\t\t// start the session\n\t\t\tself::start();\n\t\t\t\n\t\t\t// get session expire time\n\t\t\t$expiretime = self::get('expiretime');\n\t\t\t\n\t\t\t//check session\t\t\n\t\t\tif(isset($expiretime)) {\n\t\t\t\tif(self::get('expiretime') < time()) {\n\t\t\t\t\tself::destroy();\t\t\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t//session time\n\t\t\t$minutes = SESSION_TIMEOUT;\n\t\t\t\n\t\t\t//set session time out\t\t\n\t\t\tself::set('expiretime', time() + ($minutes * 60));\n\t\t}", "public function __construct() {\n $this->startup= new Date('2018-06-02 14:12:11+0200');\n $this->responsible= new Person(1549, 'Timm');\n }", "public function __construct()\n {\n $this->_cronHelper = Mage::helper(self::XML_PATH_HELPER_CRON);\n }", "public function __construct()\n {\n // Observe o \\ antes da chamada da classe\n // Pois como DateTime é na nativa do PHP\n // não tem namespace\n $this->data_cli = new \\DateTime();\n }", "public function __construct($callback, $second = null, $minute = null, $hour = null, $day = null, $month = null, $dayOfWeek = null) {\n $this->setCallback($callback);\n $this->setRunInterval($second, $minute, $hour, $day, $month, $dayOfWeek);\n }", "protected function init()\n {\n if (null !== $this->config) {\n return;\n }\n\n $cache = $this->getCache();\n $cacheKey = $this->getCacheKey();\n\n if ($cache->isValid($cacheKey, $this->getTimestamp())) {\n $config = $cache->read($cacheKey);\n } else {\n $config = $this->parse();\n $cache->write($cacheKey, $config, $this->getPaths());\n }\n\n $this->config = new Config($config);\n }", "public static function initialize(){\n self::getInstance();\n }", "public function __construct($minute)\n {\n $this->minute = $minute;\n }", "public function __construct($timetable)\n {\n $this->timetable = $timetable;\n }", "function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t//Load database connection\n\t\t$this->load->database();\n\t\t$this->load->dbutil();\n\t\t$this->db->query('SET time_zone = \"+05:30\"');\n\t}", "public function startTimer(): void;", "public function init()\n\t{\n\t\t$this->_app = classes_like_registry::getApp();\n\t\t$this->_area = classes_like_registry::getArea();\n\t\t\n\t\tif ( empty( $this->_app ) OR empty( $this->_area ) )\n\t\t{\n\t\t\ttrigger_error( \"Missing area or app variable in \" . __CLASS__ . '::' . __FUNCTION__, E_USER_WARNING );\n\t\t}\n\t\t\n\t\t/* Fetch cache class */\n\t\t$this->likeCache = classes_like_cache::getInstance();\n\t\t\n\t\t/* Set a default cache expiration of 24 hours */\n\t\t$this->likeCache->setExpiration( 86400 );\n\t}", "public function __construct()\n {\n\t\tdate_default_timezone_set(get_option('timezone','Asia/Dhaka'));\n }", "public function __construct()\n {\n parent::__construct();\n $this->randTimeService = new RandTimeHadistService();\n }", "public function __construct() {\n $memcached = new Memcached();\n $memcached->addServer('localhost', 11211);\n\n $this->engine = new MemcachedCache();\n $this->engine->setMemcached($memcached);\n }", "private function __construct () {\n if (!isset(static::$tmrMsgClrIdx) || !isset(static::$tmrBgClrIdx)) {\n $cfgLst = parse_ini_string(File::get(self::CONFIG_FILE_PATH));\n static::$tmrMsgClrIdx = $cfgLst[\"tmrMsgClrIdx\"];\n static::$tmrBgClrIdx = $cfgLst[\"tmrBgClrIdx\"];\n }\n\n $this->clear();\n }", "function __construct()\n\t{\n\t\tparent::__construct();\n\t\tdate_default_timezone_set('Asia/Kolkata');\n\t}" ]
[ "0.73730755", "0.6262436", "0.6189736", "0.6167958", "0.61181885", "0.61118263", "0.60874856", "0.608563", "0.6036883", "0.585689", "0.5680372", "0.56660527", "0.5627869", "0.55383646", "0.5522139", "0.54826415", "0.54784256", "0.54743814", "0.54743814", "0.54647344", "0.54187334", "0.5365803", "0.5355274", "0.53193676", "0.5291396", "0.52852017", "0.5280804", "0.5280452", "0.52605116", "0.52586895", "0.5242015", "0.52242696", "0.52215147", "0.5204997", "0.5195909", "0.51943904", "0.51787317", "0.5175059", "0.51583487", "0.5152469", "0.51455593", "0.5143019", "0.5137379", "0.5130129", "0.5111109", "0.50952953", "0.50947964", "0.5083094", "0.50646347", "0.50582707", "0.5050216", "0.505021", "0.50427276", "0.50412625", "0.5038662", "0.50206244", "0.50100434", "0.5004259", "0.49963504", "0.499239", "0.4984473", "0.49788153", "0.49645308", "0.49544746", "0.49535623", "0.4951119", "0.49507025", "0.49507025", "0.49454987", "0.49358496", "0.49238226", "0.4920249", "0.4918906", "0.49087447", "0.4907252", "0.49057737", "0.4891416", "0.48877826", "0.48733652", "0.4866048", "0.4865229", "0.48644778", "0.48642826", "0.48633868", "0.48622897", "0.48610613", "0.48528644", "0.4846026", "0.48417637", "0.4841539", "0.4832361", "0.48290592", "0.48201096", "0.48199782", "0.4812935", "0.48121592", "0.4807547", "0.4804965", "0.48046103", "0.4802302" ]
0.5835274
10
Unset Clock object upon test completion
protected function tearDown() { $this->clock = NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endTest() {\n unset($this->CalendarRecursion);\n unset($this->CalendarInstance);\n unset($this->Activity);\n ClassRegistry::flush();\n }", "public function tearDown(): void\n {\n parent::tearDown();\n\n Carbon::setTestNow();\n }", "protected function tearDown()\n {\n $this->tgLog = null;\n }", "private function resetNow()\n {\n $this->now = time();\n }", "protected function tearDown()\n {\n $this->calculator = NULL;\n }", "public function testStop() {\n // It should return the elapse timed (not testing yet)\n $this->assertGreaterThan( 0, $this->timer->stop() );\n }", "protected function setUp()\n {\n $this->clock = new Clock();\n }", "public function resetTimer()\r\n\t{\r\n\t\t$this->last = microtime(true);\r\n\t}", "public function tearDown()\n {\n// StaticEventManager::resetInstance();\n }", "public function tearDown(): void\n {\n $this->object->reset();\n }", "public static function tearDownAfterClass() {\n self::$_producer->clear(60);\n\n self::$_producer = NULL;\n\n parent::tearDownAfterClass();\n }", "public function teardown()\n {\n //\n }", "protected function resetStartTime() : void\n {\n $this->startTime = time();\n }", "protected function tearDown() {\r\n $this->object = null;\r\n }", "public function teardown()\n {\n }", "public function tearDown(): void\n {\n\n \\delete_transient($this->cache_key);\n $this->cache_key = '';\n\n global $_wp_using_ext_object_cache;\n $_wp_using_ext_object_cache = false;\n\n // Then...\n parent::tearDown();\n }", "protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }", "public function unsetEndTime(): void\n {\n $this->endTime = [];\n }", "public function tearDown()\n {\n $this->object = null;\n }", "static public function tearDown() {\n\t\tself::clearMounts();\n\t\tself::$defaultInstance = null;\n\t}", "protected function tearDown()\n\t{\n\t\t$this->instance = null;\n\t}", "protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }", "protected function tearDown() {\n $this->object = null;\n }", "protected function tearDown() {\n $this->object = null;\n }", "public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::START_TIME] = null;\n $this->values[self::RUNNING_SECOND] = null;\n }", "public function reset()\n {\n $this->values[self::_ATTACK_TIMEOUT] = null;\n }", "public static function tearDown()\n {\n self::$instance = null;\n }", "protected function tearDown()\n {\n $this->cache->clear();\n }", "public function tearDown() {\n $this->container = null;\n }", "protected function tearDown()\n {\n $this->object = null;\n }", "protected function tearDown()\n {\n $this->object = null;\n }", "protected function tearDown()\n {\n $this->object = null;\n }", "protected function tearDown()\n {\n $this->object = null;\n }", "protected function tearDown()\n {\n $this->object = null;\n }", "protected function tearDown()\n {\n $this->object = null;\n }", "public function testReenable()\n {\n $mock = new Mock(\n __NAMESPACE__,\n \"time\",\n function () {\n return 1234;\n }\n );\n $mock->enable();\n $mock->disable();\n $mock->enable();\n $this->assertEquals(1234, time());\n }", "protected function tearDown()\n {\n Phlash::clear();\n }", "public function reset() {\n $this->startTime = 0;\n $this->endTime = 0;\n $this->pauseTime = 0;\n $this->totalTime = 0;\n $this->laps = array();\n $this->isRunning = false;\n $this->isPaused = false;\n $this->lapCount = 0;\n }", "public function delTimer(): bool {}", "public function finalize()\n {\n list($usec, $sec) = explode(' ', microtime());\n $micro = sprintf(\"%06d\", (float) $usec * 1000000);\n $when = new \\DateTime(date('Y-m-d H:i:s.' . $micro));\n $when->setTimezone(new \\DateTimeZone('UTC'));\n $this->finalTime = $when->format('Y-m-d\\TH:i:s.u\\Z');\n $this->isFinalState = true;\n }", "protected function tearDown()\n {\n time_nanosleep(10, 0);\n parent::tearDown(); // TODO: Change the autogenerated stub\n }", "public function testReset()\n {\n $this->todo('stub');\n }", "public function testReset()\n {\n $this->todo('stub');\n }", "public function testReset()\n {\n $this->todo('stub');\n }", "public function unsetScheduler() {}", "public function tearDown() {\n $this->transformation = null;\n }", "public function tearDown() {\n $this->transformation = null;\n }", "public function tearDown() {\n $this->transformation = null;\n }", "protected function tearDown(): void {\n unset($this->integration);\n unset($this->ccm);\n unset($this->session);\n }", "protected function tearDown(): void\n {\n app(Session::class)->invalidate();\n Routes::reset();\n Kernel::reset();\n }", "public function tearDown()\n\t{\n\t\tunset($this->stub);\n\t}", "public function tearDown()\n {\n Resistance::reset();\n }", "public static function tearDownAfterClass(): void\n {\n static::$queue = null; \n }", "protected function tearDown()\n\t{\n\t\tunset( $this->_mock, $this->_object );\n\t}", "public function tearDown() {\n $this->auth->logout();\n }", "protected function tearDown(): void\n {\n $client = $this->getProvidedData()[0] ?? null;\n if ($client instanceof Client) {\n $this->logout($client);\n }\n }", "public function tearDown(): void\n {\n // do somrthing after the benchmark\n }", "public static function tearDownAfterClass(): void\n {\n VCR::eject();\n VCR::turnOff();\n }", "public static function tearDownAfterClass(): void\n {\n VCR::eject();\n VCR::turnOff();\n }", "public function tearDown(): void\n {\n $this->api = null;\n parent::tearDown();\n }", "function __destruct() {\n if ($this->testDir) {\n $this->eraseTempDir();\n }\n $this->unsetMockSession();\n }", "public function reset(): void\n {\n $this->interval = null;\n $this->sesionSection->offsetUnset(static::INTERVAL);\n }", "public function tearDown()\n {\n $this->app = null;\n }", "public function tearDown()\n {\n $this->target = null;\n $this->mock = null;\n parent::tearDown();\n }", "public function tearDown() {\n $this->command = null;\n }", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset()\n {\n $this->values[self::_LAST_RESET_TIME] = null;\n $this->values[self::_TODAY_FREE_SWEEP_TIMES] = null;\n }", "public function tearDown() {\n\t\tunset($this->objectInstance);\n\t}", "protected function tearDown(): void\n {\n unset($this->object);\n }", "public function tearDown()\n {\n unset($this->VenusFuelDepot);\n }", "protected function tearDown()\n\t{\n\t\t$this->object = null;\n\t}", "protected function tearDown()\n\t{\n\t\t$this->object = null;\n\t}", "protected function tearDown()\n\t{\n\t\t$this->object = null;\n\t}", "protected function tearDown(): void\r\n {\r\n unset($this->queue);\r\n }", "function __destruct()\n {\n if (!$this->should_schedule()) {\n return;\n }\n $this->schedule();\n }", "public function tearDown()\n {\n $this->stop();\n }", "protected function tearDown() {\r\n\t\tparent::tearDown();\r\n\t\tunset ( $this->mockedCacheCleanerBuilder );\r\n\t\tunset ( $this->mockedEventDispatcher );\r\n\t\tunset ( $this->mockedEventQueue );\r\n\t\tunset ( $this->mockedEventRepository );\r\n\t\tunset ( $this->mockedTypo3DbBackend );\r\n\t\tunset ( $this->cacheEventHandler );\r\n\t}", "protected function doTearDown(): void\n {\n }", "protected function tearDown()\n\t{\n\t\t$this->Crypt_MCrypt = null;\n\t\tparent::tearDown();\n\t}", "protected function tearDown()\r\n {\r\n if ($this->object->isRegistered('null')) {\r\n $this->object->unregisterWrapper('null');\r\n }\r\n }", "public function reset()\n {\n $this->values[self::_USE_TIMES] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_TIMES] = null;\n }", "public function tearDown() \n\t{\n\t\tunset($this->sphere);\n\t}", "protected function tearDown() {\n spl_autoload_unregister('autoloadForTesting');\n unset($this->object);\n }", "protected function tearDown()\n {\n session_destroy(); //req'd because Kml class sets a cookie\n $this->clearRequest();\n $this->clearTmpFiles();\n }", "public function tearDown ()\n {\n $this->tran = null;\n }", "protected function tearDown()\n {\n \tunset($this->object);\n }", "protected function tearDown()\n {\n \tunset($this->object);\n }", "protected function tearDown()\n {\n \tunset($this->object);\n }", "protected function tearDown()\n {\n \tunset($this->object);\n }", "public static function tearDownAfterClass(): void\n {\n // do somrthing after the benchmark\n }", "function unsetMockSession() {\n if ($this->realSession) {\n $this->CI->session = $this->realSession;\n $this->realSession = null;\n }\n }" ]
[ "0.6885377", "0.6410031", "0.6028772", "0.6018886", "0.6003369", "0.5978536", "0.59734637", "0.5957988", "0.59537435", "0.5939774", "0.5938053", "0.5906665", "0.59034204", "0.58951205", "0.5887584", "0.5864025", "0.5843657", "0.58366674", "0.5833876", "0.58322316", "0.5828574", "0.58261114", "0.581918", "0.581918", "0.58146644", "0.57988465", "0.57983476", "0.5787913", "0.5777643", "0.5762274", "0.5762274", "0.5762274", "0.5762274", "0.5762274", "0.5762274", "0.5758588", "0.5758449", "0.5746898", "0.5740388", "0.5735999", "0.5732052", "0.5717636", "0.5717636", "0.5717636", "0.5713964", "0.5713791", "0.5713791", "0.5713791", "0.5712693", "0.5704967", "0.56973445", "0.56966597", "0.5693564", "0.56927747", "0.5684645", "0.5673962", "0.56733537", "0.56673974", "0.56673974", "0.56583947", "0.565763", "0.5656323", "0.5648505", "0.5645195", "0.56442595", "0.5637335", "0.5637335", "0.5637335", "0.5637335", "0.5637335", "0.5637335", "0.5637335", "0.56364214", "0.56364214", "0.56364214", "0.56218016", "0.5621175", "0.56194913", "0.5615362", "0.5607476", "0.5607476", "0.5607476", "0.5604555", "0.5601803", "0.55946773", "0.5579699", "0.5578889", "0.5574538", "0.55672157", "0.5566293", "0.55647516", "0.5563771", "0.5562348", "0.5556327", "0.5553358", "0.5553358", "0.5553358", "0.5553358", "0.5552432", "0.55519915" ]
0.77385116
0
First test should return "I am a clock"
public function testIdentity() { $result = $this->clock->whatAmI(); $this->assertEquals("I am a clock", $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTime() {\n $time = mktime(16, 35, 0, 2, 26, 1988);\n\n $this->assertEquals('04:35PM', Format::time($time));\n }", "public function testGetTimelogsForContact()\n {\n\n }", "public function testGetTimelogs()\n {\n\n }", "public function testGetTimelogsForTask()\n {\n\n }", "public function testTime()\n {\n $this->assertEquals(self::$cache->time('Toaster'), '');\n\n //Standard function test\n self::$cache->set('Toaster', 'Test', 5);\n\n $this->assertEquals(self::$cache->time('Toaster'), time());\n }", "public function testGetTimelogsForAccount()\n {\n\n }", "public function testNameOfTheGame()\n {\n \t$game_factory = factory(Game::class)->create();\n\n $this->assertEquals($game_factory->name, sprintf(\"Game %s\", $game_factory->getKey()));\n }", "public function testGetTimesheet()\n {\n }", "function time()\n{\n return \\Genesis\\SQLExtension\\Tests\\Context\\SQLHandlerTest::TYPE_STRING_TIME;\n}", "public function testCurrentTime0()\n{\n\n $actual = $this->systemTimeProvider->currentTime();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function test_it_can_expose_how_much_time_has_been_logged()\n {\n $timelog = factory(TimeLog::class, 2)->create([\n 'number_of_seconds' => 300,\n 'user_id' => $this->user->id,\n 'project_id' => $this->project->id\n ]);\n // The project should be able to tell us how much time has been logged\n $timelogs = timeDiffForHumans($this->project->timelogs->sum('number_of_seconds'));\n //\n $this->assertSame($this->project->time_logged, $timelogs);\n }", "public function testClockHours()\n {\n $ecpected = 12;\n $actual = $this->clock->$hours;\n $this->assertEquals($expected, $actual);\n }", "public function testTitle()\n {\n\n $this->assertEquals(\"About|Laracarte\",getTile('About'));\n\n }", "public function testGetStart() {\n // It should return an int\n $this->assertGreaterThan( 0, $this->timer->get_start() );\n }", "public static function test()\n\t{\n\t\treturn \"Hello World from \".get_class();\n\t}", "public function testStart() {\n $timer = new timer( false );\n\n // It should return a starting number\n $this->assertGreaterThan( 0, $timer->start() );\n\t}", "public function testGetTimesheets()\n {\n }", "public function run()\n {\n $a = \"test\";\n $b = \"that is test\";\n assert($b==\"this is $a\");\n }", "public static function getTestString(){\n\t\t//This function will throw out a test string. It is for testing only.\n\t\t$testString = 'me re re me fa me re re me me me fa se sol sol fa sol la sol fa me';\n\t\t//$testString = 'me re re me sol me';\n\t\treturn($testString);\n\t}", "public function testGetChallengeTemplate()\n {\n }", "public function testGetChallengeActivityTemplate()\n {\n }", "public function testGet() {\n $this->assertEquals('%m/%d/%Y', Format::get('date'));\n $this->assertEquals('%m/%d/%Y %I:%M%p', Format::get('datetime'));\n $this->assertEquals('%I:%M%p', Format::get('time'));\n $this->assertEquals('###-##-####', Format::get('ssn'));\n $this->assertEquals([\n 7 => '###-####',\n 10 => '(###) ###-####',\n 11 => '# (###) ###-####'\n ], Format::get('phone'));\n\n try {\n Format::get('fake');\n $this->assertTrue(false);\n\n } catch (Exception $e) {\n $this->assertTrue(true);\n }\n }", "public function testTimeItDefaultsTimeProperly()\n {\n // rounds (10) and run code that takes 1 second to \"run\". It\n // should take roughly 10s to run and, at the end, we should\n // also have proper timings.\n $t = new Timer('sleep(1)');\n\n $start = time();\n $res = $t->timeit();\n $delta = time() - $start;\n\n // Default is 10 rounds\n $this->assertEquals(10, $res[0]);\n\n // This definitely must take 10s or more to run\n $this->assertGreaterThanOrEqual(10, $delta);\n\n // But not too much (unless your computer is very slow)\n $this->assertLessThan(10.5, $delta);\n\n // Each run should take roughly 1s\n $this->assertEquals(1.00, $res[1], '', 0.001);\n\n // The timing string should reflect a precise timing\n $this->assertEquals('1.00s', $res[2]);\n }", "public function testRenderWithDefaultLocale()\n {\n $result = $this->render();\n $this->assertMatchesRegularExpression('/<span>Pacific Standard Time/', $result);\n }", "public function testGetTimelogsForFolder()\n {\n\n }", "function display_greeting()\n\t{\n\t\t$hour = date('h');\n\n\t\tif ($hour >= 0 and $hour <= 11)\n\t\t{\n\t\t\techo \"Good Morning!\";\n\t\t}\n\n\t\telseif ($hour >= 12 and $hour <= 17)\n\t\t{\n\t\t\techo \"Good Afternoon!\";\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\techo \"Good Evening!\";\n\t\t}\n\n\t}", "function humanTiming ($time)\n {\n\n $time = time() - $time; // to get the time since that moment\n $time = ($time<1)? 1 : $time;\n $tokens = array (\n 31536000 => 'tahun',\n 2592000 => 'bulan',\n 604800 => 'minggu',\n 86400 => 'hari',\n 3600 => 'jam',\n 60 => 'menit',\n 1 => 'detik'\n );\n\n foreach ($tokens as $unit => $text) {\n if ($time < $unit) continue;\n $numberOfUnits = floor($time / $unit);\n return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');\n }\n\n }", "public function test_timeAgo(){\n require \"./source/timeAgo_function.php\";\n $this->assertEquals('4 months ago',timeAgo(\"2020-05-27 13:0:0\"));\n }", "public function testWelcome()\n {\n $game = new Game();\n\n $result = $game->playGame();\n\n $expected = [\n \"title\" => \"21\",\n \"header\" => \"Game 21\",\n \"message\" => (\"Welcome to the dice game 21! \n You can maximum bet half of your bitcoins.\"),\n \"playerBitcoin\" => 10,\n \"pageToRender\" => \"layout/dice-welcome.php\"\n ];\n\n renderView($result[\"pageToRender\"], $result);\n\n $this->assertIsArray($result);\n $this->assertEquals($expected, $result);\n }", "public function displayTimeQuestion()\n {\n\n }", "public function testLoad()\n\t{\n\t\t$this->assertEquals(\"Welcome Dave\", substr($this->view->render(), 0, 12));\n\t}", "function getGreetings(){\n /* This sets the $time variable to the current hour in the 24 hour clock format */\n $time = date(\"H\");\n /* Set the $timezone variable to become the current timezone */\n $timezone = date(\"e\");\n /* If the time is less than 1200 hours, show good morning */\n if ($time < \"12\") {\n return \"GM\";\n }\n /* If the time is grater than or equal to 1200 hours, but less than 1700 hours, so good afternoon */\n else if ($time >= \"12\" && $time < \"17\") {\n\n return \"GA\";\n }\n /* Should the time be between or equal to 1700 and 1900 hours, show good evening */\n else if ($time >= \"17\" && $time < \"19\") {\n return \"GE\";\n }\n /* Finally, show good night if the time is greater than or equal to 1900 hours */\n\n else if ($time >= \"19\") {\n return \"GN\";\n }\n }", "public function testBasicTest()\n {\n $response = $this->get('/test');\n\n $response->assertStatus(200);\n\n $response->assertSeeText('小粽子');\n\n }", "public function testGetChallenge()\n {\n }", "function greetings_by_time($timezone=false) {\n\t\tif($timezone){\n\t\t\tdate_default_timezone_set($timezone);\n\t\t}\n $hour = date(\"H\");\n if ($hour < \"12\") {\n\t\t\treturn \"Good morning\";\n } elseif ($hour >= \"12\" && $hour < \"17\") {\n\t\t\treturn \"Good afternoon\";\n } elseif ($hour >= \"17\" && $hour < \"19\") {\n\t\t\treturn \"Good evening\";\n }\n\t\treturn \"Good night\";\n\t}", "public function testGetChallengeEvents()\n {\n }", "public function test_helper_string()\n\t{\n\t\t$this->load->helper('string');\n\t\techo random_string('alnum',16);\n\t}", "public static function greet($time = NULL) {\n\t\tif(!$time) $time = Carbon::now();\n\t\t$hour = date(\"G\",strtotime($time));\n\t\t\n\t\tif($hour < 5) {\n\t\t\t$greeting = \"You woke up early\";\n\t\t}elseif($hour < 10){\n\t\t\t$greeting = \"Good morning\";\n\t\t}elseif($hour <= 12){\n\t\t\t$greeting = \"It's almost lunch\";\n\t\t}elseif($hour < 18){\n\t\t\t$greeting = \"Good afternoon\";\n\t\t}elseif($hour <= 22){\n\t\t\t$greeting = \"Good evening\";\n\t\t}else{\n\t\t\t$greeting = \"You must be working really hard\";\n\t\t}\n\n\t\treturn $greeting;\n\t}", "public function testExample()\n {\n $this->artisan('game:start')\n ->expectsOutput('you won')\n ->assertExitCode(0);\n }", "function humanTiming ($time){\n $time = (time()- 2*60*60)- $time; // to get the time since that moment\n $time = ($time<1)? 1 : $time;\n $tokens = array (\n 31536000 => 'year',\n 2592000 => 'month',\n 604800 => 'week',\n 86400 => 'day',\n 3600 => 'hour',\n 60 => 'minute',\n 1 => 'second'\n );\n\n foreach ($tokens as $unit => $text) {\n if ($time < $unit) continue;\n $numberOfUnits = floor($time / $unit);\n return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');\n }\n }", "public function testHomePageShowsMadComics()\n {\n $this->visit('/')\n ->see('Mad Comics');\n }", "public function testGetChallengeActivity()\n {\n }", "public function testCreateGame()\n {\n $game = new DiceGame(\"Hatem\", \"Computer\");\n $res = $game->player1->name;\n $exp = \"Hatem\";\n $this->assertEquals($exp, $res);\n }", "public function testRelativeTime() {\n $time = mktime(16, 35, 0, 2, 26, 2012);\n\n // Current\n $this->assertEquals('just now', Format::relativeTime(strtotime('+0 seconds', $time), array('time' => $time)));\n $this->assertEquals('just now', Format::relativeTime($time, array('time' => $time)));\n\n // Past\n $this->assertEquals('45 seconds ago', Format::relativeTime(strtotime('-45 seconds', $time), array('time' => $time)));\n $this->assertEquals('2 weeks, 2 days ago', Format::relativeTime(strtotime('-16 days', $time), array('time' => $time)));\n $this->assertEquals('8 months ago', Format::relativeTime(strtotime('-33 weeks', $time), array('time' => $time)));\n $this->assertEquals('6 months, 4 days ago', Format::relativeTime(strtotime('-6 months', $time), array('time' => $time)));\n $this->assertEquals('2 years, 2 months ago', Format::relativeTime(strtotime('-799 days', $time), array('time' => $time)));\n\n // Future\n $this->assertEquals('in 45 seconds', Format::relativeTime(strtotime('+45 seconds', $time), array('time' => $time)));\n $this->assertEquals('in 2 weeks, 2 days', Format::relativeTime(strtotime('+16 days', $time), array('time' => $time)));\n $this->assertEquals('in 8 months', Format::relativeTime(strtotime('+33 weeks', $time), array('time' => $time)));\n $this->assertEquals('in 6 months, 2 days', Format::relativeTime(strtotime('+6 months', $time), array('time' => $time)));\n $this->assertEquals('in 2 years, 2 months', Format::relativeTime(strtotime('+799 days', $time), array('time' => $time)));\n\n // Large depth\n $this->assertEquals('1 year, 1 month, 4 days ago', Format::relativeTime(strtotime('-399 days', $time), array('time' => $time, 'depth' => 5)));\n $this->assertEquals('1 year, 3 months ago', Format::relativeTime(strtotime('-444 days', $time), array('time' => $time, 'depth' => 5)));\n $this->assertEquals('3 years ago', Format::relativeTime(strtotime('-999 days', $time), array('time' => $time, 'depth' => 5)));\n $this->assertEquals('3 years, 5 months ago', Format::relativeTime(strtotime('-1235 days', $time), array('time' => $time, 'depth' => 5)));\n $this->assertEquals('2 years, 2 months, 1 week, 2 days ago', Format::relativeTime(strtotime('-799 days', $time), array('time' => $time, 'depth' => 5)));\n\n // Non-verbose\n $this->assertEquals('2y, 2m, 1w, 2d ago', Format::relativeTime(strtotime('-799 days', $time), array('time' => $time, 'depth' => 5, 'verbose' => false)));\n $this->assertEquals('in 2y, 2m, 1w, 2d', Format::relativeTime(strtotime('+799 days', $time), array('time' => $time, 'depth' => 5, 'verbose' => false)));\n }", "public function testDatetime() {\n $time = mktime(16, 35, 0, 2, 26, 1988);\n\n $this->assertEquals('02/26/1988 04:35PM', Format::datetime($time));\n }", "public function timeHi();", "public function shouldGetMeasurementTime(): void\n {\n $expectedValue = $this->faker->dateTime();\n\n $this->waqi->shouldReceive('getMeasurementTime')\n ->once()\n ->withNoArgs()\n ->andReturn($expectedValue);\n\n $result = $this->waqi->getMeasurementTime();\n\n $this->assertEquals($expectedValue, $result);\n $this->assertInstanceOf(\\DateTime::class, $result);\n $this->assertNotEmpty($result);\n $this->assertNotNull($result);\n }", "public function testGetChallengeEvent()\n {\n }", "public static function testReturn(): string\n {\n return 'im a test';\n }", "public function testGameStart()\n {\n $twitterTopic = 'TestTwitterTopic';\n $twitterOAuth = $this->createTwitterMock($twitterTopic);\n\n $game = new Game($twitterOAuth);\n $game->start();\n\n $this->assertEquals($game->word, 'TESTTWITTERTOPIC');\n $this->assertEquals($game->numberTiles, strlen($twitterTopic));\n }", "public function testRandom1()\n {\n $this->assertTrue(Str::random() != '');\n }", "public function testHome()\n {\n $this->visit('/')->see('Comité Cantonal de Deportes y Recreación de Grecia');\n\n \n }", "public function test() {\n \t\n\t\tprint_r('hello stef');\n \t\n }", "public function test_example()\n {\n\n\n $user = User::find(1);\n\n $booking = new Bookings();\n $booking->id = 1;\n $booking->room_name = \"Example room\";\n $booking->institution_name = \"Example institution\";\n $booking->seat_name = 12;\n $booking->start_date = \"2050-02-01\";\n $booking->start_time = \"07:00:00\";\n $booking->end_time = \"07:59:00\";\n// $response = $this->get('/');\n $view = $this->actingAs($user)->view('bookings.show', ['Booking' => $booking]);\n\n $view->assertSee('Example room');\n\n }", "public static function time($time)\n {\n $current = Time::datetime($time);\n //\n return \"-- Generated in $current ($time)\";\n }", "public function testMachineWorks()\n\t{\n\t\t$this -> GachaMachineInstance -> setGachas(100) ;\n\t\t// play one time\n\t\t$this -> GachaMachineInstance -> turnWheel() ;\n\t\t// it should -1 Gacha\n\t\t$this -> assertEquals( 99 , $this -> GachaMachineInstance -> getGachas() ); // Success\n\n\t}", "public function testGetPayrollCalendar()\n {\n }", "function test()\n\t{\n\t\t$this->open('tickets/index.php/ticket653');\n\t\t$this->verifyTitle(\"Verifying Ticket 653\", \"\");\n\n\t\t$this->assertText('textspan', 'This is the page for Ticket653');\n\t}", "public function displayTest( ) {\n }", "public function testGetChallengeActivityTemplates()\n {\n }", "public function testGetElapsed() {\n // Stop the timer\n $this->timer->stop();\n\n // It should return an int\n $this->assertEquals( $this->timer->get_elapsed(), $this->timer->get_stop() - $this->timer->get_start() );\n }", "public function testGetChallengeActivities()\n {\n }", "public function testDisplayMsg()\n {\n // init\n $Cron = new \\Cron\\Cron();\n $Cron->setDebug(true);\n\n // the test\n ob_start();\n $Cron->displayMsg('test display');\n $result = ob_get_clean();\n\n // assert\n $this->assertEquals(\"test display\\n\", $result);\n\n ob_start();\n unset($Cron);\n ob_end_clean();\n }", "public function testGetName()\n {\n static::assertEquals('cookie', $this->fixture->getName());\n }", "function seneca_time(){\n $x = \"2011 - present\";\n print $x;\n}", "public function testWebinar()\n {\n }", "function humanTiming ($time)\n{\n $time = time() - $time;\n\n // time unit constants\n $timeUnits = array (\n 31536000 => 'year',\n 2592000 => 'month',\n 604800 => 'week',\n 86400 => 'day',\n 3600 => 'hour',\n 60 => 'minute',\n 1 => 'second'\n );\n\n // iterate over time contants to build a human \n //$humanTiming;\n foreach ($timeUnits as $unit => $text)\n {\n if ($time < $unit)\n continue;\n $numberOfUnits = floor($time / $unit);\nif(!isset($humanTiming)){\n // human readable token for current time unit\n $humanTiming = $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');\n}\n // compute remaining time for next loop iteration\n $time -= $unit*$numberOfUnits;\n }\n return $humanTiming;\n}", "public function testDate() {\n $time = mktime(16, 35, 0, 2, 26, 1988);\n\n $this->assertEquals('02/26/1988', Format::date($time));\n }", "public function testGetChallengeTemplates()\n {\n }", "public function testGetPatrimonio()\n {\n }", "public function getFate()\n {\n return \"spock\";\n }", "public function test_it_can_expose_how_much_time_has_been_logged_in_seconds()\n {\n $timelog = factory(TimeLog::class, 2)->create([\n 'number_of_seconds' => 300,\n 'user_id' => $this->user->id,\n 'project_id' => $this->project->id\n ]);\n // The project should be able to tell us how much time has been logged\n $this->assertSame($this->project->time_logged_seconds, $this->project->timelogs->sum('number_of_seconds'));\n }", "public function testGraphic()\n {\n $dice = new GraphicDice();\n $this->assertInstanceOf(\"\\App\\Dice\\GraphicDice\", $dice);\n\n $string = $dice->roll();\n $string = $dice->graphic();\n $this->assertStringContainsString(\"dice-\", $string);\n }", "public function student_login_test(): void\r\n {\r\n\r\n $login = new Login;\r\n $result = $Cal->add(20,5);\r\n\r\n $this->assertEquals(25, $result);\r\n }", "public function practice1()\n {\n return (\"practice 1\");\n }", "function toTest($test){\n\treturn \"el test es \".$test;\n}", "public function testGetNamedMetric(): void\n {\n $this->collection->setResult($this->timeResult);\n $this->assertEquals(1, $this->collection->getMetric(TimeResult::class, 'net'));\n }", "function Time($time){\r\n\r\n\t}", "public function testCanBeUsedAsString()\n {\n\n }", "public function test_displayPiscinePage()\n {\n $response = $this->get('/piscine');\n $response->assertStatus(200);\n $response->assertSeeText(\"Piscine\");\n }", "public function testFormat($time, $format, $result)\n {\n $helpers = new \\Handlebars\\Helpers(array('formatDate' => new FormatDateHelper()));\n $engine = new \\Handlebars\\Handlebars(array('helpers' => $helpers));\n\n $this->assertEquals($engine->render(\n '{{formatDate time format}}',\n array(\n 'time' => $time,\n 'format' => $format,\n )\n ), $result);\n }", "public function test_welcome()\n {\n $this->assertTrue(true);\n }", "public function testSame()\n {\n $result = \"texto\";\n $this->assertSame($result, \"texto\"); //verifica con ===\n }", "public function testBasicTest()\n {\n Log::shouldReceive('info')\n ->once()\n ->with('some one want to sneak in');\n $response = $this->get('/admin/panel');\n\n $response->assertRedirect('/welcome');\n }", "public function testFight()\n {\n }", "public function test_current_map()\n {\n $this->assertSame('Al Basrah AAS v1', $this->btwServer->currentMap());\n }", "public function test_current_map()\n {\n $this->assertSame('Al Basrah AAS v1', $this->btwServer->currentMap());\n }", "private function thenOutputShouldDependOnDefaults(): void\n {\n $now = (new \\DateTime('now'))->format('Ymd\\TH');\n self::assertStringContainsString('DTSTAMP:'.$now, $this->actualResult);\n self::assertStringContainsString('CREATED:'.$now, $this->actualResult);\n self::assertStringContainsString('SUMMARY:name', $this->actualResult);\n }", "public function testGetChamado()\n {\n }", "public function testEndTime(AcceptanceTester $I)\n {\n $this->category = null;\n $this->service = null;\n\n $this->initData(false);\n $this->initCustomTime();\n\n $user = User::find(70);\n $category = $this->category;\n $service = $category->services()->first();\n $employee = $this->employee;\n\n\n $I->assertEquals($service->length, 60);\n $I->assertEquals($service->before, 0);\n //This service has 15 mins after the actual service length\n $I->assertEquals($service->after, 15);\n\n $date = Carbon::today();\n if($date->dayOfWeek == Carbon::SUNDAY) {\n $date->addDays(1);\n } else if($date->dayOfWeek == Carbon::SATURDAY) {\n $date->addDays(2);\n }\n $startAt = '1600';\n\n $firstName = 'First';\n $lastName = 'Last';\n $email = 'consumer' . time() . '@varaa.com';\n $phone = time();\n $I->assertEquals($category->user->id, $user->id);\n $I->amOnPage(route('as.embed.embed', ['hash' => $user->hash, 'date'=> $date->toDateString()], false));\n $I->click('#btn-category-' . $category->id);\n $I->wait(1);\n $I->see(\"Hiusjuuritutkimus\");\n $I->click('#btn-service-' . $service->id);\n $I->click(sprintf('//a[@data-service-id=%s][@data-service-time=\"default\"]', $service->id));\n $I->click(sprintf('#btn-add-service-%s', $service->id));\n $I->wait(1);\n $I->seeInCurrentUrl(sprintf('service_id=%d&service_time=default&date=%s', $service->id, $date->toDateString()));\n $I->click(sprintf('//*[@id=\"btn-slot-%s-%s\"]', $employee->id, $startAt));\n $I->see(\"16:00\", sprintf('//span[@class=\"start-time-%s\"]', $employee->id));\n $I->see(\"16:45\", sprintf('//span[@class=\"end-time-%s\"]', $employee->id));\n }", "public static function show($time)\n{\n\t$t=new Time($time);return$t->humanFriendly();\n}", "public function testGetHeaterState()\n {\n }", "public function testGetName(): void\n {\n $this->assertEquals(\n 'Другая (отслеживание и смена статуса производятся вручную)',\n DeliveryService::getName(1)\n );\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "function oos_time_based_greeting()\n{\n global $aLang;\n\n if(date('G') >= 12 && date('G') <= 18) {\n $time_based_greeting = $aLang['good_afternoon'];\n } elseif (date('a') == 'am') {\n $time_based_greeting = $aLang['good_morning'];\n } else {\n $time_based_greeting = $aLang['good_evening'];\n }\n return $time_based_greeting;\n}", "public function test_next_map()\n {\n $this->assertSame('Al Basrah Insurgency v1', $this->btwServer->nextMap());\n }", "public function testGetPlayerDisplayName() {\n $field = $this->prophesize('Drupal\\Core\\Field\\FieldItemListInterface');\n $field->getString()->willReturn('0');\n $node = $this->prophesize('Drupal\\node\\Entity\\Node');\n $node->get('field_player_who_scored')->willReturn($field->reveal());\n $entityTypeManager = $this->prophesize('Drupal\\Core\\Entity\\EntityTypeManager');\n $goldenBootService = new GoldenBoot($entityTypeManager->reveal());\n $this->assertFalse($goldenBootService->getPlayerDisplayName($node->reveal()));\n }", "public function testPlayActionGet()\n {\n $this->app->session->set(\"dice-game\", new DiceGame(2, 2));\n $res = $this->controller->PlayActionGet();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n //$this->assertStringEndsWith(\"active\", $res);\n }", "public function test_getGreeting()\n {\n return $this->greeter->getGreeting();\n }", "public function testGeneratorStringAndHeader() {\n $this->drupalGet('<front>');\n $this->assertSession()->statusCodeEquals(200);\n list($version) = explode('.', \\Drupal::VERSION, 2);\n $this->assertSession()->responseContains('Drupal ' . $version . ' (https://www.drupal.org); Commerce 2');\n $this->assertEquals('2', $this->drupalGetHeader('X-Commerce-Core'));\n }" ]
[ "0.6670211", "0.6573012", "0.65491575", "0.6408347", "0.6319548", "0.6286005", "0.6156907", "0.6148376", "0.5967477", "0.5947592", "0.5848811", "0.58363205", "0.57862633", "0.5779434", "0.5742246", "0.5734574", "0.5719342", "0.57187", "0.57108283", "0.5651302", "0.56319416", "0.5628122", "0.56275195", "0.5613794", "0.56105757", "0.5599246", "0.5593681", "0.5579254", "0.554844", "0.5547137", "0.55289847", "0.5528622", "0.5525405", "0.5508211", "0.55080086", "0.54917413", "0.54886883", "0.5474302", "0.54722226", "0.54707336", "0.5461488", "0.54576373", "0.54463917", "0.54327965", "0.5426369", "0.5419402", "0.54193866", "0.5418963", "0.54124326", "0.53955156", "0.53872275", "0.5383293", "0.5375733", "0.5369484", "0.53681785", "0.53674763", "0.53648406", "0.535874", "0.5353558", "0.5351334", "0.5349554", "0.53292626", "0.5322942", "0.53170455", "0.53125346", "0.5312102", "0.5311243", "0.5310298", "0.53039646", "0.53026193", "0.52946585", "0.52943194", "0.52908415", "0.5289505", "0.5288349", "0.5286106", "0.5285822", "0.52843356", "0.52824306", "0.5281291", "0.52757514", "0.52721524", "0.52657115", "0.526439", "0.52590775", "0.5256681", "0.5256681", "0.5254778", "0.5253711", "0.52462363", "0.52461076", "0.52422583", "0.524117", "0.52399683", "0.5235996", "0.52347976", "0.5234601", "0.5232765", "0.5220555", "0.52172697" ]
0.7421176
0
countBells test 1 INPUT $startTime = '2:00'; $endTime = '3:00'; OUTPUT 5
public function testcountBells1() { $startTime = '2:00'; $endTime = '3:00'; $expected = 5; $actual = $this->clock->countBells($startTime, $endTime); $this->assertEquals($expected, $actual); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testcountBells2()\n {\n $startTime = '14:00';\n $endTime = '15:00';\n $expected = 5;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells3()\n {\n $startTime = '14:23';\n $endTime = '15:42';\n $expected = 3;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells6()\n {\n $startTime = '10:00';\n $endTime = '10:00';\n $expected = 166;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells4()\n {\n $startTime = '23:00';\n $endTime = '1:00';\n $expected = 24;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function calculateTimePerDay($startTime, $endTime){\n\n $start_time = strtotime(Config::get('mycnf.start_time'));//8:30\n $end_time = strtotime(Config::get('mycnf.end_time')); //18\n $sleep_AM = strtotime(Config::get('mycnf.sleep_AM')); //11:30\n $start_PM = strtotime(Config::get('mycnf.start_PM')); //13\n\n if ($startTime < $sleep_AM) {\n\n if ($endTime < $sleep_AM) {\n $timePerDay = $endTime - $startTime;\n\n }elseif ($endTime > $sleep_AM && $endTime < $start_PM) {\n $timePerDay = $sleep_AM - $startTime;\n\n }elseif ($endTime > $start_PM) {\n $timePerDay = ($sleep_AM - $startTime) + ($endTime - $start_PM);\n }\n\n }elseif ($startTime >= $sleep_AM && $startTime <= $start_PM) {\n\n if ($endTime > $sleep_AM && $endTime < $start_PM ) {\n $timePerDay = 0;\n\n }elseif ($endTime > $start_PM) {\n $timePerDay = $endTime - $start_PM;\n\n }\n\n }elseif ($startTime > $start_PM){\n $timePerDay = $endTime - $startTime;\n\n }\n\n return $timePerDay;\n }", "public function countTimediff($beginTime,$endTime)\n\t{\n\t\t$begins=explode( \":\",$beginTime);\n\t\t$beginseconds=(int)($begins[0])*3600 + (int)($begins[1])*60 + (int)($begins[2]);\n\t\n\t\t$ends=explode(\":\",$endTime);\n\t\t$endseconds=(int)($ends[0])*3600 + (int)($ends[1])*60 + (int)($ends[2]);\n\t\n\t\treturn ($endseconds-$beginseconds);\n\t}", "function process($name, $start, $end){\n $time = $end - $start;\n echo \"Task: \" . $name . \"\\t\\t Time: \" . $time . \"\\n\";\n}", "function when($parameters) { // $parameters = ['timestamp'], ['numberOfUnits']\n\t$currentTime = time();\n\t\n\tif (preg_match ( '/\\d{4}-\\d{1,2}-\\d{1,2}\\s\\d{1,2}:\\d{1,2}:\\d{1,2}/u', $parameters['timestamp'] )) // /d -> 0-9, nt 1978-2-3 5:8:9, u on seotud UTF-8 ga\n\t{\n\t\t$time = strtotime( $parameters['timestamp'] ); //konventeerib sekunditeks\n\t}\n\telse {\n\t\t$time = $parameters['timestamp'];\n\t}\n\n\tif($currentTime > $time){\n\t\t$difference = $currentTime - $time;\n\t} else {\n\t\t$difference = $time - $currentTime;\n\t}\n\n\t$units = array (\n\t\t\t'second',\n\t\t\t'minute',\n\t\t\t'hour',\n\t\t\t'day',\n\t\t\t'week',\n\t\t\t'month',\n\t\t\t'year',\n\t\t\t'decade'\n\t);\n\t\n\t$secondsInSecond = 1;\n\t$secondsInMinute = 60;\n\t$secondsInHour = $secondsInMinute*60;\n\t$secondsInDay = $secondsInHour*24;\n\t$secondsInWeek = $secondsInDay*7;\n\t$secondsInMonth = $secondsInWeek*(4+1/3);\n\t$secondsInYear = $secondsInMonth*12;\n\t$secondsInDecade = $secondsInYear*10;\n\t\n\t$sizes = array (\t\t\t\t//$sizes = array (\n\t\t\t$secondsInSecond, \t\t//1, //sekund\n\t\t\t$secondsInMinute, \t\t//60, //minut\n\t\t\t$secondsInHour, \t\t// 60*60, //tund\n\t\t\t$secondsInDay,\t\t\t//60*60*24, //päev\n\t\t\t$secondsInWeek, \t\t//60*60*24*7, //nädal\n\t\t\t$secondsInMonth,\t\t//60*60*24*7*(4+1/3), //kuu\n\t\t\t$secondsInYear, \t\t//60*60*24*7*(4+1/3)*12, //aasta\n\t\t\t$secondsInDecade \t\t//60*60*24*7*(4+1/3)*12*10 //kümmend\n\t);\n\n\tfor($positionInUnits = sizeof ( $sizes ) - 1; ($positionInUnits >= 0) && \n\t\t(($amountOfTime = $difference / $sizes [$positionInUnits]) <= 1); $positionInUnits --); \n\t\tif ($positionInUnits < 0)\n\t\t\t$positionInUnits = 0;\n\t\t$remainedTime = $currentTime - ($difference % $sizes [$positionInUnits]);\n\t\t$amountOfTime = floor ( $amountOfTime );\n\t\tif ($amountOfTime != 1) \n\t\t\t$units [$positionInUnits] .= 's';\n\t\t$when = sprintf ( \"%d %s \", $amountOfTime, $units [$positionInUnits] );\n\t\tif (($parameters['numberOfUnits'] == 0) && ($positionInUnits >= 1) && (($currentTime - $remainedTime) > 0))\n\t\t$when .= when ( $remainedTime);\n\t\treturn $when;\n}", "function timeCalculator($box_times, $call_times){ \n \n $time_output = new TimeOutput();\n \n $box_times_start = date_create($box_times['Start']);\n $box_times_end = date_create($box_times['End']);\n $call_times_start = date_create($call_times['Start']);\n $call_times_end = date_create($call_times['End']);\n \n \n //Stage 1 and 5\n if($call_times_end <= $box_times_start || $box_times_end <= $call_times_start ){\n $time_output->setName(\"stage 1 or stage 5\");\n $time_output->setBoxTime(array(array('Start' => $box_times_start, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end)));\n } \n //Stage 2\n if($call_times_start <= $box_times_start && $box_times_start < $call_times_end\n && $call_times_end < $box_times_end){\n $time_output->setName(\"stage 2\");\n $time_output->setBoxTime(array(array('Start' => $call_times_end, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n \n }\n //Stage 3\n if($box_times_start < $call_times_start && $call_times_end < $box_times_end){\n $time_output->setName(\"stage 3\");\n $time_output->setBoxTime(array(\n array('Start' => $box_times_start, 'END' =>$call_times_start),\n array('Start' => $call_times_end, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n }\n //Stage 4 \n if($box_times_start < $call_times_start && $call_times_start < $box_times_end\n && $box_times_end <= $call_times_end){\n $time_output->setName(\"stage 4\");\n $time_output->setBoxTime(array(array('Start' => $box_times_start, 'END' =>$call_times_start)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n } \n //Stage 6\n if($call_times_start < $box_times_start && $box_times_end < $call_times_end ){\n $time_output->setName(\"stage 6\");\n $time_output->setBoxTime(array(array('Start' => \"\", 'END' => \"\")));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n }\n \n return $time_output;\n}", "function getQueryTime($time_start,$time_end) {\n\t\treturn round($time_end - $time_start,4).'sec';\n\t}", "protected static function compareMicrotimes($startTime, $endTime) {\n\t\treturn round($endTime - $startTime, 4);\n\t}", "function checkTimeRange($params) {\n\n if (!isset($params['start_date']) || $params['start_date'] == null) {\n return -1;\n }\n \n if (!isset($params['stop_date']) || $params['stop_date'] == null) {\n return -2;\n }\n \n if (!isset($params['start_time']) || $params['start_time'] == null) {\n return -3;\n }\n \n if (!isset($params['end_time']) || $params['end_time'] == null) {\n return -4;\n }\n \n $startTime = $params['start_date'] . ' ' . $params['start_time'];\n $emdTime = $params['stop_date'] . ' ' . $params['end_time'];\n \n if(strtotime($startTime) > strtotime($emdTime)) {\n return -5;\n }\n return 1;\n }", "function getBusinessDayCount_timestamp($startStamp,$endStamp){\n\t\t$startStamp=timestamp2utime($startStamp);\n\t\t$endStamp=timestamp2utime($endStamp);\n\t\t$dateTmp=$startStamp;\n\t\t$businessDays=0;\n\t\t$loopEnd=false;\n\t\twhile(!$loopEnd){\n\t\t\t$dateTmp = DateAdd($dateTmp,\"d\",1);\n\t\t\tif(isBusinessDay($dateTmp)){\n\t\t\t\t$businessDays++;\n\t\t\t}\n\t\t\tif($dateTmp==$endStamp){\n\t\t\t\t$loopEnd=true;\n\t\t\t}\n\t\t}\n\t\treturn $businessDays;\n\t}", "function get_n_time_slots()\n{\n global $morningstarts, $morningstarts_minutes, $eveningends, $eveningends_minutes;\n global $resolution;\n \n $start_first = (($morningstarts * 60) + $morningstarts_minutes) * 60; // seconds\n $end_last = ((($eveningends * 60) + $eveningends_minutes) * 60) + $resolution; // seconds\n $end_last = $end_last % SECONDS_PER_DAY;\n if (day_past_midnight())\n {\n $end_last += SECONDS_PER_DAY;\n }\n $n_slots = ($end_last - $start_first)/$resolution;\n\n return $n_slots;\n}", "function beginIsAfterEnd($beginTime, $endTime){\n if($beginTime > $endTime) {\n return true;\n }\n else {\n return false;\n }\n}", "function calculateShiftMinutes($startTime, $endTime) {\n $startHourDigits = floor($startTime / 100);\n $startMinuteDigits = $startTime / 100 - $startHourDigits;\n\n $endHourDigits = floor($endTime / 100);\n $endMinuteDigits = $endTime / 100 - $endHourDigits;\n\n $startTimeInMinutes = $startHourDigits * 60 + $startMinuteDigits * 100;\n $endTimeInMinutes = $endHourDigits * 60 + $endMinuteDigits * 100;\n\n $shiftLengthInMinutes = $endTimeInMinutes - $startTimeInMinutes;\n return round($shiftLengthInMinutes);\n}", "function counttime()\n{\n global $time;\n\n $arrHour = explode(\":\", $time);\n $arrTime2 = array(8, 10, 12, 14, 16, 18, 20, 22, 24);\n foreach ($arrTime2 as $intTime)\n {\n if ($arrHour[0] < $intTime)\n {\n $intWait = (($intTime - $arrHour[0]) * 60) - $arrHour[1];\n $intHours = floor($intWait / 60);\n $intMinutes = $intWait % 60;\n break;\n }\n }\n $arrTime = array('', '');\n if ($intHours < 1)\n {\n $arrTime[0] = '';\n }\n if ($intHours == 1)\n {\n $arrTime[0] = $intHours.T_HOUR;\n }\n if ($intHours > 1 && $intHours < 5)\n {\n $arrTime[0] = $intHours.T_HOURS2;\n }\n if ($intHours > 4)\n {\n $arrTime[0] = $intHours.T_HOURS;\n }\n if ($intMinutes < 1)\n {\n $arrTime[1] = '';\n }\n if ($intMinutes == 1)\n {\n $arrTime[1] = $intMinutes.T_MINUTE;\n }\n if (($intMinutes > 1 && $intMinutes < 5) || @ereg(\"^[2-5][2-4]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES2;\n }\n if (($intMinutes > 4 && $intMinutes < 20) || @ereg(\"^[2-5][5-9]*$\", $intMinutes) || @ereg(\"^[2-5][0-1]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES;\n }\n\n return $arrTime;\n}", "function getduration_cmn($EndTime, $StartTime) {\n $diff = strtotime($EndTime) - strtotime($StartTime);\n return $diff;\n}", "function getBusinessDayCount($startStamp,$endStamp){\n\t\t$dateTmp=$startStamp;\n\t\t$businessDays=0;\n\t\t$loopEnd=false;\n\t\twhile(!$loopEnd){\n\t\t\t$dateTmp = DateAdd($dateTmp,\"d\",1);\n\t\t\tif(isBusinessDay($dateTmp)){\n\t\t\t\t$businessDays++;\n\t\t\t}\n\t\t\tif($dateTmp==$endStamp){\n\t\t\t\t$loopEnd=true;\n\t\t\t}\n\t\t}\n\t\treturn $businessDays;\n\t}", "function getHourDifference($starttime,$endtime){\n\t$start_array = split(\":\",$starttime);\n\t$end_array = split(\":\",$endtime);\n\t\n\t//Use the array elements to get the time in hours\n\t$diff = ($end_array[0] - $start_array[0]) + ($end_array[1] - $start_array[1])/60;\n\t\n\treturn $diff;\n}", "public function countHour($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%H');\n\t\t//echo $interval->format('%a total days').\"\\n\";\n\t\t//echo $interval->format('%m month, %d days').\"\\n\";\n\t\t//echo $interval->format('%H hour, %i minute').\"\\n\";\n\t}", "public function getTimes();", "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\n //Definindo variáveis = 0\n $fruito = $fruito = 0;\n //Executando a contagem de elementos do array para posterior calculo\n for ($i = 0; $i < count($apples); $i++){\n /* Se o calculo da distancia da árvore $a com a distância da fruta caída,\n * for maior que o ponto inicial da casa, incrementa-se na variável $fruita\n */\n $fapple = ($a + $apples[$i]);\n if ($fapple >= $s && $fapple <= $t){\n $fruita++;\n }\n }\n // Imprime o resultado da variavel $fruita\n print $fruita;\n // Salto de linha\n echo \"\\n\";\n //Executando a contagem de elementos do array para posterior calculo\n for ($i = 0; $i < count($oranges); $i++){\n /* Se o calculo da distancia da árvore $b com a distância da fruta caída,\n * for menor que o ponto final da casa, incrementa-se na variável $fruito\n */\n $forange = ($b + $oranges[$i]);\n if ($forange >= $s && $forange <= $t){\n $fruito++;\n }\n }\n // Imprime o resultado da variavel $fruito\n print $fruito;\n}", "function test12($user, $timespan) {\n\n}", "public function beamtime_beam_status($pvname,$begin_time,$end_time) {\n\n $leftmost = null;\n {\n $sql = \"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp IN (select MAX(timestamp) AS timestamp from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp <= {$begin_time->to64()} ) ORDER BY timestamp\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query\" );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] )\n $leftmost = array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value']));\n }\n }\n $within = array();\n {\n $result = $this->query(\"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND ( {$begin_time->to64()} < timestamp ) AND ( timestamp < {$end_time->to64()} ) ORDER BY timestamp\");\n for( $nrows = mysql_numrows( $result ), $i = 0; $i < $nrows; $i++ ) {\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n array_push(\n $within,\n array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value'])\n ));\n }\n }\n $value = is_null($leftmost) ? 0 : $leftmost['value'];\n $begin = $begin_time;\n $list = array();\n foreach( $within as $atchange ) {\n $new_value = $atchange['value'];\n if( $new_value == $value ) continue;\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $atchange['timestamp'],\n 'status' => $value ));\n $value = $new_value;\n $begin = $atchange['timestamp'];\n }\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $end_time,\n 'status' => $value ));\n return $list;\n }", "abstract protected function get_data($start_time, $end_time);", "function get_times($starttime,$endtime){\r\n\t$begin = new DateTime(date(\"H:i\", strtotime($starttime)));\r\n\t$end = new DateTime(date(\"H:i\", strtotime($endtime)));\r\n\r\n$timerange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\nforeach($timerange as $time){\r\n\t$atimes[] =$time->format(\"H:i A\");\r\n}\r\n$atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\nreturn $atimes; \r\n}", "public function countSecond($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%s');\n\t}", "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\r\n // Write your code here\r\n $result = [];\r\n $count = 0;\r\n foreach ($apples as $_apple) {\r\n # code...\r\n $position = $a + $_apple;\r\n if(($position >= $s) && ($position <= $t)){\r\n $count++;\r\n }\r\n }\r\n $result[] = $count;\r\n \r\n $count = 0;\r\n foreach ($oranges as $_orange) {\r\n # code...\r\n $position = $b + $_orange;\r\n if(($position >= $s) && ($position <= $t)){\r\n $count++;\r\n }\r\n }\r\n $result[] = $count;\r\n return $result;\r\n}", "function late_ride(int $n): int {\n // Coding and coding ... \n return array_sum(str_split(gmdate(\"H:i\", $n*60)));\n}", "function get_times($startdate,$enddate){\r\n $begin = new DateTime(date(\"H:i\", strtotime($startdate)));\r\n $end = new DateTime(date(\"H:i\", strtotime($enddate)));\r\n\r\n $daterange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\n foreach($daterange as $date){\r\n $atimes[] =$date->format(\"H:i A\");\r\n }\r\n $atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\n return $atimes; \r\n }", "function time_diff($start_time,$end_time) {\n\n\t//subtract our times to get the difference\n\t$calcStArray = explode(\":\",$start_time);\n\t$calcEtArray = explode(\":\",$end_time);\n\n\t$start_hour = $calcStArray[0];\n\t$start_min = $calcStArray[1];\n\n\t$end_hour = $calcEtArray[0];\n\t$end_min = $calcEtArray[1];\n\n\t//reduce our dates to timestamps. We use a random date here, since it does not matter\n\t$ts1 = mktime($start_hour,$start_min,\"0\",1,1,2000);\n\t$ts2 = mktime($end_hour,$end_min,\"0\",1,1,2000);\n\n\t//get the number of seconds\n\t$diff = $ts2 - $ts1;\n\n\t$temp = $diff/3600;\n\n\t//get the place of the decimal point\n\t$pos = strpos($temp,\".\");\n\n\t//if we have pos, there is a decimal point\n\tif ($pos) {\n\n\t\t$dur_hour = intval($temp);\n\t\t$min = substr($temp,$pos);\n\n\t\t//convert to clock nums\n\t\tif ($min==\".5\") $dur_min = \"30\";\n\t\telseif ($min==\".25\") $dur_min = \"15\";\n\t\telseif ($min==\".75\") $dur_min = \"45\";\n\n\t}\n\telse {\n\t\t$dur_hour = $temp;\n\t\t$dur_min = \"00\";\n\t}\n\n\treturn array($dur_hour,$dur_min);\n\n}", "public static function getTimeLoadPage($startTime, $endTime) {\n\t\t$ip_allow = json_decode(file_get_contents(BASE_PATH . '/ip_allow.json'), true);\n\t\tif(in_array($_SERVER['REMOTE_ADDR'], $ip_allow )) {\n\t\t\treturn '<div class=\"text-center\"> Time: ' . number_format($endTime - $startTime, 4, '.', '.') . 's - Memory usage: '. number_format(memory_get_usage() / 1024) .'KB</div>';\n\t\t}\n\n\t\treturn ;\n\t}", "public function beamtime_beam_status($pvname,$begin_time,$end_time) {\n\n $maxtimestamp = null;\n {\n $sql = \"select MAX(timestamp) AS timestamp from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp <= {$begin_time->to64()}\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query: \".$sql );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] ) $maxtimestamp = $attr['timestamp'];\n }\n }\n $leftmost = null;\n if( !is_null($maxtimestamp)) {\n $sql = \"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp={$maxtimestamp} ORDER BY timestamp\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query\" );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] )\n $leftmost = array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value']));\n }\n }\n $within = array();\n {\n $result = $this->query(\"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND ( {$begin_time->to64()} < timestamp ) AND ( timestamp < {$end_time->to64()} ) ORDER BY timestamp\");\n for( $nrows = mysql_numrows( $result ), $i = 0; $i < $nrows; $i++ ) {\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n array_push(\n $within,\n array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value'])\n ));\n }\n }\n $value = is_null($leftmost) ? 0 : $leftmost['value'];\n $begin = $begin_time;\n $list = array();\n foreach( $within as $atchange ) {\n $new_value = $atchange['value'];\n if( $new_value == $value ) continue;\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $atchange['timestamp'],\n 'status' => $value ));\n $value = $new_value;\n $begin = $atchange['timestamp'];\n }\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $end_time,\n 'status' => $value ));\n return $list;\n }", "function onlyEndInput($beginTime, $endTime){\n if($beginTime == null && $endTime != null) {\n return true;\n }\n else {\n return false;\n }\n}", "public function testFindByStartTimes()\n {\n $bookingRepo = $this->em->getRepository('GrabagameBookingBundle:Booking');\n $clubRepo = $this->em->getRepository('GrabagameBookingBundle:Club');\n $courtRepo = $this->em->getRepository('GrabagameBookingBundle:Court');\n $club = $clubRepo->find(1); \n $court = $courtRepo->find(2);\n\n $expectedBookings = array();\n $expectedBookings[] = $bookingRepo->find(1);\n $expectedBookings[] = $bookingRepo->find(2);\n\n $startTimes = array(\n new \\DateTime('2012-05-03 06:00:00'),\n new \\DateTime('2012-05-03 10:00:00'),\n new \\DateTime('2012-05-04 09:00:00'),\n );\n\n $bookings = $bookingRepo->findByStartTimes($club, $court, $startTimes);\n\n $this->assertEquals($expectedBookings, $bookings);\n\n $expectedBookings = array();\n $startTimes = array(\n new \\DateTime('2012-05-01 06:00:00'),\n new \\DateTime('2012-05-08 10:00:00'),\n new \\DateTime('2012-05-09 09:00:00'),\n );\n\n $bookings = $bookingRepo->findByStartTimes($club, $court, $startTimes);\n\n $this->assertEquals($expectedBookings, $bookings);\n }", "function elapsed_time($start_time, $finish_time){\n\treturn sc_strtotime($finish_time) - sc_strtotime($start_time);\n}", "public function testBookedSpacesStart()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-14 15:00:00\";\n $end = \"2017-06-17 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "function get_apnt_times($starttime,$endtime){\r\n $vd[] = get_times($starttime, $endtime);\r\n return $flat = array_unique(call_user_func_array('array_merge', $vd));\r\n }", "function check_book_available($hour, $begin, $end, $check){\n if($check == \"begin_check\"){\n if( $hour < $begin || $hour >= $end ){\n return true;\n }\n else{\n return false;\n }\n }\n /* CHECK END SELECTION */\n else if($check == \"end_check\"){\n if( $hour <= $begin || $hour > $end ){\n return true;\n }\n else{\n return false;\n }\n }\n}", "public function testBookedSpacesEnd()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-17 15:00:00\";\n $end = \"2017-06-20 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public function checkLeaveApplyTimeArea($emp_seq_no,$company_id,$begin_time,$end_time)\n {\n if(empty($begin_time) || empty($end_time)) return 'no parameter';\n //$this->DBConn->debug = 1;\n $sql= <<<eof\n select count(*) cnt\n from hr_carding\n where psn_id = :emp_seqno\n and psn_seg_segment_no = :company_id\n and ((breakbegin is null and\n to_date(:begin_time, 'yyyy-mm-dd hh24:mi') between intime and outtime) or\n (breakbegin is not null and\n (to_date(:begin_time1, 'yyyy-mm-dd hh24:mi') between intime and\n breakbegin or to_date(:begin_time2, 'yyyy-mm-dd hh24:mi') between\n breakend and outtime)))\neof;\n $rs = $this->DBConn->GetOne($sql,array('emp_seqno'=>$emp_seq_no,\n 'company_id'=>$company_id,\n 'begin_time'=>$begin_time,\n 'begin_time1'=>$begin_time,\n 'begin_time2'=>$begin_time));\n if($rs==0) return '1';\n $sql = <<<eof\n select count(*) cnt\n from hr_carding\n where psn_id = :emp_seqno\n and psn_seg_segment_no = :company_id\n and ((breakbegin is null and\n to_date(:end_time, 'yyyy-mm-dd hh24:mi') between intime and\n outtime) or\n (breakbegin is not null and\n (to_date(:end_time1, 'yyyy-mm-dd hh24:mi') between intime and\n breakbegin or to_date(:end_time2, 'yyyy-mm-dd hh24:mi') between\n breakend and outtime)))\neof;\n $rs = $this->DBConn->GetOne($sql,array('emp_seqno'=>$emp_seq_no,\n 'company_id'=>$company_id,\n 'end_time'=>$end_time,\n 'end_time2'=>$end_time,\n 'end_time1'=>$end_time));\n if($rs==0) return '2';\n return 'ok';\n }", "function total_intervals($unit, DeteInterval ...$intervals) {\n $time = 0;\n foreach ($intervals as $interval) {\n $time += $interval->$unit;\n }\n return $time;\n}", "function timedifference_in_minutes($start_time, $end_time,$para=\"\") {\n /*$first_date = new DateTime(\"2012-11-30 \" . $start_time);\n $second_date = new DateTime(\"2012-12-21 \" . $end_time);\n $difference = $first_date->diff($second_date);\n //pr($difference);\n return $total_minutes = $difference->h * 60 + $difference->$i;*/\n $start_time = date(\"G:i\", strtotime($start_time));\n $end_time = date(\"G:i\", strtotime($end_time));\n $s_spit = explode(\":\",$start_time);\n $e_spit = explode(\":\",$end_time);\n\n $h1 = (int)($s_spit[0]);\n $m1 = (int)($s_spit[1]);\n\n $h2 = (int)($e_spit[0]);\n $m2 = (int)($e_spit[1]);\n\n //console.log($h1+' '+$m1+' '+$h2+' ' +$m2);\n $counter = 0;\n if(($h2-$h1)<0){\n for($i=$h1;$i<24;$i++) $counter++;\n for($i=1;$i<=$h2;$i++) $counter++;\n } else if(($h2-$h1)>0){\n $counter = $h2-$h1;\n } else {\n $counter = 24;\n }\n $minutes = 0;\n if(($m2-$m1)<0) {\n $minutes = 0-($m2-$m1);\n $counter--;\n } else {\n $minutes = $m2-$m1;\n }\n if ($para =='hours') {\n return ($counter . \" hrs : \" . $minutes . \" mins\");\n }\n return ($counter*60 + $minutes);\n \n}", "public function countMinute($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%i');\n\t}", "private function computeOpenSchedules($list) {\n\n // print_array($list, 'input');\n // echo '<br>';\n\n $st = array();\n $et = array();\n $final = array();\n $start = 7;\n $end = 21;\n $temp = $start;\n\n while($temp < $end) {\n array_push( $st, number_format((float)$temp, 2, ':', '') );\n $temp++;\n }\n\n $temp = $start++;\n while( $start <= $end ) {\n array_push( $et, number_format((float)$start, 2, ':', '') );\n $start++;\n }\n\n // print_array($st, 'start_time');\n // print_array($et, 'end_time');\n // echo '<br>';\n\n foreach( $list as $val ) {\n $times = explode(\"-\", $val);\n $start_time = trim($times[0]);\n $end_time = trim($times[1]);\n\n $range = $this->find_range($start_time, $end_time);\n \n if (($key = array_search($start_time, $st)) !== false) {\n unset($st[$key]);\n }\n\n if (($key = array_search($end_time, $et)) !== false) {\n unset($et[$key]);\n }\n\n foreach($range as $time) {\n if (($key = array_search($time, $st)) !== false) {\n unset($st[$key]);\n }\n\n if (($key = array_search($time, $et)) !== false) {\n unset($et[$key]);\n }\n }\n }\n\n $st = array_values($st);\n $et = array_values($et);\n\n $this->print_array($st, 'start_time');\n $this->print_array($et, 'end_time');\n echo '<br>';\n\n if(count($st) >= count($et)) {\n for($idx = 0; $idx < count($st); $idx++){\n array_push($final, new Time($st[$idx], $et[$idx]));\n }\n } \n return $final;\n }", "public function getPeriodStatus($check, $startTime, $endTime) {\n\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_IN;\n\t\tif ($check == QuizzesComponent::USES_USE) {\n\t\t\t$nowTime = strtotime((new NetCommonsTime())->getNowDatetime());\n\t\t\tif (! empty($startTime) && $nowTime < strtotime($startTime)) {\n\t\t\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_BEFORE;\n\t\t\t}\n\t\t\tif (! empty($endTime) && $nowTime > strtotime($endTime)) {\n\t\t\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_END;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public function __construct(&$events, $rangeLowerBound, $rangeUpperBound, $workdayLowerBound = 0, $workdayUpperBound = 24, $length, $topSlots = 5){\n\n\t\tif($workdayLowerBound > $workdayUpperBound || $workdayUpperBound > 1440)\n\t\t\tdie(\"ERROR: Invalid workday interval.\");\n\t\t\n\t\telse{\n\t\t\t$this->workdayLowerBound = $workdayLowerBound;\n\t\t\t$this->workdayUpperBound = $workdayUpperBound;\n\t\t\t$this->rangeLowerBound = $rangeLowerBound;\n\t\t\t$this->rangeUpperBound = $rangeUpperBound;\n\t\t\t$this->topSlots = $topSlots;\n\n\t\t\t$this->root = new IntervalObject(0, 1E9, 'ROOT');\n\t\t\t\n\t\t\tself::$length = $length;\n\n //echo json_encode($rangeLowerBound);\n\n // $workdayLowerBound += $rangeLowerBound;\n // $workdayUpperBound += $rangeLowerBound;\n\n\n foreach($events as $email => $intervals) {\n for($j = 0; $j < count($events[$email]); $j++) {\n $events[$email][$j]['startTime'] += $rangeLowerBound;\n $events[$email][$j]['endTime'] += $rangeLowerBound;\n }\n }\n\n\t\t\tforeach($events as $email => $intervals) {\n $a = new ArrayIterator($intervals);\n\t\t\t\tforeach($a as $interval){\n\n // echo json_encode(\"BEFORE -> \").json_encode($interval).\"\\n\";\n\n if( ($interval['startTime'] % 1440) > $workdayUpperBound){\n $interval['startTime'] = 1440*(floor($interval['startTime']/1440)+1) + $workdayLowerBound;\n }\n else if( ($interval['startTime'] % 1440) < $workdayLowerBound ){\n $interval['startTime'] = 1440*floor($interval['startTime']/1440) + $workdayLowerBound;\n }\n\n //if( ($interval['endTime'] % 1440) < $workdayLowerBound){\n // $interval['endTime'] = 1440*(floor($interval['startTime']/1440)-1) + $workdayLowerBound;\n //}\n //else\n if( ($interval['endTime'] % 1440) > $workdayUpperBound ){\n $interval['endTime'] = 1440*floor($interval['endTime']/1440) + $workdayUpperBound;\n }\n\n //echo json_encode(\"AFTER -> \").json_encode($interval).\"\\n\";\n\n\t\t\t\t\tif( $interval['endTime'] - $interval['startTime'] < $length) {\n // echo json_encode(\"INVALID RANGE => \").json_encode($interval).\"\\n\";\n continue;\n }\n\n\t\t\t\t\t// instead of more than a day apart, divide by 1440 and see if the day matches\n\t\t\t\t\tif(floor($interval['startTime']/1440) < floor($interval['endTime']/1440)){\n //$c = 0;\n\t\t\t\t\t\tdo {\n // var_dump($interval);\n $tempEnd = 1440*floor($interval['startTime']/1440) + $workdayUpperBound;\n\n if($tempEnd > $interval['endTime'])\n $tempEnd = $interval['endTime'];\n\n $a->append(array('startTime' => $interval['startTime'],\n 'endTime' => $tempEnd));\n\n $interval['startTime'] = 1440*(floor($interval['startTime']/1440)+1) + $workdayLowerBound;\n\n //if($c >= 5)\n // break;\n //$c++;\n }\n\t\t\t\t\t\twhile ($interval['startTime'] / 1440 < $interval['endTime'] / 1440);\n\n //die();\n\n\t\t\t\t\t\t// insert the final range\n\t\t\t\t\t\t$a->append(array('startTime' => $interval['startTime'], 'endTime' => $interval['endTime']));\n\t\t\t\t\t}\n else{\n // echo json_encode(\"Inserting: $email -> \").\"\\n\";\n // echo json_encode($interval).\"\\n\";\n $this->root->insertInterval($email, $interval['startTime'], $interval['endTime']);\n }\n\n\n /*\n if( $interval['endTime'] - $interval['startTime'] < 1440 ) {\n echo json_encode(\"Inserting: $email -> \").\"\\n\";\n echo json_encode($interval).\"\\n\";\n $this->root->insertInterval($email, $interval['startTime'], $interval['endTime']);\n }\n else{\n echo json_encode(\"TOO LARGE RANGE => \").json_encode($interval).\"\\n\";\n\n \n }*/\n\n\t\t\t\t}\n\n\t\t\t}\n\n // echo json_encode($events);\n\t\t}\n\n\t}", "public function getFilterTimeCount() {\n \n $columns = array();\n $params = array();\n\n // TODAY\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :todayStart AND n.start_date <= :todayEnd \n OR\n n.end_date >= :todayStart AND n.end_date <= :todayEnd \n OR\n n.start_date < :todayStart AND n.end_date > :todayEnd \n THEN 1 \n ELSE 0 \n END\n ) as today\";\n $params['todayStart'] = $dateStart;\n $params['todayEnd'] = $dateEnd;\n\n // YESTERDAY\n $dateStart = new \\DateTime('yesterday');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime('yesterday');\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :yesterdayStart AND n.start_date <= :yesterdayEnd \n OR\n n.end_date >= :yesterdayStart AND n.end_date <= :yesterdayEnd \n OR\n n.start_date < :yesterdayStart AND n.end_date > :yesterdayEnd \n THEN 1 \n ELSE 0 \n END\n ) as yesterday\";\n $params['yesterdayStart'] = $dateStart;\n $params['yesterdayEnd'] = $dateEnd;\n\n // THIS WEEK\n $today = new \\DateTime();\n if('Sunday' == $today->format('l')) {\n $dateStart = clone $today;\n $dateStart->modify('Monday last week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = $today;\n $dateEnd->setTime(23, 59, 59);\n } else {\n $dateStart = clone $today;\n $dateStart->modify('Monday this week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = clone $today;\n $dateEnd->modify('Sunday this week');\n $dateEnd->setTime(23, 59, 59);\n }\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :thisWeekStart AND n.start_date <= :thisWeekEnd \n OR\n n.end_date >= :thisWeekStart AND n.end_date <= :thisWeekEnd \n OR\n n.start_date < :thisWeekStart AND n.end_date > :thisWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as thisWeek\";\n $params['thisWeekStart'] = $dateStart;\n $params['thisWeekEnd'] = $dateEnd;\n\n // LAST WEEK\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P7D'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :lastWeekStart AND n.start_date <= :lastWeekEnd \n OR\n n.end_date >= :lastWeekStart AND n.end_date <= :lastWeekEnd \n OR\n n.start_date < :lastWeekStart AND n.end_date > :lastWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as lastWeek\";\n $params['lastWeekStart'] = $dateStart;\n $params['lastWeekEnd'] = $dateEnd;\n \n // PAST MONTH\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P1M'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :pastMonthStart AND n.start_date <= :pastMonthEnd \n OR\n n.end_date >= :pastMonthStart AND n.end_date <= :pastMonthEnd \n OR\n n.start_date < :pastMonthStart AND n.end_date > :pastMonthEnd \n THEN 1 \n ELSE 0 \n END\n ) as pastMonth\";\n $params['pastMonthStart'] = $dateStart;\n $params['pastMonthEnd'] = $dateEnd;\n\n return $this->createQueryBuilder('n')\n ->select(implode(', ', $columns))\n ->where('n.draft = false')\n ->setParameters($params)\n ->getQuery()\n ->getOneOrNullResult();\n }", "public function testRentBikesByDate()\n {\n\n $requestParams = [\n 'inputBike' => 3,\n 'dateStart' => new DateTime('2018-06-01 09:00:00'),\n 'dateEnd' => new DateTime('2018-06-21 09:00:00')\n ];\n\n $response = $this->call('POST', '/rentbydates', $requestParams);\n\n $this->assertTrue($response->isOk(), \"Wrong params\");\n\n }", "function printtimediff($start, $end = null) {\n\n\tif( ! $end )\t$end = time();\n\t$ret = '';\n\t$diff = $end - $start;\n\n\t$h = floor($diff/3600);\n\t$diff %= 3600;\n\tif($h > 0) {\n\t\t$ret .= $h.' h ';\n\t}\n\n\t$m = floor($diff/60);\n\t$diff %= 60;\n\tif ( $m > 0 ) {\n\t\t$ret .= $m.' m ';\n\t}\n\n\treturn $ret . $diff .' s';\n}", "function bothTimesEmpty($beginTime, $endTime){\n if($beginTime == null && $endTime == null) {\n return true;\n }\n else {\n return false;\n }\n}", "public function get_half_hour_time_range( $start_time='8:00', $end_time='18:00' ) {\n list( $sh,$sm ) = explode( ':', $start_time );\n list( $eh,$em ) = explode( ':', $end_time );\n $timeRangeArray = array();\n //return ;\n while((int)$sh.$sm < (int)$eh.$em) {\n if($sm == \"00\") {\n $sm = \"30\";\n } else {\n $sm = \"00\";\n $sh = (int)($sh+1);\n }\n $fullTime = date(\"h:ia\",mktime((int)$sh,(int)$sm,0));\n array_push($timeRangeArray,$fullTime);\n if($sh < 10) {\n $sh = \"0\"+$sh;\n }\n }\n return $timeRangeArray;\n }", "public function computeTime($start,$end,$format){\n\t\t$startTime = new DateTime($start);\n\t\t$endTime = new DateTime($end);\n\n\t\t$diff = $startTime->diff($endTime);\n\t\tswitch($format){\n\t\t\tcase 'months':\n\t\t\t\t$year = $diff->format( '%y' );// -> YEAR\n\t\t\t\t$month = $diff->format( '%m' );// -> MONTH\n\t\t\t\tif($year > 0){ // EXCEEDS A YEAR\n\t\t\t\t\t$yearMonth = $year * 12;\n\t\t\t\t\t$output = $yearMonth + $month;\n\t\t\t\t}else{\n\t\t\t\t\t$output = $month;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'month':\n\t\t\t\t$output = $diff->format( '%m' );// -> MONTH\n\t\t\tbreak;\n\t\t\tcase 'days2': // NEGATIVE IF LAPSE\n\t\t\t\t$output = $diff->format( '%R%a' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'days':\n\t\t\t\t$output = $diff->format( '%a' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'hrsMins':\n\t\t\t\t$output = $diff->format( '%H:%I' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'mins':\n\t\t\t\t$output = $diff->format( '%I' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'digits':\n\t\t\t\t$output = $diff->format( '%H.%I:%S' );// -> 00:25:25\n\t\t\t\t$output = round(date('H.i', strtotime($output)),2);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$output = $diff->format( '%H:%I:%S' );// -> 00:25:25\n\t\t\tbreak;\n\t\t}\n\t\treturn $output;\n\t}", "function get_time_difference( $time1, $time2 ) {\n\t$time1 = (int)$time1;\n\t$time2 = (int)$time2;\n\t$result = array(\n\t\t'days' => 0,\n\t\t'hours' => 0,\n\t\t'minutes' => 0,\n\t\t'seconds' => 0\n\t);\n\tif( $time1 == 0 || $time2 == 0) return $result;\n\t\n\tif($time2 > $time1) {\n\t\t$start = date(\"H:i\",$time1);\n\t\t$end = date(\"H:i\",$time2);\n\t} else {\n\t\t$start = date(\"H:i\",$time2);\n\t\t$end = date(\"H:i\",$time1);\t\n\t}\t\n\t\n\t$uts['start'] = $time2;\n\t$uts['end'] = $time1;\n\tif( $uts['start']!==-1 && $uts['end']!==-1 ) {\n\t\tif( $uts['end'] >= $uts['start'] ) {\n\t\t\n\t\t\t$diff = $uts['end'] - $uts['start'];\n\t\t\tif( $days=intval((floor($diff/86400))) ) $diff = $diff % 86400;\n\t\t\tif( $hours=intval((floor($diff/3600))) ) $diff = $diff % 3600;\n\t\t\tif( $minutes=intval((floor($diff/60))) ) $diff = $diff % 60;\n\t\t\t$diff = intval( $diff ); \n\t\t\tif($days > 0) $hours += $days*24;\n\t\t\treturn( array('days'=>str_pad($days,2,0, STR_PAD_LEFT), 'hours'=>str_pad($hours,2,0, STR_PAD_LEFT), 'minutes'=>str_pad($minutes,2,0, STR_PAD_LEFT), 'seconds'=>str_pad($diff,2,0, STR_PAD_LEFT)) );\n\t\t}\t\n\t}\t\n\treturn $result;\n}", "function microtime_diff($message, $start, $end = null)\n{\n if (!$end) {\n $end = microtime();\n }\n\n list($start_usec, $start_sec) = explode(\" \", $start);\n list($end_usec, $end_sec) = explode(\" \", $end);\n $diff_sec = intval($end_sec) - intval($start_sec);\n $diff_usec = floatval($end_usec) - floatval($start_usec);\n $value = floatval($diff_sec) + $diff_usec;\n echo $message . ' ' . $value;\n echo PHP_EOL . PHP_EOL;\n}", "public function getTimeTaken(){\r\n return round($this->getEndTime() - $this->getStartTime(), 6);\r\n }", "public function testWaitTime(){\n $application = new Application;\n\n $testDate1 = array('2012-01-01','2012-01-02','2012-01-03','2012-01-04','2012-01-05','2012-01-06', '2012-01-07');\n $resultDate1 = array(1 => 1, 2 => 1, 3 => 1, 4=> 1, 5=> 1, 6 => 1);\n\n $testDate2 = array('2012-01-01', '0000-00-00', '2012-01-03', '2012-01-04', '2012-01-05', '2012-01-06', '2012-01-07');\n $resultDate2 = array(1 => 0, 2=> 2, 3 => 1, 4 => 1, 5=> 1, 6 => 1);\n\n $testDate3 = array('2012-01-01', '0000-00-00', '0000-00-00', '2012-01-03', '2012-01-04', '2012-01-05', '2012-01-06');\n\t $resultDate3 = array(1 => 0, 2 => 0, 3 => 2, 4=> 1, 5 => 1, 6 => 1);\n\n $testDate4 = array('2012-01-01', '0000-00-00', '0000-00-00', '0000-00-00', '2012-01-03', '2012-01-05', '2012-01-08');\n\t $resultDate4 = array(1 => 0, 2 => 0, 3 => 0, 4 => 2, 5 => 2, 6 => 3);\n \n $calculatedArray = $application->waitTime($testDate1);\n\n\t $this->assertEquals($resultDate1,$calculatedArray);\n\t $this->assertEquals($resultDate2, $application->waitTime($testDate2));\n\t $this->assertEquals($resultDate3, $application->waitTime($testDate3));\n\t $this->assertEquals($resultDate4, $application->waitTime($testDate4));\n\n\t}", "function getEndMicrotime();", "public static function check2Time($startTime = '', $endTime = 0)\n {\n if( $startTime === 'now' ) $startTime = time();\n\n if( is_string($startTime) ) $startTime = strtotime($startTime);\n\n if( is_string($endTime) ) $endTime = strtotime($endTime);\n\n if( $startTime <= $endTime ) return true; else return false;\n }", "function etime($time_start){\n $time_end = microtime(true);\n $execution_time = ($time_end - $time_start);\n\n return number_format((float) $execution_time, 1);\n}", "function countTime($connection, $sql_tiempo){\n $sql = mysqli_query($connection, $sql_tiempo);\n $horas = 0;\n $minutos = 0;\n while($row = mysqli_fetch_row($sql)){\n \n $timeTo = explode(':', $row[0]);\n \n $horas += intval($timeTo[0]);\n $minutos += intval($timeTo[1]);\n \n }\n $final_time = intval((($horas*60) + $minutos)/60).\":\".(($horas*60) + $minutos)%60;\n return $final_time;\n}", "function timecheck ($time) {\n $min = 0;\n if($time->h >= 1) {\n $min += 60*$time->h;\n }\n $min += $time->i;\n if($min == 0) {\n return \"Passage en cours...\";\n } else {\n return $min.\" min\";\n }\n \n\n}", "public static function diffTimeMillis($startTime, $endTime)\n {\n if (!empty($startTime) && !empty($endTime)) {\n return self::MongoDate2msTimeStamp($endTime) - self::MongoDate2msTimeStamp($startTime);\n }\n throw new BadRequestHttpException(Yii::t('common', 'parameters_missing'));\n }", "public function testStart() {\n $timer = new timer( false );\n\n // It should return a starting number\n $this->assertGreaterThan( 0, $timer->start() );\n\t}", "public function getPerformanceScore($dateStart, $dateEnd);", "function time_taken($tally=0, $precision=5) {\n static $start = 0; // first call\n static $notch = 0; // tally calls\n static $time = 0; // set to time of each call (after setting $duration)\n $now = microtime(1);\n if (! $start) { // init, basically\n $time = $notch = $start = $now;\n return \"Starting at $start.\\n\";\n }\n $duration = $now - $time;\n $time = $now;\n $out = \"That took \".round($duration, $precision).\" seconds.\";\n if ($tally) { // time passed since last tally\n $since_start = $now - $start;\n $since_last_notch = $now - $notch;\n $notch = $now;\n $out .= \"<br>\\n\". round($since_start, $precision) .' seconds since start'.($since_start!=$since_last_notch ? ' ('.round($since_last_notch, $precision) .' since last sum).':'.');\n }\n return $out.\"\\n\";\n}", "public function testGetStart() {\n // It should return an int\n $this->assertGreaterThan( 0, $this->timer->get_start() );\n }", "public function findShiftsByRange($startTime, $endTime)\r\n {\r\n return array();\r\n }", "function _get_booking_duration($initial_hour, $final_hour) {\n\t\t$initial_timestamp = $this->_get_timestamp($initial_hour);\n\t\t$final_timestamp = $this->_get_timestamp($final_hour);\n\t\treturn ($final_timestamp - $initial_timestamp) / 3600.0;\n\t}", "abstract protected function calculate_sample($sampleid, $sampleorigin, $starttime, $endtime);", "public function sumOverAllScoreOfReport($dateStart, $dateEnd);", "function simpleDiff($start, $end = 'NOW') { \n $start_time = strtotime($start);\n $stop_time = strtotime($end);\n\n $diff_time = $start_time - $stop_time;\n\n if (abs($diff_time) < 3600) {\n return ceil($diff_time / 60) . 'm';\n }\n\n return ceil($diff_time / 3600) . 'h';\n }", "function ExampleCountFunction($count_to = 1000000, $message = 'No Message Was Specified.'){\n\t$report_at = round($count_to / 2);\n\t// iterate $i from 0 to $count_to and echo $message at 1/2 way\n\tfor($i=0;$i<$count_to;$i++){\n\t\tif($i == $report_at){\n\t\t\techo $message . PHP_EOL;\n\t\t}\n\t}\n}", "public function testGetTimelogsForTask()\n {\n\n }", "public function callTime($timestamp) {\n\t\t\n\t\t\t$_date['h'] = (int)date(\"G\",$timestamp);\n\t\t\t$_date['m'] = (int)date(\"i\",$timestamp);\n\t\t\t\n\t\t\t$_dayStart = 6;\t\t\t\t\t// Start the day at 6am\n\t\t\t$_morningEnd = 13;\t\t\t\t// Morning ends at 13:00\n\t\t\t$_afternoonEnd = 17;\t\t\t// Afternoon ends at 17:00\n\t\t\t\n\t\t\tif ($_date['h'] < $_morningEnd AND $_date['h'] >= $_dayStart) {\n\t\t\t\t// Time is morning\n\t\t\t\t$_returnTime = 1;\n\t\t\t} else if ($_date['h'] >= $_morningEnd AND $_date['h'] < $_afternoonEnd) {\n\t\t\t\t// Time is Afternoon\n\t\t\t\t$_returnTime = 2;\n\t\t\t} else {\n\t\t\t\t// Time should be evening cos we don't work before 6am\n\t\t\t\t$_returnTime = 3;\n\t\t\t}\n\n\t\t\treturn $_returnTime;\n\t\t}", "function count_time_until_end($end_date)\n{\n $now = new DateTime(\"now\");\n $then = new DateTime(date(\"Y-m-d\", strtotime($end_date)));\n\n return $now < $then ? $then->diff($now)->format(\"%a д. %H:%I:%S\") : \"0 д. 00:00:00\";\n}", "function get_booking_count1($date='',$pm_id = 0,$propertyroomid=0){\r\n\tglobal $db;\r\n\t$count =0;\r\n\tglobal $tblprefix;\r\n\t$new_date = date(\"m/d/Y\",strtotime($date));\r\n\t$qry_booking = \"SELECT id,room_id,check_indate,check_outdate FROM \".$tblprefix.\"property_booking WHERE pm_id=\".$pm_id.\" AND (check_indate='\".$new_date.\"' OR check_outdate='\".$new_date.\"') AND room_id=\".$propertyroomid.\"\";\r\n \r\n $rs_booking = $db->Execute($qry_booking);\r\n\t$rs_booking->MoveFirst();\r\n\twhile (!$rs_booking->EOF){\r\n\t\t$explode_values = explode(',',$rs_booking->fields['room_id']);\r\n\r\n\t\tif(in_array($propertyroomid,$explode_values)){\r\n\t\t\t$count++;\r\n\t\t}\r\n\t\t$rs_booking->MoveNext();\r\n\t}\r\n\treturn $count;\r\n\r\n\r\n}", "function get_time_difference($start, $end) {\r\n\t\r\n $uts['start'] = strtotime($start);\r\n $uts['end'] = strtotime($end);\r\n if ($uts['start']!=false && $uts['end']!=false) {\r\n if ($uts['end'] >= $uts['start']) {\r\n $diff = $uts['end'] - $uts['start'];\r\n\t\t\t$days = intval((floor($diff/60/60/24)));\r\n\t\t\t$hours = intval((floor($diff/60/60)));\r\n\t\t\t$minutes = intval((floor($diff/60)));\r\n $seconds = intval($diff); \r\n return(array('days'=>$days, 'hours'=>$hours, 'minutes'=>$minutes, 'seconds'=>$seconds));\r\n } else {\r\n return(false);\r\n }\r\n } else {\r\n return(false);\r\n }\r\n return(false);\r\n}", "public function getBonuses($dateStart, $dateEnd);", "function get_bottle_count(){\n \n $from_date = $_REQUEST['from_date'];\n $to_date = $_REQUEST['to_date'];\n\n $obj = new vintage_has_acquire();\n $columns = \" sum(qty) as qty\";\n $where = null;\n $rst = $obj ->get($where,$columns);\n \n if(!$rst){\n $var_result['success']=false;\n return $var_result; \n }\n\n $var_result['success']=true;\n $var_result['bottle_count']=$rst[0]['qty'];\n return $var_result; \n\n}", "public function timing_interval ($name = 'default') {\n $found = 0;\n //$key = NULL;\n\n foreach($this->timings as $skey => $timer ) {\n if(strcmp($timer['name'], $name) == 0 ) {\n //$key = $skey;\n if (!empty($timer['start'])) {\n $found = 1;\n }\n \n if (empty($timer['stop'])) {\n $stop_time = explode(' ', microtime());\n } else {\n $stop_time = $timer['stop'];\n }\n\n // do the big numbers first so the small ones aren't lost\n $interval = $stop_time[1] - $timer['start'][1];\n $interval += $stop_time[0] - $timer['start'][0];\n }\n }\n\n if ($found == 0 ) {\n return 0;\n }\n\n return $interval;\n }", "function bbTime( $print = true, $die = true ) {\n\t$time \t= round(microtime() - BB_START, 4);\n\t$stime\t= $time . 's.';\n\tif ($print === 2 && Configure::read('debug')) {\n\t\tdebug($stime); \n\t} elseif ($print) {\n\t\techo $stime;\n\t}\n\tif ($die) {\n\t\tdie();\n\t}\n\treturn $time;\n}", "abstract protected function process(\\GalacticBot\\Time $time, $sample);", "function logintimelist1($time1,$time2)\r\n\t{\r\n\t\tif($time1==0 or $time2==0)\r\n\t\t{\r\n\t\t\t$q=array();\r\n\t\t}else{\r\n\t\t\t$time1=strtotime($time1.\" 00:00:00\");\r\n\t\t\t$time2=strtotime($time2.\" 23:59:59\");\r\n\t\t\t$q=array(\r\n\t\t\t\t\"downtime\"=>array('$gt'=>$time1,'$lt'=>$time2),\r\n\t\t\t\t);\r\n\t\t}\r\n//\t\tprint_r( $q);\r\n\t\t$user_online_count=$this->phpmongo->find(\"user_info\",$q,array(\"downtime\"=>1));\r\n\t\t$tmp=array();\r\n\t\tforeach($user_online_count as $value)\r\n\t\t{\r\n\t\t\t$t=date(\"Y-m-d\",$value[\"downtime\"]);\r\n\t\t\tif(isset($tmp[$t])==false)$tmp[$t]=0;\r\n\t\t\t$tmp[$t]+=1;\r\n\t\t}\r\n//\t\tprint_r($tmp);\r\n\t\treturn $tmp;\r\n\t}", "function testDaysPerJobIndicator($session_user) {\n\n/*\n $proj = ProjectCache::getInstance()->getProject(14);\n $issueSel = $proj->getIssueSelection();\n*/\n $proj = ProjectCache::getInstance()->getProject(14);\n $issueSel = new IssueSelection(\"Project $proj->name user \".$session_user->getName());\n $issueList = $proj->getIssues($session_user->id);\n $issueSel->addIssueList($issueList);\n\n\n $daysPerJobIndicator = new DaysPerJobIndicator();\n\n echo 'Testing '.$daysPerJobIndicator->getName().'<br>';\n\n $daysPerJob = $daysPerJobIndicator->execute($issueSel);\n\n $jobs = new Jobs();\n $totalElapsed = 0;\n echo \"<table>\";\n echo \"<caption>\".$issueSel->name.\"</caption>\";\n echo \"<tr><th>name</th><th>nbDays</th><th>color</th><tr>\";\n foreach ($daysPerJob as $id => $duration) {\n echo \"<tr>\";\n echo '<td>'.$jobs->getJobName($id).'</td>';\n echo '<td>'.$duration.'</td>';\n echo '<td>'.$jobs->getJobColor($id).'</td>';\n echo \"</tr>\";\n $totalElapsed += $duration;\n }\n echo \"</table>\";\n echo \"totalElapsed = $totalElapsed<br>\";\n\n}", "function showBestRuns($db)\n{\n $runs = $db->getAllRuns();\n //sort runs and get 5 best\n usort($runs, \"compareRuns\");\n $table = \"<table style=\\\"width:100%\\\"> <tr> <th>Username</th> <th>Time spent</th> <th>Start Time</th> <th> End Time</th> \";\n $runNumber = 1;\n foreach($runs as $run)\n {\n $startTime = $run[\"startTime\"];\n $endTime = $run[\"endTime\"];\n// $timeDiff = strtotime($endTime) - strtotime($endTime); // fix\n $timeDiff = Event::getTimeDiff($endTime, $startTime);\n $username = $run[\"username\"];\n $table .= \"<tr> <td> $username </td><td> $timeDiff</td> <td>$startTime</td> <td>$endTime</td> </tr>\";\n $runNumber += 1;\n }\n $table .= \"</table>\";\n echo $table;\n}", "function emptyArray($beginTimeA, $endTimeA){\n if(count($beginTimeA) == 0) {\n return true;\n }\n else {\n return false;\n }\n}", "abstract protected function get_interval();", "function v1_check_rsam_ssam($object, $sam_stime, $sam_stime_unc, $sam_etime, $sam_etime_unc, $interval, $interval_unc, &$error) {\n\t\n\t// Get RSAM and SSAM data\n\t$elements=$object['value'];\n\t$l_elements=count($elements);\n\t$rsam_found=FALSE;\n\t$ssam_found=FALSE;\n\tfor ($i=0; $i<$l_elements; $i++) {\n\t\t$element=$elements[$i];\n\t\t\n\t\tif ($element['tag']==\"RSAM\") {\n\t\t\t$rsam_found=TRUE;\n\t\t\t$rsam_stime=array();\n\t\t\t$rsam_stime_unc=array();\n\t\t\t\n\t\t\t// Loop on elements\n\t\t\t$rsam_data=$element['value'];\n\t\t\t$l_rsam_data=count($rsam_data);\n\t\t\t\n\t\t\tfor ($j=0; $j<$l_rsam_data; $j++) {\n\t\t\t\t$rsam_datum=$rsam_data[$j];\n\t\t\t\t\n\t\t\t\t// Get start time\n\t\t\t\t$rsm_stime=xml_get_ele($rsam_datum, \"STARTTIME\");\n\t\t\t\t$rsm_stime_unc=xml_get_ele($rsam_datum, \"STARTTIMEUNC\");\n\t\t\t\t\n\t\t\t\t// Store\n\t\t\t\t$rsam_stime[$j]=$rsm_stime;\n\t\t\t\t$rsam_stime_unc[$j]=$rsm_stime_unc;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($element['tag']==\"SSAM\") {\n\t\t\t$ssam_found=TRUE;\n\t\t\t$ssam_stime=array();\n\t\t\t$ssam_stime_unc=array();\n\t\t\t$ssam_lowf=array();\n\t\t\t$ssam_highf=array();\n\t\t\t\n\t\t\t// Loop on elements\n\t\t\t$ssam_data=$element['value'];\n\t\t\t$l_ssam_data=count($ssam_data);\n\t\t\t\n\t\t\tfor ($j=0; $j<$l_ssam_data; $j++) {\n\t\t\t\t$ssam_datum=$ssam_data[$j];\n\t\t\t\t\n\t\t\t\t// Get start time, low and high frequency\n\t\t\t\t$ssm_stime=xml_get_ele($ssam_datum, \"STARTTIME\");\n\t\t\t\t$ssm_stime_unc=xml_get_ele($ssam_datum, \"STARTTIMEUNC\");\n\t\t\t\t$ssm_lowf=xml_get_ele($ssam_datum, \"LOWFREQ\");\n\t\t\t\t$ssm_highf=xml_get_ele($ssam_datum, \"HIGHFREQ\");\n\t\t\t\t\n\t\t\t\t// Store\n\t\t\t\t$ssam_stime[$j]=$ssm_stime;\n\t\t\t\t$ssam_stime_unc[$j]=$ssm_stime_unc;\n\t\t\t\t$ssam_lowf[$j]=$ssm_lowf;\n\t\t\t\t$ssam_highf[$j]=$ssm_highf;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// If no data was found, nothing to check\n\tif (!$rsam_found && !$ssam_found) {\n\t\treturn TRUE;\n\t}\n\t\n\t// Datetime functions\n\trequire_once \"php/funcs/datetime_funcs.php\";\n\t\n\t// Calculate minimum and maximum open time for RSAM-SSAM\n\tif ($sam_stime_unc==NULL) {\n\t\t$min_open_time=$sam_stime;\n\t\t$max_open_time=$sam_stime;\n\t}\n\telse {\n\t\tif (!datetime_get_min_max($sam_stime, $sam_stime_unc, $min_open_time, $max_open_time, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1222;\n\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum open time for RSAM-SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\t// Calculate min end time and max end time for RSAM-SSAM\n\tif ($sam_etime_unc==NULL) {\n\t\t$min_close_time=$sam_etime;\n\t\t$max_close_time=$sam_etime;\n\t}\n\telse {\n\t\tif (!datetime_get_min_max($sam_etime, $sam_etime_unc, $min_close_time, $max_close_time, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1222;\n\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum end time for RSAM-SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\t// Calculate int_min and int_max\n\tif ($interval_unc==NULL) {\n\t\t$interval_min=$interval;\n\t\t$interval_max=$interval;\n\t}\n\telse {\n\t\t$interval_min=$interval-$interval_unc;\n\t\t$interval_max=$interval+$interval_unc;\n\t}\n\t\n\t// If RSAM found, check it\n\tif ($rsam_found) {\n\t\t// Check RSAM\n\t\t\n\t\t// Check RSAM first start date\n\t\t\n\t\t// Sort RSAM array by start date\n\t\tif (!array_multisort($rsam_stime, $rsam_stime_unc)) {\n\t\t\t// Server error\n\t\t\t$error=array();\n\t\t\t$error['code']=3407;\n\t\t\t$error['message']=\"Error when trying to sort dates of RSAM data\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Calculate minimum and maximum start time for RSAM\n\t\tif ($rsam_stime_unc[0]==NULL) {\n\t\t\t$min_rsam_stime=$rsam_stime[0];\n\t\t\t$max_rsam_stime=$rsam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($rsam_stime[0], $rsam_stime_unc[0], $min_rsam_stime, $max_rsam_stime, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1224;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for RSAM: \".$local_error;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If max_rsam_stime < min_open_time => error\n\t\tif (!datetime_date_before_date($max_rsam_stime, $min_open_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare start time for RSAM: \".$local_error;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==0) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'RSAM' start time is earlier than 'RSAM-SSAM': \".$max_rsam_stime.\" < \".$min_open_time;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check intervals between each RSAM time\n\t\t\n\t\t// 1st time - calculate t1_min and t1_max\n\t\tif ($rsam_stime_unc[0]==NULL) {\n\t\t\t$t1_min=$rsam_stime[0];\n\t\t\t$t1_max=$rsam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($rsam_stime[0], $rsam_stime_unc[0], $t1_min, $t1_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1227;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for RSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Calculate last time\n\t\tif ($rsam_stime_unc[$l_rsam_data-1]==NULL) {\n\t\t\t$t2_min=$rsam_stime[$l_rsam_data-1];\n\t\t\t$t2_max=$rsam_stime[$l_rsam_data-1];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($rsam_stime[$l_rsam_data-1], $rsam_stime_unc[$l_rsam_data-1], $t2_min, $t2_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1228;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for RSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check RSAM end time\n\t\t\n\t\t// Calculate min end time and max end time for RSAM\n\t\tif (!datetime_add_seconds($t2_min, $interval_min, $min_rsam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1233;\n\t\t\t$error['message']=\"Error when trying to calculate minimum end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (!datetime_add_seconds($t2_max, $interval_max, $max_rsam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1234;\n\t\t\t$error['message']=\"Error when trying to calculate maximum end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// If min_rsam_etime > max_close_time => error\n\t\tif (!datetime_date_before_date($min_rsam_etime, $max_close_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==2) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'RSAM' end time is later than 'RSAM-SSAM': \".$max_rsam_etime.\" > \".$max_close_time;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\t// If SSAM found, check it\n\tif ($ssam_found) {\n\t\t// Check SSAM\n\t\t\n\t\t// Sort SSAM array by start date and low frequency\n\t\tif (!array_multisort($ssam_stime, $ssam_lowf, $ssam_stime_unc, $ssam_highf)) {\n\t\t\t// Server error\n\t\t\t$error=array();\n\t\t\t$error['code']=3408;\n\t\t\t$error['message']=\"Error when trying to sort dates and low frequency of SSAM data\";\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check first date of SSAM\n\t\t\n\t\t// Calculate minimum and maximum start time for SSAM\n\t\tif ($ssam_stime_unc[0]==NULL) {\n\t\t\t$min_ssam_stime=$ssam_stime[0];\n\t\t\t$max_ssam_stime=$ssam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($ssam_stime[0], $ssam_stime_unc[0], $min_ssam_stime, $max_ssam_stime, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1224;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for SSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If max_ssam_stime < min_open_time => error\n\t\tif (!datetime_date_before_date($max_ssam_stime, $min_open_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare start time for SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==0) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'SSAM' start time is earlier than 'RSAM-SSAM': \".$max_ssam_stime.\" < \".$min_open_time;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check intervals between each SSAM time\n\t\t\n\t\t// 1st time - calculate t1_min and t1_max\n\t\tif ($ssam_stime_unc[0]==NULL) {\n\t\t\t$t1_min=$ssam_stime[0];\n\t\t\t$t1_max=$ssam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($ssam_stime[0], $ssam_stime_unc[0], $t1_min, $t1_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1227;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for SSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t$stime1=$ssam_stime[0];\n\t\t$highf1=$ssam_highf[0];\n\t\t\n\t\t// Minimum low frequency and maximum high frequency\n\t\t$min_low_freq=$ssam_lowf[0];\n\t\t$max_high_freq=NULL;\n\t\t\n\t\t// Calculate last time\n\t\tif ($ssam_stime_unc[$l_ssam_data-1]==NULL) {\n\t\t\t$t2_min=$ssam_stime[$l_ssam_data-1];\n\t\t\t$t2_max=$ssam_stime[$l_ssam_data-1];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($ssam_stime[$l_ssam_data-1], $ssam_stime_unc[$l_ssam_data-1], $t2_min, $t2_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1228;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum last time for SSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check SSAM end time\n\t\t\n\t\t// Calculate min end time and max end time for SSAM\n\t\tif (!datetime_add_seconds($t2_min, $interval_min, $min_ssam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1233;\n\t\t\t$error['message']=\"Error when trying to calculate minimum end time for SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (!datetime_add_seconds($t2_max, $interval_max, $max_ssam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1234;\n\t\t\t$error['message']=\"Error when trying to calculate maximum end time for SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// If min_ssam_etime > max_close_time => error\n\t\tif (!datetime_date_before_date($min_ssam_etime, $max_close_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==2) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'SSAM' end time is later than 'RSAM-SSAM': \".$max_ssam_etime.\" > \".$max_close_time;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\treturn TRUE;\n}", "public function sumScoreOfDefects($dateStart, $dateEnd);", "public function getIntimeCount($time)\n\t{\n\t\t// $time = strtotime($time);\n\t\t// $time = intval($time/1000);\n\t\t// $time = date('Y-m-d h:i:m', $time);\n\t\t$dataProvider = new CActiveDataProvider(Weibo::model()->intime($time));\n\t\treturn intval($dataProvider->totalItemCount);\n\t}", "public function getLevelCount($startTime, $endTime)\n {\n \t$levelArray = array();\n \t$dalCompute = Dal_Island_Compute::getDefaultInstance();\n\n \tif ( !empty($startTime) ) {\n for ( $i = 1; $i < 36; $i ++ ) {\n $levelArray[$i] = $dalCompute->getLevelCountByTime($i, $startTime, $endTime);\n }\n \t}\n \telse {\n\t \tfor ( $i = 1; $i < 36; $i ++ ) {\n\t \t\t$levelArray[$i] = $dalCompute->getLevelCount($i);\n\t \t}\n \t}\n\n \treturn $levelArray;\n }", "public function testWatchCountIsCorrect()\n {\n $totalWatch = $this->stopWatch->getWatchCount();\n\n $this->assertEquals(1, $totalWatch, \"Watch count is not correct\");\n }", "function addNumbers($end, $start = 0) {\r\n $sum = 0;\r\n for($i = $start; $i <= $end; $i++){\r\n $sum += $i;\r\n }\r\n echo(\"The sum of $start to $end = $sum<br \\>\");\r\n\r\n }", "public static function setPrice($intime,$outtime){\n\n $config = json_decode(file_get_contents(dirname(__FILE__).\"/../config.json\"));\n\n $parkedPrice = 0;\n $PriceHour = $config->price->hour;\n $PriceHalfStay = $config->price->halfStay;\n $PriceStay = $config->price->stay;\n\n $parkedTime = $outtime - $intime;\n $timeHour = $config->time->hour;\n $timeHalfStay = $config->time->halfStay;\n $timeStay = $config->time->stay;\n\n while($parkedTime >= $timeStay){\n $parkedPrice += $PriceStay;\n $parkedTime -= $timeStay;\n }\n while($parkedTime >= $timeHalfStay){\n $parkedPrice += $PriceHalfStay;\n $parkedTime -= $timeHalfStay;\n }\n while($parkedTime >= $timeHour){\n $parkedPrice += $PriceHour;\n $parkedTime -= $timeHour;\n }\n if($parkedTime < $timeHour/4){\n $parkedPrice += 0;\n }else{\n $parkedPrice += $PriceHour;\n }\n\n return $parkedPrice;\n }", "public function testBookedSpacesAfter()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-18 15:00:00\";\n $end = \"2017-06-25 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(0, $total_places);\n }", "public function testGetTimelogs()\n {\n\n }", "function total_action_action($low, $high, $action_type) {\n\n $conn = sql_connect();\n\n $query = \"SELECT * FROM Actions WHERE (Action_Time BETWEEN '\".$low.\"' AND '\".$high.\"') AND (Action_Type='\".$action_type.\"');\";\n $sql_res = mysqli_query($conn, $query);\n\n return mysqli_num_rows($sql_res);\n }", "function hackerHot($baseScore,$date_time,$gravity = 1.8){\n \n $upload_time=strtotime($date_time);\n $time_diff=(strtotime('now')-$upload_time);\n $hourPassed=round(($time_diff/(60 * 60)));\n if($hourPassed<0){\n $hourPassed=0;\n }\n \n return round((($baseScore-1)/pow($hourPassed+2,$gravity))*1000);\n }" ]
[ "0.7790364", "0.7621403", "0.7603109", "0.7588029", "0.60771894", "0.6008421", "0.58147156", "0.56051457", "0.55868965", "0.5571136", "0.55647606", "0.55629426", "0.55178624", "0.5490642", "0.5423775", "0.5423357", "0.54195696", "0.5384532", "0.53485453", "0.5302422", "0.5283509", "0.52758133", "0.5248822", "0.51999074", "0.51935244", "0.5185363", "0.5162875", "0.5151294", "0.51339495", "0.51177377", "0.5114994", "0.5099885", "0.5088503", "0.5078033", "0.50660795", "0.5045492", "0.5026368", "0.5001715", "0.49995282", "0.49874488", "0.49848714", "0.49684516", "0.49663308", "0.49425575", "0.49242842", "0.49188697", "0.4910208", "0.49057955", "0.4904739", "0.48980784", "0.48960552", "0.48922783", "0.4889743", "0.48769143", "0.48623472", "0.48572713", "0.48461717", "0.48441124", "0.48441076", "0.48423594", "0.48407713", "0.48394006", "0.4826454", "0.48168647", "0.48144335", "0.48132107", "0.48124602", "0.48111275", "0.48039597", "0.47978333", "0.47971007", "0.479631", "0.477029", "0.47611916", "0.47538218", "0.47337958", "0.47262576", "0.47184014", "0.47117117", "0.47091857", "0.47002426", "0.46973625", "0.46952295", "0.46827978", "0.4674477", "0.4670734", "0.46665713", "0.46664274", "0.46626806", "0.4654274", "0.46535978", "0.46490318", "0.4641435", "0.46413746", "0.46410167", "0.46403986", "0.46366778", "0.463581", "0.46249875", "0.46166143" ]
0.794848
0
countBells test 2 INPUT $startTime = '14:00'; $endTime = '15:00'; OUTPUT 5
public function testcountBells2() { $startTime = '14:00'; $endTime = '15:00'; $expected = 5; $actual = $this->clock->countBells($startTime, $endTime); $this->assertEquals($expected, $actual); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testcountBells1()\n {\n $startTime = '2:00';\n $endTime = '3:00';\n $expected = 5;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells6()\n {\n $startTime = '10:00';\n $endTime = '10:00';\n $expected = 166;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells4()\n {\n $startTime = '23:00';\n $endTime = '1:00';\n $expected = 24;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells3()\n {\n $startTime = '14:23';\n $endTime = '15:42';\n $expected = 3;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function calculateTimePerDay($startTime, $endTime){\n\n $start_time = strtotime(Config::get('mycnf.start_time'));//8:30\n $end_time = strtotime(Config::get('mycnf.end_time')); //18\n $sleep_AM = strtotime(Config::get('mycnf.sleep_AM')); //11:30\n $start_PM = strtotime(Config::get('mycnf.start_PM')); //13\n\n if ($startTime < $sleep_AM) {\n\n if ($endTime < $sleep_AM) {\n $timePerDay = $endTime - $startTime;\n\n }elseif ($endTime > $sleep_AM && $endTime < $start_PM) {\n $timePerDay = $sleep_AM - $startTime;\n\n }elseif ($endTime > $start_PM) {\n $timePerDay = ($sleep_AM - $startTime) + ($endTime - $start_PM);\n }\n\n }elseif ($startTime >= $sleep_AM && $startTime <= $start_PM) {\n\n if ($endTime > $sleep_AM && $endTime < $start_PM ) {\n $timePerDay = 0;\n\n }elseif ($endTime > $start_PM) {\n $timePerDay = $endTime - $start_PM;\n\n }\n\n }elseif ($startTime > $start_PM){\n $timePerDay = $endTime - $startTime;\n\n }\n\n return $timePerDay;\n }", "public function countTimediff($beginTime,$endTime)\n\t{\n\t\t$begins=explode( \":\",$beginTime);\n\t\t$beginseconds=(int)($begins[0])*3600 + (int)($begins[1])*60 + (int)($begins[2]);\n\t\n\t\t$ends=explode(\":\",$endTime);\n\t\t$endseconds=(int)($ends[0])*3600 + (int)($ends[1])*60 + (int)($ends[2]);\n\t\n\t\treturn ($endseconds-$beginseconds);\n\t}", "function get_n_time_slots()\n{\n global $morningstarts, $morningstarts_minutes, $eveningends, $eveningends_minutes;\n global $resolution;\n \n $start_first = (($morningstarts * 60) + $morningstarts_minutes) * 60; // seconds\n $end_last = ((($eveningends * 60) + $eveningends_minutes) * 60) + $resolution; // seconds\n $end_last = $end_last % SECONDS_PER_DAY;\n if (day_past_midnight())\n {\n $end_last += SECONDS_PER_DAY;\n }\n $n_slots = ($end_last - $start_first)/$resolution;\n\n return $n_slots;\n}", "function getBusinessDayCount_timestamp($startStamp,$endStamp){\n\t\t$startStamp=timestamp2utime($startStamp);\n\t\t$endStamp=timestamp2utime($endStamp);\n\t\t$dateTmp=$startStamp;\n\t\t$businessDays=0;\n\t\t$loopEnd=false;\n\t\twhile(!$loopEnd){\n\t\t\t$dateTmp = DateAdd($dateTmp,\"d\",1);\n\t\t\tif(isBusinessDay($dateTmp)){\n\t\t\t\t$businessDays++;\n\t\t\t}\n\t\t\tif($dateTmp==$endStamp){\n\t\t\t\t$loopEnd=true;\n\t\t\t}\n\t\t}\n\t\treturn $businessDays;\n\t}", "function when($parameters) { // $parameters = ['timestamp'], ['numberOfUnits']\n\t$currentTime = time();\n\t\n\tif (preg_match ( '/\\d{4}-\\d{1,2}-\\d{1,2}\\s\\d{1,2}:\\d{1,2}:\\d{1,2}/u', $parameters['timestamp'] )) // /d -> 0-9, nt 1978-2-3 5:8:9, u on seotud UTF-8 ga\n\t{\n\t\t$time = strtotime( $parameters['timestamp'] ); //konventeerib sekunditeks\n\t}\n\telse {\n\t\t$time = $parameters['timestamp'];\n\t}\n\n\tif($currentTime > $time){\n\t\t$difference = $currentTime - $time;\n\t} else {\n\t\t$difference = $time - $currentTime;\n\t}\n\n\t$units = array (\n\t\t\t'second',\n\t\t\t'minute',\n\t\t\t'hour',\n\t\t\t'day',\n\t\t\t'week',\n\t\t\t'month',\n\t\t\t'year',\n\t\t\t'decade'\n\t);\n\t\n\t$secondsInSecond = 1;\n\t$secondsInMinute = 60;\n\t$secondsInHour = $secondsInMinute*60;\n\t$secondsInDay = $secondsInHour*24;\n\t$secondsInWeek = $secondsInDay*7;\n\t$secondsInMonth = $secondsInWeek*(4+1/3);\n\t$secondsInYear = $secondsInMonth*12;\n\t$secondsInDecade = $secondsInYear*10;\n\t\n\t$sizes = array (\t\t\t\t//$sizes = array (\n\t\t\t$secondsInSecond, \t\t//1, //sekund\n\t\t\t$secondsInMinute, \t\t//60, //minut\n\t\t\t$secondsInHour, \t\t// 60*60, //tund\n\t\t\t$secondsInDay,\t\t\t//60*60*24, //päev\n\t\t\t$secondsInWeek, \t\t//60*60*24*7, //nädal\n\t\t\t$secondsInMonth,\t\t//60*60*24*7*(4+1/3), //kuu\n\t\t\t$secondsInYear, \t\t//60*60*24*7*(4+1/3)*12, //aasta\n\t\t\t$secondsInDecade \t\t//60*60*24*7*(4+1/3)*12*10 //kümmend\n\t);\n\n\tfor($positionInUnits = sizeof ( $sizes ) - 1; ($positionInUnits >= 0) && \n\t\t(($amountOfTime = $difference / $sizes [$positionInUnits]) <= 1); $positionInUnits --); \n\t\tif ($positionInUnits < 0)\n\t\t\t$positionInUnits = 0;\n\t\t$remainedTime = $currentTime - ($difference % $sizes [$positionInUnits]);\n\t\t$amountOfTime = floor ( $amountOfTime );\n\t\tif ($amountOfTime != 1) \n\t\t\t$units [$positionInUnits] .= 's';\n\t\t$when = sprintf ( \"%d %s \", $amountOfTime, $units [$positionInUnits] );\n\t\tif (($parameters['numberOfUnits'] == 0) && ($positionInUnits >= 1) && (($currentTime - $remainedTime) > 0))\n\t\t$when .= when ( $remainedTime);\n\t\treturn $when;\n}", "function process($name, $start, $end){\n $time = $end - $start;\n echo \"Task: \" . $name . \"\\t\\t Time: \" . $time . \"\\n\";\n}", "function checkTimeRange($params) {\n\n if (!isset($params['start_date']) || $params['start_date'] == null) {\n return -1;\n }\n \n if (!isset($params['stop_date']) || $params['stop_date'] == null) {\n return -2;\n }\n \n if (!isset($params['start_time']) || $params['start_time'] == null) {\n return -3;\n }\n \n if (!isset($params['end_time']) || $params['end_time'] == null) {\n return -4;\n }\n \n $startTime = $params['start_date'] . ' ' . $params['start_time'];\n $emdTime = $params['stop_date'] . ' ' . $params['end_time'];\n \n if(strtotime($startTime) > strtotime($emdTime)) {\n return -5;\n }\n return 1;\n }", "function timeCalculator($box_times, $call_times){ \n \n $time_output = new TimeOutput();\n \n $box_times_start = date_create($box_times['Start']);\n $box_times_end = date_create($box_times['End']);\n $call_times_start = date_create($call_times['Start']);\n $call_times_end = date_create($call_times['End']);\n \n \n //Stage 1 and 5\n if($call_times_end <= $box_times_start || $box_times_end <= $call_times_start ){\n $time_output->setName(\"stage 1 or stage 5\");\n $time_output->setBoxTime(array(array('Start' => $box_times_start, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end)));\n } \n //Stage 2\n if($call_times_start <= $box_times_start && $box_times_start < $call_times_end\n && $call_times_end < $box_times_end){\n $time_output->setName(\"stage 2\");\n $time_output->setBoxTime(array(array('Start' => $call_times_end, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n \n }\n //Stage 3\n if($box_times_start < $call_times_start && $call_times_end < $box_times_end){\n $time_output->setName(\"stage 3\");\n $time_output->setBoxTime(array(\n array('Start' => $box_times_start, 'END' =>$call_times_start),\n array('Start' => $call_times_end, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n }\n //Stage 4 \n if($box_times_start < $call_times_start && $call_times_start < $box_times_end\n && $box_times_end <= $call_times_end){\n $time_output->setName(\"stage 4\");\n $time_output->setBoxTime(array(array('Start' => $box_times_start, 'END' =>$call_times_start)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n } \n //Stage 6\n if($call_times_start < $box_times_start && $box_times_end < $call_times_end ){\n $time_output->setName(\"stage 6\");\n $time_output->setBoxTime(array(array('Start' => \"\", 'END' => \"\")));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n }\n \n return $time_output;\n}", "function counttime()\n{\n global $time;\n\n $arrHour = explode(\":\", $time);\n $arrTime2 = array(8, 10, 12, 14, 16, 18, 20, 22, 24);\n foreach ($arrTime2 as $intTime)\n {\n if ($arrHour[0] < $intTime)\n {\n $intWait = (($intTime - $arrHour[0]) * 60) - $arrHour[1];\n $intHours = floor($intWait / 60);\n $intMinutes = $intWait % 60;\n break;\n }\n }\n $arrTime = array('', '');\n if ($intHours < 1)\n {\n $arrTime[0] = '';\n }\n if ($intHours == 1)\n {\n $arrTime[0] = $intHours.T_HOUR;\n }\n if ($intHours > 1 && $intHours < 5)\n {\n $arrTime[0] = $intHours.T_HOURS2;\n }\n if ($intHours > 4)\n {\n $arrTime[0] = $intHours.T_HOURS;\n }\n if ($intMinutes < 1)\n {\n $arrTime[1] = '';\n }\n if ($intMinutes == 1)\n {\n $arrTime[1] = $intMinutes.T_MINUTE;\n }\n if (($intMinutes > 1 && $intMinutes < 5) || @ereg(\"^[2-5][2-4]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES2;\n }\n if (($intMinutes > 4 && $intMinutes < 20) || @ereg(\"^[2-5][5-9]*$\", $intMinutes) || @ereg(\"^[2-5][0-1]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES;\n }\n\n return $arrTime;\n}", "function getBusinessDayCount($startStamp,$endStamp){\n\t\t$dateTmp=$startStamp;\n\t\t$businessDays=0;\n\t\t$loopEnd=false;\n\t\twhile(!$loopEnd){\n\t\t\t$dateTmp = DateAdd($dateTmp,\"d\",1);\n\t\t\tif(isBusinessDay($dateTmp)){\n\t\t\t\t$businessDays++;\n\t\t\t}\n\t\t\tif($dateTmp==$endStamp){\n\t\t\t\t$loopEnd=true;\n\t\t\t}\n\t\t}\n\t\treturn $businessDays;\n\t}", "protected static function compareMicrotimes($startTime, $endTime) {\n\t\treturn round($endTime - $startTime, 4);\n\t}", "public function countHour($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%H');\n\t\t//echo $interval->format('%a total days').\"\\n\";\n\t\t//echo $interval->format('%m month, %d days').\"\\n\";\n\t\t//echo $interval->format('%H hour, %i minute').\"\\n\";\n\t}", "function calculateShiftMinutes($startTime, $endTime) {\n $startHourDigits = floor($startTime / 100);\n $startMinuteDigits = $startTime / 100 - $startHourDigits;\n\n $endHourDigits = floor($endTime / 100);\n $endMinuteDigits = $endTime / 100 - $endHourDigits;\n\n $startTimeInMinutes = $startHourDigits * 60 + $startMinuteDigits * 100;\n $endTimeInMinutes = $endHourDigits * 60 + $endMinuteDigits * 100;\n\n $shiftLengthInMinutes = $endTimeInMinutes - $startTimeInMinutes;\n return round($shiftLengthInMinutes);\n}", "function getQueryTime($time_start,$time_end) {\n\t\treturn round($time_end - $time_start,4).'sec';\n\t}", "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\n //Definindo variáveis = 0\n $fruito = $fruito = 0;\n //Executando a contagem de elementos do array para posterior calculo\n for ($i = 0; $i < count($apples); $i++){\n /* Se o calculo da distancia da árvore $a com a distância da fruta caída,\n * for maior que o ponto inicial da casa, incrementa-se na variável $fruita\n */\n $fapple = ($a + $apples[$i]);\n if ($fapple >= $s && $fapple <= $t){\n $fruita++;\n }\n }\n // Imprime o resultado da variavel $fruita\n print $fruita;\n // Salto de linha\n echo \"\\n\";\n //Executando a contagem de elementos do array para posterior calculo\n for ($i = 0; $i < count($oranges); $i++){\n /* Se o calculo da distancia da árvore $b com a distância da fruta caída,\n * for menor que o ponto final da casa, incrementa-se na variável $fruito\n */\n $forange = ($b + $oranges[$i]);\n if ($forange >= $s && $forange <= $t){\n $fruito++;\n }\n }\n // Imprime o resultado da variavel $fruito\n print $fruito;\n}", "function beginIsAfterEnd($beginTime, $endTime){\n if($beginTime > $endTime) {\n return true;\n }\n else {\n return false;\n }\n}", "function getduration_cmn($EndTime, $StartTime) {\n $diff = strtotime($EndTime) - strtotime($StartTime);\n return $diff;\n}", "function getHourDifference($starttime,$endtime){\n\t$start_array = split(\":\",$starttime);\n\t$end_array = split(\":\",$endtime);\n\t\n\t//Use the array elements to get the time in hours\n\t$diff = ($end_array[0] - $start_array[0]) + ($end_array[1] - $start_array[1])/60;\n\t\n\treturn $diff;\n}", "function get_times($startdate,$enddate){\r\n $begin = new DateTime(date(\"H:i\", strtotime($startdate)));\r\n $end = new DateTime(date(\"H:i\", strtotime($enddate)));\r\n\r\n $daterange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\n foreach($daterange as $date){\r\n $atimes[] =$date->format(\"H:i A\");\r\n }\r\n $atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\n return $atimes; \r\n }", "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\r\n // Write your code here\r\n $result = [];\r\n $count = 0;\r\n foreach ($apples as $_apple) {\r\n # code...\r\n $position = $a + $_apple;\r\n if(($position >= $s) && ($position <= $t)){\r\n $count++;\r\n }\r\n }\r\n $result[] = $count;\r\n \r\n $count = 0;\r\n foreach ($oranges as $_orange) {\r\n # code...\r\n $position = $b + $_orange;\r\n if(($position >= $s) && ($position <= $t)){\r\n $count++;\r\n }\r\n }\r\n $result[] = $count;\r\n return $result;\r\n}", "function late_ride(int $n): int {\n // Coding and coding ... \n return array_sum(str_split(gmdate(\"H:i\", $n*60)));\n}", "function get_times($starttime,$endtime){\r\n\t$begin = new DateTime(date(\"H:i\", strtotime($starttime)));\r\n\t$end = new DateTime(date(\"H:i\", strtotime($endtime)));\r\n\r\n$timerange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\nforeach($timerange as $time){\r\n\t$atimes[] =$time->format(\"H:i A\");\r\n}\r\n$atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\nreturn $atimes; \r\n}", "public function getTimes();", "function time_diff($start_time,$end_time) {\n\n\t//subtract our times to get the difference\n\t$calcStArray = explode(\":\",$start_time);\n\t$calcEtArray = explode(\":\",$end_time);\n\n\t$start_hour = $calcStArray[0];\n\t$start_min = $calcStArray[1];\n\n\t$end_hour = $calcEtArray[0];\n\t$end_min = $calcEtArray[1];\n\n\t//reduce our dates to timestamps. We use a random date here, since it does not matter\n\t$ts1 = mktime($start_hour,$start_min,\"0\",1,1,2000);\n\t$ts2 = mktime($end_hour,$end_min,\"0\",1,1,2000);\n\n\t//get the number of seconds\n\t$diff = $ts2 - $ts1;\n\n\t$temp = $diff/3600;\n\n\t//get the place of the decimal point\n\t$pos = strpos($temp,\".\");\n\n\t//if we have pos, there is a decimal point\n\tif ($pos) {\n\n\t\t$dur_hour = intval($temp);\n\t\t$min = substr($temp,$pos);\n\n\t\t//convert to clock nums\n\t\tif ($min==\".5\") $dur_min = \"30\";\n\t\telseif ($min==\".25\") $dur_min = \"15\";\n\t\telseif ($min==\".75\") $dur_min = \"45\";\n\n\t}\n\telse {\n\t\t$dur_hour = $temp;\n\t\t$dur_min = \"00\";\n\t}\n\n\treturn array($dur_hour,$dur_min);\n\n}", "public function countSecond($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%s');\n\t}", "public function beamtime_beam_status($pvname,$begin_time,$end_time) {\n\n $leftmost = null;\n {\n $sql = \"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp IN (select MAX(timestamp) AS timestamp from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp <= {$begin_time->to64()} ) ORDER BY timestamp\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query\" );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] )\n $leftmost = array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value']));\n }\n }\n $within = array();\n {\n $result = $this->query(\"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND ( {$begin_time->to64()} < timestamp ) AND ( timestamp < {$end_time->to64()} ) ORDER BY timestamp\");\n for( $nrows = mysql_numrows( $result ), $i = 0; $i < $nrows; $i++ ) {\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n array_push(\n $within,\n array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value'])\n ));\n }\n }\n $value = is_null($leftmost) ? 0 : $leftmost['value'];\n $begin = $begin_time;\n $list = array();\n foreach( $within as $atchange ) {\n $new_value = $atchange['value'];\n if( $new_value == $value ) continue;\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $atchange['timestamp'],\n 'status' => $value ));\n $value = $new_value;\n $begin = $atchange['timestamp'];\n }\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $end_time,\n 'status' => $value ));\n return $list;\n }", "function test12($user, $timespan) {\n\n}", "public function __construct(&$events, $rangeLowerBound, $rangeUpperBound, $workdayLowerBound = 0, $workdayUpperBound = 24, $length, $topSlots = 5){\n\n\t\tif($workdayLowerBound > $workdayUpperBound || $workdayUpperBound > 1440)\n\t\t\tdie(\"ERROR: Invalid workday interval.\");\n\t\t\n\t\telse{\n\t\t\t$this->workdayLowerBound = $workdayLowerBound;\n\t\t\t$this->workdayUpperBound = $workdayUpperBound;\n\t\t\t$this->rangeLowerBound = $rangeLowerBound;\n\t\t\t$this->rangeUpperBound = $rangeUpperBound;\n\t\t\t$this->topSlots = $topSlots;\n\n\t\t\t$this->root = new IntervalObject(0, 1E9, 'ROOT');\n\t\t\t\n\t\t\tself::$length = $length;\n\n //echo json_encode($rangeLowerBound);\n\n // $workdayLowerBound += $rangeLowerBound;\n // $workdayUpperBound += $rangeLowerBound;\n\n\n foreach($events as $email => $intervals) {\n for($j = 0; $j < count($events[$email]); $j++) {\n $events[$email][$j]['startTime'] += $rangeLowerBound;\n $events[$email][$j]['endTime'] += $rangeLowerBound;\n }\n }\n\n\t\t\tforeach($events as $email => $intervals) {\n $a = new ArrayIterator($intervals);\n\t\t\t\tforeach($a as $interval){\n\n // echo json_encode(\"BEFORE -> \").json_encode($interval).\"\\n\";\n\n if( ($interval['startTime'] % 1440) > $workdayUpperBound){\n $interval['startTime'] = 1440*(floor($interval['startTime']/1440)+1) + $workdayLowerBound;\n }\n else if( ($interval['startTime'] % 1440) < $workdayLowerBound ){\n $interval['startTime'] = 1440*floor($interval['startTime']/1440) + $workdayLowerBound;\n }\n\n //if( ($interval['endTime'] % 1440) < $workdayLowerBound){\n // $interval['endTime'] = 1440*(floor($interval['startTime']/1440)-1) + $workdayLowerBound;\n //}\n //else\n if( ($interval['endTime'] % 1440) > $workdayUpperBound ){\n $interval['endTime'] = 1440*floor($interval['endTime']/1440) + $workdayUpperBound;\n }\n\n //echo json_encode(\"AFTER -> \").json_encode($interval).\"\\n\";\n\n\t\t\t\t\tif( $interval['endTime'] - $interval['startTime'] < $length) {\n // echo json_encode(\"INVALID RANGE => \").json_encode($interval).\"\\n\";\n continue;\n }\n\n\t\t\t\t\t// instead of more than a day apart, divide by 1440 and see if the day matches\n\t\t\t\t\tif(floor($interval['startTime']/1440) < floor($interval['endTime']/1440)){\n //$c = 0;\n\t\t\t\t\t\tdo {\n // var_dump($interval);\n $tempEnd = 1440*floor($interval['startTime']/1440) + $workdayUpperBound;\n\n if($tempEnd > $interval['endTime'])\n $tempEnd = $interval['endTime'];\n\n $a->append(array('startTime' => $interval['startTime'],\n 'endTime' => $tempEnd));\n\n $interval['startTime'] = 1440*(floor($interval['startTime']/1440)+1) + $workdayLowerBound;\n\n //if($c >= 5)\n // break;\n //$c++;\n }\n\t\t\t\t\t\twhile ($interval['startTime'] / 1440 < $interval['endTime'] / 1440);\n\n //die();\n\n\t\t\t\t\t\t// insert the final range\n\t\t\t\t\t\t$a->append(array('startTime' => $interval['startTime'], 'endTime' => $interval['endTime']));\n\t\t\t\t\t}\n else{\n // echo json_encode(\"Inserting: $email -> \").\"\\n\";\n // echo json_encode($interval).\"\\n\";\n $this->root->insertInterval($email, $interval['startTime'], $interval['endTime']);\n }\n\n\n /*\n if( $interval['endTime'] - $interval['startTime'] < 1440 ) {\n echo json_encode(\"Inserting: $email -> \").\"\\n\";\n echo json_encode($interval).\"\\n\";\n $this->root->insertInterval($email, $interval['startTime'], $interval['endTime']);\n }\n else{\n echo json_encode(\"TOO LARGE RANGE => \").json_encode($interval).\"\\n\";\n\n \n }*/\n\n\t\t\t\t}\n\n\t\t\t}\n\n // echo json_encode($events);\n\t\t}\n\n\t}", "abstract protected function get_data($start_time, $end_time);", "function timedifference_in_minutes($start_time, $end_time,$para=\"\") {\n /*$first_date = new DateTime(\"2012-11-30 \" . $start_time);\n $second_date = new DateTime(\"2012-12-21 \" . $end_time);\n $difference = $first_date->diff($second_date);\n //pr($difference);\n return $total_minutes = $difference->h * 60 + $difference->$i;*/\n $start_time = date(\"G:i\", strtotime($start_time));\n $end_time = date(\"G:i\", strtotime($end_time));\n $s_spit = explode(\":\",$start_time);\n $e_spit = explode(\":\",$end_time);\n\n $h1 = (int)($s_spit[0]);\n $m1 = (int)($s_spit[1]);\n\n $h2 = (int)($e_spit[0]);\n $m2 = (int)($e_spit[1]);\n\n //console.log($h1+' '+$m1+' '+$h2+' ' +$m2);\n $counter = 0;\n if(($h2-$h1)<0){\n for($i=$h1;$i<24;$i++) $counter++;\n for($i=1;$i<=$h2;$i++) $counter++;\n } else if(($h2-$h1)>0){\n $counter = $h2-$h1;\n } else {\n $counter = 24;\n }\n $minutes = 0;\n if(($m2-$m1)<0) {\n $minutes = 0-($m2-$m1);\n $counter--;\n } else {\n $minutes = $m2-$m1;\n }\n if ($para =='hours') {\n return ($counter . \" hrs : \" . $minutes . \" mins\");\n }\n return ($counter*60 + $minutes);\n \n}", "public function get_half_hour_time_range( $start_time='8:00', $end_time='18:00' ) {\n list( $sh,$sm ) = explode( ':', $start_time );\n list( $eh,$em ) = explode( ':', $end_time );\n $timeRangeArray = array();\n //return ;\n while((int)$sh.$sm < (int)$eh.$em) {\n if($sm == \"00\") {\n $sm = \"30\";\n } else {\n $sm = \"00\";\n $sh = (int)($sh+1);\n }\n $fullTime = date(\"h:ia\",mktime((int)$sh,(int)$sm,0));\n array_push($timeRangeArray,$fullTime);\n if($sh < 10) {\n $sh = \"0\"+$sh;\n }\n }\n return $timeRangeArray;\n }", "public function countMinute($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%i');\n\t}", "public function getFilterTimeCount() {\n \n $columns = array();\n $params = array();\n\n // TODAY\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :todayStart AND n.start_date <= :todayEnd \n OR\n n.end_date >= :todayStart AND n.end_date <= :todayEnd \n OR\n n.start_date < :todayStart AND n.end_date > :todayEnd \n THEN 1 \n ELSE 0 \n END\n ) as today\";\n $params['todayStart'] = $dateStart;\n $params['todayEnd'] = $dateEnd;\n\n // YESTERDAY\n $dateStart = new \\DateTime('yesterday');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime('yesterday');\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :yesterdayStart AND n.start_date <= :yesterdayEnd \n OR\n n.end_date >= :yesterdayStart AND n.end_date <= :yesterdayEnd \n OR\n n.start_date < :yesterdayStart AND n.end_date > :yesterdayEnd \n THEN 1 \n ELSE 0 \n END\n ) as yesterday\";\n $params['yesterdayStart'] = $dateStart;\n $params['yesterdayEnd'] = $dateEnd;\n\n // THIS WEEK\n $today = new \\DateTime();\n if('Sunday' == $today->format('l')) {\n $dateStart = clone $today;\n $dateStart->modify('Monday last week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = $today;\n $dateEnd->setTime(23, 59, 59);\n } else {\n $dateStart = clone $today;\n $dateStart->modify('Monday this week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = clone $today;\n $dateEnd->modify('Sunday this week');\n $dateEnd->setTime(23, 59, 59);\n }\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :thisWeekStart AND n.start_date <= :thisWeekEnd \n OR\n n.end_date >= :thisWeekStart AND n.end_date <= :thisWeekEnd \n OR\n n.start_date < :thisWeekStart AND n.end_date > :thisWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as thisWeek\";\n $params['thisWeekStart'] = $dateStart;\n $params['thisWeekEnd'] = $dateEnd;\n\n // LAST WEEK\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P7D'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :lastWeekStart AND n.start_date <= :lastWeekEnd \n OR\n n.end_date >= :lastWeekStart AND n.end_date <= :lastWeekEnd \n OR\n n.start_date < :lastWeekStart AND n.end_date > :lastWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as lastWeek\";\n $params['lastWeekStart'] = $dateStart;\n $params['lastWeekEnd'] = $dateEnd;\n \n // PAST MONTH\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P1M'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :pastMonthStart AND n.start_date <= :pastMonthEnd \n OR\n n.end_date >= :pastMonthStart AND n.end_date <= :pastMonthEnd \n OR\n n.start_date < :pastMonthStart AND n.end_date > :pastMonthEnd \n THEN 1 \n ELSE 0 \n END\n ) as pastMonth\";\n $params['pastMonthStart'] = $dateStart;\n $params['pastMonthEnd'] = $dateEnd;\n\n return $this->createQueryBuilder('n')\n ->select(implode(', ', $columns))\n ->where('n.draft = false')\n ->setParameters($params)\n ->getQuery()\n ->getOneOrNullResult();\n }", "private function computeOpenSchedules($list) {\n\n // print_array($list, 'input');\n // echo '<br>';\n\n $st = array();\n $et = array();\n $final = array();\n $start = 7;\n $end = 21;\n $temp = $start;\n\n while($temp < $end) {\n array_push( $st, number_format((float)$temp, 2, ':', '') );\n $temp++;\n }\n\n $temp = $start++;\n while( $start <= $end ) {\n array_push( $et, number_format((float)$start, 2, ':', '') );\n $start++;\n }\n\n // print_array($st, 'start_time');\n // print_array($et, 'end_time');\n // echo '<br>';\n\n foreach( $list as $val ) {\n $times = explode(\"-\", $val);\n $start_time = trim($times[0]);\n $end_time = trim($times[1]);\n\n $range = $this->find_range($start_time, $end_time);\n \n if (($key = array_search($start_time, $st)) !== false) {\n unset($st[$key]);\n }\n\n if (($key = array_search($end_time, $et)) !== false) {\n unset($et[$key]);\n }\n\n foreach($range as $time) {\n if (($key = array_search($time, $st)) !== false) {\n unset($st[$key]);\n }\n\n if (($key = array_search($time, $et)) !== false) {\n unset($et[$key]);\n }\n }\n }\n\n $st = array_values($st);\n $et = array_values($et);\n\n $this->print_array($st, 'start_time');\n $this->print_array($et, 'end_time');\n echo '<br>';\n\n if(count($st) >= count($et)) {\n for($idx = 0; $idx < count($st); $idx++){\n array_push($final, new Time($st[$idx], $et[$idx]));\n }\n } \n return $final;\n }", "public function testRentBikesByDate()\n {\n\n $requestParams = [\n 'inputBike' => 3,\n 'dateStart' => new DateTime('2018-06-01 09:00:00'),\n 'dateEnd' => new DateTime('2018-06-21 09:00:00')\n ];\n\n $response = $this->call('POST', '/rentbydates', $requestParams);\n\n $this->assertTrue($response->isOk(), \"Wrong params\");\n\n }", "function check_book_available($hour, $begin, $end, $check){\n if($check == \"begin_check\"){\n if( $hour < $begin || $hour >= $end ){\n return true;\n }\n else{\n return false;\n }\n }\n /* CHECK END SELECTION */\n else if($check == \"end_check\"){\n if( $hour <= $begin || $hour > $end ){\n return true;\n }\n else{\n return false;\n }\n }\n}", "public function testFindByStartTimes()\n {\n $bookingRepo = $this->em->getRepository('GrabagameBookingBundle:Booking');\n $clubRepo = $this->em->getRepository('GrabagameBookingBundle:Club');\n $courtRepo = $this->em->getRepository('GrabagameBookingBundle:Court');\n $club = $clubRepo->find(1); \n $court = $courtRepo->find(2);\n\n $expectedBookings = array();\n $expectedBookings[] = $bookingRepo->find(1);\n $expectedBookings[] = $bookingRepo->find(2);\n\n $startTimes = array(\n new \\DateTime('2012-05-03 06:00:00'),\n new \\DateTime('2012-05-03 10:00:00'),\n new \\DateTime('2012-05-04 09:00:00'),\n );\n\n $bookings = $bookingRepo->findByStartTimes($club, $court, $startTimes);\n\n $this->assertEquals($expectedBookings, $bookings);\n\n $expectedBookings = array();\n $startTimes = array(\n new \\DateTime('2012-05-01 06:00:00'),\n new \\DateTime('2012-05-08 10:00:00'),\n new \\DateTime('2012-05-09 09:00:00'),\n );\n\n $bookings = $bookingRepo->findByStartTimes($club, $court, $startTimes);\n\n $this->assertEquals($expectedBookings, $bookings);\n }", "public function beamtime_beam_status($pvname,$begin_time,$end_time) {\n\n $maxtimestamp = null;\n {\n $sql = \"select MAX(timestamp) AS timestamp from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp <= {$begin_time->to64()}\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query: \".$sql );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] ) $maxtimestamp = $attr['timestamp'];\n }\n }\n $leftmost = null;\n if( !is_null($maxtimestamp)) {\n $sql = \"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp={$maxtimestamp} ORDER BY timestamp\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query\" );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] )\n $leftmost = array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value']));\n }\n }\n $within = array();\n {\n $result = $this->query(\"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND ( {$begin_time->to64()} < timestamp ) AND ( timestamp < {$end_time->to64()} ) ORDER BY timestamp\");\n for( $nrows = mysql_numrows( $result ), $i = 0; $i < $nrows; $i++ ) {\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n array_push(\n $within,\n array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value'])\n ));\n }\n }\n $value = is_null($leftmost) ? 0 : $leftmost['value'];\n $begin = $begin_time;\n $list = array();\n foreach( $within as $atchange ) {\n $new_value = $atchange['value'];\n if( $new_value == $value ) continue;\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $atchange['timestamp'],\n 'status' => $value ));\n $value = $new_value;\n $begin = $atchange['timestamp'];\n }\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $end_time,\n 'status' => $value ));\n return $list;\n }", "public function checkLeaveApplyTimeArea($emp_seq_no,$company_id,$begin_time,$end_time)\n {\n if(empty($begin_time) || empty($end_time)) return 'no parameter';\n //$this->DBConn->debug = 1;\n $sql= <<<eof\n select count(*) cnt\n from hr_carding\n where psn_id = :emp_seqno\n and psn_seg_segment_no = :company_id\n and ((breakbegin is null and\n to_date(:begin_time, 'yyyy-mm-dd hh24:mi') between intime and outtime) or\n (breakbegin is not null and\n (to_date(:begin_time1, 'yyyy-mm-dd hh24:mi') between intime and\n breakbegin or to_date(:begin_time2, 'yyyy-mm-dd hh24:mi') between\n breakend and outtime)))\neof;\n $rs = $this->DBConn->GetOne($sql,array('emp_seqno'=>$emp_seq_no,\n 'company_id'=>$company_id,\n 'begin_time'=>$begin_time,\n 'begin_time1'=>$begin_time,\n 'begin_time2'=>$begin_time));\n if($rs==0) return '1';\n $sql = <<<eof\n select count(*) cnt\n from hr_carding\n where psn_id = :emp_seqno\n and psn_seg_segment_no = :company_id\n and ((breakbegin is null and\n to_date(:end_time, 'yyyy-mm-dd hh24:mi') between intime and\n outtime) or\n (breakbegin is not null and\n (to_date(:end_time1, 'yyyy-mm-dd hh24:mi') between intime and\n breakbegin or to_date(:end_time2, 'yyyy-mm-dd hh24:mi') between\n breakend and outtime)))\neof;\n $rs = $this->DBConn->GetOne($sql,array('emp_seqno'=>$emp_seq_no,\n 'company_id'=>$company_id,\n 'end_time'=>$end_time,\n 'end_time2'=>$end_time,\n 'end_time1'=>$end_time));\n if($rs==0) return '2';\n return 'ok';\n }", "public function testBookedSpacesStart()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-14 15:00:00\";\n $end = \"2017-06-17 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public static function getTimeLoadPage($startTime, $endTime) {\n\t\t$ip_allow = json_decode(file_get_contents(BASE_PATH . '/ip_allow.json'), true);\n\t\tif(in_array($_SERVER['REMOTE_ADDR'], $ip_allow )) {\n\t\t\treturn '<div class=\"text-center\"> Time: ' . number_format($endTime - $startTime, 4, '.', '.') . 's - Memory usage: '. number_format(memory_get_usage() / 1024) .'KB</div>';\n\t\t}\n\n\t\treturn ;\n\t}", "public function testBookedSpacesEnd()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-17 15:00:00\";\n $end = \"2017-06-20 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public function sumOverAllScoreOfReport($dateStart, $dateEnd);", "function get_apnt_times($starttime,$endtime){\r\n $vd[] = get_times($starttime, $endtime);\r\n return $flat = array_unique(call_user_func_array('array_merge', $vd));\r\n }", "public function testWaitTime(){\n $application = new Application;\n\n $testDate1 = array('2012-01-01','2012-01-02','2012-01-03','2012-01-04','2012-01-05','2012-01-06', '2012-01-07');\n $resultDate1 = array(1 => 1, 2 => 1, 3 => 1, 4=> 1, 5=> 1, 6 => 1);\n\n $testDate2 = array('2012-01-01', '0000-00-00', '2012-01-03', '2012-01-04', '2012-01-05', '2012-01-06', '2012-01-07');\n $resultDate2 = array(1 => 0, 2=> 2, 3 => 1, 4 => 1, 5=> 1, 6 => 1);\n\n $testDate3 = array('2012-01-01', '0000-00-00', '0000-00-00', '2012-01-03', '2012-01-04', '2012-01-05', '2012-01-06');\n\t $resultDate3 = array(1 => 0, 2 => 0, 3 => 2, 4=> 1, 5 => 1, 6 => 1);\n\n $testDate4 = array('2012-01-01', '0000-00-00', '0000-00-00', '0000-00-00', '2012-01-03', '2012-01-05', '2012-01-08');\n\t $resultDate4 = array(1 => 0, 2 => 0, 3 => 0, 4 => 2, 5 => 2, 6 => 3);\n \n $calculatedArray = $application->waitTime($testDate1);\n\n\t $this->assertEquals($resultDate1,$calculatedArray);\n\t $this->assertEquals($resultDate2, $application->waitTime($testDate2));\n\t $this->assertEquals($resultDate3, $application->waitTime($testDate3));\n\t $this->assertEquals($resultDate4, $application->waitTime($testDate4));\n\n\t}", "function elapsed_time($start_time, $finish_time){\n\treturn sc_strtotime($finish_time) - sc_strtotime($start_time);\n}", "function get_time_difference( $time1, $time2 ) {\n\t$time1 = (int)$time1;\n\t$time2 = (int)$time2;\n\t$result = array(\n\t\t'days' => 0,\n\t\t'hours' => 0,\n\t\t'minutes' => 0,\n\t\t'seconds' => 0\n\t);\n\tif( $time1 == 0 || $time2 == 0) return $result;\n\t\n\tif($time2 > $time1) {\n\t\t$start = date(\"H:i\",$time1);\n\t\t$end = date(\"H:i\",$time2);\n\t} else {\n\t\t$start = date(\"H:i\",$time2);\n\t\t$end = date(\"H:i\",$time1);\t\n\t}\t\n\t\n\t$uts['start'] = $time2;\n\t$uts['end'] = $time1;\n\tif( $uts['start']!==-1 && $uts['end']!==-1 ) {\n\t\tif( $uts['end'] >= $uts['start'] ) {\n\t\t\n\t\t\t$diff = $uts['end'] - $uts['start'];\n\t\t\tif( $days=intval((floor($diff/86400))) ) $diff = $diff % 86400;\n\t\t\tif( $hours=intval((floor($diff/3600))) ) $diff = $diff % 3600;\n\t\t\tif( $minutes=intval((floor($diff/60))) ) $diff = $diff % 60;\n\t\t\t$diff = intval( $diff ); \n\t\t\tif($days > 0) $hours += $days*24;\n\t\t\treturn( array('days'=>str_pad($days,2,0, STR_PAD_LEFT), 'hours'=>str_pad($hours,2,0, STR_PAD_LEFT), 'minutes'=>str_pad($minutes,2,0, STR_PAD_LEFT), 'seconds'=>str_pad($diff,2,0, STR_PAD_LEFT)) );\n\t\t}\t\n\t}\t\n\treturn $result;\n}", "public function getBonuses($dateStart, $dateEnd);", "public function findShiftsByRange($startTime, $endTime)\r\n {\r\n return array();\r\n }", "function _get_booking_duration($initial_hour, $final_hour) {\n\t\t$initial_timestamp = $this->_get_timestamp($initial_hour);\n\t\t$final_timestamp = $this->_get_timestamp($final_hour);\n\t\treturn ($final_timestamp - $initial_timestamp) / 3600.0;\n\t}", "public function calculateRangeKwhCosts($beginDate, $endDate){\n \t \n\t\treturn $this->calculateTimeRangeKwhCosts(date (\"Y-m-d 00:00:00\", strtotime($beginDate)),date (\"Y-m-d 00:00:00\", strtotime (\"+1 day\", strtotime($endDate))) );\n\n }", "public function getPerformanceScore($dateStart, $dateEnd);", "function countTime($connection, $sql_tiempo){\n $sql = mysqli_query($connection, $sql_tiempo);\n $horas = 0;\n $minutos = 0;\n while($row = mysqli_fetch_row($sql)){\n \n $timeTo = explode(':', $row[0]);\n \n $horas += intval($timeTo[0]);\n $minutos += intval($timeTo[1]);\n \n }\n $final_time = intval((($horas*60) + $minutos)/60).\":\".(($horas*60) + $minutos)%60;\n return $final_time;\n}", "public function getTimeTaken(){\r\n return round($this->getEndTime() - $this->getStartTime(), 6);\r\n }", "function total_intervals($unit, DeteInterval ...$intervals) {\n $time = 0;\n foreach ($intervals as $interval) {\n $time += $interval->$unit;\n }\n return $time;\n}", "public function sumScoreOfDefects($dateStart, $dateEnd);", "function getEndMicrotime();", "function hackerHot($baseScore,$date_time,$gravity = 1.8){\n \n $upload_time=strtotime($date_time);\n $time_diff=(strtotime('now')-$upload_time);\n $hourPassed=round(($time_diff/(60 * 60)));\n if($hourPassed<0){\n $hourPassed=0;\n }\n \n return round((($baseScore-1)/pow($hourPassed+2,$gravity))*1000);\n }", "function get_bottle_count(){\n \n $from_date = $_REQUEST['from_date'];\n $to_date = $_REQUEST['to_date'];\n\n $obj = new vintage_has_acquire();\n $columns = \" sum(qty) as qty\";\n $where = null;\n $rst = $obj ->get($where,$columns);\n \n if(!$rst){\n $var_result['success']=false;\n return $var_result; \n }\n\n $var_result['success']=true;\n $var_result['bottle_count']=$rst[0]['qty'];\n return $var_result; \n\n}", "public function callTime($timestamp) {\n\t\t\n\t\t\t$_date['h'] = (int)date(\"G\",$timestamp);\n\t\t\t$_date['m'] = (int)date(\"i\",$timestamp);\n\t\t\t\n\t\t\t$_dayStart = 6;\t\t\t\t\t// Start the day at 6am\n\t\t\t$_morningEnd = 13;\t\t\t\t// Morning ends at 13:00\n\t\t\t$_afternoonEnd = 17;\t\t\t// Afternoon ends at 17:00\n\t\t\t\n\t\t\tif ($_date['h'] < $_morningEnd AND $_date['h'] >= $_dayStart) {\n\t\t\t\t// Time is morning\n\t\t\t\t$_returnTime = 1;\n\t\t\t} else if ($_date['h'] >= $_morningEnd AND $_date['h'] < $_afternoonEnd) {\n\t\t\t\t// Time is Afternoon\n\t\t\t\t$_returnTime = 2;\n\t\t\t} else {\n\t\t\t\t// Time should be evening cos we don't work before 6am\n\t\t\t\t$_returnTime = 3;\n\t\t\t}\n\n\t\t\treturn $_returnTime;\n\t\t}", "function onlyEndInput($beginTime, $endTime){\n if($beginTime == null && $endTime != null) {\n return true;\n }\n else {\n return false;\n }\n}", "public function sumCountOfReports($dateStart, $dateEnd);", "public function getPeriodStatus($check, $startTime, $endTime) {\n\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_IN;\n\t\tif ($check == QuizzesComponent::USES_USE) {\n\t\t\t$nowTime = strtotime((new NetCommonsTime())->getNowDatetime());\n\t\t\tif (! empty($startTime) && $nowTime < strtotime($startTime)) {\n\t\t\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_BEFORE;\n\t\t\t}\n\t\t\tif (! empty($endTime) && $nowTime > strtotime($endTime)) {\n\t\t\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_END;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "function get_booking_count1($date='',$pm_id = 0,$propertyroomid=0){\r\n\tglobal $db;\r\n\t$count =0;\r\n\tglobal $tblprefix;\r\n\t$new_date = date(\"m/d/Y\",strtotime($date));\r\n\t$qry_booking = \"SELECT id,room_id,check_indate,check_outdate FROM \".$tblprefix.\"property_booking WHERE pm_id=\".$pm_id.\" AND (check_indate='\".$new_date.\"' OR check_outdate='\".$new_date.\"') AND room_id=\".$propertyroomid.\"\";\r\n \r\n $rs_booking = $db->Execute($qry_booking);\r\n\t$rs_booking->MoveFirst();\r\n\twhile (!$rs_booking->EOF){\r\n\t\t$explode_values = explode(',',$rs_booking->fields['room_id']);\r\n\r\n\t\tif(in_array($propertyroomid,$explode_values)){\r\n\t\t\t$count++;\r\n\t\t}\r\n\t\t$rs_booking->MoveNext();\r\n\t}\r\n\treturn $count;\r\n\r\n\r\n}", "public function testStart() {\n $timer = new timer( false );\n\n // It should return a starting number\n $this->assertGreaterThan( 0, $timer->start() );\n\t}", "function count_time_until_end($end_date)\n{\n $now = new DateTime(\"now\");\n $then = new DateTime(date(\"Y-m-d\", strtotime($end_date)));\n\n return $now < $then ? $then->diff($now)->format(\"%a д. %H:%I:%S\") : \"0 д. 00:00:00\";\n}", "function printtimediff($start, $end = null) {\n\n\tif( ! $end )\t$end = time();\n\t$ret = '';\n\t$diff = $end - $start;\n\n\t$h = floor($diff/3600);\n\t$diff %= 3600;\n\tif($h > 0) {\n\t\t$ret .= $h.' h ';\n\t}\n\n\t$m = floor($diff/60);\n\t$diff %= 60;\n\tif ( $m > 0 ) {\n\t\t$ret .= $m.' m ';\n\t}\n\n\treturn $ret . $diff .' s';\n}", "function CalculateWeeklyRecurrancesInRange($startTime, $endTime, $event, $recurrance, $absoluteEnd)\r\n{\r\n\t$ret = array();\r\n\t\t\r\n\tif(strpos($recurrance,\"Every week\") === false || $endTime < $event->startTime || $absoluteEnd < $startTime){\r\n\t\treturn $ret;\r\n\t}\r\n\r\n\t$searchDate1 = clone $startTime;\r\n\t$searchDate2;\r\n\t\r\n\tfor($i = 0; $i < 7; $i++){\r\n\t\tif($searchDate1 > $endTime)\r\n\t\t\tbreak;\r\n\t\tif(strpos($recurrance,$searchDate1->format(\"l\")) !== false)\r\n\t\t{\r\n\t\t\t$searchDate2 = clone $searchDate1;\r\n\t\t\twhile($searchDate2 <= $endTime){\r\n\t\t\t\tif($searchDate2 > $endTime)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t$newEvent = clone $event;\r\n\t\t\t\t$newEvent->startTime = date_create_from_format(\"Y-m-d H:i:s\", $searchDate2->format(\"Y-m-d\").\" \".$event->startTime->format(\"H:i:s\"));\r\n\t\t\t\t$newEvent->endTime = date_create_from_format(\"Y-m-d H:i:s\", $searchDate2->format(\"Y-m-d\").\" \".$event->endTime->format(\"H:i:s\"));\r\n\t\t\t\t//Checks: don't duplicate the original event, verify start & end time range\r\n\t\t\t\tif($newEvent->startTime->format(\"Y-m-d\") != $event->startTime->format(\"Y-m-d\") && $newEvent->startTime < $endTime && $newEvent->endTime > $startTime && !isException($newEvent->startTime, $event) && $newEvent->startTime > $event->startTime && $newEvent->endTime <= $absoluteEnd)\r\n\t\t\t\t\tarray_push($ret, $newEvent);\r\n\t\t\t\t$searchDate2->add(date_interval_create_from_date_string('7 days'));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$searchDate1->add(date_interval_create_from_date_string('1 day'));\r\n\t}\r\n\treturn $ret;\r\n}", "function timecheck ($time) {\n $min = 0;\n if($time->h >= 1) {\n $min += 60*$time->h;\n }\n $min += $time->i;\n if($min == 0) {\n return \"Passage en cours...\";\n } else {\n return $min.\" min\";\n }\n \n\n}", "function get_time_difference($start, $end) {\r\n\t\r\n $uts['start'] = strtotime($start);\r\n $uts['end'] = strtotime($end);\r\n if ($uts['start']!=false && $uts['end']!=false) {\r\n if ($uts['end'] >= $uts['start']) {\r\n $diff = $uts['end'] - $uts['start'];\r\n\t\t\t$days = intval((floor($diff/60/60/24)));\r\n\t\t\t$hours = intval((floor($diff/60/60)));\r\n\t\t\t$minutes = intval((floor($diff/60)));\r\n $seconds = intval($diff); \r\n return(array('days'=>$days, 'hours'=>$hours, 'minutes'=>$minutes, 'seconds'=>$seconds));\r\n } else {\r\n return(false);\r\n }\r\n } else {\r\n return(false);\r\n }\r\n return(false);\r\n}", "function simpleDiff($start, $end = 'NOW') { \n $start_time = strtotime($start);\n $stop_time = strtotime($end);\n\n $diff_time = $start_time - $stop_time;\n\n if (abs($diff_time) < 3600) {\n return ceil($diff_time / 60) . 'm';\n }\n\n return ceil($diff_time / 3600) . 'h';\n }", "public function testGetStart() {\n // It should return an int\n $this->assertGreaterThan( 0, $this->timer->get_start() );\n }", "function ExampleCountFunction($count_to = 1000000, $message = 'No Message Was Specified.'){\n\t$report_at = round($count_to / 2);\n\t// iterate $i from 0 to $count_to and echo $message at 1/2 way\n\tfor($i=0;$i<$count_to;$i++){\n\t\tif($i == $report_at){\n\t\t\techo $message . PHP_EOL;\n\t\t}\n\t}\n}", "function addNumbers($end, $start = 0) {\r\n $sum = 0;\r\n for($i = $start; $i <= $end; $i++){\r\n $sum += $i;\r\n }\r\n echo(\"The sum of $start to $end = $sum<br \\>\");\r\n\r\n }", "function etime($time_start){\n $time_end = microtime(true);\n $execution_time = ($time_end - $time_start);\n\n return number_format((float) $execution_time, 1);\n}", "abstract protected function calculate_sample($sampleid, $sampleorigin, $starttime, $endtime);", "public function testGetTimelogsForTask()\n {\n\n }", "function total_action_action($low, $high, $action_type) {\n\n $conn = sql_connect();\n\n $query = \"SELECT * FROM Actions WHERE (Action_Time BETWEEN '\".$low.\"' AND '\".$high.\"') AND (Action_Type='\".$action_type.\"');\";\n $sql_res = mysqli_query($conn, $query);\n\n return mysqli_num_rows($sql_res);\n }", "public function computeTime($start,$end,$format){\n\t\t$startTime = new DateTime($start);\n\t\t$endTime = new DateTime($end);\n\n\t\t$diff = $startTime->diff($endTime);\n\t\tswitch($format){\n\t\t\tcase 'months':\n\t\t\t\t$year = $diff->format( '%y' );// -> YEAR\n\t\t\t\t$month = $diff->format( '%m' );// -> MONTH\n\t\t\t\tif($year > 0){ // EXCEEDS A YEAR\n\t\t\t\t\t$yearMonth = $year * 12;\n\t\t\t\t\t$output = $yearMonth + $month;\n\t\t\t\t}else{\n\t\t\t\t\t$output = $month;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'month':\n\t\t\t\t$output = $diff->format( '%m' );// -> MONTH\n\t\t\tbreak;\n\t\t\tcase 'days2': // NEGATIVE IF LAPSE\n\t\t\t\t$output = $diff->format( '%R%a' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'days':\n\t\t\t\t$output = $diff->format( '%a' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'hrsMins':\n\t\t\t\t$output = $diff->format( '%H:%I' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'mins':\n\t\t\t\t$output = $diff->format( '%I' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'digits':\n\t\t\t\t$output = $diff->format( '%H.%I:%S' );// -> 00:25:25\n\t\t\t\t$output = round(date('H.i', strtotime($output)),2);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$output = $diff->format( '%H:%I:%S' );// -> 00:25:25\n\t\t\tbreak;\n\t\t}\n\t\treturn $output;\n\t}", "function timeconditions_get_time( $hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish) {\n\n\t//----- Time Hour Interval proccess ----\n\t//\n\tif ($minute_start == '-') {\n\t\t$time_minute_start = \"*\";\n\t} else {\n\t\t$time_minute_start = sprintf(\"%02d\",$minute_start);\n\t}\n\tif ($minute_finish == '-') {\n\t\t$time_minute_finish = \"*\";\n\t} else {\n \t\t$time_minute_finish = sprintf(\"%02d\",$minute_finish);\n\t}\n\tif ($hour_start == '-') {\n\t\t$time_hour_start = '*';\n\t} else {\n\t\t$time_hour_start = sprintf(\"%02d\",$hour_start) . ':' . $time_minute_start;\n\t}\n\tif ($hour_finish == '-') {\n\t\t$time_hour_finish = '*';\n\t} else {\n\t\t$time_hour_finish = sprintf(\"%02d\",$hour_finish) . ':' . $time_minute_finish;\n\t}\n\tif ($time_hour_start == $time_hour_finish) {\n\t\t$time_hour = $time_hour_start;\n\t} else {\n\t\t$time_hour = $time_hour_start . '-' . $time_hour_finish;\n\t}\n\n\t//----- Time Week Day Interval proccess -----\n\t//\n\tif ($wday_start == '-') {\n\t\t$time_wday_start = '*';\n\t} else {\n\t\t$time_wday_start = $wday_start;\n\t}\n\tif ($wday_finish == '-') {\n\t\t$time_wday_finish = '*';\n\t} else {\n\t\t$time_wday_finish = $wday_finish;\n\t}\n\tif ($time_wday_start == $time_wday_finish) {\n\t\t$time_wday = $time_wday_start;\n\t} else {\n\t\t$time_wday = $time_wday_start . '-' . $time_wday_finish;\n\t}\n\n\t//----- Time Month Day Interval proccess -----\n\t//\n\tif ($mday_start == '-') {\n\t\t$time_mday_start = '*';\n\t} else {\n\t\t$time_mday_start = $mday_start;\n\t}\n\tif ($mday_finish == '-') {\n\t\t$time_mday_finish = '*';\n\t} else {\n\t\t$time_mday_finish = $mday_finish;\n\t}\n\tif ($time_mday_start == $time_mday_finish) {\n\t\t$time_mday = $time_mday_start;\n\t} else {\n\t\t$time_mday = $time_mday_start . '-' . $time_mday_finish;\n\t}\n\n\t//----- Time Month Interval proccess -----\n\t//\n\tif ($month_start == '-') {\n\t\t$time_month_start = '*';\n\t} else {\n\t\t$time_month_start = $month_start;\n\t}\n\tif ($month_finish == '-') {\n\t\t$time_month_finish = '*';\n\t} else {\n\t\t$time_month_finish = $month_finish;\n\t}\n\tif ($time_month_start == $time_month_finish) {\n\t\t$time_month = $time_month_start;\n\t} else {\n\t\t$time_month = $time_month_start . '-' . $time_month_finish;\n\t}\n\t$time = $time_hour . '|' . $time_wday . '|' . $time_mday . '|' . $time_month;\n\treturn $time;\n}", "public function getLevelCount($startTime, $endTime)\n {\n \t$levelArray = array();\n \t$dalCompute = Dal_Island_Compute::getDefaultInstance();\n\n \tif ( !empty($startTime) ) {\n for ( $i = 1; $i < 36; $i ++ ) {\n $levelArray[$i] = $dalCompute->getLevelCountByTime($i, $startTime, $endTime);\n }\n \t}\n \telse {\n\t \tfor ( $i = 1; $i < 36; $i ++ ) {\n\t \t\t$levelArray[$i] = $dalCompute->getLevelCount($i);\n\t \t}\n \t}\n\n \treturn $levelArray;\n }", "abstract protected function get_interval();", "public function get_time($i){\n\t\t$tabledata = array('start_time'=> '00:00:00','end_time' =>'00:15:00');\n\t\tswitch($i){\n\t\t\tcase 1:$tabledata = array('start_time'=> '00:00:00','end_time' =>'00:15:00');break;\n\t\t\tcase 2:$tabledata = array('start_time'=> '00:15:01','end_time' =>'00:30:00');break;\n\t\t\tcase 3:$tabledata = array('start_time'=> '00:30:01','end_time' =>'00:45:00');break;\n\t\t\tcase 4:$tabledata = array('start_time'=> '00:45:01','end_time' =>'01:00:00');break;\n\t\t\t\n\t\t\tcase 5:$tabledata = array('start_time'=> '01:00:00','end_time' =>'01:15:00');break;\n\t\t\tcase 6:$tabledata = array('start_time'=> '01:15:01','end_time' =>'01:30:00');break;\n\t\t\tcase 7:$tabledata = array('start_time'=> '01:30:01','end_time' =>'01:45:00');break;\n\t\t\tcase 8:$tabledata = array('start_time'=> '01:45:01','end_time' =>'02:00:00');break;\n\t\t\t\n\t\t\tcase 9:$tabledata = array('start_time'=> '02:00:00','end_time' =>'02:15:00');break;\n\t\t\tcase 10:$tabledata = array('start_time'=> '02:15:01','end_time' =>'02:30:00');break;\n\t\t\tcase 11:$tabledata = array('start_time'=> '02:30:01','end_time' =>'02:45:00');break;\n\t\t\tcase 12:$tabledata = array('start_time'=> '02:45:01','end_time' =>'03:00:00');break;\n\t\t\t\n\t\t\tcase 13:$tabledata = array('start_time'=> '03:00:00','end_time' =>'03:15:00');break;\n\t\t\tcase 14:$tabledata = array('start_time'=> '03:15:01','end_time' =>'03:30:00');break;\n\t\t\tcase 15:$tabledata = array('start_time'=> '03:30:01','end_time' =>'03:45:00');break;\n\t\t\tcase 16:$tabledata = array('start_time'=> '03:45:01','end_time' =>'04:00:00');break;\n\t\t\t\n\t\t\tcase 17:$tabledata = array('start_time'=> '04:00:00','end_time' =>'04:15:00');break;\n\t\t\tcase 18:$tabledata = array('start_time'=> '04:15:01','end_time' =>'04:30:00');break;\n\t\t\tcase 19:$tabledata = array('start_time'=> '04:30:01','end_time' =>'04:45:00');break;\n\t\t\tcase 20:$tabledata = array('start_time'=> '04:45:01','end_time' =>'05:00:00');break;\n\t\t\t\n\t\t\tcase 21:$tabledata = array('start_time'=> '05:00:00','end_time' =>'05:15:00');break;\n\t\t\tcase 22:$tabledata = array('start_time'=> '05:15:01','end_time' =>'05:30:00');break;\n\t\t\tcase 23:$tabledata = array('start_time'=> '05:30:01','end_time' =>'05:45:00');break;\n\t\t\tcase 24:$tabledata = array('start_time'=> '05:45:01','end_time' =>'06:00:00');break;\n\t\t\t\n\t\t\tcase 25:$tabledata = array('start_time'=> '06:00:00','end_time' =>'06:15:00');break;\n\t\t\tcase 26:$tabledata = array('start_time'=> '06:15:01','end_time' =>'06:30:00');break;\n\t\t\tcase 27:$tabledata = array('start_time'=> '06:30:01','end_time' =>'06:45:00');break;\n\t\t\tcase 28:$tabledata = array('start_time'=> '06:45:01','end_time' =>'07:00:00');break;\n\t\t\t\n\t\t\tcase 29:$tabledata = array('start_time'=> '07:00:00','end_time' =>'07:15:00');break;\n\t\t\tcase 30:$tabledata = array('start_time'=> '07:15:01','end_time' =>'07:30:00');break;\n\t\t\tcase 31:$tabledata = array('start_time'=> '07:30:01','end_time' =>'07:45:00');break;\n\t\t\tcase 32:$tabledata = array('start_time'=> '07:45:01','end_time' =>'08:00:00');break;\n\t\t\t\n\t\t\tcase 33:$tabledata = array('start_time'=> '08:00:00','end_time' =>'08:15:00');break;\n\t\t\tcase 34:$tabledata = array('start_time'=> '08:15:01','end_time' =>'08:30:00');break;\n\t\t\tcase 35:$tabledata = array('start_time'=> '08:30:01','end_time' =>'08:45:00');break;\n\t\t\tcase 36:$tabledata = array('start_time'=> '08:45:01','end_time' =>'09:00:00');break;\n\t\t\t\n\t\t\tcase 37:$tabledata = array('start_time'=> '09:00:00','end_time' =>'09:15:00');break;\n\t\t\tcase 38:$tabledata = array('start_time'=> '09:15:01','end_time' =>'09:30:00');break;\n\t\t\tcase 39:$tabledata = array('start_time'=> '09:30:01','end_time' =>'09:45:00');break;\n\t\t\tcase 40:$tabledata = array('start_time'=> '09:45:01','end_time' =>'10:00:00');break;\n\t\t\t\n\t\t\tcase 41:$tabledata = array('start_time'=> '10:00:00','end_time' =>'10:15:00');break;\n\t\t\tcase 42:$tabledata = array('start_time'=> '10:15:01','end_time' =>'10:30:00');break;\n\t\t\tcase 43:$tabledata = array('start_time'=> '10:30:01','end_time' =>'10:45:00');break;\n\t\t\tcase 44:$tabledata = array('start_time'=> '10:45:01','end_time' =>'11:00:00');break;\n\t\t\t\n\t\t\tcase 45:$tabledata = array('start_time'=> '11:00:00','end_time' =>'11:15:00');break;\n\t\t\tcase 46:$tabledata = array('start_time'=> '11:15:01','end_time' =>'11:30:00');break;\n\t\t\tcase 47:$tabledata = array('start_time'=> '11:30:01','end_time' =>'11:45:00');break;\n\t\t\tcase 48:$tabledata = array('start_time'=> '11:45:01','end_time' =>'12:00:00');break;\n\t\t\t\n\t\t\tcase 49:$tabledata = array('start_time'=> '12:00:00','end_time' =>'12:15:00');break;\n\t\t\tcase 50:$tabledata = array('start_time'=> '12:15:01','end_time' =>'12:30:00');break;\n\t\t\tcase 51:$tabledata = array('start_time'=> '12:30:01','end_time' =>'12:45:00');break;\n\t\t\tcase 52:$tabledata = array('start_time'=> '12:45:01','end_time' =>'13:00:00');break;\n\t\t\t\n\t\t\tcase 53:$tabledata = array('start_time'=> '13:00:00','end_time' =>'13:15:00');break;\n\t\t\tcase 54:$tabledata = array('start_time'=> '13:15:01','end_time' =>'13:30:00');break;\n\t\t\tcase 55:$tabledata = array('start_time'=> '13:30:01','end_time' =>'13:45:00');break;\n\t\t\tcase 56:$tabledata = array('start_time'=> '13:45:01','end_time' =>'14:00:00');break;\n\t\t\t\n\t\t\tcase 57:$tabledata = array('start_time'=> '14:00:00','end_time' =>'14:15:00');break;\n\t\t\tcase 58:$tabledata = array('start_time'=> '14:15:01','end_time' =>'14:30:00');break;\n\t\t\tcase 59:$tabledata = array('start_time'=> '14:30:01','end_time' =>'14:45:00');break;\n\t\t\tcase 60:$tabledata = array('start_time'=> '14:45:01','end_time' =>'15:00:00');break;\n\t\t\t\n\t\t\tcase 61:$tabledata = array('start_time'=> '15:00:00','end_time' =>'15:15:00');break;\n\t\t\tcase 62:$tabledata = array('start_time'=> '15:15:01','end_time' =>'15:30:00');break;\n\t\t\tcase 63:$tabledata = array('start_time'=> '15:30:01','end_time' =>'15:45:00');break;\n\t\t\tcase 64:$tabledata = array('start_time'=> '15:45:01','end_time' =>'16:00:00');break;\n\t\t\t\n\t\t\tcase 65:$tabledata = array('start_time'=> '16:00:00','end_time' =>'16:15:00');break;\n\t\t\tcase 66:$tabledata = array('start_time'=> '16:15:01','end_time' =>'16:30:00');break;\n\t\t\tcase 67:$tabledata = array('start_time'=> '16:30:01','end_time' =>'16:45:00');break;\n\t\t\tcase 68:$tabledata = array('start_time'=> '16:45:01','end_time' =>'17:00:00');break;\n\t\t\t\n\t\t\tcase 69:$tabledata = array('start_time'=> '17:00:00','end_time' =>'17:15:00');break;\n\t\t\tcase 70:$tabledata = array('start_time'=> '17:15:01','end_time' =>'17:30:00');break;\n\t\t\tcase 71:$tabledata = array('start_time'=> '17:30:01','end_time' =>'17:45:00');break;\n\t\t\tcase 72:$tabledata = array('start_time'=> '17:45:01','end_time' =>'18:00:00');break;\n\t\t\t\n\t\t\tcase 73:$tabledata = array('start_time'=> '18:00:00','end_time' =>'18:15:00');break;\n\t\t\tcase 74:$tabledata = array('start_time'=> '18:15:01','end_time' =>'18:30:00');break;\n\t\t\tcase 75:$tabledata = array('start_time'=> '18:30:01','end_time' =>'18:45:00');break;\n\t\t\tcase 76:$tabledata = array('start_time'=> '18:45:01','end_time' =>'19:00:00');break;\n\t\t\t\n\t\t\tcase 77:$tabledata = array('start_time'=> '19:00:00','end_time' =>'19:15:00');break;\n\t\t\tcase 78:$tabledata = array('start_time'=> '19:15:01','end_time' =>'19:30:00');break;\n\t\t\tcase 89:$tabledata = array('start_time'=> '19:30:01','end_time' =>'19:45:00');break;\n\t\t\tcase 80:$tabledata = array('start_time'=> '19:45:01','end_time' =>'20:00:00');break;\n\t\t\t\n\t\t\tcase 81:$tabledata = array('start_time'=> '20:00:00','end_time' =>'20:15:00');break;\n\t\t\tcase 82:$tabledata = array('start_time'=> '20:15:01','end_time' =>'20:30:00');break;\n\t\t\tcase 83:$tabledata = array('start_time'=> '20:30:01','end_time' =>'20:45:00');break;\n\t\t\tcase 84:$tabledata = array('start_time'=> '20:45:01','end_time' =>'21:00:00');break;\n\t\t\t\n\t\t\tcase 85:$tabledata = array('start_time'=> '21:00:00','end_time' =>'21:15:00');break;\n\t\t\tcase 86:$tabledata = array('start_time'=> '21:15:01','end_time' =>'21:30:00');break;\n\t\t\tcase 87:$tabledata = array('start_time'=> '21:30:01','end_time' =>'21:45:00');break;\n\t\t\tcase 88:$tabledata = array('start_time'=> '21:45:01','end_time' =>'22:00:00');break;\n\t\t\t\n\t\t\tcase 89:$tabledata = array('start_time'=> '22:00:00','end_time' =>'22:15:00');break;\n\t\t\tcase 90:$tabledata = array('start_time'=> '22:15:01','end_time' =>'22:30:00');break;\n\t\t\tcase 91:$tabledata = array('start_time'=> '22:30:01','end_time' =>'22:45:00');break;\n\t\t\tcase 92:$tabledata = array('start_time'=> '22:45:01','end_time' =>'23:00:00');break;\n\t\t\t\n\t\t\tcase 93:$tabledata = array('start_time'=> '23:00:00','end_time' =>'23:15:00');break;\n\t\t\tcase 94:$tabledata = array('start_time'=> '23:15:01','end_time' =>'23:30:00');break;\n\t\t\tcase 95:$tabledata = array('start_time'=> '23:30:01','end_time' =>'23:45:00');break;\n\t\t\tcase 96:$tabledata = array('start_time'=> '23:45:01','end_time' =>'24:00:00');break;\n\t\t}\n\t\treturn $tabledata;\n\t}", "function time_taken($tally=0, $precision=5) {\n static $start = 0; // first call\n static $notch = 0; // tally calls\n static $time = 0; // set to time of each call (after setting $duration)\n $now = microtime(1);\n if (! $start) { // init, basically\n $time = $notch = $start = $now;\n return \"Starting at $start.\\n\";\n }\n $duration = $now - $time;\n $time = $now;\n $out = \"That took \".round($duration, $precision).\" seconds.\";\n if ($tally) { // time passed since last tally\n $since_start = $now - $start;\n $since_last_notch = $now - $notch;\n $notch = $now;\n $out .= \"<br>\\n\". round($since_start, $precision) .' seconds since start'.($since_start!=$since_last_notch ? ' ('.round($since_last_notch, $precision) .' since last sum).':'.');\n }\n return $out.\"\\n\";\n}", "public function testBookedSpacesAfter()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-18 15:00:00\";\n $end = \"2017-06-25 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(0, $total_places);\n }", "public static function diffTimeMillis($startTime, $endTime)\n {\n if (!empty($startTime) && !empty($endTime)) {\n return self::MongoDate2msTimeStamp($endTime) - self::MongoDate2msTimeStamp($startTime);\n }\n throw new BadRequestHttpException(Yii::t('common', 'parameters_missing'));\n }", "static function match($times, $start, $end, $valueField, &$matrix=null){\r\n\t\tif(empty($times))\r\n\t\t\treturn array();\r\n\r\n\t\t$start -= $start % 3600; \r\n\t\t$end += ($end % 3600)>0? 3600 - ($end % 3600) : 0;\r\n\t\t\r\n\t\t$hits = array();\r\n\t\t\r\n\t\twhile ($start < $end){\r\n\t\t\t$d = date(\"Ymd\", $start);\r\n\t\t\t$h = date(\"H\", $start);\r\n\t\t\tif(isset($matrix[$d][$h])){\r\n\t\t\t\t$hits = array_merge($hits,$matrix[$d][$h]); \r\n\t\t\t}\r\n\t\t\t$start += 3600;\r\n\t\t}\r\n\t\t$hits = array_unique($hits);\r\n\t\treturn $hits;\r\n\t\t\r\n\t}", "function action_freq($low, $high, $action_type) {\n\n $conn = sql_connect();\n\n $query1 = \"SELECT * FROM Actions WHERE (Action_Time BETWEEN '\".$low.\"' AND '\".$high.\"');\";\n $query2 = \"SELECT * FROM Actions WHERE (Action_Time BETWEEN '\".$low.\"' AND '\".$high.\"') AND (Action_Type='\".$action_type.\"');\";\n\n $sql_res1 = mysqli_query($conn, $query1);\n $sql_res2 = mysqli_query($conn, $query2);\n\n if (mysqli_num_rows($sql_res1) == 0) {\n return 0;\n }\n \n return number_format(mysqli_num_rows($sql_res2)/(float)mysqli_num_rows($sql_res1), 2);\n\n }", "function testDaysPerJobIndicator($session_user) {\n\n/*\n $proj = ProjectCache::getInstance()->getProject(14);\n $issueSel = $proj->getIssueSelection();\n*/\n $proj = ProjectCache::getInstance()->getProject(14);\n $issueSel = new IssueSelection(\"Project $proj->name user \".$session_user->getName());\n $issueList = $proj->getIssues($session_user->id);\n $issueSel->addIssueList($issueList);\n\n\n $daysPerJobIndicator = new DaysPerJobIndicator();\n\n echo 'Testing '.$daysPerJobIndicator->getName().'<br>';\n\n $daysPerJob = $daysPerJobIndicator->execute($issueSel);\n\n $jobs = new Jobs();\n $totalElapsed = 0;\n echo \"<table>\";\n echo \"<caption>\".$issueSel->name.\"</caption>\";\n echo \"<tr><th>name</th><th>nbDays</th><th>color</th><tr>\";\n foreach ($daysPerJob as $id => $duration) {\n echo \"<tr>\";\n echo '<td>'.$jobs->getJobName($id).'</td>';\n echo '<td>'.$duration.'</td>';\n echo '<td>'.$jobs->getJobColor($id).'</td>';\n echo \"</tr>\";\n $totalElapsed += $duration;\n }\n echo \"</table>\";\n echo \"totalElapsed = $totalElapsed<br>\";\n\n}", "function bothTimesEmpty($beginTime, $endTime){\n if($beginTime == null && $endTime == null) {\n return true;\n }\n else {\n return false;\n }\n}", "function v1_check_rsam_ssam($object, $sam_stime, $sam_stime_unc, $sam_etime, $sam_etime_unc, $interval, $interval_unc, &$error) {\n\t\n\t// Get RSAM and SSAM data\n\t$elements=$object['value'];\n\t$l_elements=count($elements);\n\t$rsam_found=FALSE;\n\t$ssam_found=FALSE;\n\tfor ($i=0; $i<$l_elements; $i++) {\n\t\t$element=$elements[$i];\n\t\t\n\t\tif ($element['tag']==\"RSAM\") {\n\t\t\t$rsam_found=TRUE;\n\t\t\t$rsam_stime=array();\n\t\t\t$rsam_stime_unc=array();\n\t\t\t\n\t\t\t// Loop on elements\n\t\t\t$rsam_data=$element['value'];\n\t\t\t$l_rsam_data=count($rsam_data);\n\t\t\t\n\t\t\tfor ($j=0; $j<$l_rsam_data; $j++) {\n\t\t\t\t$rsam_datum=$rsam_data[$j];\n\t\t\t\t\n\t\t\t\t// Get start time\n\t\t\t\t$rsm_stime=xml_get_ele($rsam_datum, \"STARTTIME\");\n\t\t\t\t$rsm_stime_unc=xml_get_ele($rsam_datum, \"STARTTIMEUNC\");\n\t\t\t\t\n\t\t\t\t// Store\n\t\t\t\t$rsam_stime[$j]=$rsm_stime;\n\t\t\t\t$rsam_stime_unc[$j]=$rsm_stime_unc;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($element['tag']==\"SSAM\") {\n\t\t\t$ssam_found=TRUE;\n\t\t\t$ssam_stime=array();\n\t\t\t$ssam_stime_unc=array();\n\t\t\t$ssam_lowf=array();\n\t\t\t$ssam_highf=array();\n\t\t\t\n\t\t\t// Loop on elements\n\t\t\t$ssam_data=$element['value'];\n\t\t\t$l_ssam_data=count($ssam_data);\n\t\t\t\n\t\t\tfor ($j=0; $j<$l_ssam_data; $j++) {\n\t\t\t\t$ssam_datum=$ssam_data[$j];\n\t\t\t\t\n\t\t\t\t// Get start time, low and high frequency\n\t\t\t\t$ssm_stime=xml_get_ele($ssam_datum, \"STARTTIME\");\n\t\t\t\t$ssm_stime_unc=xml_get_ele($ssam_datum, \"STARTTIMEUNC\");\n\t\t\t\t$ssm_lowf=xml_get_ele($ssam_datum, \"LOWFREQ\");\n\t\t\t\t$ssm_highf=xml_get_ele($ssam_datum, \"HIGHFREQ\");\n\t\t\t\t\n\t\t\t\t// Store\n\t\t\t\t$ssam_stime[$j]=$ssm_stime;\n\t\t\t\t$ssam_stime_unc[$j]=$ssm_stime_unc;\n\t\t\t\t$ssam_lowf[$j]=$ssm_lowf;\n\t\t\t\t$ssam_highf[$j]=$ssm_highf;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// If no data was found, nothing to check\n\tif (!$rsam_found && !$ssam_found) {\n\t\treturn TRUE;\n\t}\n\t\n\t// Datetime functions\n\trequire_once \"php/funcs/datetime_funcs.php\";\n\t\n\t// Calculate minimum and maximum open time for RSAM-SSAM\n\tif ($sam_stime_unc==NULL) {\n\t\t$min_open_time=$sam_stime;\n\t\t$max_open_time=$sam_stime;\n\t}\n\telse {\n\t\tif (!datetime_get_min_max($sam_stime, $sam_stime_unc, $min_open_time, $max_open_time, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1222;\n\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum open time for RSAM-SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\t// Calculate min end time and max end time for RSAM-SSAM\n\tif ($sam_etime_unc==NULL) {\n\t\t$min_close_time=$sam_etime;\n\t\t$max_close_time=$sam_etime;\n\t}\n\telse {\n\t\tif (!datetime_get_min_max($sam_etime, $sam_etime_unc, $min_close_time, $max_close_time, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1222;\n\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum end time for RSAM-SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\t// Calculate int_min and int_max\n\tif ($interval_unc==NULL) {\n\t\t$interval_min=$interval;\n\t\t$interval_max=$interval;\n\t}\n\telse {\n\t\t$interval_min=$interval-$interval_unc;\n\t\t$interval_max=$interval+$interval_unc;\n\t}\n\t\n\t// If RSAM found, check it\n\tif ($rsam_found) {\n\t\t// Check RSAM\n\t\t\n\t\t// Check RSAM first start date\n\t\t\n\t\t// Sort RSAM array by start date\n\t\tif (!array_multisort($rsam_stime, $rsam_stime_unc)) {\n\t\t\t// Server error\n\t\t\t$error=array();\n\t\t\t$error['code']=3407;\n\t\t\t$error['message']=\"Error when trying to sort dates of RSAM data\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Calculate minimum and maximum start time for RSAM\n\t\tif ($rsam_stime_unc[0]==NULL) {\n\t\t\t$min_rsam_stime=$rsam_stime[0];\n\t\t\t$max_rsam_stime=$rsam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($rsam_stime[0], $rsam_stime_unc[0], $min_rsam_stime, $max_rsam_stime, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1224;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for RSAM: \".$local_error;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If max_rsam_stime < min_open_time => error\n\t\tif (!datetime_date_before_date($max_rsam_stime, $min_open_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare start time for RSAM: \".$local_error;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==0) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'RSAM' start time is earlier than 'RSAM-SSAM': \".$max_rsam_stime.\" < \".$min_open_time;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check intervals between each RSAM time\n\t\t\n\t\t// 1st time - calculate t1_min and t1_max\n\t\tif ($rsam_stime_unc[0]==NULL) {\n\t\t\t$t1_min=$rsam_stime[0];\n\t\t\t$t1_max=$rsam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($rsam_stime[0], $rsam_stime_unc[0], $t1_min, $t1_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1227;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for RSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Calculate last time\n\t\tif ($rsam_stime_unc[$l_rsam_data-1]==NULL) {\n\t\t\t$t2_min=$rsam_stime[$l_rsam_data-1];\n\t\t\t$t2_max=$rsam_stime[$l_rsam_data-1];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($rsam_stime[$l_rsam_data-1], $rsam_stime_unc[$l_rsam_data-1], $t2_min, $t2_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1228;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for RSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check RSAM end time\n\t\t\n\t\t// Calculate min end time and max end time for RSAM\n\t\tif (!datetime_add_seconds($t2_min, $interval_min, $min_rsam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1233;\n\t\t\t$error['message']=\"Error when trying to calculate minimum end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (!datetime_add_seconds($t2_max, $interval_max, $max_rsam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1234;\n\t\t\t$error['message']=\"Error when trying to calculate maximum end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// If min_rsam_etime > max_close_time => error\n\t\tif (!datetime_date_before_date($min_rsam_etime, $max_close_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==2) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'RSAM' end time is later than 'RSAM-SSAM': \".$max_rsam_etime.\" > \".$max_close_time;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\t// If SSAM found, check it\n\tif ($ssam_found) {\n\t\t// Check SSAM\n\t\t\n\t\t// Sort SSAM array by start date and low frequency\n\t\tif (!array_multisort($ssam_stime, $ssam_lowf, $ssam_stime_unc, $ssam_highf)) {\n\t\t\t// Server error\n\t\t\t$error=array();\n\t\t\t$error['code']=3408;\n\t\t\t$error['message']=\"Error when trying to sort dates and low frequency of SSAM data\";\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check first date of SSAM\n\t\t\n\t\t// Calculate minimum and maximum start time for SSAM\n\t\tif ($ssam_stime_unc[0]==NULL) {\n\t\t\t$min_ssam_stime=$ssam_stime[0];\n\t\t\t$max_ssam_stime=$ssam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($ssam_stime[0], $ssam_stime_unc[0], $min_ssam_stime, $max_ssam_stime, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1224;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for SSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If max_ssam_stime < min_open_time => error\n\t\tif (!datetime_date_before_date($max_ssam_stime, $min_open_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare start time for SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==0) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'SSAM' start time is earlier than 'RSAM-SSAM': \".$max_ssam_stime.\" < \".$min_open_time;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check intervals between each SSAM time\n\t\t\n\t\t// 1st time - calculate t1_min and t1_max\n\t\tif ($ssam_stime_unc[0]==NULL) {\n\t\t\t$t1_min=$ssam_stime[0];\n\t\t\t$t1_max=$ssam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($ssam_stime[0], $ssam_stime_unc[0], $t1_min, $t1_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1227;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for SSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t$stime1=$ssam_stime[0];\n\t\t$highf1=$ssam_highf[0];\n\t\t\n\t\t// Minimum low frequency and maximum high frequency\n\t\t$min_low_freq=$ssam_lowf[0];\n\t\t$max_high_freq=NULL;\n\t\t\n\t\t// Calculate last time\n\t\tif ($ssam_stime_unc[$l_ssam_data-1]==NULL) {\n\t\t\t$t2_min=$ssam_stime[$l_ssam_data-1];\n\t\t\t$t2_max=$ssam_stime[$l_ssam_data-1];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($ssam_stime[$l_ssam_data-1], $ssam_stime_unc[$l_ssam_data-1], $t2_min, $t2_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1228;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum last time for SSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check SSAM end time\n\t\t\n\t\t// Calculate min end time and max end time for SSAM\n\t\tif (!datetime_add_seconds($t2_min, $interval_min, $min_ssam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1233;\n\t\t\t$error['message']=\"Error when trying to calculate minimum end time for SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (!datetime_add_seconds($t2_max, $interval_max, $max_ssam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1234;\n\t\t\t$error['message']=\"Error when trying to calculate maximum end time for SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// If min_ssam_etime > max_close_time => error\n\t\tif (!datetime_date_before_date($min_ssam_etime, $max_close_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==2) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'SSAM' end time is later than 'RSAM-SSAM': \".$max_ssam_etime.\" > \".$max_close_time;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\treturn TRUE;\n}", "public function timing_interval ($name = 'default') {\n $found = 0;\n //$key = NULL;\n\n foreach($this->timings as $skey => $timer ) {\n if(strcmp($timer['name'], $name) == 0 ) {\n //$key = $skey;\n if (!empty($timer['start'])) {\n $found = 1;\n }\n \n if (empty($timer['stop'])) {\n $stop_time = explode(' ', microtime());\n } else {\n $stop_time = $timer['stop'];\n }\n\n // do the big numbers first so the small ones aren't lost\n $interval = $stop_time[1] - $timer['start'][1];\n $interval += $stop_time[0] - $timer['start'][0];\n }\n }\n\n if ($found == 0 ) {\n return 0;\n }\n\n return $interval;\n }", "public static function setPrice($intime,$outtime){\n\n $config = json_decode(file_get_contents(dirname(__FILE__).\"/../config.json\"));\n\n $parkedPrice = 0;\n $PriceHour = $config->price->hour;\n $PriceHalfStay = $config->price->halfStay;\n $PriceStay = $config->price->stay;\n\n $parkedTime = $outtime - $intime;\n $timeHour = $config->time->hour;\n $timeHalfStay = $config->time->halfStay;\n $timeStay = $config->time->stay;\n\n while($parkedTime >= $timeStay){\n $parkedPrice += $PriceStay;\n $parkedTime -= $timeStay;\n }\n while($parkedTime >= $timeHalfStay){\n $parkedPrice += $PriceHalfStay;\n $parkedTime -= $timeHalfStay;\n }\n while($parkedTime >= $timeHour){\n $parkedPrice += $PriceHour;\n $parkedTime -= $timeHour;\n }\n if($parkedTime < $timeHour/4){\n $parkedPrice += 0;\n }else{\n $parkedPrice += $PriceHour;\n }\n\n return $parkedPrice;\n }", "function cb_reached($current)\n{\n echo \"Current is greater than 5A: \" . $current / 1000.0 . \"\\n\";\n}", "public function calculate_time(){\n\t\t\n\t\t$time_zone = new DateTimeZone('Asia/Colombo');\n\t\t\n\t\t$current_time = new DateTime(\"now\",$time_zone);\n\t\t$temp = $current_time->format(\"Y/m/28 06:00:00\");\n\n\t\t$end_time = new DateTime($temp,$time_zone);\n\t\n//\t\techo date_format($current_time,\"Y/m/d H:i:s\").\"<br>\";\n//\t\techo date_format($end_time,\"Y/m/d H:i:s\").\"<br>\";\n\n\t\t$file = 'timer.txt';\n\t\t\n\t\tif($end_time<$current_time){\n\n\t\t\tif($this->run_once_check($file)){\n\t\t\t\t//run the program\n\t\t\t}\n\t\t}\n\t\telseif(file_exists($file)){\n\t\t\t$this->delete_file($file);\n\t\t}\n\n\t}", "public function it_splits_the_elements_by_date_timerange_service()\n {\n $hours = $this->vacancyParser->hours('830-1130,14-20,2215-2330,2330-2345');\n\n $array = [\n ['startAt' => '8:30', 'finishAt' => '11:30'],\n ['startAt' => '14:00', 'finishAt' => '20:00'],\n ['startAt' => '22:15', 'finishAt' => '23:30'],\n ['startAt' => '23:30', 'finishAt' => '23:45'],\n ];\n\n $this->assertEquals($hours, $array);\n }" ]
[ "0.7938107", "0.7747654", "0.76584184", "0.754889", "0.6273584", "0.59857875", "0.5693502", "0.56793624", "0.5645284", "0.5645057", "0.5602397", "0.55947053", "0.5564192", "0.5543236", "0.55367476", "0.54877734", "0.54670894", "0.5454421", "0.5451063", "0.5359433", "0.5358288", "0.5325598", "0.5299384", "0.52886224", "0.52858317", "0.52774334", "0.52507746", "0.52274925", "0.5213169", "0.5162883", "0.5130052", "0.5125523", "0.51196647", "0.5088391", "0.50832266", "0.5082577", "0.5082055", "0.50609154", "0.5052334", "0.50412655", "0.502801", "0.5025446", "0.5016234", "0.5011358", "0.5009746", "0.5001798", "0.49987626", "0.49802598", "0.4976626", "0.49735892", "0.49609455", "0.49444523", "0.4911516", "0.48950592", "0.4892695", "0.48905757", "0.4889812", "0.4884588", "0.48840556", "0.4870972", "0.48704767", "0.48461327", "0.48422772", "0.48249072", "0.48197743", "0.48137003", "0.48105165", "0.47886357", "0.47839504", "0.47831377", "0.4774133", "0.47652903", "0.47557908", "0.47541758", "0.47445774", "0.4743649", "0.4741979", "0.47380403", "0.47315085", "0.47296566", "0.47148713", "0.47132468", "0.47124344", "0.47048384", "0.46981993", "0.46974853", "0.4695498", "0.46916804", "0.46915716", "0.46888053", "0.46866044", "0.46865144", "0.46864447", "0.46848863", "0.46815494", "0.46782616", "0.46768737", "0.46745712", "0.46725208", "0.46695668" ]
0.7950683
0
countBells test 3 INPUT $startTime = '14:23'; $endTime = '15:42'; OUTPUT 3
public function testcountBells3() { $startTime = '14:23'; $endTime = '15:42'; $expected = 3; $actual = $this->clock->countBells($startTime, $endTime); $this->assertEquals($expected, $actual); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testcountBells1()\n {\n $startTime = '2:00';\n $endTime = '3:00';\n $expected = 5;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells2()\n {\n $startTime = '14:00';\n $endTime = '15:00';\n $expected = 5;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells6()\n {\n $startTime = '10:00';\n $endTime = '10:00';\n $expected = 166;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells4()\n {\n $startTime = '23:00';\n $endTime = '1:00';\n $expected = 24;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function countTimediff($beginTime,$endTime)\n\t{\n\t\t$begins=explode( \":\",$beginTime);\n\t\t$beginseconds=(int)($begins[0])*3600 + (int)($begins[1])*60 + (int)($begins[2]);\n\t\n\t\t$ends=explode(\":\",$endTime);\n\t\t$endseconds=(int)($ends[0])*3600 + (int)($ends[1])*60 + (int)($ends[2]);\n\t\n\t\treturn ($endseconds-$beginseconds);\n\t}", "public function calculateTimePerDay($startTime, $endTime){\n\n $start_time = strtotime(Config::get('mycnf.start_time'));//8:30\n $end_time = strtotime(Config::get('mycnf.end_time')); //18\n $sleep_AM = strtotime(Config::get('mycnf.sleep_AM')); //11:30\n $start_PM = strtotime(Config::get('mycnf.start_PM')); //13\n\n if ($startTime < $sleep_AM) {\n\n if ($endTime < $sleep_AM) {\n $timePerDay = $endTime - $startTime;\n\n }elseif ($endTime > $sleep_AM && $endTime < $start_PM) {\n $timePerDay = $sleep_AM - $startTime;\n\n }elseif ($endTime > $start_PM) {\n $timePerDay = ($sleep_AM - $startTime) + ($endTime - $start_PM);\n }\n\n }elseif ($startTime >= $sleep_AM && $startTime <= $start_PM) {\n\n if ($endTime > $sleep_AM && $endTime < $start_PM ) {\n $timePerDay = 0;\n\n }elseif ($endTime > $start_PM) {\n $timePerDay = $endTime - $start_PM;\n\n }\n\n }elseif ($startTime > $start_PM){\n $timePerDay = $endTime - $startTime;\n\n }\n\n return $timePerDay;\n }", "function getBusinessDayCount_timestamp($startStamp,$endStamp){\n\t\t$startStamp=timestamp2utime($startStamp);\n\t\t$endStamp=timestamp2utime($endStamp);\n\t\t$dateTmp=$startStamp;\n\t\t$businessDays=0;\n\t\t$loopEnd=false;\n\t\twhile(!$loopEnd){\n\t\t\t$dateTmp = DateAdd($dateTmp,\"d\",1);\n\t\t\tif(isBusinessDay($dateTmp)){\n\t\t\t\t$businessDays++;\n\t\t\t}\n\t\t\tif($dateTmp==$endStamp){\n\t\t\t\t$loopEnd=true;\n\t\t\t}\n\t\t}\n\t\treturn $businessDays;\n\t}", "function process($name, $start, $end){\n $time = $end - $start;\n echo \"Task: \" . $name . \"\\t\\t Time: \" . $time . \"\\n\";\n}", "function when($parameters) { // $parameters = ['timestamp'], ['numberOfUnits']\n\t$currentTime = time();\n\t\n\tif (preg_match ( '/\\d{4}-\\d{1,2}-\\d{1,2}\\s\\d{1,2}:\\d{1,2}:\\d{1,2}/u', $parameters['timestamp'] )) // /d -> 0-9, nt 1978-2-3 5:8:9, u on seotud UTF-8 ga\n\t{\n\t\t$time = strtotime( $parameters['timestamp'] ); //konventeerib sekunditeks\n\t}\n\telse {\n\t\t$time = $parameters['timestamp'];\n\t}\n\n\tif($currentTime > $time){\n\t\t$difference = $currentTime - $time;\n\t} else {\n\t\t$difference = $time - $currentTime;\n\t}\n\n\t$units = array (\n\t\t\t'second',\n\t\t\t'minute',\n\t\t\t'hour',\n\t\t\t'day',\n\t\t\t'week',\n\t\t\t'month',\n\t\t\t'year',\n\t\t\t'decade'\n\t);\n\t\n\t$secondsInSecond = 1;\n\t$secondsInMinute = 60;\n\t$secondsInHour = $secondsInMinute*60;\n\t$secondsInDay = $secondsInHour*24;\n\t$secondsInWeek = $secondsInDay*7;\n\t$secondsInMonth = $secondsInWeek*(4+1/3);\n\t$secondsInYear = $secondsInMonth*12;\n\t$secondsInDecade = $secondsInYear*10;\n\t\n\t$sizes = array (\t\t\t\t//$sizes = array (\n\t\t\t$secondsInSecond, \t\t//1, //sekund\n\t\t\t$secondsInMinute, \t\t//60, //minut\n\t\t\t$secondsInHour, \t\t// 60*60, //tund\n\t\t\t$secondsInDay,\t\t\t//60*60*24, //päev\n\t\t\t$secondsInWeek, \t\t//60*60*24*7, //nädal\n\t\t\t$secondsInMonth,\t\t//60*60*24*7*(4+1/3), //kuu\n\t\t\t$secondsInYear, \t\t//60*60*24*7*(4+1/3)*12, //aasta\n\t\t\t$secondsInDecade \t\t//60*60*24*7*(4+1/3)*12*10 //kümmend\n\t);\n\n\tfor($positionInUnits = sizeof ( $sizes ) - 1; ($positionInUnits >= 0) && \n\t\t(($amountOfTime = $difference / $sizes [$positionInUnits]) <= 1); $positionInUnits --); \n\t\tif ($positionInUnits < 0)\n\t\t\t$positionInUnits = 0;\n\t\t$remainedTime = $currentTime - ($difference % $sizes [$positionInUnits]);\n\t\t$amountOfTime = floor ( $amountOfTime );\n\t\tif ($amountOfTime != 1) \n\t\t\t$units [$positionInUnits] .= 's';\n\t\t$when = sprintf ( \"%d %s \", $amountOfTime, $units [$positionInUnits] );\n\t\tif (($parameters['numberOfUnits'] == 0) && ($positionInUnits >= 1) && (($currentTime - $remainedTime) > 0))\n\t\t$when .= when ( $remainedTime);\n\t\treturn $when;\n}", "function counttime()\n{\n global $time;\n\n $arrHour = explode(\":\", $time);\n $arrTime2 = array(8, 10, 12, 14, 16, 18, 20, 22, 24);\n foreach ($arrTime2 as $intTime)\n {\n if ($arrHour[0] < $intTime)\n {\n $intWait = (($intTime - $arrHour[0]) * 60) - $arrHour[1];\n $intHours = floor($intWait / 60);\n $intMinutes = $intWait % 60;\n break;\n }\n }\n $arrTime = array('', '');\n if ($intHours < 1)\n {\n $arrTime[0] = '';\n }\n if ($intHours == 1)\n {\n $arrTime[0] = $intHours.T_HOUR;\n }\n if ($intHours > 1 && $intHours < 5)\n {\n $arrTime[0] = $intHours.T_HOURS2;\n }\n if ($intHours > 4)\n {\n $arrTime[0] = $intHours.T_HOURS;\n }\n if ($intMinutes < 1)\n {\n $arrTime[1] = '';\n }\n if ($intMinutes == 1)\n {\n $arrTime[1] = $intMinutes.T_MINUTE;\n }\n if (($intMinutes > 1 && $intMinutes < 5) || @ereg(\"^[2-5][2-4]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES2;\n }\n if (($intMinutes > 4 && $intMinutes < 20) || @ereg(\"^[2-5][5-9]*$\", $intMinutes) || @ereg(\"^[2-5][0-1]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES;\n }\n\n return $arrTime;\n}", "protected static function compareMicrotimes($startTime, $endTime) {\n\t\treturn round($endTime - $startTime, 4);\n\t}", "function checkTimeRange($params) {\n\n if (!isset($params['start_date']) || $params['start_date'] == null) {\n return -1;\n }\n \n if (!isset($params['stop_date']) || $params['stop_date'] == null) {\n return -2;\n }\n \n if (!isset($params['start_time']) || $params['start_time'] == null) {\n return -3;\n }\n \n if (!isset($params['end_time']) || $params['end_time'] == null) {\n return -4;\n }\n \n $startTime = $params['start_date'] . ' ' . $params['start_time'];\n $emdTime = $params['stop_date'] . ' ' . $params['end_time'];\n \n if(strtotime($startTime) > strtotime($emdTime)) {\n return -5;\n }\n return 1;\n }", "function get_n_time_slots()\n{\n global $morningstarts, $morningstarts_minutes, $eveningends, $eveningends_minutes;\n global $resolution;\n \n $start_first = (($morningstarts * 60) + $morningstarts_minutes) * 60; // seconds\n $end_last = ((($eveningends * 60) + $eveningends_minutes) * 60) + $resolution; // seconds\n $end_last = $end_last % SECONDS_PER_DAY;\n if (day_past_midnight())\n {\n $end_last += SECONDS_PER_DAY;\n }\n $n_slots = ($end_last - $start_first)/$resolution;\n\n return $n_slots;\n}", "function getBusinessDayCount($startStamp,$endStamp){\n\t\t$dateTmp=$startStamp;\n\t\t$businessDays=0;\n\t\t$loopEnd=false;\n\t\twhile(!$loopEnd){\n\t\t\t$dateTmp = DateAdd($dateTmp,\"d\",1);\n\t\t\tif(isBusinessDay($dateTmp)){\n\t\t\t\t$businessDays++;\n\t\t\t}\n\t\t\tif($dateTmp==$endStamp){\n\t\t\t\t$loopEnd=true;\n\t\t\t}\n\t\t}\n\t\treturn $businessDays;\n\t}", "function getduration_cmn($EndTime, $StartTime) {\n $diff = strtotime($EndTime) - strtotime($StartTime);\n return $diff;\n}", "function timeCalculator($box_times, $call_times){ \n \n $time_output = new TimeOutput();\n \n $box_times_start = date_create($box_times['Start']);\n $box_times_end = date_create($box_times['End']);\n $call_times_start = date_create($call_times['Start']);\n $call_times_end = date_create($call_times['End']);\n \n \n //Stage 1 and 5\n if($call_times_end <= $box_times_start || $box_times_end <= $call_times_start ){\n $time_output->setName(\"stage 1 or stage 5\");\n $time_output->setBoxTime(array(array('Start' => $box_times_start, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end)));\n } \n //Stage 2\n if($call_times_start <= $box_times_start && $box_times_start < $call_times_end\n && $call_times_end < $box_times_end){\n $time_output->setName(\"stage 2\");\n $time_output->setBoxTime(array(array('Start' => $call_times_end, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n \n }\n //Stage 3\n if($box_times_start < $call_times_start && $call_times_end < $box_times_end){\n $time_output->setName(\"stage 3\");\n $time_output->setBoxTime(array(\n array('Start' => $box_times_start, 'END' =>$call_times_start),\n array('Start' => $call_times_end, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n }\n //Stage 4 \n if($box_times_start < $call_times_start && $call_times_start < $box_times_end\n && $box_times_end <= $call_times_end){\n $time_output->setName(\"stage 4\");\n $time_output->setBoxTime(array(array('Start' => $box_times_start, 'END' =>$call_times_start)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n } \n //Stage 6\n if($call_times_start < $box_times_start && $box_times_end < $call_times_end ){\n $time_output->setName(\"stage 6\");\n $time_output->setBoxTime(array(array('Start' => \"\", 'END' => \"\")));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n }\n \n return $time_output;\n}", "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\n //Definindo variáveis = 0\n $fruito = $fruito = 0;\n //Executando a contagem de elementos do array para posterior calculo\n for ($i = 0; $i < count($apples); $i++){\n /* Se o calculo da distancia da árvore $a com a distância da fruta caída,\n * for maior que o ponto inicial da casa, incrementa-se na variável $fruita\n */\n $fapple = ($a + $apples[$i]);\n if ($fapple >= $s && $fapple <= $t){\n $fruita++;\n }\n }\n // Imprime o resultado da variavel $fruita\n print $fruita;\n // Salto de linha\n echo \"\\n\";\n //Executando a contagem de elementos do array para posterior calculo\n for ($i = 0; $i < count($oranges); $i++){\n /* Se o calculo da distancia da árvore $b com a distância da fruta caída,\n * for menor que o ponto final da casa, incrementa-se na variável $fruito\n */\n $forange = ($b + $oranges[$i]);\n if ($forange >= $s && $forange <= $t){\n $fruito++;\n }\n }\n // Imprime o resultado da variavel $fruito\n print $fruito;\n}", "function getQueryTime($time_start,$time_end) {\n\t\treturn round($time_end - $time_start,4).'sec';\n\t}", "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\r\n // Write your code here\r\n $result = [];\r\n $count = 0;\r\n foreach ($apples as $_apple) {\r\n # code...\r\n $position = $a + $_apple;\r\n if(($position >= $s) && ($position <= $t)){\r\n $count++;\r\n }\r\n }\r\n $result[] = $count;\r\n \r\n $count = 0;\r\n foreach ($oranges as $_orange) {\r\n # code...\r\n $position = $b + $_orange;\r\n if(($position >= $s) && ($position <= $t)){\r\n $count++;\r\n }\r\n }\r\n $result[] = $count;\r\n return $result;\r\n}", "function calculateShiftMinutes($startTime, $endTime) {\n $startHourDigits = floor($startTime / 100);\n $startMinuteDigits = $startTime / 100 - $startHourDigits;\n\n $endHourDigits = floor($endTime / 100);\n $endMinuteDigits = $endTime / 100 - $endHourDigits;\n\n $startTimeInMinutes = $startHourDigits * 60 + $startMinuteDigits * 100;\n $endTimeInMinutes = $endHourDigits * 60 + $endMinuteDigits * 100;\n\n $shiftLengthInMinutes = $endTimeInMinutes - $startTimeInMinutes;\n return round($shiftLengthInMinutes);\n}", "function beginIsAfterEnd($beginTime, $endTime){\n if($beginTime > $endTime) {\n return true;\n }\n else {\n return false;\n }\n}", "function getHourDifference($starttime,$endtime){\n\t$start_array = split(\":\",$starttime);\n\t$end_array = split(\":\",$endtime);\n\t\n\t//Use the array elements to get the time in hours\n\t$diff = ($end_array[0] - $start_array[0]) + ($end_array[1] - $start_array[1])/60;\n\t\n\treturn $diff;\n}", "public function countHour($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%H');\n\t\t//echo $interval->format('%a total days').\"\\n\";\n\t\t//echo $interval->format('%m month, %d days').\"\\n\";\n\t\t//echo $interval->format('%H hour, %i minute').\"\\n\";\n\t}", "public function getTimes();", "public function countSecond($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%s');\n\t}", "function late_ride(int $n): int {\n // Coding and coding ... \n return array_sum(str_split(gmdate(\"H:i\", $n*60)));\n}", "function time_diff($start_time,$end_time) {\n\n\t//subtract our times to get the difference\n\t$calcStArray = explode(\":\",$start_time);\n\t$calcEtArray = explode(\":\",$end_time);\n\n\t$start_hour = $calcStArray[0];\n\t$start_min = $calcStArray[1];\n\n\t$end_hour = $calcEtArray[0];\n\t$end_min = $calcEtArray[1];\n\n\t//reduce our dates to timestamps. We use a random date here, since it does not matter\n\t$ts1 = mktime($start_hour,$start_min,\"0\",1,1,2000);\n\t$ts2 = mktime($end_hour,$end_min,\"0\",1,1,2000);\n\n\t//get the number of seconds\n\t$diff = $ts2 - $ts1;\n\n\t$temp = $diff/3600;\n\n\t//get the place of the decimal point\n\t$pos = strpos($temp,\".\");\n\n\t//if we have pos, there is a decimal point\n\tif ($pos) {\n\n\t\t$dur_hour = intval($temp);\n\t\t$min = substr($temp,$pos);\n\n\t\t//convert to clock nums\n\t\tif ($min==\".5\") $dur_min = \"30\";\n\t\telseif ($min==\".25\") $dur_min = \"15\";\n\t\telseif ($min==\".75\") $dur_min = \"45\";\n\n\t}\n\telse {\n\t\t$dur_hour = $temp;\n\t\t$dur_min = \"00\";\n\t}\n\n\treturn array($dur_hour,$dur_min);\n\n}", "function get_times($starttime,$endtime){\r\n\t$begin = new DateTime(date(\"H:i\", strtotime($starttime)));\r\n\t$end = new DateTime(date(\"H:i\", strtotime($endtime)));\r\n\r\n$timerange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\nforeach($timerange as $time){\r\n\t$atimes[] =$time->format(\"H:i A\");\r\n}\r\n$atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\nreturn $atimes; \r\n}", "public function beamtime_beam_status($pvname,$begin_time,$end_time) {\n\n $leftmost = null;\n {\n $sql = \"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp IN (select MAX(timestamp) AS timestamp from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp <= {$begin_time->to64()} ) ORDER BY timestamp\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query\" );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] )\n $leftmost = array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value']));\n }\n }\n $within = array();\n {\n $result = $this->query(\"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND ( {$begin_time->to64()} < timestamp ) AND ( timestamp < {$end_time->to64()} ) ORDER BY timestamp\");\n for( $nrows = mysql_numrows( $result ), $i = 0; $i < $nrows; $i++ ) {\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n array_push(\n $within,\n array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value'])\n ));\n }\n }\n $value = is_null($leftmost) ? 0 : $leftmost['value'];\n $begin = $begin_time;\n $list = array();\n foreach( $within as $atchange ) {\n $new_value = $atchange['value'];\n if( $new_value == $value ) continue;\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $atchange['timestamp'],\n 'status' => $value ));\n $value = $new_value;\n $begin = $atchange['timestamp'];\n }\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $end_time,\n 'status' => $value ));\n return $list;\n }", "function get_times($startdate,$enddate){\r\n $begin = new DateTime(date(\"H:i\", strtotime($startdate)));\r\n $end = new DateTime(date(\"H:i\", strtotime($enddate)));\r\n\r\n $daterange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\n foreach($daterange as $date){\r\n $atimes[] =$date->format(\"H:i A\");\r\n }\r\n $atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\n return $atimes; \r\n }", "function elapsed_time($start_time, $finish_time){\n\treturn sc_strtotime($finish_time) - sc_strtotime($start_time);\n}", "abstract protected function get_data($start_time, $end_time);", "function timedifference_in_minutes($start_time, $end_time,$para=\"\") {\n /*$first_date = new DateTime(\"2012-11-30 \" . $start_time);\n $second_date = new DateTime(\"2012-12-21 \" . $end_time);\n $difference = $first_date->diff($second_date);\n //pr($difference);\n return $total_minutes = $difference->h * 60 + $difference->$i;*/\n $start_time = date(\"G:i\", strtotime($start_time));\n $end_time = date(\"G:i\", strtotime($end_time));\n $s_spit = explode(\":\",$start_time);\n $e_spit = explode(\":\",$end_time);\n\n $h1 = (int)($s_spit[0]);\n $m1 = (int)($s_spit[1]);\n\n $h2 = (int)($e_spit[0]);\n $m2 = (int)($e_spit[1]);\n\n //console.log($h1+' '+$m1+' '+$h2+' ' +$m2);\n $counter = 0;\n if(($h2-$h1)<0){\n for($i=$h1;$i<24;$i++) $counter++;\n for($i=1;$i<=$h2;$i++) $counter++;\n } else if(($h2-$h1)>0){\n $counter = $h2-$h1;\n } else {\n $counter = 24;\n }\n $minutes = 0;\n if(($m2-$m1)<0) {\n $minutes = 0-($m2-$m1);\n $counter--;\n } else {\n $minutes = $m2-$m1;\n }\n if ($para =='hours') {\n return ($counter . \" hrs : \" . $minutes . \" mins\");\n }\n return ($counter*60 + $minutes);\n \n}", "function test12($user, $timespan) {\n\n}", "function countTime($connection, $sql_tiempo){\n $sql = mysqli_query($connection, $sql_tiempo);\n $horas = 0;\n $minutos = 0;\n while($row = mysqli_fetch_row($sql)){\n \n $timeTo = explode(':', $row[0]);\n \n $horas += intval($timeTo[0]);\n $minutos += intval($timeTo[1]);\n \n }\n $final_time = intval((($horas*60) + $minutos)/60).\":\".(($horas*60) + $minutos)%60;\n return $final_time;\n}", "public function checkLeaveApplyTimeArea($emp_seq_no,$company_id,$begin_time,$end_time)\n {\n if(empty($begin_time) || empty($end_time)) return 'no parameter';\n //$this->DBConn->debug = 1;\n $sql= <<<eof\n select count(*) cnt\n from hr_carding\n where psn_id = :emp_seqno\n and psn_seg_segment_no = :company_id\n and ((breakbegin is null and\n to_date(:begin_time, 'yyyy-mm-dd hh24:mi') between intime and outtime) or\n (breakbegin is not null and\n (to_date(:begin_time1, 'yyyy-mm-dd hh24:mi') between intime and\n breakbegin or to_date(:begin_time2, 'yyyy-mm-dd hh24:mi') between\n breakend and outtime)))\neof;\n $rs = $this->DBConn->GetOne($sql,array('emp_seqno'=>$emp_seq_no,\n 'company_id'=>$company_id,\n 'begin_time'=>$begin_time,\n 'begin_time1'=>$begin_time,\n 'begin_time2'=>$begin_time));\n if($rs==0) return '1';\n $sql = <<<eof\n select count(*) cnt\n from hr_carding\n where psn_id = :emp_seqno\n and psn_seg_segment_no = :company_id\n and ((breakbegin is null and\n to_date(:end_time, 'yyyy-mm-dd hh24:mi') between intime and\n outtime) or\n (breakbegin is not null and\n (to_date(:end_time1, 'yyyy-mm-dd hh24:mi') between intime and\n breakbegin or to_date(:end_time2, 'yyyy-mm-dd hh24:mi') between\n breakend and outtime)))\neof;\n $rs = $this->DBConn->GetOne($sql,array('emp_seqno'=>$emp_seq_no,\n 'company_id'=>$company_id,\n 'end_time'=>$end_time,\n 'end_time2'=>$end_time,\n 'end_time1'=>$end_time));\n if($rs==0) return '2';\n return 'ok';\n }", "public function testBookedSpacesEnd()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-17 15:00:00\";\n $end = \"2017-06-20 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public function getFilterTimeCount() {\n \n $columns = array();\n $params = array();\n\n // TODAY\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :todayStart AND n.start_date <= :todayEnd \n OR\n n.end_date >= :todayStart AND n.end_date <= :todayEnd \n OR\n n.start_date < :todayStart AND n.end_date > :todayEnd \n THEN 1 \n ELSE 0 \n END\n ) as today\";\n $params['todayStart'] = $dateStart;\n $params['todayEnd'] = $dateEnd;\n\n // YESTERDAY\n $dateStart = new \\DateTime('yesterday');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime('yesterday');\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :yesterdayStart AND n.start_date <= :yesterdayEnd \n OR\n n.end_date >= :yesterdayStart AND n.end_date <= :yesterdayEnd \n OR\n n.start_date < :yesterdayStart AND n.end_date > :yesterdayEnd \n THEN 1 \n ELSE 0 \n END\n ) as yesterday\";\n $params['yesterdayStart'] = $dateStart;\n $params['yesterdayEnd'] = $dateEnd;\n\n // THIS WEEK\n $today = new \\DateTime();\n if('Sunday' == $today->format('l')) {\n $dateStart = clone $today;\n $dateStart->modify('Monday last week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = $today;\n $dateEnd->setTime(23, 59, 59);\n } else {\n $dateStart = clone $today;\n $dateStart->modify('Monday this week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = clone $today;\n $dateEnd->modify('Sunday this week');\n $dateEnd->setTime(23, 59, 59);\n }\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :thisWeekStart AND n.start_date <= :thisWeekEnd \n OR\n n.end_date >= :thisWeekStart AND n.end_date <= :thisWeekEnd \n OR\n n.start_date < :thisWeekStart AND n.end_date > :thisWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as thisWeek\";\n $params['thisWeekStart'] = $dateStart;\n $params['thisWeekEnd'] = $dateEnd;\n\n // LAST WEEK\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P7D'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :lastWeekStart AND n.start_date <= :lastWeekEnd \n OR\n n.end_date >= :lastWeekStart AND n.end_date <= :lastWeekEnd \n OR\n n.start_date < :lastWeekStart AND n.end_date > :lastWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as lastWeek\";\n $params['lastWeekStart'] = $dateStart;\n $params['lastWeekEnd'] = $dateEnd;\n \n // PAST MONTH\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P1M'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :pastMonthStart AND n.start_date <= :pastMonthEnd \n OR\n n.end_date >= :pastMonthStart AND n.end_date <= :pastMonthEnd \n OR\n n.start_date < :pastMonthStart AND n.end_date > :pastMonthEnd \n THEN 1 \n ELSE 0 \n END\n ) as pastMonth\";\n $params['pastMonthStart'] = $dateStart;\n $params['pastMonthEnd'] = $dateEnd;\n\n return $this->createQueryBuilder('n')\n ->select(implode(', ', $columns))\n ->where('n.draft = false')\n ->setParameters($params)\n ->getQuery()\n ->getOneOrNullResult();\n }", "private function computeOpenSchedules($list) {\n\n // print_array($list, 'input');\n // echo '<br>';\n\n $st = array();\n $et = array();\n $final = array();\n $start = 7;\n $end = 21;\n $temp = $start;\n\n while($temp < $end) {\n array_push( $st, number_format((float)$temp, 2, ':', '') );\n $temp++;\n }\n\n $temp = $start++;\n while( $start <= $end ) {\n array_push( $et, number_format((float)$start, 2, ':', '') );\n $start++;\n }\n\n // print_array($st, 'start_time');\n // print_array($et, 'end_time');\n // echo '<br>';\n\n foreach( $list as $val ) {\n $times = explode(\"-\", $val);\n $start_time = trim($times[0]);\n $end_time = trim($times[1]);\n\n $range = $this->find_range($start_time, $end_time);\n \n if (($key = array_search($start_time, $st)) !== false) {\n unset($st[$key]);\n }\n\n if (($key = array_search($end_time, $et)) !== false) {\n unset($et[$key]);\n }\n\n foreach($range as $time) {\n if (($key = array_search($time, $st)) !== false) {\n unset($st[$key]);\n }\n\n if (($key = array_search($time, $et)) !== false) {\n unset($et[$key]);\n }\n }\n }\n\n $st = array_values($st);\n $et = array_values($et);\n\n $this->print_array($st, 'start_time');\n $this->print_array($et, 'end_time');\n echo '<br>';\n\n if(count($st) >= count($et)) {\n for($idx = 0; $idx < count($st); $idx++){\n array_push($final, new Time($st[$idx], $et[$idx]));\n }\n } \n return $final;\n }", "public function beamtime_beam_status($pvname,$begin_time,$end_time) {\n\n $maxtimestamp = null;\n {\n $sql = \"select MAX(timestamp) AS timestamp from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp <= {$begin_time->to64()}\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query: \".$sql );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] ) $maxtimestamp = $attr['timestamp'];\n }\n }\n $leftmost = null;\n if( !is_null($maxtimestamp)) {\n $sql = \"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp={$maxtimestamp} ORDER BY timestamp\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query\" );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] )\n $leftmost = array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value']));\n }\n }\n $within = array();\n {\n $result = $this->query(\"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND ( {$begin_time->to64()} < timestamp ) AND ( timestamp < {$end_time->to64()} ) ORDER BY timestamp\");\n for( $nrows = mysql_numrows( $result ), $i = 0; $i < $nrows; $i++ ) {\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n array_push(\n $within,\n array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value'])\n ));\n }\n }\n $value = is_null($leftmost) ? 0 : $leftmost['value'];\n $begin = $begin_time;\n $list = array();\n foreach( $within as $atchange ) {\n $new_value = $atchange['value'];\n if( $new_value == $value ) continue;\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $atchange['timestamp'],\n 'status' => $value ));\n $value = $new_value;\n $begin = $atchange['timestamp'];\n }\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $end_time,\n 'status' => $value ));\n return $list;\n }", "public function testBookedSpacesStart()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-14 15:00:00\";\n $end = \"2017-06-17 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "function get_apnt_times($starttime,$endtime){\r\n $vd[] = get_times($starttime, $endtime);\r\n return $flat = array_unique(call_user_func_array('array_merge', $vd));\r\n }", "public static function getTimeLoadPage($startTime, $endTime) {\n\t\t$ip_allow = json_decode(file_get_contents(BASE_PATH . '/ip_allow.json'), true);\n\t\tif(in_array($_SERVER['REMOTE_ADDR'], $ip_allow )) {\n\t\t\treturn '<div class=\"text-center\"> Time: ' . number_format($endTime - $startTime, 4, '.', '.') . 's - Memory usage: '. number_format(memory_get_usage() / 1024) .'KB</div>';\n\t\t}\n\n\t\treturn ;\n\t}", "public function testFindByStartTimes()\n {\n $bookingRepo = $this->em->getRepository('GrabagameBookingBundle:Booking');\n $clubRepo = $this->em->getRepository('GrabagameBookingBundle:Club');\n $courtRepo = $this->em->getRepository('GrabagameBookingBundle:Court');\n $club = $clubRepo->find(1); \n $court = $courtRepo->find(2);\n\n $expectedBookings = array();\n $expectedBookings[] = $bookingRepo->find(1);\n $expectedBookings[] = $bookingRepo->find(2);\n\n $startTimes = array(\n new \\DateTime('2012-05-03 06:00:00'),\n new \\DateTime('2012-05-03 10:00:00'),\n new \\DateTime('2012-05-04 09:00:00'),\n );\n\n $bookings = $bookingRepo->findByStartTimes($club, $court, $startTimes);\n\n $this->assertEquals($expectedBookings, $bookings);\n\n $expectedBookings = array();\n $startTimes = array(\n new \\DateTime('2012-05-01 06:00:00'),\n new \\DateTime('2012-05-08 10:00:00'),\n new \\DateTime('2012-05-09 09:00:00'),\n );\n\n $bookings = $bookingRepo->findByStartTimes($club, $court, $startTimes);\n\n $this->assertEquals($expectedBookings, $bookings);\n }", "public function countMinute($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%i');\n\t}", "function get_time_difference( $time1, $time2 ) {\n\t$time1 = (int)$time1;\n\t$time2 = (int)$time2;\n\t$result = array(\n\t\t'days' => 0,\n\t\t'hours' => 0,\n\t\t'minutes' => 0,\n\t\t'seconds' => 0\n\t);\n\tif( $time1 == 0 || $time2 == 0) return $result;\n\t\n\tif($time2 > $time1) {\n\t\t$start = date(\"H:i\",$time1);\n\t\t$end = date(\"H:i\",$time2);\n\t} else {\n\t\t$start = date(\"H:i\",$time2);\n\t\t$end = date(\"H:i\",$time1);\t\n\t}\t\n\t\n\t$uts['start'] = $time2;\n\t$uts['end'] = $time1;\n\tif( $uts['start']!==-1 && $uts['end']!==-1 ) {\n\t\tif( $uts['end'] >= $uts['start'] ) {\n\t\t\n\t\t\t$diff = $uts['end'] - $uts['start'];\n\t\t\tif( $days=intval((floor($diff/86400))) ) $diff = $diff % 86400;\n\t\t\tif( $hours=intval((floor($diff/3600))) ) $diff = $diff % 3600;\n\t\t\tif( $minutes=intval((floor($diff/60))) ) $diff = $diff % 60;\n\t\t\t$diff = intval( $diff ); \n\t\t\tif($days > 0) $hours += $days*24;\n\t\t\treturn( array('days'=>str_pad($days,2,0, STR_PAD_LEFT), 'hours'=>str_pad($hours,2,0, STR_PAD_LEFT), 'minutes'=>str_pad($minutes,2,0, STR_PAD_LEFT), 'seconds'=>str_pad($diff,2,0, STR_PAD_LEFT)) );\n\t\t}\t\n\t}\t\n\treturn $result;\n}", "public function __construct(&$events, $rangeLowerBound, $rangeUpperBound, $workdayLowerBound = 0, $workdayUpperBound = 24, $length, $topSlots = 5){\n\n\t\tif($workdayLowerBound > $workdayUpperBound || $workdayUpperBound > 1440)\n\t\t\tdie(\"ERROR: Invalid workday interval.\");\n\t\t\n\t\telse{\n\t\t\t$this->workdayLowerBound = $workdayLowerBound;\n\t\t\t$this->workdayUpperBound = $workdayUpperBound;\n\t\t\t$this->rangeLowerBound = $rangeLowerBound;\n\t\t\t$this->rangeUpperBound = $rangeUpperBound;\n\t\t\t$this->topSlots = $topSlots;\n\n\t\t\t$this->root = new IntervalObject(0, 1E9, 'ROOT');\n\t\t\t\n\t\t\tself::$length = $length;\n\n //echo json_encode($rangeLowerBound);\n\n // $workdayLowerBound += $rangeLowerBound;\n // $workdayUpperBound += $rangeLowerBound;\n\n\n foreach($events as $email => $intervals) {\n for($j = 0; $j < count($events[$email]); $j++) {\n $events[$email][$j]['startTime'] += $rangeLowerBound;\n $events[$email][$j]['endTime'] += $rangeLowerBound;\n }\n }\n\n\t\t\tforeach($events as $email => $intervals) {\n $a = new ArrayIterator($intervals);\n\t\t\t\tforeach($a as $interval){\n\n // echo json_encode(\"BEFORE -> \").json_encode($interval).\"\\n\";\n\n if( ($interval['startTime'] % 1440) > $workdayUpperBound){\n $interval['startTime'] = 1440*(floor($interval['startTime']/1440)+1) + $workdayLowerBound;\n }\n else if( ($interval['startTime'] % 1440) < $workdayLowerBound ){\n $interval['startTime'] = 1440*floor($interval['startTime']/1440) + $workdayLowerBound;\n }\n\n //if( ($interval['endTime'] % 1440) < $workdayLowerBound){\n // $interval['endTime'] = 1440*(floor($interval['startTime']/1440)-1) + $workdayLowerBound;\n //}\n //else\n if( ($interval['endTime'] % 1440) > $workdayUpperBound ){\n $interval['endTime'] = 1440*floor($interval['endTime']/1440) + $workdayUpperBound;\n }\n\n //echo json_encode(\"AFTER -> \").json_encode($interval).\"\\n\";\n\n\t\t\t\t\tif( $interval['endTime'] - $interval['startTime'] < $length) {\n // echo json_encode(\"INVALID RANGE => \").json_encode($interval).\"\\n\";\n continue;\n }\n\n\t\t\t\t\t// instead of more than a day apart, divide by 1440 and see if the day matches\n\t\t\t\t\tif(floor($interval['startTime']/1440) < floor($interval['endTime']/1440)){\n //$c = 0;\n\t\t\t\t\t\tdo {\n // var_dump($interval);\n $tempEnd = 1440*floor($interval['startTime']/1440) + $workdayUpperBound;\n\n if($tempEnd > $interval['endTime'])\n $tempEnd = $interval['endTime'];\n\n $a->append(array('startTime' => $interval['startTime'],\n 'endTime' => $tempEnd));\n\n $interval['startTime'] = 1440*(floor($interval['startTime']/1440)+1) + $workdayLowerBound;\n\n //if($c >= 5)\n // break;\n //$c++;\n }\n\t\t\t\t\t\twhile ($interval['startTime'] / 1440 < $interval['endTime'] / 1440);\n\n //die();\n\n\t\t\t\t\t\t// insert the final range\n\t\t\t\t\t\t$a->append(array('startTime' => $interval['startTime'], 'endTime' => $interval['endTime']));\n\t\t\t\t\t}\n else{\n // echo json_encode(\"Inserting: $email -> \").\"\\n\";\n // echo json_encode($interval).\"\\n\";\n $this->root->insertInterval($email, $interval['startTime'], $interval['endTime']);\n }\n\n\n /*\n if( $interval['endTime'] - $interval['startTime'] < 1440 ) {\n echo json_encode(\"Inserting: $email -> \").\"\\n\";\n echo json_encode($interval).\"\\n\";\n $this->root->insertInterval($email, $interval['startTime'], $interval['endTime']);\n }\n else{\n echo json_encode(\"TOO LARGE RANGE => \").json_encode($interval).\"\\n\";\n\n \n }*/\n\n\t\t\t\t}\n\n\t\t\t}\n\n // echo json_encode($events);\n\t\t}\n\n\t}", "function get_booking_count1($date='',$pm_id = 0,$propertyroomid=0){\r\n\tglobal $db;\r\n\t$count =0;\r\n\tglobal $tblprefix;\r\n\t$new_date = date(\"m/d/Y\",strtotime($date));\r\n\t$qry_booking = \"SELECT id,room_id,check_indate,check_outdate FROM \".$tblprefix.\"property_booking WHERE pm_id=\".$pm_id.\" AND (check_indate='\".$new_date.\"' OR check_outdate='\".$new_date.\"') AND room_id=\".$propertyroomid.\"\";\r\n \r\n $rs_booking = $db->Execute($qry_booking);\r\n\t$rs_booking->MoveFirst();\r\n\twhile (!$rs_booking->EOF){\r\n\t\t$explode_values = explode(',',$rs_booking->fields['room_id']);\r\n\r\n\t\tif(in_array($propertyroomid,$explode_values)){\r\n\t\t\t$count++;\r\n\t\t}\r\n\t\t$rs_booking->MoveNext();\r\n\t}\r\n\treturn $count;\r\n\r\n\r\n}", "public function getPeriodStatus($check, $startTime, $endTime) {\n\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_IN;\n\t\tif ($check == QuizzesComponent::USES_USE) {\n\t\t\t$nowTime = strtotime((new NetCommonsTime())->getNowDatetime());\n\t\t\tif (! empty($startTime) && $nowTime < strtotime($startTime)) {\n\t\t\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_BEFORE;\n\t\t\t}\n\t\t\tif (! empty($endTime) && $nowTime > strtotime($endTime)) {\n\t\t\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_END;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "function onlyEndInput($beginTime, $endTime){\n if($beginTime == null && $endTime != null) {\n return true;\n }\n else {\n return false;\n }\n}", "public function getIntimeCount($time)\n\t{\n\t\t// $time = strtotime($time);\n\t\t// $time = intval($time/1000);\n\t\t// $time = date('Y-m-d h:i:m', $time);\n\t\t$dataProvider = new CActiveDataProvider(Weibo::model()->intime($time));\n\t\treturn intval($dataProvider->totalItemCount);\n\t}", "public function computeTime($start,$end,$format){\n\t\t$startTime = new DateTime($start);\n\t\t$endTime = new DateTime($end);\n\n\t\t$diff = $startTime->diff($endTime);\n\t\tswitch($format){\n\t\t\tcase 'months':\n\t\t\t\t$year = $diff->format( '%y' );// -> YEAR\n\t\t\t\t$month = $diff->format( '%m' );// -> MONTH\n\t\t\t\tif($year > 0){ // EXCEEDS A YEAR\n\t\t\t\t\t$yearMonth = $year * 12;\n\t\t\t\t\t$output = $yearMonth + $month;\n\t\t\t\t}else{\n\t\t\t\t\t$output = $month;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'month':\n\t\t\t\t$output = $diff->format( '%m' );// -> MONTH\n\t\t\tbreak;\n\t\t\tcase 'days2': // NEGATIVE IF LAPSE\n\t\t\t\t$output = $diff->format( '%R%a' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'days':\n\t\t\t\t$output = $diff->format( '%a' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'hrsMins':\n\t\t\t\t$output = $diff->format( '%H:%I' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'mins':\n\t\t\t\t$output = $diff->format( '%I' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'digits':\n\t\t\t\t$output = $diff->format( '%H.%I:%S' );// -> 00:25:25\n\t\t\t\t$output = round(date('H.i', strtotime($output)),2);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$output = $diff->format( '%H:%I:%S' );// -> 00:25:25\n\t\t\tbreak;\n\t\t}\n\t\treturn $output;\n\t}", "function get_time_difference($start, $end) {\r\n\t\r\n $uts['start'] = strtotime($start);\r\n $uts['end'] = strtotime($end);\r\n if ($uts['start']!=false && $uts['end']!=false) {\r\n if ($uts['end'] >= $uts['start']) {\r\n $diff = $uts['end'] - $uts['start'];\r\n\t\t\t$days = intval((floor($diff/60/60/24)));\r\n\t\t\t$hours = intval((floor($diff/60/60)));\r\n\t\t\t$minutes = intval((floor($diff/60)));\r\n $seconds = intval($diff); \r\n return(array('days'=>$days, 'hours'=>$hours, 'minutes'=>$minutes, 'seconds'=>$seconds));\r\n } else {\r\n return(false);\r\n }\r\n } else {\r\n return(false);\r\n }\r\n return(false);\r\n}", "function check_book_available($hour, $begin, $end, $check){\n if($check == \"begin_check\"){\n if( $hour < $begin || $hour >= $end ){\n return true;\n }\n else{\n return false;\n }\n }\n /* CHECK END SELECTION */\n else if($check == \"end_check\"){\n if( $hour <= $begin || $hour > $end ){\n return true;\n }\n else{\n return false;\n }\n }\n}", "function microtime_diff($message, $start, $end = null)\n{\n if (!$end) {\n $end = microtime();\n }\n\n list($start_usec, $start_sec) = explode(\" \", $start);\n list($end_usec, $end_sec) = explode(\" \", $end);\n $diff_sec = intval($end_sec) - intval($start_sec);\n $diff_usec = floatval($end_usec) - floatval($start_usec);\n $value = floatval($diff_sec) + $diff_usec;\n echo $message . ' ' . $value;\n echo PHP_EOL . PHP_EOL;\n}", "function printtimediff($start, $end = null) {\n\n\tif( ! $end )\t$end = time();\n\t$ret = '';\n\t$diff = $end - $start;\n\n\t$h = floor($diff/3600);\n\t$diff %= 3600;\n\tif($h > 0) {\n\t\t$ret .= $h.' h ';\n\t}\n\n\t$m = floor($diff/60);\n\t$diff %= 60;\n\tif ( $m > 0 ) {\n\t\t$ret .= $m.' m ';\n\t}\n\n\treturn $ret . $diff .' s';\n}", "public function findShiftsByRange($startTime, $endTime)\r\n {\r\n return array();\r\n }", "public function getPerformanceScore($dateStart, $dateEnd);", "public function testRentBikesByDate()\n {\n\n $requestParams = [\n 'inputBike' => 3,\n 'dateStart' => new DateTime('2018-06-01 09:00:00'),\n 'dateEnd' => new DateTime('2018-06-21 09:00:00')\n ];\n\n $response = $this->call('POST', '/rentbydates', $requestParams);\n\n $this->assertTrue($response->isOk(), \"Wrong params\");\n\n }", "function count_time_until_end($end_date)\n{\n $now = new DateTime(\"now\");\n $then = new DateTime(date(\"Y-m-d\", strtotime($end_date)));\n\n return $now < $then ? $then->diff($now)->format(\"%a д. %H:%I:%S\") : \"0 д. 00:00:00\";\n}", "function ExampleCountFunction($count_to = 1000000, $message = 'No Message Was Specified.'){\n\t$report_at = round($count_to / 2);\n\t// iterate $i from 0 to $count_to and echo $message at 1/2 way\n\tfor($i=0;$i<$count_to;$i++){\n\t\tif($i == $report_at){\n\t\t\techo $message . PHP_EOL;\n\t\t}\n\t}\n}", "public static function diffTimeMillis($startTime, $endTime)\n {\n if (!empty($startTime) && !empty($endTime)) {\n return self::MongoDate2msTimeStamp($endTime) - self::MongoDate2msTimeStamp($startTime);\n }\n throw new BadRequestHttpException(Yii::t('common', 'parameters_missing'));\n }", "function total_intervals($unit, DeteInterval ...$intervals) {\n $time = 0;\n foreach ($intervals as $interval) {\n $time += $interval->$unit;\n }\n return $time;\n}", "public function get_half_hour_time_range( $start_time='8:00', $end_time='18:00' ) {\n list( $sh,$sm ) = explode( ':', $start_time );\n list( $eh,$em ) = explode( ':', $end_time );\n $timeRangeArray = array();\n //return ;\n while((int)$sh.$sm < (int)$eh.$em) {\n if($sm == \"00\") {\n $sm = \"30\";\n } else {\n $sm = \"00\";\n $sh = (int)($sh+1);\n }\n $fullTime = date(\"h:ia\",mktime((int)$sh,(int)$sm,0));\n array_push($timeRangeArray,$fullTime);\n if($sh < 10) {\n $sh = \"0\"+$sh;\n }\n }\n return $timeRangeArray;\n }", "public static function check2Time($startTime = '', $endTime = 0)\n {\n if( $startTime === 'now' ) $startTime = time();\n\n if( is_string($startTime) ) $startTime = strtotime($startTime);\n\n if( is_string($endTime) ) $endTime = strtotime($endTime);\n\n if( $startTime <= $endTime ) return true; else return false;\n }", "public function sumOverAllScoreOfReport($dateStart, $dateEnd);", "public function getTimeTaken(){\r\n return round($this->getEndTime() - $this->getStartTime(), 6);\r\n }", "private function count_chrono_records(){\n\t\t$searchmonthnext = $this->searchmonth + 1;\n\t\t$start = mktime(0, 0, 0, $this->searchmonth, 1, $this->searchyear);\n\t\t$end = mktime(23, 59, 59, $searchmonthnext, 0, $this->searchyear);\n\t\t\n\t\ttry {\n \t\t \t\t$stmt = $this->db->prepare(\" SELECT COUNT(*) FROM $this->tablename WHERE $this->record_date >= :start AND $this->record_date <= :end \");\n\t\t\t\t$stmt->bindValue(':start', $start, PDO::PARAM_INT);\n\t\t\t\t$stmt->bindValue(':end', $end, PDO::PARAM_INT);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$this->volume_of_records_in_timerange = $stmt->fetchColumn();\n\t\t} catch(PDOException $ex) {\n\t\t \t\t$this->display_svg_graph = \"<p>Unable to count records.</p>\";\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\treturn;\n\t}", "public function testWaitTime(){\n $application = new Application;\n\n $testDate1 = array('2012-01-01','2012-01-02','2012-01-03','2012-01-04','2012-01-05','2012-01-06', '2012-01-07');\n $resultDate1 = array(1 => 1, 2 => 1, 3 => 1, 4=> 1, 5=> 1, 6 => 1);\n\n $testDate2 = array('2012-01-01', '0000-00-00', '2012-01-03', '2012-01-04', '2012-01-05', '2012-01-06', '2012-01-07');\n $resultDate2 = array(1 => 0, 2=> 2, 3 => 1, 4 => 1, 5=> 1, 6 => 1);\n\n $testDate3 = array('2012-01-01', '0000-00-00', '0000-00-00', '2012-01-03', '2012-01-04', '2012-01-05', '2012-01-06');\n\t $resultDate3 = array(1 => 0, 2 => 0, 3 => 2, 4=> 1, 5 => 1, 6 => 1);\n\n $testDate4 = array('2012-01-01', '0000-00-00', '0000-00-00', '0000-00-00', '2012-01-03', '2012-01-05', '2012-01-08');\n\t $resultDate4 = array(1 => 0, 2 => 0, 3 => 0, 4 => 2, 5 => 2, 6 => 3);\n \n $calculatedArray = $application->waitTime($testDate1);\n\n\t $this->assertEquals($resultDate1,$calculatedArray);\n\t $this->assertEquals($resultDate2, $application->waitTime($testDate2));\n\t $this->assertEquals($resultDate3, $application->waitTime($testDate3));\n\t $this->assertEquals($resultDate4, $application->waitTime($testDate4));\n\n\t}", "function timecheck ($time) {\n $min = 0;\n if($time->h >= 1) {\n $min += 60*$time->h;\n }\n $min += $time->i;\n if($min == 0) {\n return \"Passage en cours...\";\n } else {\n return $min.\" min\";\n }\n \n\n}", "function getEndMicrotime();", "function time_taken($tally=0, $precision=5) {\n static $start = 0; // first call\n static $notch = 0; // tally calls\n static $time = 0; // set to time of each call (after setting $duration)\n $now = microtime(1);\n if (! $start) { // init, basically\n $time = $notch = $start = $now;\n return \"Starting at $start.\\n\";\n }\n $duration = $now - $time;\n $time = $now;\n $out = \"That took \".round($duration, $precision).\" seconds.\";\n if ($tally) { // time passed since last tally\n $since_start = $now - $start;\n $since_last_notch = $now - $notch;\n $notch = $now;\n $out .= \"<br>\\n\". round($since_start, $precision) .' seconds since start'.($since_start!=$since_last_notch ? ' ('.round($since_last_notch, $precision) .' since last sum).':'.');\n }\n return $out.\"\\n\";\n}", "function _get_booking_duration($initial_hour, $final_hour) {\n\t\t$initial_timestamp = $this->_get_timestamp($initial_hour);\n\t\t$final_timestamp = $this->_get_timestamp($final_hour);\n\t\treturn ($final_timestamp - $initial_timestamp) / 3600.0;\n\t}", "function get_time_difference( $start, $end )\n{\n //$uts['end'] = strtotime( $end );\n $uts['start'] = $start;\n $uts['end'] = $end;\n if( $uts['start']!==-1 && $uts['end']!==-1 )\n {\n if( $uts['end'] >= $uts['start'] )\n {\n $diff = $uts['end'] - $uts['start'];\n if( $days=intval((floor($diff/86400))) )\n $diff = $diff % 86400;\n if( $hours=intval((floor($diff/3600))) )\n $diff = $diff % 3600;\n if( $minutes=intval((floor($diff/60))) )\n $diff = $diff % 60;\n $diff = intval( $diff );\n return( array('days'=>$days, 'hours'=>$hours, 'minutes'=>$minutes, 'seconds'=>$diff) );\n }\n else\n {\n trigger_error( \"Ending date/time is earlier than the start date/time\", E_USER_WARNING );\n }\n }\n else\n {\n trigger_error( \"Invalid date/time data detected\", E_USER_WARNING );\n }\n return( false );\n}", "function bothTimesEmpty($beginTime, $endTime){\n if($beginTime == null && $endTime == null) {\n return true;\n }\n else {\n return false;\n }\n}", "public function getLevelCount($startTime, $endTime)\n {\n \t$levelArray = array();\n \t$dalCompute = Dal_Island_Compute::getDefaultInstance();\n\n \tif ( !empty($startTime) ) {\n for ( $i = 1; $i < 36; $i ++ ) {\n $levelArray[$i] = $dalCompute->getLevelCountByTime($i, $startTime, $endTime);\n }\n \t}\n \telse {\n\t \tfor ( $i = 1; $i < 36; $i ++ ) {\n\t \t\t$levelArray[$i] = $dalCompute->getLevelCount($i);\n\t \t}\n \t}\n\n \treturn $levelArray;\n }", "public function testWatchCountIsCorrect()\n {\n $totalWatch = $this->stopWatch->getWatchCount();\n\n $this->assertEquals(1, $totalWatch, \"Watch count is not correct\");\n }", "public function getBonuses($dateStart, $dateEnd);", "function get_bottle_count(){\n \n $from_date = $_REQUEST['from_date'];\n $to_date = $_REQUEST['to_date'];\n\n $obj = new vintage_has_acquire();\n $columns = \" sum(qty) as qty\";\n $where = null;\n $rst = $obj ->get($where,$columns);\n \n if(!$rst){\n $var_result['success']=false;\n return $var_result; \n }\n\n $var_result['success']=true;\n $var_result['bottle_count']=$rst[0]['qty'];\n return $var_result; \n\n}", "function v1_check_rsam_ssam($object, $sam_stime, $sam_stime_unc, $sam_etime, $sam_etime_unc, $interval, $interval_unc, &$error) {\n\t\n\t// Get RSAM and SSAM data\n\t$elements=$object['value'];\n\t$l_elements=count($elements);\n\t$rsam_found=FALSE;\n\t$ssam_found=FALSE;\n\tfor ($i=0; $i<$l_elements; $i++) {\n\t\t$element=$elements[$i];\n\t\t\n\t\tif ($element['tag']==\"RSAM\") {\n\t\t\t$rsam_found=TRUE;\n\t\t\t$rsam_stime=array();\n\t\t\t$rsam_stime_unc=array();\n\t\t\t\n\t\t\t// Loop on elements\n\t\t\t$rsam_data=$element['value'];\n\t\t\t$l_rsam_data=count($rsam_data);\n\t\t\t\n\t\t\tfor ($j=0; $j<$l_rsam_data; $j++) {\n\t\t\t\t$rsam_datum=$rsam_data[$j];\n\t\t\t\t\n\t\t\t\t// Get start time\n\t\t\t\t$rsm_stime=xml_get_ele($rsam_datum, \"STARTTIME\");\n\t\t\t\t$rsm_stime_unc=xml_get_ele($rsam_datum, \"STARTTIMEUNC\");\n\t\t\t\t\n\t\t\t\t// Store\n\t\t\t\t$rsam_stime[$j]=$rsm_stime;\n\t\t\t\t$rsam_stime_unc[$j]=$rsm_stime_unc;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($element['tag']==\"SSAM\") {\n\t\t\t$ssam_found=TRUE;\n\t\t\t$ssam_stime=array();\n\t\t\t$ssam_stime_unc=array();\n\t\t\t$ssam_lowf=array();\n\t\t\t$ssam_highf=array();\n\t\t\t\n\t\t\t// Loop on elements\n\t\t\t$ssam_data=$element['value'];\n\t\t\t$l_ssam_data=count($ssam_data);\n\t\t\t\n\t\t\tfor ($j=0; $j<$l_ssam_data; $j++) {\n\t\t\t\t$ssam_datum=$ssam_data[$j];\n\t\t\t\t\n\t\t\t\t// Get start time, low and high frequency\n\t\t\t\t$ssm_stime=xml_get_ele($ssam_datum, \"STARTTIME\");\n\t\t\t\t$ssm_stime_unc=xml_get_ele($ssam_datum, \"STARTTIMEUNC\");\n\t\t\t\t$ssm_lowf=xml_get_ele($ssam_datum, \"LOWFREQ\");\n\t\t\t\t$ssm_highf=xml_get_ele($ssam_datum, \"HIGHFREQ\");\n\t\t\t\t\n\t\t\t\t// Store\n\t\t\t\t$ssam_stime[$j]=$ssm_stime;\n\t\t\t\t$ssam_stime_unc[$j]=$ssm_stime_unc;\n\t\t\t\t$ssam_lowf[$j]=$ssm_lowf;\n\t\t\t\t$ssam_highf[$j]=$ssm_highf;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// If no data was found, nothing to check\n\tif (!$rsam_found && !$ssam_found) {\n\t\treturn TRUE;\n\t}\n\t\n\t// Datetime functions\n\trequire_once \"php/funcs/datetime_funcs.php\";\n\t\n\t// Calculate minimum and maximum open time for RSAM-SSAM\n\tif ($sam_stime_unc==NULL) {\n\t\t$min_open_time=$sam_stime;\n\t\t$max_open_time=$sam_stime;\n\t}\n\telse {\n\t\tif (!datetime_get_min_max($sam_stime, $sam_stime_unc, $min_open_time, $max_open_time, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1222;\n\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum open time for RSAM-SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\t// Calculate min end time and max end time for RSAM-SSAM\n\tif ($sam_etime_unc==NULL) {\n\t\t$min_close_time=$sam_etime;\n\t\t$max_close_time=$sam_etime;\n\t}\n\telse {\n\t\tif (!datetime_get_min_max($sam_etime, $sam_etime_unc, $min_close_time, $max_close_time, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1222;\n\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum end time for RSAM-SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\t// Calculate int_min and int_max\n\tif ($interval_unc==NULL) {\n\t\t$interval_min=$interval;\n\t\t$interval_max=$interval;\n\t}\n\telse {\n\t\t$interval_min=$interval-$interval_unc;\n\t\t$interval_max=$interval+$interval_unc;\n\t}\n\t\n\t// If RSAM found, check it\n\tif ($rsam_found) {\n\t\t// Check RSAM\n\t\t\n\t\t// Check RSAM first start date\n\t\t\n\t\t// Sort RSAM array by start date\n\t\tif (!array_multisort($rsam_stime, $rsam_stime_unc)) {\n\t\t\t// Server error\n\t\t\t$error=array();\n\t\t\t$error['code']=3407;\n\t\t\t$error['message']=\"Error when trying to sort dates of RSAM data\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Calculate minimum and maximum start time for RSAM\n\t\tif ($rsam_stime_unc[0]==NULL) {\n\t\t\t$min_rsam_stime=$rsam_stime[0];\n\t\t\t$max_rsam_stime=$rsam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($rsam_stime[0], $rsam_stime_unc[0], $min_rsam_stime, $max_rsam_stime, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1224;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for RSAM: \".$local_error;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If max_rsam_stime < min_open_time => error\n\t\tif (!datetime_date_before_date($max_rsam_stime, $min_open_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare start time for RSAM: \".$local_error;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==0) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'RSAM' start time is earlier than 'RSAM-SSAM': \".$max_rsam_stime.\" < \".$min_open_time;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check intervals between each RSAM time\n\t\t\n\t\t// 1st time - calculate t1_min and t1_max\n\t\tif ($rsam_stime_unc[0]==NULL) {\n\t\t\t$t1_min=$rsam_stime[0];\n\t\t\t$t1_max=$rsam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($rsam_stime[0], $rsam_stime_unc[0], $t1_min, $t1_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1227;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for RSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Calculate last time\n\t\tif ($rsam_stime_unc[$l_rsam_data-1]==NULL) {\n\t\t\t$t2_min=$rsam_stime[$l_rsam_data-1];\n\t\t\t$t2_max=$rsam_stime[$l_rsam_data-1];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($rsam_stime[$l_rsam_data-1], $rsam_stime_unc[$l_rsam_data-1], $t2_min, $t2_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1228;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for RSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check RSAM end time\n\t\t\n\t\t// Calculate min end time and max end time for RSAM\n\t\tif (!datetime_add_seconds($t2_min, $interval_min, $min_rsam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1233;\n\t\t\t$error['message']=\"Error when trying to calculate minimum end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (!datetime_add_seconds($t2_max, $interval_max, $max_rsam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1234;\n\t\t\t$error['message']=\"Error when trying to calculate maximum end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// If min_rsam_etime > max_close_time => error\n\t\tif (!datetime_date_before_date($min_rsam_etime, $max_close_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==2) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'RSAM' end time is later than 'RSAM-SSAM': \".$max_rsam_etime.\" > \".$max_close_time;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\t// If SSAM found, check it\n\tif ($ssam_found) {\n\t\t// Check SSAM\n\t\t\n\t\t// Sort SSAM array by start date and low frequency\n\t\tif (!array_multisort($ssam_stime, $ssam_lowf, $ssam_stime_unc, $ssam_highf)) {\n\t\t\t// Server error\n\t\t\t$error=array();\n\t\t\t$error['code']=3408;\n\t\t\t$error['message']=\"Error when trying to sort dates and low frequency of SSAM data\";\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check first date of SSAM\n\t\t\n\t\t// Calculate minimum and maximum start time for SSAM\n\t\tif ($ssam_stime_unc[0]==NULL) {\n\t\t\t$min_ssam_stime=$ssam_stime[0];\n\t\t\t$max_ssam_stime=$ssam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($ssam_stime[0], $ssam_stime_unc[0], $min_ssam_stime, $max_ssam_stime, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1224;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for SSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If max_ssam_stime < min_open_time => error\n\t\tif (!datetime_date_before_date($max_ssam_stime, $min_open_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare start time for SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==0) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'SSAM' start time is earlier than 'RSAM-SSAM': \".$max_ssam_stime.\" < \".$min_open_time;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Check intervals between each SSAM time\n\t\t\n\t\t// 1st time - calculate t1_min and t1_max\n\t\tif ($ssam_stime_unc[0]==NULL) {\n\t\t\t$t1_min=$ssam_stime[0];\n\t\t\t$t1_max=$ssam_stime[0];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($ssam_stime[0], $ssam_stime_unc[0], $t1_min, $t1_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1227;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum start time for SSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t$stime1=$ssam_stime[0];\n\t\t$highf1=$ssam_highf[0];\n\t\t\n\t\t// Minimum low frequency and maximum high frequency\n\t\t$min_low_freq=$ssam_lowf[0];\n\t\t$max_high_freq=NULL;\n\t\t\n\t\t// Calculate last time\n\t\tif ($ssam_stime_unc[$l_ssam_data-1]==NULL) {\n\t\t\t$t2_min=$ssam_stime[$l_ssam_data-1];\n\t\t\t$t2_max=$ssam_stime[$l_ssam_data-1];\n\t\t}\n\t\telse {\n\t\t\tif (!datetime_get_min_max($ssam_stime[$l_ssam_data-1], $ssam_stime_unc[$l_ssam_data-1], $t2_min, $t2_max, $local_error)) {\n\t\t\t\t// Error\n\t\t\t\t$error=array();\n\t\t\t\t$error['code']=1228;\n\t\t\t\t$error['message']=\"Error when trying to calculate minimum and maximum last time for SSAM: \".$local_error;\n\t\t\t\t$l_errors++;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check SSAM end time\n\t\t\n\t\t// Calculate min end time and max end time for SSAM\n\t\tif (!datetime_add_seconds($t2_min, $interval_min, $min_ssam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1233;\n\t\t\t$error['message']=\"Error when trying to calculate minimum end time for SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (!datetime_add_seconds($t2_max, $interval_max, $max_ssam_etime, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1234;\n\t\t\t$error['message']=\"Error when trying to calculate maximum end time for SSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// If min_ssam_etime > max_close_time => error\n\t\tif (!datetime_date_before_date($min_ssam_etime, $max_close_time, $is_before, $local_error)) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=1231;\n\t\t\t$error['message']=\"Error when trying to compare end time for RSAM: \".$local_error;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($is_before==2) {\n\t\t\t// Error\n\t\t\t$error=array();\n\t\t\t$error['code']=2;\n\t\t\t$error['message']=\"'SSAM' end time is later than 'RSAM-SSAM': \".$max_ssam_etime.\" > \".$max_close_time;\n\t\t\t$l_errors++;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\t\n\treturn TRUE;\n}", "public function countDates($start, $end)\n {\n // make timestamps from the MySQL formatted time\n $startTimestamp = strtotime($start);\n $endTimestamp = strtotime($end);\n\n // First we need to break these dates into their constituent parts:\n $gd_a = getdate($startTimestamp);\n $gd_b = getdate($endTimestamp);\n\n // Now recreate these timestamps, based upon noon on each day\n // The specific time doesn't matter but it must be the same each day\n $a_new = mktime(12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year']);\n $b_new = mktime(12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year']);\n\n // Subtract these two numbers and divide by the number of seconds in a\n // day. Round the result since crossing over a daylight savings time\n // barrier will cause this time to be off by an hour or two.\n return round(abs($a_new - $b_new) / 86400);\n }", "function simpleDiff($start, $end = 'NOW') { \n $start_time = strtotime($start);\n $stop_time = strtotime($end);\n\n $diff_time = $start_time - $stop_time;\n\n if (abs($diff_time) < 3600) {\n return ceil($diff_time / 60) . 'm';\n }\n\n return ceil($diff_time / 3600) . 'h';\n }", "function get_counts( $results, $start, $end ) {\n $count = 0;\n\n foreach ( $results as $result ) {\n if ( $result['facet_value'] >= $start ) {\n if ( is_null( $end ) || $result['facet_value'] <= $end ) {\n $count += 1;\n }\n }\n }\n\n return $count;\n }", "function etime($time_start){\n $time_end = microtime(true);\n $execution_time = ($time_end - $time_start);\n\n return number_format((float) $execution_time, 1);\n}", "function logintimelist1($time1,$time2)\r\n\t{\r\n\t\tif($time1==0 or $time2==0)\r\n\t\t{\r\n\t\t\t$q=array();\r\n\t\t}else{\r\n\t\t\t$time1=strtotime($time1.\" 00:00:00\");\r\n\t\t\t$time2=strtotime($time2.\" 23:59:59\");\r\n\t\t\t$q=array(\r\n\t\t\t\t\"downtime\"=>array('$gt'=>$time1,'$lt'=>$time2),\r\n\t\t\t\t);\r\n\t\t}\r\n//\t\tprint_r( $q);\r\n\t\t$user_online_count=$this->phpmongo->find(\"user_info\",$q,array(\"downtime\"=>1));\r\n\t\t$tmp=array();\r\n\t\tforeach($user_online_count as $value)\r\n\t\t{\r\n\t\t\t$t=date(\"Y-m-d\",$value[\"downtime\"]);\r\n\t\t\tif(isset($tmp[$t])==false)$tmp[$t]=0;\r\n\t\t\t$tmp[$t]+=1;\r\n\t\t}\r\n//\t\tprint_r($tmp);\r\n\t\treturn $tmp;\r\n\t}", "public function sumScoreOfDefects($dateStart, $dateEnd);", "public function callTime($timestamp) {\n\t\t\n\t\t\t$_date['h'] = (int)date(\"G\",$timestamp);\n\t\t\t$_date['m'] = (int)date(\"i\",$timestamp);\n\t\t\t\n\t\t\t$_dayStart = 6;\t\t\t\t\t// Start the day at 6am\n\t\t\t$_morningEnd = 13;\t\t\t\t// Morning ends at 13:00\n\t\t\t$_afternoonEnd = 17;\t\t\t// Afternoon ends at 17:00\n\t\t\t\n\t\t\tif ($_date['h'] < $_morningEnd AND $_date['h'] >= $_dayStart) {\n\t\t\t\t// Time is morning\n\t\t\t\t$_returnTime = 1;\n\t\t\t} else if ($_date['h'] >= $_morningEnd AND $_date['h'] < $_afternoonEnd) {\n\t\t\t\t// Time is Afternoon\n\t\t\t\t$_returnTime = 2;\n\t\t\t} else {\n\t\t\t\t// Time should be evening cos we don't work before 6am\n\t\t\t\t$_returnTime = 3;\n\t\t\t}\n\n\t\t\treturn $_returnTime;\n\t\t}", "function CalculateWeeklyRecurrancesInRange($startTime, $endTime, $event, $recurrance, $absoluteEnd)\r\n{\r\n\t$ret = array();\r\n\t\t\r\n\tif(strpos($recurrance,\"Every week\") === false || $endTime < $event->startTime || $absoluteEnd < $startTime){\r\n\t\treturn $ret;\r\n\t}\r\n\r\n\t$searchDate1 = clone $startTime;\r\n\t$searchDate2;\r\n\t\r\n\tfor($i = 0; $i < 7; $i++){\r\n\t\tif($searchDate1 > $endTime)\r\n\t\t\tbreak;\r\n\t\tif(strpos($recurrance,$searchDate1->format(\"l\")) !== false)\r\n\t\t{\r\n\t\t\t$searchDate2 = clone $searchDate1;\r\n\t\t\twhile($searchDate2 <= $endTime){\r\n\t\t\t\tif($searchDate2 > $endTime)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t$newEvent = clone $event;\r\n\t\t\t\t$newEvent->startTime = date_create_from_format(\"Y-m-d H:i:s\", $searchDate2->format(\"Y-m-d\").\" \".$event->startTime->format(\"H:i:s\"));\r\n\t\t\t\t$newEvent->endTime = date_create_from_format(\"Y-m-d H:i:s\", $searchDate2->format(\"Y-m-d\").\" \".$event->endTime->format(\"H:i:s\"));\r\n\t\t\t\t//Checks: don't duplicate the original event, verify start & end time range\r\n\t\t\t\tif($newEvent->startTime->format(\"Y-m-d\") != $event->startTime->format(\"Y-m-d\") && $newEvent->startTime < $endTime && $newEvent->endTime > $startTime && !isException($newEvent->startTime, $event) && $newEvent->startTime > $event->startTime && $newEvent->endTime <= $absoluteEnd)\r\n\t\t\t\t\tarray_push($ret, $newEvent);\r\n\t\t\t\t$searchDate2->add(date_interval_create_from_date_string('7 days'));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$searchDate1->add(date_interval_create_from_date_string('1 day'));\r\n\t}\r\n\treturn $ret;\r\n}", "abstract protected function calculate_sample($sampleid, $sampleorigin, $starttime, $endtime);", "function check_availability($post = array()){\n\t\t$result = array('result' => \"failed\", 'message' => 'Error has been occured. Please try again later.');\n\t\tif(is_array($post) && sizeof($post) > 0){ //kena besar dari kosong, kalau kurang ada error.\n\t\t\t$end_time = date(\"H:i\", strtotime($post['booking_time'] . ' +'.$post['duration'] . ' hour')); //dapatkan end time\n\t\t\t$booking_date_time = date(\"Y-m-d\", strtotime(datepicker2mysql($post['booking_date']))) . ' ' . $post['booking_time'].':00'; //dapatkan date and time. eg: 2017-11-09 23:00\n\t\t\t$booking_date_time_end = date(\"Y-m-d H:i:s\", strtotime($booking_date_time . ' +'.$post['duration'] . ' hour')); //dapatkan end time sekali date. eg: 2017-11-10 01:00 (beza dia kat tarikh)\n\t\t\t\n\t\t\t/* 1. dia check start time dalam masa operation hour ke tak\n\t\t\t or \n\t\t\t 2. dia check end time in between 3am-8am\n\t\t\t 3. kalau true, keluar result\n\t\t\t */\n\t\t\tif((strtotime($post['booking_time']) >= strtotime(\"03:00\") && strtotime($post['booking_time']) < strtotime(\"08:00\")) ||\n\t\t\t(strtotime($end_time) > strtotime(\"03:00\") && strtotime($end_time) < strtotime(\"08:00\"))){\n\t\t\t\t$result['message'] = \"Court is unavailable. Operation hour is from 8:00 AM until 3:00 AM\";\n\t\t\t}\n\t\t\t//check booking date, kalau sebelum dari current time, keluar result.\n\t\t\telse if(strtotime($booking_date_time) < strtotime(date(\"Y-m-d H:i:s\"))){\n\t\t\t\t$result['message'] = \"The time is already passed. Please choose another time.\";\n\t\t\t}\n\t\t\t//ni baru check database\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t/* ini query nak check availability dalam database.\n\t\t\t\t 1. kalau masa start tu in between masa yang dah booking\n\t\t\t\t 0r\n\t\t\t\t 2. end time dia habis dalam masa orang yang dah booking\n\t\t\t\t 3. check status \n\t\t\t\t 4. check court id dulu baru 1, 2, 3\n\t\t\t\t*/\n\t\t\t\t$query_chk = $this->db->query(\"SELECT * FROM `ef_booking` \"\n\t\t\t\t\t\t\t\t\t\t\t. \"WHERE `court_id` = \" . $this->db->escape($post['court_id']) . \" \"\n\t\t\t\t\t\t\t\t\t\t\t. \"AND ((`booking_date_time` <= \" . $this->db->escape($booking_date_time) . \" AND `booking_date_time_end` > \" . $this->db->escape($booking_date_time) . \") \"\n\t\t\t\t\t\t\t\t\t\t\t. \"OR (`booking_date_time` < \" . $this->db->escape($booking_date_time_end) . \" AND `booking_date_time_end` >= \" . $this->db->escape($booking_date_time_end) . \")) \"\n\t\t\t\t\t\t\t\t\t\t\t. \"AND `status` != 'C'\");\n\t\t\t\t//kalau ada result, maksudnya dah reserved. \n\t\t\t\tif($query_chk->num_rows() > 0){\n\t\t\t\t\t$result['message'] = \"We're sorry, court is unavailable (Already reserved). Please check on another court/date/time.\";\n\t\t\t\t}\n\t\t\t\t//kumpul data\n\t\t\t\telse{\n\t\t\t\t\t$row_court = $this->court_m->get_single($post['court_id']);\n\t\t\t\t\t$rate_per_hour = 80.00;\n\t\t\t\t\t$result['booking_details'] = array(\n\t\t\t\t\t\t'booking_date_time_view' => date(\"d/m/Y g:i A\", strtotime($booking_date_time)),\n\t\t\t\t\t\t'booking_date_time_end_view' => date(\"d/m/Y g:i A\", strtotime($booking_date_time . ' +'.$post['duration'] . ' hour')),\n\t\t\t\t\t\t'booking_date_time' => date(\"Y-m-d H:i:s\", strtotime($booking_date_time)),\n\t\t\t\t\t\t'booking_date_time_end' => date(\"Y-m-d H:i:s\", strtotime($booking_date_time . ' +'.$post['duration'] . ' hour')),\n\t\t\t\t\t\t'date' => date(\"l, jS F Y\", strtotime($booking_date_time)),\n\t\t\t\t\t\t'start_end' => date(\"g:i A\", strtotime($booking_date_time)) . ' - ' . date(\"g:i A\", strtotime($booking_date_time_end)),\n\t\t\t\t\t\t'duration_view' => $post['duration'] . ' ' . ($post['duration'] > 1 ? 'Hours' : 'Hour'),\n\t\t\t\t\t\t'duration' => $post['duration'],\n\t\t\t\t\t\t'amount' => number_format($rate_per_hour * $post['duration'], 2, \".\", \"\"),\n\t\t\t\t\t\t'court_id' => $post['court_id'],\n\t\t\t\t\t\t'court_name' => isset($row_court) !== false ? $row_court->court_name : $post['court_id']\n\t\t\t\t\t);\n\t\t\t\t\t$result['encrypted_booking'] = encrypt_data($result['booking_details']);\n\t\t\t\t\t$result['result'] = \"success\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function sumCountOfReports($dateStart, $dateEnd);", "function showBestRuns($db)\n{\n $runs = $db->getAllRuns();\n //sort runs and get 5 best\n usort($runs, \"compareRuns\");\n $table = \"<table style=\\\"width:100%\\\"> <tr> <th>Username</th> <th>Time spent</th> <th>Start Time</th> <th> End Time</th> \";\n $runNumber = 1;\n foreach($runs as $run)\n {\n $startTime = $run[\"startTime\"];\n $endTime = $run[\"endTime\"];\n// $timeDiff = strtotime($endTime) - strtotime($endTime); // fix\n $timeDiff = Event::getTimeDiff($endTime, $startTime);\n $username = $run[\"username\"];\n $table .= \"<tr> <td> $username </td><td> $timeDiff</td> <td>$startTime</td> <td>$endTime</td> </tr>\";\n $runNumber += 1;\n }\n $table .= \"</table>\";\n echo $table;\n}", "public function testGetTimelogsForTask()\n {\n\n }", "function hackerHot($baseScore,$date_time,$gravity = 1.8){\n \n $upload_time=strtotime($date_time);\n $time_diff=(strtotime('now')-$upload_time);\n $hourPassed=round(($time_diff/(60 * 60)));\n if($hourPassed<0){\n $hourPassed=0;\n }\n \n return round((($baseScore-1)/pow($hourPassed+2,$gravity))*1000);\n }", "function check_time($ts){\n\n // 1: Read the hh:mm in seperate variables and convert to int\n\t$ts_unix = strtotime($ts);\n\t$ts_hour = idate('H', $ts_unix);\n\t$ts_minute = idate('i',$ts_unix);\n\n // 2: Convert into decimal \n\t$ts_sum = $ts_hour + ($ts_minute * 1/60);\n\n\t$time_now_hour = idate('H');\n\t$time_now_minute = idate('i');\n\t\n\t$time_now_sum = $time_now_hour + ($time_now_minute * 1/60);\n \n // 3: Calculate the difference between now and the timestamp\n\t$div_minutes = ($time_now_sum - $ts_sum) * 60;\n\n // 4: Generate a tag with red background if difference > 5 min\n\tif(($div_minutes <= 5) && ($div_minutes >= 0) && (date(\"Y-m-d\") == date(\"Y-m-d\",$ts_unix)))\n\t{\n\t\treturn '<td class =\"ok_color\">'.$ts.'</td>';\n\t} else\n\t{\n\t\treturn '<td class =\"fail_color\">'.$ts.'</td>';\n\t}\n }", "public function testBookedSpacesAfter()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-18 15:00:00\";\n $end = \"2017-06-25 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(0, $total_places);\n }", "public function getPhpTimeForHostnames($limit, DateTime $start, DateTime $end) {\n $this->limit = (int) $limit;\n $this->start = $start;\n $this->end = $end;\n $this->createSearchJob();\n if ($this->output->isVerbose()) {\n $this->output->writeln(\" > Debug: Checking status of query, each dot means the query is in progress.\");\n }\n $attempt = 12;\n $options = Backoff::getDefaultOptions();\n $options['cap'] = 120 * 1000000;\n $options['maxAttempts'] = 1000;\n $backoff = new Backoff($options);\n try {\n $status = $this->checkStatusOfSearchJob();\n while ($status < self::COMPLETE) {\n switch ($status) {\n case self::RATE_LIMITED:\n echo '✗';\n break;\n case self::IN_PROGRESS:\n echo '○';\n break;\n default:\n echo '.';\n }\n $attempt++;\n usleep($backoff->exponential($attempt));\n $status = $this->checkStatusOfSearchJob();\n }\n }\n catch (BackoffException $e) {\n throw $e;\n }\n echo \"\\n\";\n $records = $this->getSearchJobRecords();\n $this->deleteSearchJob();\n return $records;\n }", "function action_freq($low, $high, $action_type) {\n\n $conn = sql_connect();\n\n $query1 = \"SELECT * FROM Actions WHERE (Action_Time BETWEEN '\".$low.\"' AND '\".$high.\"');\";\n $query2 = \"SELECT * FROM Actions WHERE (Action_Time BETWEEN '\".$low.\"' AND '\".$high.\"') AND (Action_Type='\".$action_type.\"');\";\n\n $sql_res1 = mysqli_query($conn, $query1);\n $sql_res2 = mysqli_query($conn, $query2);\n\n if (mysqli_num_rows($sql_res1) == 0) {\n return 0;\n }\n \n return number_format(mysqli_num_rows($sql_res2)/(float)mysqli_num_rows($sql_res1), 2);\n\n }", "private function getClosedTicketsCount() {\r\n\t\t$sql = \"SELECT count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Resolved_UTC >= DATEADD(day, -1, GETDATE()) \";\r\n\t\t$sql .= \"AND ( \";\r\n\t\t$sql .= \"status_description LIKE '>%' \";\r\n\t\t$sql .= \"OR status_description LIKE 'Completed' \";\r\n\t\t$sql .= \")\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r = $row['count'];\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "function compareTimes($t1, $t2) {\n\t\t$h1 = (int) substr($t1, 0, 2);\n\t\t$m1 = (int) substr($t1, 3, 2);\n\t\t$h2 = (int) substr($t2, 0, 2);\n\t\t$m2 = (int) substr($t2, 3, 2);\n\n\t\t//echo \"h:\" . $h1 . \" m - \" . $m1 . \"\\n\" ;\n\t\t//echo \"h:\" . $h2 . \" m - \" . $m2 . \"\\n\" ;\n\n\t\t$res;\n\n\t\tif( $h1 > $h2 )\n\t\t\t$res = 1;\n\t\telse if( $h1 == $h2 && $m1 > $m2 )\n\t\t\t$res = 1;\n\t\telse\n\t\t\t$res = 0;\n\n\t\treturn $res;\n\n\t}" ]
[ "0.7876827", "0.7767855", "0.76352894", "0.7614312", "0.6194683", "0.60244524", "0.57191056", "0.5621343", "0.56185967", "0.5579207", "0.5575454", "0.5562479", "0.5531313", "0.5524129", "0.5461818", "0.54452014", "0.54303485", "0.54266065", "0.53864574", "0.5371251", "0.53679556", "0.533432", "0.53307825", "0.52604634", "0.51792085", "0.5156342", "0.51469976", "0.5139867", "0.5114532", "0.50942004", "0.5087383", "0.50770634", "0.50654334", "0.50177574", "0.4980087", "0.49779066", "0.4977571", "0.4970995", "0.49672532", "0.49611095", "0.49596775", "0.49552977", "0.49461737", "0.49340364", "0.4933501", "0.49303252", "0.49115828", "0.4882131", "0.4869625", "0.48639327", "0.48550937", "0.48505905", "0.4850258", "0.48497227", "0.4833452", "0.4811499", "0.48070014", "0.4804761", "0.48004302", "0.47984263", "0.47978765", "0.4788733", "0.4782176", "0.4766834", "0.4762701", "0.47576156", "0.4749482", "0.47457498", "0.47445282", "0.4738125", "0.47368282", "0.47292155", "0.471812", "0.4716832", "0.47151485", "0.47059003", "0.47039565", "0.47001964", "0.46930084", "0.46912023", "0.46906182", "0.4689364", "0.46873692", "0.4678728", "0.46742383", "0.4673571", "0.4669037", "0.46683842", "0.46336666", "0.46166375", "0.46120727", "0.46042553", "0.45975304", "0.45967957", "0.45950872", "0.45949554", "0.45812097", "0.4575318", "0.4571059", "0.45701322" ]
0.7789689
1
How many hours does a clock show?
public function testClockHours() { $ecpected = 12; $actual = $this->clock->$hours; $this->assertEquals($expected, $actual); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_time_hour() {\n return sprintf( '%02d', (int) edd_get_option( 'edd_commissions_payout_schedule_time_hr', '' ) );\n }", "public function hours() {\n //TODO prediction\n }", "function hour()\r\n {\r\n $value = $this->SecondsElapsed;\r\n\r\n $second = $value % 60;\r\n $value = ( $value - $second ) / 60;\r\n\r\n $minute = $value % 60;\r\n $value = ( $value - $minute ) / 60;\r\n\r\n $hour = $value % 24;\r\n\r\n return $hour;\r\n }", "function late_ride(int $n): int {\n // Coding and coding ... \n return array_sum(str_split(gmdate(\"H:i\", $n*60)));\n}", "public function getHours() : string\n {\n return date('H', $this->getUnixTimestamp());\n }", "public static function hours( $time )\n\t{\n\t\treturn self::minutes( $time ) * 60;\n\t}", "public static function calculateTimesheetHours($times)\n {\n $minutes = 0;\n foreach($times as $time)\n {\n list($hour, $minute) = explode(':', $time);\n $minutes += $hour * 60;\n $minutes += $minute;\n }\n $hours = floor($minutes / 60);\n $minutes -= $hours * 60;\n\n return sprintf('%02d:%02d', $hours, $minutes);\n }", "public static function checkHours(): int\n {\n $closeHour = Carbon::createFromTime(17, 0, 0, 'UTC')->getTimestamp();\n $currentHour = Carbon::now('UTC')->getTimestamp();\n $currentDay = Carbon::now('UTC');\n $currentDay = $currentDay->dayOfWeek;\n $websiteSettings = WebsiteSettings::find(1);\n\n if ($currentDay !== 0 && $currentDay !== 6 && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n if ($currentDay === 6 && $currentHour < $closeHour && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n return 1;\n }", "function timer()\n {\n return hrtime(true);\n }", "function get_now_hour(){\n if($this->nowHour == \"nc\");\n $this->nowHour = $this->_getNowValues( \"1 hours\");\n return round($this->nowHour * 0.001,3);\n }", "public function ntc_hours ($input) {\n $this->hours_input = substr($input, -11, 2);\n return $this->hours_output = date('h') - $this->hours_input;\n }", "private function GetTimeHHMM() : string {\n\t\t\t$dt = new DateTime();\n\t\t\t$dtz = new DateTimeZone(\"EUROPE/Berlin\");\n\t\t\t$dt->setTimezone($dtz);\n\t\t\treturn $dt->format(\"H:i\");\n\t\t}", "function counttime()\n{\n global $time;\n\n $arrHour = explode(\":\", $time);\n $arrTime2 = array(8, 10, 12, 14, 16, 18, 20, 22, 24);\n foreach ($arrTime2 as $intTime)\n {\n if ($arrHour[0] < $intTime)\n {\n $intWait = (($intTime - $arrHour[0]) * 60) - $arrHour[1];\n $intHours = floor($intWait / 60);\n $intMinutes = $intWait % 60;\n break;\n }\n }\n $arrTime = array('', '');\n if ($intHours < 1)\n {\n $arrTime[0] = '';\n }\n if ($intHours == 1)\n {\n $arrTime[0] = $intHours.T_HOUR;\n }\n if ($intHours > 1 && $intHours < 5)\n {\n $arrTime[0] = $intHours.T_HOURS2;\n }\n if ($intHours > 4)\n {\n $arrTime[0] = $intHours.T_HOURS;\n }\n if ($intMinutes < 1)\n {\n $arrTime[1] = '';\n }\n if ($intMinutes == 1)\n {\n $arrTime[1] = $intMinutes.T_MINUTE;\n }\n if (($intMinutes > 1 && $intMinutes < 5) || @ereg(\"^[2-5][2-4]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES2;\n }\n if (($intMinutes > 4 && $intMinutes < 20) || @ereg(\"^[2-5][5-9]*$\", $intMinutes) || @ereg(\"^[2-5][0-1]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES;\n }\n\n return $arrTime;\n}", "function get_hour()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"hours\"];\n }", "protected function calculateTime()\n {\n return $this->start->diffInHours($this->end) +\n round(\n ($this->start->diffInMinutes($this->end) - ($this->start->diffInHours($this->end) * 60)) / 60,\n 1\n );\n }", "public static function get_times()\n { \n $timer = &self::$timer;\n return $timer->get_times();\n }", "public function getTimes();", "public function getHoursPlayed() {\n return $this->hoursPlayed;\n }", "function get_n_time_slots()\n{\n global $morningstarts, $morningstarts_minutes, $eveningends, $eveningends_minutes;\n global $resolution;\n \n $start_first = (($morningstarts * 60) + $morningstarts_minutes) * 60; // seconds\n $end_last = ((($eveningends * 60) + $eveningends_minutes) * 60) + $resolution; // seconds\n $end_last = $end_last % SECONDS_PER_DAY;\n if (day_past_midnight())\n {\n $end_last += SECONDS_PER_DAY;\n }\n $n_slots = ($end_last - $start_first)/$resolution;\n\n return $n_slots;\n}", "public function getHours()\n {\n $minutes = $this->getEndDate()->getDate()->diffInMinutes($this->getBeginDate()->getDate());\n if (!$minutes) {\n return 0.0;\n }\n return round($minutes / 60, 1);\n }", "function clock_time($key = 'main', $all = false) {\n if (!empty($GLOBALS['_clock_'][$key]['end'])) {\n return -1;\n }\n $GLOBALS['_clock_'][$key]['diff'] = $GLOBALS['_clock_'][$key]['end'] - $GLOBALS['_clock_'][$key]['start'];\n if (!$all) {\n return $GLOBALS['_clock_'][$key]['diff'];\n } else {\n return [\n 'start' => $GLOBALS['_clock_'][$key]['start'],\n 'end' => $GLOBALS['_clock_'][$key]['end'],\n 'diff' => $GLOBALS['_clock_'][$key]['diff']\n ];\n }\n }", "public function getTotalTime()\n {\n return 0; //@todo\n }", "function getHour()\r\n {\r\n return $this->hora;\r\n }", "public function getTotalHours(): float\n {\n return $this->getTotalMinutes() / 60;\n }", "function GetHours()\n {\n return $this->hours;\n }", "function timecheck ($time) {\n $min = 0;\n if($time->h >= 1) {\n $min += 60*$time->h;\n }\n $min += $time->i;\n if($min == 0) {\n return \"Passage en cours...\";\n } else {\n return $min.\" min\";\n }\n \n\n}", "public function getAnswerTime();", "public function getTotalHours() : float\n {\n return $this->totalHours;\n }", "public function getTimeDisplay()\n {\n return $this->timeDisplay;\n }", "public function time()\n\t{\n\t\treturn $this->endTimer-$this->startTimer;\n\t}", "public function getBehelpedTimes()\n {\n $value = $this->get(self::BEHELPED_TIMES);\n return $value === null ? (integer)$value : $value;\n }", "public function toHours($time) {\n \treturn intval($time / 3600000) % 60;\n }", "public function callTime($timestamp) {\n\t\t\n\t\t\t$_date['h'] = (int)date(\"G\",$timestamp);\n\t\t\t$_date['m'] = (int)date(\"i\",$timestamp);\n\t\t\t\n\t\t\t$_dayStart = 6;\t\t\t\t\t// Start the day at 6am\n\t\t\t$_morningEnd = 13;\t\t\t\t// Morning ends at 13:00\n\t\t\t$_afternoonEnd = 17;\t\t\t// Afternoon ends at 17:00\n\t\t\t\n\t\t\tif ($_date['h'] < $_morningEnd AND $_date['h'] >= $_dayStart) {\n\t\t\t\t// Time is morning\n\t\t\t\t$_returnTime = 1;\n\t\t\t} else if ($_date['h'] >= $_morningEnd AND $_date['h'] < $_afternoonEnd) {\n\t\t\t\t// Time is Afternoon\n\t\t\t\t$_returnTime = 2;\n\t\t\t} else {\n\t\t\t\t// Time should be evening cos we don't work before 6am\n\t\t\t\t$_returnTime = 3;\n\t\t\t}\n\n\t\t\treturn $_returnTime;\n\t\t}", "public function getTotalTimeLabelAttribute()\n {\n return Str::plural('hour', $this->total_time);\n }", "public function getHour(): string\n {\n return $this->toLocalizedString('H');\n }", "function convert_seconds_to_hour($time){\n echo \"Time diff in seconds: \" . $time . \"<br>\";\n $numHours = $time / 3600;\n echo $numHours;\n echo \"<br>\";\n\n echo \"Time diff in hours: \" . (int)$numHours . \"<br>\";\n $numMinutes = ($time % 3600) / 60;\n echo $numMinutes;\n echo \"<br>\";\n\n echo \"Time diff in minutes: \" . (int)$numMinutes . \"<br>\";\n $numSeconds = ($time % 3600) % 60;\n echo \"Time diff in seconds: \" . $numSeconds . \"<br>\";\n}", "public function time() {\n return $this->info['total_time'];\n }", "public function GET_HOURS(bool $raw = false)\n\t{\n\t\tif ($raw)\n\t\t{\n\t\t\treturn $this->difference / HOUR;\n\t\t}\n\n\t\t$time = clone($this->currentTime);\n\t\treturn $time->fieldDifference($this->testTime, IntlCalendar::FIELD_HOUR_OF_DAY);\n\t}", "function calc_chegada($partida,$tempo){\n \n \n $aux=split(\":\",$partida);\n\t\t$p=mktime($aux[0],$aux[1],$aux[2]);\n\n\t\t$aux=split(\":\",$tempo);\n\t\t$t=$aux[0]*3600+$aux[1]*60+$aux[2];\n\t\t\n\t\t$c=strftime(\"%H:%M:%S\",$p+$t);\n\t\t//echo \"$p<br>\";\n\t\t//echo \"$t<br>\";\n // echo $t+$p . \"<br>\";\n //echo \"$c<br>\";\n\t\t\n\t\treturn $c;\n }", "public function getTotalHoursAttribute()\n {\n return $this->hours .\".\". $this->minutes;\n }", "function tiemposHMS($min){\n $min=(int)$min;\n $heure=(int)($min/60);\n $minute=(($min/60)-$heure)*60; \n return $heure .':' . $minute; \n \n \n \n }", "function timeElapsed($sec){\n\n if( $sec <= 1 ) 'Agora mesmo';\n\n $date = [ 'ano' => 31536000,\n 'mes' => 2592000,\n 'dia' => 86400,\n 'hora' => 3600,\n 'minuto' => 60,\n 'segundo' => 1];\n \n foreach( $date as $name => $time ){\n $qtde = $sec / $time;\n if( $qtde >= 1 ) return 'há ' . floor( $qtde ) . ' ' . $name . ($qtde > 2 ? 's' : '');\n }\n\n }", "public function cChrono(){\n\t\treturn round(getMicrotime()-PLX_MICROTIME,3).'s';\n\t}", "public function get_hour_step()\r\n {\r\n return $this->hour_step;\r\n }", "static function diffTime(string $match): int {\n $date1 = strtotime($match);\n return (int) floor(($date1 - time()) / 3600);\n }", "public function timeMid();", "public function timeHi();", "public function displayTime()\n {\n return $this->displayTime;\n }", "public function getTimeTaken(){\r\n return round($this->getEndTime() - $this->getStartTime(), 6);\r\n }", "public function getTime(): int {\n return $this->time;\n }", "public function getHour()\n {\n return $this->hour;\n }", "public function getHour()\n {\n return $this->hour;\n }", "public function getHour()\n {\n return $this->hour;\n }", "function getHoursInDay($y=null,$m=null,$d=null)\n {\n return 24;\n }", "public function getTime(): int {\n\t\treturn $this->time;\n\t}", "public function getTotalTime()\n {\n return $this->info->total_time * 1000;\n }", "function get_cell_hours($hour)\n\t{\n\t\t$hour = ($hour-1)%12+1;\n\t\t$am = $hour > 7 ? 'AM' : 'PM';\n\t\t\n\t\treturn \"<td class='hour' rowspan='4'>\n\t\t\t\t\t<p class='hour'>$hour</p>\n\t\t\t\t\t<p class='$am'>$am</p>\n\t\t\t\t</td>\";\n\t}", "public function getHoursOfOperation()\n {\n return $this->hours_of_operation;\n }", "private function time_rule($time){\n $hour = floor($time/3600);//divisão retornando parte inteira.\n $hour_rest = fmod($time, 3600);//divisão retornando restante\n $min = floor($hour_rest/60); // calculo de minutos apartir do restante de horas\n $sec = fmod($hour_rest, 60); // calculos dos segundos\n return $this->number_format($sec,$min,$hour);\n }", "public function getHourUTC()\n {\n $dateTime = $this->getDatetime();\n $hourInTz = Date::factory($dateTime, 'UTC')->toString('G');\n\n return $hourInTz;\n }", "public function getPace() {\n\t\t$distance = $this->_distance;\n\t\t$time = $this->_time;\n\n\t\t$segments = explode(':',$time);\n\t\t$length = count($segments);\n\t\tswitch ($length) {\n\t\t\tcase 3:\n\t\t\t\t$seconds = $segments[0] * 3600 + $segments[1] * 60 + $segments[2];\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$seconds = $segments[0] * 60 + $segments[1];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$seconds = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ($seconds != 0) {\n\t\t\t$minutes = floor($seconds / $distance / 60);\n\t\t\t$seconds = sprintf('%02d',round(($seconds / $distance / 60 - $minutes) * 60));\n\t\t\t$pace = $minutes.\":\".$seconds;\n\t\t} else {\n\t\t\t$pace = \"--\";\n\t\t}\t\t\n\t\t\n\t\treturn $pace;\n\t}", "function display_time ( $time, $ignore_offset=0 ) {\n\tglobal $TZ_OFFSET;\n\t$hour = (int) ( $time / 10000 );\n\tif ( ! $ignore_offset )\n\t$hour += $TZ_OFFSET;\n\t$min = abs( ( $time / 100 ) % 100 );\n\t//Prevent goofy times like 8:00 9:30 9:00 10:30 10:00\n\tif ( $time < 0 && $min > 0 ) $hour = $hour - 1;\n\twhile ( $hour < 0 )\n\t$hour += 24;\n\twhile ( $hour > 23 )\n\t$hour -= 24;\n\tif ( $GLOBALS[\"TIME_FORMAT\"] == \"12\" ) {\n\t\t$ampm = ( $hour >= 12 ) ? \"pm\" : \"am\";\n\t\t$hour %= 12;\n\t\tif ( $hour == 0 )\n\t\t$hour = 12;\n\t\t$ret = sprintf ( \"%d:%02d%s\", $hour, $min, $ampm );\n\t} else {\n\t\t$ret = sprintf ( \"%d:%02d\", $hour, $min );\n\t}\n\treturn $ret;\n}", "public function getSmallVClock() {}", "public static function getTimeToRun();", "function getGreetings(){\n /* This sets the $time variable to the current hour in the 24 hour clock format */\n $time = date(\"H\");\n /* Set the $timezone variable to become the current timezone */\n $timezone = date(\"e\");\n /* If the time is less than 1200 hours, show good morning */\n if ($time < \"12\") {\n return \"GM\";\n }\n /* If the time is grater than or equal to 1200 hours, but less than 1700 hours, so good afternoon */\n else if ($time >= \"12\" && $time < \"17\") {\n\n return \"GA\";\n }\n /* Should the time be between or equal to 1700 and 1900 hours, show good evening */\n else if ($time >= \"17\" && $time < \"19\") {\n return \"GE\";\n }\n /* Finally, show good night if the time is greater than or equal to 1900 hours */\n\n else if ($time >= \"19\") {\n return \"GN\";\n }\n }", "public static function renderTime($time)\n {\n return floor($time / 60) . \" min \" . $time % 60 . \" secondes\";\n }", "function countTime($connection, $sql_tiempo){\n $sql = mysqli_query($connection, $sql_tiempo);\n $horas = 0;\n $minutos = 0;\n while($row = mysqli_fetch_row($sql)){\n \n $timeTo = explode(':', $row[0]);\n \n $horas += intval($timeTo[0]);\n $minutos += intval($timeTo[1]);\n \n }\n $final_time = intval((($horas*60) + $minutos)/60).\":\".(($horas*60) + $minutos)%60;\n return $final_time;\n}", "public function getBigVClock() {}", "public function calculateTime()\n {\n echo 'it takes 1h to get there.',\"\\n\";\n\n self::$traitStaticMember = 'changes conflict member\\'s initial value';\n }", "public function getTime(): int;", "public function getTime(): int;", "public function getServerHour(){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT DATE_FORMAT(NOW(), '%k:%i:%s') AS hora\");\n\t\t$stmt->execute();\n\t\treturn $stmt->fetch()[0]; //respuesta\n\t}", "function Hora_prog($valor){\t\n\n return date(\"H:i\", strtotime($valor));\n\n}", "public function getHourMetrics()\n {\n return $this->hourMetrics;\n }", "function getTimeProccess(){\n\t\treturn round($this->timeProccess,5);\n\t}", "public function sleepHour()\n {\n return $this->type->sleep_hour;\n }", "public function getTime() : int;", "public function getTime()\n {\n $time = 0;\n foreach ($this->data['views'] as $view) {\n $time += (float) $view['time'];\n }\n\n return $time;\n }", "protected static function _timeFromCakeToStopwatch(): float\n {\n return self::$_startupTime - TIME_START;\n }", "public function activityTime();", "public function getHr()\n {\n return $this->hr;\n }", "private function tick() {\r\n\t\treturn ceil( time() / 43200 );\r\n\t}", "function reservation_min_to_hours($value,$type=\"H:i\"){\n return gmdate($type,$value*60);\n}", "function hms($duree = 0) \n\t{\n\t\t$heures = round($duree / 3600);\n\t\t$minutes = round(($duree - $heures * 3600) / 60);\n\t\t$secondes = round(($duree - $heures * 3600 - $minutes * 60) / 60);\n\n\t\treturn str_pad($heures, 2, \"0\", STR_PAD_LEFT).':'.str_pad($minutes, 2, \"0\", STR_PAD_LEFT).':'.str_pad($secondes, 2, \"0\", STR_PAD_LEFT);\n\t}", "public function getFormattedTurnaroundTime()\n\t{\n\t\t\n\t\t$tat = $this->getTurnaroundTime();\n\t\t\n\t\t$ftat = \"\";\n\t\t$tat_y = intval($tat/(365*24*60*60));\n\t\t$tat_w = intval(($tat-($tat_y*(365*24*60*60)))/(7*24*60*60));\n\t\t$tat_d = intval(($tat-($tat_y*(365*24*60*60))-($tat_w*(7*24*60*60)))/(24*60*60));\n\t\t$tat_h = intval(($tat-($tat_y*(365*24*60*60))-($tat_w*(7*24*60*60))-($tat_d*(24*60*60)))/(60*60));\n\t\t$tat_m = intval(($tat-($tat_y*(365*24*60*60))-($tat_w*(7*24*60*60))-($tat_d*(24*60*60))-($tat_h*(60*60)))/(60));\n\t\t$tat_s = intval(($tat-($tat_y*(365*24*60*60))-($tat_w*(7*24*60*60))-($tat_d*(24*60*60))-($tat_h*(60*60))-($tat_m*(60))));\n\t\tif($tat_y > 0) $ftat = $tat_y.\" \".Lang::choice('messages.year',$tat_y).\" \";\n\t\tif($tat_w > 0) $ftat .= $tat_w.\" \".Lang::choice('messages.week',$tat_w).\" \";\n\t\tif($tat_d > 0) $ftat .= $tat_d.\" \".Lang::choice('messages.day',$tat_d).\" \";\n\t\tif($tat_h > 0) $ftat .= $tat_h.\" \".Lang::choice('messages.hour',$tat_h).\" \";\n\t\tif($tat_m > 0) $ftat .= $tat_m.\" \".Lang::choice('messages.minute',$tat_m).\" \";\n\t\tif($tat_s > 0) $ftat .= $tat_s.\" \".Lang::choice('messages.second',$tat_s);\n\n\t\treturn $ftat;\n\t}", "public function getElapsedTime();", "function time_diff($start_time,$end_time) {\n\n\t//subtract our times to get the difference\n\t$calcStArray = explode(\":\",$start_time);\n\t$calcEtArray = explode(\":\",$end_time);\n\n\t$start_hour = $calcStArray[0];\n\t$start_min = $calcStArray[1];\n\n\t$end_hour = $calcEtArray[0];\n\t$end_min = $calcEtArray[1];\n\n\t//reduce our dates to timestamps. We use a random date here, since it does not matter\n\t$ts1 = mktime($start_hour,$start_min,\"0\",1,1,2000);\n\t$ts2 = mktime($end_hour,$end_min,\"0\",1,1,2000);\n\n\t//get the number of seconds\n\t$diff = $ts2 - $ts1;\n\n\t$temp = $diff/3600;\n\n\t//get the place of the decimal point\n\t$pos = strpos($temp,\".\");\n\n\t//if we have pos, there is a decimal point\n\tif ($pos) {\n\n\t\t$dur_hour = intval($temp);\n\t\t$min = substr($temp,$pos);\n\n\t\t//convert to clock nums\n\t\tif ($min==\".5\") $dur_min = \"30\";\n\t\telseif ($min==\".25\") $dur_min = \"15\";\n\t\telseif ($min==\".75\") $dur_min = \"45\";\n\n\t}\n\telse {\n\t\t$dur_hour = $temp;\n\t\t$dur_min = \"00\";\n\t}\n\n\treturn array($dur_hour,$dur_min);\n\n}", "public function get_duration_unit( $context = 'view' ) {\n\t\treturn 'night';\n\t}", "function _get_booking_duration($initial_hour, $final_hour) {\n\t\t$initial_timestamp = $this->_get_timestamp($initial_hour);\n\t\t$final_timestamp = $this->_get_timestamp($final_hour);\n\t\treturn ($final_timestamp - $initial_timestamp) / 3600.0;\n\t}", "public function wakeUpHour()\n {\n return $this->type->wake_up_hour;\n }", "public function generate_hours() {\n\n\t\t\t$schema = get_theme_mod( 'schema' );\n\n\t\t\t$hours = isset( $schema['openingHoursSpecification'] ) ? $schema['openingHoursSpecification'] : false;\n\n\t\t\tif ( !$hours ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$DAYS = array( 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' );\n\t\t\t\n\t\t\tforeach( $DAYS as $day ) {\n\t\t\t\tforeach( $hours as $period ) {\n\t\t\t\t\tif ( in_array( $day, $period['dayOfWeek'] ) ) {\n\t\t\t\t\t\tif ( '00:00' === $period['opens'] ) {\n\t\t\t\t\t\t\tif ( '00:00' === $period['closes'] ) {\n\t\t\t\t\t\t\t\t$return[$day][0] = 'Closed';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( '23:59' === $period['closes'] ) {\n\t\t\t\t\t\t\t\t$return[$day][0] = 'Open 24 hours';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$return[$day][0] = $period['opens'];\n\t\t\t\t\t\t$return[$day][1] = $period['closes'];\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\treturn $return;\n\t\t}", "public function formatTime()\n { \n return sprintf('%02d:%02d:%02d', ($this->totaltime / 3600), \n ($this->totaltime / 60 % 60), $this->totaltime % 60); \n }", "function getTime($offset){\n $hours = date('h');\n $minutes = (date('i') > 30) ? '30' : '00';\n $minutes = $minutes + $offset;\n if($minutes >= 60){\n $hours = $hours + (int)($minutes / 60);\n if($hours > 12)\n $hours -= 12;\n $minutes = $minutes % 60;\n }\n $minutes = ($minutes==0) ? '00' : $minutes;\n return \"$hours:$minutes\" . date('A');\n}", "public function getTimePerQuestion()\n {\n return $this->timePerQuestion;\n }", "function getLifeTime();", "public function runtime()\n {\n return sprintf('%.5f', ($this->endTime-$this->startTime));\n }", "function display_greeting()\n\t{\n\t\t$hour = date('h');\n\n\t\tif ($hour >= 0 and $hour <= 11)\n\t\t{\n\t\t\techo \"Good Morning!\";\n\t\t}\n\n\t\telseif ($hour >= 12 and $hour <= 17)\n\t\t{\n\t\t\techo \"Good Afternoon!\";\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\techo \"Good Evening!\";\n\t\t}\n\n\t}", "function getHours($hour, $matches){\n\n\t$start = strtotime($hour);\n\n\t$hours[] = date('H:i', $start);\n\n\tfor ($i = 0; $i < $matches; $i++):\n\t\t$start = strtotime('+10 minutes',$start);\n\t\t$hours[] = date('H:i', $start);\n\tendfor;\n\n\treturn $hours;\n}", "function greetings_by_time($timezone=false) {\n\t\tif($timezone){\n\t\t\tdate_default_timezone_set($timezone);\n\t\t}\n $hour = date(\"H\");\n if ($hour < \"12\") {\n\t\t\treturn \"Good morning\";\n } elseif ($hour >= \"12\" && $hour < \"17\") {\n\t\t\treturn \"Good afternoon\";\n } elseif ($hour >= \"17\" && $hour < \"19\") {\n\t\t\treturn \"Good evening\";\n }\n\t\treturn \"Good night\";\n\t}", "static public function sessionTimeCalculation($datetime) {\n // la resta me da como resultado en segundos\n // div para 60 y obtengo minutos\n // div para 60 de nuevo y obtengo horas\n // div para 24 y obtengo dias\n return intval(strtotime($datetime) - strtotime('NOW'));\n }" ]
[ "0.6782323", "0.672277", "0.6611634", "0.653615", "0.64358306", "0.63599664", "0.62748796", "0.6191699", "0.61898255", "0.6175197", "0.61529344", "0.61504066", "0.61149204", "0.6069272", "0.60525686", "0.600032", "0.5981866", "0.59788626", "0.5966237", "0.5957123", "0.5956892", "0.5939303", "0.5916687", "0.5902934", "0.5898828", "0.5898296", "0.5892545", "0.58738434", "0.58060586", "0.5804137", "0.58031964", "0.58011204", "0.5764105", "0.5738688", "0.571796", "0.57095945", "0.5697871", "0.569644", "0.567791", "0.5671156", "0.5641577", "0.56362516", "0.562635", "0.561535", "0.56148124", "0.56101674", "0.56075144", "0.55953157", "0.55936813", "0.5583884", "0.55713403", "0.55713403", "0.55713403", "0.5567129", "0.55636346", "0.5562861", "0.55601406", "0.5551779", "0.5541774", "0.5539227", "0.5529824", "0.5523352", "0.55207664", "0.55183077", "0.5506254", "0.55061644", "0.5499681", "0.54972106", "0.54841435", "0.5483314", "0.5483314", "0.5482668", "0.54792243", "0.5477851", "0.54778254", "0.54731303", "0.5468914", "0.54667324", "0.5463552", "0.54570496", "0.54398334", "0.54377306", "0.54350585", "0.5434049", "0.5432131", "0.5428028", "0.5426807", "0.5424877", "0.54244685", "0.54186803", "0.5406359", "0.5399186", "0.5395819", "0.53936946", "0.53883845", "0.5386221", "0.5381108", "0.538029", "0.53792554", "0.5371576" ]
0.6527518
4
countBells test 4 INPUT $startTime = '23:00'; $endTime = '1:00'; OUTPUT 24
public function testcountBells4() { $startTime = '23:00'; $endTime = '1:00'; $expected = 24; $actual = $this->clock->countBells($startTime, $endTime); $this->assertEquals($expected, $actual); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testcountBells1()\n {\n $startTime = '2:00';\n $endTime = '3:00';\n $expected = 5;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells2()\n {\n $startTime = '14:00';\n $endTime = '15:00';\n $expected = 5;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells6()\n {\n $startTime = '10:00';\n $endTime = '10:00';\n $expected = 166;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells3()\n {\n $startTime = '14:23';\n $endTime = '15:42';\n $expected = 3;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function calculateTimePerDay($startTime, $endTime){\n\n $start_time = strtotime(Config::get('mycnf.start_time'));//8:30\n $end_time = strtotime(Config::get('mycnf.end_time')); //18\n $sleep_AM = strtotime(Config::get('mycnf.sleep_AM')); //11:30\n $start_PM = strtotime(Config::get('mycnf.start_PM')); //13\n\n if ($startTime < $sleep_AM) {\n\n if ($endTime < $sleep_AM) {\n $timePerDay = $endTime - $startTime;\n\n }elseif ($endTime > $sleep_AM && $endTime < $start_PM) {\n $timePerDay = $sleep_AM - $startTime;\n\n }elseif ($endTime > $start_PM) {\n $timePerDay = ($sleep_AM - $startTime) + ($endTime - $start_PM);\n }\n\n }elseif ($startTime >= $sleep_AM && $startTime <= $start_PM) {\n\n if ($endTime > $sleep_AM && $endTime < $start_PM ) {\n $timePerDay = 0;\n\n }elseif ($endTime > $start_PM) {\n $timePerDay = $endTime - $start_PM;\n\n }\n\n }elseif ($startTime > $start_PM){\n $timePerDay = $endTime - $startTime;\n\n }\n\n return $timePerDay;\n }", "public function countTimediff($beginTime,$endTime)\n\t{\n\t\t$begins=explode( \":\",$beginTime);\n\t\t$beginseconds=(int)($begins[0])*3600 + (int)($begins[1])*60 + (int)($begins[2]);\n\t\n\t\t$ends=explode(\":\",$endTime);\n\t\t$endseconds=(int)($ends[0])*3600 + (int)($ends[1])*60 + (int)($ends[2]);\n\t\n\t\treturn ($endseconds-$beginseconds);\n\t}", "function get_n_time_slots()\n{\n global $morningstarts, $morningstarts_minutes, $eveningends, $eveningends_minutes;\n global $resolution;\n \n $start_first = (($morningstarts * 60) + $morningstarts_minutes) * 60; // seconds\n $end_last = ((($eveningends * 60) + $eveningends_minutes) * 60) + $resolution; // seconds\n $end_last = $end_last % SECONDS_PER_DAY;\n if (day_past_midnight())\n {\n $end_last += SECONDS_PER_DAY;\n }\n $n_slots = ($end_last - $start_first)/$resolution;\n\n return $n_slots;\n}", "function getBusinessDayCount_timestamp($startStamp,$endStamp){\n\t\t$startStamp=timestamp2utime($startStamp);\n\t\t$endStamp=timestamp2utime($endStamp);\n\t\t$dateTmp=$startStamp;\n\t\t$businessDays=0;\n\t\t$loopEnd=false;\n\t\twhile(!$loopEnd){\n\t\t\t$dateTmp = DateAdd($dateTmp,\"d\",1);\n\t\t\tif(isBusinessDay($dateTmp)){\n\t\t\t\t$businessDays++;\n\t\t\t}\n\t\t\tif($dateTmp==$endStamp){\n\t\t\t\t$loopEnd=true;\n\t\t\t}\n\t\t}\n\t\treturn $businessDays;\n\t}", "function calculateShiftMinutes($startTime, $endTime) {\n $startHourDigits = floor($startTime / 100);\n $startMinuteDigits = $startTime / 100 - $startHourDigits;\n\n $endHourDigits = floor($endTime / 100);\n $endMinuteDigits = $endTime / 100 - $endHourDigits;\n\n $startTimeInMinutes = $startHourDigits * 60 + $startMinuteDigits * 100;\n $endTimeInMinutes = $endHourDigits * 60 + $endMinuteDigits * 100;\n\n $shiftLengthInMinutes = $endTimeInMinutes - $startTimeInMinutes;\n return round($shiftLengthInMinutes);\n}", "function counttime()\n{\n global $time;\n\n $arrHour = explode(\":\", $time);\n $arrTime2 = array(8, 10, 12, 14, 16, 18, 20, 22, 24);\n foreach ($arrTime2 as $intTime)\n {\n if ($arrHour[0] < $intTime)\n {\n $intWait = (($intTime - $arrHour[0]) * 60) - $arrHour[1];\n $intHours = floor($intWait / 60);\n $intMinutes = $intWait % 60;\n break;\n }\n }\n $arrTime = array('', '');\n if ($intHours < 1)\n {\n $arrTime[0] = '';\n }\n if ($intHours == 1)\n {\n $arrTime[0] = $intHours.T_HOUR;\n }\n if ($intHours > 1 && $intHours < 5)\n {\n $arrTime[0] = $intHours.T_HOURS2;\n }\n if ($intHours > 4)\n {\n $arrTime[0] = $intHours.T_HOURS;\n }\n if ($intMinutes < 1)\n {\n $arrTime[1] = '';\n }\n if ($intMinutes == 1)\n {\n $arrTime[1] = $intMinutes.T_MINUTE;\n }\n if (($intMinutes > 1 && $intMinutes < 5) || @ereg(\"^[2-5][2-4]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES2;\n }\n if (($intMinutes > 4 && $intMinutes < 20) || @ereg(\"^[2-5][5-9]*$\", $intMinutes) || @ereg(\"^[2-5][0-1]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES;\n }\n\n return $arrTime;\n}", "function getBusinessDayCount($startStamp,$endStamp){\n\t\t$dateTmp=$startStamp;\n\t\t$businessDays=0;\n\t\t$loopEnd=false;\n\t\twhile(!$loopEnd){\n\t\t\t$dateTmp = DateAdd($dateTmp,\"d\",1);\n\t\t\tif(isBusinessDay($dateTmp)){\n\t\t\t\t$businessDays++;\n\t\t\t}\n\t\t\tif($dateTmp==$endStamp){\n\t\t\t\t$loopEnd=true;\n\t\t\t}\n\t\t}\n\t\treturn $businessDays;\n\t}", "protected static function compareMicrotimes($startTime, $endTime) {\n\t\treturn round($endTime - $startTime, 4);\n\t}", "function timeCalculator($box_times, $call_times){ \n \n $time_output = new TimeOutput();\n \n $box_times_start = date_create($box_times['Start']);\n $box_times_end = date_create($box_times['End']);\n $call_times_start = date_create($call_times['Start']);\n $call_times_end = date_create($call_times['End']);\n \n \n //Stage 1 and 5\n if($call_times_end <= $box_times_start || $box_times_end <= $call_times_start ){\n $time_output->setName(\"stage 1 or stage 5\");\n $time_output->setBoxTime(array(array('Start' => $box_times_start, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end)));\n } \n //Stage 2\n if($call_times_start <= $box_times_start && $box_times_start < $call_times_end\n && $call_times_end < $box_times_end){\n $time_output->setName(\"stage 2\");\n $time_output->setBoxTime(array(array('Start' => $call_times_end, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n \n }\n //Stage 3\n if($box_times_start < $call_times_start && $call_times_end < $box_times_end){\n $time_output->setName(\"stage 3\");\n $time_output->setBoxTime(array(\n array('Start' => $box_times_start, 'END' =>$call_times_start),\n array('Start' => $call_times_end, 'END' =>$box_times_end)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n }\n //Stage 4 \n if($box_times_start < $call_times_start && $call_times_start < $box_times_end\n && $box_times_end <= $call_times_end){\n $time_output->setName(\"stage 4\");\n $time_output->setBoxTime(array(array('Start' => $box_times_start, 'END' =>$call_times_start)));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n } \n //Stage 6\n if($call_times_start < $box_times_start && $box_times_end < $call_times_end ){\n $time_output->setName(\"stage 6\");\n $time_output->setBoxTime(array(array('Start' => \"\", 'END' => \"\")));\n $time_output->setCallTime(array(array('Start' => $call_times_start, 'END' =>$call_times_end))); \n }\n \n return $time_output;\n}", "public function countHour($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%H');\n\t\t//echo $interval->format('%a total days').\"\\n\";\n\t\t//echo $interval->format('%m month, %d days').\"\\n\";\n\t\t//echo $interval->format('%H hour, %i minute').\"\\n\";\n\t}", "function when($parameters) { // $parameters = ['timestamp'], ['numberOfUnits']\n\t$currentTime = time();\n\t\n\tif (preg_match ( '/\\d{4}-\\d{1,2}-\\d{1,2}\\s\\d{1,2}:\\d{1,2}:\\d{1,2}/u', $parameters['timestamp'] )) // /d -> 0-9, nt 1978-2-3 5:8:9, u on seotud UTF-8 ga\n\t{\n\t\t$time = strtotime( $parameters['timestamp'] ); //konventeerib sekunditeks\n\t}\n\telse {\n\t\t$time = $parameters['timestamp'];\n\t}\n\n\tif($currentTime > $time){\n\t\t$difference = $currentTime - $time;\n\t} else {\n\t\t$difference = $time - $currentTime;\n\t}\n\n\t$units = array (\n\t\t\t'second',\n\t\t\t'minute',\n\t\t\t'hour',\n\t\t\t'day',\n\t\t\t'week',\n\t\t\t'month',\n\t\t\t'year',\n\t\t\t'decade'\n\t);\n\t\n\t$secondsInSecond = 1;\n\t$secondsInMinute = 60;\n\t$secondsInHour = $secondsInMinute*60;\n\t$secondsInDay = $secondsInHour*24;\n\t$secondsInWeek = $secondsInDay*7;\n\t$secondsInMonth = $secondsInWeek*(4+1/3);\n\t$secondsInYear = $secondsInMonth*12;\n\t$secondsInDecade = $secondsInYear*10;\n\t\n\t$sizes = array (\t\t\t\t//$sizes = array (\n\t\t\t$secondsInSecond, \t\t//1, //sekund\n\t\t\t$secondsInMinute, \t\t//60, //minut\n\t\t\t$secondsInHour, \t\t// 60*60, //tund\n\t\t\t$secondsInDay,\t\t\t//60*60*24, //päev\n\t\t\t$secondsInWeek, \t\t//60*60*24*7, //nädal\n\t\t\t$secondsInMonth,\t\t//60*60*24*7*(4+1/3), //kuu\n\t\t\t$secondsInYear, \t\t//60*60*24*7*(4+1/3)*12, //aasta\n\t\t\t$secondsInDecade \t\t//60*60*24*7*(4+1/3)*12*10 //kümmend\n\t);\n\n\tfor($positionInUnits = sizeof ( $sizes ) - 1; ($positionInUnits >= 0) && \n\t\t(($amountOfTime = $difference / $sizes [$positionInUnits]) <= 1); $positionInUnits --); \n\t\tif ($positionInUnits < 0)\n\t\t\t$positionInUnits = 0;\n\t\t$remainedTime = $currentTime - ($difference % $sizes [$positionInUnits]);\n\t\t$amountOfTime = floor ( $amountOfTime );\n\t\tif ($amountOfTime != 1) \n\t\t\t$units [$positionInUnits] .= 's';\n\t\t$when = sprintf ( \"%d %s \", $amountOfTime, $units [$positionInUnits] );\n\t\tif (($parameters['numberOfUnits'] == 0) && ($positionInUnits >= 1) && (($currentTime - $remainedTime) > 0))\n\t\t$when .= when ( $remainedTime);\n\t\treturn $when;\n}", "function process($name, $start, $end){\n $time = $end - $start;\n echo \"Task: \" . $name . \"\\t\\t Time: \" . $time . \"\\n\";\n}", "function checkTimeRange($params) {\n\n if (!isset($params['start_date']) || $params['start_date'] == null) {\n return -1;\n }\n \n if (!isset($params['stop_date']) || $params['stop_date'] == null) {\n return -2;\n }\n \n if (!isset($params['start_time']) || $params['start_time'] == null) {\n return -3;\n }\n \n if (!isset($params['end_time']) || $params['end_time'] == null) {\n return -4;\n }\n \n $startTime = $params['start_date'] . ' ' . $params['start_time'];\n $emdTime = $params['stop_date'] . ' ' . $params['end_time'];\n \n if(strtotime($startTime) > strtotime($emdTime)) {\n return -5;\n }\n return 1;\n }", "function getduration_cmn($EndTime, $StartTime) {\n $diff = strtotime($EndTime) - strtotime($StartTime);\n return $diff;\n}", "function getQueryTime($time_start,$time_end) {\n\t\treturn round($time_end - $time_start,4).'sec';\n\t}", "function late_ride(int $n): int {\n // Coding and coding ... \n return array_sum(str_split(gmdate(\"H:i\", $n*60)));\n}", "public function getTimes();", "function beginIsAfterEnd($beginTime, $endTime){\n if($beginTime > $endTime) {\n return true;\n }\n else {\n return false;\n }\n}", "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\n //Definindo variáveis = 0\n $fruito = $fruito = 0;\n //Executando a contagem de elementos do array para posterior calculo\n for ($i = 0; $i < count($apples); $i++){\n /* Se o calculo da distancia da árvore $a com a distância da fruta caída,\n * for maior que o ponto inicial da casa, incrementa-se na variável $fruita\n */\n $fapple = ($a + $apples[$i]);\n if ($fapple >= $s && $fapple <= $t){\n $fruita++;\n }\n }\n // Imprime o resultado da variavel $fruita\n print $fruita;\n // Salto de linha\n echo \"\\n\";\n //Executando a contagem de elementos do array para posterior calculo\n for ($i = 0; $i < count($oranges); $i++){\n /* Se o calculo da distancia da árvore $b com a distância da fruta caída,\n * for menor que o ponto final da casa, incrementa-se na variável $fruito\n */\n $forange = ($b + $oranges[$i]);\n if ($forange >= $s && $forange <= $t){\n $fruito++;\n }\n }\n // Imprime o resultado da variavel $fruito\n print $fruito;\n}", "function get_times($starttime,$endtime){\r\n\t$begin = new DateTime(date(\"H:i\", strtotime($starttime)));\r\n\t$end = new DateTime(date(\"H:i\", strtotime($endtime)));\r\n\r\n$timerange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\nforeach($timerange as $time){\r\n\t$atimes[] =$time->format(\"H:i A\");\r\n}\r\n$atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\nreturn $atimes; \r\n}", "function get_times($startdate,$enddate){\r\n $begin = new DateTime(date(\"H:i\", strtotime($startdate)));\r\n $end = new DateTime(date(\"H:i\", strtotime($enddate)));\r\n\r\n $daterange = new DatePeriod($begin, new DateInterval('PT900S'), $end);\r\n\r\n foreach($daterange as $date){\r\n $atimes[] =$date->format(\"H:i A\");\r\n }\r\n $atimes[] =date(\"H:i A\", strtotime($enddate)) ;\r\n return $atimes; \r\n }", "function time_diff($start_time,$end_time) {\n\n\t//subtract our times to get the difference\n\t$calcStArray = explode(\":\",$start_time);\n\t$calcEtArray = explode(\":\",$end_time);\n\n\t$start_hour = $calcStArray[0];\n\t$start_min = $calcStArray[1];\n\n\t$end_hour = $calcEtArray[0];\n\t$end_min = $calcEtArray[1];\n\n\t//reduce our dates to timestamps. We use a random date here, since it does not matter\n\t$ts1 = mktime($start_hour,$start_min,\"0\",1,1,2000);\n\t$ts2 = mktime($end_hour,$end_min,\"0\",1,1,2000);\n\n\t//get the number of seconds\n\t$diff = $ts2 - $ts1;\n\n\t$temp = $diff/3600;\n\n\t//get the place of the decimal point\n\t$pos = strpos($temp,\".\");\n\n\t//if we have pos, there is a decimal point\n\tif ($pos) {\n\n\t\t$dur_hour = intval($temp);\n\t\t$min = substr($temp,$pos);\n\n\t\t//convert to clock nums\n\t\tif ($min==\".5\") $dur_min = \"30\";\n\t\telseif ($min==\".25\") $dur_min = \"15\";\n\t\telseif ($min==\".75\") $dur_min = \"45\";\n\n\t}\n\telse {\n\t\t$dur_hour = $temp;\n\t\t$dur_min = \"00\";\n\t}\n\n\treturn array($dur_hour,$dur_min);\n\n}", "function getHourDifference($starttime,$endtime){\n\t$start_array = split(\":\",$starttime);\n\t$end_array = split(\":\",$endtime);\n\t\n\t//Use the array elements to get the time in hours\n\t$diff = ($end_array[0] - $start_array[0]) + ($end_array[1] - $start_array[1])/60;\n\t\n\treturn $diff;\n}", "public function countSecond($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%s');\n\t}", "function timedifference_in_minutes($start_time, $end_time,$para=\"\") {\n /*$first_date = new DateTime(\"2012-11-30 \" . $start_time);\n $second_date = new DateTime(\"2012-12-21 \" . $end_time);\n $difference = $first_date->diff($second_date);\n //pr($difference);\n return $total_minutes = $difference->h * 60 + $difference->$i;*/\n $start_time = date(\"G:i\", strtotime($start_time));\n $end_time = date(\"G:i\", strtotime($end_time));\n $s_spit = explode(\":\",$start_time);\n $e_spit = explode(\":\",$end_time);\n\n $h1 = (int)($s_spit[0]);\n $m1 = (int)($s_spit[1]);\n\n $h2 = (int)($e_spit[0]);\n $m2 = (int)($e_spit[1]);\n\n //console.log($h1+' '+$m1+' '+$h2+' ' +$m2);\n $counter = 0;\n if(($h2-$h1)<0){\n for($i=$h1;$i<24;$i++) $counter++;\n for($i=1;$i<=$h2;$i++) $counter++;\n } else if(($h2-$h1)>0){\n $counter = $h2-$h1;\n } else {\n $counter = 24;\n }\n $minutes = 0;\n if(($m2-$m1)<0) {\n $minutes = 0-($m2-$m1);\n $counter--;\n } else {\n $minutes = $m2-$m1;\n }\n if ($para =='hours') {\n return ($counter . \" hrs : \" . $minutes . \" mins\");\n }\n return ($counter*60 + $minutes);\n \n}", "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\r\n // Write your code here\r\n $result = [];\r\n $count = 0;\r\n foreach ($apples as $_apple) {\r\n # code...\r\n $position = $a + $_apple;\r\n if(($position >= $s) && ($position <= $t)){\r\n $count++;\r\n }\r\n }\r\n $result[] = $count;\r\n \r\n $count = 0;\r\n foreach ($oranges as $_orange) {\r\n # code...\r\n $position = $b + $_orange;\r\n if(($position >= $s) && ($position <= $t)){\r\n $count++;\r\n }\r\n }\r\n $result[] = $count;\r\n return $result;\r\n}", "function get_apnt_times($starttime,$endtime){\r\n $vd[] = get_times($starttime, $endtime);\r\n return $flat = array_unique(call_user_func_array('array_merge', $vd));\r\n }", "public function testBookedSpacesStart()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-14 15:00:00\";\n $end = \"2017-06-17 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public function testBookedSpacesEnd()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-17 15:00:00\";\n $end = \"2017-06-20 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public function beamtime_beam_status($pvname,$begin_time,$end_time) {\n\n $leftmost = null;\n {\n $sql = \"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp IN (select MAX(timestamp) AS timestamp from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp <= {$begin_time->to64()} ) ORDER BY timestamp\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query\" );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] )\n $leftmost = array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value']));\n }\n }\n $within = array();\n {\n $result = $this->query(\"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND ( {$begin_time->to64()} < timestamp ) AND ( timestamp < {$end_time->to64()} ) ORDER BY timestamp\");\n for( $nrows = mysql_numrows( $result ), $i = 0; $i < $nrows; $i++ ) {\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n array_push(\n $within,\n array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value'])\n ));\n }\n }\n $value = is_null($leftmost) ? 0 : $leftmost['value'];\n $begin = $begin_time;\n $list = array();\n foreach( $within as $atchange ) {\n $new_value = $atchange['value'];\n if( $new_value == $value ) continue;\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $atchange['timestamp'],\n 'status' => $value ));\n $value = $new_value;\n $begin = $atchange['timestamp'];\n }\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $end_time,\n 'status' => $value ));\n return $list;\n }", "public function testFindByStartTimes()\n {\n $bookingRepo = $this->em->getRepository('GrabagameBookingBundle:Booking');\n $clubRepo = $this->em->getRepository('GrabagameBookingBundle:Club');\n $courtRepo = $this->em->getRepository('GrabagameBookingBundle:Court');\n $club = $clubRepo->find(1); \n $court = $courtRepo->find(2);\n\n $expectedBookings = array();\n $expectedBookings[] = $bookingRepo->find(1);\n $expectedBookings[] = $bookingRepo->find(2);\n\n $startTimes = array(\n new \\DateTime('2012-05-03 06:00:00'),\n new \\DateTime('2012-05-03 10:00:00'),\n new \\DateTime('2012-05-04 09:00:00'),\n );\n\n $bookings = $bookingRepo->findByStartTimes($club, $court, $startTimes);\n\n $this->assertEquals($expectedBookings, $bookings);\n\n $expectedBookings = array();\n $startTimes = array(\n new \\DateTime('2012-05-01 06:00:00'),\n new \\DateTime('2012-05-08 10:00:00'),\n new \\DateTime('2012-05-09 09:00:00'),\n );\n\n $bookings = $bookingRepo->findByStartTimes($club, $court, $startTimes);\n\n $this->assertEquals($expectedBookings, $bookings);\n }", "public function get_half_hour_time_range( $start_time='8:00', $end_time='18:00' ) {\n list( $sh,$sm ) = explode( ':', $start_time );\n list( $eh,$em ) = explode( ':', $end_time );\n $timeRangeArray = array();\n //return ;\n while((int)$sh.$sm < (int)$eh.$em) {\n if($sm == \"00\") {\n $sm = \"30\";\n } else {\n $sm = \"00\";\n $sh = (int)($sh+1);\n }\n $fullTime = date(\"h:ia\",mktime((int)$sh,(int)$sm,0));\n array_push($timeRangeArray,$fullTime);\n if($sh < 10) {\n $sh = \"0\"+$sh;\n }\n }\n return $timeRangeArray;\n }", "public function __construct(&$events, $rangeLowerBound, $rangeUpperBound, $workdayLowerBound = 0, $workdayUpperBound = 24, $length, $topSlots = 5){\n\n\t\tif($workdayLowerBound > $workdayUpperBound || $workdayUpperBound > 1440)\n\t\t\tdie(\"ERROR: Invalid workday interval.\");\n\t\t\n\t\telse{\n\t\t\t$this->workdayLowerBound = $workdayLowerBound;\n\t\t\t$this->workdayUpperBound = $workdayUpperBound;\n\t\t\t$this->rangeLowerBound = $rangeLowerBound;\n\t\t\t$this->rangeUpperBound = $rangeUpperBound;\n\t\t\t$this->topSlots = $topSlots;\n\n\t\t\t$this->root = new IntervalObject(0, 1E9, 'ROOT');\n\t\t\t\n\t\t\tself::$length = $length;\n\n //echo json_encode($rangeLowerBound);\n\n // $workdayLowerBound += $rangeLowerBound;\n // $workdayUpperBound += $rangeLowerBound;\n\n\n foreach($events as $email => $intervals) {\n for($j = 0; $j < count($events[$email]); $j++) {\n $events[$email][$j]['startTime'] += $rangeLowerBound;\n $events[$email][$j]['endTime'] += $rangeLowerBound;\n }\n }\n\n\t\t\tforeach($events as $email => $intervals) {\n $a = new ArrayIterator($intervals);\n\t\t\t\tforeach($a as $interval){\n\n // echo json_encode(\"BEFORE -> \").json_encode($interval).\"\\n\";\n\n if( ($interval['startTime'] % 1440) > $workdayUpperBound){\n $interval['startTime'] = 1440*(floor($interval['startTime']/1440)+1) + $workdayLowerBound;\n }\n else if( ($interval['startTime'] % 1440) < $workdayLowerBound ){\n $interval['startTime'] = 1440*floor($interval['startTime']/1440) + $workdayLowerBound;\n }\n\n //if( ($interval['endTime'] % 1440) < $workdayLowerBound){\n // $interval['endTime'] = 1440*(floor($interval['startTime']/1440)-1) + $workdayLowerBound;\n //}\n //else\n if( ($interval['endTime'] % 1440) > $workdayUpperBound ){\n $interval['endTime'] = 1440*floor($interval['endTime']/1440) + $workdayUpperBound;\n }\n\n //echo json_encode(\"AFTER -> \").json_encode($interval).\"\\n\";\n\n\t\t\t\t\tif( $interval['endTime'] - $interval['startTime'] < $length) {\n // echo json_encode(\"INVALID RANGE => \").json_encode($interval).\"\\n\";\n continue;\n }\n\n\t\t\t\t\t// instead of more than a day apart, divide by 1440 and see if the day matches\n\t\t\t\t\tif(floor($interval['startTime']/1440) < floor($interval['endTime']/1440)){\n //$c = 0;\n\t\t\t\t\t\tdo {\n // var_dump($interval);\n $tempEnd = 1440*floor($interval['startTime']/1440) + $workdayUpperBound;\n\n if($tempEnd > $interval['endTime'])\n $tempEnd = $interval['endTime'];\n\n $a->append(array('startTime' => $interval['startTime'],\n 'endTime' => $tempEnd));\n\n $interval['startTime'] = 1440*(floor($interval['startTime']/1440)+1) + $workdayLowerBound;\n\n //if($c >= 5)\n // break;\n //$c++;\n }\n\t\t\t\t\t\twhile ($interval['startTime'] / 1440 < $interval['endTime'] / 1440);\n\n //die();\n\n\t\t\t\t\t\t// insert the final range\n\t\t\t\t\t\t$a->append(array('startTime' => $interval['startTime'], 'endTime' => $interval['endTime']));\n\t\t\t\t\t}\n else{\n // echo json_encode(\"Inserting: $email -> \").\"\\n\";\n // echo json_encode($interval).\"\\n\";\n $this->root->insertInterval($email, $interval['startTime'], $interval['endTime']);\n }\n\n\n /*\n if( $interval['endTime'] - $interval['startTime'] < 1440 ) {\n echo json_encode(\"Inserting: $email -> \").\"\\n\";\n echo json_encode($interval).\"\\n\";\n $this->root->insertInterval($email, $interval['startTime'], $interval['endTime']);\n }\n else{\n echo json_encode(\"TOO LARGE RANGE => \").json_encode($interval).\"\\n\";\n\n \n }*/\n\n\t\t\t\t}\n\n\t\t\t}\n\n // echo json_encode($events);\n\t\t}\n\n\t}", "public function getFilterTimeCount() {\n \n $columns = array();\n $params = array();\n\n // TODAY\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :todayStart AND n.start_date <= :todayEnd \n OR\n n.end_date >= :todayStart AND n.end_date <= :todayEnd \n OR\n n.start_date < :todayStart AND n.end_date > :todayEnd \n THEN 1 \n ELSE 0 \n END\n ) as today\";\n $params['todayStart'] = $dateStart;\n $params['todayEnd'] = $dateEnd;\n\n // YESTERDAY\n $dateStart = new \\DateTime('yesterday');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime('yesterday');\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :yesterdayStart AND n.start_date <= :yesterdayEnd \n OR\n n.end_date >= :yesterdayStart AND n.end_date <= :yesterdayEnd \n OR\n n.start_date < :yesterdayStart AND n.end_date > :yesterdayEnd \n THEN 1 \n ELSE 0 \n END\n ) as yesterday\";\n $params['yesterdayStart'] = $dateStart;\n $params['yesterdayEnd'] = $dateEnd;\n\n // THIS WEEK\n $today = new \\DateTime();\n if('Sunday' == $today->format('l')) {\n $dateStart = clone $today;\n $dateStart->modify('Monday last week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = $today;\n $dateEnd->setTime(23, 59, 59);\n } else {\n $dateStart = clone $today;\n $dateStart->modify('Monday this week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = clone $today;\n $dateEnd->modify('Sunday this week');\n $dateEnd->setTime(23, 59, 59);\n }\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :thisWeekStart AND n.start_date <= :thisWeekEnd \n OR\n n.end_date >= :thisWeekStart AND n.end_date <= :thisWeekEnd \n OR\n n.start_date < :thisWeekStart AND n.end_date > :thisWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as thisWeek\";\n $params['thisWeekStart'] = $dateStart;\n $params['thisWeekEnd'] = $dateEnd;\n\n // LAST WEEK\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P7D'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :lastWeekStart AND n.start_date <= :lastWeekEnd \n OR\n n.end_date >= :lastWeekStart AND n.end_date <= :lastWeekEnd \n OR\n n.start_date < :lastWeekStart AND n.end_date > :lastWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as lastWeek\";\n $params['lastWeekStart'] = $dateStart;\n $params['lastWeekEnd'] = $dateEnd;\n \n // PAST MONTH\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P1M'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :pastMonthStart AND n.start_date <= :pastMonthEnd \n OR\n n.end_date >= :pastMonthStart AND n.end_date <= :pastMonthEnd \n OR\n n.start_date < :pastMonthStart AND n.end_date > :pastMonthEnd \n THEN 1 \n ELSE 0 \n END\n ) as pastMonth\";\n $params['pastMonthStart'] = $dateStart;\n $params['pastMonthEnd'] = $dateEnd;\n\n return $this->createQueryBuilder('n')\n ->select(implode(', ', $columns))\n ->where('n.draft = false')\n ->setParameters($params)\n ->getQuery()\n ->getOneOrNullResult();\n }", "function get_time_difference( $time1, $time2 ) {\n\t$time1 = (int)$time1;\n\t$time2 = (int)$time2;\n\t$result = array(\n\t\t'days' => 0,\n\t\t'hours' => 0,\n\t\t'minutes' => 0,\n\t\t'seconds' => 0\n\t);\n\tif( $time1 == 0 || $time2 == 0) return $result;\n\t\n\tif($time2 > $time1) {\n\t\t$start = date(\"H:i\",$time1);\n\t\t$end = date(\"H:i\",$time2);\n\t} else {\n\t\t$start = date(\"H:i\",$time2);\n\t\t$end = date(\"H:i\",$time1);\t\n\t}\t\n\t\n\t$uts['start'] = $time2;\n\t$uts['end'] = $time1;\n\tif( $uts['start']!==-1 && $uts['end']!==-1 ) {\n\t\tif( $uts['end'] >= $uts['start'] ) {\n\t\t\n\t\t\t$diff = $uts['end'] - $uts['start'];\n\t\t\tif( $days=intval((floor($diff/86400))) ) $diff = $diff % 86400;\n\t\t\tif( $hours=intval((floor($diff/3600))) ) $diff = $diff % 3600;\n\t\t\tif( $minutes=intval((floor($diff/60))) ) $diff = $diff % 60;\n\t\t\t$diff = intval( $diff ); \n\t\t\tif($days > 0) $hours += $days*24;\n\t\t\treturn( array('days'=>str_pad($days,2,0, STR_PAD_LEFT), 'hours'=>str_pad($hours,2,0, STR_PAD_LEFT), 'minutes'=>str_pad($minutes,2,0, STR_PAD_LEFT), 'seconds'=>str_pad($diff,2,0, STR_PAD_LEFT)) );\n\t\t}\t\n\t}\t\n\treturn $result;\n}", "public function countMinute($beginDate,$endDate){\n\t\t$beginDate = new DateTime('2010-01-01 10:12:55');\n\t\t$endDate = new DateTime('2010-01-01 10:17:55');\n\t\t$interval = $endDate->diff($beginDate);\n\n\t\treturn $interval->format('%i');\n\t}", "function test12($user, $timespan) {\n\n}", "function _get_booking_duration($initial_hour, $final_hour) {\n\t\t$initial_timestamp = $this->_get_timestamp($initial_hour);\n\t\t$final_timestamp = $this->_get_timestamp($final_hour);\n\t\treturn ($final_timestamp - $initial_timestamp) / 3600.0;\n\t}", "private function computeOpenSchedules($list) {\n\n // print_array($list, 'input');\n // echo '<br>';\n\n $st = array();\n $et = array();\n $final = array();\n $start = 7;\n $end = 21;\n $temp = $start;\n\n while($temp < $end) {\n array_push( $st, number_format((float)$temp, 2, ':', '') );\n $temp++;\n }\n\n $temp = $start++;\n while( $start <= $end ) {\n array_push( $et, number_format((float)$start, 2, ':', '') );\n $start++;\n }\n\n // print_array($st, 'start_time');\n // print_array($et, 'end_time');\n // echo '<br>';\n\n foreach( $list as $val ) {\n $times = explode(\"-\", $val);\n $start_time = trim($times[0]);\n $end_time = trim($times[1]);\n\n $range = $this->find_range($start_time, $end_time);\n \n if (($key = array_search($start_time, $st)) !== false) {\n unset($st[$key]);\n }\n\n if (($key = array_search($end_time, $et)) !== false) {\n unset($et[$key]);\n }\n\n foreach($range as $time) {\n if (($key = array_search($time, $st)) !== false) {\n unset($st[$key]);\n }\n\n if (($key = array_search($time, $et)) !== false) {\n unset($et[$key]);\n }\n }\n }\n\n $st = array_values($st);\n $et = array_values($et);\n\n $this->print_array($st, 'start_time');\n $this->print_array($et, 'end_time');\n echo '<br>';\n\n if(count($st) >= count($et)) {\n for($idx = 0; $idx < count($st); $idx++){\n array_push($final, new Time($st[$idx], $et[$idx]));\n }\n } \n return $final;\n }", "abstract protected function get_data($start_time, $end_time);", "public static function getTimeLoadPage($startTime, $endTime) {\n\t\t$ip_allow = json_decode(file_get_contents(BASE_PATH . '/ip_allow.json'), true);\n\t\tif(in_array($_SERVER['REMOTE_ADDR'], $ip_allow )) {\n\t\t\treturn '<div class=\"text-center\"> Time: ' . number_format($endTime - $startTime, 4, '.', '.') . 's - Memory usage: '. number_format(memory_get_usage() / 1024) .'KB</div>';\n\t\t}\n\n\t\treturn ;\n\t}", "public function beamtime_beam_status($pvname,$begin_time,$end_time) {\n\n $maxtimestamp = null;\n {\n $sql = \"select MAX(timestamp) AS timestamp from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp <= {$begin_time->to64()}\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query: \".$sql );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] ) $maxtimestamp = $attr['timestamp'];\n }\n }\n $leftmost = null;\n if( !is_null($maxtimestamp)) {\n $sql = \"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND timestamp={$maxtimestamp} ORDER BY timestamp\";\n $result = $this->query($sql);\n $nrows = mysql_numrows( $result );\n if( $nrows ) {\n if( $nrows != 1 )\n throw new DataPortalException (\n __METHOD__,\n \"unexpected result set returned by the query\" );\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n if( $attr['timestamp'] )\n $leftmost = array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value']));\n }\n }\n $within = array();\n {\n $result = $this->query(\"select timestamp,value from pv,pv_val WHERE pv.id=pv_val.pv_id AND name='{$pvname}' AND ( {$begin_time->to64()} < timestamp ) AND ( timestamp < {$end_time->to64()} ) ORDER BY timestamp\");\n for( $nrows = mysql_numrows( $result ), $i = 0; $i < $nrows; $i++ ) {\n $attr = mysql_fetch_array( $result, MYSQL_ASSOC );\n array_push(\n $within,\n array(\n 'timestamp' => LusiTime::from64($attr['timestamp']),\n 'value' => floor( $attr['value'])\n ));\n }\n }\n $value = is_null($leftmost) ? 0 : $leftmost['value'];\n $begin = $begin_time;\n $list = array();\n foreach( $within as $atchange ) {\n $new_value = $atchange['value'];\n if( $new_value == $value ) continue;\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $atchange['timestamp'],\n 'status' => $value ));\n $value = $new_value;\n $begin = $atchange['timestamp'];\n }\n array_push(\n $list,\n array(\n 'begin_time' => $begin,\n 'end_time' => $end_time,\n 'status' => $value ));\n return $list;\n }", "public function getTimeTaken(){\r\n return round($this->getEndTime() - $this->getStartTime(), 6);\r\n }", "function printtimediff($start, $end = null) {\n\n\tif( ! $end )\t$end = time();\n\t$ret = '';\n\t$diff = $end - $start;\n\n\t$h = floor($diff/3600);\n\t$diff %= 3600;\n\tif($h > 0) {\n\t\t$ret .= $h.' h ';\n\t}\n\n\t$m = floor($diff/60);\n\t$diff %= 60;\n\tif ( $m > 0 ) {\n\t\t$ret .= $m.' m ';\n\t}\n\n\treturn $ret . $diff .' s';\n}", "function countTime($connection, $sql_tiempo){\n $sql = mysqli_query($connection, $sql_tiempo);\n $horas = 0;\n $minutos = 0;\n while($row = mysqli_fetch_row($sql)){\n \n $timeTo = explode(':', $row[0]);\n \n $horas += intval($timeTo[0]);\n $minutos += intval($timeTo[1]);\n \n }\n $final_time = intval((($horas*60) + $minutos)/60).\":\".(($horas*60) + $minutos)%60;\n return $final_time;\n}", "function elapsed_time($start_time, $finish_time){\n\treturn sc_strtotime($finish_time) - sc_strtotime($start_time);\n}", "public function findShiftsByRange($startTime, $endTime)\r\n {\r\n return array();\r\n }", "public function computeTime($start,$end,$format){\n\t\t$startTime = new DateTime($start);\n\t\t$endTime = new DateTime($end);\n\n\t\t$diff = $startTime->diff($endTime);\n\t\tswitch($format){\n\t\t\tcase 'months':\n\t\t\t\t$year = $diff->format( '%y' );// -> YEAR\n\t\t\t\t$month = $diff->format( '%m' );// -> MONTH\n\t\t\t\tif($year > 0){ // EXCEEDS A YEAR\n\t\t\t\t\t$yearMonth = $year * 12;\n\t\t\t\t\t$output = $yearMonth + $month;\n\t\t\t\t}else{\n\t\t\t\t\t$output = $month;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'month':\n\t\t\t\t$output = $diff->format( '%m' );// -> MONTH\n\t\t\tbreak;\n\t\t\tcase 'days2': // NEGATIVE IF LAPSE\n\t\t\t\t$output = $diff->format( '%R%a' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'days':\n\t\t\t\t$output = $diff->format( '%a' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'hrsMins':\n\t\t\t\t$output = $diff->format( '%H:%I' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'mins':\n\t\t\t\t$output = $diff->format( '%I' );// -> 00:25:25\n\t\t\tbreak;\n\t\t\tcase 'digits':\n\t\t\t\t$output = $diff->format( '%H.%I:%S' );// -> 00:25:25\n\t\t\t\t$output = round(date('H.i', strtotime($output)),2);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$output = $diff->format( '%H:%I:%S' );// -> 00:25:25\n\t\t\tbreak;\n\t\t}\n\t\treturn $output;\n\t}", "function count_time_until_end($end_date)\n{\n $now = new DateTime(\"now\");\n $then = new DateTime(date(\"Y-m-d\", strtotime($end_date)));\n\n return $now < $then ? $then->diff($now)->format(\"%a д. %H:%I:%S\") : \"0 д. 00:00:00\";\n}", "function check_book_available($hour, $begin, $end, $check){\n if($check == \"begin_check\"){\n if( $hour < $begin || $hour >= $end ){\n return true;\n }\n else{\n return false;\n }\n }\n /* CHECK END SELECTION */\n else if($check == \"end_check\"){\n if( $hour <= $begin || $hour > $end ){\n return true;\n }\n else{\n return false;\n }\n }\n}", "function onlyEndInput($beginTime, $endTime){\n if($beginTime == null && $endTime != null) {\n return true;\n }\n else {\n return false;\n }\n}", "function getEndMicrotime();", "public function checkLeaveApplyTimeArea($emp_seq_no,$company_id,$begin_time,$end_time)\n {\n if(empty($begin_time) || empty($end_time)) return 'no parameter';\n //$this->DBConn->debug = 1;\n $sql= <<<eof\n select count(*) cnt\n from hr_carding\n where psn_id = :emp_seqno\n and psn_seg_segment_no = :company_id\n and ((breakbegin is null and\n to_date(:begin_time, 'yyyy-mm-dd hh24:mi') between intime and outtime) or\n (breakbegin is not null and\n (to_date(:begin_time1, 'yyyy-mm-dd hh24:mi') between intime and\n breakbegin or to_date(:begin_time2, 'yyyy-mm-dd hh24:mi') between\n breakend and outtime)))\neof;\n $rs = $this->DBConn->GetOne($sql,array('emp_seqno'=>$emp_seq_no,\n 'company_id'=>$company_id,\n 'begin_time'=>$begin_time,\n 'begin_time1'=>$begin_time,\n 'begin_time2'=>$begin_time));\n if($rs==0) return '1';\n $sql = <<<eof\n select count(*) cnt\n from hr_carding\n where psn_id = :emp_seqno\n and psn_seg_segment_no = :company_id\n and ((breakbegin is null and\n to_date(:end_time, 'yyyy-mm-dd hh24:mi') between intime and\n outtime) or\n (breakbegin is not null and\n (to_date(:end_time1, 'yyyy-mm-dd hh24:mi') between intime and\n breakbegin or to_date(:end_time2, 'yyyy-mm-dd hh24:mi') between\n breakend and outtime)))\neof;\n $rs = $this->DBConn->GetOne($sql,array('emp_seqno'=>$emp_seq_no,\n 'company_id'=>$company_id,\n 'end_time'=>$end_time,\n 'end_time2'=>$end_time,\n 'end_time1'=>$end_time));\n if($rs==0) return '2';\n return 'ok';\n }", "function total_intervals($unit, DeteInterval ...$intervals) {\n $time = 0;\n foreach ($intervals as $interval) {\n $time += $interval->$unit;\n }\n return $time;\n}", "public function test_it_gets_timeslot_id_for_day_and_time()\n {\n $manager = new TimeslotManager;\n\n // right on the :00\n $id = $manager->timeslotForDayAndTime('Monday', '11:00');\n $this->assertEquals($id, 71);\n\n // at the :15\n $id = $manager->timeslotForDayAndTime('Monday', '11:15');\n $this->assertEquals($id, 71);\n\n // right on the :00\n $id = $manager->timeslotForDayAndTime('Saturday', '11:00');\n $this->assertEquals($id, 311);\n\n // at the :15\n $id = $manager->timeslotForDayAndTime('Saturday', '11:15');\n $this->assertEquals($id, 311);\n }", "public function calculateRangeKwhCosts($beginDate, $endDate){\n \t \n\t\treturn $this->calculateTimeRangeKwhCosts(date (\"Y-m-d 00:00:00\", strtotime($beginDate)),date (\"Y-m-d 00:00:00\", strtotime (\"+1 day\", strtotime($endDate))) );\n\n }", "function simpleDiff($start, $end = 'NOW') { \n $start_time = strtotime($start);\n $stop_time = strtotime($end);\n\n $diff_time = $start_time - $stop_time;\n\n if (abs($diff_time) < 3600) {\n return ceil($diff_time / 60) . 'm';\n }\n\n return ceil($diff_time / 3600) . 'h';\n }", "function get_time_difference($start, $end) {\r\n\t\r\n $uts['start'] = strtotime($start);\r\n $uts['end'] = strtotime($end);\r\n if ($uts['start']!=false && $uts['end']!=false) {\r\n if ($uts['end'] >= $uts['start']) {\r\n $diff = $uts['end'] - $uts['start'];\r\n\t\t\t$days = intval((floor($diff/60/60/24)));\r\n\t\t\t$hours = intval((floor($diff/60/60)));\r\n\t\t\t$minutes = intval((floor($diff/60)));\r\n $seconds = intval($diff); \r\n return(array('days'=>$days, 'hours'=>$hours, 'minutes'=>$minutes, 'seconds'=>$seconds));\r\n } else {\r\n return(false);\r\n }\r\n } else {\r\n return(false);\r\n }\r\n return(false);\r\n}", "function get_break_time($br_plan){\r\n foreach ($br_plan as $key => $value) {\r\n if($key==='start' || $key==='ends'){\r\n $br[] = get_times($br_plan['start'],$br_plan['ends']);\r\n }else{\r\n $br[] = get_times($br_plan[$key]['start'],$br_plan[$key]['ends']); \r\n }\r\n \r\n }\r\n return $flat = call_user_func_array('array_merge', $br);\r\n }", "public function testWaitTime(){\n $application = new Application;\n\n $testDate1 = array('2012-01-01','2012-01-02','2012-01-03','2012-01-04','2012-01-05','2012-01-06', '2012-01-07');\n $resultDate1 = array(1 => 1, 2 => 1, 3 => 1, 4=> 1, 5=> 1, 6 => 1);\n\n $testDate2 = array('2012-01-01', '0000-00-00', '2012-01-03', '2012-01-04', '2012-01-05', '2012-01-06', '2012-01-07');\n $resultDate2 = array(1 => 0, 2=> 2, 3 => 1, 4 => 1, 5=> 1, 6 => 1);\n\n $testDate3 = array('2012-01-01', '0000-00-00', '0000-00-00', '2012-01-03', '2012-01-04', '2012-01-05', '2012-01-06');\n\t $resultDate3 = array(1 => 0, 2 => 0, 3 => 2, 4=> 1, 5 => 1, 6 => 1);\n\n $testDate4 = array('2012-01-01', '0000-00-00', '0000-00-00', '0000-00-00', '2012-01-03', '2012-01-05', '2012-01-08');\n\t $resultDate4 = array(1 => 0, 2 => 0, 3 => 0, 4 => 2, 5 => 2, 6 => 3);\n \n $calculatedArray = $application->waitTime($testDate1);\n\n\t $this->assertEquals($resultDate1,$calculatedArray);\n\t $this->assertEquals($resultDate2, $application->waitTime($testDate2));\n\t $this->assertEquals($resultDate3, $application->waitTime($testDate3));\n\t $this->assertEquals($resultDate4, $application->waitTime($testDate4));\n\n\t}", "public function timing_interval ($name = 'default') {\n $found = 0;\n //$key = NULL;\n\n foreach($this->timings as $skey => $timer ) {\n if(strcmp($timer['name'], $name) == 0 ) {\n //$key = $skey;\n if (!empty($timer['start'])) {\n $found = 1;\n }\n \n if (empty($timer['stop'])) {\n $stop_time = explode(' ', microtime());\n } else {\n $stop_time = $timer['stop'];\n }\n\n // do the big numbers first so the small ones aren't lost\n $interval = $stop_time[1] - $timer['start'][1];\n $interval += $stop_time[0] - $timer['start'][0];\n }\n }\n\n if ($found == 0 ) {\n return 0;\n }\n\n return $interval;\n }", "public function testStart() {\n $timer = new timer( false );\n\n // It should return a starting number\n $this->assertGreaterThan( 0, $timer->start() );\n\t}", "function get_booking_count1($date='',$pm_id = 0,$propertyroomid=0){\r\n\tglobal $db;\r\n\t$count =0;\r\n\tglobal $tblprefix;\r\n\t$new_date = date(\"m/d/Y\",strtotime($date));\r\n\t$qry_booking = \"SELECT id,room_id,check_indate,check_outdate FROM \".$tblprefix.\"property_booking WHERE pm_id=\".$pm_id.\" AND (check_indate='\".$new_date.\"' OR check_outdate='\".$new_date.\"') AND room_id=\".$propertyroomid.\"\";\r\n \r\n $rs_booking = $db->Execute($qry_booking);\r\n\t$rs_booking->MoveFirst();\r\n\twhile (!$rs_booking->EOF){\r\n\t\t$explode_values = explode(',',$rs_booking->fields['room_id']);\r\n\r\n\t\tif(in_array($propertyroomid,$explode_values)){\r\n\t\t\t$count++;\r\n\t\t}\r\n\t\t$rs_booking->MoveNext();\r\n\t}\r\n\treturn $count;\r\n\r\n\r\n}", "public function callTime($timestamp) {\n\t\t\n\t\t\t$_date['h'] = (int)date(\"G\",$timestamp);\n\t\t\t$_date['m'] = (int)date(\"i\",$timestamp);\n\t\t\t\n\t\t\t$_dayStart = 6;\t\t\t\t\t// Start the day at 6am\n\t\t\t$_morningEnd = 13;\t\t\t\t// Morning ends at 13:00\n\t\t\t$_afternoonEnd = 17;\t\t\t// Afternoon ends at 17:00\n\t\t\t\n\t\t\tif ($_date['h'] < $_morningEnd AND $_date['h'] >= $_dayStart) {\n\t\t\t\t// Time is morning\n\t\t\t\t$_returnTime = 1;\n\t\t\t} else if ($_date['h'] >= $_morningEnd AND $_date['h'] < $_afternoonEnd) {\n\t\t\t\t// Time is Afternoon\n\t\t\t\t$_returnTime = 2;\n\t\t\t} else {\n\t\t\t\t// Time should be evening cos we don't work before 6am\n\t\t\t\t$_returnTime = 3;\n\t\t\t}\n\n\t\t\treturn $_returnTime;\n\t\t}", "public function testBookedSpacesAfter()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-18 15:00:00\";\n $end = \"2017-06-25 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(0, $total_places);\n }", "public static function check2Time($startTime = '', $endTime = 0)\n {\n if( $startTime === 'now' ) $startTime = time();\n\n if( is_string($startTime) ) $startTime = strtotime($startTime);\n\n if( is_string($endTime) ) $endTime = strtotime($endTime);\n\n if( $startTime <= $endTime ) return true; else return false;\n }", "function timecheck ($time) {\n $min = 0;\n if($time->h >= 1) {\n $min += 60*$time->h;\n }\n $min += $time->i;\n if($min == 0) {\n return \"Passage en cours...\";\n } else {\n return $min.\" min\";\n }\n \n\n}", "function bothTimesEmpty($beginTime, $endTime){\n if($beginTime == null && $endTime == null) {\n return true;\n }\n else {\n return false;\n }\n}", "public function getBonuses($dateStart, $dateEnd);", "public function sumOverAllScoreOfReport($dateStart, $dateEnd);", "public function get_time($i){\n\t\t$tabledata = array('start_time'=> '00:00:00','end_time' =>'00:15:00');\n\t\tswitch($i){\n\t\t\tcase 1:$tabledata = array('start_time'=> '00:00:00','end_time' =>'00:15:00');break;\n\t\t\tcase 2:$tabledata = array('start_time'=> '00:15:01','end_time' =>'00:30:00');break;\n\t\t\tcase 3:$tabledata = array('start_time'=> '00:30:01','end_time' =>'00:45:00');break;\n\t\t\tcase 4:$tabledata = array('start_time'=> '00:45:01','end_time' =>'01:00:00');break;\n\t\t\t\n\t\t\tcase 5:$tabledata = array('start_time'=> '01:00:00','end_time' =>'01:15:00');break;\n\t\t\tcase 6:$tabledata = array('start_time'=> '01:15:01','end_time' =>'01:30:00');break;\n\t\t\tcase 7:$tabledata = array('start_time'=> '01:30:01','end_time' =>'01:45:00');break;\n\t\t\tcase 8:$tabledata = array('start_time'=> '01:45:01','end_time' =>'02:00:00');break;\n\t\t\t\n\t\t\tcase 9:$tabledata = array('start_time'=> '02:00:00','end_time' =>'02:15:00');break;\n\t\t\tcase 10:$tabledata = array('start_time'=> '02:15:01','end_time' =>'02:30:00');break;\n\t\t\tcase 11:$tabledata = array('start_time'=> '02:30:01','end_time' =>'02:45:00');break;\n\t\t\tcase 12:$tabledata = array('start_time'=> '02:45:01','end_time' =>'03:00:00');break;\n\t\t\t\n\t\t\tcase 13:$tabledata = array('start_time'=> '03:00:00','end_time' =>'03:15:00');break;\n\t\t\tcase 14:$tabledata = array('start_time'=> '03:15:01','end_time' =>'03:30:00');break;\n\t\t\tcase 15:$tabledata = array('start_time'=> '03:30:01','end_time' =>'03:45:00');break;\n\t\t\tcase 16:$tabledata = array('start_time'=> '03:45:01','end_time' =>'04:00:00');break;\n\t\t\t\n\t\t\tcase 17:$tabledata = array('start_time'=> '04:00:00','end_time' =>'04:15:00');break;\n\t\t\tcase 18:$tabledata = array('start_time'=> '04:15:01','end_time' =>'04:30:00');break;\n\t\t\tcase 19:$tabledata = array('start_time'=> '04:30:01','end_time' =>'04:45:00');break;\n\t\t\tcase 20:$tabledata = array('start_time'=> '04:45:01','end_time' =>'05:00:00');break;\n\t\t\t\n\t\t\tcase 21:$tabledata = array('start_time'=> '05:00:00','end_time' =>'05:15:00');break;\n\t\t\tcase 22:$tabledata = array('start_time'=> '05:15:01','end_time' =>'05:30:00');break;\n\t\t\tcase 23:$tabledata = array('start_time'=> '05:30:01','end_time' =>'05:45:00');break;\n\t\t\tcase 24:$tabledata = array('start_time'=> '05:45:01','end_time' =>'06:00:00');break;\n\t\t\t\n\t\t\tcase 25:$tabledata = array('start_time'=> '06:00:00','end_time' =>'06:15:00');break;\n\t\t\tcase 26:$tabledata = array('start_time'=> '06:15:01','end_time' =>'06:30:00');break;\n\t\t\tcase 27:$tabledata = array('start_time'=> '06:30:01','end_time' =>'06:45:00');break;\n\t\t\tcase 28:$tabledata = array('start_time'=> '06:45:01','end_time' =>'07:00:00');break;\n\t\t\t\n\t\t\tcase 29:$tabledata = array('start_time'=> '07:00:00','end_time' =>'07:15:00');break;\n\t\t\tcase 30:$tabledata = array('start_time'=> '07:15:01','end_time' =>'07:30:00');break;\n\t\t\tcase 31:$tabledata = array('start_time'=> '07:30:01','end_time' =>'07:45:00');break;\n\t\t\tcase 32:$tabledata = array('start_time'=> '07:45:01','end_time' =>'08:00:00');break;\n\t\t\t\n\t\t\tcase 33:$tabledata = array('start_time'=> '08:00:00','end_time' =>'08:15:00');break;\n\t\t\tcase 34:$tabledata = array('start_time'=> '08:15:01','end_time' =>'08:30:00');break;\n\t\t\tcase 35:$tabledata = array('start_time'=> '08:30:01','end_time' =>'08:45:00');break;\n\t\t\tcase 36:$tabledata = array('start_time'=> '08:45:01','end_time' =>'09:00:00');break;\n\t\t\t\n\t\t\tcase 37:$tabledata = array('start_time'=> '09:00:00','end_time' =>'09:15:00');break;\n\t\t\tcase 38:$tabledata = array('start_time'=> '09:15:01','end_time' =>'09:30:00');break;\n\t\t\tcase 39:$tabledata = array('start_time'=> '09:30:01','end_time' =>'09:45:00');break;\n\t\t\tcase 40:$tabledata = array('start_time'=> '09:45:01','end_time' =>'10:00:00');break;\n\t\t\t\n\t\t\tcase 41:$tabledata = array('start_time'=> '10:00:00','end_time' =>'10:15:00');break;\n\t\t\tcase 42:$tabledata = array('start_time'=> '10:15:01','end_time' =>'10:30:00');break;\n\t\t\tcase 43:$tabledata = array('start_time'=> '10:30:01','end_time' =>'10:45:00');break;\n\t\t\tcase 44:$tabledata = array('start_time'=> '10:45:01','end_time' =>'11:00:00');break;\n\t\t\t\n\t\t\tcase 45:$tabledata = array('start_time'=> '11:00:00','end_time' =>'11:15:00');break;\n\t\t\tcase 46:$tabledata = array('start_time'=> '11:15:01','end_time' =>'11:30:00');break;\n\t\t\tcase 47:$tabledata = array('start_time'=> '11:30:01','end_time' =>'11:45:00');break;\n\t\t\tcase 48:$tabledata = array('start_time'=> '11:45:01','end_time' =>'12:00:00');break;\n\t\t\t\n\t\t\tcase 49:$tabledata = array('start_time'=> '12:00:00','end_time' =>'12:15:00');break;\n\t\t\tcase 50:$tabledata = array('start_time'=> '12:15:01','end_time' =>'12:30:00');break;\n\t\t\tcase 51:$tabledata = array('start_time'=> '12:30:01','end_time' =>'12:45:00');break;\n\t\t\tcase 52:$tabledata = array('start_time'=> '12:45:01','end_time' =>'13:00:00');break;\n\t\t\t\n\t\t\tcase 53:$tabledata = array('start_time'=> '13:00:00','end_time' =>'13:15:00');break;\n\t\t\tcase 54:$tabledata = array('start_time'=> '13:15:01','end_time' =>'13:30:00');break;\n\t\t\tcase 55:$tabledata = array('start_time'=> '13:30:01','end_time' =>'13:45:00');break;\n\t\t\tcase 56:$tabledata = array('start_time'=> '13:45:01','end_time' =>'14:00:00');break;\n\t\t\t\n\t\t\tcase 57:$tabledata = array('start_time'=> '14:00:00','end_time' =>'14:15:00');break;\n\t\t\tcase 58:$tabledata = array('start_time'=> '14:15:01','end_time' =>'14:30:00');break;\n\t\t\tcase 59:$tabledata = array('start_time'=> '14:30:01','end_time' =>'14:45:00');break;\n\t\t\tcase 60:$tabledata = array('start_time'=> '14:45:01','end_time' =>'15:00:00');break;\n\t\t\t\n\t\t\tcase 61:$tabledata = array('start_time'=> '15:00:00','end_time' =>'15:15:00');break;\n\t\t\tcase 62:$tabledata = array('start_time'=> '15:15:01','end_time' =>'15:30:00');break;\n\t\t\tcase 63:$tabledata = array('start_time'=> '15:30:01','end_time' =>'15:45:00');break;\n\t\t\tcase 64:$tabledata = array('start_time'=> '15:45:01','end_time' =>'16:00:00');break;\n\t\t\t\n\t\t\tcase 65:$tabledata = array('start_time'=> '16:00:00','end_time' =>'16:15:00');break;\n\t\t\tcase 66:$tabledata = array('start_time'=> '16:15:01','end_time' =>'16:30:00');break;\n\t\t\tcase 67:$tabledata = array('start_time'=> '16:30:01','end_time' =>'16:45:00');break;\n\t\t\tcase 68:$tabledata = array('start_time'=> '16:45:01','end_time' =>'17:00:00');break;\n\t\t\t\n\t\t\tcase 69:$tabledata = array('start_time'=> '17:00:00','end_time' =>'17:15:00');break;\n\t\t\tcase 70:$tabledata = array('start_time'=> '17:15:01','end_time' =>'17:30:00');break;\n\t\t\tcase 71:$tabledata = array('start_time'=> '17:30:01','end_time' =>'17:45:00');break;\n\t\t\tcase 72:$tabledata = array('start_time'=> '17:45:01','end_time' =>'18:00:00');break;\n\t\t\t\n\t\t\tcase 73:$tabledata = array('start_time'=> '18:00:00','end_time' =>'18:15:00');break;\n\t\t\tcase 74:$tabledata = array('start_time'=> '18:15:01','end_time' =>'18:30:00');break;\n\t\t\tcase 75:$tabledata = array('start_time'=> '18:30:01','end_time' =>'18:45:00');break;\n\t\t\tcase 76:$tabledata = array('start_time'=> '18:45:01','end_time' =>'19:00:00');break;\n\t\t\t\n\t\t\tcase 77:$tabledata = array('start_time'=> '19:00:00','end_time' =>'19:15:00');break;\n\t\t\tcase 78:$tabledata = array('start_time'=> '19:15:01','end_time' =>'19:30:00');break;\n\t\t\tcase 89:$tabledata = array('start_time'=> '19:30:01','end_time' =>'19:45:00');break;\n\t\t\tcase 80:$tabledata = array('start_time'=> '19:45:01','end_time' =>'20:00:00');break;\n\t\t\t\n\t\t\tcase 81:$tabledata = array('start_time'=> '20:00:00','end_time' =>'20:15:00');break;\n\t\t\tcase 82:$tabledata = array('start_time'=> '20:15:01','end_time' =>'20:30:00');break;\n\t\t\tcase 83:$tabledata = array('start_time'=> '20:30:01','end_time' =>'20:45:00');break;\n\t\t\tcase 84:$tabledata = array('start_time'=> '20:45:01','end_time' =>'21:00:00');break;\n\t\t\t\n\t\t\tcase 85:$tabledata = array('start_time'=> '21:00:00','end_time' =>'21:15:00');break;\n\t\t\tcase 86:$tabledata = array('start_time'=> '21:15:01','end_time' =>'21:30:00');break;\n\t\t\tcase 87:$tabledata = array('start_time'=> '21:30:01','end_time' =>'21:45:00');break;\n\t\t\tcase 88:$tabledata = array('start_time'=> '21:45:01','end_time' =>'22:00:00');break;\n\t\t\t\n\t\t\tcase 89:$tabledata = array('start_time'=> '22:00:00','end_time' =>'22:15:00');break;\n\t\t\tcase 90:$tabledata = array('start_time'=> '22:15:01','end_time' =>'22:30:00');break;\n\t\t\tcase 91:$tabledata = array('start_time'=> '22:30:01','end_time' =>'22:45:00');break;\n\t\t\tcase 92:$tabledata = array('start_time'=> '22:45:01','end_time' =>'23:00:00');break;\n\t\t\t\n\t\t\tcase 93:$tabledata = array('start_time'=> '23:00:00','end_time' =>'23:15:00');break;\n\t\t\tcase 94:$tabledata = array('start_time'=> '23:15:01','end_time' =>'23:30:00');break;\n\t\t\tcase 95:$tabledata = array('start_time'=> '23:30:01','end_time' =>'23:45:00');break;\n\t\t\tcase 96:$tabledata = array('start_time'=> '23:45:01','end_time' =>'24:00:00');break;\n\t\t}\n\t\treturn $tabledata;\n\t}", "function time_taken($tally=0, $precision=5) {\n static $start = 0; // first call\n static $notch = 0; // tally calls\n static $time = 0; // set to time of each call (after setting $duration)\n $now = microtime(1);\n if (! $start) { // init, basically\n $time = $notch = $start = $now;\n return \"Starting at $start.\\n\";\n }\n $duration = $now - $time;\n $time = $now;\n $out = \"That took \".round($duration, $precision).\" seconds.\";\n if ($tally) { // time passed since last tally\n $since_start = $now - $start;\n $since_last_notch = $now - $notch;\n $notch = $now;\n $out .= \"<br>\\n\". round($since_start, $precision) .' seconds since start'.($since_start!=$since_last_notch ? ' ('.round($since_last_notch, $precision) .' since last sum).':'.');\n }\n return $out.\"\\n\";\n}", "function hackerHot($baseScore,$date_time,$gravity = 1.8){\n \n $upload_time=strtotime($date_time);\n $time_diff=(strtotime('now')-$upload_time);\n $hourPassed=round(($time_diff/(60 * 60)));\n if($hourPassed<0){\n $hourPassed=0;\n }\n \n return round((($baseScore-1)/pow($hourPassed+2,$gravity))*1000);\n }", "public function testWatchCountIsCorrect()\n {\n $totalWatch = $this->stopWatch->getWatchCount();\n\n $this->assertEquals(1, $totalWatch, \"Watch count is not correct\");\n }", "abstract protected function calculate_sample($sampleid, $sampleorigin, $starttime, $endtime);", "public function getPeriodStatus($check, $startTime, $endTime) {\n\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_IN;\n\t\tif ($check == QuizzesComponent::USES_USE) {\n\t\t\t$nowTime = strtotime((new NetCommonsTime())->getNowDatetime());\n\t\t\tif (! empty($startTime) && $nowTime < strtotime($startTime)) {\n\t\t\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_BEFORE;\n\t\t\t}\n\t\t\tif (! empty($endTime) && $nowTime > strtotime($endTime)) {\n\t\t\t\t$ret = QuizzesComponent::QUIZ_PERIOD_STAT_END;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public function testRentBikesByDate()\n {\n\n $requestParams = [\n 'inputBike' => 3,\n 'dateStart' => new DateTime('2018-06-01 09:00:00'),\n 'dateEnd' => new DateTime('2018-06-21 09:00:00')\n ];\n\n $response = $this->call('POST', '/rentbydates', $requestParams);\n\n $this->assertTrue($response->isOk(), \"Wrong params\");\n\n }", "function blackout_string ($current,$begin,$end) {\n\n # if the start and end time are within the same day, then we use\n # the times as-is. otherwise the start or end time needs to be adjusted\n # $single is true if begin and end times are within the same day\n # $simple is true if we use days between start and end or false if we use the outside days\n\n $beginDay = intval( $begin / 86400);\n $endDay = intval( $end / 86400);\n $today = $current;\n\n # Convert the current day to a string\n\n if ($today == 1) { $dayString = \"Mon\"; }\n else if ($today == 2) { $dayString = \"Tue\"; }\n else if ($today == 3) { $dayString = \"Wed\"; }\n else if ($today == 4) { $dayString = \"Thu\"; }\n else if ($today == 5) { $dayString = \"Fri\"; }\n else if ($today == 6) { $dayString = \"Sat\"; }\n else if ($today == 0) { $dayString = \"Sun\"; }\n\n if (($beginDay == $endDay) && ($begin < $end)) {\n\n # This is the easy one - Begin and end times are on the same day\n\n $beginSeconds = $begin % 86400;\n $endSeconds = $end % 86400;\n\n } else {\n\n if ($beginDay == $current) { $beginSeconds = $begin % 86400; }\n else { $beginSeconds = 0; }\n\n if ($endDay == $current) { $endSeconds = $end % 86400; }\n else { $endSeconds = 86399; }\n\n }\n\n $blackoutString = \"$dayString $beginSeconds $endSeconds,\";\n return ($blackoutString);\n }", "function addNumbers($end, $start = 0) {\r\n $sum = 0;\r\n for($i = $start; $i <= $end; $i++){\r\n $sum += $i;\r\n }\r\n echo(\"The sum of $start to $end = $sum<br \\>\");\r\n\r\n }", "function testDaysPerJobIndicator($session_user) {\n\n/*\n $proj = ProjectCache::getInstance()->getProject(14);\n $issueSel = $proj->getIssueSelection();\n*/\n $proj = ProjectCache::getInstance()->getProject(14);\n $issueSel = new IssueSelection(\"Project $proj->name user \".$session_user->getName());\n $issueList = $proj->getIssues($session_user->id);\n $issueSel->addIssueList($issueList);\n\n\n $daysPerJobIndicator = new DaysPerJobIndicator();\n\n echo 'Testing '.$daysPerJobIndicator->getName().'<br>';\n\n $daysPerJob = $daysPerJobIndicator->execute($issueSel);\n\n $jobs = new Jobs();\n $totalElapsed = 0;\n echo \"<table>\";\n echo \"<caption>\".$issueSel->name.\"</caption>\";\n echo \"<tr><th>name</th><th>nbDays</th><th>color</th><tr>\";\n foreach ($daysPerJob as $id => $duration) {\n echo \"<tr>\";\n echo '<td>'.$jobs->getJobName($id).'</td>';\n echo '<td>'.$duration.'</td>';\n echo '<td>'.$jobs->getJobColor($id).'</td>';\n echo \"</tr>\";\n $totalElapsed += $duration;\n }\n echo \"</table>\";\n echo \"totalElapsed = $totalElapsed<br>\";\n\n}", "public function getLevelCount($startTime, $endTime)\n {\n \t$levelArray = array();\n \t$dalCompute = Dal_Island_Compute::getDefaultInstance();\n\n \tif ( !empty($startTime) ) {\n for ( $i = 1; $i < 36; $i ++ ) {\n $levelArray[$i] = $dalCompute->getLevelCountByTime($i, $startTime, $endTime);\n }\n \t}\n \telse {\n\t \tfor ( $i = 1; $i < 36; $i ++ ) {\n\t \t\t$levelArray[$i] = $dalCompute->getLevelCount($i);\n\t \t}\n \t}\n\n \treturn $levelArray;\n }", "private function convertBookSchedule($minutes = '', $date = '', $start_time = '', $end_time = '') {\n\n if ($minutes > 0) {\n if (strtotime(date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time)))) > strtotime($end_time) || date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time))) == '00:00:00') {\n $date = $date;\n $start_time = date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($start_time)));\n $end_time = (date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time))) == '00:00:00' ? '23:59:59' : date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time))));\n } else if (strtotime(date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($start_time)))) < strtotime($start_time)) {\n $date = strtotime('+ 1days' . date('Y-m-d', $date));\n //$tomorrow = date('m-d-Y',strtotime($date . \"+1 days\"));\n $start_time = date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($start_time)));\n $end_time = date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time)));\n\n// $date2 = strtotime('+ 1days'.date('Y-m-d',$date));\n// //$tomorrow = date('m-d-Y',strtotime($date . \"+1 days\"));\n// $start_time2 = date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($start_time)));\n// $end_time2 = date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time)));\n }\n } else if ($minutes < 0) {\n if (strtotime(date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($start_time)))) < strtotime($start_time)) {\n $date = $date;\n $start_time = date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($start_time)));\n $end_time = date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time)));\n } else if (strtotime(date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time)))) > strtotime($end_time) || date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time))) == '00:00:00') {\n $date = strtotime('- 1days' . date('Y-m-d', $date));\n $start_time = date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($start_time)));\n $end_time = (date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time))) == '00:00:00' ? '23:59:59' : date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time))));\n\n// $date2 = strtotime('- 1days'.date('Y-m-d',$date));\n// $start_time2 = date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($start_time)));\n// $end_time2 = (date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time))) == '00:00:00' ? '23:59:59' : date(\"H:i:s\", strtotime($minutes . 'minutes', strtotime($end_time))));\n }\n }\n\n return array(\n 'date' => $date,\n 'start_time' => $start_time,\n 'end_time' => $end_time,\n// 'date2' => @$date2,\n// 'start_time2' => @$start_time2,\n// 'end_time2' => @$end_time2,\n );\n }", "function getReservationTimeArrayAsInteger(){\n //setting variables;\n //$dateformat = 'H:i:s';\n $int_start_time;\n $int_duration = strtotime($this->end_time) - strtotime($this->start_time);\n $int_duration = (int)date('h', $int_duration);\n //$reservationTimeArray = array($this->start_time, $this->end_time);\n\n //first switch case function will convert all possible bookings to integer value\n switch($this->start_time){\n case '9:00:00':\n $int_start_time = 0;\n break;\n case '10:00:00':\n $int_start_time = 1;\n break;\n case '11:00:00':\n $int_start_time = 2;\n break;\n case '12:00:00':\n $int_start_time = 3;\n break;\n case '13:00:00':\n $int_start_time = 4;\n break;\n case '14:00:00':\n $int_start_time = 5;\n break;\n case '15:00:00':\n $int_start_time = 6;\n break;\n case '16:00:00':\n $int_start_time = 7;\n break;\n case '17:00:00':\n $int_start_time = 8;\n break;\n }\n\n //by the end of this switch case we have array which will have exactly 2 values inside\n //the problem is if smbd booked for more than 1 hour the array will be missing these intermediate value\n // EXAMPLE: Booking from 15:00 to 18:00 will result in array value of [6,9];\n //the next step is we need to fill up missing values;\n\n for($i = $int_start_time; $i < ($int_start_time + $int_duration); $i++){\n $int_reservationTimeArray[] = $i;\n }\n \n\n //after this we have array which can look as [6,9,7,8];\n //the array is not sorted, so we better sort it before we pass it back\n\n\n sort($int_reservationTimeArray);\n\n return $int_reservationTimeArray;\n\n\n }", "function timeconditions_get_time( $hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish) {\n\n\t//----- Time Hour Interval proccess ----\n\t//\n\tif ($minute_start == '-') {\n\t\t$time_minute_start = \"*\";\n\t} else {\n\t\t$time_minute_start = sprintf(\"%02d\",$minute_start);\n\t}\n\tif ($minute_finish == '-') {\n\t\t$time_minute_finish = \"*\";\n\t} else {\n \t\t$time_minute_finish = sprintf(\"%02d\",$minute_finish);\n\t}\n\tif ($hour_start == '-') {\n\t\t$time_hour_start = '*';\n\t} else {\n\t\t$time_hour_start = sprintf(\"%02d\",$hour_start) . ':' . $time_minute_start;\n\t}\n\tif ($hour_finish == '-') {\n\t\t$time_hour_finish = '*';\n\t} else {\n\t\t$time_hour_finish = sprintf(\"%02d\",$hour_finish) . ':' . $time_minute_finish;\n\t}\n\tif ($time_hour_start == $time_hour_finish) {\n\t\t$time_hour = $time_hour_start;\n\t} else {\n\t\t$time_hour = $time_hour_start . '-' . $time_hour_finish;\n\t}\n\n\t//----- Time Week Day Interval proccess -----\n\t//\n\tif ($wday_start == '-') {\n\t\t$time_wday_start = '*';\n\t} else {\n\t\t$time_wday_start = $wday_start;\n\t}\n\tif ($wday_finish == '-') {\n\t\t$time_wday_finish = '*';\n\t} else {\n\t\t$time_wday_finish = $wday_finish;\n\t}\n\tif ($time_wday_start == $time_wday_finish) {\n\t\t$time_wday = $time_wday_start;\n\t} else {\n\t\t$time_wday = $time_wday_start . '-' . $time_wday_finish;\n\t}\n\n\t//----- Time Month Day Interval proccess -----\n\t//\n\tif ($mday_start == '-') {\n\t\t$time_mday_start = '*';\n\t} else {\n\t\t$time_mday_start = $mday_start;\n\t}\n\tif ($mday_finish == '-') {\n\t\t$time_mday_finish = '*';\n\t} else {\n\t\t$time_mday_finish = $mday_finish;\n\t}\n\tif ($time_mday_start == $time_mday_finish) {\n\t\t$time_mday = $time_mday_start;\n\t} else {\n\t\t$time_mday = $time_mday_start . '-' . $time_mday_finish;\n\t}\n\n\t//----- Time Month Interval proccess -----\n\t//\n\tif ($month_start == '-') {\n\t\t$time_month_start = '*';\n\t} else {\n\t\t$time_month_start = $month_start;\n\t}\n\tif ($month_finish == '-') {\n\t\t$time_month_finish = '*';\n\t} else {\n\t\t$time_month_finish = $month_finish;\n\t}\n\tif ($time_month_start == $time_month_finish) {\n\t\t$time_month = $time_month_start;\n\t} else {\n\t\t$time_month = $time_month_start . '-' . $time_month_finish;\n\t}\n\t$time = $time_hour . '|' . $time_wday . '|' . $time_mday . '|' . $time_month;\n\treturn $time;\n}", "public function run()\n {\n # 勤務時間パターン\n $pattern = [\n 'a'=>[\n 'in'=>8*60*60,\n 'out'=>17*60*60\n ,\n 'breaks'=>[\n ['in'=>11*60*60, 'out'=>11*60*60 + 30*60, 'total_time'=> 30*60, ],\n ['in'=>13*60*60, 'out'=>13*60*60 + 30*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 9*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 8*60*60,\n ],\n 'b'=>[\n 'in'=>10*60*60,\n 'out'=>17*60*60\n ,\n 'breaks'=>[\n ['in'=>11*60*60 + 30*60, 'out'=>12*60*60,'total_time'=> 30*60, ],\n ['in'=>13*60*60 + 30*60,'out'=>14*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 7*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 6*60*60,\n\n ],\n 'c'=>[\n 'in'=>17*60*60\n ,\n 'out'=>22*60*60,\n 'breaks'=>[\n ['in'=>20*60*60,'out'=>20*60*60 + 30*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 5*60*60,\n 'BreakTime' => 30*60,\n 'WorkingTime' => 4*60*60 + 30*60,\n\n ],\n 'd'=>[\n 'in'=>18*60*60,\n 'out'=>24*60*60,\n 'breaks'=>[\n ['in'=>20*60*60 + 30*60,'out'=>21*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 6*60*60,\n 'BreakTime' => 30*60,\n 'WorkingTime' => 5*60*60 + 30*60,\n\n ],\n 'e'=>[\n 'in'=>22*60*60,\n 'out'=>24*60*60,\n 'breaks'=>[\n ['in'=>23*60*60 + 30*60,'out'=>24*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 2*60*60,\n 'BreakTime' => 30*60,\n 'WorkingTime' => 1*60*60 + 30*60,\n\n ],\n 'f'=>[\n 'in'=>0*60*60,\n 'out'=>8*60*60,\n 'breaks'=>[\n ['in'=>4*60*60,'out'=>5*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 8*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 7*60*60,\n\n ],\n 'g'=>[\n 'in'=>18*60*60,\n 'out'=>22*60*60,\n 'breaks'=>[],\n 'RestrainTime' => 9*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 8*60*60,\n\n ],\n ];\n\n # 契約出勤日\n $ContractWorkingDays = [\n 1 =>[\n 1 =>[$pattern['a']],\n 2 =>[$pattern['a']],\n 3 =>[$pattern['a']],\n 4 =>[$pattern['a']],\n 5 =>[$pattern['a']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 2 =>[\n 1 =>[$pattern['b']],\n 2 =>[$pattern['b']],\n 3 =>[$pattern['b']],\n 4 =>[$pattern['b']],\n 5 =>[$pattern['b']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 3 =>[\n 1 =>[$pattern['c']],\n 2 =>[$pattern['c']],\n 3 =>[$pattern['c']],\n 4 =>[$pattern['c']],\n 5 =>[$pattern['c']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 4 =>[\n 1 =>[$pattern['d']],\n 2 =>[$pattern['d']],\n 3 =>[$pattern['d']],\n 4 =>[$pattern['d']],\n 5 =>[$pattern['g']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 5 =>[\n 1 =>[$pattern['e']],\n 2 =>[$pattern['f'], $pattern['e']],\n 3 =>[$pattern['f'], $pattern['e']],\n 4 =>[$pattern['f'], $pattern['e']],\n 5 =>NULL,\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n\n ];\n\n #出勤記録の保存\n $work_id = 1;\n\n // $nヶ月間の出勤記録\n for ($n=3; $n >= 0; $n--)\n {\n $dateOb = new DateItems;\n $item = $dateOb->getBeforMonth(1,$n); //nヶ月後の情報を取得(d,n)\n\n // 1日~月末\n for ($d=1; $d <= $item['last_d']; $d++)\n {\n $day = $dateOb->getThisMonth($d,$item['m'],$item['Y']);\n\n //従業員ID\n for ($e=1; $e <= 5; $e++)\n {\n $works = $ContractWorkingDays[$e][$day['w']];\n // 一人が一日複数回出勤する記録の出力\n if(!empty( $works )){\n foreach ($works as $work)\n {\n\n if(!empty( $work['breaks'] )){\n foreach ($work['breaks'] as $break)\n {\n $work_break = new WorkBreak([\n 'work_id' => $work_id,\n 'in'=> $break['in'],\n 'out' => $break['out'],\n 'total_time' => $break['total_time'],\n ]);\n $work_break->save();\n }\n }\n\n $work_id ++;\n }\n }\n }\n }\n\n\n }\n\n }", "public function getPerformanceScore($dateStart, $dateEnd);", "public function run()\n {\n \tfor ($i=9; $i < 20; $i++) { \n \t\t# code...\n \t\tfor ($j=0; $j < 60; $j+=30) { \n \t\t\t# code...\n \t\t\t$fin = $j+30;\n \t\t\t$hrfin = $i;\n\n \t\t\tif($fin == 60){ \n \t\t\t\t$fin = 0;\n \t\t\t\t$hrfin++;\n \t\t\t}\n\t\t DB::table('blocks')->insert([\n\t\t 'startBlock' => \"$i:$j:00\",\n\t\t 'finishBlock' => \"$hrfin:$fin:00\",\n\t\t ]);\n \t\t}\n \t}\n }", "abstract protected function get_interval();", "static function match($times, $start, $end, $valueField, &$matrix=null){\r\n\t\tif(empty($times))\r\n\t\t\treturn array();\r\n\r\n\t\t$start -= $start % 3600; \r\n\t\t$end += ($end % 3600)>0? 3600 - ($end % 3600) : 0;\r\n\t\t\r\n\t\t$hits = array();\r\n\t\t\r\n\t\twhile ($start < $end){\r\n\t\t\t$d = date(\"Ymd\", $start);\r\n\t\t\t$h = date(\"H\", $start);\r\n\t\t\tif(isset($matrix[$d][$h])){\r\n\t\t\t\t$hits = array_merge($hits,$matrix[$d][$h]); \r\n\t\t\t}\r\n\t\t\t$start += 3600;\r\n\t\t}\r\n\t\t$hits = array_unique($hits);\r\n\t\treturn $hits;\r\n\t\t\r\n\t}", "function ExampleCountFunction($count_to = 1000000, $message = 'No Message Was Specified.'){\n\t$report_at = round($count_to / 2);\n\t// iterate $i from 0 to $count_to and echo $message at 1/2 way\n\tfor($i=0;$i<$count_to;$i++){\n\t\tif($i == $report_at){\n\t\t\techo $message . PHP_EOL;\n\t\t}\n\t}\n}", "public function sumCountOfReports($dateStart, $dateEnd);", "public function generate() {\r\n\t\t$busyEvents = new ArrayCollection ();\r\n\t\t\r\n\t\t// start time\r\n\t\t$startTime = $this->getStartTime ();\r\n\t\t$startTime_hour = $startTime->getHour ();\r\n\t\t$startTime_minute = $startTime->getMinute ();\r\n\t\t$startTime_second = $startTime->getSecond ();\r\n\t\t\r\n\t\t// end time\r\n\t\t$endTime = $this->getEndTime ();\r\n\t\t$endTime_hour = $endTime->getHour ();\r\n\t\t$endTime_minute = $endTime->getMinute ();\r\n\t\t$endTime_second = $endTime->getSecond ();\r\n\t\t\r\n\t\t// time slot start date\r\n\t\t$timeSlot = $this->getTimeSlot ();\r\n\t\t$startDate = $timeSlot->getStartDate ();\r\n\t\t$startDate_year = $startDate->getYear ();\r\n\t\t$startDate_month = $startDate->getMonth ();\r\n\t\t$startDate_day = $startDate->getDay ();\r\n\t\t\r\n\t\t// days\r\n\t\t$days = $this->getDays ();\r\n\t\t\r\n\t\t$j = ($startTime->is_greater_or_equal($endTime)) ? 1 : 0;\r\n\t\t\r\n\t\t//debug\r\n\t\t//echo 'j = ' . $j . ' $startTime : '. $startTime. ' $endTime : '. $endTime. '<br><br>';\r\n\t\t\r\n\t\t$floor_days = $timeSlot->duration ()->floor_days ();\r\n\t\t\r\n\t\tfor($i = -1; $i <= $floor_days; $i ++) {\r\n\t\t\t$current_startDate = new CalendarDate ( $startDate_year, $startDate_month, $startDate_day + $i, $startTime_hour, $startTime_minute, $startTime_second );\r\n\t\t\t// $current_startDate_next_day = clone $current_startDate;\r\n\t\t\t// $current_startDate_next_day->modify('tomorrow');\r\n\t\t\t$add_condition = $days->contains ( $current_startDate->format ( 'l' ) );\r\n\t\t\t// || (($j == 1) && $days->contains ( $current_startDate_next_day->format ( 'l' ) ))\r\n\t\t\t\r\n\t\t\tif ($add_condition) {\r\n\t\t\t\t$current_endDate = new CalendarDate ( $startDate_year, $startDate_month, $startDate_day + $i + $j, $endTime_hour, $endTime_minute, $endTime_second );\r\n\t\t\t\t$current_event = new CalendarEvent ( $current_startDate, $current_endDate );\r\n\t\t\t\t$busyEvents->add ( $current_event );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $busyEvents;\r\n\t}", "function count_days( $a, $b )\n {\n // First we need to break these dates into their constituent parts:\n $gd_a = getdate( $a );\n $gd_b = getdate( $b );\n\n // Now recreate these timestamps, based upon noon on each day\n // The specific time doesn't matter but it must be the same each day\n $a_new = mktime( 12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year'] );\n $b_new = mktime( 12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year'] );\n\n // Subtract these two numbers and divide by the number of seconds in a\n // day. Round the result since crossing over a daylight savings time\n // barrier will cause this time to be off by an hour or two.\n return round( abs( $a_new - $b_new ) / 86400 );\n }", "public function fillTime($dayNum,$branch_id,$serv,$org_user,$date)\n { \n //Flag T Check If It Is ShiftNight\n $nightFlag=0;\n //Query To Get Working Hours Of Specific Day Of Specific Branch\n $sqlGetsch=\"SELECT * FROM work_hours WHERE branch_id=? AND day=?\";\n $values=array($branch_id,$dayNum);\n $sch=$this->getInfo($sqlGetsch,$values);\n \n //Query To Get The Average Time Of Service\n $sqlGetServiceID=\"SELECT app_time_avg FROM service WHERE service_id=?\";\n $values=array($serv);\n $getAvg=$this->getInfo($sqlGetServiceID,$values);\n $avgTime=$getAvg[0]['app_time_avg'];\n $avg='+'.$avgTime.' minutes';\n \n //Check If It Is Night Shifts\n if($sch[0]['startA']>\"12:00\" && $sch[0]['endB']>=\"00:00\" && $sch[0]['endB']<=\"12:00\")\n {\n $nightFlag=1;\n $freeTime1 = $this->create_time_range($sch[0]['startA'], \"23:59\" , $avg);\n //To Add Avg And Avoid Duplication Cell\n $time = strtotime(end($freeTime1));\n $avoidTime = date(\"H:i\", strtotime($avg, $time));\n $freeTime2 = $this->create_time_range($avoidTime, $sch[0]['endB'] , $avg);\n $freeTime = array_merge($freeTime1, $freeTime2);\n }\n else // So It Is Morning Shifts\n {\n $freeTime = $this->create_time_range($sch[0]['startA'], $sch[0]['endB'], $avg);\n }\n \n $minTime='-'.$avgTime.' minutes'; //To Get Out The Dates That Are Less Than the Average Appointment Time\n \n //loop To Take out all The Break Time \n for($i=0;$i<count($freeTime);$i++)\n {\n if(isset($freeTime[$i]))//If this index exists\n {\n $t = date(\"H:i\",strtotime($freeTime[$i]));\n $time = strtotime($sch[0]['endA']);\n $endA = date(\"H:i\", strtotime($minTime, $time));\n $startB = date(\"H:i\",strtotime($sch[0]['startB']));\n if($startB==\"00:00\")\n $startB=\"23:59\";\n $time = strtotime($sch[0]['endB']);\n $endB = date(\"H:i\", strtotime($minTime, $time));\n if($t>=$endA && $t<$startB)\n unset($freeTime[$i]);\n }\n }\n //Query To Get All The Appointment Of Specific Day Of Specific Branch With Specific Service\n $sqlGetAllApp=\"SELECT appointment_time FROM appointment WHERE branch_id=? AND service_id=? AND appointment_date=?\";\n $values=array($branch_id,$serv,$date);\n $apps=$this->getInfo($sqlGetAllApp,$values);\n\n\n //loop To Take out all The Exists Time \n for($i=0;$i<count($freeTime);$i++)\n {\n if(isset($freeTime[$i]))//If this index exists\n {\n $t = date(\"H:i\",strtotime($freeTime[$i]));\n foreach($apps as $p)\n {\n $time = date(\"H:i\",strtotime($p['appointment_time']));\n if($t==$time)\n unset($freeTime[$i]);\n }\n }\n }\n //IF Its NightShift So We Remove ALl The Queues In The Next Day\n if($nightFlag==1)\n {\n $newDate=date($date);\n $newDate++;\n //Query To Get All The Appointment Of Specific Day Of Specific Branch With Specific Service\n $sqlGetAllApp=\"SELECT appointment_time FROM appointment WHERE branch_id=? AND service_id=? AND appointment_date=?\";\n $values=array($branch_id,$serv,$newDate);\n $apps=$this->getInfo($sqlGetAllApp,$values);\n\n\n //loop To Take out all The Exists Time \n for($i=0;$i<count($freeTime);$i++)\n {\n if(isset($freeTime[$i]))//If this index exists\n {\n $t = date(\"H:i\",strtotime($freeTime[$i]));\n foreach($apps as $p)\n {\n $time = date(\"H:i\",strtotime($p['appointment_time']));\n if($t==$time)\n unset($freeTime[$i]);\n }\n }\n }\n }\n \n //Paste The Selection List Code Of Time Except The Last One\n foreach($freeTime as $time)\n {\n if($time!=end($freeTime))//Except the ending time\n {\n $startAp = date(\"H:i\",strtotime($time));\n ?> \n <option value=\"<?php echo $startAp; ?>\"><?php echo $startAp; ?></option>\n <?php\n \n }\n }\n }", "function bytesForInterval($start, $stop)\n {\n if ($this->dbg) echo (\"bytesForInterval start: \" . $start . \n \", stop: \" . $stop . \" on \" . $this->fileName . \"<br/>\");\n if (($start < $this->timeStart + $this->approxLenSec) &&\n ($stop > $this->timeStart))\n { // there is probably an overlap\n $this->parseChunks();\n // there might NOT have been overlap\n if ($start >= $this->timeEnd) return 0;\n \n $begin = $start;\n if ($begin < $this->timeStart)\n $begin = $this->timeStart;\n $end = $stop;\n if ($end > $this->timeEnd)\n $end = $this->timeEnd;\n $byteBegin = ($begin - $this->timeStart) * $this->byteRateAdjusted;\n $byteEnd = ($end - $this->timeStart) * $this->byteRateAdjusted;\n $byteBegin = (int) $byteBegin;\n $byteEnd = (int) $byteEnd;\n $byteBegin /= $this->blockAlign; // round to nearest block\n $byteEnd /= $this->blockAlign;\n $byteBegin = (int)$byteBegin;\n $byteEnd = (int)$byteEnd+1; // send one more block off the end\n $byteBegin *= $this->blockAlign;\n $byteEnd *= $this->blockAlign;\n if ($byteBegin < 0)\n $byteBegin = 0;\n if ($byteEnd > $this->totalDataBytes)\n $byteEnd = $this->totalDataBytes;\n $this->byteToSendStart = $byteBegin;\n $this->bytesToSend = $byteEnd - $byteBegin;\n if ($this->dbg) echo (\"byteBegin \" . $byteBegin . \" byteEnd \" . \n $byteEnd . \"<br/>\");\n return $this->bytesToSend; // exact number of bytes we will send\n }\n else return 0;\n }", "public function testGetStart() {\n // It should return an int\n $this->assertGreaterThan( 0, $this->timer->get_start() );\n }" ]
[ "0.7953166", "0.7868492", "0.7784326", "0.76086307", "0.6430962", "0.6139236", "0.5902495", "0.57978386", "0.5712412", "0.56961316", "0.5643836", "0.56295836", "0.5586447", "0.5575732", "0.5570984", "0.55343956", "0.5505528", "0.54813874", "0.54590386", "0.543743", "0.5389041", "0.5377673", "0.5359427", "0.5352174", "0.5348372", "0.5345741", "0.5335288", "0.5260524", "0.5251232", "0.5230394", "0.52004486", "0.5199573", "0.51966906", "0.51393795", "0.5138031", "0.5127931", "0.5097884", "0.50948244", "0.5089517", "0.50870425", "0.5080103", "0.5074517", "0.5043393", "0.5039923", "0.50370926", "0.4983557", "0.49823952", "0.49659902", "0.49627852", "0.4959898", "0.49564388", "0.49507722", "0.4948891", "0.49459007", "0.4940192", "0.49390265", "0.49313983", "0.49238205", "0.49154416", "0.48987657", "0.48936158", "0.48787594", "0.48674312", "0.4862623", "0.4853344", "0.48485327", "0.48423988", "0.48346183", "0.48344186", "0.48320112", "0.48286152", "0.48281118", "0.4828088", "0.4826223", "0.48222983", "0.482213", "0.48196095", "0.48154125", "0.48113558", "0.48094442", "0.4797096", "0.47942066", "0.47927967", "0.47855026", "0.47760674", "0.47745645", "0.4761545", "0.47554532", "0.4755139", "0.47494096", "0.47492144", "0.47377196", "0.47357157", "0.47353464", "0.47331876", "0.47249806", "0.47180536", "0.471338", "0.4697299", "0.46960944" ]
0.7991111
0
countBells test 6 Test if both times are equal, treat it as if twentyfour hours will pass.
public function testcountBells6() { $startTime = '10:00'; $endTime = '10:00'; $expected = 166; $actual = $this->clock->countBells($startTime, $endTime); $this->assertEquals($expected, $actual); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testcountBells2()\n {\n $startTime = '14:00';\n $endTime = '15:00';\n $expected = 5;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells4()\n {\n $startTime = '23:00';\n $endTime = '1:00';\n $expected = 24;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells1()\n {\n $startTime = '2:00';\n $endTime = '3:00';\n $expected = 5;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "public function testcountBells3()\n {\n $startTime = '14:23';\n $endTime = '15:42';\n $expected = 3;\n $actual = $this->clock->countBells($startTime, $endTime);\n $this->assertEquals($expected, $actual);\n }", "function is_lucky($ticket) {\n $t = add_zeroes($ticket);\n $first = (int)$t[0] + (int)$t[1] + (int)$t[2]; //first and...\n $second = (int)$t[3] + (int)$t[4] + (int)$t[5]; //last three digits..\n return $first == $second; //compared\n}", "public function testGetEvenUnevenTimes()\n {\n $expectedArray = [ 'even' => 1, 'uneven' => 3 ];\n\n $this->assertEquals($expectedArray, API::countEvenUnevenTimes($this->data), \"TEST 1 - counting visits in even and ueven hours\");\n }", "function compareTimes($t1, $t2) {\n\t\t$h1 = (int) substr($t1, 0, 2);\n\t\t$m1 = (int) substr($t1, 3, 2);\n\t\t$h2 = (int) substr($t2, 0, 2);\n\t\t$m2 = (int) substr($t2, 3, 2);\n\n\t\t//echo \"h:\" . $h1 . \" m - \" . $m1 . \"\\n\" ;\n\t\t//echo \"h:\" . $h2 . \" m - \" . $m2 . \"\\n\" ;\n\n\t\t$res;\n\n\t\tif( $h1 > $h2 )\n\t\t\t$res = 1;\n\t\telse if( $h1 == $h2 && $m1 > $m2 )\n\t\t\t$res = 1;\n\t\telse\n\t\t\t$res = 0;\n\n\t\treturn $res;\n\n\t}", "function count_days( $a, $b )\n {\n // First we need to break these dates into their constituent parts:\n $gd_a = getdate( $a );\n $gd_b = getdate( $b );\n\n // Now recreate these timestamps, based upon noon on each day\n // The specific time doesn't matter but it must be the same each day\n $a_new = mktime( 12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year'] );\n $b_new = mktime( 12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year'] );\n\n // Subtract these two numbers and divide by the number of seconds in a\n // day. Round the result since crossing over a daylight savings time\n // barrier will cause this time to be off by an hour or two.\n return round( abs( $a_new - $b_new ) / 86400 );\n }", "public function hasBepro2Time(){\n return $this->_has(4);\n }", "public function testWatchCountIsCorrect()\n {\n $totalWatch = $this->stopWatch->getWatchCount();\n\n $this->assertEquals(1, $totalWatch, \"Watch count is not correct\");\n }", "function _Fchecktimestchrgrpcnstr($_Mteacher1,$_Mgroup1,$_Mcourse1,&$_Mpossibletimes)\n{\n\t$_Mdayslots=$GLOBALS['_Mdayslots'];$_Mtotslots=$GLOBALS['_Mtotslots'];\n\t$_Mcourseunits=$_Mcourse1->getcourseunits();\n\t$_Mcoursepartunits=$_Mcourse1->getcoursepartunits();\n\t//if($_Mcourseunits==3) $_Mcourseunits++;//3 units needs 4 free slot\n\t$_Mteachertime=$_Mteacher1->getteachertimes();\n\t$_Mgroupstatus=$_Mgroup1->getgroupstatus();\n\t$_Mfreetimecount=0;\n\tfor($i=0 ; $i<$_Mtotslots ; $i++)\n\t{\n\t\t//checkconstraint4course();\n\t\t$_Mttime=$_Mteachertime[$i];$_Mgtime=$_Mgroupstatus[$i];\n\t\t//will correct ; p is assumed f\n\t\tif($_Mttime=='p') $_Mttime='f';\n\t\t//*********************\n\t\t\n\t\tif(($_Mttime=='f')&($_Mgroupstatus[$i]=='f'))\n\t\t $_Mfreetimecount++;\n\t\tif((($_Mttime=='e')&($_Mgtime=='e'))||\n\t\t (($_Mttime=='o')&($_Mgtime=='o'))||\n\t\t (($_Mttime=='f')&($_Mgtime=='o'))||\n\t\t (($_Mttime=='f')&($_Mgtime=='e'))||\n\t\t (($_Mttime=='o')&($_Mgtime=='f'))||\n\t\t (($_Mttime=='e')&($_Mgtime=='f'))//||\n\t\t //(($_Mttime=='p')&($_Mgtime!='s'))//will check other statuses\n\t\t )\n\t\t\t $_Mfreetimecount+=.5;\n\t \t$_Mpossibletimes[$i]=_Fsmaller($_Mttime,$_Mgtime);\n\t\t\n\t}\n\t$_Mcourseremainedtimes=$_Mcourse1->getcourseremainedunits();\n\tif(($_Mfreetimecount>0)&($_Mfreetimecount<$_Mcourseremainedtimes))//if teacher has free slot but not >= courseunits,act according to a total constraint parameter\n\t{\n\t\tglobal $_Mpartialteacherschedule;\n\t\tif($_Mpartialteacherschedule)\n\t\t{ \n\t\t\tarray_push($GLOBALS['_Mteachershavenocmpletefreeslots'],array($GLOBALS['_Mgroup1']->getgroupid(),$_Mcourse1->getcourseid(),$_Mcourse1->getcoursecaption(),$_Mteacher1->teacherid,$_Mteacher1->teacherfamily));\n\t\t\tif(($_Mfreetimecount>=$_Mcoursepartunits)&(($_Mcourse1->getcoursepart()=='c1')||($_Mcourse1->getcoursepart()=='a1')))return true;\n\t\t\telse if(($_Mfreetimecount>=$_Mcoursepartunits)&($_Mcourse1->getotherparttid()==$_Mteacher1->getteacherid()))return true;\n\t\t\telse return false;\n\t\t}\n\t\telse return false;\n\t}\n\n\telse if (($_Mfreetimecount>=$_Mcourseremainedtimes)&&($_Mfreetimecount>0))\n\t return true;\n\telse return false;\n}", "function counttime()\n{\n global $time;\n\n $arrHour = explode(\":\", $time);\n $arrTime2 = array(8, 10, 12, 14, 16, 18, 20, 22, 24);\n foreach ($arrTime2 as $intTime)\n {\n if ($arrHour[0] < $intTime)\n {\n $intWait = (($intTime - $arrHour[0]) * 60) - $arrHour[1];\n $intHours = floor($intWait / 60);\n $intMinutes = $intWait % 60;\n break;\n }\n }\n $arrTime = array('', '');\n if ($intHours < 1)\n {\n $arrTime[0] = '';\n }\n if ($intHours == 1)\n {\n $arrTime[0] = $intHours.T_HOUR;\n }\n if ($intHours > 1 && $intHours < 5)\n {\n $arrTime[0] = $intHours.T_HOURS2;\n }\n if ($intHours > 4)\n {\n $arrTime[0] = $intHours.T_HOURS;\n }\n if ($intMinutes < 1)\n {\n $arrTime[1] = '';\n }\n if ($intMinutes == 1)\n {\n $arrTime[1] = $intMinutes.T_MINUTE;\n }\n if (($intMinutes > 1 && $intMinutes < 5) || @ereg(\"^[2-5][2-4]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES2;\n }\n if (($intMinutes > 4 && $intMinutes < 20) || @ereg(\"^[2-5][5-9]*$\", $intMinutes) || @ereg(\"^[2-5][0-1]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES;\n }\n\n return $arrTime;\n}", "public function inBusinessHours()\n\t{\n\t\t$timeNow = time();\n\n\t\t// Create two boundary timestamps for today.\n\t\t$open = mktime(9, 0);\n\t\t$close = mktime(19, 30);\n\n\t\t// Is the current time between these two times?\n\t\tif ($timeNow > $open && $timeNow < $close) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function check_time($ts){\n\n // 1: Read the hh:mm in seperate variables and convert to int\n\t$ts_unix = strtotime($ts);\n\t$ts_hour = idate('H', $ts_unix);\n\t$ts_minute = idate('i',$ts_unix);\n\n // 2: Convert into decimal \n\t$ts_sum = $ts_hour + ($ts_minute * 1/60);\n\n\t$time_now_hour = idate('H');\n\t$time_now_minute = idate('i');\n\t\n\t$time_now_sum = $time_now_hour + ($time_now_minute * 1/60);\n \n // 3: Calculate the difference between now and the timestamp\n\t$div_minutes = ($time_now_sum - $ts_sum) * 60;\n\n // 4: Generate a tag with red background if difference > 5 min\n\tif(($div_minutes <= 5) && ($div_minutes >= 0) && (date(\"Y-m-d\") == date(\"Y-m-d\",$ts_unix)))\n\t{\n\t\treturn '<td class =\"ok_color\">'.$ts.'</td>';\n\t} else\n\t{\n\t\treturn '<td class =\"fail_color\">'.$ts.'</td>';\n\t}\n }", "public function testBookedSpacesAfter()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-18 15:00:00\";\n $end = \"2017-06-25 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(0, $total_places);\n }", "function getBusinessDayCount_timestamp($startStamp,$endStamp){\n\t\t$startStamp=timestamp2utime($startStamp);\n\t\t$endStamp=timestamp2utime($endStamp);\n\t\t$dateTmp=$startStamp;\n\t\t$businessDays=0;\n\t\t$loopEnd=false;\n\t\twhile(!$loopEnd){\n\t\t\t$dateTmp = DateAdd($dateTmp,\"d\",1);\n\t\t\tif(isBusinessDay($dateTmp)){\n\t\t\t\t$businessDays++;\n\t\t\t}\n\t\t\tif($dateTmp==$endStamp){\n\t\t\t\t$loopEnd=true;\n\t\t\t}\n\t\t}\n\t\treturn $businessDays;\n\t}", "private static function get_online_time_validate_rules($timebetweenclicks, $startdate, $enddate) {\n $startdate = new \\DateTime($startdate, \\core_date::get_server_timezone_object());\n $enddate = new \\DateTime($enddate, \\core_date::get_server_timezone_object());\n\n $now = new \\DateTime(\"NOW\", \\core_date::get_server_timezone_object());\n\n $start = $startdate->getTimestamp();\n $end = $enddate->getTimestamp();\n\n if (!($timebetweenclicks > 0)) {\n throw new \\moodle_exception('timebetweenclickserror', 'local_monitor', null, null, '');\n }\n\n if ($start > $end) {\n throw new \\moodle_exception('startdateerror', 'local_monitor', null, null, '');\n }\n\n if ($end >= $now->getTimestamp()) {\n throw new \\moodle_exception('enddateerror', 'local_monitor', null, null, '');\n }\n\n return true;\n }", "public static function checkHours(): int\n {\n $closeHour = Carbon::createFromTime(17, 0, 0, 'UTC')->getTimestamp();\n $currentHour = Carbon::now('UTC')->getTimestamp();\n $currentDay = Carbon::now('UTC');\n $currentDay = $currentDay->dayOfWeek;\n $websiteSettings = WebsiteSettings::find(1);\n\n if ($currentDay !== 0 && $currentDay !== 6 && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n if ($currentDay === 6 && $currentHour < $closeHour && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n return 1;\n }", "public function testBookedSpacesEnd()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-17 15:00:00\";\n $end = \"2017-06-20 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public function testMatchMeetsSunday()\n {\n $record = $this->object->getCourseOfferingQueryRecord($this->weeklyScheduleType);\n $record->matchMeetsSunday(true);\n\t\t\n $params = $this->object->getParameters();\n $this->assertEquals(0, count($params));\n \n $this->assertEquals(\"(SSRMEET_SUN_DAY IS NOT NULL)\", $this->object->getWhereClause());\n\n\t\t$courseOfferings = $this->session->getCourseOfferingsByQuery($this->object);\n// \t\tprint $courseOfferings->debug();\n\t\t$this->assertEquals(0, $courseOfferings->available());\n }", "private function passTime()\n {\n // guys in bathroom lose pee equal to peeSpeed\n // guys at bar gain pee equal to drinkSpeed\n // guys in bathroom with pee == 0 return to bar\n }", "function getBusinessDayCount($startStamp,$endStamp){\n\t\t$dateTmp=$startStamp;\n\t\t$businessDays=0;\n\t\t$loopEnd=false;\n\t\twhile(!$loopEnd){\n\t\t\t$dateTmp = DateAdd($dateTmp,\"d\",1);\n\t\t\tif(isBusinessDay($dateTmp)){\n\t\t\t\t$businessDays++;\n\t\t\t}\n\t\t\tif($dateTmp==$endStamp){\n\t\t\t\t$loopEnd=true;\n\t\t\t}\n\t\t}\n\t\treturn $businessDays;\n\t}", "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\n //Definindo variáveis = 0\n $fruito = $fruito = 0;\n //Executando a contagem de elementos do array para posterior calculo\n for ($i = 0; $i < count($apples); $i++){\n /* Se o calculo da distancia da árvore $a com a distância da fruta caída,\n * for maior que o ponto inicial da casa, incrementa-se na variável $fruita\n */\n $fapple = ($a + $apples[$i]);\n if ($fapple >= $s && $fapple <= $t){\n $fruita++;\n }\n }\n // Imprime o resultado da variavel $fruita\n print $fruita;\n // Salto de linha\n echo \"\\n\";\n //Executando a contagem de elementos do array para posterior calculo\n for ($i = 0; $i < count($oranges); $i++){\n /* Se o calculo da distancia da árvore $b com a distância da fruta caída,\n * for menor que o ponto final da casa, incrementa-se na variável $fruito\n */\n $forange = ($b + $oranges[$i]);\n if ($forange >= $s && $forange <= $t){\n $fruito++;\n }\n }\n // Imprime o resultado da variavel $fruito\n print $fruito;\n}", "private function save_matchday() {\r\n for ($i = 0; $i < count($this->teams_1); $i++) {\r\n if ($this->free_ticket || ($this->teams_1[$i] != $this->free_ticket_identifer &&\r\n $this->teams_2[$i] != $this->free_ticket_identifer))\r\n $matches_tmp[] = array($this->teams_1[$i], $this->teams_2[$i]);\r\n }\r\n $this->matches[] = $matches_tmp;\r\n return true;\r\n }", "function pokerWinner($player1Hand){\n $pairCount = 0;\n $twoPairCount = 0;\n $threeOfAKind = 0;\n $fourOfAKindCount = 0;\n $straightCount = 0;\n $flushCount = 0;\n $fullHouseCount = 0;\n $fourOfAKindCount = 0;\n $straightFlushCount = 0;\n $royalFlushCount = 0;\n $consecutive = 0;\n $value = 10;\n\n $matchingCardCount = pairFinder($player1Hand);\n\n if($matchingCardCount == 3){\n \n $fourOfAKindCount = 1;\n $threeOfAKind = 1;\n $pairCount = 2;\n }\n\n if($matchingCardCount == 2){\n $threeOfAKind = 1;\n $pairCount = 1;\n }\n\n if($matchingCardCount == 1){\n $pairCount = 1;\n\n }\n\n //check for two pairs\n if(twoPairFinder($player1Hand)){\n $pairCount = 2;\n $twoPairCount = 1;\n }\n\n\n\n if(straightFinder($player1Hand)){\n $straightCount = 1;\n\n\n }\n\n //check for flush\n if(flushFinder($player1Hand)){\n $flushCount = 1;\n\n }\n\n //check for straight flush\n if($flushCount == 1 && $straightCount == 1){\n $straightFlushCount = 1;\n }\n\n //check for royal flush\n if($straightFlushCount == 1){\n if(royalFlushFinder($player1Hand)){\n $royalFlushCount = 1;\n }\n }\n\n //Testing area\n\n // echo 'The $pairCount is: ' . $pairCount . \"\\n\" . \"\\n\";\n // echo 'The $twoPairCount is: ' . $twoPairCount . \"\\n\" . \"\\n\";\n // echo 'The $threeOfAKind is: ' . $threeOfAKind . \"\\n\" . \"\\n\";\n // echo 'The $fourOfAKindCount is: ' . $fourOfAKindCount . \"\\n\" . \"\\n\";\n // echo 'The $straightCount is: ' . $straightCount . \"\\n\" . \"\\n\";\n // echo 'The $flushCount is: ' . $flushCount . \"\\n\" . \"\\n\";\n // echo 'The $fullHouseCount is: ' . $fullHouseCount . \"\\n\" . \"\\n\";\n // echo 'The $fourOfAKindCount is: ' . $fourOfAKindCount . \"\\n\" . \"\\n\";\n // echo 'The $straightFlushCount is: ' . $straightFlushCount . \"\\n\" . \"\\n\";\n // echo 'The $royalFlushCount is: ' . $royalFlushCount . \"\\n\" . \"\\n\";\n\n\n //Give out points\n if($royalFlushCount == 1){\n $value = 10;\n return $value;\n }\n\n if($straightFlushCount == 1){\n $value = 9;\n return $value;\n }\n\n if($fourOfAKindCount == 1){\n $value = 8;\n return $value;\n }\n\n if($fullHouseCount == 1){\n $value = 7;\n return $value;\n }\n\n if($flushCount == 1){\n $value = 6;\n return $value;\n }\n\n if($straightCount == 1){\n $value = 5;\n return $value;\n }\n\n if($threeOfAKind == 1){\n $value = 4;\n return $value;\n }\n\n if($twoPairCount == 1){\n $value = 3;\n return $value;\n }\n\n if($pairCount == 1){\n $value = 2;\n return $value;\n }\n\n else{\n $value = 1;\n return $value;\n }\n\n\n}", "public function testClockHours()\n {\n $ecpected = 12;\n $actual = $this->clock->$hours;\n $this->assertEquals($expected, $actual);\n }", "public function testHitHashAndTime() {\n\n\t\t$_SERVER['REMOTE_ADDR'] = '127.0.0.1';\n\n\t\t$r1 = new Nether\\Avenue\\Router(static::$RequestData['Root']);\n\t\t$r2 = new Nether\\Avenue\\Router(static::$RequestData['Test']);\n\n\t\t(new Verify(\n\t\t\t'verify that GetHitHash() returned a hashy looking thing.',\n\t\t\tstrlen($r1->GetHitHash())\n\t\t))->equals(32);\n\n\t\t(new Verify(\n\t\t\t'verify that r1 and r2 GetHitHash() do not match.',\n\t\t\t($r1->GetHitHash() === $r2->GetHitHash())\n\t\t))->false();\n\n\t\t(new Verify(\n\t\t\t'verify GetHitTime() returned a float',\n\t\t\tis_float($r1->GetHitTime())\n\t\t))->true();\n\n\t\t// it is actually plausable that a machine could be so fast that r1 and\n\t\t// r2 register at the exact same microsecond. if you are seeing a failed\n\t\t// test for r1 and r2 hit times matching, put a sleep(0.01) or something\n\t\t// between them. i am not doing that now intentionally to see how long\n\t\t// it takes for it to happen.\n\n\t\t// if they do end up matching, that is not a failure of the libarary.\n\t\t// in fact, that is a success. it means that two hits happend so fast\n\t\t// that you should ignore one of them because seriously, stop spamming\n\t\t// my server.\n\n\t\t// i don't expect this to happen until we have warp capabilities anyway.\n\t\t// at which point microtime is probably going to naturally be further\n\t\t// down the decimal point hole anyway.\n\n\t\t// it sure as fuck isn't going to happen on travis-ci.\n\n\t\t(new Verify(\n\t\t\t'verify that r1 and r2 GetHitTime()s do not match.',\n\t\t\t($r1->GetHitTime() === $r2->GetHitTime())\n\t\t))->false();\n\n\t\t$h1 = $r1->GetHit();\n\n\t\t(new Verify(\n\t\t\t'verify that GetHit() returned data matching GetHitHash().',\n\t\t\t$h1->Hash\n\t\t))->equals($r1->GetHitHash());\n\n\t\t(new Verify(\n\t\t\t'verify that GetHit() returned data matching GetHitTime().',\n\t\t\t$h1->Time\n\t\t))->equals($r1->GetHitTime());\n\n\t\treturn;\n\t}", "public function assert_periods($times1, $times2)\n\t\t{\n\t\t\t# If array size is uneven, user is clocked in. Seperate asserts will be executed for this action.\n\t\t\t$size1 = sizeof($times1) - sizeof($times1) % 2;\n\t\t\t$size2 = sizeof($times2) - sizeof($times2) % 2;\n\n\t\t\t# Check every period against every other period\n\t\t\tfor($i = 0; $i < $size1; $i += 2)\n\t\t\t\tfor($j = 0; $j < $size2; $j += 2)\n\t\t\t\t\tif($this->check_overlap($times1[$i], $times1[$i + 1], $times2[$j], $times2[$j + 1]))\n\t\t\t\t\t\treturn false;\n\n\t\t\treturn true;\n\t\t}", "public function hasMoneycount2(){\n return $this->_has(6);\n }", "public function testDistinctBeatifulNumbersTotal()\r\n {\r\n $this->assertEquals(142, $this->numberOjb->count());\r\n }", "public function test_it_gets_timeslot_id_for_day_and_time()\n {\n $manager = new TimeslotManager;\n\n // right on the :00\n $id = $manager->timeslotForDayAndTime('Monday', '11:00');\n $this->assertEquals($id, 71);\n\n // at the :15\n $id = $manager->timeslotForDayAndTime('Monday', '11:15');\n $this->assertEquals($id, 71);\n\n // right on the :00\n $id = $manager->timeslotForDayAndTime('Saturday', '11:00');\n $this->assertEquals($id, 311);\n\n // at the :15\n $id = $manager->timeslotForDayAndTime('Saturday', '11:15');\n $this->assertEquals($id, 311);\n }", "public function testBookedSpacesStart()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-14 15:00:00\";\n $end = \"2017-06-17 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "private function Verify_Bill_Dates()\n\t{\n\t\t$query = '\n\t\t\t\tSELECT \n\t\t\t\t\tcount(*) as count\n\t\t\t\tFROM \n\t\t\t\t\tbilling_date \n\t\t\t\tWHERE\n\t\t\t\t\tapproved_date > DATE_ADD(NOW(), INTERVAL 2 MONTH)\n\t\t\t\t';\n\t\t$results = $this->mysqli->Query($query);\n\t\t\n\t\t\n\t\t\n\t\t$row = $results->Fetch_Array_Row(MYSQLI_ASSOC);\n\t\t$count = $row['count'];\n\t\tif ($count==0) \n\t\t{\n\t\t\t//if we are running low, fire off an E-mail stating such.\n\t\t\t$this->Bill_Date_Warning();\t\n\t\t}\n\t\t\n\t}", "function storeBreakCheck($StoreAvailabilityCheck = array(), $time = null, $storeId = null) {\n// pr($StoreAvailabilityCheck);\n App::import('Model', 'Store');\n $this->Store = new Store();\n $result = FALSE;\n $storeStoreBlackOutCheck = $this->Store->find('first', array('conditions' => array('Store.id' => $storeId, 'Store.is_deleted' => 0, 'Store.is_active' => 1), \"fields\" => array(\"Store.id\", \"Store.is_break_time\", \"Store.is_break1\", \"Store.is_break2\")));\nif(!empty($StoreAvailabilityCheck['StoreBreak'])){\n if ($StoreAvailabilityCheck['StoreBreak']['break1_start_time'] == '24:00:00') {\n $StoreAvailabilityCheck['StoreBreak']['break1_start_time'] = \"00:00:00\";\n }\n if ($StoreAvailabilityCheck['StoreBreak']['break1_end_time'] == '24:00:00') {\n $StoreAvailabilityCheck['StoreBreak']['break1_end_time'] = \"00:00:00\";\n }\n if ($StoreAvailabilityCheck['StoreBreak']['break2_start_time'] == '24:00:00') {\n $StoreAvailabilityCheck['StoreBreak']['break2_start_time'] = \"00:00:00\";\n }\n if ($StoreAvailabilityCheck['StoreBreak']['break2_end_time'] == '24:00:00') {\n $StoreAvailabilityCheck['StoreBreak']['break2_end_time'] = \"00:00:00\";\n }\n \n \n // strtotime Store break time conversion for break 1\n $StoreBreak1StartTime = strtotime($StoreAvailabilityCheck['StoreBreak']['break1_start_time']);\n $StoreBreak1EndTime = strtotime($StoreAvailabilityCheck['StoreBreak']['break1_end_time']);\n // strtotime Store break time conversion for break 2\n $StoreBreak2StartTime = strtotime($StoreAvailabilityCheck['StoreBreak']['break2_start_time']);\n $StoreBreak2EndTime = strtotime($StoreAvailabilityCheck['StoreBreak']['break2_end_time']);\n }\n $compairTime = strtotime($time);\n\n\n// echo \"Booking Time -- : \" . $time . \"<br>\";\n// echo \"StoreBreak1StartTime Dates -- : \" . $StoreAvailabilityCheck['StoreBreak']['break1_start_time'] . \"<br>\";\n// echo \"StoreBreak1EndTime Advance Day -- : \" . $StoreAvailabilityCheck['StoreBreak']['break1_end_time'] . \"<br>\";\n// echo \"StoreBreak2StartTime Dates -- : \" . $StoreAvailabilityCheck['StoreBreak']['break2_start_time'] . \"<br>\";\n// echo \"StoreBreak2EndTime Advance Day -- : \" . $StoreAvailabilityCheck['StoreBreak']['break2_end_time'] . \"<br>\";\n// echo \"--------------------------------\" . \"<br>\";\n// echo \"Booking Time -- : \" . $compairTime . \"<br>\";\n// echo \"StoreBreak1StartTime Dates -- : \" . $StoreBreak1StartTime . \"<br>\";\n// echo \"StoreBreak1EndTime Advance Day -- : \" . $StoreBreak1EndTime . \"<br>\";\n// echo \"StoreBreak2StartTime Dates -- : \" . $StoreBreak2StartTime. \"<br>\";\n// echo \"StoreBreak2EndTime Advance Day -- : \" .$StoreBreak2EndTime . \"<br>\";\n \n \n if ($storeStoreBlackOutCheck['Store']['is_break_time'] == 1) {\n if ($storeStoreBlackOutCheck['Store']['is_break1'] == 1) {\n if ($storeStoreBlackOutCheck['Store']['is_break2'] == 1) {\n if (($compairTime <= $StoreBreak1StartTime) && ($compairTime >= $StoreBreak1EndTime) ||($compairTime >= $StoreBreak1StartTime) && ($compairTime >= $StoreBreak1EndTime)||($compairTime <= $StoreBreak1StartTime) && ($compairTime <= $StoreBreak1EndTime)) { // compaire First Break time\n if (($compairTime <= $StoreBreak2StartTime) && ($compairTime >= $StoreBreak2EndTime) ||($compairTime >= $StoreBreak2StartTime) && ($compairTime >= $StoreBreak2EndTime)||($compairTime <= $StoreBreak2StartTime) && ($compairTime <= $StoreBreak2EndTime)) {// compaire Second Break time\n $result = TRUE;\n } else {\n $result = FALSE;\n }\n } else {\n $result = FALSE;\n }\n } else {\n $result = TRUE;\n }\n } else {\n $result = TRUE;\n }\n } else {\n $result = TRUE;\n }\n return $result;\n }", "private function calculateHappinessChange($knight1, $knight2)\n {\n $knight1Happiness = $knight1->getHappiness($knight2);\n $knight2Happiness = $knight2->getHappiness($knight1);\n\n return ($knight1Happiness + $knight2Happiness);\n }", "function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {\r\n // Write your code here\r\n $result = [];\r\n $count = 0;\r\n foreach ($apples as $_apple) {\r\n # code...\r\n $position = $a + $_apple;\r\n if(($position >= $s) && ($position <= $t)){\r\n $count++;\r\n }\r\n }\r\n $result[] = $count;\r\n \r\n $count = 0;\r\n foreach ($oranges as $_orange) {\r\n # code...\r\n $position = $b + $_orange;\r\n if(($position >= $s) && ($position <= $t)){\r\n $count++;\r\n }\r\n }\r\n $result[] = $count;\r\n return $result;\r\n}", "public function testCheckWinner()\n {\n $rawBoard = [2,2,1,0,1,1,2,2,2];\n $feedback = [0=>8, 1=>1, 2=>6, 3=>3, 4=>5, 5=>7, 6=>4, 7=>9, 8=>2];\n $formatedBoardRow = 0;\n foreach ($feedback as $index=>$value) {\n if ($index%3==0) {\n $formatedBoardRow++;\n }\n if ($rawBoard[$index] == 1) {\n $formatedBoard[$formatedBoardRow][$value] = \"X\";\n }\n if ($rawBoard[$index] == 2) {\n $formatedBoard[$formatedBoardRow][$value] = \"O\";\n }\n }\n $this->_board = $formatedBoard;\n\n $playerOneAnswers = [];\n $playerTwoAnswers = [];\n foreach ($this->_board as $boardIndex => $boardRow) {\n foreach ($boardRow as $boardRowIndex => $boardRowValue) {\n if ($boardRowValue == \"X\") {\n $this->_scorePlayerOne += $boardRowIndex;\n $playerOneAnswers[] = $boardRowIndex;\n }\n if ($boardRowValue == \"O\") {\n $this->_scorePlayerTwo += $boardRowIndex;\n $playerTwoAnswers[] = $boardRowIndex;\n }\n }\n }\n\n $whoHasWon = 0;\n if ($this->_scorePlayerOne == 15) {\n $whoHasWon = 1;\n }\n\n if ($this->_scorePlayerTwo == 15) {\n $whoHasWon = 2;\n }\n\n if ($whoHasWon == 0) {\n foreach ($this->_winningConditions as $winningCondition) {\n $playerOneMatchResult = array_intersect(\n $playerOneAnswers, $winningCondition\n );\n if (count($playerOneMatchResult) ==3) {\n $whoHasWon = 1;\n }\n\n $playerTwoMatchResult = array_intersect(\n $playerTwoAnswers, $winningCondition\n );\n if (count($playerTwoMatchResult) ==3) {\n $whoHasWon = 2;\n }\n }\n }\n\n //$this->assertGreaterThan($this->_maxScore, $this->_scorePlayerOne);\n //$this->assertEquals($this->_scorePlayerTwo, 10);\n\n $this->assertNotEquals(1, $whoHasWon);\n $this->assertEquals(2, $whoHasWon);\n }", "function check_availability($post = array()){\n\t\t$result = array('result' => \"failed\", 'message' => 'Error has been occured. Please try again later.');\n\t\tif(is_array($post) && sizeof($post) > 0){ //kena besar dari kosong, kalau kurang ada error.\n\t\t\t$end_time = date(\"H:i\", strtotime($post['booking_time'] . ' +'.$post['duration'] . ' hour')); //dapatkan end time\n\t\t\t$booking_date_time = date(\"Y-m-d\", strtotime(datepicker2mysql($post['booking_date']))) . ' ' . $post['booking_time'].':00'; //dapatkan date and time. eg: 2017-11-09 23:00\n\t\t\t$booking_date_time_end = date(\"Y-m-d H:i:s\", strtotime($booking_date_time . ' +'.$post['duration'] . ' hour')); //dapatkan end time sekali date. eg: 2017-11-10 01:00 (beza dia kat tarikh)\n\t\t\t\n\t\t\t/* 1. dia check start time dalam masa operation hour ke tak\n\t\t\t or \n\t\t\t 2. dia check end time in between 3am-8am\n\t\t\t 3. kalau true, keluar result\n\t\t\t */\n\t\t\tif((strtotime($post['booking_time']) >= strtotime(\"03:00\") && strtotime($post['booking_time']) < strtotime(\"08:00\")) ||\n\t\t\t(strtotime($end_time) > strtotime(\"03:00\") && strtotime($end_time) < strtotime(\"08:00\"))){\n\t\t\t\t$result['message'] = \"Court is unavailable. Operation hour is from 8:00 AM until 3:00 AM\";\n\t\t\t}\n\t\t\t//check booking date, kalau sebelum dari current time, keluar result.\n\t\t\telse if(strtotime($booking_date_time) < strtotime(date(\"Y-m-d H:i:s\"))){\n\t\t\t\t$result['message'] = \"The time is already passed. Please choose another time.\";\n\t\t\t}\n\t\t\t//ni baru check database\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t/* ini query nak check availability dalam database.\n\t\t\t\t 1. kalau masa start tu in between masa yang dah booking\n\t\t\t\t 0r\n\t\t\t\t 2. end time dia habis dalam masa orang yang dah booking\n\t\t\t\t 3. check status \n\t\t\t\t 4. check court id dulu baru 1, 2, 3\n\t\t\t\t*/\n\t\t\t\t$query_chk = $this->db->query(\"SELECT * FROM `ef_booking` \"\n\t\t\t\t\t\t\t\t\t\t\t. \"WHERE `court_id` = \" . $this->db->escape($post['court_id']) . \" \"\n\t\t\t\t\t\t\t\t\t\t\t. \"AND ((`booking_date_time` <= \" . $this->db->escape($booking_date_time) . \" AND `booking_date_time_end` > \" . $this->db->escape($booking_date_time) . \") \"\n\t\t\t\t\t\t\t\t\t\t\t. \"OR (`booking_date_time` < \" . $this->db->escape($booking_date_time_end) . \" AND `booking_date_time_end` >= \" . $this->db->escape($booking_date_time_end) . \")) \"\n\t\t\t\t\t\t\t\t\t\t\t. \"AND `status` != 'C'\");\n\t\t\t\t//kalau ada result, maksudnya dah reserved. \n\t\t\t\tif($query_chk->num_rows() > 0){\n\t\t\t\t\t$result['message'] = \"We're sorry, court is unavailable (Already reserved). Please check on another court/date/time.\";\n\t\t\t\t}\n\t\t\t\t//kumpul data\n\t\t\t\telse{\n\t\t\t\t\t$row_court = $this->court_m->get_single($post['court_id']);\n\t\t\t\t\t$rate_per_hour = 80.00;\n\t\t\t\t\t$result['booking_details'] = array(\n\t\t\t\t\t\t'booking_date_time_view' => date(\"d/m/Y g:i A\", strtotime($booking_date_time)),\n\t\t\t\t\t\t'booking_date_time_end_view' => date(\"d/m/Y g:i A\", strtotime($booking_date_time . ' +'.$post['duration'] . ' hour')),\n\t\t\t\t\t\t'booking_date_time' => date(\"Y-m-d H:i:s\", strtotime($booking_date_time)),\n\t\t\t\t\t\t'booking_date_time_end' => date(\"Y-m-d H:i:s\", strtotime($booking_date_time . ' +'.$post['duration'] . ' hour')),\n\t\t\t\t\t\t'date' => date(\"l, jS F Y\", strtotime($booking_date_time)),\n\t\t\t\t\t\t'start_end' => date(\"g:i A\", strtotime($booking_date_time)) . ' - ' . date(\"g:i A\", strtotime($booking_date_time_end)),\n\t\t\t\t\t\t'duration_view' => $post['duration'] . ' ' . ($post['duration'] > 1 ? 'Hours' : 'Hour'),\n\t\t\t\t\t\t'duration' => $post['duration'],\n\t\t\t\t\t\t'amount' => number_format($rate_per_hour * $post['duration'], 2, \".\", \"\"),\n\t\t\t\t\t\t'court_id' => $post['court_id'],\n\t\t\t\t\t\t'court_name' => isset($row_court) !== false ? $row_court->court_name : $post['court_id']\n\t\t\t\t\t);\n\t\t\t\t\t$result['encrypted_booking'] = encrypt_data($result['booking_details']);\n\t\t\t\t\t$result['result'] = \"success\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function hebrew_delay_2($yr) {\n\n\t\t$last = hebrew_delay_1($yr - 1);\n\t\t$present = hebrew_delay_1($yr);\n\t\t$next = hebrew_delay_1($yr + 1);\n\n\t\treturn ( (($next - $present) == 356) ? 2 :\n\t\t\t\t\t((($present - $last) == 382) ? 1 : 0) );\n\t}", "function timecheck ($time) {\n $min = 0;\n if($time->h >= 1) {\n $min += 60*$time->h;\n }\n $min += $time->i;\n if($min == 0) {\n return \"Passage en cours...\";\n } else {\n return $min.\" min\";\n }\n \n\n}", "public function test_validate_withdraw_count()\n {\n $withdraw = $this->obj->validate_count(2);\n $resp = $this->obj->validate_withdraw_count();\n if($withdraw < 3){\n $this->assertTrue($resp);\n }else{\n $this->assertFalse($resp);\n }\n }", "public function testTwoDisciplinesDiffAmtCourses()\n {\n $result = false;\n $student = new StudentProfile();\n $course = new Course();\n $course->set(\"department\",\"MUSI\");\n $student->set(\"courses\",$course);\n $course2 = new Course();\n $course2->set(\"department\",\"CPSC\");\n $student->set(\"courses\",$course2);\n $course3 = new Course();\n $course3->set(\"department\",\"CPSC\");\n $course3->set(\"courseTitle\",\"CPSC\");\n $student->set(\"courses\",$course3);\n $status = check24Discipline($student);\n if(count($status[\"reason\"]) == 2 && $status[\"result\"] == true)\n $result = true;\n $this->assertEquals(true, $result);\n }", "function checkDubs($numbers) {\n\t$x = 1;\n\t$d1 = (string)$numbers[0] . (string)$numbers[1];\n\t$d2 = (string)$numbers[2] . (string)$numbers[3];\n\t$d3 = (string)$numbers[4] . (string)$numbers[5];\n\t$d4 = (string)$numbers[6] . (string)$numbers[7];\n\tif ($d1 == $d2 && $d2 == $d3 && $d3 == $d4) {\n\t\t$x=$x+250;\n\t}\n\tif ($d1 == $d2 && $d2 == $d3) {\n\t\t$x=$x+100;\n\t}\n\tif ($d2 == $d3 && $d3 == $d4) {\n\t\t$x=$x+150;\n\t}\n\tif ($d1 == $d2) {\n\t\t$x=$x+100;\n\t}\n\tif ($d2 == $d3) {\n\t\t$x=$x+100;\n\t}\n\treturn $x;\n}", "public function testFindByStartTimes()\n {\n $bookingRepo = $this->em->getRepository('GrabagameBookingBundle:Booking');\n $clubRepo = $this->em->getRepository('GrabagameBookingBundle:Club');\n $courtRepo = $this->em->getRepository('GrabagameBookingBundle:Court');\n $club = $clubRepo->find(1); \n $court = $courtRepo->find(2);\n\n $expectedBookings = array();\n $expectedBookings[] = $bookingRepo->find(1);\n $expectedBookings[] = $bookingRepo->find(2);\n\n $startTimes = array(\n new \\DateTime('2012-05-03 06:00:00'),\n new \\DateTime('2012-05-03 10:00:00'),\n new \\DateTime('2012-05-04 09:00:00'),\n );\n\n $bookings = $bookingRepo->findByStartTimes($club, $court, $startTimes);\n\n $this->assertEquals($expectedBookings, $bookings);\n\n $expectedBookings = array();\n $startTimes = array(\n new \\DateTime('2012-05-01 06:00:00'),\n new \\DateTime('2012-05-08 10:00:00'),\n new \\DateTime('2012-05-09 09:00:00'),\n );\n\n $bookings = $bookingRepo->findByStartTimes($club, $court, $startTimes);\n\n $this->assertEquals($expectedBookings, $bookings);\n }", "function datediff($time1, $time2, $precision = 6)\n{\n if (!is_int($time1)) {\n $time1 = strtotime($time1);\n }\n if (!is_int($time2)) {\n $time2 = strtotime($time2);\n }\n\n // If time1 is bigger than time2\n // Then swap time1 and time2\n if ($time1 > $time2) {\n $ttime = $time1;\n $time1 = $time2;\n $time2 = $ttime;\n }\n\n // Set up intervals and diffs arrays\n $intervals = array('year','month','day','hour','minute','second');\n $diffs = array();\n\n // Loop thru all intervals\n foreach ($intervals as $interval) {\n // Create temp time from time1 and interval\n $ttime = strtotime('+1 ' . $interval, $time1);\n // Set initial values\n $add = 1;\n $looped = 0;\n // Loop until temp time is smaller than time2\n while ($time2 >= $ttime) {\n // Create new temp time from time1 and interval\n $add++;\n $ttime = strtotime(\"+\" . $add . \" \" . $interval, $time1);\n $looped++;\n }\n\n $time1 = strtotime(\"+\" . $looped . \" \" . $interval, $time1);\n $diffs[$interval] = $looped;\n }\n\n $count = 0;\n $times = array();\n // Loop thru all diffs\n foreach ($diffs as $interval => $value) {\n // Break if we have needed precission\n if ($count >= $precision) {\n break;\n }\n // Add value and interval\n // if value is bigger than 0\n if ($value >= 0) {\n // Add s if value is not 1\n if ($value != 1) {\n $interval .= \"s\";\n }\n // Add value and interval to times array\n //$times[] = $value . \" \" . $interval;\t// DEFAULT\n $times[] = $value;\n $count++;\n }\n }\n\n // Return string with times\n //return implode(\", \", $times);\t// DEFAULT\n return implode(\",\", $times);\n}", "public function testSportsDayAfter2000(): void\n {\n $year = $this->generateRandomYear(2001);\n\n // Some years the date has changed, so in this test we neeed to skip them.\n if (! in_array($year, [2020, 2021])) {\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"second monday of october {$year}\", new \\DateTimeZone(self::TIMEZONE))\n );\n }\n }", "public function test_it_can_expose_how_much_time_has_been_logged()\n {\n $timelog = factory(TimeLog::class, 2)->create([\n 'number_of_seconds' => 300,\n 'user_id' => $this->user->id,\n 'project_id' => $this->project->id\n ]);\n // The project should be able to tell us how much time has been logged\n $timelogs = timeDiffForHumans($this->project->timelogs->sum('number_of_seconds'));\n //\n $this->assertSame($this->project->time_logged, $timelogs);\n }", "public function testBookedSpacesBefore()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-12 15:00:00\";\n $end = \"2017-06-16 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(0, $total_places);\n }", "function dateDiff($time1, $time2, $precision = 6) {\n // If not numeric then convert texts to unix timestamps\n if (!is_int($time1)) {\n $time1 = strtotime($time1);\n }\n if (!is_int($time2)) {\n $time2 = strtotime($time2);\n }\n \n // If time1 is bigger than time2\n // Then swap time1 and time2\n if ($time1 > $time2) {\n $ttime = $time1;\n $time1 = $time2;\n $time2 = $ttime;\n }\n \n // Set up intervals and diffs arrays\n $intervals = array('year','month','day','hour','minute','second');\n $diffs = array();\n \n // Loop thru all intervals\n foreach ($intervals as $interval) {\n // Set default diff to 0\n $diffs[$interval] = 0;\n // Create temp time from time1 and interval\n $ttime = strtotime(\"+1 \" . $interval, $time1);\n // Loop until temp time is smaller than time2\n while ($time2 >= $ttime) {\n\t$time1 = $ttime;\n\t$diffs[$interval]++;\n\t// Create new temp time from time1 and interval\n\t$ttime = strtotime(\"+1 \" . $interval, $time1);\n }\n }\n \n $count = 0;\n $times = array();\n // Loop thru all diffs\n foreach ($diffs as $interval => $value) {\n // Break if we have needed precission\n if ($count >= $precision) {\n\tbreak;\n }\n // Add value and interval \n // if value is bigger than 0\n if ($value > 0) {\n\t// Add s if value is not 1\n\tif ($value != 1) {\n\t $interval .= \"s\";\n\t}\n\t// Add value and interval to times array\n\t$times[$interval] = $value;\n\t$count++;\n }\n }\n \n // print_r($times);\n // Return string with times\n // return implode(\", \", $times);\n\treturn $times;\n }", "function testTwoPenny() {\n\n //Arrange\n $test_CoinCount = new CoinCount;\n $input = \"2\";\n\n //Act\n $result = $test_CoinCount->makeChange($input);\n\n //Assert\n $this->assertEquals(\"two pennies\", $result);\n }", "public function countTimediff($beginTime,$endTime)\n\t{\n\t\t$begins=explode( \":\",$beginTime);\n\t\t$beginseconds=(int)($begins[0])*3600 + (int)($begins[1])*60 + (int)($begins[2]);\n\t\n\t\t$ends=explode(\":\",$endTime);\n\t\t$endseconds=(int)($ends[0])*3600 + (int)($ends[1])*60 + (int)($ends[2]);\n\t\n\t\treturn ($endseconds-$beginseconds);\n\t}", "function dateDiff($time1, $time2, $precision = 6) {\n if (!is_int($time1)) {\n\t$time1 = strtotime($time1);\n }\n if (!is_int($time2)) {\n $time2 = strtotime($time2);\n }\n // If time1 is bigger than time2\n // Then swap time1 and time2\n if ($time1 > $time2) {\n $ttime = $time1;\n $time1 = $time2;\n $time2 = $ttime;\n }\n \n // Set up intervals and diffs arrays\n $intervals = array('year','month','day','hour','minute','second');\n $diffs = array();\n \n // Loop thru all intervals\n foreach ($intervals as $interval) {\n // Set default diff to 0\n $diffs[$interval] = 0;\n // Create temp time from time1 and interval\n $ttime = strtotime(\"+1 \" . $interval, $time1);\n // Loop until temp time is smaller than time2\n while ($time2 >= $ttime) {\n\t$time1 = $ttime;\n\t$diffs[$interval]++;\n\t// Create new temp time from time1 and interval\n\t$ttime = strtotime(\"+1 \" . $interval, $time1);\n }\n }\n \n $count = 0;\n $times = array();\n // Loop thru all diffs\n foreach ($diffs as $interval => $value) {\n // Break if we have needed precission\n if ($count >= $precision) {\n\tbreak;\n }\n // Add value and interval \n // if value is bigger than 0\n if ($value > 0) {\n\t// Add s if value is not 1\n\tif ($value != 1) {\n\t $interval .= \"s\";\n\t}\n\t// Add value and interval to times array\n\t$times[] = $value . \" \" . $interval;\n\t$count++;\n }\n }\n \n // Return string with times\n return implode(\", \", $times);\n }", "public function eighth_hour_clockout($timesheet)\n\t{\n\t\t$sent_already = $this->CI->clockout_notifications_model->exists(\n\t\t\t$timesheet->user_id,\n\t\t\t'CLOCKOUT_FIRST_8HOUR_WARNING'\n\t\t);\n\n\t\tif ($sent_already) return false;\n\n\t\t// Send notification to managers\n\t\t$this->CI->cfpslack_library->notify(\n\t\t\tsprintf(\n\t\t\t\t$this->CI->config->item('eighth_hour_5min_clockout'),\n\t\t\t\t$this->CI->user_model->get_name($timesheet->user_id),\n\t\t\t\t$timesheet->workorder_id,\n\t\t\t\t$timesheet->id\n\t\t\t)\n\t\t);\n\n\t\t// SMS the user\n\t\t$this->CI->sms_library->send(\n\t\t\t$timesheet->user_id,\n\t\t\t$this->CI->config->item('eighth_hour_sms'),\n\t\t\t$timesheet->workorder_id\n\t\t);\n\n\t\t// Mark sending\n\t\t$this->CI->clockout_notifications_model->create(\n\t\t\t$timesheet->user_id,\n\t\t\t'CLOCKOUT_FIRST_8HOUR_WARNING',\n\t\t\t$timesheet->id\n\t\t);\n\n\t\treturn true;\n\t}", "function v1_check_db_timeframe2($name, $key, $code, $stime, $etime, $owners, $guest_table, $guest_code, &$error) {\n\tglobal $warnings;\n\t// Format times\n\tif (empty($stime)) {\n\t\t$stime=\"0000-00-00 00:00:00\";\n\t}\n\tif (empty($etime)) {\n\t\t$etime=\"9999-12-31 23:59:59\";\n\t}\n\t\n\t// If already in database, send a warning\n\t$rows=v1_get_id_times2($key, $code, $owners, $guest_table, $guest_code);\n\t\n\tforeach ($rows as $row) {\n\t\t// Check time\n\t\t// Format times\n\t\tif (empty($row[$key.'_stime'])) {\n\t\t\t$cmp_stime=\"0000-00-00 00:00:00\";\n\t\t}else {\n\t\t\t$cmp_stime=$row[$key.'_stime'];\n\t\t}\n\t\tif (empty($row[$key.'_etime'])) {\n\t\t\t$cmp_etime=\"9999-12-31 23:59:59\";\n\t\t}else {\n\t\t\t$cmp_etime=$row[$key.'_etime'];\n\t\t}\n\t\t\n\t\t// If start time is same, warning only\n\t\tif ($stime==$cmp_stime) {\n\t\t\t// Warning: already in database\n\t\t\t$warning_msg=$name.\" code=\\\"\".$code.\"\\\"\";\n\t\t\t// 1st owner\n\t\t\tif (!empty($owners[0])) {\n\t\t\t\t$warning_msg.=\" owner1=\\\"\".$owners[0]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t// 2nd owner\n\t\t\tif (!empty($owners[1])) {\n\t\t\t\t$warning_msg.=\" owner2=\\\"\".$owners[1]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t// 3rd owner\n\t\t\tif (!empty($owners[2])) {\n\t\t\t\t$warning_msg.=\" owner3=\\\"\".$owners[2]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t$warning_msg.=\" startTime=\\\"\".$stime.\"\\\"\";\n\t\t\tarray_push($warnings, $warning_msg);\n\t\t}\n\t\telse {\n\t\t\t// No error = only if end time strictly before compared start time OR start time strictly after compared end time\n\t\t\tif (strcmp($stime, $cmp_etime)<=0 && strcmp($etime, $cmp_stime)>=0) {\n\t\t\t\t$error=\"&lt;\".$name.\" code=\\\"\".$code.\"\\\" owner1=\\\"\".$owners[0]['code'].\"\\\"&gt;, the timeframe [\".$stime.\", \".$etime.\"] overlaps with existing data in database [\".$cmp_stime.\", \".$cmp_etime.\"]\";\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn TRUE;\n}", "function calculateMissed(){\n\t\treturn count(self::$groundTruth) - count(self::$rating);\n\t}", "public function testTwoDisciplinesDiffAmtSwap()\n {\n $result = false;\n $student = new StudentProfile();\n $course = new Course();\n $course->set(\"department\",\"CPSC\");\n $student->set(\"courses\",$course);\n $course2 = new Course();\n $course2->set(\"department\",\"MUSI\");\n $student->set(\"courses\",$course2);\n $course3 = new Course();\n $course3->set(\"department\",\"MUSI\");\n $course3->set(\"courseTitle\",\"CPSC\");\n $student->set(\"courses\",$course3);\n $status = check24Discipline($student);\n if(count($status[\"reason\"]) == 2 && $status[\"result\"] == true)\n $result = true;\n $this->assertEquals(true, $result);\n }", "private function checkNewCommondaty()\n {\n $date = new DateTime($this->addDate);\n $date->modify(self::TIME_INTERVAL);\n $date->format('Y-m-d H:i:s');\n $dateNow = new DateTime();\n $dateNow->format('Y-m-d H:i:s');\n\n if ($dateNow < $date) {\n return 1;\n }\n return 0;\n }", "public function fillTime($dayNum,$branch_id,$serv,$org_user,$date)\n { \n //Flag T Check If It Is ShiftNight\n $nightFlag=0;\n //Query To Get Working Hours Of Specific Day Of Specific Branch\n $sqlGetsch=\"SELECT * FROM work_hours WHERE branch_id=? AND day=?\";\n $values=array($branch_id,$dayNum);\n $sch=$this->getInfo($sqlGetsch,$values);\n \n //Query To Get The Average Time Of Service\n $sqlGetServiceID=\"SELECT app_time_avg FROM service WHERE service_id=?\";\n $values=array($serv);\n $getAvg=$this->getInfo($sqlGetServiceID,$values);\n $avgTime=$getAvg[0]['app_time_avg'];\n $avg='+'.$avgTime.' minutes';\n \n //Check If It Is Night Shifts\n if($sch[0]['startA']>\"12:00\" && $sch[0]['endB']>=\"00:00\" && $sch[0]['endB']<=\"12:00\")\n {\n $nightFlag=1;\n $freeTime1 = $this->create_time_range($sch[0]['startA'], \"23:59\" , $avg);\n //To Add Avg And Avoid Duplication Cell\n $time = strtotime(end($freeTime1));\n $avoidTime = date(\"H:i\", strtotime($avg, $time));\n $freeTime2 = $this->create_time_range($avoidTime, $sch[0]['endB'] , $avg);\n $freeTime = array_merge($freeTime1, $freeTime2);\n }\n else // So It Is Morning Shifts\n {\n $freeTime = $this->create_time_range($sch[0]['startA'], $sch[0]['endB'], $avg);\n }\n \n $minTime='-'.$avgTime.' minutes'; //To Get Out The Dates That Are Less Than the Average Appointment Time\n \n //loop To Take out all The Break Time \n for($i=0;$i<count($freeTime);$i++)\n {\n if(isset($freeTime[$i]))//If this index exists\n {\n $t = date(\"H:i\",strtotime($freeTime[$i]));\n $time = strtotime($sch[0]['endA']);\n $endA = date(\"H:i\", strtotime($minTime, $time));\n $startB = date(\"H:i\",strtotime($sch[0]['startB']));\n if($startB==\"00:00\")\n $startB=\"23:59\";\n $time = strtotime($sch[0]['endB']);\n $endB = date(\"H:i\", strtotime($minTime, $time));\n if($t>=$endA && $t<$startB)\n unset($freeTime[$i]);\n }\n }\n //Query To Get All The Appointment Of Specific Day Of Specific Branch With Specific Service\n $sqlGetAllApp=\"SELECT appointment_time FROM appointment WHERE branch_id=? AND service_id=? AND appointment_date=?\";\n $values=array($branch_id,$serv,$date);\n $apps=$this->getInfo($sqlGetAllApp,$values);\n\n\n //loop To Take out all The Exists Time \n for($i=0;$i<count($freeTime);$i++)\n {\n if(isset($freeTime[$i]))//If this index exists\n {\n $t = date(\"H:i\",strtotime($freeTime[$i]));\n foreach($apps as $p)\n {\n $time = date(\"H:i\",strtotime($p['appointment_time']));\n if($t==$time)\n unset($freeTime[$i]);\n }\n }\n }\n //IF Its NightShift So We Remove ALl The Queues In The Next Day\n if($nightFlag==1)\n {\n $newDate=date($date);\n $newDate++;\n //Query To Get All The Appointment Of Specific Day Of Specific Branch With Specific Service\n $sqlGetAllApp=\"SELECT appointment_time FROM appointment WHERE branch_id=? AND service_id=? AND appointment_date=?\";\n $values=array($branch_id,$serv,$newDate);\n $apps=$this->getInfo($sqlGetAllApp,$values);\n\n\n //loop To Take out all The Exists Time \n for($i=0;$i<count($freeTime);$i++)\n {\n if(isset($freeTime[$i]))//If this index exists\n {\n $t = date(\"H:i\",strtotime($freeTime[$i]));\n foreach($apps as $p)\n {\n $time = date(\"H:i\",strtotime($p['appointment_time']));\n if($t==$time)\n unset($freeTime[$i]);\n }\n }\n }\n }\n \n //Paste The Selection List Code Of Time Except The Last One\n foreach($freeTime as $time)\n {\n if($time!=end($freeTime))//Except the ending time\n {\n $startAp = date(\"H:i\",strtotime($time));\n ?> \n <option value=\"<?php echo $startAp; ?>\"><?php echo $startAp; ?></option>\n <?php\n \n }\n }\n }", "public function testCheckNoWinner()\n {\n $this->_board[0][8] = \"O\";\n $this->_board[0][1] = \"O\";\n $this->_board[0][6] = \"X\";\n $this->_board[1][5] = \"X\";\n $this->_board[1][7] = \"X\";\n $this->_board[2][9] = \"O\";\n $this->_board[2][2] = \"O\";\n\n $playerOneAnswers = [];\n $playerTwoAnswers = [];\n foreach ($this->_board as $boardIndex => $boardRow) {\n foreach ($boardRow as $boardRowIndex => $boardRowValue) {\n if ($boardRowValue == \"X\") {\n $this->_scorePlayerOne += $boardRowIndex;\n $playerOneAnswers[] = $boardRowIndex;\n }\n if ($boardRowValue == \"O\") {\n $this->_scorePlayerTwo += $boardRowIndex;\n $playerTwoAnswers[] = $boardRowIndex;\n }\n }\n }\n\n $whoHasWon = 0;\n if ($this->_scorePlayerOne == 15) {\n $whoHasWon = 1;\n }\n\n if ($this->_scorePlayerTwo == 15) {\n $whoHasWon = 2;\n }\n\n if ($whoHasWon == 0) {\n foreach ($this->_winningConditions as $winningCondition) {\n\n $playerOneMatchResult = array_intersect(\n $playerOneAnswers, $winningCondition\n );\n if (count($playerOneMatchResult) ==3) {\n $whoHasWon = 1;\n }\n\n $playerTwoMatchResult = array_intersect(\n $playerTwoAnswers, $winningCondition\n );\n if (count($playerTwoMatchResult) ==3) {\n $whoHasWon = 2;\n }\n }\n }\n\n $this->assertNotEquals(1, $whoHasWon);\n $this->assertNotEquals(2, $whoHasWon);\n }", "function Atv_boolPresensiTimeAllowed($day, $time_start, $time_end): bool\n{\n $result = false;\n // jika 'all' maka hanya boleh hari senin sampai jumat, atau hari yang ditentukan diluar itu\n if ((($day == Atv_setDayKegiatan('all')) && (Carbon_IsWorkDayNow())) || ($day == Carbon_DBDayNumOfWeek()))\n if ((Carbon_AnyTimeNow() >= $time_start) && (Carbon_AnyTimeNow() <= $time_end)) $result = true;\n return $result;\n}", "function calculateTimeDiff($time1, $time2) {\n\t\t$time1 = new DateTime($time1);\n\t\t$time2 = new DateTime($time2);\n\t\t$interval = $time1->diff($time2);\n\t\t$h = intval($interval->format('%h')*60);\n\t\t$m = intval($interval->format('%i'));\n\t\treturn $h + $m;\n\t}", "public function test_it_can_tell_you_how_much_it_is_worth()\n {\n $user = factory(User::class)->create();\n // Who has set an hourly rate\n $settings = factory(UserSetting::class)->create(['user_id' => $user->id, 'hourly_rate' => 35]);\n // Given we have a project\n $project = factory(Project::class)->create(['user_id' => $user->id, 'total_seconds' => 7200]);\n\n // Get total Number of Seconds in Project\n $totalSeconds = $project->total_seconds;\n // Convert to hours\n $hours = floor($totalSeconds / 3600);\n // Multiply the users hourly rate by the number of hours to get total cost\n $total = $user->settings->hourly_rate * $hours;\n\n // They should be the same\n $this->assertSame($total, $project->total_cost_quoted);\n }", "function late_ride(int $n): int {\n // Coding and coding ... \n return array_sum(str_split(gmdate(\"H:i\", $n*60)));\n}", "function rate_consecutive(&$prev_heat, &$next_heat) {\n $result = 0;\n for ($lane = 0; $lane < count($next_heat); ++$lane) {\n for ($prev_lane = 0; $prev_lane < count($prev_heat); ++$prev_lane) {\n if ($prev_heat[$prev_lane] == $next_heat[$lane]) {\n $result += CONSECUTIVE_WEIGHT;\n if ($lane == $prev_lane) {\n $result += REPEAT_WEIGHT;\n }\n }\n }\n }\n return $result;\n}", "public function calculateTotalBreakfast()\n\t{\n\t\t$result = 0;\n\t\t$passengers = $this->getPassengers();\n\n\t\tif( count($passengers) )\n\t\t{\n\t\t\tforeach ($passengers as $passenger)\n\t\t\t{\n\t\t\t\tif( (int)$passenger->status < 3 )\n\t\t\t\t{\n\t\t\t\t\tif($passenger->breakfast)\n\t\t\t\t\t{\n\t\t\t\t\t\t$result++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "function get_n_time_slots()\n{\n global $morningstarts, $morningstarts_minutes, $eveningends, $eveningends_minutes;\n global $resolution;\n \n $start_first = (($morningstarts * 60) + $morningstarts_minutes) * 60; // seconds\n $end_last = ((($eveningends * 60) + $eveningends_minutes) * 60) + $resolution; // seconds\n $end_last = $end_last % SECONDS_PER_DAY;\n if (day_past_midnight())\n {\n $end_last += SECONDS_PER_DAY;\n }\n $n_slots = ($end_last - $start_first)/$resolution;\n\n return $n_slots;\n}", "function asrt( $a, $b ) {\n\tif ($a === $b) {\n\t\tglobal $tests;\n\t\t$tests++;\n\t\tprint( \"[\".$tests.\"]\" );\n\t}\n\telse {\n\t\tprinttext(\"FAILED TEST: EXPECTED $b BUT GOT: $a \");\n\t\tfail();\n\t}\n}", "function compete2($a,$b){\n $p = intval(100 * getWinProb($a['elo']-$b['elo']));\n $expected = ($a['elo']>=$b['elo']) ? $a['name'] : $b['name'];\n $percent = ($a['elo']>=$b['elo']) ? $p.'%' : (100-$p).'%';\n $tempo = round(($a['tempo']+$b['tempo'])/2);\n $a_score = 0;\n $b_score = 0;\n echo sprintf(\"Now Playing: %s (%s) vs. %s (%s) \\n\", $a['name'], $a['elo'], $b['name'], $b['elo']);\n echo sprintf(\"Expected winner: %s (%s)\\n\", $expected, $percent);\n \n //echo sprintf(\"------------\\n\");\n //echo sprintf(\"| Game Log |\\n\");\n //echo sprintf(\"------------\\n\");\n //echo sprintf(\"Playing %s possessions\\n\\n\",$tempo);\n for($i=0;$i<$tempo;$i++){\n $a_points = playPosession($a['off'],$b['def']);\n $a_score += $a_points;\n $b_points = playPosession($b['off'],$a['def']);\n $b_score += $b_points;\n //echo sprintf(\"Possession #%s\\n\",$i);\n //echo sprintf(\"%s scored %s points\\n\",$a['name'],$a_points);\n //echo sprintf(\"%s scored %s points\\n\",$b['name'],$b_points);\n //echo sprintf(\"Score is %s %s-%s %s\\n\\n\", $a['name'], $a_score, $b_score, $b['name']);\n }\n while($a_score==$b_score){\n $ot = round($tempo/8);\n //echo sprintf(\"Overtime\\n\");\n //echo sprintf(\"Playing %s possessions\\n\", $ot);\n for($i=0;$i<$ot;$i++){\n $a_points = playPosession($a['off'],$b['def']);\n $a_score += $a_points;\n $b_points = playPosession($b['off'],$a['def']);\n $b_score += $b_points;\n //echo sprintf(\"Possession #%s\\n\",$i);\n //echo sprintf(\"%s scored %s points\\n\",$a['name'],$a_points);\n //echo sprintf(\"%s scored %s points\\n\",$b['name'],$b_points);\n //echo sprintf(\"Score is %s %s-%s %s\\n\\n\", $a['name'], $a_score, $b_score, $b['name']);\n }\n }\n $winner = ($a_score>$b_score) ? $a['name'] : $b['name'];\n $a_ppp = number_format($a_score/$tempo,3);\n $b_ppp = number_format($b_score/$tempo,3);\n echo sprintf(\"Final score is %s-%s, %s wins\\n\\n\", max($a_score,$b_score), min($a_score,$b_score), $winner);\n //echo sprintf(\"Points per Possession: %s: %s %s: %s\\n\\n\", $a['name'], $a_ppp, $b['name'], $b_ppp);\n return ($a_score>$b_score) ? $a : $b;\n}", "public function test4BallsInARow($player)\n {\n $match = $this->getNewMatch();\n\n for ($i = 0 ; $i <4 ; $i++) {\n $match->score($player);\n }\n\n $this->assertEquals(1, $match->getWonGame($player));\n }", "public function callTime($timestamp) {\n\t\t\n\t\t\t$_date['h'] = (int)date(\"G\",$timestamp);\n\t\t\t$_date['m'] = (int)date(\"i\",$timestamp);\n\t\t\t\n\t\t\t$_dayStart = 6;\t\t\t\t\t// Start the day at 6am\n\t\t\t$_morningEnd = 13;\t\t\t\t// Morning ends at 13:00\n\t\t\t$_afternoonEnd = 17;\t\t\t// Afternoon ends at 17:00\n\t\t\t\n\t\t\tif ($_date['h'] < $_morningEnd AND $_date['h'] >= $_dayStart) {\n\t\t\t\t// Time is morning\n\t\t\t\t$_returnTime = 1;\n\t\t\t} else if ($_date['h'] >= $_morningEnd AND $_date['h'] < $_afternoonEnd) {\n\t\t\t\t// Time is Afternoon\n\t\t\t\t$_returnTime = 2;\n\t\t\t} else {\n\t\t\t\t// Time should be evening cos we don't work before 6am\n\t\t\t\t$_returnTime = 3;\n\t\t\t}\n\n\t\t\treturn $_returnTime;\n\t\t}", "public function testTime() {\n $time = mktime(16, 35, 0, 2, 26, 1988);\n\n $this->assertEquals('04:35PM', Format::time($time));\n }", "public function checkTimeEnd(): bool;", "public function hasBepro3Time(){\n return $this->_has(5);\n }", "function notBusy($user,$s,$d,$l)\n {\n $date = $d->format('Y-m-d');\n \n // query database for the stored busy times of the user\n $events = query(\"SELECT start_date, end_date, busy_start_time, busy_end_time FROM requests WHERE `request_id` =? AND id=? AND start_date =?\", $_SESSION[\"request_id\"], $user,$date);\n \n foreach ($events as $event)\n {\n $end = clone $s;\n \n // calculate end time\n $end->add(new DateInterval('PT' . $l . 'H'));\n $bst = new DateTime($event[\"busy_start_time\"]);\n $bse = new DateTime($event[\"busy_end_time\"]);\n \n // checks if busy times conflict with the time interval currently being checked\n if ($bst <= $s && $bse > $s)\n {\n return false;\n }\n else if ($bst >= $s && $bst < $end)\n return false;\n }\n return true; \n }", "public function testSportsDayIn2021(): void\n {\n $year = 2021;\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-7-23\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "public function testCheckWinner()\n {\n $gamestate = $this->game->getGamestate();\n $this->game->holdHand();\n $this->assertNull($gamestate[\"hasWon\"]);\n\n $gamestate[\"active\"]->addPoints(100);\n $exp = $gamestate[\"active\"];\n $this->game->holdHand();\n\n $gamestate = $this->game->getGamestate();\n $this->assertEquals($exp, $gamestate[\"hasWon\"]);\n }", "public function compare($t1, $t2)\n {\n // Zwangsabstieg prüfen\n if ($t1['static_position']) {\n return 1;\n }\n if ($t2['static_position']) {\n return -1;\n }\n\n // Zuerst die Punkte\n if ($t1['points'] == $t2['points']) {\n // tx_rnbase_util_Debug::debug($t1,'compare'.__LINE__);\n // Die gewonnenen Spiele prüfen\n if ($t1['winCount'] == $t2['winCount']) {\n // Jetzt den Satzquotient prüfen\n $t1setquot = $t1['sets_quot'];\n $t2setquot = $t2['sets_quot'];\n if ($t1setquot == $t2setquot) {\n // Jetzt der Ballquotient\n $t1balls = $t1['balls_quot'];\n $t2balls = $t2['balls_quot'];\n if ($t1balls == $t2balls) {\n // Und jetzt der direkte Vergleich\n $baseData = Util::prepareH2H($this->_teamData, $t1, $t2);\n $t1vst2 = $baseData['t1vst2'];\n $t2vst1 = $baseData['t2vst1'];\n $t1H2HPoints = $baseData['t1H2HPoints'];\n $t2H2HPoints = $baseData['t2H2HPoints'];\n if ($t1H2HPoints == $t2H2HPoints) {\n // dann eben zuerst die Satzdifferenz der 2 Spiele prüfen (Hin- und Rückspiel)\n $t1H2HDiff = 0 + $t1vst2[0] + $t2vst1[1] - $t1vst2[1] - $t2vst1[0];\n $t2H2HDiff = 0 + $t1vst2[1] + $t2vst1[0] - $t1vst2[0] - $t2vst1[1];\n if ($t1H2HDiff == $t2H2HDiff) {\n return 0; // Gleichstand. Entscheidungsspiel wird nicht beachtet\n }\n\n return $t1H2HDiff > $t2H2HDiff ? -1 : 1;\n }\n\n return $t1H2HPoints > $t2H2HPoints ? -1 : 1;\n }\n\n return $t1balls > $t2balls ? -1 : 1;\n }\n\n return $t1setquot > $t2setquot ? -1 : 1;\n }\n\n return $t1['winCount'] > $t2['winCount'] ? -1 : 1;\n }\n\n return $t1['points'] > $t2['points'] ? -1 : 1;\n }", "public function testFifthTuesdayProblem()\n {\n $this->parse(\n 'FREQ=MONTHLY;INTERVAL=1;UNTIL=20071030T035959Z;BYDAY=5TU',\n '2007-10-04 14:46:42',\n [\n '2007-10-04 14:46:42',\n ],\n 'monthly', null, 1, new DateTime('2007-10-30 03:59:59')\n );\n }", "function check_book_available($hour, $begin, $end, $check){\n if($check == \"begin_check\"){\n if( $hour < $begin || $hour >= $end ){\n return true;\n }\n else{\n return false;\n }\n }\n /* CHECK END SELECTION */\n else if($check == \"end_check\"){\n if( $hour <= $begin || $hour > $end ){\n return true;\n }\n else{\n return false;\n }\n }\n}", "function logintimelist1($time1,$time2)\r\n\t{\r\n\t\tif($time1==0 or $time2==0)\r\n\t\t{\r\n\t\t\t$q=array();\r\n\t\t}else{\r\n\t\t\t$time1=strtotime($time1.\" 00:00:00\");\r\n\t\t\t$time2=strtotime($time2.\" 23:59:59\");\r\n\t\t\t$q=array(\r\n\t\t\t\t\"downtime\"=>array('$gt'=>$time1,'$lt'=>$time2),\r\n\t\t\t\t);\r\n\t\t}\r\n//\t\tprint_r( $q);\r\n\t\t$user_online_count=$this->phpmongo->find(\"user_info\",$q,array(\"downtime\"=>1));\r\n\t\t$tmp=array();\r\n\t\tforeach($user_online_count as $value)\r\n\t\t{\r\n\t\t\t$t=date(\"Y-m-d\",$value[\"downtime\"]);\r\n\t\t\tif(isset($tmp[$t])==false)$tmp[$t]=0;\r\n\t\t\t$tmp[$t]+=1;\r\n\t\t}\r\n//\t\tprint_r($tmp);\r\n\t\treturn $tmp;\r\n\t}", "public function hours_in_closed_timesheets($timesheets)\n\t{\n\t\tif (!is_array($timesheets)) $timesheets = [$timesheets];\n\n\t\t$hours = 0;\n\t\t$start = null;\n\t\t$stop = null;\n\n\t\tforeach ($timesheets as $timesheet) {\n\n\t\t\t// Check if closed\n\t\t\tif (!$timesheet->stop_hour) continue;\n\t\t\tif ($timesheet->lunch_time) continue;\n\n\t\t\t$start = Carbon::createFromFormat(\n\t\t\t\t'Y-m-d h:i A',\n\t\t\t\t$timesheet->date . ' ' . $timesheet->start_hour . ':' .$timesheet->start_min . ' ' . $timesheet->start_pmam\n\t\t\t);\n\n\t\t\t$stop = Carbon::createFromFormat(\n\t\t\t\t'Y-m-d h:i A',\n\t\t\t\t$timesheet->date . ' ' . $timesheet->stop_hour . ':' .$timesheet->stop_min . ' ' . $timesheet->stop_pmam\n\t\t\t);\n\n\t\t\t$hours += $start->diffInMinutes($stop) / 60;\n\t\t}\n\n\t\treturn number_format( (float)$hours, 2, '.', '');\n\t}", "private function beenSent($hash, $time)\n {\n foreach($this->errors as $key => $val)\n {\n if($key == $hash && $val + $time > time())\n return TRUE;\n }\n return FALSE;\n }", "function dateDiff($time1, $time2, $precision = 6) {\n if (!is_int($time1)) {\n $time1 = strtotime($time1);\n }\n if (!is_int($time2)) {\n $time2 = strtotime($time2);\n }\n\n // If time1 is bigger than time2\n // Then swap time1 and time2\n if ($time1 > $time2) {\n $ttime = $time1;\n $time1 = $time2;\n $time2 = $ttime;\n }\n\n // Set up intervals and diffs arrays\n $intervals = array('year', 'month', 'day', 'hour', 'minute', 'second');\n $diffs = array();\n\n // Loop thru all intervals\n foreach ($intervals as $interval) {\n // Create temp time from time1 and interval\n $ttime = strtotime('+1 ' . $interval, $time1);\n // Set initial values\n $add = 1;\n $looped = 0;\n // Loop until temp time is smaller than time2\n while ($time2 >= $ttime) {\n // Create new temp time from time1 and interval\n $add++;\n $ttime = strtotime(\"+\" . $add . \" \" . $interval, $time1);\n $looped++;\n }\n\n $time1 = strtotime(\"+\" . $looped . \" \" . $interval, $time1);\n $diffs[$interval] = $looped;\n }\n\n $count = 0;\n $times = array();\n // Loop thru all diffs\n foreach ($diffs as $interval => $value) {\n // Break if we have needed precission\n if ($count >= $precision) {\n break;\n }\n // Add value and interval \n // if value is bigger than 0\n if ($value > 0) {\n // Add s if value is not 1\n if ($value != 1) {\n $interval .= \"s\";\n }\n // Add value and interval to times array\n $times[] = $value . \" \" . $interval;\n $count++;\n }\n }\n\n // Return string with times\n return implode(\", \", $times);\n}", "public function checkBuyRSIByTimes($candles, $times = 5)\n {\n $current = null;\n for ($times; $times > 0; $times--) {\n $current = $current ?? array_pop($candles);\n $previous = array_pop($candles);\n if ($previous > $current) {\n return 0;\n }\n $current = $previous;\n }\n\n return 1;\n }", "function finish_match($buy_did, $sell_did)\n {\n }", "function testIn60($num)\n\t{\n\t\treturn $this->testInN($num,60);\n\t}", "function dbtimecmp($a, $b)\n {\n return ( (float)$a['time']==(float)$b['time'] ? 0 : ((float)$a['time']>(float)$b['time'] ? -1 : 1) );\n }", "private function compareTimeResults(TimeResult $a, TimeResult $b)\n {\n return $a->getDate() > $b->getDate() ? -1 : 1;\n }", "private function isEndOfDay()\n {\n // > 10:00pm\n return (int) $this->block->confirmed_at->format('H') >= 22;\n }", "function get_time_difference( $time1, $time2 ) {\n\t$time1 = (int)$time1;\n\t$time2 = (int)$time2;\n\t$result = array(\n\t\t'days' => 0,\n\t\t'hours' => 0,\n\t\t'minutes' => 0,\n\t\t'seconds' => 0\n\t);\n\tif( $time1 == 0 || $time2 == 0) return $result;\n\t\n\tif($time2 > $time1) {\n\t\t$start = date(\"H:i\",$time1);\n\t\t$end = date(\"H:i\",$time2);\n\t} else {\n\t\t$start = date(\"H:i\",$time2);\n\t\t$end = date(\"H:i\",$time1);\t\n\t}\t\n\t\n\t$uts['start'] = $time2;\n\t$uts['end'] = $time1;\n\tif( $uts['start']!==-1 && $uts['end']!==-1 ) {\n\t\tif( $uts['end'] >= $uts['start'] ) {\n\t\t\n\t\t\t$diff = $uts['end'] - $uts['start'];\n\t\t\tif( $days=intval((floor($diff/86400))) ) $diff = $diff % 86400;\n\t\t\tif( $hours=intval((floor($diff/3600))) ) $diff = $diff % 3600;\n\t\t\tif( $minutes=intval((floor($diff/60))) ) $diff = $diff % 60;\n\t\t\t$diff = intval( $diff ); \n\t\t\tif($days > 0) $hours += $days*24;\n\t\t\treturn( array('days'=>str_pad($days,2,0, STR_PAD_LEFT), 'hours'=>str_pad($hours,2,0, STR_PAD_LEFT), 'minutes'=>str_pad($minutes,2,0, STR_PAD_LEFT), 'seconds'=>str_pad($diff,2,0, STR_PAD_LEFT)) );\n\t\t}\t\n\t}\t\n\treturn $result;\n}", "private function compareTeams($t1, $t2)\n {\n // Zwangsabstieg prüfen\n if ($t1['last_place']) {\n return 1;\n }\n if ($t2['last_place']) {\n return -1;\n }\n\n if ($t1['points'] == $t2['points']) {\n // Im 2-Punkte-Modus sind die Minuspunkte ausschlaggebend\n // da sie im 3-PM immer identisch sein sollten, können wir immer testen\n if ($t1['points2'] == $t2['points2']) {\n // Jetzt die Tordifferenz prüfen\n $t1diff = $t1['goals1'] - $t1['goals2'];\n $t2diff = $t2['goals1'] - $t2['goals2'];\n if ($t1diff == $t2diff) {\n // Jetzt zählen die mehr geschossenen Tore\n if ($t1['goals1'] == $t2['goals1']) {\n // #49: Und jetzt noch die Anzahl Spiele werten\n if ($t1['matchCount'] == $t2['matchCount']) {\n return 0; // Punkt und Torgleich\n }\n\n return $t1['matchCount'] > $t2['matchCount'];\n }\n\n return $t1['goals1'] > $t2['goals1'] ? -1 : 1;\n }\n\n return $t1diff > $t2diff ? -1 : 1;\n }\n // Bei den Minuspunkten ist weniger mehr\n return $t1['points2'] < $t2['points2'] ? -1 : 1;\n }\n\n return $t1['points'] > $t2['points'] ? -1 : 1;\n }", "public function test_validate_deposit_count()\n {\n $deposit = $this->obj->validate_count(1);\n $resp = $this->obj->validate_deposit_count();\n if($deposit < 4){\n $this->assertTrue($resp);\n }else{\n $this->assertFalse($resp);\n }\n }", "public function testUpdateTimesheet()\n {\n }", "public function calculateTimePerDay($startTime, $endTime){\n\n $start_time = strtotime(Config::get('mycnf.start_time'));//8:30\n $end_time = strtotime(Config::get('mycnf.end_time')); //18\n $sleep_AM = strtotime(Config::get('mycnf.sleep_AM')); //11:30\n $start_PM = strtotime(Config::get('mycnf.start_PM')); //13\n\n if ($startTime < $sleep_AM) {\n\n if ($endTime < $sleep_AM) {\n $timePerDay = $endTime - $startTime;\n\n }elseif ($endTime > $sleep_AM && $endTime < $start_PM) {\n $timePerDay = $sleep_AM - $startTime;\n\n }elseif ($endTime > $start_PM) {\n $timePerDay = ($sleep_AM - $startTime) + ($endTime - $start_PM);\n }\n\n }elseif ($startTime >= $sleep_AM && $startTime <= $start_PM) {\n\n if ($endTime > $sleep_AM && $endTime < $start_PM ) {\n $timePerDay = 0;\n\n }elseif ($endTime > $start_PM) {\n $timePerDay = $endTime - $start_PM;\n\n }\n\n }elseif ($startTime > $start_PM){\n $timePerDay = $endTime - $startTime;\n\n }\n\n return $timePerDay;\n }", "function extra_calc_scenario_two($base, $goal) {\n\tif ($base >= $goal) {\n\t\treturn 0;\n\t} else {\n\t\t$ce_db = access_db();\n\n\t\t$diff = $goal - $base;\n\t\t$curr_data = $_COOKIE['ce_info'];\n\t\t$pieces = explode(\"|\" , $curr_data);\n\t\t$account_id = $pieces[0];\n\t\t$account_name = $pieces[1];\n\t\t$game_id = $pieces[2];\n\t\t$period_id = $pieces[3];\n\t\t$company_id = $pieces[4];\n\t\t$plant_id = $pieces[5];\n\t\t$game_start_date = $pieces[6];\n\t\t$game_period_id = $pieces[7];\n\n\t\t$query = \"SELECT * FROM ce_game WHERE game_id = $game_id AND game_period_id = $game_period_id\";\n\t\t$result = $ce_db->get_results($query, ARRAY_A);\n\t\t$carbon_price = $result[\"carbon_price_last_perd\"];\n\n\n\t}\n}", "public function testSportsDayIn2020(): void\n {\n $year = 2020;\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-7-24\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "public function testGetTimelogsForAccount()\n {\n\n }", "public function calculateHappiness()\n {\n if ($this->seating->count() > 1) {\n $this->seating->rewind();\n\n for ($this->seating->rewind(); $this->seating->valid(); $this->seating->next()) {\n $currKnight = $this->seating->current();\n\n if (($this->seating->key() + 1) < $this->seating->count()) {\n $nextKnight = $this->seating->offsetGet($this->seating->key() + 1);\n $this->tableHappiness += $this->calculateHappinessChange($currKnight, $nextKnight);\n } else {\n $this->seating->rewind();\n $nextKnight = $this->seating->current();\n $this->tableHappiness += $this->calculateHappinessChange($currKnight, $nextKnight);\n break;\n }\n }\n\n }\n\n return $this->tableHappiness;\n }", "function time_diference( $time_a, $time_b, $format = 'array' ) {\n\t$timediff = $time_a - $time_b;\n\n\tswitch ( strtolower( $format ) ) {\n\n\t\tcase 'mysql' :\n\t\t\treturn date( 'Y-m-d H:i:s', $timediff );\n\t\t\tbreak;\n\n\t\tcase 'timestamp' :\n\t\t\treturn abs( $timediff );\n\t\t\tbreak;\n\n\t\tcase 'array' :\n\t\t\treturn (object) array(\n\t\t\t'positive' => ( abs( $timediff ) == $timediff ? true : false ),\n\t\t\t'days' => abs( (int) ( $timediff / ( 24*60*60 ) ) ),\n\t\t\t'hours' => date( 'H', $timediff ),\n\t\t\t'minutes' => date( 'i', $timediff ),\n\t\t\t'seconds' => date( 's', $timediff ),\n\t\t\t);\n\t\t\tbreak;\n\n\t}\n\n\treturn false;\n\n}", "private static function start_of_count_down($date1,$date2){\n $stat=0;\n \n for($i=0;$i<3;$i++){\n if($date2[$i]>$date1[$i]){\n $stat=1;\n break;\n }\n }\n return $stat;\n }" ]
[ "0.82436097", "0.8172033", "0.8000799", "0.76401615", "0.5961563", "0.5766871", "0.56648844", "0.5489633", "0.5463349", "0.5453981", "0.5389772", "0.53592867", "0.53119165", "0.5286622", "0.5282793", "0.52794605", "0.5277949", "0.5262326", "0.5261698", "0.51985437", "0.5196501", "0.5176642", "0.51598436", "0.51494575", "0.5143492", "0.51381993", "0.5128406", "0.51233906", "0.50627446", "0.50592154", "0.50545686", "0.5042162", "0.50323856", "0.5024361", "0.5019884", "0.50175834", "0.5017365", "0.50132865", "0.49912637", "0.4979808", "0.49485505", "0.49411336", "0.4926374", "0.49158454", "0.49153996", "0.48934078", "0.48913223", "0.48897505", "0.48807636", "0.48781493", "0.48766616", "0.48764873", "0.4874754", "0.4872519", "0.48680803", "0.48644093", "0.48623306", "0.48623082", "0.48616228", "0.4856931", "0.48556364", "0.48533216", "0.48453087", "0.48298028", "0.4827911", "0.48235375", "0.48141637", "0.4806446", "0.48025072", "0.48011205", "0.47857562", "0.4785629", "0.47760698", "0.47759396", "0.47681123", "0.476769", "0.476763", "0.47631064", "0.47630996", "0.47624248", "0.476108", "0.47552314", "0.4746229", "0.47458822", "0.4739157", "0.4738379", "0.47379583", "0.4734741", "0.47339028", "0.47308886", "0.47250506", "0.47213665", "0.472024", "0.47195703", "0.47188616", "0.47163346", "0.47145683", "0.47116598", "0.47101778", "0.4707925" ]
0.8255216
0
Set the metabox to always display, even when it has no fields.
public function setAlwaysDisplay( $ad = true ) { $this->_alwaysDisplay = $ad; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "public function disableHideMetaboxes()\n\t\t{\n\t\t\techo \"<style type='text/css'>label[for='\" . $this->_id . \"-hide'] { display: none; }</style>\";\n\t\t}", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "static function metabox($post){\n\t\twp_nonce_field( 'flat-options', 'flat-options_nonce' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\techo '<style>';\n\t\techo '.admin-meta-input{display:block; margin-top: 10px;}';\n\t\techo 'div.field-holder{display: block;float: left; margin: 10px 20px; height: 80px;}';\n\t\techo '.field-block{display: inline-block;clear: both;float: none;}';\n\t\techo '.postbox .inside .field-block h2{padding: 8px 12px;font-weight: 600;font-size: 18px;margin: 0;line-height: 1.4}';\n\t\techo '</style>';\n\t\t\t\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Licitálással kapcsolatos adatok</h2>';\n\t\tforeach ($fieldblocks['licit'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Hely adatok</h2>';\n\t\tforeach ($fieldblocks['location'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlan adatok és településrendezési előírások</h2>';\n\t\tforeach ($fieldblocks['parameters'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlanjogi jellemzők</h2>';\n\t\tforeach ($fieldblocks['info'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Közművek, energiaellátás, telekommunikáció</h2>';\n\t\tforeach ($fieldblocks['sources'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\n\t\t\t\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Építmény (épület) jellemzői</h2>';\n\t\tforeach ($fieldblocks['building'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\techo \"\n\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('.datepicker').datepicker();\t\n\t\t\t\t});\t\n\t\t\t</script>\t\n\t\t\";\n\t\t\n\t\techo '<br clear=\"all\">';\n\t\t\n }", "public function metabox(){\n\t\tif ($this->options('use_metabox')){\n\t\t\treturn array(\n\t\t\t\t'id' => $this->options('name').'_metabox',\n\t\t\t\t'title' => __($this->options('singular_name').' Fields'),\n\t\t\t\t'page' => $this->options('name'),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}", "public function register()\n\t\t{\n\t\t\tif( empty($this->_postType) ) {\n\t\t\t\twp_die( 'Empty metabox post type.' );\n\t\t\t}\n\n\t\t\t$all_empty = true;\n\n\t\t\tforeach( $this->getTabs() as $tab ) {\n\t\t\t\tif ( ! $this->_alwaysDisplay && $tab->getContainers()->size() == 0 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tforeach ( $tab->getContainers() as $container ) {\n\t\t\t\t\tif ( ! $this->_alwaysDisplay && $container->getFields()->size() == 0 ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$all_empty = false;\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( $all_empty ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->_id = \"metabox_{$this->_postType}_{$this->_slug}\";\n\n\t\t\tadd_meta_box(\n\t\t\t\t$this->_id,\n\t\t\t\t$this->_title,\n\t\t\t\tarray($this, 'render'),\n\t\t\t\t$this->_postType,\n\t\t\t\t$this->_position,\n\t\t\t\t$this->_priority\n\t\t\t);\n\n\t\t\tadd_action( 'admin_head', array($this, 'disableHideMetaboxes') );\n\t\t}", "function rng_METANAME_metabox_init() {\n}", "public function metabox_start( $post ) {\n\t\t\tif ( ! $post ) global $post;\n\n\t\t\tif ( ! in_array( $post->post_type, $this->_meta_box['pages'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$pageTpl = null;\n\t\t\t$tabbed = ( $this->_meta_box['tabs'] ) ? ( ' jquery-ui-tabs' ) : ( '' );\n\t\t\t$metaFields = $this->_fields;\n\n\t\t\tif ( 'page' == $post->post_type ) {\n\t\t\t\t$pageTpl = get_post_meta( $post->ID, '_wp_page_template', true );\n\t\t\t\tif ( $post->ID == get_option( 'page_for_posts' ) )\n\t\t\t\t\t$pageTpl = 'blog-page';\n\t\t\t}\n\n\t\t\twp_nonce_field( 'wm-' . $post->post_type . '-metabox-nonce', $post->post_type . '-metabox-nonce' );\n\n\t\t\t//display meta box form HTML\n\t\t\t$out = '<div class=\"wm-wrap meta meta-special' . $tabbed . '\">';\n\n\t\t\t\t//tabs\n\t\t\t\tif ( $tabbed ) {\n\t\t\t\t\t$out .= '<ul class=\"tabs no-js\">';\n\t\t\t\t\t$out .= '<li class=\"item-0 visual-editor\"><a href=\"#wm-meta-visual-editor\">' . __( 'Content', 'clifden_domain_adm' ) . '</a></li>';\n\t\t\t\t\t$i = 0;\n\t\t\t\t\tforeach ( $metaFields as $tab ) {\n\t\t\t\t\t\tif ( 'section-open' == $tab['type'] ) {\n\t\t\t\t\t\t\t$hideThis = null;\n\t\t\t\t\t\t\tif ( 'page' == $post->post_type && isset( $tab['exclude'] ) && in_array( $pageTpl, $tab['exclude'] ) ) {\n\t\t\t\t\t\t\t\t$hideThis = ' hide';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$out .= '<li class=\"item-' . ++$i . $hideThis . ' ' . $tab['section-id'] . '\"><a href=\"#wm-meta-' . $tab['section-id'] . '\">' . $tab['title'] . '</a></li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$out .= '</ul> <!-- /tabs -->';\n\t\t\t\t}\n\n\t\t\techo $out;\n\n\t\t\t$editorTabContent = array(\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"section-open\",\n\t\t\t\t\t\"section-id\" => \"visual-editor\",\n\t\t\t\t\t\"exclude\" => array( 'page-template/redirect.php', 'tpl-redirect.php' )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t//Content\n\t\t\twm_render_form( $editorTabContent, 'meta', $pageTpl );\n\t\t}", "public function setDefaultMetas($activ = false)\n {\n $this->defMetas = $activ;\n }", "function show() {\n global $post;\n\n // Use nonce for verification\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n\n echo '<table class=\"form-table\">';\n\n foreach ($this->_meta_box['fields'] as $field) {\n // get current post meta data\n $meta = get_post_meta($post->ID, $field['id'], true);\n\n echo '<tr>',\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\n '<td>';\n switch ($field['type']) {\n case 'text':\n echo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n '<br />', $field['desc'];\n break;\n case 'textarea':\n echo '<textarea name=\"', $field['id'], '\" id=\"', $field['id'], '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>',\n '<br />', $field['desc'];\n break;\n case 'select':\n echo '<select name=\"', $field['id'], '\" id=\"', $field['id'], '\">';\n foreach ($field['options'] as $option) {\n echo '<option', $meta == $option ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>';\n break;\n case 'radio':\n foreach ($field['options'] as $option) {\n echo '<input type=\"radio\" name=\"', $field['id'], '\" value=\"', $option['value'], '\"', $meta == $option['value'] ? ' checked=\"checked\"' : '', ' />', $option['name'];\n }\n break;\n case 'checkbox':\n echo '<input type=\"checkbox\" name=\"', $field['id'], '\" id=\"', $field['id'], '\"', $meta ? ' checked=\"checked\"' : '', ' />';\n break;\n }\n echo '<td>',\n '</tr>';\n }\n\n echo '</table>';\n }", "public function display_meta_box() {\n\t\t\n\t\tinclude_once( 'views/q-and-a-admin.php' );\n }", "function careers_metabox() {\n\t\t\tforeach (careers_fields() as $key => $value) {\n\t\t\t\t$id = 'careers_'.$value['slug'];\n\t\t\t\t$title = __( $value['name'], 'careers_textdomain' );\n\t\t\t\tadd_meta_box($id, $title, 'careers_callback', 'Careers', 'normal', 'low',$value);\n\t\t\t}\n\t\t}", "function block_editor_meta_box_hidden_fields()\n {\n }", "function show() {\n global $post;\n\n $saved = $this->is_saved();\n\n // Container\n printf(\n '<div class=\"rwmb-meta-box\" data-autosave=\"%s\">',\n $this->meta_box['autosave'] ? 'true' : 'false'\n );\n\n wp_nonce_field( \"rwmb-save-{$this->meta_box['id']}\", \"nonce_{$this->meta_box['id']}\" );\n\n // Allow users to add custom code before meta box content\n // 1st action applies to all meta boxes\n // 2nd action applies to only current meta box\n do_action( 'rwmb_before', $this );\n do_action( \"rwmb_before_{$this->meta_box['id']}\", $this );\n\n // Print HTML code for all fields\n $current_tab = null;\n $tab_heading = $tab_body = '';\n\n foreach ( $this->fields as $field ) {\n if ( isset( $field['tab'] ) && $current_tab != $field['tab'] ) {\n $tab_id = sanitize_key( $field['tab'] );\n\n // Update tab heading.\n $tab_heading .= '\n\t\t\t\t\t<li class=\"meta-box-tab-' . $tab_id . ( empty( $current_tab ) ? ' active' : '' ) . '\">\n\t\t\t\t\t\t<a href=\"#' . $tab_id . '\">' . $field['tab'] . '</a>\n\t\t\t\t\t</li>';\n\n // Update tab body.\n $tab_body .= ( empty( $current_tab ) ? '' : '</div>' ) . '\n\t\t\t\t\t<div id=\"' . $tab_id . '\" class=\"meta-box-tabs-content ' . ( empty( $current_tab ) ? '' : 'hidden' ) . '\">';\n\n $current_tab = $field['tab'];\n }\n\n // Start output buffering to hold field output.\n ob_start();\n\n if ( method_exists( __CLASS__, 'get_class_name' ) ) {\n call_user_func( array( self::get_class_name( $field ), 'show' ), $field, $saved );\n } elseif ( class_exists( 'RWMB_Field' ) && method_exists( 'RWMB_Field', 'call' ) ) {\n RWMB_Field::call( 'show', $field, $saved );\n }\n\n $tab_body .= ob_get_contents();\n\n ob_end_clean();\n }\n\n if ( ! empty( $tab_heading ) ) {\n echo '\n\t\t\t\t<div class=\"meta-box-tabs\" id=\"' . $this->meta_box['id'] . '\">\n\t\t\t\t\t<ul class=\"meta-box-tabs-nav\">' . $tab_heading . '</ul>\n\t\t\t\t\t' . $tab_body . '</div>\n\t\t\t\t</div>\n\t\t\t\t<scr' . 'ipt>\n\t\t\t\t\t(function($) {\n\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . '\").on(\"click\", \".meta-box-tabs-nav a\", function(e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . ' .meta-box-tabs-nav li\").removeClass(\"active\");\n\t\t\t\t\t\t\t$(this).parent().addClass(\"active\");\n\t\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . ' .meta-box-tabs-content\").addClass(\"hidden\").filter($(this).attr(\"href\")).removeClass(\"hidden\");\n\t\t\t\t\t\t});\n\t\t\t\t\t})(jQuery);\n\t\t\t\t</scr' . 'ipt>';\n } else {\n echo worldmart_output('' . $tab_body) ;\n }\n\n // Include validation settings for this meta-box\n if ( isset( $this->validation ) && $this->validation ) {\n echo '\n\t\t\t\t<scr' . 'ipt>\n\t\t\t\tif ( typeof rwmb == \"undefined\" )\n\t\t\t\t{\n\t\t\t\t\tvar rwmb = {\n\t\t\t\t\t\tvalidationOptions : jQuery.parseJSON( \\'' , json_encode( $this->validation ) , '\\' ),\n\t\t\t\t\t\tsummaryMessage : \"' , esc_js( esc_html__( 'Please correct the errors highlighted below and try again.', 'worldmart' ) ) , '\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar tempOptions = jQuery.parseJSON( \\'' , json_encode( $this->validation ) . '\\' );\n\t\t\t\t\tjQuery.extend( true, rwmb.validationOptions, tempOptions );\n\t\t\t\t}\n\t\t\t\t</scr' . 'ipt>\n\t\t\t';\n }\n\n // Allow users to add custom code after meta box content\n // 1st action applies to all meta boxes\n // 2nd action applies to only current meta box\n do_action( 'rwmb_after', $this );\n do_action( \"rwmb_after_{$this->meta_box['id']}\", $this );\n\n // End container\n echo '</div>';\n }", "function page_setup_metabox_content( $post ){\n\twp_nonce_field( 'mptheme_layout_save_meta_box', 'mptheme_page_setup_meta_box_nonce' );\n\n\t/*\n\t * Use get_post_meta() to retrieve an existing value\n\t * from the database and use the value for the form.\n\t */\n\t$mptheme_page_setup_show_heading = get_post_meta( $post->ID, 'mptheme_page_setup_show_heading', true );\n\n\tif(!$mptheme_page_setup_show_heading){\n\t\t$mptheme_page_setup_show_heading = 'true';\n\t}\n\t?>\n\t\t<p class=\"post-attributes-label-wrapper\">\n\t\t\t<label class=\"post-attributes-label\"> <?php _e( 'Show page heading', 'mptheme' ); ?> </label>\n\t\t</p>\n\t\t<select name=\"mptheme_page_setup_show_heading\">\n\t\t\t<option value=\"true\" <?php echo selected( $mptheme_page_setup_show_heading, 'true', false); ?>> <?php _e( 'Enable', 'mptheme' ); ?></option>\n\t\t\t<option value=\"false\" <?php echo selected( $mptheme_page_setup_show_heading, 'false', false); ?>> <?php _e( 'Disable', 'mptheme' ); ?></option>;\n\t\t</select>\n\n\t<?php\n\t// if Revolution Slider is available uset can select an slider for the page\n\tif(class_exists('RevSliderAdmin')) {\n\t\tglobal $wpdb;\n\n\t\t$rs = $wpdb->get_results( \n\t\t\t\"\n\t\t\tSELECT id, title, alias\n\t\t\tFROM \".$wpdb->prefix.\"revslider_sliders\n\t\t\tORDER BY id ASC LIMIT 100\n\t\t\t\"\n\t\t);\n\t\t$revsliders = array(array(\n\t\t\t'value' => 'no_slider',\n\t\t\t'label' => 'No Slider'\n\t\t));\n\t\tif ($rs) {\n\t\t\t$_ri = 1;\n\t\t\tforeach ( $rs as $slider ) {\n\t\t\t\t$revsliders[$_ri]['value'] = $slider->alias;\n\t\t\t\t$revsliders[$_ri]['label'] = $slider->title;\n\t\t\t\t$_ri++;\n\t\t\t}\n\t\t} else {\n\t\t\t$revsliders[\"No sliders found\"] = 0;\n\t\t}\n\n\t\tif(count($revsliders)>0 ){\n\t\t\t// Get the saved slider\n\t\t\t$mptheme_page_setup_revslider = get_post_meta( $post->ID, 'mptheme_page_setup_revslider', true );\n\n\t\t\tif(!$mptheme_page_setup_revslider){\n\t\t\t\t$mptheme_page_setup_revslider = 'no_slider';\n\t\t\t}\n\n\t\t?>\n\n\t\t\t<p class=\"post-attributes-label-wrapper\">\n\t\t\t\t<label class=\"post-attributes-label\"> <?php _e( 'Show hero Revolution Slider insted of heading?', 'mptheme' ); ?> </label>\n\t\t\t</p>\n\t\t\t<select name=\"mptheme_page_setup_revslider\">\n\t\t\t\t<?php for ($i=0; $i < count($revsliders); $i++) { ?>\n\t\t\t\t\t<option value=\"<?php echo $revsliders[$i][\"value\"] ?>\" <?php echo selected( $mptheme_page_setup_revslider, $revsliders[$i][\"value\"], false); ?>><?php echo $revsliders[$i][\"label\"] ?></option>\n\t\t\t\t<?php } ?>\n\t\t\t</select>\n\n\t\t<?php }\n\t}\n\t?>\n\n\t<?php\n}", "public function admin_init()\n \t{\t\t\t\n \t\t// Add metaboxes\n \t\t//add_action('add_meta_boxes', array(&$this, 'add_meta_boxes'));\n \t}", "public function addMetaBox()\r\n {\r\n add_meta_box($this->id, esc_html__($this->title, 'firalabs-tv-show'), array(\r\n $this,\r\n 'render'\r\n ), 'firalabs_tv_show', $this->context, 'default');\r\n }", "function hide_or_show_contributorstalbe($post_type, $post){\n\t\tadd_meta_box('wiki-table-hide-or-show',__('Show / Hide Wiki-Contribution Table'),array($this,'wiki_shown_hidden'),'incsub_wiki','advanced','high');\n\t}", "function ppes_admin_init(){\r\n\tadd_meta_box(\"et_post_meta\", \"ET Settings\", \"et_post_meta\", \"auctions\", \"normal\", \"high\");\r\n}", "public static function add_to_wc_metabox(){\n global $post;\n\n echo '<div class=\"options_group\">';\n\n echo woocommerce_wp_checkbox( array(\n 'id' => '_only_item_in_cart',\n 'label' => __( 'Only Item In Cart' ) ,\n 'description' => __( 'For special items that need to be purchased individually.', 'wc-only-item-in-cart' )\n )\n );\n\n echo '</div>';\n\n }", "protected function get_displayinmenublock() {\n return false;\n }", "private function initializeMetabox()\n {\n\n $this->_metabox = new \\RWC\\Metabox( $this->get_library(), array(\n 'renderer' => 'vertical-tabs',\n 'id' => 'rwc-fundraiser-metabox',\n 'title' => 'Fundraiser Options',\n 'post_types' => array( self::POST_TYPE ),\n 'sections' => array(\n array(\n 'id' => 'payment',\n 'name' => 'Payment'\n ),\n array(\n 'id' => 'customer',\n 'name' => 'Customer Details'\n ),\n array(\n 'id' => 'dates',\n 'name' => 'Open/Close Dates'\n ),\n array(\n 'id' => 'products',\n 'name' => 'Products'\n )\n ),\n 'fields' => array(\n\n 'customer-name' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Customer Name'\n ),\n\n 'customer-business' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Business Name'\n ),\n\n 'address1' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Address 1'\n ),\n\n 'address2' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Address 2'\n ),\n\n 'city' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'City'\n ),\n\n 'state' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'State'\n ),\n\n 'zipcode' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Zipcode'\n ),\n\n 'paypal-api-username' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Username',\n 'description' => 'The email address associated with ' .\n 'the PayPal account that should receive payment ' .\n 'for this fundraiser.'\n ),\n 'paypal-api-key' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Key',\n 'description' => 'The account\\'s PayPal API password.'\n ),\n 'paypal-api-signature' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Signature',\n 'description' => 'The account\\'s PayPal API signature.'\n ),\n\n 'start-date' => array(\n 'type' => 'date',\n 'section' => 'dates',\n 'name' => 'Start Date',\n ),\n\n 'end-date' => array(\n 'type' => 'date',\n 'section' => 'dates',\n 'name' => 'End Date',\n ),\n\n 'products' => array(\n 'type' => 'fundraiser-products',\n 'section' => 'products',\n 'name' => 'Product Setup'\n )\n )\n ));\n }", "public function extend_default_metaboxes() {\n\n\t\t\tadd_action( 'edd_save_download', array( $this, 'save_default_fields' ), 10, 2 );;\n\n\t\t\tadd_action( 'edd_stats_meta_box', array( $this, 'add_fake_sales_input' ) );\n\n\t\t}", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "function metaboxTabOutputHeader ()\n\t{\n\t\techo '<strong>' . __( 'Select item', 'avhamazon' ) . '</strong><br />';\n\t}", "function show() {\n\t\tglobal $post;\n\n\t\t// Use nonce for verification\n\t\techo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n\t\n\t\techo '<table class=\"form-table\">';\n\n\t\tforeach ($this->_meta_box['fields'] as $field) {\n\t\t\t// get current post meta data\n\t\t\t$meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\n\t\t\techo '<tr>',\n\t\t\t\t\t'<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\n\t\t\t\t\t'<td>';\n\t\t\tswitch ($field['type']) {\n\t\t\t\tcase 'text':\n\t\t\t\t\techo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n\t\t\t\t\t\t'<br />', $field['desc'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\techo '<textarea name=\"', $field['id'], '\" id=\"', $field['id'], '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>',\n\t\t\t\t\t\t'<br />', $field['desc'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\techo '<select name=\"', $field['id'], '\" id=\"', $field['id'], '\">';\n\t\t\t\t\tforeach ($field['options'] as $option) {\n\t\t\t\t\t\techo '<option', $meta == $option ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n\t\t\t\t\t}\n\t\t\t\t\techo '</select>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'radio':\n\t\t\t\t\tforeach ($field['options'] as $option) {\n\t\t\t\t\t\techo '<input type=\"radio\" name=\"', $field['id'], '\" value=\"', $option['value'], '\"', $meta == $option['value'] ? ' checked=\"checked\"' : '', ' />', $option['name'];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\techo '<input type=\"checkbox\" name=\"', $field['id'], '\" id=\"', $field['id'], '\"', $meta ? ' checked=\"checked\"' : '', ' />';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'file':\n\t\t\t\t\techo $meta ? \"$meta<br />\" : '', '<input type=\"file\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" />',\n\t\t\t\t\t\t'<br />', $field['desc'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'image':\n\t\t\t\t\techo $meta ? \"<img src=\\\"$meta\\\" width=\\\"150\\\" height=\\\"150\\\" /><br />$meta<br />\" : '', '<input type=\"file\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" />',\n\t\t\t\t\t\t'<br />', $field['desc'];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\techo \t'<td>',\n\t\t\t\t'</tr>';\n\t\t}\n\t\n\t\techo '</table>';\n\t}", "function pt_init_metabox(){\n\t\t add_meta_box('job', 'Byline', array(&$this,'pt_field_job'), 'testimonials', 'side');\n\t\t}", "function ev_gallery_show_box() {\n\tglobal $ev_gallery_metabox, $post;\n\t\n\t// Use nonce for verification\n\techo '<input type=\"hidden\" name=\"ev_gallery_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n\t\n\techo '<table class=\"form-table\">';\n\n\tforeach ($ev_gallery_metabox['fields'] as $field) {\n\t\t// get current post meta data\n\t\t$meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\n\t\techo '<tr>',\n\t\t\t\t'<th style=\"width:20%; vertical-align:middle;\"><label for=\"', $field['id'], '\" style=\"font-size:15px; color:#464646; text-shadow:0px 1px 0px #fff; font-family: Georgia, \\'Times New Roman\\', Times\">', $field['name'], '</label></th>',\n\t\t\t\t'<td>';\n\t\tswitch ($field['type']) {\n\t\t\tcase 'text':\n\t\t\t\techo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n\t\t\t\t\t'<br />', $field['desc'];\n\t\t\t\tbreak;\n\t\t}\n\t\techo \t'<td>',\n\t\t\t'</tr>';\n\t}\n\t\n\techo '</table>';\n\t\n}", "function admin_metaboxes() {\r\n\r\n// \t\t\t/** Check if wpeo_log_select_post_type exist */\r\n// \t\t\tif( !empty(\t$this->wpeologs_settings['post_type'] ) ) {\r\n// \t\t\t\tforeach ( $this->wpeologs_settings['post_type'] as $post_type ) {\r\n\r\n// \t\t\t\t\t//add_meta_box( 'wpeologs_metabox_' . $post_type, __( 'Logs', 'wpeologs-i18n'), array( &$this, 'associated_post_type_metabox' ), $post_type, 'normal' );\r\n// \t\t\t\t}\r\n// \t\t\t}\r\n\t\t}", "function ssep_hide_meta_field( $fields ) {\n\n\t$fields[] = array(\n\t\t'id' => '_ss_hide_meta',\n\t\t'name' => __( 'Hide Meta' ),\n\t\t'type' => 'checkbox',\n\t\t'desc' => __( 'Hide meta info for this post.', 'shoestrap' )\n\t);\n\n\treturn $fields;\n}", "public function render_meta_boxes_preferences()\n {\n }", "public static function registerMetaBoxes() {\n add_meta_box( 'mail_settings', __('Email Settings', WPXTREME_TEXTDOMAIN ), array( __CLASS__, 'display_mail_settings' ), WPXTREME_MAIL_CPT_KEY, 'normal', 'high');\n }", "public function testWhenColsShownByDefaultAndHideNotSpecified()\n {\n // no label provide), and not explicitly hidden.\n $testName = 'MyField';\n\n $showColsByDefault = 'true';\n $field = new Application_Model_Field($testName, array(),\n array(), $showColsByDefault);\n $this->assertTrue($field->isVisible());\n $this->assertSame(\"MyField\", $field->getLabel());\n $this->_assertNoMetaInfo($field);\n }", "function mytheme_show_box() {\r\n global $meta_box, $post;\r\n\r\n // Use nonce for verification\r\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\r\n\r\n echo '<table class=\"form-table\">';\r\n\r\n foreach ($meta_box['fields'] as $field) {\r\n // get current post meta data\r\n $meta = get_post_meta($post->ID, $field['id'], true);\r\n\r\n echo '<tr>',\r\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\r\n '<td>';\r\n switch ($field['type']) {\r\n case 'text':\r\n echo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />', '<br />', $field['desc'];\r\n break;\r\n case 'textarea':\r\n echo '<textarea name=\"', $field['id'], '\" id=\"', $field['id'], '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>', '<br />', $field['desc'];\r\n break;\r\n case 'select':\r\n echo '<select name=\"', $field['id'], '\" id=\"', $field['id'], '\">';\r\n foreach ($field['options'] as $option) {\r\n echo '<option', $meta == $option ? ' selected=\"selected\"' : '', '>', $option, '</option>';\r\n }\r\n echo '</select>';\r\n break;\r\n case 'radio':\r\n foreach ($field['options'] as $option) {\r\n echo '<input type=\"radio\" name=\"', $field['id'], '\" value=\"', $option['value'], '\"', $meta == $option['value'] ? ' checked=\"checked\"' : '', ' />', $option['name'];\r\n }\r\n break;\r\n case 'checkbox':\r\n echo '<input type=\"checkbox\" value=\"Yes\" name=\"', $field['id'], '\" id=\"', $field['id'], '\"', $meta ? ' checked=\"checked\"' : '', ' />';\r\n break;\r\n }\r\n echo '<td>',\r\n '</tr>';\r\n }\r\n\r\n echo '</table>';\r\n}", "public static function display_meta_box($post) {\r\n\t\t\t$force_hide = get_post_meta($post->ID, self::FORCE_HIDE_KEY, true);\r\n\t\t\t$moderation_url = self::_get_moderation_url($post->ID);\r\n\t\t\t$results_url = self::_get_results_url($post->ID);\r\n\r\n\t\t\tinclude('views/backend/meta-boxes/meta-box.php');\r\n\t\t}", "public function addMetaboxes() {}", "public function is_empty() {\n global $PAGE;\n\n if (!$PAGE->user_is_editing()) {//if editing - show block\n return true;\n } else {//if not editing - don't show\n return false;\n }\n }", "function mytheme_show_box() {\r\n global $meta_box, $post;\r\n \r\n // Use nonce for verification\r\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\r\n \r\n echo '<table class=\"form-table\">';\r\n\r\n foreach ($meta_box['fields'] as $field) {\r\n // get current post meta data\r\n $meta = get_post_meta($post->ID, $field['id'], true);\r\n \r\n echo '<tr>',\r\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\r\n '<td>';\r\n switch ($field['type']) {\r\n case 'textarea':\r\n echo '<textarea name=\"', $field['id'], '\" id=\"', $field['id'], '\" cols=\"60\" rows=\"8\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>', '<br />', $field['desc'];\r\n break;\r\n }\r\n echo '<td>',\r\n '</tr>';\r\n }\r\n \r\n echo '</table>';\r\n}", "function kurama_custom_meta() {\n add_meta_box( 'kurama_meta', __( 'Display Options', 'kurama' ), 'kurama_meta_callback', 'page','side','high' );\n}", "function mytheme_show_box() {\n global $post;\n\n // Use nonce for verification\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n \n \n\n $i=0;\n //print_r($this->meta_box['fields']);\n\n $meta_count = get_post_meta($post->ID, 'dbt_text', true);\n for ($i=0;$i<count($meta_count);$i++) {\n echo '<table class=\"form-table elearning_fieldset\">';\n foreach ($this->meta_box['fields'] as $field) {\n // get current post meta data\n // echo $field['id'];\n $meta = get_post_meta($post->ID, $field['id'], true);\n //$count = print_r($meta);\n \n\n \n \n\n echo '<tr>',\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\n '<td>';\n switch ($field['type']) {\n case 'text':\n echo '<input class=\"elearning_field\" type=\"text\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\" value=\"', $meta[$i] ? $meta[$i] : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n '<br />', $field['desc'];\n break;\n case 'textarea':\n echo '<textarea class=\"elearning_field\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta[$i] ? $meta[$i] : $field['std'], '</textarea>',\n '<br />', $field['desc'];\n break;\n case 'select':\n //print_r($field['options']);\n echo '<select class=\"elearning_field\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\">';\n foreach ($field['options'] as $option) {\n echo '<option', $meta[$i] == $option ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>';\n break;\n case 'radio':\n foreach ($field['options'] as $option) {\n echo '<input class=\"elearning_field\" type=\"radio\" name=\"', $field['id'], '[]\" value=\"', $option['value'], '\"', $meta[$i] == $option['value'] ? ' checked=\"checked\"' : '', ' />', $option['name'];\n }\n break;\n case 'checkbox':\n echo '<input class=\"elearning_field\" type=\"checkbox\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\"', $meta[$i] ? ' checked=\"checked\"' : '', ' />';\n break;\n }\n echo \t'<td>',\n '</tr>\n';\n }\n echo '\n<tr>\n <td colspan=\"2\" align=\"right\"><a class=\"delete_elearning_item\" href=\"#\">Delete</a></td>\n</tr>\n</table>';\n }\n echo '<a href=\"#\" id=\"new_textbox\">New Textbox</a>';\n\n \n }", "function carrousel_metaboxes(){\n add_meta_box(\"MonCarrousel\", \"lien\", \"carrousel_metabox\");\n}", "public function hideExtraField()\n {\n $this->houses=false;\n $this->jobs_training=false;\n $this->motorcycles =false;\n $this->cars = false;\n $this->offices=false;\n $this->lands_plots=false;\n return;\n }", "public function add_meta_boxes()\n \t{\n\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('WP_Custom_Login_Profile_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray(&$this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\n\n \t}", "function create_sitewide_metabox() {\n\t\t$post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' ) );\n\t\tforeach ( $post_types as $post_type )\n\t\t\techo '<p><input type=\"checkbox\" name=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\" id=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\" value=\"1\" ' . checked( genesis_get_option( 'be_title_toggle_' . $post_type ), false ) .' /> <label for=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\"> ' . sprintf( __( 'By default, remove titles in the <strong>%s</strong> post type.', 'genesis-title-toggle' ), $post_type ) .'</label></p>';\n\n\t\n\t}", "function thd_re_info_show_box() {\n\tthd_meta_box_callback(thd_re_meta_box_fields(), 'page');\n}", "function show() {\n global $post;\n \t\t/**\n\t\t * Use nonce for verification.\n\t\t */\n echo '<input type=\"hidden\" name=\"weddingvendor_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n echo '<table class=\"form-table\">';\n\t\t\n foreach ($this->_meta_box['fields'] as $field) { \n\t\t\t/**\n\t\t\t * get current post meta data.\n\t\t\t */\n $meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\tif( isset( $field['desc'] ) ) {\n\t\t\t\t$meta_description = $field['desc'];\n\t\t\t}\n\t\t\t\n echo '<tr><th style=\"width:20%\"><label for=\"',esc_attr($field['id']), '\">', esc_html($field['name']), '</label></th><td>';\n\t\t\t\n switch ($field['type']) {\n\t\t\t /**\n\t\t\t\t * Meta-box Text Field.\n\t\t\t\t */\t\n case 'text':\n \t echo '<input type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n '<br /><small>', $meta_description.'</small>';\n break;\t\n\t\n\n\t\t\t /**\n\t\t\t\t * Meta-box date Field.\n\t\t\t\t */\t\n case 'date':\n \t echo '<input type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" class=\"check_date date\" />',\n '<br /><small>', $meta_description.'</small>';\n break;\t\t\t\t\t \t\t\t\t\n\t\t\t /**\n\t\t\t\t * Meta-box Color Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'color':\n\t\t\t\t echo '<input class=\"color-field\" type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" />',\n '<br /><small>', $meta_description.'</small>';\n\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Textarea Field.\n\t\t\t\t */\t\n case 'textarea':\n echo '<textarea name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>',\n '<br /><small>', $meta_description.'</small>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Select Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'select':\t\t\t\t\t\n\t\t\t\t\t echo '<select name=\"'.esc_attr($field['id']).'\" id=\"'.esc_attr($field['id']).'\">';\n\t\t\t\t\t\t foreach ($field['options'] as $option) {\n\t\t\t\t\t\t \t echo '<option', $meta == $option['value'] ? ' selected=\"selected\"' : '', ' value=\"'.$option['value'].'\">'.$option['label'].'</option>';\n\t\t\t\t\t \t } \n\t\t\t\t\t echo '</select><br /><span class=\"description\">'.$meta_description.'</span>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Radio Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'radio':\n\t\t\t\t\t foreach ( $field['options'] as $option ) {\n\t\t\t\t\t\t echo '<input type=\"radio\" name=\"'.esc_attr($field['id']).'\" id=\"'.$option['value'].'\" \n\t\t\t\t\t\t\t value=\"'.$option['value'].'\" ',$meta == $option['value'] ? ' checked=\"checked\"' : '',' />\n\t\t\t\t\t\t\t <label for=\"'.$option['value'].'\">'.$option['name'].'</label><br />';\n\t\t\t\t\t }\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Checkbox Field.\n\t\t\t\t */\t\n\t case 'checkbox':\n \t echo '<input type=\"checkbox\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\"', $meta ? ' checked=\"checked\"' : '', ' />';\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Checkbox-group Field.\n\t\t\t\t */\t\n\t\t\t case 'checkbox_group':\n\t\t\t\t\t foreach ($field['options'] as $option) {\n\t\t\t\t\t echo '<input type=\"checkbox\" value=\"',$option['value'],'\" name=\"',esc_html($field['id']),'[]\" \n\t\t\t\t\t\t id=\"',$option['value'],'\"',$meta && in_array($option['value'], $meta) ? ' checked=\"checked\"' : '',' />\n\t\t\t\t\t\t <label for=\"'.$option['value'].'\">'.$option['name'].'</label><br />';\n\t\t\t\t\t }\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n\t\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Image Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'image':\n\t\t\t\t\t echo '<span class=\"upload\">';\n\t\t\t\t\t if( $meta ) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<input type=\"hidden\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" \n\t\t\t\t\t\t\t\t class=\"regular-text form-control text-upload\" value=\"',$meta,'\" />';\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<img style=\"width:150px; display:block;\" src= \"'.$meta.'\" class=\"preview-upload\" />';\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button button-upload\" id=\"logo_upload\" value=\"'.esc_html__('Upload an image','weddingvendor').'\"/></br>';\t\t\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button-remove\" id=\"remove\" value=\"'.esc_html__('Remove','weddingvendor').'\" /> ';\n\t\t\t\t\t }else {\n\t\t\t\t\t\t echo '<input type=\"hidden\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" \n\t\t\t\t\t\t\t\t\tclass=\"regular-text form-control text-upload\" value=\"',$meta,'\" />';\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<img style=\"\" src= \"'.$meta.'\" class=\"preview-upload\" />';\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button button-upload\" id=\"logo_upload\" value=\"'.esc_html__('Upload an image','weddingvendor').'\"/></br>';\t\t\n\t\t\t\t\t\t echo '<input type=\"button\" style=\"display:none;\" id=\"remove\" class=\"button-remove\" value=\"\" /> ';\n\t\t\t\t\t } echo '</span><span class=\"description\">'.$meta_description.'</span>';\t\t\n\t\t\t\tbreak;\n\t\t\t\t\t\n }\n echo '<td></tr>';\n }\n echo '</table>';\n }", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "function rs_meta_box()\n{\n add_meta_box('rs_focus', 'Destaque na home', 'rs_focus', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post_region', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'event', 'side');\n}", "function team_option_metabox() {\n\t$screens = array( 'team');\n\tforeach ( $screens as $screen ) {\n\t\tadd_meta_box(\n\t\t\t'team_option',\n\t\t\t__( 'Team Member Info', 'team_option_textdomain' ),\n\t\t\t'team_option_callback',\n\t\t\t$screen,\n\t\t\t'side',\n \t'default'\n\t\t);\n\t}\n}", "function wpc_client_meta_init() {\r\n add_meta_box( 'wpclients_userids-meta', 'Allowed Users', 'wpc_client_userids_options', 'clientspage', 'advanced', 'low' );\r\n //meta box for select clientpage template\r\n add_meta_box( 'wpclients_clientpage_template', 'Template', 'wpc_client_clientpage_template_meta', 'clientspage', 'side', 'low' );\r\n\r\n //meta box for select hubpage template\r\n add_meta_box( 'wpclients_hubpage_template', 'Template', 'wpc_client_hubpage_template_meta', 'hubpage', 'side', 'low' );\r\n\r\n // metabox for Client Circles\r\n add_meta_box( 'wpclients_groups_id-meta', 'Allowed Client Circles', 'wpc_client_groups_id_meta', 'clientspage', 'advanced', 'low' );\r\n\r\n add_meta_box( 'wpclients_page_update-meta', 'Send Update to Client(s)', 'wpc_client_page_update_options', 'clientspage', 'advanced', 'low' );\r\n\r\n }", "public function alwaysShown()\n {\n \treturn $this->alwaysShown;\n }", "public function showEmpty($empty = true)\n {\n $this->showEmpty = $empty;\n }", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "function display() {\r parent::display();\r }", "function thd_re_post_info_show_box() {\n\tthd_meta_box_callback(thd_re_post_meta_box_fields(), 'post');\n}", "function show_your_fields_meta_box() {\n\tglobal $post;\n\t\t$meta = get_post_meta( $post->ID, 'actu_fields', true ); ?>\n\n\t<input type=\"hidden\" name=\"actu_fb_link\" value=\"<?php echo wp_create_nonce( basename(__FILE__) ); ?>\">\n\n <p>\n\t<input type=\"text\" name=\"actu_fields[text]\" id=\"actu_fields[text]\" class=\"regular-text\" value=\"<?php if (is_array($meta) && isset($meta['text'])){ echo $meta['text']; } ?>\">\n</p>\n\n\t<?php }", "function tm_reset_tgm_infobox(){\n\t//update_user_meta( $user_id, $meta_key, $meta_value, $prev_value );\n\tupdate_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_tgmpa', '0' );\n}", "function GTPress_hide_postmeta() {\r\n\tif ($options['hide_postmeta'] == \"true\") {\r\n\t\tremove_meta_box( 'commentstatusdiv' , 'post' , 'normal' ); // allow comments for posts\r\n\t\tremove_meta_box( 'commentsdiv' , 'post' , 'normal' ); // recent comments for posts\r\n\t\tremove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts\r\n\t\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' ); // post trackbacks\r\n\t\tremove_meta_box( 'postexcerpt' , 'post' , 'normal' ); // post excerpts\r\n\t\tremove_meta_box( 'tagsdiv-post_tag' , 'post' , 'side' ); // post tags\r\n\t\tremove_meta_box( 'slugdiv','post','normal'); // post slug\r\n\t}\r\n}", "function clix_uppe_meta_box(){\r\n\tglobal $post;\r\n\t// Use nonce for verification\r\n\techo '<input type=\"hidden\" name=\"clix_uppe_nonce\" id=\"clix_uppe_nonce\" value=\"' .\r\n\twp_create_nonce( plugin_basename(__FILE__) ) . '\" />';\r\n\t// Output checkboxes\r\n\t$options = array(\r\n\t\t'disable_home' \t\t\t=> 'Disable Listing on Home Page',\r\n\t\t'disable_tag' \t\t\t=> 'Disable on Tag Listings',\r\n\t\t'disable_archive' \t\t=> 'Disable Listing in Archives',\r\n\t\t'disable_search' \t\t=> 'Disable Listing in Search',\r\n\t\t'disable_unlesslogin' \t=> 'Disable Listing for Users Not Logged In',\r\n\t\t'disable_unlessshow'\t=> 'Disable but show available if Logged In'\r\n\t\t);\r\n\tforeach( $options as $option=>$legend ){\r\n?>\r\n<label for=\"clix_uppe_<?php echo $option; ?>\">\r\n\t<input type=\"checkbox\" name=\"_clix_uppe_<?php echo $option; ?>\" id=\"clix_uppe_<?php echo $option; ?>\" <?php\r\n\t\tif ( get_post_meta( $post->ID, \"_clix_uppe_$option\", true ) == '1' )\r\n\t\t\techo ' checked=\"checked\"';\r\n\t?>/>\r\n\t<?php echo $legend; ?>\r\n</label>\r\n<br /><?php\r\n\t}\r\n}", "public function add_meta_boxes()\n \t{\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('wp_plugin_template_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray($this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\t\t\t\t\n \t}", "function testimonials_meta_boxes() {\n\tadd_meta_box( 'testimonials_form', 'testimonials', 'normal', 'high' );\n}", "function gtpressMenu_disable_metas() {\r\n\r\n\tif (current_user_can('manage_options') && get_option('gtpressMenu_admins_see_everything'))\r\n\t\treturn;\r\n\r\n\tremove_action('admin_head', 'index_js');\r\n\r\n\t$disabled_metas = get_option('gtpressMenu_disabled_metas');\r\n\tif (!empty($disabled_metas)) {\r\n\t\t$metas = implode(',', $disabled_metas);\r\n\t\techo '<style type=\"text/css\">'.$metas.' {display: none !important}</style>';\r\n\t}\r\n\r\n}", "function add_dish_metaboxes()\r\n{\r\n\tadd_meta_box( 'price', __('Price'), 'edit_price_box', 'dish', 'normal');\t\r\n}", "public function apb_add_meta_boxes() {\r\n\t}", "function admin_init() {\n\t\tadd_meta_box(\"1-Round\", \"First Round\", array(&$this, \"meta_options\"), \"Tournaments\" );\n\t}", "public function testWhenColsShownByDefaultButHideIsTrue()\n {\n // explicitly hidden with 'hide' set to true.\n $testName = 'MyField';\n $fieldSetting = array(\n 'label' => 'Label',\n 'hide' => true);\n\n $showColsByDefault = 'true';\n $field = new Application_Model_Field($testName, $fieldSetting,\n array(), $showColsByDefault);\n $this->assertFalse($field->isVisible());\n $this->assertSame(\"Label\", $field->getLabel());\n $this->_assertNoMetaInfo($field);\n }", "function metabox_styles() { ?>\n\t<style type=\"text/css\">\n\t.hidetable { display:none; }\n\t#uploadfield { width:500px; }\n\t#uploadfield input { display:inline; }\n\t.req { font-size:12px; color:#FF0000; font-weight:bold; }\n\t.attchmt { border-bottom:21px solid #666; padding:10px 0; margin:10px 0; }\n\t.prevImage { float:right; width:250px; text-align:center; }\n\t.fr { float:right; }\n\t</style>\n\t<?php\t\n}", "public function lazyload_metabox() {\r\n\t\t$this->view(\r\n\t\t\t'lazyload/meta-box',\r\n\t\t\tarray(\r\n\t\t\t\t'settings' => $this->settings->get_setting( WP_SMUSH_PREFIX . 'lazy_load' ),\r\n\t\t\t\t'cpts' => get_post_types( // custom post types.\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'public' => true,\r\n\t\t\t\t\t\t'_builtin' => false,\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'objects',\r\n\t\t\t\t\t'and'\r\n\t\t\t\t),\r\n\t\t\t)\r\n\t\t);\r\n\t}", "public function add_meta_boxes() {\r\n\t\tadd_meta_box( 'zakra-page-setting', esc_html__( 'Page Settings', 'zakra' ), 'Zakra_Meta_Box_Page_Settings::render', array(\r\n\t\t\t'post',\r\n\t\t\t'page',\r\n\t\t) );\r\n\t}", "public function show_in_panel() {\n\t\treturn false;\n\t}", "function add_meta_box() {\n global $post;\n\n $post_types = get_post_types( array( 'public' => true ) );\n\n if ( !empty( $post ) ) {\n if ( $this->check_user_analytics_exist( $post ) ) {\n foreach ( $post_types as $post_type ) {\n add_meta_box( 'show_user_analytics', __( 'Post Author Analytics Info', 'wpuf-pro' ), array( $this, 'render_meta_box_content' ), $post_type, 'advanced', 'high' );\n }\n }\n }\n }", "function singlewanted_boxes() {\r\n add_meta_box(\"singlewanted_seeker\", \"Wer sucht?\", \"singlewanted_seeker\", \"lze_s_wanted\", \"normal\", \"high\");\r\n add_meta_box(\"singlewanted_wanted\", \"Beschreibung des gesuchten Charakters\", \"singlewanted_wanted\", \"lze_s_wanted\", \"normal\", \"high\");\r\n add_meta_box(\"singlewanted_reason\", \"Warum wird der Charakter gesucht?\", \"singlewanted_reason\", \"lze_s_wanted\", \"normal\", \"high\");\r\n\t\tadd_meta_box(\"singlewanted_relatedto\", \"Gehört der Charakter zu einer Gruppe?\", \"singlewanted_relatedto\", \"lze_s_wanted\", \"normal\", \"high\");\r\n add_meta_box(\"singlewanted_avatar\", \"Vorschlag Avatarperson\", \"singlewanted_avatar\", \"lze_s_wanted\", \"normal\", \"high\");\r\n add_meta_box(\"singlewanted_pic\", \"Bild\", \"singlewanted_pic\", \"lze_s_wanted\", \"normal\", \"high\");\r\n }", "function MetaBox()\n\t{\n\t\t\n\t\t// wordpress global\n\t\tglobal $post;\n\n\t\t// grab meta data, if it exists\n\t\t$tlsp_text = get_post_meta( $post->ID, 'tlsp_text', true );\n\n\t\t// use a nonce for verification\n\t\twp_nonce_field( plugin_basename(__FILE__), 'tlsp_noncename' );\n\t\t\n\t\t// this is the html for the metabox\n\t\t$security = 1;\n\t\tinclude( 'metabox-html.php' );\n\t\t$security = 0;\n\t\t\n\t}", "public function setup_meta_box( $options ) {\n\t\t\n\t\t\t//add_meta_box\n\t\t\n\t\t}", "public function render_metabox_hide_fields_for_page($post){\n\n\t\twp_nonce_field('post_metabox_hide_fields_for_page', 'post_metabox_hide_fields_for_page_nonce');\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_box_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_box_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_box_author.'\">'.__('Hide about author', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_date , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_date.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_date.'\">'.__('Hide published date', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_author.'\">'.__('Hide meta author', THEME_NAME).'</label></div>';\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_comments , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_comments.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for=\"'.self::$checkbox_post_comments.'\">'.__('Hide comments', THEME_NAME).'</label></div>';\n\t}", "function addPostMetaboxes() {\n\t\t$assignment_meta = get_post_meta($_GET['post'], '_lepress-assignment-meta', true);\n\t\tif($this->checkPermissions() && !isSet($_GET['p']) && !$assignment_meta) {\n\t\t\tadd_meta_box('lepress-assignment-metabox', 'Assignment', array(&$this, 'fillAssignmentMetabox'), 'post', 'side', 'high');\n\t\t}\n\t}", "function of_metabox_function(){\n require_once('of_meta_database.php');\n echo '<h2 class=\"text-left\">OF Metabox and Taxonomy Options<h2><br/>';\n of_settings_page();\n}", "public function set_elementor_flag() {\n\t\tupdate_option( 'hestia_had_elementor', 'no' );\n\t}", "function mf_SALF_artist_meta_show_box() {\n global $artist_meta_box, $post;\n \n // Use nonce for verification\n \n\techo '<input type=\"hidden\" name=\"artist_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n \n echo '<table class=\"form-table\">';\n\n foreach ($artist_meta_box['fields'] as $field) {\n // get current post meta data\n \n switch ($field['type']) {\n \n\t\t\t\tcase 'select2':\n\t\t\t\t$meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\t\t\n\t\t\t\techo '<div style=\"margin: 12px 0; float: left;\">';\n\t\t echo '<h2><label for=\"', $field['id'], '\">', $field['name'], '</label></h2>';\n\t\t\t\techo '<select name=\"', $field['id'], '\" id=\"', $field['id'], '\">';\n foreach ($field['options'] as $ID => $option) {\n echo '<option value=\"'. $ID .'\" ', $meta == $ID ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>';\n\t\t\t\techo '</div><h2 style=\"clear: both; margin: 12px 0;\">Additional Speakers</h2>';\t\n\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox';\n\t\t\t\t$meta = get_post_meta($post->ID, 'mf_SALF_artist_meta_checks', true);\n\t\t\t\tif (!$meta){\n\t\t\t\t\t$meta = array();\n\t\t\t\t}\n\t\techo '<div style=\"margin-right: 12px; float: left;\">';\n echo '<label for=\"', $field['id'], '\">', $field['name'], '</label>';\n\n \n\t\techo '<input type=\"checkbox\" name=\"mf_SALF_artist_meta_checks[]\"value=\"', $field['id'], '\" id=\"', $field['id'], '\"', in_array($field['id'],$meta) ? ' checked=\"checked\"' : '', ' />';\n\t\techo '</div>';\n\t\t\t break;\n\t\t}\t\t\t \n \n }\n \n echo '</table>';\n}", "public function setHidden(){\n $this->_hidden = true;\n }", "public function add_admin_meta_boxes() {\n\n\t\t$id = 'hide_backend_options';\n\t\t$title = __( 'Hide Login Area', 'it-l10n-ithemes-security-pro' );\n\n\t\tadd_meta_box(\n\t\t\t$id,\n\t\t\t$title,\n\t\t\tarray( $this, 'metabox_hide_backend_settings' ),\n\t\t\t'security_page_toplevel_page_itsec_settings',\n\t\t\t'advanced',\n\t\t\t'core'\n\t\t);\n\n\t\t$this->core->add_toc_item(\n\t\t\tarray(\n\t\t\t\t'id' => $id,\n\t\t\t\t'title' => $title,\n\t\t\t)\n\t\t);\n\t}", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "public function add_meta_boxes($post_type) {\n\n if ($post_type == 'post') {\n \tadd_meta_box(\n\t\t\t\t'post_metabox_hide_fields_for_post'\n\t\t\t\t,__('Hide fields',THEME_NAME)\n\t\t\t\t,array($this, 'render_meta_hide_fields_for_post')\n\t\t\t\t,$post_type\n\t\t\t\t,'side'\n\t\t\t\t,'default'\n\t\t\t);\n \t\n }elseif($post_type == 'page') {\n \tadd_meta_box(\n\t\t\t\t'post_metabox_hide_fields_for_page'\n\t\t\t\t,__('Hide fields',THEME_NAME)\n\t\t\t\t,array($this, 'render_metabox_hide_fields_for_page')\n\t\t\t\t,$post_type\n\t\t\t\t,'side'\n\t\t\t\t,'default'\n\t\t\t);\n }\n\n if ( in_array( $post_type, array('post','page') )) {\n\n\t\t\tadd_meta_box(\n\t\t\t\t'post_metabox_feature'\n\t\t\t\t,__('Feature',THEME_NAME)\n\t\t\t\t,array($this, 'render_meta_box_feature')\n\t\t\t\t,$post_type\n\t\t\t\t,'normal'\n\t\t\t\t,'high'\n\t\t\t);\n }\n\t}", "function wp_initial_nav_menu_meta_boxes()\n {\n }", "public function add_missed_values() {\n\t\t\t/*\n\t\t\t'context' => 'normal', //where the meta box appear: normal (default), advanced, side\n\t\t\t'fields' => array(), //meta fields setup array\n\t\t\t'id' => 'demo_meta_box', //meta box id, unique per meta box\n\t\t\t'pages' => array( 'post', 'page' ), //post types\n\t\t\t'priority' => 'high', //order of meta box: high (default), low\n\t\t\t'tabs' => true, //tabbed meta box interface?\n\t\t\t'title' => 'Custom Meta Box', //meta box title\n\t\t\t*/\n\n\t\t\t// Default values for meta box\n\t\t\t$this->_meta_box = array_merge( array(\n\t\t\t\t\t\t'context' => 'normal',\n\t\t\t\t\t\t'pages' => array( 'post' ),\n\t\t\t\t\t\t'priority' => 'high',\n\t\t\t\t\t\t'tabs' => true,\n\t\t\t\t\t\t'visual-wrapper' => false,\n\t\t\t\t\t\t'visual-wrapper-add' => array()\n\t\t\t\t\t), (array) $this->_meta_box );\n\t\t}", "public function add_contactno_meta_box( $post ) {\n\t\t\techo $this->display_contactno( $post );\n\t\t}", "public static function add_metaboxes(){}", "public function display() {\n\t\tif ( $this->read_only && $this->selectable ) {\n\t\t\techo \"<input onClick='this.select();' type='text' name='\" . esc_attr( $this->setting_id ) . \"' value='\" . esc_attr( get_option( $this->setting_id, $this->default_value ) ) . \"' readonly class='regular-text'>\";\n\t\t} elseif ( $this->read_only && ! $this->selectable ) {\n\t\t\techo \"<input type='text' name='\" . esc_attr( $this->setting_id ) . \"' value='\" . esc_attr( get_option( $this->setting_id, $this->default_value ) ) . \"' readonly class='regular-text'>\";\n\t\t} else {\n\t\t\techo \"<input type='text' name='\" . esc_attr( $this->setting_id ) . \"' value='\" . esc_attr( get_option( $this->setting_id, $this->default_value ) ) . \"' class='regular-text'>\";\n\t\t}\n\t}", "function the_block_editor_meta_boxes()\n {\n }", "function studiare_metaboxes() {\n\t$prefix = '_studiare_';\n\n\t$studiare_metaboxes = new_cmb2_box( array(\n\t\t'id' => 'page_metabox',\n\t\t'title' => esc_html__( 'Page Settings', 'studiare' ),\n\t\t'object_types' => array( 'page', 'post' ),\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true,\n\t) );\n\n\t$studiare_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Disable Page title', 'studiare' ),\n\t\t'desc' => esc_html__( 'You can hide page heading for this page', 'studiare' ),\n\t\t'id' => $prefix . 'disable_title',\n\t\t'type' => 'checkbox',\n\t) );\n\n\t$studiare_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Disable breadcrumbs', 'studiare' ),\n\t\t'desc' => esc_html__( 'You can hide breadcrumbs for this page', 'studiare' ),\n\t\t'id' => $prefix . 'disable_breadcrumbs',\n\t\t'type' => 'checkbox',\n\t) );\n\n\t$studiare_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Disable footer widgets', 'studiare' ),\n\t\t'desc' => esc_html__( 'You can disable footer widgets area for this page', 'studiare' ),\n\t\t'id' => $prefix . 'footer_off',\n\t\t'type' => 'checkbox',\n\t) );\n\n\t$studiare_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Disable sub-footer', 'studiare' ),\n\t\t'desc' => esc_html__( 'You can disable sub-footer for this page', 'studiare' ),\n\t\t'id' => $prefix . 'copyrights_off',\n\t\t'type' => 'checkbox',\n\t) );\n\n\t$studiare_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Disable top-bar', 'studiare' ),\n\t\t'desc' => esc_html__( 'You can disable top-bar for this page', 'studiare' ),\n\t\t'id' => $prefix . 'top_bar_off',\n\t\t'type' => 'checkbox',\n\t) );\n\n\t$courses_metaboxes = new_cmb2_box( array(\n\t 'id' => 'product_metabox',\n 'title' => esc_html__( 'Course Details', 'studiare' ),\n 'object_types' => array( 'product' ),\n 'context' => 'normal',\n 'priority' => 'core',\n 'show_names' => true,\n ) );\n\n\n $courses_metaboxes->add_field( array(\n 'name' => esc_html__( 'Teacher', 'studiare' ),\n 'desc' => esc_html__( 'Select teacher for this course', 'studiare' ),\n// 'default' => '',\n 'id' => $prefix . 'course_teacher',\n 'type' => 'select',\n 'options' => studiare_get_teachers_list()\n ) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Duration', 'studiare' ),\n\t\t'desc' => esc_html__( 'Duration of course in hours', 'studiare' ),\n\t\t'default' => '7 hours on-demand video',\n\t\t'id' => $prefix . 'course_duration',\n\t\t'type' => 'text',\n ) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Lessons', 'studiare' ),\n\t\t'desc' => esc_html__( 'Number of lessons included on course', 'studiare' ),\n\t\t'default' => '11 Lessons',\n\t\t'id' => $prefix . 'course_lesseons',\n\t\t'type' => 'text',\n\t) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Certifitcate', 'studiare' ),\n\t\t'id' => $prefix . 'course_certificate',\n\t\t'type' => 'text',\n 'default' => 'Certificate of Completion'\n\t) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Skill Level', 'studiare' ),\n\t\t'id' => $prefix . 'course_level',\n\t\t'type' => 'text',\n 'default' => 'Intermediate'\n\t) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Language', 'studiare' ),\n\t\t'id' => $prefix . 'course_language',\n\t\t'type' => 'text',\n\t\t'default' => 'English'\n\t) );\n\n\t$courses_metaboxes->add_field( array(\n 'name' => esc_html__( 'Intro Video URL', 'studiare' ),\n 'desc' => esc_html__( 'Supports 3 types of video urls: Direct video link, Youtube link, Vimeo link.', 'studiare' ),\n 'id' => $prefix . 'course_video',\n 'type' => 'text',\n 'default' => ''\n ) );\n\n\t$courses_metaboxes->add_field( array(\n\t 'name' => esc_html__( 'URL', 'studiare' ),\n 'id' => $prefix . 'woo_course_url',\n 'type' => 'text',\n\t 'default' => ''\n ) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Button text', 'studiare' ),\n\t\t'id' => $prefix . 'woo_course_label',\n\t\t'type' => 'text',\n\t\t'default' => ''\n\t) );\n\n}", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "protected function setDisplayData() {\n parent::setDisplayData();\n $this->template->setDisplayData( \"person_header\", $this->getTitle() );\n if ( !($form_link = $this->form_link)) {\n if ($this->module == 'I2CE') {\n $form_link = $this->page;\n } else {\n $form_link = $this->module .'/' . $this->page;\n }\n }\n $this->template->setDisplayData( \"person_form\", $form_link);\n }", "public function add_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t$this->plugin_slug . '-post-metabox',\n\t\t\tesc_html__( 'Review Settings', $this->plugin_slug ),\n\t\t\tarray( $this, 'review_settings_view' ),\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'core'\n \t \t);\n\t}", "public function custom_meta_add() {\n\t\tif( !$this->options->show_on || in_array(get_the_id(), $this->options->show_on ) ){\n\t\t\tforeach( $this->options->display_on as $post_type ){\n\t\t\t\tadd_meta_box(\n\t\t\t\t\t$this->unique_key, // Unique Key\n\t\t\t\t\t$this->options->title ? esc_html__( $this->options->title ) : 'Related Content', //Title\n\t\t\t\t\tarray(&$this, 'custom_meta_render' ), // Callback (builds html)\n\t\t\t\t\t$post_type, // Post type\n\t\t\t\t\t$this->options->context, // Context\n\t\t\t\t\t$this->options->priority, // Priority\n\t\t\t\t\t$callback_args = null\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t}", "private function show_metabox() {\n\t\t$option_key = 'display-metabox-tax-' . $this->taxonomy;\n\n\t\treturn WPSEO_Options::get( $option_key );\n\t}", "function display()\r\n\t {\r\n\t parent::display();\r\n\t }" ]
[ "0.6824733", "0.63388234", "0.6273073", "0.61604035", "0.611771", "0.6108951", "0.5849404", "0.5847074", "0.57807136", "0.5701044", "0.5664816", "0.5651596", "0.56207293", "0.5590396", "0.55867386", "0.5584118", "0.5561699", "0.55547136", "0.5535916", "0.55109686", "0.5510564", "0.55064833", "0.54920095", "0.54850256", "0.5483622", "0.54727817", "0.54704964", "0.5470048", "0.5464432", "0.54374963", "0.541593", "0.54151565", "0.5402337", "0.5390022", "0.53872347", "0.5380587", "0.5369718", "0.53581196", "0.53526574", "0.53407", "0.5340163", "0.53301126", "0.5327349", "0.532404", "0.5320257", "0.53194535", "0.5307646", "0.5294446", "0.5291615", "0.52890825", "0.5288881", "0.5268871", "0.52674997", "0.5266641", "0.526301", "0.5257969", "0.5253234", "0.52454966", "0.5238352", "0.5234193", "0.52289873", "0.52220076", "0.5214874", "0.521207", "0.5211444", "0.5211303", "0.5205095", "0.5203602", "0.5198141", "0.5194197", "0.5189901", "0.5184806", "0.5183966", "0.51800597", "0.51770496", "0.517476", "0.5171522", "0.5167288", "0.5163686", "0.5161233", "0.5159948", "0.51581645", "0.5157766", "0.5152021", "0.51511276", "0.51511276", "0.51511276", "0.5146697", "0.51465034", "0.51453805", "0.5144784", "0.514194", "0.51415676", "0.51384324", "0.5137162", "0.513645", "0.51340073", "0.51242185", "0.5122986", "0.51160085", "0.51153255" ]
0.0
-1
Add a tab to the metabox.
public function addTab( $tab, $index = false ) { if( $index === false ) { $this->_tabs->insert( $tab ); } else { $this->_tabs->insertAt( $tab, $index ); } return $tab; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_tab( $tab ) {\n $this->settings_tabs[] = $tab;\n\n return $this;\n }", "public function add( Tab $tab ): Tab {\n\t\treturn parent::set( $tab->get_id(), $tab );\n\t}", "protected function _addTab(\n TDProject_Core_Interfaces_Block_Widget_Tab $tab) {\n \t$this->addBlock($tab);\n \treturn $tab;\n }", "public function add_tab( $tabs ) {\n\t$tabs['account']['Billing'] = 'billing';\n\treturn $tabs;\n\t}", "public function addTab() {\n\t\tglobal $REQUEST_DATA;\n\n\t\treturn SystemDatabaseManager::getInstance()->runAutoInsert('employee_appraisal_tab', \n array('appraisalTabName','appraisalProofText'), array(trim($REQUEST_DATA['tabName']),trim($REQUEST_DATA['tabProofText'])) \n );\n\t}", "function isms_component_messages_addtab($cbtype, &$cbdata)\n{\n $settings_raw = get_option(\"isms_component_options\");\n if ($settings_raw == \"\")\n $settings = array();\n else\n $settings = unserialize($settings_raw);\n $enabled = grab_array_var($settings, \"enabled\", 0);\n if ($enabled != 1)\n return;\n\n $newtab = array(\n \"id\" => \"isms\",\n \"title\" => \"iSMS\",\n );\n\n $cbdata[\"tabs\"][] = $newtab;\n}", "public function add_tab( $args ) {\n $defaults = array(\n 'title' => false,\n 'id' => false,\n 'content' => '',\n 'callback' => false,\n 'url' => false\n );\n $args = wp_parse_args( $args, $defaults );\n\n $args['id'] = sanitize_html_class( $args['id'] );\n\n // Ensure we have an ID and title.\n if ( ! $args['id'] || ! $args['title'] )\n return;\n\n // Allows for overriding an existing tab with that ID.\n $this->_tabs[ $args['id'] ] = $args;\n\n return $this;\n }", "public function register_data_tab( $tabs ) {\r\n $tabs['tm_extra_product_options'] = array(\r\n 'label' => __( 'TM Extra Product Options', TM_EPO_TRANSLATION ),\r\n 'target' => 'tm_extra_product_options',\r\n 'class' => array( 'tm_epo_class', 'hide_if_grouped' )\r\n );\r\n return $tabs;\r\n }", "public static function add_custom(string $tab_name, $data)\n\t{\n\t\tself::$_custom_tabs[$tab_name] = $data;\n\t}", "function add_staff_tab() {\n\n\t\t\t$count = isset($_POST['count']) ? absint($_POST['count']) : false;\n\t\t\t$this->block_id = isset($_POST['block_id']) ? $_POST['block_id'] : 'mtheme-block-9999';\n\n\t\t\t//default key/value for the tab\n\t\t\t$tab = array(\n\t\t\t\t'social_text' => __('Social Site Name','mthemelocal'),\n\t\t\t\t'social_icon' => '',\n\t\t\t\t'social_link' => ''\n\t\t\t);\n\n\t\t\tif($count) {\n\t\t\t\t$this->tab($tab, $count);\n\t\t\t} else {\n\t\t\t\tdie(-1);\n\t\t\t}\n\n\t\t\tdie();\n\t\t}", "public function addTab($id, Fnde_View_Helper_TabPane $tab) {\n $this->_tabs[$id] = $tab;\n return $this;\n }", "public static function addTab($title, $href)\n {\n array_push(self::$_items, ['title' => $title, 'href' => $href]);\n }", "public function addTab(Event $event)\n {\n $sectionNav = $event->getParam('section_nav');\n $sectionNav['teams'] = 'Teams'; // @translate\n $event->setParam('section_nav', $sectionNav);\n }", "function add_from_tab() {\n ?>\n <a href=\"#wpuf-metabox-qr-code\" class=\"nav-tab\" id=\"wpuf-qr-code-tab\"><?php _e( 'QR Code', 'wpuf-pro' ); ?></a>\n <?php\n }", "function tab_add_instance($tab) {\n global $CFG, $DB;\n\n require_once(\"$CFG->libdir/resourcelib.php\");\n\n $cmid = $tab->coursemodule;\n $tab->timemodified = time();\n\n\n //insert tabs and content\n if ($tab->id = $DB->insert_record(\"tab\", $tab)) {\n\n // we need to use context now, so we need to make sure all needed info is already in db\n $DB->set_field('course_modules', 'instance', $tab->id, array('id' => $cmid));\n $context = context_module::instance($cmid);\n $editoroptions = array('subdirs' => 1, 'maxbytes' => $CFG->maxbytes, 'maxfiles' => -1, 'changeformat' => 1, 'context' => $context, 'noclean' => 1, 'trusttext' => true);\n\n foreach ($tab->tabname as $key => $value) {\n $value = trim($value);\n if (isset($value) && $value <> '') {\n $option = new stdClass();\n $option->tabname = $value;\n $option->tabid = $tab->id;\n\n if (isset($tab->content[$key]['format'])) {\n $option->contentformat = $tab->content[$key]['format'];\n }\n\n if (isset($tab->tabcontentorder[$key])) {\n $option->tabcontentorder = $tab->tabcontentorder[$key];\n }\n\n if (isset($tab->content[$key]['externalurl'])) {\n $option->externalurl = $tab->content[$key]['externalurl'];\n }\n $option->timemodified = time();\n //Must get id number from inserted record to update the editor field (tabcontent)\n $newtab_content_id = $DB->insert_record(\"tab_content\", $option);\n\n //tab content is now an array due to the new editor\n //In order to enter file information from the editor\n //We must now update the record once it has been created\n\n if (isset($tab->content[$key]['text'])) {\n $draftitemid = $tab->content[$key]['itemid'];\n if ($draftitemid) {\n $tabcontentupdate = new stdClass();\n $tabcontentupdate->id = $newtab_content_id;\n $tabcontentupdate->tabcontent = file_save_draft_area_files($draftitemid, $context->id, 'mod_tab', 'content', $newtab_content_id, $editoroptions, $tab->content[$key]['text']);\n $DB->update_record('tab_content', $tabcontentupdate);\n }\n }\n }\n }\n }\n return $tab->id;\n}", "public function testAddPage() {\r\n $callback = function() {\r\n $this->timer->destroy();\r\n $this->application->stop();\r\n };\r\n\r\n $this->timer = new Timer($callback, $this->application->getWindow(), Timer::TEST_TIMEOUT);\r\n $this->timer->start();\r\n\r\n $this->tab = new Tab(Point::createInstance(10, 10), Dimension::createInstance(200, 100));\r\n $this->application->getWindow()->getRootPane()->add($this->tab);\r\n $this->tab->addTabPage('tab1');\r\n $this->tab->addTabPage('tab2');\r\n\r\n $tabPage1 = $this->tab->getTabPage('tab1');\r\n $tabPage2 = $this->tab->getTabPage('tab2');\r\n\r\n $tabPage1->add(new EditBox('box 1.1', Point::createInstance(5, 15), Dimension::createInstance(50, 20)));\r\n $tabPage1->add(new EditBox('box 1.2', Point::createInstance(65, 15), Dimension::createInstance(50, 20)));\r\n\r\n $tabPage2->add(new EditBox('box 2.1', Point::createInstance(5, 15), Dimension::createInstance(50, 20)));\r\n $tabPage2->add(new EditBox('box 2.2', Point::createInstance(5, 45), Dimension::createInstance(50, 20)));\r\n\r\n $this->application->start();\r\n }", "protected function registerTab()\n {\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.review')\n ->label('a-review::review.product-tab')\n ->view('a-review::admin.review.tab');\n });\n }", "public function addTab($title, $renderMethod)\n {\n $tab = new TabPanel($title, $renderMethod);\n $this->tabs[] = $tab;\n return $tab;\n }", "function add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }", "public function add_menu_item( $tabs ) \n\t{\n\t\t$tabs[ $this->id ] = __( 'Deposits', 'woo-deposits' );\n\n\t\treturn $tabs;\n\t}", "public function add_product_tab( $tabs ) {\n\n $tabs['simple'] = array(\n 'label' => __( 'DM bookable', 'mvr' ),\n 'target' => 'dm_bookable_product_options',\n 'class' => 'show_if_simple',\n );\n\n unset( $tabs['shipping'] );\n\n return $tabs;\n }", "protected function createTabs() {}", "public function addMetaboxes() {}", "function add($tab = 'details'){\n\t\t\n\t\t$this->auth->check('rooms.add');\n\t\t$body['tab'] = ($this->session->flashdata('tab')) ? $this->session->flashdata('tab') : $tab;\n\t\t$body['room'] = NULL;\n\t\t$body['room_id'] = NULL;\n\t\t\n\t\t$body['users'] = $this->security->get_users_dropdown(TRUE);\n\t\t$body['cats'] = $this->rooms_model->get_categories_dropdown(TRUE);\n\t\t$body['cats'][-2] = 'Add new ...';\n\t\t\n\t\t$tpl['subnav'] = $this->rooms_model->subnav();\n\t\t$tpl['title'] = 'Add room';\n\t\t$tpl['pagetitle'] = 'Add a new room';\n\t\t$tpl['body'] = $this->load->view('rooms/addedit', $body, TRUE);\n\t\t$this->load->view($this->tpl, $tpl);\n\t\t\n\t}", "private function addTabToTca($table, $tabName) {\n $GLOBALS['TCA'][$table]['types'][1]['showitem'] .= \",\\n--div--;\" . $tabName;\n }", "function tabify_add_meta_boxes($post_type)\n {\n }", "public function register_tabs() {\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/get-response.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/mailchimp.php' );\n\n\t\t$tabs = apply_filters( 'jet-engine/dashboard/form-tabs', array(\n\t\t\tnew Captcha(),\n\t\t\tnew Active_Campaign(),\n\t\t\tnew Get_Response(),\n\t\t\tnew Mailchimp(),\n\t\t) );\n\n\t\tforeach ( $tabs as $tab ) {\n\t\t\tif ( $tab instanceof Base_Form_Tab ) {\n\t\t\t\t$this->register_tab( $tab );\n\t\t\t}\n\t\t}\n\t}", "public function add_settings_tab($settings_tabs) {\r\n $settings_tabs[$this->id] = __('SMS-EI', 'woocommerce-twilio-estatic');\r\n return $settings_tabs;\r\n }", "public function tab($id, $caption, $url, $position)\n\t\t{\n\t\t\treturn $this->tabs[] = new Backend_Tab($id, $caption, $url, $position, $this->_moduleId);\n\t\t}", "function add() {\n\t\tforeach ($this->_meta_box['pages'] as $page) {\n\t\t\tadd_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n\t\t}\n\t}", "function add_pricing_table_tab() {\n\n\t\t\t$count = isset($_POST['count']) ? absint($_POST['count']) : false;\n\t\t\t$this->block_id = isset($_POST['block_id']) ? $_POST['block_id'] : 'mtheme-block-9999';\n\n\t\t\t//default key/value for the tab\n\t\t\t$tab = array(\n\t\t\t\t'title' => __('Pricing Tab','mthemelocal'),\n\t\t\t\t'featured' => '',\n\t\t\t\t'currency' => '',\n\t\t\t\t'price' => '',\n\t\t\t\t'duration' => '',\n\t\t\t);\n\n\t\t\tif($count) {\n\t\t\t\t$this->tab($tab, $count);\n\t\t\t} else {\n\t\t\t\tdie(-1);\n\t\t\t}\n\n\t\t\tdie();\n\t\t}", "public function addContainer(&$container)\n {\n parent::addContainer($container);\n \n if (ObjectIntrospector::isA($container, 'TabPage') && $this->activeTabPagePersistor->getValue() == '')\n $this->activeTabPagePersistor->setValue($container->getName());\n }", "function add() {\n foreach ($this->_meta_box['pages'] as $page) {\n add_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n }\n }", "function add() {\n foreach ($this->_meta_box['pages'] as $page) {\n add_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n }\n }", "abstract public function bootAddTab($group, $id, $label);", "private function createTab()\n {\n try {\n if (LengowMain::compareVersion()) {\n $tabParent = new Tab();\n $tabParent->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tabParent->module = 'lengow';\n $tabParent->class_name = 'AdminLengow';\n $tabParent->id_parent = 0;\n $tabParent->add();\n } else {\n $tabParent = new Tab(Tab::getIdFromClassName('AdminCatalog'));\n $tab = new Tab();\n $tab->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tab->module = 'lengow';\n $tab->class_name = 'AdminLengowHome14';\n $tab->id_parent = $tabParent->id;\n $tab->add();\n $tabParent = $tab;\n }\n foreach ($this->tabs as $name => $values) {\n if (_PS_VERSION_ < '1.5' && $values['name'] === 'AdminLengowHome') {\n continue;\n }\n $tab = new Tab();\n if (_PS_VERSION_ < '1.5') {\n $tab->class_name = $values['name'] . '14';\n $tab->id_parent = $tabParent->id;\n } else {\n $tab->class_name = $values['name'];\n $tab->id_parent = $tabParent->id;\n $tab->active = $values['active'];\n }\n $tab->module = $this->lengowModule->name;\n $languages = Language::getLanguages(false);\n foreach ($languages as $language) {\n $tab->name[$language['id_lang']] = LengowMain::decodeLogMessage($name, $language['iso_code']);\n }\n $tab->add();\n LengowMain::log(\n LengowLog::CODE_INSTALL,\n LengowMain::setLogMessage('log.install.install_tab', array('class_name' => $tab->class_name))\n );\n }\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "public function register_tab( $tabs, $current ) {\n\t\t$query = array();\n\n\t\t$query['autofocus[panel]'] = 'helpful';\n\n\t\t$section_link = add_query_arg( $query, admin_url( 'customize.php' ) );\n\n\t\t$tabs['design'] = array(\n\t\t\t'id' => 'design',\n\t\t\t'name' => esc_html_x( 'Design', 'tab name', 'helpful' ),\n\t\t\t'href' => $section_link,\n\t\t);\n\n\t\treturn $tabs;\n\t}", "public static function add_metaboxes(){}", "function woocommerce_product_write_panel_tabs(){\n ?>\n <li class=\"custom_tab\">\n <a href=\"#custom_tab_data_ctabs\">\n <?php _e('Custom Tabs', 'GWP'); ?>\n </a>\n </li>\n <?php\n }", "public function register($name, $tabs)\n {\n $this->tabs[$name] = $tabs;\n }", "function jr_wp_pagenavi_add_tab( $result ) {\r\n\t$tab = jr_dashboard_curr_page_tab();\r\n\treturn add_query_arg( $tab, $result );\r\n}", "private function createTab() {\n\t\t$moduleToken = t3lib_formprotection_Factory::get()->generateToken('moduleCall', self::MODULE_NAME);\n\t\treturn $this->doc->getTabMenu(\n\t\t\tarray('M' => self::MODULE_NAME, 'moduleToken' => $moduleToken, 'id' => $this->id),\n\t\t\t'tab',\n\t\t\tself::IMPORT_TAB,\n\t\t\tarray(self::IMPORT_TAB => $GLOBALS['LANG']->getLL('import_tab'))\n\t\t\t) . $this->doc->spacer(5);\n\t}", "function cnew_custom_metabox_add() {\r\n add_meta_box(\r\n 'cnew_custom_metabox_workshop', \r\n __( 'Informações da Oficina', 'cnew' ), \r\n 'cnew_workshop_custom_metabox_callback', \r\n 'cnew_workshop', \r\n 'normal',\r\n 'high'\r\n );\r\n\r\n add_meta_box(\r\n 'cnew_custom_metabox_registration', \r\n __( 'Formulário de Inscrição', 'cnew' ), \r\n 'cnew_registration_custom_metabox_callback', \r\n 'cnew_registration', \r\n 'normal',\r\n 'high'\r\n );\r\n }", "function setTabs(){\n global $ilTabs, $ilCtrl, $ilAccess, $ilLocator;\n\n // show current quiz round inlcuding link and QR code (deadline)\n if ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showCurrentRound\", $this->txt(\"tabmenu_showCurrentRound\"), $ilCtrl->getLinkTarget($this, \"showCurrentRound\"));\n }\n\n // tab for the \"edit quiz\" command\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"editQuiz\", $this->txt(\"tabmenu_edit_quiz\"), $ilCtrl->getLinkTarget($this, \"editQuiz\"));\n }\n\n // show round results\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showResults\", $this->txt(\"tabmenu_show_result\"), $ilCtrl->getLinkTarget($this, \"showResults\"));\n }\n\n // a \"properties\" tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"properties\", $this->txt(\"tabmenu_properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n $this->addPermissionTab();\n }\n\n // information Tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"info\", $this->txt(\"tabmenu_info\"), $ilCtrl->getLinkTarget($this, \"info\"));\n }\n\n }", "function cspm_add_locations_tabs($metabox_object, $metabox_options){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Setting tabs */\r\n\t\t\t \r\n\t\t\t$tabs_setting = array(\r\n\t\t\t\t'args' => $metabox_options,\r\n\t\t\t\t'tabs' => array()\r\n\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t * Tabs array */\r\n\t\t\t\t \r\n\t\t\t\t$cspm_tabs = array(\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**\r\n\t\t\t\t \t * Coordinates */\r\n\t\t\t\t\t \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'id' => 'post_coordinates', \r\n\t\t\t\t\t\t'title' => 'GPS Coordinates', \r\n\t\t\t\t\t\t'callback' => 'cspm_post_coordinates_fields'\r\n\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 * Marker */\r\n\t\t\t\t\t \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'id' => 'post_marker', \r\n\t\t\t\t\t\t'title' => 'Marker', \r\n\t\t\t\t\t\t'callback' => 'cspm_post_marker_fields'\r\n\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 * Marker Label\r\n\t\t\t\t\t * @since 5.5 */\r\n\t\t\t\t\t \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'id' => 'post_marker_label', \r\n\t\t\t\t\t\t'title' => 'Marker Label', \r\n\t\t\t\t\t\t'callback' => 'cspm_post_marker_label_fields'\r\n\t\t\t\t\t),\r\n\r\n\t\t\t\t\t/**\r\n\t\t\t\t \t * Format & Media */\r\n\t\t\t\t\t \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'id' => 'post_format_and_media', \r\n\t\t\t\t\t\t'title' => 'Format & Media', \r\n\t\t\t\t\t\t'callback' => 'cspm_post_format_and_media'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t\r\n\t\t\t\t);\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Custom Fields of the extension \"Submit locations\"\r\n\t\t\t\t * @since 5.3 */\r\n\t\t\t\t\r\n\t\t\t\tif(class_exists('CspmSubmitLocations')){ \r\n\t\t\t\t\t$cspm_tabs[] = array(\r\n\t\t\t\t\t\t'id' => 'post_submited_custom_fields', \r\n\t\t\t\t\t\t'title' => 'Custom Fields', \r\n\t\t\t\t\t\t'callback' => 'cspm_post_submit_locations_custom_fields'\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tforeach($cspm_tabs as $tab_data){\r\n\t\t\t\t \r\n\t\t\t\t\t$tabs_setting['tabs'][] = array(\r\n\t\t\t\t\t\t'id' => 'cspm_' . $tab_data['id'],\r\n\t\t\t\t\t\t'title' => '<span class=\"cspm_tabs_menu_image\"><img src=\"'.$this->plugin_url.'admin/img/add-locations-metabox/'.str_replace('_', '-', $tab_data['id']).'.png\" style=\"width:20px;\" /></span> <span class=\"cspm_tabs_menu_item\">'.esc_attr__( $tab_data['title'], 'cspm' ).'</span>',\t\t\t\t\t\t\r\n\t\t\t\t\t\t'fields' => call_user_func(array($this, $tab_data['callback'])),\r\n\t\t\t\t\t);\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * Set tabs */\r\n\t\t\t \r\n\t\t\t$metabox_object->add_field( array(\r\n\t\t\t\t'id' => 'cspm_add_locations_tabs',\r\n\t\t\t\t'type' => 'tabs',\r\n\t\t\t\t'tabs' => $tabs_setting\r\n\t\t\t) );\r\n\t\t\t\r\n\t\t\treturn $metabox_object;\r\n\t\t\t\r\n\t\t}", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "public function set_tabs() {\n\t\t\t$tabs = [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'business_info',\n\t\t\t\t\t'title' => __( 'Business info', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'admin-home',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'opening_hours',\n\t\t\t\t\t'title' => __( 'Opening hours', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'clock',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'maps_settings',\n\t\t\t\t\t'title' => __( 'Map settings', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'location-alt',\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t$tabs = apply_filters( 'wpseo-local-location-meta-tabs', $tabs );\n\n\t\t\t$this->tabs = $tabs;\n\t\t}", "function add_admin() {\n\t\t\t$this->pagehook = add_options_page(\n\t\t\t\t\t__( \"Subpages as Tabs\" )\n\t\t\t\t\t, __( \"Subpages as Tabs\" )\n\t\t\t\t\t, 'manage_options'\n\t\t\t\t\t, 'subpage_tabs_plugin'\n\t\t\t\t\t, array( $this, 'plugin_options_page' )\n\t\t\t\t);\n\n\t\t\t//register callback to gets call prior your options_page rendering\n\t\t\tadd_action( 'load-' . $this->pagehook, array( &$this, 'add_the_meta_boxes' ) );\n\t\t}", "function hankart_add_manual_tab( $tabs ) {\n\t$tabs['pdf_manual'] = array(\n\t\t'title' \t=> __( 'Manual', 'storefront' ),\n\t\t'priority' \t=> 50,\n\t\t'callback' \t=> 'hankart_add_manual_tab_content'\n\t);\n\treturn $tabs;\n}", "public function register()\n\t\t{\n\t\t\tif( empty($this->_postType) ) {\n\t\t\t\twp_die( 'Empty metabox post type.' );\n\t\t\t}\n\n\t\t\t$all_empty = true;\n\n\t\t\tforeach( $this->getTabs() as $tab ) {\n\t\t\t\tif ( ! $this->_alwaysDisplay && $tab->getContainers()->size() == 0 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tforeach ( $tab->getContainers() as $container ) {\n\t\t\t\t\tif ( ! $this->_alwaysDisplay && $container->getFields()->size() == 0 ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$all_empty = false;\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( $all_empty ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->_id = \"metabox_{$this->_postType}_{$this->_slug}\";\n\n\t\t\tadd_meta_box(\n\t\t\t\t$this->_id,\n\t\t\t\t$this->_title,\n\t\t\t\tarray($this, 'render'),\n\t\t\t\t$this->_postType,\n\t\t\t\t$this->_position,\n\t\t\t\t$this->_priority\n\t\t\t);\n\n\t\t\tadd_action( 'admin_head', array($this, 'disableHideMetaboxes') );\n\t\t}", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }", "public function add_help_tab() {\n\t\t$screen = get_current_screen();\n\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'support',\n\t\t\t\t'title' => 'Support',\n\t\t\t\t'content' => '',\n\t\t\t\t'callback' => array( $this, 'display' ),\n\t\t\t)\n\t\t);\n\t}", "public function woo_new_product_tab( $tabs ) {\n\n\t\t// Adds the new tab\n\n\t\t$tabs['contents'] = array(\n\t\t\t'title' => __( 'Contents', 'woocommerce' ),\n\t\t\t'priority' => 20,\n\t\t\t'callback' => array( $this, 'contents_tab_content' )\n\t\t);\n\n\t\t$tabs['authors'] = array(\n\t\t\t'title' => __( 'Author(s)', 'woocommerce' ),\n\t\t\t'priority' => 30,\n\t\t\t'callback' => array( $this, 'authors_tab_content' )\n\t\t);\n\n\t\tunset( $tabs['reviews'] ); // Remove the reviews information tab\n\n\t\t$tabs['heweb17reviews'] = array(\n\t\t\t'title' => __( 'Reviews', 'woocommerce' ),\n\t\t\t'priority' => 40,\n\t\t\t'callback' => array( $this, 'reviews_tab_content' )\n\t\t);\n\n\t\tunset( $tabs['additional_information'] ); // Remove the additional information tab\n\n\t\treturn $tabs;\n\n\t}", "public function add_settings_tab($settings_tabs){\n $settings_tabs['opening-hours'] = __('Opening Hours', 'woocommerce-opening-hours');\n return $settings_tabs;\n }", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Word linkages',\n\t\t\t'Word linkages',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'linkages_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'Answers',\n\t\t\t'Answers',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'answers_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}", "public function addTab($blockName, $blockTitle) {\n \treturn $this->_addTab(\n \t\tnew TDProject_Core_Block_Widget_Tab(\n \t\t $this->getContext(), \n \t\t $blockName, \n \t\t $blockTitle\n \t\t)\n );\n }", "public function add_product_tab() {\n\n\t\t?><li class=\"wc_pre_orders_tab wc_pre_orders_options\"><a href=\"#wc_pre_orders_data\"><?php _e( 'Pre-Orders', WC_Pre_Orders::TEXT_DOMAIN ); ?></a></li><?php\n\t}", "function init()\n\t{\n\t\t$this->setType(\"tabs\");\n\t}", "public function add_settings_tabs() {\n\t\t$install_tabs = [ 'git_updater_addons' => esc_html__( 'API Add-Ons', 'git-updater' ) ];\n\t\tadd_filter(\n\t\t\t'gu_add_settings_tabs',\n\t\t\tfunction ( $tabs ) use ( $install_tabs ) {\n\t\t\t\treturn array_merge( $tabs, $install_tabs );\n\t\t\t}\n\t\t);\n\t\tadd_filter(\n\t\t\t'gu_add_admin_page',\n\t\t\tfunction ( $tab, $action ) {\n\t\t\t\t$this->add_admin_page( $tab, $action );\n\t\t\t},\n\t\t\t10,\n\t\t\t2\n\t\t);\n\t}", "public function addWithTab($widgetType, $tab)\n {\n $widgets = [];\n switch ($tab) {\n case 'search':\n // code...\n break;\n /*\n case 'upload':\n # code...\n break;\n */\n case 'api':\n $widgets = $this->getPaginatorFromApi($widgetType);\n break;\n\n default:\n return redirect()->route('zxadmin.widget.addWithTab', 'search');\n break;\n }\n\n return view_backend('widget.add', compact('widgets', 'tab', 'widgetType'));\n }", "public function add_settings_tab($settings_tabs){\n $settings_tabs['opening_hours'] = __('Opening Hours', 'woocommerce-opening-hours');\n return $settings_tabs;\n }", "public function installTabs()\n {\n TabManager::addTab('AdminTraining', 'Training Menu', 'training', 'AdminTools');\n TabManager::addTab('AdminTrainingIndexClass', 'Controller exemple', 'training', 'AdminTraining');\n TabManager::addTab('AdminTrainingGridClass', 'Grid exemple', 'training', 'AdminTraining');\n\n return true;\n }", "public function kiwip_add_meta_box(){\t\t\t\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->title,\n\t\t\tarray(&$this, 'kiwip_metabox_callback'),\n\t\t\t$this->cpt_name,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\t}", "public function add_settings_tab( $settings_tabs ) {\n\n\t\t$settings_tabs[ $this->settings_tab_id ] = __( 'Pre-Orders', WC_Pre_Orders::TEXT_DOMAIN );\n\n\t\treturn $settings_tabs;\n\t}", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"FIELDTHEMES\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab_2->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldBrandSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configuge brands\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "public function add_admin_page( $tab, $action ) {\n\t\tif ( 'git_updater_addons' === $tab ) {\n\t\t\t$this->action = add_query_arg( 'tab', $tab, $action );\n\t\t\t$this->admin_page_notices();\n\t\t\tdo_settings_sections( 'git_updater_addons_settings' );\n\t\t}\n\t}", "function lb_merchant_product_tab( $tabs ) {\n global $product;\n \n $merchant_text = get_post_meta( $product->id, 'wpcf-merchant-information', true );\n \n if('' != trim($merchant_text)) {\n // Adds the new tab\n\n $tabs['test_tab'] = array(\n 'title' \t=> __('About Merchant', 'lyxbling'),\n 'priority' \t=> 50,\n 'callback' \t=> 'lb_merchant_product_tab_content'\n );\n\n return $tabs;\n } else {\n return $tabs;\n }\n}", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldSpecialProduct\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure specials products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "function account_tab( $tabs ) {\n\n\t\t$tabs[1000]['points']['icon'] = 'um-faicon-trophy';\n\t\t$tabs[1000]['points']['title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['submit_title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['show_button'] = false;\n\n\t\treturn $tabs;\n\t}", "public function register( $tabs, $sections, $fields ) {\n\n $this->set_tabs( $tabs );\n $this->set_sections( $sections );\n $this->set_fields( $fields );\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n\t// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldFeaturedProductSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure featured products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "function bd_custom_tabs_Widget(){\n\n\t\t// Widget settings\n\t\t$ops = array('classname' => 'widget_custom_tabs', 'description' => __('3 tabs: last posts, popular posts, and last comments', 'wolf'));\n\n\t\t/* Create the widget. */\n\t\tparent::__construct( 'widget_custom_tabs', __('Custom tabs', 'wolf'), $ops );\n\t\t\n\t}", "public function add($item)\n {\n $this->addArray('content', $item, array('ButtonContainer', 'Container', 'Form', 'Heading', 'HTML', 'Image', 'Checkbox', 'Email', 'HiddenField', 'Label', 'Password', 'Phone', 'RadioButtons', 'SelectMenu', 'TextInput', 'TextArea', 'Upload', 'XList', 'Table'));\n }", "function rc_add_woocommerce_product_data_tab( $tabs ) {\n\n\t$tabs['access'] = array(\n\t\t'label' => __( 'Access Control', 'restrict-content' ),\n\t\t'target' => 'rc_access_control',\n\t\t'class' => array(),\n\t);\n\n\treturn $tabs;\n}", "function setTabs($a_tab = \"levels\")\n\t{\n\t\tglobal $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;\n\n\t\t$ilTabs->clearTargets();\n\t\t$ilHelp->setScreenIdComponent(\"skmg_skll\");\n//\t\t$ilTabs->setBackTarget($lng->txt(\"skmg_skill_hierarchie\"),\n//\t\t\t$ilCtrl->getLinkTargetByClass(\"ilobjskillmanagementgui\", \"editSkills\"));\n\n\t\tif (is_object($this->node_object))\n\t\t{\n\n\t\t\t// levels\n\t\t\t$ilTabs->addTab(\"levels\", $lng->txt(\"skmg_skill_levels\"),\n\t\t\t\t$ilCtrl->getLinkTarget($this, 'edit'));\n\t\n\t\t\t// properties\n\t\t\t$ilTabs->addTab(\"properties\", $lng->txt(\"settings\"),\n\t\t\t\t$ilCtrl->getLinkTarget($this, 'editProperties'));\n\n\t\t\t// usage\n\t\t\t$this->addUsageTab($ilTabs);\n\n\t\t\t$ilCtrl->setParameterByClass(\"ilskillrootgui\", \"obj_id\",\n\t\t\t\t$this->node_object->skill_tree->getRootId());\n\t\t\t$ilTabs->setBackTarget($lng->txt(\"obj_skmg\"),\n\t\t\t\t$ilCtrl->getLinkTargetByClass(\"ilskillrootgui\", \"listSkills\"));\n\t\t\t$ilCtrl->setParameterByClass(\"ilskillrootgui\", \"obj_id\",\n\t\t\t\t$_GET[\"obj_id\"]);\n\t\t\t\n\t\t\t$ilTabs->activateTab($a_tab);\n\n\t\t\t$tpl->setTitle($lng->txt(\"skmg_skill\").\": \".\n\t\t\t\t$this->node_object->getTitle());\n\t\t\n\t\t\t$this->setSkillNodeDescription();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tpl->setTitle($lng->txt(\"skmg_skill\"));\n\t\t\t$tpl->setDescription(\"\");\n\t\t}\n\t\tparent::setTitleIcon();\n\t}", "public function add_to_menu_metabox()\n\t\t{\n\t\t\tadd_meta_box(\n\t\t\t\t$this->the_theme->alias . '_details', \n\t\t\t\t__('Partner Details', $this->the_theme->localizationName), \n\t\t\t\tarray($this, 'custom_metabox'), \n\t\t\t\t'partners', \n\t\t\t\t'normal'\n\t\t\t);\n\t\t}", "public function auction_meta_tab( $tabs ) { \n\n\t\t$tabs[ 'simple_auction' ] = array( \n\t\t\t\t\t'label' => __( 'Auction', 'wcvendors-pro-simple-auctions' ), \n\t\t\t\t\t'target' => 'auction',\n\t\t\t\t\t'class' => array( 'auction_tab', 'show_if_auction', 'hide_if_grouped', 'hide_if_external', 'hide_if_variable', 'hide_if_simple' ),\n\t\t\t\t);\n\n\t\treturn $tabs; \n\t\n\t}", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Translation',\n\t\t\t'Translation',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'meta_box',\n\t\t\t),\n\t\t\t'words',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "public static function add_meta_box() {\n add_meta_box(\n 'link_meta', // Unique ID\n 'Properties', // Box title\n [self::class, 'meta_html'], // Content callback, must be of type callable\n \"link\" // Post type\n );\n }", "public function createTab( $title, $slug, $index=false )\n\t\t{\n\t\t\t$tab = new THB_MetaboxTab( $title, $slug );\n\t\t\t$this->addTab( $tab, $index );\n\n\t\t\treturn $tab;\n\t\t}", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "function hankart_add_tech_spec( $tabs ) {\n\t$tabs['tech_spec'] = array(\n\t\t'title' \t=> __( 'Technical specifications', 'storefront' ),\n\t\t'priority' \t=> 50,\n\t\t'callback' \t=> 'hankart_add_tech_spec_content'\n\t);\n\treturn $tabs;\n}", "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "public function add_metabox() {\r\n\t\tadd_meta_box(\r\n\t\t\t'stats', // ID\r\n\t\t\t'Stats', // Title\r\n\t\t\tarray(\r\n\t\t\t\t$this,\r\n\t\t\t\t'meta_box', // Callback to method to display HTML\r\n\t\t\t),\r\n\t\t\t'spam-stats', // Post type\r\n\t\t\t'normal', // Context, choose between 'normal', 'advanced', or 'side'\r\n\t\t\t'core' // Position, choose between 'high', 'core', 'default' or 'low'\r\n\t\t);\r\n\t}", "protected function addObjectMappingTab(ilTabsGUI $tabs)\n {\n global $tpl;\n\n $mappings = array_filter(MetadataService::getInstance()->getMappings($this->ctrl->getContextObjType()), function (ilObjectMapping $mapping) : bool {\n return MetadataService::getInstance()->canBeShow($this->getObject(), $mapping, MetadataService::SHOW_CONTEXT_EDIT_IN_TAB);\n });\n static $added = false;\n foreach ($mappings as $mapping) {\n /** @var $mapping ilObjectMapping */\n $this->ctrl->setParameterByClass(srmdGUI::class, 'ref_id', $this->getObject()->getRefId());\n $this->ctrl->setParameterByClass(srmdGUI::class, 'mapping_id', $mapping->getId());\n $link = $this->ctrl->getLinkTargetByClass(array(ilUIPluginRouterGUI::class, srmdGUI::class), srmdGUI::CMD_SHOW);\n $tabs->addTab('srmd_mapping_' . $mapping->getId(), $mapping->getTabTitle(), $link);\n if (!$added) {\n $added = true;\n // Hack to not make the tab active -.-\n $tpl->addOnLoadCode(\"\n var activeTabs = $('#ilTab li.active'); \n if (activeTabs.length > 1) { \n activeTabs.each(function(i) { \n if (i > 0) $(this).removeClass('active');\n }); \n }\");\n }\n }\n }", "public function add_location_tab( $tabs ) {\n\n\t\t$tabs['location'] = array(\n\t\t\t'title' => __( 'Location', 'blox' ),\n\t\t\t'scope' => 'global' // all, local, or global\n\t\t);\n\n\t\treturn $tabs;\n\t}", "public function addWidget()\r\n {\r\n }", "public function add_product_tab_content() {\n global $product_object;\n include MVR_TEMPLATES_DIR . 'woocommerce/dm_settings.php';\n }", "public function register_metabox() {\n\t\t$fm = new Fieldmanager_Group( [\n\t\t\t'name' => 'hero_fields', // \"name\" id deceiving, used as the key/ID.\n\t\t\t'serialize_data' => false,\n\t\t\t'add_to_prefix' => false,\n\t\t\t'children' => [\n\t\t\t\t'_headline' => new Fieldmanager_RichTextArea( 'Main Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t\t'_subheadline' => new Fieldmanager_RichTextArea( 'Sub Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t],\n\t\t] );\n\n\t\t/**\n\t\t * Initiate the metabox\n\t\t */\n\t\t$fm->add_meta_box( 'Hero', 'page' );\n\t}", "private function createTypographyTab()\n {\n $tab = $this->createTab(\n 'typo_tab',\n '__responsive_tab_typo__',\n ['attributes' => ['autoScroll' => true]]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetBasic = $this->createFieldSet(\n 'typo_base',\n '__responsive_tab_typo_fieldset_base__',\n ['attributes' => $attributes]\n );\n\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-base-stack',\n '@font-base-stack',\n $this->themeFontDefaults['font-base-stack']\n )\n );\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-headline-stack',\n '@font-headline-stack',\n $this->themeFontDefaults['font-headline-stack']\n )\n );\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-size-base',\n '@font-size-base',\n $this->themeFontDefaults['font-size-base']\n )\n );\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-base-weight',\n '@font-base-weight',\n $this->themeFontDefaults['font-base-weight']\n )\n );\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-light-weight',\n '@font-light-weight',\n $this->themeFontDefaults['font-light-weight']\n )\n );\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-bold-weight',\n '@font-bold-weight',\n $this->themeFontDefaults['font-bold-weight']\n )\n );\n\n $tab->addElement($fieldSetBasic);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetHeadlines = $this->createFieldSet(\n 'typo_headlines',\n '__responsive_tab_typo_fieldset_headlines__',\n ['attributes' => $attributes]\n );\n\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h1',\n '@font-size-h1',\n $this->themeFontDefaults['font-size-h1']\n )\n );\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h2',\n '@font-size-h2',\n $this->themeFontDefaults['font-size-h2']\n )\n );\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h3',\n '@font-size-h3',\n $this->themeFontDefaults['font-size-h3']\n )\n );\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h4',\n '@font-size-h4',\n $this->themeFontDefaults['font-size-h4']\n )\n );\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h5',\n '@font-size-h5',\n $this->themeFontDefaults['font-size-h5']\n )\n );\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h6',\n '@font-size-h6',\n $this->themeFontDefaults['font-size-h6']\n )\n );\n\n $tab->addElement($fieldSetHeadlines);\n\n return $tab;\n }", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "function change_tabs($tabs){\n $tabs['additional_information']['title'] = 'Характеристики';\n return $tabs;\n}", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增轮播图';\n $this->global['pageName'] = 'carousel_add';\n $data = '';\n\n $this->loadViews(\"carousel_add\", $this->global, $data, NULL);\n }\n }", "function register_post_metabox( $id,$title,$post_type) {\r\n\t\t$this->has_post_meta = true;\r\n\t\tadd_meta_box( \r\n\t\t\t$id, \r\n\t\t\t$title, \r\n\t\t\tarray(&$this,'post_meta_builder'), \r\n\t\t\t$post_type, \r\n\t\t\t'normal', \r\n\t\t\t'high', \r\n\t\t\t$this->postmeta[$post_type][$id] \r\n\t\t);\r\n\t}", "function ch_widget_tabcontent($args, $number = 1) {\n\textract($args);\n\t$options = get_option('widget_tabcontent');\n\t\n\tinclude(TEMPLATEPATH . '/tabcontent.php');\n\t\n}", "public function createTabsHistorique()\n {\n $tab = new Tab();\n $tab->active = 1;\n $names = array(1 => 'Historique CA', 'Historique CA');\n foreach (Language::getLanguages() as $language) {\n $tab->name[$language['id_lang']] = isset($names[$language['id_lang']])\n ? $names[$language['id_lang']] : $names[1];\n }\n $tab->class_name = 'AdminHistorique';\n $tab->module = $this->name;\n $tab->id_parent = Tab::getIdFromClassName('AdminParentStats');\n\n return (bool)$tab->add();\n }", "function siteorigin_panels_add_help_tab($prefix) {\n\t$screen = get_current_screen();\n\tif(\n\t\t( $screen->base == 'post' && ( in_array( $screen->id, siteorigin_panels_setting( 'post-types' ) ) || $screen->id == '') )\n\t\t|| ($screen->id == 'appearance_page_so_panels_home_page')\n\t) {\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'panels-help-tab', //unique id for the tab\n\t\t\t'title' => __( 'Page Builder', 'positive-panels' ), //unique visible title for the tab\n\t\t\t'callback' => 'siteorigin_panels_add_help_tab_content'\n\t\t) );\n\t}\n}", "public function create_tab_content( $key, $tab ) {\n $this->print_download_link_html();\n }", "public function addCustomerManagerTab($observer) {\n $block = $observer->getEvent()->getBlock();\n $class = get_class($block);\n if ($class=='Mage_Adminhtml_Block_Customer_Edit_Tabs') {\n $content = $block->getLayout()\n ->createBlock('Magemore_Calltab_Block_Customer_Edit_Tab_Manager')->initForm()->toHtml();\n $block->addTab('managers', array(\n 'label' => 'Assign Calltab Manager',\n 'content' => $content\n ));\n }\n return $this;\n }" ]
[ "0.71151733", "0.6978347", "0.6905", "0.6701574", "0.6502319", "0.64703166", "0.6458676", "0.6395772", "0.6391549", "0.63236976", "0.62922823", "0.62161165", "0.6179675", "0.6161683", "0.6139258", "0.6114777", "0.6095323", "0.6082307", "0.60687786", "0.60071903", "0.59770817", "0.59460145", "0.59434986", "0.59401333", "0.5878646", "0.581123", "0.5809357", "0.5787395", "0.5766386", "0.57639956", "0.5762056", "0.57527137", "0.5722474", "0.5722474", "0.57103115", "0.5696005", "0.5694302", "0.56906354", "0.5654366", "0.5632546", "0.56144005", "0.5607766", "0.5569791", "0.5537891", "0.55286425", "0.55099446", "0.5497328", "0.54924417", "0.54890025", "0.5484829", "0.5470527", "0.54544544", "0.54327357", "0.54295254", "0.54280293", "0.5410377", "0.540333", "0.5388738", "0.538713", "0.53834504", "0.53783846", "0.5375744", "0.5372922", "0.536924", "0.5355315", "0.53547657", "0.5353609", "0.5351054", "0.5349284", "0.53471416", "0.5345556", "0.53433955", "0.5336468", "0.5311199", "0.5298406", "0.52896535", "0.5270797", "0.52694976", "0.526796", "0.52573526", "0.52535796", "0.5247495", "0.5237492", "0.5199782", "0.5195549", "0.51948273", "0.5191099", "0.51808536", "0.51668316", "0.5161117", "0.5151477", "0.5133794", "0.5124404", "0.5105457", "0.51010203", "0.5099064", "0.5096054", "0.50940424", "0.5082451", "0.5069297" ]
0.6559317
4
Create a new metabox tab.
public function createTab( $title, $slug, $index=false ) { $tab = new THB_MetaboxTab( $title, $slug ); $this->addTab( $tab, $index ); return $tab; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createTabs() {}", "private function createTab()\n {\n try {\n if (LengowMain::compareVersion()) {\n $tabParent = new Tab();\n $tabParent->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tabParent->module = 'lengow';\n $tabParent->class_name = 'AdminLengow';\n $tabParent->id_parent = 0;\n $tabParent->add();\n } else {\n $tabParent = new Tab(Tab::getIdFromClassName('AdminCatalog'));\n $tab = new Tab();\n $tab->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tab->module = 'lengow';\n $tab->class_name = 'AdminLengowHome14';\n $tab->id_parent = $tabParent->id;\n $tab->add();\n $tabParent = $tab;\n }\n foreach ($this->tabs as $name => $values) {\n if (_PS_VERSION_ < '1.5' && $values['name'] === 'AdminLengowHome') {\n continue;\n }\n $tab = new Tab();\n if (_PS_VERSION_ < '1.5') {\n $tab->class_name = $values['name'] . '14';\n $tab->id_parent = $tabParent->id;\n } else {\n $tab->class_name = $values['name'];\n $tab->id_parent = $tabParent->id;\n $tab->active = $values['active'];\n }\n $tab->module = $this->lengowModule->name;\n $languages = Language::getLanguages(false);\n foreach ($languages as $language) {\n $tab->name[$language['id_lang']] = LengowMain::decodeLogMessage($name, $language['iso_code']);\n }\n $tab->add();\n LengowMain::log(\n LengowLog::CODE_INSTALL,\n LengowMain::setLogMessage('log.install.install_tab', array('class_name' => $tab->class_name))\n );\n }\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "private function createTab() {\n\t\t$moduleToken = t3lib_formprotection_Factory::get()->generateToken('moduleCall', self::MODULE_NAME);\n\t\treturn $this->doc->getTabMenu(\n\t\t\tarray('M' => self::MODULE_NAME, 'moduleToken' => $moduleToken, 'id' => $this->id),\n\t\t\t'tab',\n\t\t\tself::IMPORT_TAB,\n\t\t\tarray(self::IMPORT_TAB => $GLOBALS['LANG']->getLL('import_tab'))\n\t\t\t) . $this->doc->spacer(5);\n\t}", "function create(&$a_pg_obj, $a_hier_id, $a_pc_id = \"\")\n\t{\n\t\t$this->node = $this->createPageContentNode();\n\t\t$a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);\n\t\t$this->tabs_node =& $this->dom->create_element(\"Tabs\");\n\t\t$this->tabs_node =& $this->node->append_child($this->tabs_node);\n\t}", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n\t// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldFeaturedProductSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure featured products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldSpecialProduct\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure specials products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"FIELDTHEMES\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab_2->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldBrandSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configuge brands\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "function create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PAGE SETTINGS', 'new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}", "public function actionCreate()\n {\n $this->can('createTabs');\n $model = new Tabs();\n\n if ($model->load(Yii::$app->request->post())) {\n $max = Tabs::find()->select('position')->asArray()->orderBy('position DESC')->one();\n $model->position = $max['position']+1;\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n $parents = ArrayHelper::map(Tabs::find()->where(['parent' => 0])->asArray()->all(), 'id', 'name');\n $parents[0] = Yii::t('app', 'Menu');\n ksort($parents);\n\n $Tabs = ArrayHelper::index(Tabs::find()->asArray()->all(), 'id');\n\n $items = Tabs::generateTree($Tabs, 0);\n\n return $this->render('create', [\n 'model' => $model,\n 'parents' => $parents,\n 'items' => $items,\n ]);\n }", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "function create()\n\t{\n\t\tif ($_GET[\"obj_id\"] != \"\")\n\t\t{\n\t\t\t$this->setTabs();\n\t\t}\n\t\tparent::create();\n\t}", "function create_metabox() {\n\t$prefix = '_cmb_';\n\t$metabox_var = new_cmb2_box( array(\n\t\t'id' => $prefix . 'metabox_name',\n\t\t'title' => __( 'Metabox Title', 'cmb2' ),\n\t\t'object_types' => array( 'posttype'), // Post type\n\t));\n\n\t// Add your fields below...\n\t$metabox_var->add_field( array(\n\n\t));\n}", "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "public function create()\n {\n if (! Gate::allows('project_tab_create')) {\n return abort(401);\n }\n return view('admin.project_tabs.create');\n }", "public function addMetaboxes() {}", "function tabify_add_meta_boxes($post_type)\n {\n }", "public function create()\n {\n $this->title .= ' create';\n $this->vars = array_add($this->vars, 'menuArray', $this->rep->makeArray());\n }", "function _NEW()\t{\n\t\tmosMenuBar::startTable();\n\t\tmosMenuBar::preview( 'modulewindow' );\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::save();\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::apply();\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::cancel();\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::help( 'screen.modules.new' );\n\t\tmosMenuBar::endTable();\n\t}", "function create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' POST SETTINGS', 'new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "function isms_component_messages_addtab($cbtype, &$cbdata)\n{\n $settings_raw = get_option(\"isms_component_options\");\n if ($settings_raw == \"\")\n $settings = array();\n else\n $settings = unserialize($settings_raw);\n $enabled = grab_array_var($settings, \"enabled\", 0);\n if ($enabled != 1)\n return;\n\n $newtab = array(\n \"id\" => \"isms\",\n \"title\" => \"iSMS\",\n );\n\n $cbdata[\"tabs\"][] = $newtab;\n}", "public function createTabsHistorique()\n {\n $tab = new Tab();\n $tab->active = 1;\n $names = array(1 => 'Historique CA', 'Historique CA');\n foreach (Language::getLanguages() as $language) {\n $tab->name[$language['id_lang']] = isset($names[$language['id_lang']])\n ? $names[$language['id_lang']] : $names[1];\n }\n $tab->class_name = 'AdminHistorique';\n $tab->module = $this->name;\n $tab->id_parent = Tab::getIdFromClassName('AdminParentStats');\n\n return (bool)$tab->add();\n }", "function add_staff_tab() {\n\n\t\t\t$count = isset($_POST['count']) ? absint($_POST['count']) : false;\n\t\t\t$this->block_id = isset($_POST['block_id']) ? $_POST['block_id'] : 'mtheme-block-9999';\n\n\t\t\t//default key/value for the tab\n\t\t\t$tab = array(\n\t\t\t\t'social_text' => __('Social Site Name','mthemelocal'),\n\t\t\t\t'social_icon' => '',\n\t\t\t\t'social_link' => ''\n\t\t\t);\n\n\t\t\tif($count) {\n\t\t\t\t$this->tab($tab, $count);\n\t\t\t} else {\n\t\t\t\tdie(-1);\n\t\t\t}\n\n\t\t\tdie();\n\t\t}", "public static function create_meta_box() {\n\t\t$content_types_array = self::_get_active_content_types();\n\t\tforeach ( $content_types_array as $content_type ) {\n\t\t\tadd_meta_box( 'custom-content-type-mgr-custom-fields'\n\t\t\t\t, __('Custom Fields', CCTM::txtdomain )\n\t\t\t\t, 'StandardizedCustomFields::print_custom_fields'\n\t\t\t\t, $content_type\n\t\t\t\t, 'normal'\n\t\t\t\t, 'high'\n\t\t\t\t, $content_type \n\t\t\t);\n\t\t}\n\t}", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "function create_new() {\n if($this->table_title != '' ) {\n $this->title = 'New ' . $this->table_title .\n $this->makeForm();\n }\n }", "function MakeTab($docID, $recID, $PageNumber, $X=null, $Y=null, $Type, $Name=null, $TabLabel=null, $Value=null,$AnchorTabString=null, $AnchorXOffset=null, $AnchorYOffset=null){\n\t$tab = new Tab();\n\t$tab->DocumentID = $docID;\n\t$tab->RecipientID = $recID;\n\t$tab->PageNumber = $PageNumber;\n\tif(isset($X)){\n\t\t$tab->XPosition = $X;\n\t}\n\tif(isset($Y)){\n\t\t$tab->YPosition = $Y;\n\t}\n\t$tab->Type = $Type;\n\tif(isset($Name)){\n\t\t$tab->Name = $Name;\n\t}\n\tif(isset($TabLabel)){\n\t\t$tab->TabLabel = $TabLabel;\n\t}\n\tif(isset($Value)){\n\t\t$tab->Value = $Value;\n\t}\n\tif(isset($AnchorTabString)){\n\t\t$tab->AnchorTabItem->AnchorTabString = $AnchorTabString;\n\t}\n\tif(isset($AnchorXOffset)){\n\t\t$tab->AnchorTabItem->XOffset = $AnchorXOffset;\n\t}\n\tif(isset($AnchorYOffset)){\n\t\t$tab->AnchorTabItem->YOffset = $AnchorYOffset;\n\t}\n\treturn $tab;\n}", "public static function createInstance()\n {\n return new TabPage('ISerializable', 'ISerializable');\n }", "public static function add_metaboxes(){}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "function bnk_create_slide_metabox() {\r\n\tglobal $slide_meta;\r\n \r\n\tadd_meta_box($slide_meta['id'], $slide_meta['title'], 'bnk_build_slide_metabox', $slide_meta['page'], $slide_meta['context'], $slide_meta['priority']);\r\n}", "public function testAddPage() {\r\n $callback = function() {\r\n $this->timer->destroy();\r\n $this->application->stop();\r\n };\r\n\r\n $this->timer = new Timer($callback, $this->application->getWindow(), Timer::TEST_TIMEOUT);\r\n $this->timer->start();\r\n\r\n $this->tab = new Tab(Point::createInstance(10, 10), Dimension::createInstance(200, 100));\r\n $this->application->getWindow()->getRootPane()->add($this->tab);\r\n $this->tab->addTabPage('tab1');\r\n $this->tab->addTabPage('tab2');\r\n\r\n $tabPage1 = $this->tab->getTabPage('tab1');\r\n $tabPage2 = $this->tab->getTabPage('tab2');\r\n\r\n $tabPage1->add(new EditBox('box 1.1', Point::createInstance(5, 15), Dimension::createInstance(50, 20)));\r\n $tabPage1->add(new EditBox('box 1.2', Point::createInstance(65, 15), Dimension::createInstance(50, 20)));\r\n\r\n $tabPage2->add(new EditBox('box 2.1', Point::createInstance(5, 15), Dimension::createInstance(50, 20)));\r\n $tabPage2->add(new EditBox('box 2.2', Point::createInstance(5, 45), Dimension::createInstance(50, 20)));\r\n\r\n $this->application->start();\r\n }", "private function createTypographyTab()\n {\n $tab = $this->createTab(\n 'typo_tab',\n '__responsive_tab_typo__',\n ['attributes' => ['autoScroll' => true]]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetBasic = $this->createFieldSet(\n 'typo_base',\n '__responsive_tab_typo_fieldset_base__',\n ['attributes' => $attributes]\n );\n\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-base-stack',\n '@font-base-stack',\n $this->themeFontDefaults['font-base-stack']\n )\n );\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-headline-stack',\n '@font-headline-stack',\n $this->themeFontDefaults['font-headline-stack']\n )\n );\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-size-base',\n '@font-size-base',\n $this->themeFontDefaults['font-size-base']\n )\n );\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-base-weight',\n '@font-base-weight',\n $this->themeFontDefaults['font-base-weight']\n )\n );\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-light-weight',\n '@font-light-weight',\n $this->themeFontDefaults['font-light-weight']\n )\n );\n $fieldSetBasic->addElement(\n $this->createTextField(\n 'font-bold-weight',\n '@font-bold-weight',\n $this->themeFontDefaults['font-bold-weight']\n )\n );\n\n $tab->addElement($fieldSetBasic);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetHeadlines = $this->createFieldSet(\n 'typo_headlines',\n '__responsive_tab_typo_fieldset_headlines__',\n ['attributes' => $attributes]\n );\n\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h1',\n '@font-size-h1',\n $this->themeFontDefaults['font-size-h1']\n )\n );\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h2',\n '@font-size-h2',\n $this->themeFontDefaults['font-size-h2']\n )\n );\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h3',\n '@font-size-h3',\n $this->themeFontDefaults['font-size-h3']\n )\n );\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h4',\n '@font-size-h4',\n $this->themeFontDefaults['font-size-h4']\n )\n );\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h5',\n '@font-size-h5',\n $this->themeFontDefaults['font-size-h5']\n )\n );\n $fieldSetHeadlines->addElement(\n $this->createTextField(\n 'font-size-h6',\n '@font-size-h6',\n $this->themeFontDefaults['font-size-h6']\n )\n );\n\n $tab->addElement($fieldSetHeadlines);\n\n return $tab;\n }", "private function initializeMetabox()\n {\n\n $this->_metabox = new \\RWC\\Metabox( $this->get_library(), array(\n 'renderer' => 'vertical-tabs',\n 'id' => 'rwc-fundraiser-metabox',\n 'title' => 'Fundraiser Options',\n 'post_types' => array( self::POST_TYPE ),\n 'sections' => array(\n array(\n 'id' => 'payment',\n 'name' => 'Payment'\n ),\n array(\n 'id' => 'customer',\n 'name' => 'Customer Details'\n ),\n array(\n 'id' => 'dates',\n 'name' => 'Open/Close Dates'\n ),\n array(\n 'id' => 'products',\n 'name' => 'Products'\n )\n ),\n 'fields' => array(\n\n 'customer-name' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Customer Name'\n ),\n\n 'customer-business' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Business Name'\n ),\n\n 'address1' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Address 1'\n ),\n\n 'address2' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Address 2'\n ),\n\n 'city' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'City'\n ),\n\n 'state' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'State'\n ),\n\n 'zipcode' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Zipcode'\n ),\n\n 'paypal-api-username' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Username',\n 'description' => 'The email address associated with ' .\n 'the PayPal account that should receive payment ' .\n 'for this fundraiser.'\n ),\n 'paypal-api-key' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Key',\n 'description' => 'The account\\'s PayPal API password.'\n ),\n 'paypal-api-signature' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Signature',\n 'description' => 'The account\\'s PayPal API signature.'\n ),\n\n 'start-date' => array(\n 'type' => 'date',\n 'section' => 'dates',\n 'name' => 'Start Date',\n ),\n\n 'end-date' => array(\n 'type' => 'date',\n 'section' => 'dates',\n 'name' => 'End Date',\n ),\n\n 'products' => array(\n 'type' => 'fundraiser-products',\n 'section' => 'products',\n 'name' => 'Product Setup'\n )\n )\n ));\n }", "public function register_data_tab( $tabs ) {\r\n $tabs['tm_extra_product_options'] = array(\r\n 'label' => __( 'TM Extra Product Options', TM_EPO_TRANSLATION ),\r\n 'target' => 'tm_extra_product_options',\r\n 'class' => array( 'tm_epo_class', 'hide_if_grouped' )\r\n );\r\n return $tabs;\r\n }", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "public static function _NEW(){\n\t\tLibMenuBar::startTable();\n\t\tLibMenuBar::cancel();\n\t\tLibMenuBar::spacer();\n\t\tLibMenuBar::help('screen.menus.new');\n\t\tLibMenuBar::endTable();\n\t}", "public function xadmin_createform() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$form_title = $args [1];\n\t\t$form_type = @$args [2] ? $args [2] : 'blank';\n\t\t\n\t\t/* Load Model */\n\t\t$form = $this->getModel ( 'form' );\n\t\t$this->session->returnto ( 'forms' );\n\t\t\n\t\t/* create the form */\n\t\t$form->createNewForm ( $form_title, $form_type );\n\t\t\n\t\t$this->loadPluginModel ( 'forms' );\n\t\t$plug = Plugins_Forms::getInstance ();\n\t\t\n\t\t$plug->_pluginList [$form_type]->onAfterCreateForm ( $form );\n\t\t\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( 'xforms' );\n\t\n\t}", "public function create()\n {\n $tablero = new Tablero();\n return view('tablero.create', compact('tablero'));\n }", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }", "function create(){\n // cls_hermes_plugin::cls_hermes_plugin($options); \nglobal $xoopsModuleConfig, $xoopsDB;\n\n //------------------------------------------- \n $decomodele = $this->name;\n $sql = \"('{$decomodele}', 'content','multiline',0,01,'12',''),\n ('{$decomodele}', 'type','list',0,02,'|css|html|text','');\";\n\n \n //--------------------------------------------------\n cls_decoration:: createModele($decomodele, $sql);\n //-------------------------------------------------- \n\n\n}", "public function xadmin_createfield() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$field_title = $args [1];\n\t\t$field_type = $args [2];\n\t\t\n\t\t/* Load Model */\n\t\t$field = $this->getModel ( 'field' );\n\t\t$this->session->returnto ( 'fields' );\n\t\t\n\t\t/* create the form */\n\t\t$field->createNewField ( $field_title, $field_type );\n\t\t\n\t\t$this->loadPluginModel ( 'fields' );\n\t\t$plug = Plugins_Fields::getInstance ();\n\t\t\n\t\t/* allow changes to be made by plugin */\n\t\t$plug->trigger ( 'onAfterCreateField', $field );\n\t\t\n\t\t/* allow changes to be made by plugin - extend schema of data table */\n\t\t$plug->trigger ( 'onAfterCreateField_ExtendDataTable', $field );\n\t\t\n\t\t$plug->trigger ( 'onAfterSaveNewField', $field );\n\t\t\n\t\t$this->setArguments ( array ($field->id ) );\n\t\t\n\t\t$this->_registry->setValue ( 'usedTabs', 1 );\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( '_editField' );\n\t}", "public function add_tab( $args ) {\n $defaults = array(\n 'title' => false,\n 'id' => false,\n 'content' => '',\n 'callback' => false,\n 'url' => false\n );\n $args = wp_parse_args( $args, $defaults );\n\n $args['id'] = sanitize_html_class( $args['id'] );\n\n // Ensure we have an ID and title.\n if ( ! $args['id'] || ! $args['title'] )\n return;\n\n // Allows for overriding an existing tab with that ID.\n $this->_tabs[ $args['id'] ] = $args;\n\n return $this;\n }", "public function woo_new_product_tab( $tabs ) {\n\n\t\t// Adds the new tab\n\n\t\t$tabs['contents'] = array(\n\t\t\t'title' => __( 'Contents', 'woocommerce' ),\n\t\t\t'priority' => 20,\n\t\t\t'callback' => array( $this, 'contents_tab_content' )\n\t\t);\n\n\t\t$tabs['authors'] = array(\n\t\t\t'title' => __( 'Author(s)', 'woocommerce' ),\n\t\t\t'priority' => 30,\n\t\t\t'callback' => array( $this, 'authors_tab_content' )\n\t\t);\n\n\t\tunset( $tabs['reviews'] ); // Remove the reviews information tab\n\n\t\t$tabs['heweb17reviews'] = array(\n\t\t\t'title' => __( 'Reviews', 'woocommerce' ),\n\t\t\t'priority' => 40,\n\t\t\t'callback' => array( $this, 'reviews_tab_content' )\n\t\t);\n\n\t\tunset( $tabs['additional_information'] ); // Remove the additional information tab\n\n\t\treturn $tabs;\n\n\t}", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n\t\t$js = [Module::asset(\"metafields:js/post.js\")];\n\t\tView::share('js_script', $js);\n return view('metafields::backend.create',array(\"title\" => \"Create Metafield\"));\n }", "function tab_add_instance($tab) {\n global $CFG, $DB;\n\n require_once(\"$CFG->libdir/resourcelib.php\");\n\n $cmid = $tab->coursemodule;\n $tab->timemodified = time();\n\n\n //insert tabs and content\n if ($tab->id = $DB->insert_record(\"tab\", $tab)) {\n\n // we need to use context now, so we need to make sure all needed info is already in db\n $DB->set_field('course_modules', 'instance', $tab->id, array('id' => $cmid));\n $context = context_module::instance($cmid);\n $editoroptions = array('subdirs' => 1, 'maxbytes' => $CFG->maxbytes, 'maxfiles' => -1, 'changeformat' => 1, 'context' => $context, 'noclean' => 1, 'trusttext' => true);\n\n foreach ($tab->tabname as $key => $value) {\n $value = trim($value);\n if (isset($value) && $value <> '') {\n $option = new stdClass();\n $option->tabname = $value;\n $option->tabid = $tab->id;\n\n if (isset($tab->content[$key]['format'])) {\n $option->contentformat = $tab->content[$key]['format'];\n }\n\n if (isset($tab->tabcontentorder[$key])) {\n $option->tabcontentorder = $tab->tabcontentorder[$key];\n }\n\n if (isset($tab->content[$key]['externalurl'])) {\n $option->externalurl = $tab->content[$key]['externalurl'];\n }\n $option->timemodified = time();\n //Must get id number from inserted record to update the editor field (tabcontent)\n $newtab_content_id = $DB->insert_record(\"tab_content\", $option);\n\n //tab content is now an array due to the new editor\n //In order to enter file information from the editor\n //We must now update the record once it has been created\n\n if (isset($tab->content[$key]['text'])) {\n $draftitemid = $tab->content[$key]['itemid'];\n if ($draftitemid) {\n $tabcontentupdate = new stdClass();\n $tabcontentupdate->id = $newtab_content_id;\n $tabcontentupdate->tabcontent = file_save_draft_area_files($draftitemid, $context->id, 'mod_tab', 'content', $newtab_content_id, $editoroptions, $tab->content[$key]['text']);\n $DB->update_record('tab_content', $tabcontentupdate);\n }\n }\n }\n }\n }\n return $tab->id;\n}", "function cnew_custom_metabox_add() {\r\n add_meta_box(\r\n 'cnew_custom_metabox_workshop', \r\n __( 'Informações da Oficina', 'cnew' ), \r\n 'cnew_workshop_custom_metabox_callback', \r\n 'cnew_workshop', \r\n 'normal',\r\n 'high'\r\n );\r\n\r\n add_meta_box(\r\n 'cnew_custom_metabox_registration', \r\n __( 'Formulário de Inscrição', 'cnew' ), \r\n 'cnew_registration_custom_metabox_callback', \r\n 'cnew_registration', \r\n 'normal',\r\n 'high'\r\n );\r\n }", "function init()\n\t{\n\t\t$this->setType(\"tabs\");\n\t}", "function bd_custom_tabs_Widget(){\n\n\t\t// Widget settings\n\t\t$ops = array('classname' => 'widget_custom_tabs', 'description' => __('3 tabs: last posts, popular posts, and last comments', 'wolf'));\n\n\t\t/* Create the widget. */\n\t\tparent::__construct( 'widget_custom_tabs', __('Custom tabs', 'wolf'), $ops );\n\t\t\n\t}", "public function create()\n\t{\n\t\treturn View('admin/addTagamo3');\n\t}", "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "public function create()\n {\n $titleTag = 'Create Card Metagame | ';\n $h2Tag = 'Create Card Metagame';\n\n return view('card_metagame.create', compact('titleTag', 'h2Tag'));\n }", "private function createTabsProspects()\n {\n $tab = new Tab();\n $tab->active = 1;\n $names = array(1 => 'Prospects', 'Prospects');\n foreach (Language::getLanguages() as $language) {\n $tab->name[$language['id_lang']] = isset($names[$language['id_lang']])\n ? $names[$language['id_lang']] : $names[1];\n }\n $tab->class_name = 'AdminProspects';\n $tab->module = $this->name;\n $tab->id_parent = Tab::getIdFromClassName('AdminCustomers');\n\n return (bool)$tab->add();\n }", "public function create()\n {\n //KEMUDIAN DI DALAMNYA KITA MENJALANKAN FUNGSI UNTUK MENGOSONGKAN FIELD\n $this->resetFields();\n //DAN MEMBUKA MODAL\n $this->openModal();\n }", "function add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }", "function makeTab($title,$content) {\n\t\t$placeholders = array(\n\t\t\t\"[+title+]\" => $title,\n\t\t\t\"[+tab_content+]\" => $content,\n\t\t);\n\t\treturn str_replace( array_keys( $placeholders ), array_values( $placeholders ), $this->templates[\"tab\"]);\n\t}", "function create_meta_portfolio_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-portfolio-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PORTFOLIO ITEM SETTINGS', 'new_meta_portfolio_boxes', PEXETO_PORTFOLIO_POST_TYPE, 'normal', 'high' );\n\t}\n}", "public function create()\n {\n //for the PAGE on which to create\n }", "function add_pricing_table_tab() {\n\n\t\t\t$count = isset($_POST['count']) ? absint($_POST['count']) : false;\n\t\t\t$this->block_id = isset($_POST['block_id']) ? $_POST['block_id'] : 'mtheme-block-9999';\n\n\t\t\t//default key/value for the tab\n\t\t\t$tab = array(\n\t\t\t\t'title' => __('Pricing Tab','mthemelocal'),\n\t\t\t\t'featured' => '',\n\t\t\t\t'currency' => '',\n\t\t\t\t'price' => '',\n\t\t\t\t'duration' => '',\n\t\t\t);\n\n\t\t\tif($count) {\n\t\t\t\t$this->tab($tab, $count);\n\t\t\t} else {\n\t\t\t\tdie(-1);\n\t\t\t}\n\n\t\t\tdie();\n\t\t}", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "public function metabox_start( $post ) {\n\t\t\tif ( ! $post ) global $post;\n\n\t\t\tif ( ! in_array( $post->post_type, $this->_meta_box['pages'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$pageTpl = null;\n\t\t\t$tabbed = ( $this->_meta_box['tabs'] ) ? ( ' jquery-ui-tabs' ) : ( '' );\n\t\t\t$metaFields = $this->_fields;\n\n\t\t\tif ( 'page' == $post->post_type ) {\n\t\t\t\t$pageTpl = get_post_meta( $post->ID, '_wp_page_template', true );\n\t\t\t\tif ( $post->ID == get_option( 'page_for_posts' ) )\n\t\t\t\t\t$pageTpl = 'blog-page';\n\t\t\t}\n\n\t\t\twp_nonce_field( 'wm-' . $post->post_type . '-metabox-nonce', $post->post_type . '-metabox-nonce' );\n\n\t\t\t//display meta box form HTML\n\t\t\t$out = '<div class=\"wm-wrap meta meta-special' . $tabbed . '\">';\n\n\t\t\t\t//tabs\n\t\t\t\tif ( $tabbed ) {\n\t\t\t\t\t$out .= '<ul class=\"tabs no-js\">';\n\t\t\t\t\t$out .= '<li class=\"item-0 visual-editor\"><a href=\"#wm-meta-visual-editor\">' . __( 'Content', 'clifden_domain_adm' ) . '</a></li>';\n\t\t\t\t\t$i = 0;\n\t\t\t\t\tforeach ( $metaFields as $tab ) {\n\t\t\t\t\t\tif ( 'section-open' == $tab['type'] ) {\n\t\t\t\t\t\t\t$hideThis = null;\n\t\t\t\t\t\t\tif ( 'page' == $post->post_type && isset( $tab['exclude'] ) && in_array( $pageTpl, $tab['exclude'] ) ) {\n\t\t\t\t\t\t\t\t$hideThis = ' hide';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$out .= '<li class=\"item-' . ++$i . $hideThis . ' ' . $tab['section-id'] . '\"><a href=\"#wm-meta-' . $tab['section-id'] . '\">' . $tab['title'] . '</a></li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$out .= '</ul> <!-- /tabs -->';\n\t\t\t\t}\n\n\t\t\techo $out;\n\n\t\t\t$editorTabContent = array(\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"section-open\",\n\t\t\t\t\t\"section-id\" => \"visual-editor\",\n\t\t\t\t\t\"exclude\" => array( 'page-template/redirect.php', 'tpl-redirect.php' )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t//Content\n\t\t\twm_render_form( $editorTabContent, 'meta', $pageTpl );\n\t\t}", "public function register_metabox() {\n\t\t$fm = new Fieldmanager_Group( [\n\t\t\t'name' => 'hero_fields', // \"name\" id deceiving, used as the key/ID.\n\t\t\t'serialize_data' => false,\n\t\t\t'add_to_prefix' => false,\n\t\t\t'children' => [\n\t\t\t\t'_headline' => new Fieldmanager_RichTextArea( 'Main Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t\t'_subheadline' => new Fieldmanager_RichTextArea( 'Sub Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t],\n\t\t] );\n\n\t\t/**\n\t\t * Initiate the metabox\n\t\t */\n\t\t$fm->add_meta_box( 'Hero', 'page' );\n\t}", "public function xadmin_createaction() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$action_title = $args [1];\n\t\t$action_type = $args [2];\n\t\t\n\t\t/* Load Model */\n\t\t$action = $this->getModel ( 'action' );\n\t\t$this->session->returnto ( 'actions' );\n\t\t\n\t\t/* create the form */\n\t\t$action->createNewAction ( $action_title, $action_type );\n\t\t\n\t\t$this->loadPluginModel ( 'actions' );\n\t\t$plug = Plugins_Actions::getInstance ();\n\t\t\n\t\t/* allow changes to be made by plugin */\n\t\t$plug->trigger ( 'onAfterCreateAction', $action );\n\t\t\n\t\t/* allow changes to be made by plugin - extend schema of data table */\n\t\t$plug->trigger ( 'onAfterCreateAction_ExtendDataTable', $action );\n\t\t\n\t\t/* set argument for the edit view */\n\t\t$this->setArguments ( array ($action->id ) );\n\t\t\n\t\t$this->_registry->setValue ( 'usedTabs', 1 );\n\t\t\n\t\t/* quiet redirect */\n\t\t$this->_redirect ( '_editAction' );\n\t}", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_historico_atleta_cameponato/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_historico_atleta_cameponato.create')\n;\n\t}", "function my_theme_create_options() {\r\n $titan = TitanFramework::getInstance( 'genietheme' );\r\n \r\n // Create my admin panel\r\n $panel = $titan->createAdminPanel( array(\r\n 'name' => 'Theme Options',\r\n ) );\r\n \r\n \r\n $generaltab = $panel->createTab( array(\r\n 'name' => 'General Tab',\r\n ) );\r\n \r\n // Create options for my admin panel\r\n $generaltab->createOption( array(\r\n 'name' => 'LOGO',\r\n 'id' => 'head_logo',\r\n 'type' => 'upload',\r\n 'desc' => 'Upoad logo of site.'\r\n ) );\r\n \r\n $generaltab->createOption( array(\r\n 'name' => 'Header Scripts',\r\n 'id' => 'header_scripts',\r\n 'type' => 'textarea',\r\n 'desc' => 'Enter your header scripts or code like google analytics,webmaster code etc...'\r\n ) );\r\n \r\n \r\n $generaltab->createOption( array(\r\n 'name' => 'Footer Scripts',\r\n 'id' => 'footer_scripts',\r\n 'type' => 'textarea',\r\n 'desc' => 'Enter your footer scripts or code like google analytics,webmaster code etc...'\r\n ) );\r\n \r\n \r\n $generaltab->createOption( array(\r\n 'type' => 'save'\r\n ) );\r\n \r\n \r\n $titan = TitanFramework::getInstance( 'genietheme' );\r\n$productMetaBox = $titan->createMetaBox( array(\r\n 'name' => 'Additinal Job Information',\r\n 'post_type' => 'jobs',\r\n) );\r\n\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Job Link',\r\n 'id' => 'j_link',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Experience Required',\r\n 'id' => 'exp_required',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Education Qualification',\r\n 'id' => 'edu_qual',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Preffered Nationality',\r\n 'id' => 'nationality',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Salary',\r\n 'id' => 'salary',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'No. of vaccancies',\r\n 'id' => 'vaccancies',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Benefits',\r\n 'id' => 'benefits',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Gender',\r\n 'id' => 'gender',\r\n 'options' => array(\r\n '1' => 'Male',\r\n '2' => 'Female',\r\n '3' => 'Male/Female',\r\n ),\r\n 'type' => 'radio',\r\n 'desc' => 'Select gender',\r\n 'default' => '1',\r\n \r\n ) );\r\n\r\n \r\n}", "function clonemaker_add_meta_box(){\r\n add_meta_box(\r\n 'clonemaker',\r\n 'Clone a Page',\r\n 'add_post_list',\r\n 'page',\r\n 'side'\r\n );\r\n\r\n\r\n}", "function woocommerce_product_write_panel_tabs(){\n ?>\n <li class=\"custom_tab\">\n <a href=\"#custom_tab_data_ctabs\">\n <?php _e('Custom Tabs', 'GWP'); ?>\n </a>\n </li>\n <?php\n }", "private function createGeneralTab()\n {\n $tab = $this->createTab(\n 'general_tab',\n '__responsive_tab_general__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 130]);\n $fieldSetGrey = $this->createFieldSet(\n 'grey_tones',\n '__responsive_tab_general_fieldset_grey__',\n ['attributes' => $attributes]\n );\n\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray',\n '@gray',\n $this->themeColorDefaults['gray']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray-light',\n '@gray-light',\n $this->themeColorDefaults['gray-light']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray-dark',\n '@gray-dark',\n $this->themeColorDefaults['gray-dark']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'border-color',\n '@border-color',\n $this->themeColorDefaults['border-color']\n )\n );\n\n $basicFieldSet = $this->createBasicFieldSet();\n $tab->addElement($basicFieldSet);\n $tab->addElement($fieldSetGrey);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 130]);\n $fieldSetHighlights = $this->createFieldSet(\n 'highlight_colors',\n '__responsive_tab_general_fieldset_highlight__',\n ['attributes' => $attributes]\n );\n\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-success',\n '@highlight-success',\n $this->themeColorDefaults['highlight-success']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-error',\n '@highlight-error',\n $this->themeColorDefaults['highlight-error']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-notice',\n '@highlight-notice',\n $this->themeColorDefaults['highlight-notice']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-info',\n '@highlight-info',\n $this->themeColorDefaults['highlight-info']\n )\n );\n\n $tab->addElement($fieldSetHighlights);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 220]);\n $fieldSetScaffolding = $this->createFieldSet(\n 'scaffolding',\n '__responsive_tab_general_fieldset_scaffolding__',\n ['attributes' => $attributes]\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'body-bg',\n '@body-bg',\n $this->themeColorDefaults['body-bg']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'text-color',\n '@text-color',\n $this->themeColorDefaults['text-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'text-color-dark',\n '@text-color-dark',\n $this->themeColorDefaults['text-color-dark']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'link-color',\n '@link-color',\n $this->themeColorDefaults['link-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'link-hover-color',\n '@link-hover-color',\n $this->themeColorDefaults['link-hover-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'rating-star-color',\n '@rating-star-color',\n $this->themeColorDefaults['rating-star-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-bg',\n '@overlay-bg',\n $this->themeColorDefaults['overlay-bg']\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-theme-dark-bg',\n '@overlay-theme-dark-bg',\n '@overlay-bg'\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-theme-light-bg',\n '@overlay-theme-light-bg',\n '#FFFFFF'\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-opacity',\n '@overlay-opacity',\n $this->themeColorDefaults['overlay-opacity']\n )\n );\n\n $tab->addElement($fieldSetScaffolding);\n\n return $tab;\n }", "public static function createInstance()\n {\n return new TabContainer('ISerializable', 'ISerializable');\n }", "protected function _addTab(\n TDProject_Core_Interfaces_Block_Widget_Tab $tab) {\n \t$this->addBlock($tab);\n \treturn $tab;\n }", "public function add_tab( $tabs ) {\n\t$tabs['account']['Billing'] = 'billing';\n\treturn $tabs;\n\t}", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Word linkages',\n\t\t\t'Word linkages',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'linkages_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'Answers',\n\t\t\t'Answers',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'answers_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "private function build_factory_meta_tab_widget($_meta, $_ptype = \"wccpf\") {\r\n \t/* Accordian wrapper starts here */\r\n \t$html = '<div class=\"wcff-factory-tab-container\">';\r\n \t\r\n \t/* Left side header panel starts here */\r\n \t$html .= '<div class=\"wcff-factory-tab-left-panel\">';\r\n \t$html .= '<ul>';\r\n \tforeach ($_meta[\"tabs\"] as $tab) {\r\n \t\t$html .= '<li data-box=\"' . $tab[\"header\"][\"target\"] . '\" class=\"' . $tab[\"header\"][\"css_class\"] . '\">' . $tab[\"header\"][\"title\"] . '</li>';\r\n \t}\r\n \t$html .= '</ul>';\r\n \t$html .= '</div>';\r\n \t/* Left side header anel ends here */\r\n \t\r\n \t/* Left side header panel starts here */\r\n \t$html .= '<div class=\"wcff-factory-tab-right-panel\">';\r\n \tforeach ($_meta[\"tabs\"] as $tab) {\r\n \t\t/* Tab content section starts here */\r\n \t\t$html .= '<div id=\"' . $tab[\"content\"][\"container\"] . '\" class=\"wcff-factory-tab-content\">';\r\n \t\t\r\n \t\tforeach ($tab[\"content\"][\"fields\"] as $field) {\r\n \t\t\t/* Meta field's wrapper starts here */\r\n \t\t\t$html .= '<div class=\"wcff-field-types-meta\" data-type=\"' . $field[\"type\"] . '\" data-param=\"' . $field[\"param\"] . '\">';\r\n \t\t\t$html .= $this->build_factory_meta_field($field, $_ptype);\r\n \t\t\t$html .= '</div>';\r\n \t\t\t/* Meta field's wrapper ends here */\r\n \t\t}\r\n \t\t\r\n \t\t$html .= '</div>';\r\n \t\t/* Tab content section ends here */\r\n \t}\r\n \t$html .= '</div>';\r\n \t/* Left side header anel ends here */\r\n \t\r\n \t$html .= '</div>';\r\n \t/* Accordian wrapper ends here */\r\n \treturn $html;\r\n }", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "public function create()\n {\n return view('inmueble.tipoinmuebles.create');\n }", "public function __construct()\n {\n parent::__construct();\n $this->setTemplate('bs_meda/edit/tab/info.phtml');\n }", "public function auction_meta_tab( $tabs ) { \n\n\t\t$tabs[ 'simple_auction' ] = array( \n\t\t\t\t\t'label' => __( 'Auction', 'wcvendors-pro-simple-auctions' ), \n\t\t\t\t\t'target' => 'auction',\n\t\t\t\t\t'class' => array( 'auction_tab', 'show_if_auction', 'hide_if_grouped', 'hide_if_external', 'hide_if_variable', 'hide_if_simple' ),\n\t\t\t\t);\n\n\t\treturn $tabs; \n\t\n\t}", "public function addTab($title, $renderMethod)\n {\n $tab = new TabPanel($title, $renderMethod);\n $this->tabs[] = $tab;\n return $tab;\n }", "public function create()\n {\n $page_title = $this->page_title;\n \n return view('dashboard.addons.create', compact('page_title'));\n }", "function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}", "function __construct()\n {\n\t $this->tabs = array( \n//\t array ( 'tab_id' => 'properties',\t\t'tab_op' => 'administration.customization_properties.edit', \t'tab_name' => 'Application properties'),\n\t array ( 'tab_id' => 'fields',\t\t\t'tab_op' => 'administration.customization_fields.edit', \t\t'tab_name' => 'Field properties'),\n\t array ( 'tab_id' => 'searches', \t\t'tab_op' => 'administration.customization_searches.edit',\t\t'tab_name' => 'Search filters'),\n\t array ( 'tab_id' => 'results', \t\t\t'tab_op' => 'administration.customization_results.edit',\t\t'tab_name' => 'Search results'),\n\t array ( 'tab_id' => 'bulk',\t\t\t\t'tab_op' => 'administration.customization_bulk.edit', \t\t\t'tab_name' => 'Bulk form'),\t \n\t array ( 'tab_id' => 'view', \t\t\t'tab_op' => 'administration.customization_view.edit',\t\t\t'tab_name' => 'View form'),\n\t array ( 'tab_id' => 'edit', \t\t\t'tab_op' => 'administration.customization_edit.edit',\t\t\t'tab_name' => 'Edit form'),\n\t array ( 'tab_id' => 'linked', \t\t\t'tab_op' => 'administration.customization_linked.edit',\t\t\t'tab_name' => 'Linked applications'),\n\t array ( 'tab_id' => 'linked_view', \t\t'tab_op' => 'administration.customization_linked_view.edit',\t'tab_name' => 'Linked view form'),\n\t array ( 'tab_id' => 'popup_searches', \t'tab_op' => 'administration.customization_popup_searches.edit',\t'tab_name' => 'Popup search filters'),\n\t array ( 'tab_id' => 'popup_results', \t'tab_op' => 'administration.customization_popup_results.edit',\t'tab_name' => 'Popup search results'),\n\t array ( 'tab_id' => 'popup_view', \t\t'tab_op' => 'administration.customization_popup_view.edit',\t\t'tab_name' => 'Popup view form'),\n\t array ( 'tab_id' => 'popup_edit', \t\t'tab_op' => 'administration.customization_popup_edit.edit',\t\t'tab_name' => 'Popup edit form')\n\t ); \n\n\t\tparent::__construct();\n }", "function hankart_add_manual_tab( $tabs ) {\n\t$tabs['pdf_manual'] = array(\n\t\t'title' \t=> __( 'Manual', 'storefront' ),\n\t\t'priority' \t=> 50,\n\t\t'callback' \t=> 'hankart_add_manual_tab_content'\n\t);\n\treturn $tabs;\n}", "private function createTablesTab()\n {\n $tab = $this->createTab(\n 'tables_tab',\n '__responsive_tab_tables__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetTables = $this->createFieldSet(\n 'tables_fieldset',\n '__responsive_tab_tables_fieldset_tables__',\n ['attributes' => $attributes]\n );\n\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-bg',\n '@panel-table-header-bg',\n $this->themeColorDefaults['panel-table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-color',\n '@panel-table-header-color',\n $this->themeColorDefaults['panel-table-header-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-bg',\n '@table-row-bg',\n $this->themeColorDefaults['table-row-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-color',\n '@table-row-color',\n $this->themeColorDefaults['table-row-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-highlight-bg',\n '@table-row-highlight-bg',\n $this->themeColorDefaults['table-row-highlight-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-bg',\n '@table-header-bg',\n $this->themeColorDefaults['table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-color',\n '@table-header-color',\n $this->themeColorDefaults['table-header-color']\n )\n );\n\n $tab->addElement($fieldSetTables);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetBadges = $this->createFieldSet(\n 'badges_fieldset',\n '__responsive_tab_tables_fieldset_badges__',\n ['attributes' => $attributes]\n );\n\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-bg',\n '@badge-discount-bg',\n $this->themeColorDefaults['badge-discount-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-color',\n '@badge-discount-color',\n $this->themeColorDefaults['badge-discount-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-bg',\n '@badge-newcomer-bg',\n $this->themeColorDefaults['badge-newcomer-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-color',\n '@badge-newcomer-color',\n $this->themeColorDefaults['badge-newcomer-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-bg',\n '@badge-recommendation-bg',\n $this->themeColorDefaults['badge-recommendation-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-color',\n '@badge-recommendation-color',\n $this->themeColorDefaults['badge-recommendation-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-bg',\n '@badge-download-bg',\n $this->themeColorDefaults['badge-download-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-color',\n '@badge-download-color',\n $this->themeColorDefaults['badge-download-color']\n )\n );\n\n $tab->addElement($fieldSetBadges);\n\n return $tab;\n }", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "function register_post_metabox( $id,$title,$post_type) {\r\n\t\t$this->has_post_meta = true;\r\n\t\tadd_meta_box( \r\n\t\t\t$id, \r\n\t\t\t$title, \r\n\t\t\tarray(&$this,'post_meta_builder'), \r\n\t\t\t$post_type, \r\n\t\t\t'normal', \r\n\t\t\t'high', \r\n\t\t\t$this->postmeta[$post_type][$id] \r\n\t\t);\r\n\t}", "public function make($style = 'default') {\n switch($style) {\n case 'default' :\n $this->help_style_tabs();\n break;\n case 'meta' :\n $this->metabox_style_tabs();\n break;\n }\n\n }", "function cre_banner_metabox_tab($property_metabox_tabs)\n{\n\tif (is_array($property_metabox_tabs)) {\n\t\t$property_metabox_tabs['banner'] = array(\n\t\t\t'label' => esc_html__('Top Banner', 'crucial-real-estate'),\n\t\t\t'icon' => 'dashicons-format-image',\n\t\t);\n\t}\n\n\treturn $property_metabox_tabs;\n}", "public function create()\n {\n //\n //return view('tipos.create');\n }", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "public function createNew() {\n\t\t$data['session'] = $this->getSession();\n\t\t$this -> load -> view('private/createNew', $data);\n\t}", "public function create()\n {\n $this->view->load('tacgias/create');\n }", "function create_meta_box() {\r\r\n global $key;\r\r\n\r\r\n if( function_exists( 'add_meta_box' ) ) {\r\r\n add_meta_box( 'new-page-boxes', ' Page Options', 'page_meta_boxes', 'page', 'normal', 'high' );\r\r\n add_meta_box( 'new-portfolio-boxes', ' Portfolio Options', 'portfolio_meta_boxes', 'portfolio', 'normal', 'high' );\r\r\n add_meta_box( 'new-slideshow-boxes', ' Slideshow Options', 'slideshow_meta_boxes', 'slideshow', 'normal', 'high' );\r\r\n add_meta_box( 'new-post-boxes', ' Post Options', 'post_meta_boxes', 'post', 'normal', 'high' );\r\r\n }\r\r\n}", "public function createAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Create a item\",\n ]);\n }", "public function create()\n {\n return view(\"dashboard.mesas.create\",['mesa'=>new Table()]);\n \n }" ]
[ "0.7082443", "0.651926", "0.6407837", "0.6398475", "0.6373191", "0.63572496", "0.6355799", "0.6300519", "0.6284565", "0.6267357", "0.62672496", "0.61974084", "0.61974084", "0.61258566", "0.60911673", "0.60600996", "0.604063", "0.60337704", "0.5989618", "0.5982153", "0.59781015", "0.59600794", "0.59432983", "0.59200203", "0.586003", "0.58377725", "0.5821563", "0.5791371", "0.5781489", "0.5779794", "0.5765941", "0.57601124", "0.57509226", "0.5739083", "0.57181334", "0.56978714", "0.569786", "0.5694626", "0.56828266", "0.5678799", "0.56776726", "0.56644297", "0.5660324", "0.5650487", "0.5650487", "0.5650487", "0.5650487", "0.56361884", "0.5630235", "0.5629799", "0.5627312", "0.5620042", "0.5618937", "0.56132996", "0.56132996", "0.560982", "0.5605407", "0.56000084", "0.55991954", "0.5594237", "0.5593775", "0.55930746", "0.5590968", "0.5578866", "0.55663484", "0.5556564", "0.5521396", "0.55151516", "0.5512747", "0.5510154", "0.5510087", "0.550008", "0.5496697", "0.5491215", "0.5487577", "0.54851544", "0.5472496", "0.5470732", "0.54691535", "0.54608405", "0.54566777", "0.54540694", "0.5445118", "0.5434722", "0.54219234", "0.5415604", "0.54131913", "0.54014874", "0.5394846", "0.5394336", "0.53886783", "0.537417", "0.53690517", "0.5368161", "0.536376", "0.5362633", "0.53619134", "0.5361279", "0.53592026", "0.5350229" ]
0.6629417
1
Add a container to the metabox.
public function addContainer( $container, $index = false ) { return $this->getTab( '_options_tab' )->addContainer( $container, $index ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addMetaboxes() {}", "public function addContainer(&$container)\n {\n parent::addContainer($container);\n \n if (ObjectIntrospector::isA($container, 'TabPage') && $this->activeTabPagePersistor->getValue() == '')\n $this->activeTabPagePersistor->setValue($container->getName());\n }", "function cnew_custom_metabox_add() {\r\n add_meta_box(\r\n 'cnew_custom_metabox_workshop', \r\n __( 'Informações da Oficina', 'cnew' ), \r\n 'cnew_workshop_custom_metabox_callback', \r\n 'cnew_workshop', \r\n 'normal',\r\n 'high'\r\n );\r\n\r\n add_meta_box(\r\n 'cnew_custom_metabox_registration', \r\n __( 'Formulário de Inscrição', 'cnew' ), \r\n 'cnew_registration_custom_metabox_callback', \r\n 'cnew_registration', \r\n 'normal',\r\n 'high'\r\n );\r\n }", "public function kiwip_add_meta_box(){\t\t\t\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->title,\n\t\t\tarray(&$this, 'kiwip_metabox_callback'),\n\t\t\t$this->cpt_name,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\t}", "public static function add_metaboxes(){}", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Translation',\n\t\t\t'Translation',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'meta_box',\n\t\t\t),\n\t\t\t'words',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "function add() {\n\t\tforeach ($this->_meta_box['pages'] as $page) {\n\t\t\tadd_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n\t\t}\n\t}", "function ev_gallery_add_box() {\n\tglobal $ev_gallery_metabox;\n\t\n\tadd_meta_box($ev_gallery_metabox['id'], $ev_gallery_metabox['title'], 'ev_gallery_show_box', $ev_gallery_metabox['page'], $ev_gallery_metabox['context'], $ev_gallery_metabox['priority']);\n}", "function add() {\n foreach ($this->_meta_box['pages'] as $page) {\n add_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n }\n }", "function add() {\n foreach ($this->_meta_box['pages'] as $page) {\n add_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n }\n }", "public function addCustomBox() {\n add_meta_box( \n $this->post_type . '_meta',\n __( self::getLabel($this->post_type) . ' Meta', $this->post_type . '_meta' ),\n array($this, 'innerCustomBox'),\n $this->post_type,\n $this->fields_location, \n $this->fields_priority\n ); \n }", "public function apb_add_meta_boxes() {\r\n\t}", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Word linkages',\n\t\t\t'Word linkages',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'linkages_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'Answers',\n\t\t\t'Answers',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'answers_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "function gotravel_mikado_add_admin_container($attributes) {\n\t\t$name = '';\n\t\t$parent = '';\n\t\t$hidden_property = '';\n\t\t$hidden_value = '';\n\t\t$hidden_values = array();\n\n\t\textract($attributes);\n\n\t\tif(!empty($name) && is_object($parent)) {\n\t\t\t$container = new GoTravelMikadoContainer($name, $hidden_property, $hidden_value, $hidden_values);\n\t\t\t$parent->addChild($name, $container);\n\n\t\t\treturn $container;\n\t\t}\n\n\t\treturn false;\n\t}", "function add_meta_boxes()\n {\n }", "function coolRahulSoni_meta_box_add()\n{\n add_meta_box( 'my-meta-box-id', 'My First Meta Box', 'cd_meta_box_cb', 'post', 'normal', 'high' );\n}", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "public function add_meta_boxes()\n {\n\n $this->_add_bitly_meta_box();\n\n }", "public function add_metabox() {\n add_meta_box(\n 'customer_info',\n __( 'Customer Info', 'textdomain' ),\n array( $this, 'render_metabox' ),\n 'customer',\n 'advanced',\n 'default'\n );\n\n }", "public function addMetaBox()\r\n {\r\n add_meta_box($this->id, esc_html__($this->title, 'firalabs-tv-show'), array(\r\n $this,\r\n 'render'\r\n ), 'firalabs_tv_show', $this->context, 'default');\r\n }", "public static function add_meta_box() {\n add_meta_box(\n 'link_meta', // Unique ID\n 'Properties', // Box title\n [self::class, 'meta_html'], // Content callback, must be of type callable\n \"link\" // Post type\n );\n }", "public function add_meta_boxes()\n \t{\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('wp_plugin_template_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray($this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\t\t\t\t\n \t}", "function add_meta_box($id, $title, $callback, $screen = \\null, $context = 'advanced', $priority = 'default', $callback_args = \\null)\n {\n }", "public function add_metabox() {\r\n\t\tadd_meta_box(\r\n\t\t\t'stats', // ID\r\n\t\t\t'Stats', // Title\r\n\t\t\tarray(\r\n\t\t\t\t$this,\r\n\t\t\t\t'meta_box', // Callback to method to display HTML\r\n\t\t\t),\r\n\t\t\t'spam-stats', // Post type\r\n\t\t\t'normal', // Context, choose between 'normal', 'advanced', or 'side'\r\n\t\t\t'core' // Position, choose between 'high', 'core', 'default' or 'low'\r\n\t\t);\r\n\t}", "public function register()\n\t\t{\n\t\t\tif( empty($this->_postType) ) {\n\t\t\t\twp_die( 'Empty metabox post type.' );\n\t\t\t}\n\n\t\t\t$all_empty = true;\n\n\t\t\tforeach( $this->getTabs() as $tab ) {\n\t\t\t\tif ( ! $this->_alwaysDisplay && $tab->getContainers()->size() == 0 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tforeach ( $tab->getContainers() as $container ) {\n\t\t\t\t\tif ( ! $this->_alwaysDisplay && $container->getFields()->size() == 0 ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$all_empty = false;\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( $all_empty ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->_id = \"metabox_{$this->_postType}_{$this->_slug}\";\n\n\t\t\tadd_meta_box(\n\t\t\t\t$this->_id,\n\t\t\t\t$this->_title,\n\t\t\t\tarray($this, 'render'),\n\t\t\t\t$this->_postType,\n\t\t\t\t$this->_position,\n\t\t\t\t$this->_priority\n\t\t\t);\n\n\t\t\tadd_action( 'admin_head', array($this, 'disableHideMetaboxes') );\n\t\t}", "function add_metabox() {\n\tadd_meta_box(\n\t\t'external-connection-groups',\n\t\t__( 'External Connection Groups', 'distributor' ),\n\t\t__NAMESPACE__ . '\\render_metabox',\n\t\t\\Distributor\\Waves\\get_distributable_custom_post_types(),\n\t\t'side',\n\t\t'high'\n\t);\n\n}", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "public function add($item)\n {\n $this->addArray('content', $item, array('ButtonContainer', 'Container', 'Form', 'Heading', 'HTML', 'Image', 'Checkbox', 'Email', 'HiddenField', 'Label', 'Password', 'Phone', 'RadioButtons', 'SelectMenu', 'TextInput', 'TextArea', 'Upload', 'XList', 'Table'));\n }", "static function add_custom_box() {\n\n // A meta box para os dados\n add_meta_box(\n 'agenda_data',\n 'Dados da Agenda',\n array( __CLASS__,'inner_custom_box_callback_function' ),\n 'agenda', // em que post type eles entram?\n 'side' // onde? side, normal, advanced\n //,'default' // 'high', 'core', 'default' or 'low'\n //,array('variáve' => 'valor') // variaveis que serão passadas para o callback\n );\n\n\n // A meta box que replica a taxonomia 'agenda_tipo', mas com radio buttons\n\t\tadd_meta_box(\n\t\t\t'agenda_tipo',\n\t\t\t_x( 'Tipo da Agenda', 'tipo do evento da agenda', 'panamazonica' ),\n\t\t\tarray( __CLASS__, 'agenda_tipo_callback_function' ),\n\t\t\t'agenda',\n\t\t\t'side',\n\t\t\t'core'\n\t\t);\n\n }", "function carrousel_metaboxes(){\n add_meta_box(\"MonCarrousel\", \"lien\", \"carrousel_metabox\");\n}", "function listing_image_add_metabox () {\n\t\tadd_meta_box( 'listingimagediv', __( 'Image Containers Loop', 'text-domain' ), 'listing_image_metabox', 'product', 'side', 'low');\n\t}", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "public function add_meta_box( $title ) {\n\t\t$this->meta_box = array( $title => new Metabox( $title, $this->post_type_name ) );\n\t\tif ( ! isset( $this->meta_data ) ) {\n\t\t\t$this->meta_data = $this->create_collection();\n\t\t}\n\n\t\treturn $this;\n\t}", "function clix_uppe_add_meta_box() {\r\n\tif( function_exists('add_meta_box') ) {\r\n\t\tadd_meta_box( 'clix_uppe_meta_box', 'Clix Category Exclusion', 'clix_uppe_meta_box', post, 'side' );\r\n \t}\r\n}", "public function add_meta_boxes() {\n add_meta_box( 'wc-product-label-gallery', __( 'Label gallery', 'wc-label-gallery' ), array( $this, 'gallery_output' ), 'product', 'side', 'low' );\n }", "function add_meta_box() {\t\t\n\t\t\t/* Gets available public post types. */\n\t\t\t$post_types = get_post_types( array( 'public' => true ), 'objects' );\n\t\t\t\n\t\t\t$post_types = apply_filters( 'remove_youtube_white_label_meta_box', $post_types );\n\t\t\t\n\t\t\t/* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */\n\t\t\tforeach ( $post_types as $type ) {\n\t\t\t\t/* Add the meta box. */\n\t\t\t\tadd_meta_box( self::DOMAIN . \"-{$type->name}-meta-box\", __( 'YouTube Embed Shortcode Creator (does not save meta)', self::DOMAIN ), array( $this, 'meta_box' ), $type->name, 'side', 'default' );\n\t\t\t}\n\t\t}", "function cinerama_edge_meta_box_add() {\n\t\tglobal $cinerama_edge_global_Framework;\n\n\t\tforeach ( $cinerama_edge_global_Framework->edgtMetaBoxes->metaBoxes as $key => $box ) {\n\t\t\t$hidden = false;\n\t\t\tif ( ! empty( $box->hidden_property ) ) {\n\t\t\t\tforeach ( $box->hidden_values as $value ) {\n\t\t\t\t\tif ( cinerama_edge_option_get_value( $box->hidden_property ) == $value ) {\n\t\t\t\t\t\t$hidden = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( is_string( $box->scope ) ) {\n\t\t\t\t$box->scope = array( $box->scope );\n\t\t\t}\n\n\t\t\tif ( is_array( $box->scope ) && count( $box->scope ) ) {\n\t\t\t\tforeach ( $box->scope as $screen ) {\n\t\t\t\t\tcinerama_edge_create_meta_box_handler( $box, $key, $screen );\n\n\t\t\t\t\tif ( $hidden ) {\n\t\t\t\t\t\tadd_filter( 'postbox_classes_' . $screen . '_edgtf-meta-box-' . $key, 'cinerama_edge_meta_box_add_hidden_class' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tadd_action( 'admin_enqueue_scripts', 'cinerama_edge_enqueue_meta_box_styles' );\n\t\tadd_action( 'admin_enqueue_scripts', 'cinerama_edge_enqueue_meta_box_scripts' );\n\t}", "public static function create_meta_box() {\n\t\t$content_types_array = self::_get_active_content_types();\n\t\tforeach ( $content_types_array as $content_type ) {\n\t\t\tadd_meta_box( 'custom-content-type-mgr-custom-fields'\n\t\t\t\t, __('Custom Fields', CCTM::txtdomain )\n\t\t\t\t, 'StandardizedCustomFields::print_custom_fields'\n\t\t\t\t, $content_type\n\t\t\t\t, 'normal'\n\t\t\t\t, 'high'\n\t\t\t\t, $content_type \n\t\t\t);\n\t\t}\n\t}", "public function register_metabox() {\n\t\t$fm = new Fieldmanager_Group( [\n\t\t\t'name' => 'hero_fields', // \"name\" id deceiving, used as the key/ID.\n\t\t\t'serialize_data' => false,\n\t\t\t'add_to_prefix' => false,\n\t\t\t'children' => [\n\t\t\t\t'_headline' => new Fieldmanager_RichTextArea( 'Main Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t\t'_subheadline' => new Fieldmanager_RichTextArea( 'Sub Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t],\n\t\t] );\n\n\t\t/**\n\t\t * Initiate the metabox\n\t\t */\n\t\t$fm->add_meta_box( 'Hero', 'page' );\n\t}", "public static function add_to_wc_metabox(){\n global $post;\n\n echo '<div class=\"options_group\">';\n\n echo woocommerce_wp_checkbox( array(\n 'id' => '_only_item_in_cart',\n 'label' => __( 'Only Item In Cart' ) ,\n 'description' => __( 'For special items that need to be purchased individually.', 'wc-only-item-in-cart' )\n )\n );\n\n echo '</div>';\n\n }", "public function add_meta_boxes()\n \t{\n\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('WP_Custom_Login_Profile_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray(&$this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\n\n \t}", "function portfolioism_add_custom_metabox() {\n add_meta_box(\n 'portfolioism_meta',\n 'Artwork',\n 'portfolioism_meta_callback',\n 'artwork'\n );\n }", "public function register_metaboxes(){\n\t\tif ($this->options('use_metabox')){\n\t\t\t$metabox = $this->metabox();\n\t\t\tadd_meta_box(\n\t\t\t\t$metabox['id'],\n\t\t\t\t$metabox['title'],\n\t\t\t\t'show_meta_boxes',\n\t\t\t\t$metabox['page'],\n\t\t\t\t$metabox['context'],\n\t\t\t\t$metabox['priority']\n\t\t\t);\n\t\t}\n\t}", "function add_meta_box() {\n\t\t \tadd_meta_box( 'woocommerce-product-addons', __('Product Add-ons', 'wc_product_addons'), array(&$this, 'meta_box'), 'product', 'side', 'default' );\n\t\t }", "function pz_add_custom_meta_box()\n{\n add_meta_box(\n 'custom_meta_box',\n 'Custom Image Metabox',\n 'pz_custom_meta_box_callbacks',\n 'page', // page, post etc.\n 'normal',\n 'high');\n}", "public function processContainer()\n {\n $class = \"container\";\n if ($this->hasFluid()) $class .= \"-fluid\";\n $this->add($this->createWrapper('div', ['class' => $class], $this->stringifyHeader() . $this->stringifyCollapse()));\n }", "public function add_meta_box() {\r\n\r\n\t\tif( ! is_wp_error( $this->tax_obj ) && isset($this->tax_obj->object_type ) ) foreach ( $this->tax_obj->object_type as $post_type ):\r\n\t\t\t$label = $this->tax_obj->labels->name;\r\n\t\t\t$id = ! is_taxonomy_hierarchical( $this->taxonomy ) ? 'radio-tagsdiv-'.$this->taxonomy : 'radio-' .$this->taxonomy .'div' ;\r\n\t\t\tadd_meta_box( $id, $label ,array( $this,'metabox' ), $post_type ,'side','core', array( 'taxonomy'=>$this->taxonomy ) );\r\n\t\tendforeach;\r\n\t}", "function idem_pop_up_add_meta_box()\n{\n add_meta_box(\n 'idem-pop-up-meta-box', // id, used as the html id att\n __( 'Idem Pop Up' ), // meta box title, like \"Page Attributes\"\n 'idem_pop_up_meta_box_cb', // callback function, spits out the content\n 'page', // post type or page. We'll add this to pages only\n 'side', // context (where on the screen)\n 'high' // priority, where should this go in the context?\n );\n}", "public static function add_meta_box() {\n\t\tadd_meta_box( 'sponsor-meta', __( 'Sponsor Meta', self::$text_domain ), array( __CLASS__, 'do_meta_box' ), self::$post_type_name , 'normal', 'high' );\n\t}", "function toolbox_add_portfolio_meta_box() {\n add_meta_box(\n 'toolbox_portfolio_metabox', // Unique ID (ID of Div Tag ** Note: DO NOT NAME same as field(s) below **)\n esc_html__( 'Portfolio Entry', 'lorainccc' ), // Title & Text Domain\n 'toolbox_show_portfolio_meta_box', // Callback function\n 'portfolio', // Admin Page or Post Type\n 'normal', // Context (Position)\n 'default' // Priority\n );\n}", "public function add_metaboxes() {\n\t\tadd_meta_box(\n\t\t\t'codes',\n\t\t\t__( 'Codes' ),\n\t\t\tarray( $this, 'render_codes_metabox' )\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'edit-codes',\n\t\t\t__( 'Edit codes' ),\n\t\t\tarray( $this, 'render_edit_metabox' )\n\t\t);\n\t}", "public function setup_meta_box() {\n\t\t\tadd_meta_box( 'add-shortcode-section', __( 'Shortcode', IFLANG ), array( $this, 'meta_box' ), 'nav-menus', 'side', 'high' );\n\t\t}", "public function addContainer( $container, $index=false )\n\t\t{\n\t\t\t$container->setTabSlug( $this->_slug );\n\n\t\t\tif( $index === false ) {\n\t\t\t\t$this->_containers->insert( $container );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_containers->insertAt( $container, $index );\n\t\t\t}\n\n\t\t\treturn $container;\n\t\t}", "public function add_meta_box() {\n\t\tif (count($post_types = $this->get_post_types())) {\n\t\t\t$this->load_textdomain();\n\t\t\tforeach ($post_types as $post_type)\n\t\t\t\tadd_meta_box('im8_additional_css_box', __(\"Additional CSS\", 'im8-additional-css'), array($this, 'print_meta_box'), $post_type, 'normal', 'high');\n\t\t}\n\t}", "function add_metaboxes() \n {\n // add a metabox to the Event using the callback add_time_date_metabox \n add_meta_box( \n \"bbquotations-source\",\n __(\"Quote source url\", $this->localization_domain),\n array(&$this, \"add_source_metabox\"), $this->custom_post_type_name, \"normal\", \"high\"\n );\n\n add_meta_box( \n \"bbquotations-cheatsheet\",\n __(\"Quotes usage cheatsheet\", $this->localization_domain),\n array(&$this, \"add_cheatsheet_metabox\"), $this->custom_post_type_name, \"side\", \"high\"\n );\n }", "public function createContainer( $options ){\n\n // options container open\n if( $options['container'] == 'open' ) {\n // open container\n $this->openContainer( $options );\n // add text\n $this->addText( $options );\n } \n // options container open\n\n // options container close\n if( $options['container'] == 'close' ) {\n // close container\n $this->closeContainer( $options );\n } \n // options container close\n \n }", "function ilusix_my_custom_meta_box() {\n global $myMetaBoxPostTypes;\n\n foreach($myMetaBoxPostTypes as $postType) {\n add_meta_box(\n 'my_custom_meta_box_identifier' . '-' . $postType,\n 'Meta box title',\n 'ilusix_my_custom_meta_box_callback',\n $postType,\n 'normal',\n 'default'\n );\n }\n}", "public function setContainer($var)\n {\n GPBUtil::checkString($var, True);\n $this->Container = $var;\n\n return $this;\n }", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "public function register_meta_box() {\n\n\t\t\tadd_meta_box($this->slug, $this->options['title'], array($this, 'setup_meta_box'), $this->screen, $this->options['context'], $this->options['priority']);\n\t\t\tremove_meta_box('postcustom', $this->screen, 'normal');\n\t\t}", "public function registerMetaBox() {\n\n add_meta_box(\n 'post-clone',\n 'Clone',\n array($this, 'buildForm'),\n self::$post_types,\n 'side',\n 'low');\n }", "public function setContainer($var)\n {\n GPBUtil::checkString($var, True);\n $this->container = $var;\n\n return $this;\n }", "function idem_pop_up_inner_add_meta_box()\n{\n add_meta_box(\n 'idem-pop-up-inner-meta-box', // id, used as the html id att\n __( 'Idem Pop Up Inner Meta Box' ), // meta box title, like \"Page Attributes\"\n 'idem_pop_up_inner_meta_box_cb', // callback function, spits out the content\n 'idem_pop_up', // post type or page. We'll add this to pages only\n 'side', // context (where on the screen)\n 'low' // priority, where should this go in the context?\n );\n}", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "function add_shortcode_metabox() {\n add_meta_box('acf_slideshow_shortcode', 'Shortcode', 'acfcallback', 'acf_slideshow', 'side', 'default');\n}", "public function addContainer($name, $label = NULL, $required = FALSE)\n\t{\n\t\t$control = new FormContainer;\n\t\t$control->label = $label;\n\t\t//$control->setOption('inline') = TRUE; // vnoreny container\n\t\tif($required) $control->setOption('required', TRUE);\n\t\t//$control->currentGroup = $this->currentGroup;\n\t\treturn $this[$name] = $control;\n\t}", "function experiences_add_custom_box() {\n add_meta_box(\n 'exp_image_link',\n 'Experience Settings',\n 'experiences_meta_box_html',\n ['experiences']\n );\n}", "function pg_add_custom_box() {\r\n\tif( function_exists( 'add_meta_box' )) {\r\n\t\tadd_meta_box( 'pg_custom_box_1', __( 'Edit Photocrati Galleries / Albums', 'photocrati' ), 'pg_inner_custom_box_1', 'page', 'normal', 'high' );\r\n\t\tadd_meta_box( 'pg_custom_box_2', __( 'Edit Photocrati Galleries / Albums', 'photocrati' ), 'pg_inner_custom_box_1', 'post', 'normal', 'high' );\r\n\t}\r\n}", "public function addToFormContainer(Nette\\Forms\\Container $container)\n\t{\n\t\t$container = $container->addContainer($this->key);\n\n\t\t$container->addText('from', $this->name);\n\n\t\t$container->addText('to', $this->name_second);\n\n\t\t$this->addAttributes($container['from']);\n\t\t$this->addAttributes($container['to']);\n\n\t\tif ($placeholder_array = $this->getPlaceholder()) {\n\t\t\t$text_from = reset($placeholder_array);\n\n\t\t\tif ($text_from) {\n\t\t\t\t$container['from']->setAttribute('placeholder', $text_from);\n\t\t\t}\n\n\t\t\t$text_to = end($placeholder_array);\n\n\t\t\tif ($text_to && ($text_to != $text_from)) {\n\t\t\t\t$container['to']->setAttribute('placeholder', $text_to);\n\t\t\t}\n\t\t}\n\t}", "function create_meta_portfolio_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-portfolio-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PORTFOLIO ITEM SETTINGS', 'new_meta_portfolio_boxes', PEXETO_PORTFOLIO_POST_TYPE, 'normal', 'high' );\n\t}\n}", "public function go(Widget $container) {\n\t\t$container->add($this->asWidget());\n\t}", "function add_your_fields_meta_box(){\r\nadd_meta_box(\r\n'your_fields_meta_box',// $id\r\n'Auteur',// $title\r\n'show_your_fields_meta_box',// $callback\r\n'Livre',// $screen\r\n'normal',// $context\r\n'high'// $priority\r\n);\r\n}", "function caviar_add_meta_box() {\n\n\t$screens = array('page' );\n\n\tforeach ( $screens as $screen ) {\n\n\t\tadd_meta_box(\n\t\t\t'caviar_sectionid',\n\t\t\tesc_html__( 'Caviar Metabox Field Example', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box_callback',\n\t\t\t$screen\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'caviar_2',\n\t\t\tesc_html__( 'Caviar Metabox 2', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box2_callback',\n\t\t\t$screen\n\t\t);\n\t}\n}", "function gotravel_mikado_add_meta_box($attributes) {\n\t\t$scope = array();\n\t\t$title = '';\n\t\t$hidden_property = '';\n\t\t$hidden_values = array();\n\t\t$name = '';\n\n\t\textract($attributes);\n\n\t\tif(!empty($scope) && $title !== '' && $name !== '') {\n\t\t\t$meta_box_obj = new GoTravelMikadoMetaBox($scope, $title, $hidden_property, $hidden_values, $name);\n\t\t\tgotravel_mikado_framework()->mkdMetaBoxes->addMetaBox($name, $meta_box_obj);\n\n\t\t\treturn $meta_box_obj;\n\t\t}\n\n\t\treturn false;\n\t}", "function add_meta_boxes($post_type, $post)\n {\n }", "function create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' POST SETTINGS', 'new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "public static function registerMetaBoxes() {}", "function myplugin_add_custom_box() {\n\t\t add_meta_box( \n\t\t 'myplugin_sectionid',\n\t\t __( 'My Post Section Title', 'myplugin_textdomain' ),\n\t\t 'myplugin_inner_custom_box',\n\t\t 'wpflexslider' \n\t\t );\n\t\t add_meta_box(\n\t\t 'myplugin_sectionid',\n\t\t __( 'My Post Section Title', 'myplugin_textdomain' ), \n\t\t 'myplugin_inner_custom_box',\n\t\t 'page'\n\t\t );\n\t\t add_meta_box('wpt_events_location', 'Event Location', 'wpt_events_location', 'events', 'side', 'default');\n\t\t}", "public function add_meta_boxes()\n {\n /* Author Name */\n add_meta_box(\n 'testimonial_options',\n 'Testimonial Options',\n array ( $this , 'render_features_box'),\n 'testimonial',\n 'side',\n 'default'\n );\n /* Author email */\n /* approved [checkbox] */\n /* featured [checkbox] */\n }", "public function register_meta_boxes()\n {\n }", "function mixtape_qodef_woocommerce_add_meta_box() {\n\t\t$meta_box = mixtape_qodef_add_meta_box(array(\n\t\t\t'scope' => 'product',\n\t\t\t'title' => esc_html__('Product Masonry Settings','mixtapewp'),\n\t\t\t'name' => 'product-settings-meta-box'\n\t\t));\n\n\t\tmixtape_qodef_add_meta_box_field(array(\n\t\t\t'name' => 'shop_masonry_dimensions',\n\t\t\t'type' => 'select',\n\t\t\t'label' => esc_html__('Dimensions for Masonry','mixtapewp'),\n\t\t\t'description' => esc_html__('Choose image dimensions for Masonry Shop list','mixtapewp'),\n\t\t\t'parent' => $meta_box,\n\t\t\t'options' => array(\n\t\t\t\t'default' => esc_html__('Default','mixtapewp'),\n\t\t\t\t'large_width' => esc_html__('Large width','mixtapewp'),\n\t\t\t\t'large_height' => esc_html__('Large height','mixtapewp'),\n\t\t\t\t'large_width_height' => esc_html__('Large width/height','mixtapewp')\n\t\t\t)\n\t\t));\n\t}", "function add_meta_box() {\n global $post;\n\n $post_types = get_post_types( array( 'public' => true ) );\n\n if ( !empty( $post ) ) {\n if ( $this->check_user_analytics_exist( $post ) ) {\n foreach ( $post_types as $post_type ) {\n add_meta_box( 'show_user_analytics', __( 'Post Author Analytics Info', 'wpuf-pro' ), array( $this, 'render_meta_box_content' ), $post_type, 'advanced', 'high' );\n }\n }\n }\n }", "function sample_add_metabox() {\n\tadd_meta_box(\n\t\t'post-notes',\n\t\t__( 'Post Notes', 'textdomain' ),\n\t\t'sample_render_metabox',\n\t\t'post',\n\t\t'normal',\n\t\t'default'\n\t);\n}", "function gotravel_mikado_add_meta_box_field($attributes) {\n\t\t$type = '';\n\t\t$name = '';\n\t\t$default_value = '';\n\t\t$label = '';\n\t\t$description = '';\n\t\t$options = array();\n\t\t$args = array();\n\t\t$hidden_property = '';\n\t\t$hidden_values = array();\n\t\t$parent = '';\n\n\t\textract($attributes);\n\n\t\tif(!empty($parent) && !empty($type) && !empty($name)) {\n\t\t\t$field = new GoTravelMikadoMetaField($type, $name, $default_value, $label, $description, $options, $args, $hidden_property, $hidden_values);\n\n\t\t\tif(is_object($parent)) {\n\t\t\t\t$parent->addChild($name, $field);\n\n\t\t\t\treturn $field;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增轮播图';\n $this->global['pageName'] = 'carousel_add';\n $data = '';\n\n $this->loadViews(\"carousel_add\", $this->global, $data, NULL);\n }\n }", "function create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PAGE SETTINGS', 'new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}", "public function add_meta_boxes() {\n global $current_screen;\n\n $page_main = $this->_admin_pages['swpm'];\n\n if ($current_screen->id == $page_main && isset($_REQUEST['form'])) {\n add_meta_box('swpm_form_items_meta_box', __('Form Items', 'swpm-form-builder'), array(&$this, 'meta_box_form_items'), $page_main, 'side', 'high');\n }\n }", "public function addWidget()\r\n {\r\n }", "public function addContainer($data) {\n try {\n $client = new Zend_Soap_Client($this->CONTAINER_WSDL_URI);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'createContainer';\n $result = $client->createContainer(\n $this->toXml(\n array(\n 'backgroundColor' => $data['backgroundColor'],\n 'borderBottom' => $data['borderBottom'],\n 'borderBottomColor' => $data['borderBottomColor'],\n 'borderBottomStyle' => $data['borderBottomStyle'],\n 'borderBottomUnit ' => $data['borderBottomUnit'],\n 'borderLeft' => $data['borderLeft'],\n 'borderLeftColor' => $data['borderLeftColor'],\n 'borderLeftStyle' => $data['borderLeftStyle'],\n 'borderLeftUnit' => $data['borderLeftUnit'],\n 'borderRight' => $data['borderRight'],\n 'borderRightColor' => $data['borderRightColor'],\n 'borderRightStyle' => $data['borderRightStyle'],\n 'borderRightUnit' => $data['borderRightUnit'],\n 'borderTop' => $data['borderTop'],\n 'borderTopColor' => $data['borderTopColor'],\n 'borderTopStyle' => $data['borderTopStyle'],\n 'borderTopUnit' => $data['borderTopUnit'],\n 'bottomMargin' => $data['bottomMargin'],\n 'bottomMarginUnit' => $data['bottomMarginUnit'],\n 'bottomPadding' => $data['bottomPadding'],\n 'bottomPaddingUnit' => $data['bottomPaddingUnit'],\n 'containerHeight' => $data['containerHeight'],\n 'containerId' => $data['containerId'],\n 'containerName' => $data['containerName'],\n 'containerWidth' => $data['containerWidth'],\n 'containerXaxis' => $data['containerXaxis'],\n 'containerYaxis' => $data['containerYaxis'],\n 'css' => $data['css'],\n 'font' => $data['font'],\n 'fontAlignment' => $data['fontAlignment'],\n 'fontColor' => $data['fontColor'],\n 'fontSize' => $data['fontSize'],\n 'isActive' => true,\n 'isBold' => $data['isBold'],\n 'isBorderColorSameForAll' => $data['isBorderColorSameForAll'],\n 'isBorderStyleSameForAll' => $data['isBorderStyleSameForAll'],\n 'isBorderWidthSameForAll' => $data['isBorderWidthSameForAll'],\n 'isItalic' => $data['isItalic'],\n 'isMargineSameForAll' => $data['isMargineSameForAll'],\n 'isPaddingSameForAll' => $data['isPaddingSameForAll'],\n 'leftMargin' => $data['leftMargin'],\n 'leftMarginUnit' => $data['leftMarginUnit'],\n 'leftPadding' => $data['leftPadding'],\n 'leftPaddingUnit' => $data['leftPaddingUnit'],\n 'letterSpacing' => $data['letterSpacing'],\n 'lineHeight' => $data['lineHeight'],\n 'primaryKey' => 0,\n 'rightMargin' => $data['rightMargin'],\n 'rightMarginUnit' => $data['rightMarginUnit'],\n 'rightPadding' => $data['rightPadding'],\n 'rightPaddingUnit' => $data['rightPaddingUnit'],\n 'textDecoration' => $data['textDecoration'],\n 'topMargin' => $data['topMargin'],\n 'topMarginUnit' => $data['topMarginUnit'],\n 'topPadding' => $data['topPadding'],\n 'topPaddingUnit' => $data['topPaddingUnit'],\n 'updatedby' => $_SESSION['Username'],\n 'updatedt' => date('Y-m-d') . 'T' . date('H:i:s') . 'Z',\n 'wordSpacing' => $data['wordSpacing'],\n )\n ,$rootNodeName = 'AddContainer')\n );\n return $result;\n } catch (Exception $e) {\n // print_r($e);\n }\n }", "public function addMetabox( $args )\n\t{\n\t\tif ( is_array( $args ) && isset( $args['name'] ) ) {\n\t\t\t$this->_metaboxes[$args['name']] = new PosttypeMetabox( self::$post_type, $this->_fields_base, $args );\n\t\t}\n\t\treturn $this;\n\t}", "function tabify_add_meta_boxes($post_type)\n {\n }", "public function addItem($content = null) {\n\t\t$ctrl = new BlockControl($this->itemTag);\n\t\t$ctrl->setContent($content);\n\t\t$this->AddControl($ctrl);\n\t\treturn $ctrl;\n\t}", "function alpha_meta_box_add()\n{\n add_meta_box('alpha-beer-list', 'Beer List Properties', 'alpha_beer_list', 'ptf_bars', 'side', 'low');\n}", "function wck_settings_page_add_meta_boxes() {\r\n global $post;\r\n\t\tdo_action( 'add_meta_boxes', $this->hookname, $post );\r\n\t}", "function add_ingredienten_metabox(){\n\tadd_meta_box(\n\t\t'ingredienten_metabox',//id\n\t\t'Ingrediënten',//title\n\t\t'content_ingredienten_metabox',//callback\n\t\t'smaak',//page\n\t\t'normal', //context\n\t\t'high'//priority\n\t\t);\n}", "function add_meta_boxes() {\n\t\tif( function_exists( 'add_meta_box' ) ) {\n\t\t\tadd_meta_box( 'unit-info', __('Unit Information'), array( $this, '_display_unitinfo_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'maps', __('Maps'), array( $this, '_display_maps_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'gallery', __('Gallery'), array( $this, '_display_gallery_meta'), 'units', 'normal', 'low');\n\t\t\tadd_meta_box( 'unit-status', __('Availability'), array( $this, '_display_status_meta'), 'units', 'side', 'high');\n\t\t}\n\t}", "public function add_meta_boxes() {\n\t\t// Create the Slide Meta Boxes\n\t\tadd_meta_box( 'justart-slider-slide-settings-group', 'Slides', array( $this, 'create_slide_settings_meta_box' ), 'justart-slider', 'normal', 'default' );\n\t\tadd_filter( 'postbox_classes_justart-slider-slide-settings-group', array( $this, 'add_metabox_classes' ) );\n\t\t\n\t\t// Create the Shortcode Meta Box\n\t\tadd_meta_box( 'justart-slider-shortcode-group', 'Shortcode', array( $this, 'create_shortcode_meta_box' ), 'justart-slider', 'side', 'high' );\n\t\t\n\t\t// Create the Global Settings Meta Box\n\t\tadd_meta_box( 'justart-slider-global-settings-group', 'Global settings', array( $this, 'create_global_settings_meta_box' ), 'justart-slider', 'side', 'default' );\n\t}", "public function add_meta_box() {\n\t\tadd_meta_box(\n\t\t\t 'related_posts_meta_box'\n\t\t\t,__( 'Related Posts', self::LANG )\n\t\t\t,array( &$this, 'render_meta_box_content' )\n\t\t\t,'post'\n\t\t\t,'advanced'\n\t\t\t,'high'\n\t\t);\n\t}", "function bnk_create_slide_metabox() {\r\n\tglobal $slide_meta;\r\n \r\n\tadd_meta_box($slide_meta['id'], $slide_meta['title'], 'bnk_build_slide_metabox', $slide_meta['page'], $slide_meta['context'], $slide_meta['priority']);\r\n}", "function mmdyk_add_custom_box() {\n\n if( function_exists( 'add_meta_box' )) {\n add_meta_box( 'mmdyk_sectionid', __( 'Did You Know?', 'mmdyk_textdomain' ), \n 'mmdyk_inner_custom_box', 'post', 'advanced', 'high' );\n add_meta_box( 'mmdyk_sectionid', __( 'Did You Know?', 'mmdyk_textdomain' ), \n 'mmdyk_inner_custom_box', 'page', 'advanced', 'high' );\n }\n}" ]
[ "0.6718297", "0.6702796", "0.65368843", "0.6509748", "0.65028596", "0.63365394", "0.6243661", "0.62302494", "0.6187787", "0.6187787", "0.61656106", "0.61477613", "0.6131784", "0.612489", "0.6115411", "0.61144465", "0.60691196", "0.60223013", "0.5994847", "0.5972644", "0.5952682", "0.5920701", "0.5916723", "0.5905881", "0.5882508", "0.5878183", "0.5878059", "0.5876174", "0.587133", "0.5843694", "0.5827897", "0.58188605", "0.58165115", "0.5815558", "0.5814215", "0.58120716", "0.57995903", "0.5796099", "0.57811785", "0.57804084", "0.57566464", "0.57547176", "0.57483405", "0.57465965", "0.5722614", "0.5721509", "0.5721494", "0.57138544", "0.5709954", "0.5685474", "0.56813467", "0.56778395", "0.5676484", "0.5666521", "0.56503826", "0.5649788", "0.56436825", "0.5640526", "0.5630138", "0.56280017", "0.5623185", "0.5611678", "0.5603851", "0.5602825", "0.5600833", "0.55937934", "0.55847687", "0.5584353", "0.5584184", "0.558373", "0.5574266", "0.5564453", "0.5561255", "0.5561249", "0.5551118", "0.55407995", "0.5538602", "0.5538496", "0.55287635", "0.55204564", "0.5511836", "0.5506949", "0.5506398", "0.55062485", "0.5505378", "0.55007035", "0.54991186", "0.5495255", "0.5485256", "0.5478201", "0.5478075", "0.5469921", "0.5469757", "0.546132", "0.5452752", "0.54458535", "0.5440913", "0.5439235", "0.5432415", "0.5431168" ]
0.60519594
17
Create a new fields container.
public function createContainer( $title, $slug, $index=false ) { return $this->getTab( '_options_tab' )->createContainer( $title, $slug, $index ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function createFields();", "abstract protected function createFields();", "protected function createFormFields() {\n\t}", "public function create_fields() {\n\t\tif ( count( $this->sections ) > 0 ) {\n\t\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\t\t$method = $this->determine_method( $v, 'form' );\n\t\t\t\t$name = $v['name'];\n\t\t\t\tif ( $v['type'] == 'info' ) { $name = ''; }\n\t\t\t\tadd_settings_field( $k, $name, $method, $this->token, $v['section'], array( 'key' => $k, 'data' => $v ) );\n\n\t\t\t\t// Let the API know that we have a colourpicker field.\n\t\t\t\tif ( $v['type'] == 'range' && $this->_has_range == false ) { $this->_has_range = true; }\n\t\t\t}\n\t\t}\n\t}", "public static function factory(array $fields)\n\t{\n\t\t$collection = new self();\n\t\tforeach ($fields as $fieldData) {\n\t\t\t$field = new Field();\n\t\t\t$field->setProperties($fieldData);\n\t\t\t$collection->add($field);\n\t\t}\n\t\treturn $collection;\n\t}", "public function withFields(): Factory\n {\n return $this->afterCreating(function (Entry $entry) {\n $fields = $entry->toEntryClass()->getFields();\n\n foreach ($fields as $field) {\n Field::factory()->create([\n 'entry_id' => $entry->id,\n 'key' => $field->getKey(),\n 'value' => $field->getKey() . '_value',\n ]);\n }\n });\n }", "public static function factory(array $fields)\n\t{\n\t\t$collection = new self();\n\t\tforeach ($fields as $data) {\n\t\t\t$field = Field::factory($data);\n\t\t\t$collection->add($field);\n\t\t}\n\t\treturn $collection;\n\t}", "public function makeFieldList() {}", "public function buildFormFields()\n {\n $this->addField(\n SharpFormTextField::make('title')\n ->setLabel('Title')\n )->addField(\n SharpFormUploadField::make('cover')\n ->setLabel('Cover')\n ->setFileFilterImages()\n ->setCropRatio('1:1')\n ->setStorageBasePath('data/service')\n )->addField(\n SharpFormNumberField::make('price')\n ->setLabel('Price')\n )->addField(\n SharpFormMarkdownField::make('description')->setToolbar([\n SharpFormMarkdownField::B, SharpFormMarkdownField::I,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::IMG,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::A,\n ])\n )->addField(\n SharpFormTagsField::make('tags',\n Tag::orderBy('label')->get()->pluck('label', 'id')->all()\n )->setLabel('Tags')\n ->setCreatable(true)\n ->setCreateAttribute('name')\n );\n }", "public function createFields()\n\t{\n\t\t$this->_formFields = $this->createModelFormFields();\n\t\treturn $this;\n\t}", "function fieldset(array $fields = [])\n {\n return new \\Grogu\\Acf\\Entities\\FieldSet($fields);\n }", "public function Populate() {\r\n\t\t$form_instance = $this->form_instance;\r\n\t\t// Retrieve the field data\r\n\t\t$_els = vcff_parse_container_data($form_instance->form_content);\r\n\t\t// If an error has been detected, return out\r\n\t\tif (!$_els || !is_array($_els)) { return; }\r\n\t\t// Retrieve the form instance\r\n\t\t$form_instance = $this->form_instance; \r\n\t\t// Loop through each of the containers\r\n\t\tforeach ($_els as $k => $_el) {\r\n\t\t\t// Retrieve the container instance\r\n\t\t\t$container_instance = $this->_Get_Container_Instance($_el);\r\n\t\t\t// Add the container to the form instance\r\n\t\t\t$form_instance->Add_Container($container_instance);\r\n\t\t}\r\n\t}", "private function _createContainerForms() {\n $forms = [\n [\n 'name' => 'inline',\n 'classname' => 'App\\Models\\Backoffice\\ContainerForms\\Inline'\n ],\n [\n 'name' => 'popup',\n 'classname' => 'App\\Models\\Backoffice\\ContainerForms\\Popup'\n ]\n ];\n\n foreach ($forms as $form) {\n $newForm = new ContainerForm;\n $newForm->fill($form);\n $newForm->save();\n }\n }", "private function setFields($fields)\n\t{\n\n\t\tforeach ($fields as $field) {\n\t\t\tif (!\\vtlib\\Functions::getModuleId($field[28]) || $this->checkFieldExists($field[28], $field[2], $field[3])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$moduleInstance = \\vtlib\\Module::getInstance($field[28]);\n\t\t\t$blockInstance = \\vtlib\\Block::getInstance($field[25], $moduleInstance);\n\t\t\tif (!$blockInstance) {\n\t\t\t\tApp\\Log::error(\"No block found to create a field, you will need to create a field manually. Module: {$field[28]}, field name: {$field[6]}, field label: {$field[7]}\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$fieldInstance = new \\vtlib\\Field();\n\t\t\t$fieldInstance->column = $field[2];\n\t\t\t$fieldInstance->name = $field[6];\n\t\t\t$fieldInstance->label = $field[7];\n\t\t\t$fieldInstance->table = $field[3];\n\t\t\t$fieldInstance->uitype = $field[5];\n\t\t\t$fieldInstance->typeofdata = $field[15];\n\t\t\t$fieldInstance->readonly = $field[8];\n\t\t\t$fieldInstance->displaytype = $field[14];\n\t\t\t$fieldInstance->masseditable = $field[19];\n\t\t\t$fieldInstance->quickcreate = $field[16];\n\t\t\t$fieldInstance->columntype = $field[24];\n\t\t\t$fieldInstance->presence = $field[9];\n\t\t\t$fieldInstance->maximumlength = $field[11];\n\t\t\t$fieldInstance->quicksequence = $field[17];\n\t\t\t$fieldInstance->info_type = $field[18];\n\t\t\t$fieldInstance->helpinfo = $field[20];\n\t\t\t$fieldInstance->summaryfield = $field[21];\n\t\t\t$fieldInstance->generatedtype = $field[4];\n\t\t\t$fieldInstance->defaultvalue = $field[10];\n\t\t\t$fieldInstance->fieldparams = $field[22];\n\t\t\t$blockInstance->addField($fieldInstance);\n\t\t\tif ($field[26] && ($field[5] == 15 || $field[5] == 16 || $field[5] == 33 )) {\n\t\t\t\t$fieldInstance->setPicklistValues($field[26]);\n\t\t\t}\n\t\t\tif ($field[27] && $field[5] == 10) {\n\t\t\t\t$fieldInstance->setRelatedModules($field[27]);\n\t\t\t}\n\t\t}\n\t}", "public function buildFields() {\n }", "public function fieldCreate()\n\t{\n\t\t$fields=array();\n\t\tforeach($this->getTable()->result_array() as $row)\n\t\t{\n\t\t\tif($row['Extra']!=='auto_increment')\n\t\t\t{\n\t\t\t\t$fields[]=array(\n\t\t\t\t\t'field'=>$row['Field'],\n\t\t\t\t\t'max_length'=>preg_match('/varchar/',$row['Type']) ? (preg_replace('/[A-Za-z()]/','',$row['Type'])!=='' ? '\\'maxlength\\'=>'.preg_replace('/[A-Za-z()]/','',$row['Type']).',' : false) : false,\n\t\t\t\t\t'type'=>preg_match('/text/',$row['Type']) ? 'Area' : 'Field',\n\t\t\t\t\t'required'=>$row['Null']=='NO' ? true : false,\n\t\t\t\t\t'input'=>preg_match('/^(password|pass|passwd|passcode)$/i',$row['Field']) ? 'password' : 'text',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}", "static function createWith($fields) {\r\n return static::make($fields)->create();\r\n }", "public function createComponentFields()\n {\n $this->component->createTextField(\n array(\n 'name' => 'teaser_text',\n 'fieldLabel' => 'Teaser Text',\n 'supportText' => 'Der Banner Text',\n 'allowBlank' => true\n )\n );\n\n $this->component->createTextField(\n array(\n 'name' => 'image_link',\n 'fieldLabel' => 'Image Link',\n 'supportText' => 'Banner-verlinkung',\n 'allowBlank' => true\n )\n );\n\n $this->component->createTextField(\n array(\n 'name' => 'image_title',\n 'fieldLabel' => 'Image Title-Tag',\n 'supportText' => 'Title Tag des Bildes. Wird im Browser bei mouseover als Tooltip angezeigt und hilft screenreadern bei der Orientierung',\n 'allowBlank' => true\n )\n );\n\n $this->component->createTextField(\n array(\n 'name' => 'image_alt_tag',\n 'fieldLabel' => 'Image Alt-Tag',\n 'supportText' => 'Der Alt-Text wird, wie der Name vermuten läßt, alternativ angezeigt. Also nur, wenn das Bild aus welchen Gründen auch immer, nicht zu sehen ist. Das kann verschiedene Gründe haben: Server-Problem, falschen Pfadangabe, Bilder per Browser deaktiviert, oder eben eine „Lesehilfe“ für Benutzer mit Sehschwäche oder Blindheit. Aus Sicht des W3C ist der Alt-Text daher auch eine „Pflicht-Angabe“. Der Browser kann das Bild in aller Regel auch ohne Alt-Text anzeigen, aber es ist dringend anzuraten, den Alt-Text zu setzen.',\n 'allowBlank' => true\n )\n );\n\n $this->component->createHiddenField([\n 'name' => 'image_thumbnail'\n ]);\n\n $this->component->createHiddenField(array(\n 'name' => 'media_widget_store',\n 'allowBlank' => true\n ));\n }", "public function init_fields() {\n\t\t/**\n\t\t * @var \\WPO\\Container $options\n\t\t * @var \\WPO\\Container $section\n\t\t */\n\t\tforeach ( $this->fields()->get() as $options ) {\n\t\t\tif ( $options->has_callback() ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( $options->has_containers() ) {\n\t\t\t\tforeach ( $options->containers() as $section ) {\n\t\t\t\t\tif ( ! $section->has_callback() && $section->has_fields() ) {\n\t\t\t\t\t\tforeach ( $section->fields() as $field ) {\n\t\t\t\t\t\t\t$this->render_field( $field, $options, $section );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif ( $options->has_fields() ) {\n\t\t\t\tforeach ( $options->fields() as $field ) {\n\t\t\t\t\t$this->render_field( $field, $options, false );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function getFieldCollection()\n {\n $fields = $this->fields;\n $collection = new FieldCollection();\n\n foreach ($fields as $fieldKey => $fieldMeta) {\n $collection->add(new FieldVO($fieldKey, $fieldMeta));\n }\n\n return $collection;\n }", "private function createFields(){\n //Human::log(\"------------- Create fields model \".$this->modelName);\n self::$yetInit[get_class($this)]=true;\n //let's init database.\n $modelName=get_class($this);\n $modelNameManager=$modelName.\"Manager\";\n if(!class_exists($modelNameManager)){\n $modelNameManager=\"DbManager\";\n }\n $rc=new ReflectionClass($modelName);\n $rc->setStaticPropertyValue(\"manager\", new $modelNameManager( $modelName ));\n \n //browse the class properties to find db fields and then store it in a good order (keys first, associations later)\n\t $fields=array();\n foreach ($rc->getProperties() as $field){\n if($field->isPublic()){\n\n\n //get the type from the @var type $field name comment...yes, I'm sure.\n $comments=$field->getDocComment();\n $details=CodeComments::getVariable($comments);\n\n $type=$details[\"type\"];\n $isVector=$details[\"isVector\"];\n $description=$details[\"description\"];\n $fieldName=$field->name;\n\n $fieldObject=$this->getDbField($fieldName,$type,$isVector);\n\n if($fieldObject){\n $fieldObject[\"comments\"]=$description;\n switch($fieldObject[\"type\"]){\n\n case \"OneToOneAssoc\":\n case \"NToNAssoc\":\n //associations at the end\n array_push($fields, $fieldObject);\n break;\n\n default :\n //classic fields at the beginning\n array_unshift($fields, $fieldObject);\n\n }\n\n }\n }\n }\n\t //create the fields\n\t foreach ($fields as $f){\n\t\t$f[\"options\"][Field::COMMENTS]=$f[\"comments\"];\n Field::create($modelName.\".\".$f[\"name\"],$f[\"type\"],$f[\"options\"]);\n //Human::log($this->modelName.\" Create field \".$f[\"name\"]);\n \n\t }\n \n\t //whooho!\n $this->db()->init(); \n }", "function create()\n\t{\n\t\t$names = $this->_fields;\n\t\t$object = new StdClass;\n\t\tforeach ($names as $name)\n\t\t\t$object->$name = \"\";\n\t\treturn $object;\n\t}", "function createFields() {\n\tDB::exec(\"DROP TABLE IF EXISTS fields\");\n\t// create fields table\n\tDB::exec(\"CREATE TABLE fields (\n\t\tid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\tname VARCHAR(50) NOT NULL UNIQUE,\n\t\tcontent TEXT\n\t)\");\n\n\toutput(RESULT_INFO, \"Fields setup successfully completed\");\n\treturn 1;\n}", "public function create()\n {\n $fieldset = factory(Fieldset::class)->create();\n\n if (! $this->sections) {\n $this->sections = SectionFactory::times(3)->create();\n }\n\n $fieldset->sections()->saveMany($this->sections);\n\n return $fieldset;\n }", "protected function createField($name,$arguments)\n {\n $label = array_get($arguments,0);\n $fieldType = array_get($arguments,1);\n $fieldArgs = null;\n $inputType = array_get($arguments,2);\n $inputOpts = array_get($arguments,3);\n\n if (is_array($fieldType)) {\n list ($fieldType,$fieldArgs) = $fieldType;\n }\n\n $field = FieldBlueprint::create($name,$fieldType,$fieldArgs,$this)\n ->withInput($label,$inputType,$this->fields->count(),$inputOpts);\n\n if ($fieldType === FieldBlueprint::TITLE) {\n $this->title = $field;\n }\n return $this->fields[$name] = $field;\n }", "public function add_fields($fields)\n {\n // `fields` is an array of field objects from fields.php\n if (empty($fields))\n {\n return;\n }\n\n foreach ($fields as $field)\n {\n $cls = is_object($field) ? get_class($field) : NULL;\n\n if (array_key_exists($cls, $this->CLASS_CONTAINER))\n {\n $container = $this->CLASS_CONTAINER[$cls];\n $this->{$container}[] = $field;\n } elseif(array_key_exists($cls, $this->singular_fields)) {\n $this->{$this->singular_fields[$cls]} = $field;\n } else {\n $type = empty($cls) ? gettype($field) : $cls;\n throw new InvalidArgumentException('Object of type ' . $type . ' is an invalid field');\n }\n }\n }", "protected function _Get_Container_Instance($_el) {\r\n\t\t$form_instance = $this->form_instance;\r\n // Retrieve the container name\r\n\t\t$type = $_el['type'];\r\n // Retrieve the global vcff forms class\r\n $vcff_containers = vcff_get_library('vcff_containers');\r\n // If the context does not exist\r\n if (!isset($vcff_containers->contexts[$type])) { return; }\r\n // Retrieve the context\r\n $_context = $vcff_containers->contexts[$type]; \r\n // Retrieve the container name\r\n\t\t$machine_code = $_el['name'];\r\n // If no form instance was found\r\n\t\tif (!$machine_code) { return; }\r\n\t\t// Create the field item classname\r\n\t\t$container_classname = $_context['class'];\r\n\t\t// If no form instance was found\r\n\t\tif (!$container_classname) { return; } \r\n\t\t// Create a new item instance for this field\r\n\t\t$container_instance = new $container_classname();\r\n\t\t// Populate the container form\r\n\t\t$container_instance->form_instance = $this->form_instance;\r\n\t\t$container_instance->machine_code = $machine_code;\r\n\t\t$container_instance->container_type = $_context['type'];\r\n\t\t$container_instance->context = $_context;\r\n\t\t$container_instance->attributes = $_el['attributes'];\r\n // Populate the handler object\r\n\t\t$container_instance->el = $_el['el'];\r\n\t\t$container_instance->el_children = $_el['children'];\r\n // Add any child fields\r\n $this->_Add_Child_Fields($container_instance);\r\n $this->_Add_Child_Supports($container_instance);\r\n // If the field has a sanitize method\r\n if (method_exists($container_instance,'On_Create')) { $container_instance->On_Create(); }\r\n // Do any create actions\r\n $container_instance->Do_Action('create');\r\n // Do a wordpress hook\r\n do_action('vcff_container_create',$container_instance);\r\n\t\t// Return the generated field instance\r\n\t\treturn $container_instance;\r\n\t}", "public function create($fields)\r\n {\r\n return $this->__create($fields);\r\n }", "public function set_fields() {\n\n $this->add_field( (new acf_fields\\repeater(\"Documents - {$this->label}\", 'call_off_schedule', '202205171525a', [\n 'button_label' => 'Add Document'\n ]))\n ->add_sub_field( new acf_fields\\text( 'Document Name', 'document_name', '202205171525b', [\n 'required' => 1,\n ] ) )\n \n ->add_sub_field( new acf_fields\\file( 'Document', 'document', '202205171525c', [\n 'wrapper' => array (\n 'width' => '33',\n 'class' => '',\n 'id' => ''),\n 'required' => 1,\n ] ) )\n \n ->add_sub_field( new acf_fields\\radio( 'Document type', 'document_type', '202205171525d', [\n 'wrapper' => array (\n 'width' => '33',\n 'class' => '',\n 'id' => ''),\n 'choices' => array(\n 'essential'\t=> 'Essential document',\n 'optional'\t=> 'Optional document',\n ),\n 'required' => 1,\n ] ) )\n \n ->add_sub_field( new acf_fields\\radio( 'Document Usage', 'document_usage', '202205171525e', [\n 'wrapper' => array (\n 'width' => '33',\n 'class' => '',\n 'id' => ''),\n 'choices' => array(\n 'read_only'\t=> 'Read only',\n 'enter_detail'\t=> 'You will need to enter details in this document',\n 'enter_detail_optional'\t=> 'If you use this schedule, you will need to enter details in this document',\n ),\n 'required' => 1,\n ] ) )\n \n ->add_sub_field( new acf_fields\\wysiwyg( 'Document Description', 'document_description', '202205171525f',[\n 'required' => 1,\n ] ) )\n );\n\n }", "private function loadFields() {\n\t\tif (count($this->fields) > 0) return;\n\t\t$db = getDB();\n\t\t$stat = $db->prepare(\"SELECT * FROM collection_has_field WHERE collection_id=:cid ORDER BY sort_order DESC\");\n\t\t$stat->execute(array('cid'=>$this->collection_id));\n\t\twhile($d = $stat->fetch()) {\n\t\t\tif ($d['type'] == \"STRING\") {\n\t\t\t\t$this->fields[] = new ItemFieldString( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"TEXT\") {\n\t\t\t\t$this->fields[] = new ItemFieldText( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"HTML\") {\n\t\t\t\t$this->fields[] = new ItemFieldHTML( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"EMAIL\") {\n\t\t\t\t$this->fields[] = new ItemFieldEmail( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"PHONE\") {\n\t\t\t\t$this->fields[] = new ItemFieldPhone( $d, $this->collection_id, $this);\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"We don't know about type: \".$d['type']);\n\t\t\t}\n\t\t}\n\t}", "private function setFields($fields = [])\n {\n foreach ($fields as $key => $input) {\n $name = array_key_exists('name', $input) ? $input['name'] : $key;\n $type = array_key_exists('type', $input) ? $input['type'] : Mystique::TEXT;\n $type_fallback = array_key_exists('type_fallback', $input) ? $input['type_fallback'] : false;\n\n $field = $input;\n if(array_key_exists('type', $field)) {\n unset($field['type']);\n }\n\n if(strpos($type, 'Inputfield') === false) {\n $type = 'Inputfield' . ucfirst($type);\n }\n if($type_fallback && strpos($type_fallback, 'Inputfield') === false) {\n $type_fallback = 'Inputfield' . ucfirst($type_fallback);\n }\n\n if($this->modules->isInstalled($type)) {\n $field['type'] = $type;\n } else if($this->modules->isInstalled($type_fallback)) {\n $field['type'] = $type_fallback;\n }\n\n if(array_key_exists('type', $field)) {\n\n if(array_key_exists('useLanguages', $field) && $field['useLanguages']) {\n $this->languageFields[] = $name;\n }\n\n if(!$type != Mystique::FIELDSET && !$type != Mystique::MARKUP) {\n $value = array_key_exists('value', $field) ? $field['value'] : '';\n if(!$value && array_key_exists('defaultValue', $field)) {\n $value = $field['defaultValue'];\n }\n $this->inputFields[$name] = $value;\n }\n\n if ($type == Mystique::CHECKBOX || $type == Mystique::TOGGLE_CHECKBOX) {\n $this->checkboxFields[] = $name;\n }\n\n if(array_key_exists('children', $field)) {\n $this->setFields($field['children']);\n }\n }\n }\n }", "public function buildFormFields()\n {\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"titre\")\n ->setLabel(\"Titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"soustitre\")\n ->setLabel(\"Sous-titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"slug\")\n ->setLabel(\"Slug\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"url\")\n ->setLabel(\"URL du projet\")\n );\n\n $this->addFormField(\n SharpMarkdownFormFieldConfig::create(\"texte\")\n ->setLabel(\"Texte\")\n ->showToolbar(true)\n );\n\n $this->addFormField(\n SharpCheckFormFieldConfig::create(\"is_open_source\")\n ->setText(\"Projet Open-source\")\n );\n\n $this->addFormField(\n SharpPivotFormFieldConfig::create(\"technos\", SharpTechnoRepository::class)\n ->setLabel(\"Technologies\")\n ->setAddable(true)\n ->setSortable(true)\n ->setOrderAttribute(\"ordre\")\n ->setCreateAttribute(\"nom\")\n );\n\n $this->addFormField(\n SharpListFormFieldConfig::create(\"screenshots\")\n ->setLabel(\"Screenshots\")\n ->setSortable(true)->setOrderAttribute(\"ordre\")\n ->setAddable(true)->setAddButtonText(\"Ajouter un screenshot\")\n ->setRemovable(true)->setRemoveButtonText(\"Supprimer\")\n ->addItemFormField(\n SharpFileFormFieldConfig::create(\"fichier\")\n ->setFileFilterImages()\n ->setMaxFileSize(5)\n ->setThumbnail(\"100x100\")\n ->addGeneratedThumbnail(\"600x\"))\n ->addItemFormField(\n SharpTextFormFieldConfig::create(\"tag\")\n ->addAttribute(\"placeholder\", \"Tag\"))\n ->addItemFormField(\n SharpTextareaFormFieldConfig::create(\"legende\")\n ->setRows(3))\n ->setItemFormTemplate(\n SharpListItemFormTemplateConfig::create()\n ->addField(\"fichier\")\n ->addField(\"tag\")\n ->addField(\"legende\")\n )\n );\n\n $this->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(7)\n ->addField(\"titre\")\n ->addField(\"soustitre\")\n ->addField([\"slug:5\", \"url:7\"])\n ->addField(\"technos\")\n ->addField(\"is_open_source\")\n\n )->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(5)\n ->addField(\"texte\")\n ->addField(\"screenshots\")\n );\n }", "protected function _Add_Child_Fields($container_instance) {\r\n\t\t$form_instance = $this->form_instance;\r\n // Retrieve the container's children\r\n $el_children = $container_instance->el_children; \r\n // If no shortcodes were returned\r\n if (!$el_children || !is_array($el_children)) { return; } \r\n // Loop through each shortcode\r\n foreach ($el_children as $k => $el) {\r\n // If this is not a tag\r\n if (!$el->is_tag || !$el->tag) { continue; }\r\n // Retrieve the attributes\r\n $_attributes = $el->attributes;\r\n // If no machine code, move on\r\n if (!isset($_attributes['machine_code'])) { continue; }\r\n // Retrieve the field instance\r\n $field_instance = $form_instance->Get_Field($_attributes['machine_code']);\r\n // If no field instance was returned\r\n if (!$field_instance) { continue; } \r\n // Add the field instance to the container\r\n $container_instance->Add_Field($field_instance);\r\n // Do any create actions\r\n $container_instance->Do_Action('add_field',array('field_instance' => $field_instance));\r\n // Do a wordpress hook\r\n do_action('vcff_container_add_field',$container_instance,$field_instance);\r\n }\r\n }", "public function buildFields($fields = [], $wrapper = null)\n {\n /* @var InputfieldWrapper|InputfieldFieldset $wrapper */\n $wrapper = $wrapper ?: $this->modules->get('InputfieldWrapper');\n\n if(count($fields)) {\n foreach ($fields as $key => $input) {\n $name = array_key_exists('name', $input) ? $input['name'] : $key;\n $type = array_key_exists('type', $input) ? $input['type'] : Mystique::TEXT;\n $type_fallback = array_key_exists('type_fallback', $input) ? $input['type_fallback'] : false;\n\n $field = $input;\n if(array_key_exists('type', $field)) {\n unset($field['type']);\n }\n\n if(strpos($type, 'Inputfield') === false) {\n $type = 'Inputfield' . ucfirst($type);\n }\n if($type_fallback && strpos($type_fallback, 'Inputfield') === false) {\n $type_fallback = 'Inputfield' . ucfirst($type_fallback);\n }\n\n if($this->modules->isInstalled($type)) {\n $field['type'] = $type;\n } else if($this->modules->isInstalled($type_fallback)) {\n $field['type'] = $type_fallback;\n }\n\n if(array_key_exists('type', $field)) {\n $field['name'] = $name;\n\n if($field['type'] == Mystique::FIELDSET) {\n if(array_key_exists('children', $field) && count($field['children'])) {\n $children = $field['children'];\n unset($field['children']);\n $fieldset = $this->buildInputField($field);\n $wrapper->add($this->buildFields($children, $fieldset));\n }\n } else {\n $wrapper->add($this->buildInputField($field));\n }\n }\n }\n }\n\n return $wrapper;\n }", "public function buildFields()\n {\n $this->addField('name', 'media.adminlist.configurator.name', true);\n $this->addField('contentType', 'media.adminlist.configurator.type', true);\n $this->addField('updatedAt', 'media.adminlist.configurator.date', true);\n $this->addField('filesize', 'media.adminlist.configurator.filesize', true);\n }", "protected function addFields()\n {\n $groupCustomOptionsName = CustomOptions::GROUP_CUSTOM_OPTIONS_NAME;\n $optionContainerName = CustomOptions::CONTAINER_OPTION;\n $commonOptionContainerName = CustomOptions::CONTAINER_COMMON_NAME;\n\n // Add fields to the option\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'] = array_replace_recursive(\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'],\n $this->getOptionFieldsConfig()\n );\n\n // Add fields to the values\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'] = array_replace_recursive(\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'],\n // $this->getValueFieldsConfig()\n // );\n }", "private static function do_html_form_create($fields, $table){\n global $dbname;\n global $app_dir;\n $filename = Inflect::singularize($table);\n $form_str = '@extends(\\'layouts.bulma\\')'.\"\\n\";\n $form_str .= '@section(\\'title\\', \\'creating new '.Inflect::singularize($table).'\\')'.\"\\n\";\n $form_str .= '@section(\\'sidebar\\')'.\"\\n\";\n $form_str .= '@parent'.\"\\n\";\n $form_str .= '@endsection'.\"\\n\";\n $form_str .= '@section(\\'content\\')'.\"\\n\";\n $form_str .= '<form action=\"{{ route(\\''.$table.'.create\\') }}\" class=\"form container\" method=\"POST\" enctype=\"multipart/form-data\">';\n $form_str .= \"\\n\".' <h1 class=\"title is-3\">ADD '.strtoupper(str_replace(\"_\",\" \",Inflect::singularize($table))).'</h1>'.\"\\n\";\n foreach($fields as $field){\n $req = false;\n if(strpos($field[\"Type\"], \"int\")>-1 && $field[\"Key\"]!==\"MUL\"){\n if($field[\"Null\"]===\"NO\") $req = true;\n $form_str .= \" \".self::getInputField($field[\"Field\"], \"number\", $table, $req);\n }else if($field[\"Key\"] === \"MUL\"){\n $form_str .= \" \".self::getSelectField($field[\"Field\"], $table);\n }else if(strpos($field[\"Type\"], \"varchar\")>-1){\n if($field[\"Null\"]===\"NO\") $req = true;\n $form_str .= \" \".self::getInputField($field[\"Field\"], \"text\", $table, $req);\n }else if(strpos($field[\"Type\"], \"text\")>-1){\n $form_str .= \" \".self::getTextarea($field[\"Field\"], $table);\n }\n }\n $form_str .= self::getButtonGrp();\n $form_str .= \"</form>\\n@endsection\";\n $file_dir = $app_dir.\"/resources/views/$table\";\n $views_file = $app_dir.\"/resources/views/$table/create.blade.php\";\n if(is_readable($views_file)){\n file_put_contents($views_file, $form_str);\n }else{\n exec(\"mkdir $file_dir\");\n exec(\"chmod -R 755 $app_dir./resources/views/\");\n $fp = fopen($views_file,\"w+\");\n fwrite($fp, \"file created\", 128);\n fclose($fp);\n file_put_contents($views_file, $form_str);\n }\n }", "function create_custom_fields() {\n // Get all components to be listed\n $this->get_components();\n // Add components meta box\n if ( function_exists( 'add_meta_box' ) ) {\n foreach ( $this->postTypes as $postType ) {\n add_meta_box( 'wpnext', 'WPNext Builder', array( &$this, 'display_custom_fields' ), $postType, 'normal', 'high' );\n }\n }\n }", "public static function create() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$field_type = FrmAppHelper::get_post_param( 'field_type', '', 'sanitize_text_field' );\n\t\t$form_id = FrmAppHelper::get_post_param( 'form_id', 0, 'absint' );\n\n\t\t$field = self::include_new_field( $field_type, $form_id );\n\n // this hook will allow for multiple fields to be added at once\n do_action('frm_after_field_created', $field, $form_id);\n\n wp_die();\n }", "abstract function fields();", "public function addField();", "function create_field($field)\n{\n}", "protected function addField() {\n foreach(func_get_args() as $argument) {\n if ( (!is_null($argument)) && (is_array($argument)) ) {\n $this->form_fields[$argument['name']] = new UIFormField($argument);\n }\n }\n return $this;\n }", "abstract public function fields();", "function createField($pFieldDetails) {\r\n\t\tswitch ($pFieldDetails['html_control_type']) {\r\n\t\t\tdefault :\r\n\t\t\tcase (int) FIELD_HTML_INPUT_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_VIDEO_YOUTUBE_LINK_TYPE :\r\n\t\t\t\treturn new cfield_input($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_THESIS_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_ANTITHESIS_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_THESIS_NEXT_COUPLET_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_THESIS_TAXON_NAME_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_TABLE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_MATERIAL_FIELD :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_REFERENCE_FIELD :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_SECTION_TITLE_FIELD :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_PLATE_DESCRIPTION_FIELD :\r\n\t\t\t\treturn new cfield_textarea($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_EDITOR_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_EDITOR_TYPE_ONLY_REFERENCE_CITATIONS :\r\n\t\t\t\treturn new cfield_editor($pFieldDetails);\r\n\t\t\t\r\n\t\t\tcase (int) FIELD_HTML_EDITOR_TYPE_NO_CITATIONS :\r\n\t\t\t\treturn new cfield_editor_no_citations($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_SIMPLE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_ROUNDED_SIMPLE_TEXTAREA :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_PLATE_DESCRIPTION_TYPE :\r\n\t\t\t\treturn new cfield_textarea_simple($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_SELECT_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_MULTIPLE_SELECT_TYPE :\r\n\t\t\t\treturn new cfield_select($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_RADIO_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_CHECKBOX_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_RADIO_PLATE_APPEARANCE_TYPE :\r\n\t\t\t\treturn new cfield_radio($pFieldDetails);\r\n\t\t\t\r\n\t\t\tcase (int) FIELD_HTML_AUTOCOMPLETE_TYPE :\r\n\t\t\t\treturn new cfield_autocomplete($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_FACEBOOK_AUTOCOMPLETE_TYPE :\r\n\t\t\t\treturn new cfield_facebookautocomplete($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_TAXON_CLASSIFICATION_AUTOCOMPLETE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TAXON_CLASSIFICATION_AUTOCOMPLETE_SINGLE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_SUBJECT_CLASSIFICATION_AUTOCOMPLETE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_SUBJECT_CLASSIFICATION_AUTOCOMPLETE_SINGLE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_CHRONOLOGICAL_CLASSIFICATION_AUTOCOMPLETE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_CHRONOLOGICAL_CLASSIFICATION_AUTOCOMPLETE_SINGLE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_GEOGRAPHICAL_CLASSIFICATION_AUTOCOMPLETE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_GEOGRAPHICAL_CLASSIFICATION_AUTOCOMPLETE_SINGLE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TAXON_TREATMENT_CLASSIFICATION :\r\n\t\t\t\treturn new cfield_taxon_classification_autocomplete($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_MATERIAL_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_CHECKLIST_TAXON_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_TAXONOMIC_COVERAGE_TAXA_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_FIGURE_IMAGE :\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_FIGURE_PLATE_IMAGE :\r\n\t\t\t\treturn new cfield_file_upload($pFieldDetails);\r\n\t\t}\r\n\t}", "public function xadmin_createfield() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$field_title = $args [1];\n\t\t$field_type = $args [2];\n\t\t\n\t\t/* Load Model */\n\t\t$field = $this->getModel ( 'field' );\n\t\t$this->session->returnto ( 'fields' );\n\t\t\n\t\t/* create the form */\n\t\t$field->createNewField ( $field_title, $field_type );\n\t\t\n\t\t$this->loadPluginModel ( 'fields' );\n\t\t$plug = Plugins_Fields::getInstance ();\n\t\t\n\t\t/* allow changes to be made by plugin */\n\t\t$plug->trigger ( 'onAfterCreateField', $field );\n\t\t\n\t\t/* allow changes to be made by plugin - extend schema of data table */\n\t\t$plug->trigger ( 'onAfterCreateField_ExtendDataTable', $field );\n\t\t\n\t\t$plug->trigger ( 'onAfterSaveNewField', $field );\n\t\t\n\t\t$this->setArguments ( array ($field->id ) );\n\t\t\n\t\t$this->_registry->setValue ( 'usedTabs', 1 );\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( '_editField' );\n\t}", "protected function buildCoreFields(): void\n {\n //====================================================================//\n // Reference\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"increment_id\")\n ->name('Reference')\n ->microData(\"http://schema.org/Invoice\", \"confirmationNumber\")\n ->isReadOnly()\n ->isListed()\n ;\n //====================================================================//\n // Customer Object\n $this->fieldsFactory()->create((string) self::objects()->encode(\"ThirdParty\", SPL_T_ID))\n ->identifier(\"customer_id\")\n ->name('Customer')\n ->microData(\"http://schema.org/Organization\", \"ID\")\n ->isRequired()\n ->isReadOnly()\n ;\n //====================================================================//\n // Customer Email\n $this->fieldsFactory()->create(SPL_T_EMAIL)\n ->identifier(\"customer_email\")\n ->name(\"Email du contact\")\n ->microData(\"http://schema.org/ContactPoint\", \"email\")\n ->isReadOnly()\n ;\n //====================================================================//\n // Order Date\n $this->fieldsFactory()->create(SPL_T_DATETIME)\n ->identifier(\"created_at\")\n ->name(\"Date\")\n ->microData(\"http://schema.org/DataFeedItem\", \"dateCreated\")\n ->isReadOnly()\n ->isListed()\n ;\n }", "public function create()\n {\n $groups = Fields::where('active', 1)->where('group_id', 0)->orderBy('id','DESC')->pluck('display_name', 'id')->toArray();\n $groups[0] = 'select';\n $groups = array_reverse($groups, true);\n\n $events = Events::where('status', 1)->orderBy('eventid','DESC')->pluck('name', 'eventid')->toArray();\n $events[''] = 'select';\n $events = array_reverse($events, true);\n\n $roles = Role::orderBy('id','DESC')->pluck('display_name', 'id')->toArray();\n $roles[''] = 'select';\n $roles = array_reverse($roles, true);\n\n return view('events::fields.create', compact('groups','events','roles'));\n }", "private function _fieldModelCreateData()\n {\n return [\n 'designFieldModel' => [\n 'shortCardContainerDesignBlockModel' => [\n 'marginTop' => 10\n ],\n 'shortCardLabelDesignBlockModel' => [\n 'marginTop' => 20\n ],\n 'shortCardLabelDesignTextModel' => [\n 'size' => 30\n ],\n 'shortCardValueDesignBlockModel' => [\n 'marginTop' => 40\n ],\n ],\n ];\n }", "function __construct($fields=array())\n {\n // fields.php.\n $this->add_fields($fields);\n }", "public function core_acf_fields( $fields ) {\n\n\t\t\t$content = $this->new_fields_builder();\n\t\t\t$content\n\t\t\t\t->addFile( 'manual', array(\n\t\t\t\t\t'label' => __( 'Field Manual', 'wps' ),\n\t\t\t\t\t'multiple' => true,\n\t\t\t\t) )\n\t\t\t\t->addRelationship( 'manuals_vans', array(\n\t\t\t\t\t'label' => __( 'Connected Manuals & Vans', 'wps' ),\n\t\t\t\t\t'acf_relationship_create' => 1,\n\t\t\t\t\t'post_type' => array( 'van', )\n\t\t\t\t) )\n\t\t\t\t->setLocation( 'post_type', '==', $this->post_type );\n\n\t\t\t$fields->builder[] = $content;\n\t\t}", "public static function make($items = [])\n {\n $fieldCollection = new static($items);\n\n $fieldCollection->validateFields();\n\n return $fieldCollection;\n }", "public function init_fields() {\n $fields = [];\n\n $fields['type'] = [\n 'type' => Controls_Manager::TEXT,\n 'label' => __('Text', 'chaman_addons')\n ];\n\n return $fields;\n }", "abstract protected function fields();", "abstract protected function fields();", "public function set_fields() {\n\n\t\t$this->fields = Pngx__Meta__Fields::get_fields();\n\t}", "public function addFields($field_names){\n\t\tforeach($field_names as $field_name){\n\t\t\t$this->Fields[$field_name] = new Field($field_name);\n\t\t}\n\t}", "protected function initCreatingFields() : void\n\t{\n\n\t\t$this->creating_fields = ['text', 'user_id', 'parent_id'];\n\n\t}", "public static function getFields() {\n return array(\n new TextField( array(\n 'name' => 'name',\n 'public' => array(\n 'title' => 'Title',\n 'description' => 'The name of the link that the\n element will describe',\n ),\n ) ),\n new TextField( array(\n 'name' => 'blurb',\n 'public' => array(\n 'title' => 'Blurb',\n 'description' => 'Short blurb that can be displayed about\n the nature of the link',\n ),\n ) ),\n new TextField( array(\n 'name' => 'image',\n 'public' => array(\n 'title' => 'Image',\n 'description' => 'The image to be dispalyed on the front.',\n ),\n ) ),\n new TextField( array(\n 'name' => 'link',\n 'public' => array(\n 'title' => 'Link',\n 'description' => 'The actual link clicking the element will\n result in.',\n ),\n ) ),\n );\n }", "public function getCMSFields()\n {\n // Create Field Tab Set:\n \n $fields = FieldList::create(TabSet::create('Root'));\n \n // Create Main Tab:\n \n $fields->findOrMakeTab('Root.Main', $this->fieldLabel('Main'));\n \n // Create Class Field:\n \n if (!$this->isInDB()) {\n \n // Define Placeholder:\n \n $placeholder = _t(__CLASS__ . '.SELECTTYPETOCREATE', '(Select type to create)');\n \n // Create Dropdown Field:\n \n $classField = DropdownField::create(\n 'ClassName',\n $this->fieldLabel('ClassName'),\n $this->getClassNameOptions()\n )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder);\n \n } else {\n \n // Create Read-Only Field:\n \n $classField = ReadonlyField::create(\n 'Type',\n $this->fieldLabel('Type')\n );\n \n }\n \n // Add Class Field to Main Tab:\n \n $fields->addFieldToTab('Root.Main', $classField);\n \n // Apply Extensions:\n \n if ($this->isInDB()) {\n \n // Extend Field Objects:\n \n $this->extend('updateCMSFields', $fields);\n \n }\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function formFields($fields) {\r\n $this->fields = $fields;\r\n return $this;\r\n }", "public function actionCreate(){\n $parents=CylTables::model()->findAll(\n array(\n 'condition'=>'isParent=\"1\" AND display_status = \"1\"',\n 'order'=>'menu_order'\n ));\n $model = new CylFields();\n $this->render('new-field', array('model' => $model,'parents' => $parents));\n }", "public function init_fields() {\r\n\r\n\t\tif ( $this->fields ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$scale = get_option( 'scale', 'sq ft' );\r\n\t\t$currency = get_option('listeo_currency');\r\n\t\t\r\n\t\t$this->fields = array(\r\n\t\t\t'basic_info' => array(\r\n\t\t\t\t'title' \t=> __('Basic Information','listeo_core'),\r\n\t\t\t\t'class' \t=> '',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-doc',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'listing_title' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Listing Title', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'name' => 'listing_title',\r\n\t\t\t\t\t\t\t'tooltip'\t => __( 'Type title that will also contains an unique feature of your listing (e.g. renovated, air contidioned)', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'required' => true,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'listing_category' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Category', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'term-select',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => 'listing_category',\r\n\t\t\t\t\t\t\t'taxonomy'\t => 'listing_category',\r\n\t\t\t\t\t\t\t'tooltip'\t => __( 'This is main listings category', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'default'\t => '',\r\n\t\t\t\t\t\t\t'render_row_col' => '4',\r\n\t\t\t\t\t\t\t'multi' \t => true,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// 'event_category' => array(\r\n\t\t\t\t\t\t// \t'label' => __( 'Event Category', 'listeo_core' ),\r\n\t\t\t\t\t\t// \t'type' => 'term-select',\r\n\t\t\t\t\t\t// \t'placeholder' => '',\r\n\t\t\t\t\t\t// \t'name' => 'event_category',\r\n\t\t\t\t\t\t// \t'taxonomy'\t => 'event_category',\r\n\t\t\t\t\t\t// \t'tooltip'\t => __( 'Those are categories related to your listing type', 'listeo_core' ),\r\n\t\t\t\t\t\t// \t'priority' => 10,\r\n\t\t\t\t\t\t// \t'before_row' => '',\r\n\t\t\t\t\t\t// \t'after_row' => '',\r\n\t\t\t\t\t\t// \t'default'\t => '',\r\n\t\t\t\t\t\t// \t'render_row_col' => '4',\r\n\t\t\t\t\t\t// \t'required' => false,\r\n\t\t\t\t\t\t// ),\r\n\t\t\t\t\t\t'service_category' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Service Category', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'term-select',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => 'service_category',\r\n\t\t\t\t\t\t\t'taxonomy'\t => 'service_category',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'before_row' => '',\r\n\t\t\t\t\t\t\t'after_row' => '',\r\n\t\t\t\t\t\t\t'default'\t => '',\r\n\t\t\t\t\t\t\t'render_row_col' => '4',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// 'rental_category' => array(\r\n\t\t\t\t\t\t// \t'label' => __( 'Rental Category', 'listeo_core' ),\r\n\t\t\t\t\t\t// \t'type' => 'term-select',\r\n\t\t\t\t\t\t// \t'placeholder' => '',\r\n\t\t\t\t\t\t// \t'name' => 'rental_category',\r\n\t\t\t\t\t\t// \t'taxonomy'\t => 'rental_category',\r\n\t\t\t\t\t\t// \t'priority' => 10,\r\n\t\t\t\t\t\t// \t'before_row' => '',\r\n\t\t\t\t\t\t// \t'after_row' => '',\r\n\t\t\t\t\t\t// \t'default'\t => '',\r\n\t\t\t\t\t\t// \t'render_row_col' => '4',\r\n\t\t\t\t\t\t// \t'required' => false,\r\n\t\t\t\t\t\t// ),\r\n\t\t\t\t\t\t'keywords' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Keywords', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'tooltip'\t => __( 'Maximum of 15 keywords related with your business, separated by coma' , 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => 'keywords',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'default'\t => '',\r\n\t\t\t\t\t\t\t'render_row_col' => '4',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'listing_feature' => array(\r\n\t\t\t\t\t\t\t'label' \t=> __( 'Other Features', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' \t=> 'term-checkboxes',\r\n\t\t\t\t\t\t\t'taxonomy'\t\t=> 'listing_feature',\r\n\t\t\t\t\t\t\t'name'\t\t\t=> 'listing_feature',\r\n\t\t\t\t\t\t\t'class'\t\t \t => 'chosen-select-no-single',\r\n\t\t\t\t\t\t\t'default' \t => '',\r\n\t\t\t\t\t\t\t'priority' \t => 2,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t/*'cancellation_policy' => array(\r\n\t\t\t\t'title' \t=> __('Cancellation policy','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-docs',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'cancellation_policy_description' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Description', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => 'cancellation_policy_description',\r\n\t\t\t\t\t\t\t'type' => 'wp-editor',\r\n\t\t\t\t\t\t\t'description' => __( 'Add Cancellation Policy Description .', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t),*/\r\n\t\t\t\t\t\t\r\n\t\t\t'location' => array(\r\n\t\t\t\t'title' \t=> __('Location','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-location',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\r\n\t\t\t\t\t'_address' => array(\r\n\t\t\t\t\t\t'label' => __( 'Address', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_address',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 7,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_friendly_address' => array(\r\n\t\t\t\t\t\t'label' => __( 'Friendly Address', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_friendly_address',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'tooltip'\t => __('Human readable address, if not set, the Google address will be used', 'listeo_core'),\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 8,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t'region' => array(\r\n\t\t\t\t\t\t'label' => __( 'Region', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'term-select',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => 'region',\r\n\t\t\t\t\t\t'taxonomy' => 'region',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 8,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_geolocation_long' => array(\r\n\t\t\t\t\t\t'label' => __( 'Longitude', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_geolocation_long',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_geolocation_lat' => array(\r\n\t\t\t\t\t\t'label' => __( 'Latitude', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_geolocation_lat',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'gallery' => array(\r\n\t\t\t\t'title' \t=> __('Gallery','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-picture',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_gallery' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Gallery', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_gallery',\r\n\t\t\t\t\t\t\t'type' => 'files',\r\n\t\t\t\t\t\t\t'description' => __( 'By selecting (clicking on a photo) one of the uploaded photos you will set it as Featured Image for this listing (marked by icon with star). Drag and drop thumbnails to re-order images in gallery.', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => 'Upload images',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'details' => array(\r\n\t\t\t\t'title' \t=> __('Details','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-docs',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'listing_description' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Description', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => 'listing_description',\r\n\t\t\t\t\t\t\t'type' => 'wp-editor',\r\n\t\t\t\t\t\t\t'description' => __( 'By selecting (clicking on a photo) one of the uploaded photos you will set it as Featured Image for this listing (marked by icon with star). Drag and drop thumbnails to re-order images in gallery.', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => 'Upload images',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => true,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t'_video' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Video', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'name' => '_video',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => __( 'URL to oEmbed supported service', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 5,\r\n\t\t\t\t\t\t),\r\n\r\n\t\t\t\t\t\t'_phone' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Phone', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_phone',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\t\t\r\n\t\t\t\t\t\t'_website' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Website', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_website',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_email' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'E-mail', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_email',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_email_contact_widget' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Enable Contact Widget', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t'tooltip'\t => __('With 12 this option enabled listing will display Contact Form Widget that will send emails to this address', 'listeo_core'),\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_email_contact_widget',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\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'_facebook' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-facebook-square\"></i> Facebook', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_facebook',\r\n\t\t\t\t\t\t\t'class'\t\t => 'fb-input',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t'_twitter' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-twitter-square\"></i> Twitter', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_twitter',\r\n\t\t\t\t\t\t\t'class'\t\t => 'twitter-input',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_youtube' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-youtube-square\"></i> YouTube', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_youtube',\r\n\t\t\t\t\t\t\t'class'\t\t => 'youtube-input',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t'_instagram' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-instagram\"></i> Instagram', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_instagram',\r\n\t\t\t\t\t\t\t'class'\t\t => 'instagram-input',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_whatsapp' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-whatsapp\"></i> WhatsApp', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_whatsapp',\r\n\t\t\t\t\t\t\t'class'\t\t => 'whatsapp-input',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_skype' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-skype\"></i> Skype', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_skype',\r\n\t\t\t\t\t\t\t'class'\t\t => 'skype-input',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_price_min' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Minimum Price Range', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_price_min',\r\n\t\t\t\t\t\t\t'tooltip'\t => __('Set only minimum price to show \"Prices starts from \" instead of range', 'listeo_core'),\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '6',\r\n\t\t\t\t\t\t\t'atts' => array(\r\n\t\t\t\t\t\t\t\t'step' => 0.1,\r\n\t\t\t\t\t\t\t\t'min' => 0,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_price_max' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Maximum Price Range', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'tooltip'\t => __('Set the maximum price for your service, used on filters in search form', 'listeo_core'),\r\n\t\t\t\t\t\t\t'name' => '_price_max',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '6',\r\n\t\t\t\t\t\t\t'atts' => array(\r\n\t\t\t\t\t\t\t\t'step' => 0.1,\r\n\t\t\t\t\t\t\t\t'min' => 0,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t),\r\n\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\t'opening_hours' => array(\r\n\t\t\t\t'title' \t=> __('Opening Hours','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-clock',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_opening_hours_status' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Opening Hours status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\t'name' => '_opening_hours_status',\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_opening_hours' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Opening Hours', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_opening_hours',\r\n\t\t\t\t\t\t\t'type' => 'hours',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t'_monday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_monday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t'_tuesday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Tuesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_tuesday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\r\n\t\t\t\t\t\t'_wednesday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_wednesday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\r\n\t\t\t\t\t\t'_thursday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_opening_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_thursday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_friday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_friday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_saturday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_saturday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_sunday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_sunday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'event' => array(\r\n\t\t\t\t'title'\t\t=> __( 'Event Date', 'listeo_core' ),\r\n\t\t\t\t//'class'\t\t=> 'margin-top-40',\r\n\t\t\t\t'icon'\t\t=> 'fa fa-money',\r\n\t\t\t\t'fields'\t=> array(\r\n\t\t\t\t\t'_event_date' => array(\r\n\t\t\t\t\t\t'label' => __( 'Event Date', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('Select date when even will start', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'text',\t\t\t\t\t\t\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_event_date',\r\n\t\t\t\t\t\t'class'\t\t => 'input-datetime',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'_event_date_end' => array(\r\n\t\t\t\t\t\t'label' => __( 'Event Date End', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('Select date when even will end', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_event_date_end',\r\n\t\t\t\t\t\t'class'\t\t => 'input-datetime',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t\t'menu' => array(\r\n\t\t\t\t'title' \t=> __('Pricing & Bookable Services','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-book-open',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_menu_status' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Menu status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\t'name' => '_menu_status',\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_menu' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Pricing', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_menu',\r\n\t\t\t\t\t\t\t'type' => 'pricing',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'booking' => array(\r\n\t\t\t\t'title' \t=> __('Booking','listeo_core'),\r\n\t\t\t\t'class' \t=> 'margin-top-40 booking-enable',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t//'onoff_state' => 'on',\r\n\t\t\t\t'icon' \t\t=> 'fa fa-calendar-check-o',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t'_booking_status' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Booking status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_booking_status',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t),\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t\t'slots' => array(\r\n\t\t\t\t'title' \t=> __('Availability','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'fa fa-calendar-check-o',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_slots_status' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Booking status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\t'name' => '_slots_status',\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_slots' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Availability Slots', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_slots',\r\n\t\t\t\t\t\t\t'type' => 'slots',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t\r\n\r\n\t\t\t'basic_prices' => array(\r\n\t\t\t\t'title'\t\t=> __('Booking prices and settings','listeo_core'),\r\n\t\t\t\t//'class'\t\t=> 'margin-top-40',\r\n\t\t\t\t'icon'\t\t=> 'fa fa-money',\r\n\t\t\t\t'fields'\t=> array(\r\n\t\t\t\t\t\r\n\t\t\t\t\t'_event_tickets' => array(\r\n\t\t\t\t\t\t'label' => __( 'Available Tickets', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('How many ticekts you have to offer', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_event_tickets',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\r\n\t\t\t\t\t'_normal_price' => array(\r\n\t\t\t\t\t\t'label' => __( 'Regular Price', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'tooltip'\t => __('Default price for booking on Monday - Friday', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'default' => '0',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'unit'\t\t => $currency,\r\n\t\t\t\t\t\t'name' => '_normal_price',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t),\t\r\n\r\n\t\t\t\t\t'_weekday_price' => array(\r\n\t\t\t\t\t\t'label' => __( 'Weekend Price', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'tooltip'\t => __('Default price for booking on weekend', 'listeo_core'),\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_weekday_price',\r\n\t\t\t\t\t\t'unit'\t\t => $currency,\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t'_reservation_price' => array(\r\n\t\t\t\t\t\t'label' => __( 'Reservation Fee', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_reservation_price',\r\n\t\t\t\t\t\t'tooltip'\t => __('One time fee for booking', 'listeo_core'),\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'unit'\t\t => $currency,\r\n\t\t\t\t\t\t'default' => '0',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_expired_after' => array(\r\n\t\t\t\t\t\t'label' => __( 'Reservation expires after', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('How many hours you can wait for clients payment', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'default' => '48',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_expired_after',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'unit'\t\t => 'hours',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t'_instant_booking' => array(\r\n\t\t\t\t\t\t'label' => __( 'Enable Instant Booking', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t'tooltip'\t => __('With this option enabled booking request will be immediately approved ', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_instant_booking',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'_count_per_guest' => array(\r\n\t\t\t\t\t\t'label' => __( 'Enable Price per Guest', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t'tooltip'\t => __('With this option enabled regular price and weekend price will be multiplied by number of guests to estimate total cost', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_count_per_guest',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t'_min_days' => array(\r\n\t\t\t\t\t\t'label' => __( 'Minimum stay', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'tooltip'\t => __('Set minimum number of days for reservation', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_min_days',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3',\r\n\t\t\t\t\t\t'for_type'\t => 'rental'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'_max_guests' => array(\r\n\t\t\t\t\t\t'label' => __( 'Maximum number of guests', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'tooltip'\t => __('Set maximum number of guests per reservation', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_max_guests',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\r\n\t\t\t'availability_calendar' => array(\r\n\t\t\t\t'title' \t=> __('Availability Calendar','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t//'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'fa fa-calendar-check-o',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_availability' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Click day in calendar to mark it as unavailable', 'listeo_core' ),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'name' => '_availability_calendar',\r\n\t\t\t\t\t\t\t'type' => 'calendar',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\r\n\t\t);\r\n\r\n\t\t$this->fields = apply_filters('submit_listing_form_fields', $this->fields);\r\n\t\t// get listing type\r\n\t\tif ( ! $this->listing_type)\r\n\t\t{\r\n\t\t\t$listing_type_array = get_post_meta( $this->listing_id, '_listing_type' );\r\n\t\t\t$this->listing_type = $listing_type_array[0];\r\n\t\t}\r\n\t\t\r\n\t\t// disable opening hours everywhere outside services\r\n\t\tif ( $this->listing_type != 'service' && apply_filters('disable_opening_hours', true) ) \r\n\t\t\tunset( $this->fields['opening_hours'] );\r\n\r\n\t\t// disable slots everywhere outside services\r\n\t\tif ( $this->listing_type != 'service' && apply_filters('disable_slots', true) ) \r\n\t\t\tunset( $this->fields['slots'] );\r\n\r\n\t\t// disable availability calendar outside rent\r\n\t\tif ( $this->listing_type == 'event' && apply_filters('disable_availability_calendar', true) ) \r\n\t\t\tunset( $this->fields['availability_calendar'] );\r\n\r\n\t\t// disable event date calendar outside events\r\n\t\tif ( $this->listing_type != 'event' ) \r\n\t\t{\r\n\t\t\tunset( $this->fields['event']);\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_event_tickets'] );\r\n\t\t} else {\r\n\t\t\t// disable fields for events\r\n\t\t\t//unset( $this->fields['basic_prices']['fields']['_normal_price'] );\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_weekday_price'] );\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_count_per_guest'] );\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_max_guests'] );\r\n\r\n\t\t\t$this->fields['basic_prices']['fields']['_event_tickets']['render_row_col'] = 3;\r\n\t\t\t$this->fields['basic_prices']['fields']['_normal_price']['render_row_col'] = 3;\r\n\t\t\t$this->fields['basic_prices']['fields']['_normal_price']['label'] = esc_html__('Ticket Price','listeo_core');\r\n\t\t\t$this->fields['basic_prices']['fields']['_reservation_price']['render_row_col'] = 3;\r\n\t\t\t$this->fields['basic_prices']['fields']['_expired_after']['render_row_col'] = 3;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\tif(isset( $this->fields['menu']['fields']['_menu'])){\r\n\t\t\t $this->fields['menu']['fields']['_hide_pricing_if_bookable'] = array(\r\n\t\t\t\t\t'type' => 'checkboxes',\r\n\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t'name' => '_hide_pricing_if_bookable',\r\n\t\t\t\t\t'label' => '',\r\n\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t'options'\t=> array(\r\n\t\t\t\t\t\t'hide' => __('Hide pricing table on listing page but show bookable services in booking widget', 'listeo_core' )\r\n\t\t\t\t\t),\r\n\t\t\t);\t\r\n\t\t}\r\n\r\n\t\tif(isset( $this->fields['opening_hours']['fields']['_opening_hours'])){\r\n\t\t\t $this->fields['opening_hours']['fields']['_monday_opening_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t $this->fields['opening_hours']['fields']['_monday_closing_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\t\r\n\t\t\t$this->fields['opening_hours']['fields']['_tuesday_opening_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Tuesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_tuesday_closing_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_wednesday_opening_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_wednesday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_thursday_opening_hour'] = array(\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_opening_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_thursday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\t\r\n\t\t\t$this->fields['opening_hours']['fields']['_friday_opening_hour'] = array(\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_friday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_saturday_opening_hour'] = array(\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_saturday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_sunday_opening_hour'] = array(\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_sunday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t}\r\n\r\n\t\t$this->fields['basic_info']['fields']['product_id'] = array(\r\n\t\t\t\t\t\t\t'name' => 'product_id',\r\n\t\t\t\t\t\t\t'type' => 'hidden',\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t);\r\n\r\n\t\t$this->fields['gallery']['fields']['_thumbnail_id'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Thumbnail ID', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'hidden',\r\n\t\t\t\t\t\t\t'name' => '_thumbnail_id',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t);\r\n\r\n\t\tswitch ( $this->listing_type) {\r\n\t\t\tcase 'event':\r\n\t\t\t\tforeach ( $this->fields as $group_key => $group_fields ) {\r\n\t\t\t\t\tforeach ( $group_fields['fields'] as $key => $field ) {\r\n\t\t\t\t\t\tif ( !empty($field['for_type']) && in_array($field['for_type'],array('rental','service') ) ) {\r\n\t\t\t\t\t\t\tunset( $this->fields[$group_key]['fields'][$key] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t// \t\t//unset( $this->fields['fields']['event_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['service_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['rental_category']);\r\n\t\t\tbreak;\r\n\t\t\tcase 'service':\r\n\t\t\t\tforeach ( $this->fields as $group_key => $group_fields ) {\r\n\t\t\t\t\tforeach ( $group_fields['fields'] as $key => $field ) {\r\n\t\t\t\t\t\tif ( !empty($field['for_type']) && in_array($field['for_type'],array('rental','event') ) ) {\r\n\t\t\t\t\t\t\tunset($this->fields[$group_key]['fields'][$key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['event_category']);\r\n\t\t// \t\t//unset( $this->fields['fields']['service_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['rental_category']);\r\n\t\t\tbreak;\r\n\t\t\tcase 'rental':\r\n\t\t\t\tforeach ( $this->fields as $group_key => $group_fields ) {\r\n\t\t\t\t\tforeach ( $group_fields['fields'] as $key => $field ) {\r\n\t\t\t\t\t\tif ( !empty($field['for_type']) && in_array($field['for_type'],array('event','service') ) ) {\r\n\t\t\t\t\t\t\tunset($this->fields[$group_key]['fields'][$key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['event_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['service_category']);\r\n\t\t// \t\t//unset( $this->fields['fields']['rental_category']);\r\n\t\t \tbreak;\r\n\t\t\t\r\n\t\t \tdefault:\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['event_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['service_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['rental_category']);\r\n\t\t \t\tbreak;\r\n\t\t }\r\n\t\tif(get_option('listeo_bookings_disabled')){\r\n\t\t\tunset( $this->fields['booking'] );\r\n\t\t\tunset( $this->fields['slots'] );\r\n\t\t\tunset( $this->fields['basic_prices'] );\r\n\t\t\tunset( $this->fields['availability_calendar'] );\r\n\t\t}\r\n\t\t\r\n\t}", "public function createfield(){\n \treturn view('field.create');\n }", "public function __construct($fields)\n {\n $this->fields = $fields;\n }", "public function __construct($fields)\n {\n $this->fields = $fields;\n }", "public function fields(): Fields\n\t{\n\t\treturn $this->blueprint->fields()->addValues($this->raw())->preProcess();\n\t}", "public function buildFields()\n {\n $this->addField('name', 'kuma_menu.menu.adminlist.field.name', true);\n }", "protected function & createField() {\n\t\t# Initialize\n\t\t$linker =& $this->getLinker();\n\t\t# Create Form FIELD!\n\t\t$linker->create($this);\n\t\t# Chain\n\t\treturn $this;\n\t}", "protected function addFieldConfigs()\n {\n\n $this[\"flexibleLayoutProxy\"] = function ($c) {\n return new FlexibleLayoutProxy($c);\n };\n\n }", "protected function buildCoreFields(): void\n {\n //====================================================================//\n // Register Product Configurator\n $this->fieldsFactory()->registerConfigurator(\n \"Address\",\n new AddressConfigurator()\n );\n //====================================================================//\n // Customer\n $this->fieldsFactory()->create((string) self::objects()->encode(\"ThirdParty\", SPL_T_ID))\n ->identifier(\"customer_id\")\n ->name(\"Customer\")\n ->microData(\"http://schema.org/Organization\", \"ID\")\n ->isRequired()\n ->isNotTested()\n ;\n //====================================================================//\n // Country ISO Code\n $this->fieldsFactory()->create(SPL_T_COUNTRY)\n ->identifier(\"country_iso\")\n ->name(\"Country ISO (Code)\")\n ->microData(\"http://schema.org/PostalAddress\", \"addressCountry\")\n ->isRequired()\n ;\n }", "public function getCreateFields()\n {\n\n return array\n (\n 'wbfsys_entity_tag' => array\n (\n 'vid',\n 'id_entity',\n 'id_tag',\n 'm_version',\n ),\n 'embed_tag' => array\n (\n 'name',\n 'access_key',\n 'id_lang',\n 'm_parent',\n 'description',\n ),\n 'wbfsys_tag' => array\n (\n 'name',\n 'access_key',\n 'id_lang',\n 'm_parent',\n 'description',\n ),\n\n );\n\n }", "protected function wrap_fields()\n {\n }", "public function create_custom_fields() {\n \n /* Custom H1 */\n $custom_h1 = new_cmb2_box( array(\n 'id' => '_custom_h1',\n 'title' => 'Custom H1',\n 'object_types' => array_keys( get_post_types( '', 'names' ) ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true\n ) );\n $custom_h1->add_field( array(\n 'id' => '_custom_h1',\n 'desc' => 'Custom Title',\n 'type' => 'text',\n ) );\n }", "public function makeField($name, $arguments) {\n $field = new FieldMetadata($name);\n foreach($arguments as $key => $value) {\n $field->$key = $value;\n }\n\n return $field;\n }", "public function createField($field, $value) {\n // render normal\n }", "public function __construct($fields = [])\n {\n\n parent::__construct($this->prepareFields($fields));\n }", "public function field(string ...$fieldNames): FieldCollection {\r\n\r\n $fieldCollection = new FieldCollection($fieldNames);\r\n $fieldCollection -> bail($this -> bail);\r\n $this -> fieldCollection[] = $fieldCollection;\r\n $this -> addFieldNames($fieldNames, FieldCollection::class);\r\n\r\n return $fieldCollection;\r\n }", "public function fields() {\n\t\tif( !$this->fields ) {\n\t\t\t$this->fields = new Form/Fields( $this->id );\n\t\t}//end if\n\t\treturn $this->fields;\n\t}", "public function loadFields()\n\t{\n\t\t// Get only the fields from the class instance, not its descendants\n\t\t$getFields = create_function('$obj', 'return get_object_vars($obj);');\n\t\t$fields = $getFields($this);\n\n\t\t// Field defaults\n\t\t$defaults = array(\n\t\t\t'primary' => false,\n\t\t\t'relation' => false\n\t\t);\n\n\t\t// Go through and set up each field\n\t\tforeach ($fields as $name => $options)\n\t\t{\n\t\t\t// Merge the defaults\n\t\t\t$options = array_merge($defaults, $options);\n\n\t\t\t// Is this the primary field?\n\t\t\tif ($options['primary'] === true)\n\t\t\t{\n\t\t\t\t$this->primaryKeyField = $name;\n\t\t\t}\n\n\t\t\t// Is this a relation?\n\t\t\tif ($options['relation'] !== false)\n\t\t\t{\n\t\t\t\t$this->relations[$name] = $options;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->fields[$name] = array();\n\t\t}\n\t}", "public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n\n $fields->addFIeldTOTab('Root.Main',new TextField('Title','Image Title'));\n $fields->addFIeldTOTab('Root.Main',new TextareaField('Description','Photo Description (Max 500 Charachters)'));\n $fields->addFIeldTOTab('Root.Main',new UploadField('Image','Photo'));\n\n return $fields;\n }", "public function getFormFields() {\n $fields = array(\n 'shapes[]' => array(\n 'type' => 'select',\n 'multiplicate' => '5',\n 'values' => array(\n '-' => '-',\n 'cube' => 'cube',\n 'round' => 'round',\n )\n ),\n 'width[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Width'\n ),\n 'higth[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Higth'\n ),\n 'x_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'X position'\n ),\n 'y_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Y position'\n ),\n 'red[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color red',\n ),\n 'green[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color green',\n ),\n 'blue[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color blue',\n ),\n 'size[]' => array(\n 'type' => 'text',\n 'multiplicate' => '1',\n 'label' => 'Size holst'\n ),\n 'enable[]' => array(\n 'type' => 'checkbox',\n 'multiplicate' => '5',\n 'label' => 'enable'\n )\n );\n return $fields;\n }", "public function instance_fields() { \n\n\t\t$fields['name'] \t= array('description'=>_('Instance Name'),'type'=>'textbox'); \n\t\t$fields['host'] \t= array('description'=>_('Hostname'),'type'=>'textbox'); \n\t\t$fields['port']\t\t= array('description'=>_('Port'),'type'=>'textbox'); \n\t\t$fields['password']\t= array('description'=>_('Password'),'type'=>'textbox'); \n\n\t\treturn $fields; \n\n\t}", "public function setInputFields(array $inputFields): Collection;", "public static function make(array $fields): self\n {\n return new static($fields);\n }", "function buildOutput()\n {\n $dom = new DOMDocument('1.0', 'UTF-8');\n $field = $dom->createElement('field');\n if ( !isset($this->class) )\n {\n $field->setAttribute('class', $this->type);\n } else {\n $field->setAttribute('class', $this->class);\n }\n $field->setAttribute('id', $this->name);\n $field->setAttribute('label', $this->label);\n $field->setAttribute('name', $this->name);\n $field->setAttribute('type', $this->type);\n if ( is_array($this->options) )\n {\n foreach ( $this->options AS $name=>$value )\n {\n $field->setAttribute($name, $value);\n }\n }\n $field->appendChild($dom->createCDATASection($this->value));\n return $field;\n }", "public function buildCoreFields(): void\n {\n //====================================================================//\n // Product SKU\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"identifier\")\n ->name(\"Product SKU\")\n ->microData(\"http://schema.org/Product\", \"model\")\n ->isListed()\n ->isReadOnly()\n ;\n //====================================================================//\n // Active => Product Is Enables & Visible\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->identifier(\"enabled\")\n ->name(\"Enabled\")\n ->microData(\"http://schema.org/Product\", \"offered\")\n ->isListed()\n ;\n //====================================================================//\n // Product Family\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"family_code\")\n ->name(\"Family Code\")\n ->group(\"Metadata\")\n ->addChoices($this->variants->getFamilyChoices())\n ->microData(\"http://schema.org/Product\", \"famillyCode\")\n ->isReadOnly()\n ;\n //====================================================================//\n // Product Family Name\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"family_label\")\n ->name(\"Family Name\")\n ->group(\"Metadata\")\n ->microData(\"http://schema.org/Product\", \"famillyName\")\n ->isReadOnly()\n ;\n //====================================================================//\n // Product Family Variant\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"family_variant_code\")\n ->name(\"Family Variant Code\")\n ->group(\"Metadata\")\n ->addChoices($this->variants->getFamilyChoices())\n ->microData(\"http://schema.org/Product\", \"famillyVariantCode\")\n ->isNotTested()\n ;\n //====================================================================//\n // PhpUnit/Travis Mode => Force Variation Types\n if (Splash::isTravisMode()) {\n $this->fieldsFactory()->addChoice(\"clothing_color\", \"Color\");\n }\n }", "public function test_it_creates_new_field_from_input_data()\n\t{\n\t\t$previous = \\DvsField::count();\n\n\t\t$this->LanguagesRepository->shouldReceive('findLanguageForPageVersion')\n\t\t\t->times(1)\n\t\t\t->andReturn(\\DvsLanguage::find(45));\n\n\n\t\t// when we call this method with input data\n\t\t$output = $this->FieldManager->findOrCreateField([\n\t\t\t'human_name' => 'Human Name',\n\t\t\t'key' => 'key42',\n\t\t\t'type' => 'text',\n\t\t\t'settings' => '{}',\n\t\t\t'page_version_id' => '1',\n\t\t\t'value' => '{}',\n\t\t]);\n\n\t\t// then it should create a new field from input data\n\t\tassertEquals('key42', $output->key);\n\t\tassertEquals($previous + 1, \\DvsField::count());\n\t}", "function __construct ( $name , $fields )\n\t{\n\t\t$this->_name = $name ;\n\t\t\n\t\t$primary = null ;\n\t\t$defPrimary = null ;\n\n\t\tforeach ( $fields as $f )\n\t\t{\n\t\t $r = null ;\n\t\t \n\t\t\tif ( ake ( 'name', $f ) && ($r = $this->validateField($f)) === true )\n\t\t\t{\n\t\t\t\t$this->_fields[$f['name']] = $f ;\n\t\t\t\t\n\t\t\t\tif ( @$f['behavior'] & DBSchema::BHR_PRIMARY )\n\t\t\t\t{\n\t\t\t\t\t$primary = $f['name'];\n\t\t\t\t} else if ( @$f['name'] == 'id' )\n\t\t\t\t{\n\t\t\t\t\t$defPrimary = 'id' ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_initialStructure[$f['name']] = $f ;\n\t\t\t} else if ( !is_null($r) )\n\t\t\t{\n\t\t\t\t$this->debug($r) ;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif ( !is_null($primary) )\n\t\t{\n\t\t\t$this->_primary = $primary ;\n\t\t} else {\n\t\t\t$this->_primary = $defPrimary ;\n\t\t}\n\n\t\t$this->_len = count($this->_fields);\n\t}", "public function fields($fields)\n {\n $this->fields = $fields;\n\n return $this;\n }", "public function create($fields) {\n return $this->model->create($fields);\n }", "public function getCMSFields()\n {\n $commentField = $this->AllowHtml ? HTMLEditorField::class : TextareaField::class;\n $fields = new FieldList(\n $this\n ->obj('Created')\n ->scaffoldFormField($this->fieldLabel('Created'))\n ->performReadonlyTransformation(),\n TextField::create('Name', $this->fieldLabel('Name')),\n $commentField::create('Comment', $this->fieldLabel('Comment')),\n EmailField::create('Email', $this->fieldLabel('Email')),\n TextField::create('URL', $this->fieldLabel('URL')),\n FieldGroup::create(array(\n CheckboxField::create('Moderated', $this->fieldLabel('Moderated')),\n CheckboxField::create('IsSpam', $this->fieldLabel('IsSpam')),\n ))\n ->setTitle(_t(__CLASS__ . '.OPTIONS', 'Options'))\n ->setDescription(_t(\n __CLASS__ . '.OPTION_DESCRIPTION',\n 'Unmoderated and spam comments will not be displayed until approved'\n ))\n );\n\n // Show member name if given\n if (($author = $this->Author()) && $author->exists()) {\n $fields->insertAfter(\n 'Name',\n TextField::create('AuthorMember', $this->fieldLabel('Author'), $author->Title)\n ->performReadonlyTransformation()\n );\n }\n\n // Show parent comment if given\n if (($parent = $this->ParentComment()) && $parent->exists()) {\n $fields->push(new HeaderField(\n 'ParentComment_Title',\n _t(__CLASS__ . '.ParentComment_Title', 'This comment is a reply to the below')\n ));\n // Created date\n // FIXME - the method setName in DatetimeField is not chainable, hence\n // the lack of chaining here\n $createdField = $parent\n ->obj('Created')\n ->scaffoldFormField($parent->fieldLabel('Created'));\n $createdField->setName('ParentComment_Created');\n $createdField->setValue($parent->Created);\n $createdField->performReadonlyTransformation();\n $fields->push($createdField);\n\n // Name (could be member or string value)\n $fields->push(\n $parent\n ->obj('AuthorName')\n ->scaffoldFormField($parent->fieldLabel('AuthorName'))\n ->setName('ParentComment_AuthorName')\n ->setValue($parent->getAuthorName())\n ->performReadonlyTransformation()\n );\n\n // Comment body\n $fields->push(\n $parent\n ->obj('EscapedComment')\n ->scaffoldFormField($parent->fieldLabel(self::class))\n ->setName('ParentComment_EscapedComment')\n ->setValue($parent->Comment)\n ->performReadonlyTransformation()\n );\n }\n\n $this->extend('updateCMSFields', $fields);\n return $fields;\n }", "protected function _init()\n {\n $this->_fields += array(\n 'id' => new Sprig_Field_Auto,\n 'name' => new Sprig_Field_Char,\n 'brief' => new Sprig_Field_Char,\n 'content' => new Sprig_Field_Char,\n 'module_id' => new Sprig_Field_Integer,\n 'url' => new Sprig_Field_Char,\n 'meta_title' => new Sprig_Field_Char,\n 'meta_keywords' => new Sprig_Field_Char,\n 'meta_description' => new Sprig_Field_Char,\n 'ord' => new Sprig_Field_Integer(array(\n 'default' => 10,\n )),\n 'status' => new Sprig_Field_Integer(array(\n 'default' => 0,\n )),\n );\n }", "abstract function buildShowFields(): void;", "public function fields(string ...$fields): static\n {\n return $this->withPropertyItem('opts', new FieldsOption($fields));\n }", "public function create()\n {\n $this->resetInputFields();\n }" ]
[ "0.767499", "0.75487787", "0.7104006", "0.6853523", "0.6750752", "0.6711202", "0.6672643", "0.6654241", "0.649102", "0.646809", "0.6420512", "0.64027965", "0.6245627", "0.622891", "0.61955947", "0.6195421", "0.6171193", "0.6168905", "0.61678064", "0.61427647", "0.6129803", "0.6089092", "0.60848373", "0.60720706", "0.60610235", "0.60540706", "0.6045332", "0.60020745", "0.59754217", "0.59646565", "0.5947134", "0.59148574", "0.590799", "0.5907637", "0.59063834", "0.58969", "0.5892042", "0.5880236", "0.58759344", "0.5872898", "0.586613", "0.5854957", "0.5830023", "0.5804633", "0.57978255", "0.5781696", "0.57694954", "0.5751555", "0.5733158", "0.5729537", "0.5716066", "0.57069004", "0.57061005", "0.5680064", "0.5680064", "0.5658353", "0.56482494", "0.56472814", "0.56409466", "0.5629781", "0.56176615", "0.56176615", "0.56176615", "0.56176615", "0.56176615", "0.56162816", "0.5602323", "0.55991536", "0.5586138", "0.5585749", "0.5585749", "0.5582409", "0.5558809", "0.5554081", "0.5541579", "0.55392224", "0.5533278", "0.55314666", "0.55312556", "0.55284244", "0.55203134", "0.551104", "0.550452", "0.55027723", "0.54974145", "0.5486486", "0.5485201", "0.5479343", "0.5479072", "0.54757124", "0.5472782", "0.54716843", "0.5469444", "0.546533", "0.5456106", "0.5455176", "0.54416233", "0.5441573", "0.54402214", "0.542845", "0.5426601" ]
0.0
-1
Create a new duplicable fields container.
public function createDuplicableContainer( $title, $slug, $index=false ) { return $this->getTab( '_options_tab' )->createDuplicableContainer( $title, $slug, $index ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acf_duplicate_fields($fields = array(), $parent_id = 0)\n{\n}", "abstract protected function createFields();", "public abstract function createFields();", "public function duplication($value = TRUE, $fields = array())\n {\n $this->_provider->duplication($value, $fields);\n return $this;\n }", "public function clone(array $parameters = []): FieldsetInterface;", "public static function factory(array $fields)\n\t{\n\t\t$collection = new self();\n\t\tforeach ($fields as $data) {\n\t\t\t$field = Field::factory($data);\n\t\t\t$collection->add($field);\n\t\t}\n\t\treturn $collection;\n\t}", "function duplicate_field( $field ) {\n\t\t\n\t\t// get sub fields\n\t\t$sub_fields = acf_extract_var( $field, 'sub_fields' );\n\t\t\n\t\t\n\t\t// save field to get ID\n\t\t$field = acf_update_field( $field );\n\t\t\n\t\t\n\t\t// duplicate sub fields\n\t\tacf_duplicate_fields( $sub_fields, $field['ID'] );\n\t\t\n\t\t\t\t\t\t\n\t\t// return\t\t\n\t\treturn $field;\n\t}", "public static function factory(array $fields)\n\t{\n\t\t$collection = new self();\n\t\tforeach ($fields as $fieldData) {\n\t\t\t$field = new Field();\n\t\t\t$field->setProperties($fieldData);\n\t\t\t$collection->add($field);\n\t\t}\n\t\treturn $collection;\n\t}", "public function makeFieldList() {}", "function duplicate_field($field)\n {\n }", "public function ajax_duplicate_field() {\n\t\tglobal $wpdb;\n\n\t\t$form_id = absint( $_REQUEST['form'] );\n\t\t$field_id = absint( $_REQUEST['field'] );\n\n\t\tcheck_ajax_referer( 'duplicate-field-' . $form_id, 'nonce' );\n\n\t\t// Get fields info\n\t\t$this_field = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->field_table_name WHERE field_id = %d\", $field_id ) );\n\t\t$all_fields = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->field_table_name WHERE form_id = %d ORDER BY field_sequence ASC\", $form_id ) );\n\t\t$field_sequence = 0;\n\n\t\t// We only want the fields that FOLLOW our field\n\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\tif ( $field->field_id == $field_id ) {\n\t\t\t\t$field_sequence = $field->field_sequence + 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\tunset( $all_fields[ $field_index ] );\n\t\t}\n\t\tarray_shift( $all_fields );\n\n\t\tforeach ( $this_field as $field ) {\n\t\t\t$field_key = $field->field_key;\n\t\t\t$field_type = $field->field_type;\n\t\t\t$field_options = $field->field_options;\n\t\t\t$field_options_other = $field->field_options_other;\n\t\t\t$field_description\t\t= $field->field_description;\n\t\t\t$field_name\t\t\t\t= $field->field_name;\n\t\t\t$field_parent\t\t\t= $field->field_parent;\n\t\t\t$field_validation\t\t= $field->field_validation;\n\t\t\t$field_required\t\t\t= $field->field_required;\n\t\t\t$field_size\t\t\t\t= $field->field_size;\n\t\t\t$field_css\t\t\t\t= $field->field_css;\n\t\t\t$field_layout\t\t\t= $field->field_layout;\n\t\t\t$field_default\t\t\t= $field->field_default;\n\t\t}\n\n\t\t// Create the new field's data\n\t\t$newdata = array(\n\t\t\t'form_id' => $form_id,\n\t\t\t'field_key' => $field_key,\n\t\t\t'field_type' => $field_type,\n\t\t\t'field_options' => $field_options,\n\t\t\t'field_options_other' => $field_options_other,\n\t\t\t'field_description' => $field_description,\n\t\t\t'field_name' => $field_name,\n\t\t\t'field_sequence' => $field_sequence,\n\t\t\t'field_parent' => $field_parent,\n\t\t\t'field_validation' => $field_validation,\n\t\t\t'field_required' => $field_required,\n\t\t\t'field_size' => $field_size,\n\t\t\t'field_css' => $field_css,\n\t\t\t'field_layout' => $field_layout,\n\t\t\t'field_default' => $field_default,\n\t\t);\n\n\t\t// Create the field\n\t\t$wpdb->insert( $this->field_table_name, $newdata );\n\t\t$insert_id = $wpdb->insert_id;\n\n\t\t// VIP fields\n\t\t$vip_fields = array( 'verification', 'secret', 'submit' );\n\n\t\t// Rearrange the fields that follow our new data\n\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\tif ( !in_array( $field->field_type, $vip_fields ) ) {\n\t\t\t\t$field_sequence++;\n\t\t\t\t// Update each field with it's new sequence and parent ID\n\t\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), array( 'field_id' => $field->field_id ) );\n\t\t\t}\n\t\t}\n\n\t\t// Move the VIPs\n\t\tforeach ( $vip_fields as $update ) {\n\t\t\t$field_sequence++;\n\t\t\t$where = array(\n\t\t\t\t'form_id' \t\t=> $form_id,\n\t\t\t\t'field_type' \t=> $update\n\t\t\t);\n\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), $where );\n\n\t\t}\n\n\t\techo $this->field_output( $form_id, $insert_id );\n\n\t\tdie(1);\n\t}", "static function createWith($fields) {\r\n return static::make($fields)->create();\r\n }", "public function withFields(): Factory\n {\n return $this->afterCreating(function (Entry $entry) {\n $fields = $entry->toEntryClass()->getFields();\n\n foreach ($fields as $field) {\n Field::factory()->create([\n 'entry_id' => $entry->id,\n 'key' => $field->getKey(),\n 'value' => $field->getKey() . '_value',\n ]);\n }\n });\n }", "function acf_duplicate_field($id = 0, $parent_id = 0)\n{\n}", "private function getFieldCollection()\n {\n $fields = $this->fields;\n $collection = new FieldCollection();\n\n foreach ($fields as $fieldKey => $fieldMeta) {\n $collection->add(new FieldVO($fieldKey, $fieldMeta));\n }\n\n return $collection;\n }", "protected function createFormFields() {\n\t}", "function acf_clone_field($field, $clone_field)\n{\n}", "function acf_duplicate_field_group( $id = 0, $new_post_id = 0 ) {\n\treturn acf_duplicate_internal_post_type( $id, $new_post_id, 'acf-field-group' );\n}", "public function createDuplicate();", "protected function cloneFields($dce) {\n\t\t/** @var $clonedFields Tx_Extbase_Persistence_ObjectStorage */\n\t\t$clonedFields = t3lib_div::makeInstance('Tx_Extbase_Persistence_ObjectStorage');\n\t\t/** @var $field Tx_Dce_Domain_Model_DceField */\n\t\tforeach($dce->getFields() as $field) {\n\t\t\t$field = clone $field;\n\t\t\tif ($field->getType() === Tx_Dce_Domain_Model_DceField::TYPE_ELEMENT || $field->getType() === Tx_Dce_Domain_Model_DceField::TYPE_SECTION) {\n\t\t\t\tif ($field->getSectionFields()) {\n\t\t\t\t\t/** @var $clonedFields Tx_Extbase_Persistence_ObjectStorage */\n\t\t\t\t\t$clonedSectionFields = t3lib_div::makeInstance('Tx_Extbase_Persistence_ObjectStorage');\n\t\t\t\t\tforeach($field->getSectionFields() as $sectionField) {\n\t\t\t\t\t\t/** @var $clonedSectionField Tx_Dce_Domain_Model_DceField */\n\t\t\t\t\t\t$clonedSectionField = clone $sectionField;\n\t\t\t\t\t\t$clonedSectionField->setValue(NULL);\n\t\t\t\t\t\t$clonedSectionFields->attach($clonedSectionField);\n\t\t\t\t\t\t$field->setSectionFields($clonedSectionFields);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$clonedFields->attach($field);\n\t\t\t\t$dce->setFields($clonedFields);\n\t\t\t}\n\t\t}\n\t}", "public function createDuplicableContainer( $title, $slug, $index = false )\n\t\t{\n\t\t\t$container = new THB_TabDuplicableFieldsContainer($title, $slug);\n\t\t\t$this->addContainer($container, $index);\n\n\t\t\treturn $container;\n\t\t}", "public function createFields()\n\t{\n\t\t$this->_formFields = $this->createModelFormFields();\n\t\treturn $this;\n\t}", "function acf_duplicate_field_group($id = 0, $new_post_id = 0)\n{\n}", "public function duplicate() {\n\t\t$page = parent::duplicate();\n\t\t\n\t\t// the form fields\n\t\tif($this->Fields()) {\n\t\t\tforeach($this->Fields() as $field) {\n\t\t\t\t$newField = $field->duplicate();\n\t\t\t\t$newField->ParentID = $page->ID;\n\t\t\t\t$newField->write();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// the emails\n\t\tif($this->EmailRecipients()) {\n\t\t\tforeach($this->EmailRecipients() as $email) {\n\t\t\t\t$newEmail = $email->duplicate();\n\t\t\t\t$newEmail->FormID = $page->ID;\n\t\t\t\t$newEmail->write();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $page;\n\t}", "function create()\n\t{\n\t\t$names = $this->_fields;\n\t\t$object = new StdClass;\n\t\tforeach ($names as $name)\n\t\t\t$object->$name = \"\";\n\t\treturn $object;\n\t}", "public function Populate() {\r\n\t\t$form_instance = $this->form_instance;\r\n\t\t// Retrieve the field data\r\n\t\t$_els = vcff_parse_container_data($form_instance->form_content);\r\n\t\t// If an error has been detected, return out\r\n\t\tif (!$_els || !is_array($_els)) { return; }\r\n\t\t// Retrieve the form instance\r\n\t\t$form_instance = $this->form_instance; \r\n\t\t// Loop through each of the containers\r\n\t\tforeach ($_els as $k => $_el) {\r\n\t\t\t// Retrieve the container instance\r\n\t\t\t$container_instance = $this->_Get_Container_Instance($_el);\r\n\t\t\t// Add the container to the form instance\r\n\t\t\t$form_instance->Add_Container($container_instance);\r\n\t\t}\r\n\t}", "static function createOrReplaceWith($fields) {\r\n return static::make($fields)->createOrReplace();\r\n }", "public static function _find_duplicity($fields){\n \n $db = new Database();\n $cond = array('incident_active = 1');\n\n if (isset($fields['date'])){\n $date_comp = $fields['date'];\n $yyyy = date('Y',strtotime($date_comp));\n $mm = date('m',strtotime($date_comp))*1;\n $dd = date('d',strtotime($date_comp))*1;\n \n $cond[] = \"YEAR(incident_date) = $yyyy AND MONTH(incident_date) = $mm AND DAY(incident_date) = $dd \";\n\n }\n\n if (isset($fields['category'])){\n $cond[] = 'category_id IN ('.implode(',',$fields['category']).')';\n }\n\n if (isset($fields['lat'])){\n // Field latitude in location table is double, 6 decimals\n $cond[] = ' latitude = '.number_format($fields['lat'],6);\n }\n \n if (isset($fields['lon'])){\n // Field latitude in location table is double, 6 decimals\n $cond[] = ' longitude = '.number_format($fields['lon'],6);\n }\n \n $sql = 'SELECT * FROM incident INNER JOIN incident_category ON incident.id = incident_category.incident_id INNER JOIN location ON incident.location_id = location.id WHERE '.implode(' AND ',$cond);\n $dups = $db->query($sql);\n\n return $dups;\n }", "public function setInputFields(array $inputFields): Collection;", "public function test_duplicating_text_field() {\n\t\t$this->assertTrue( current_user_can( 'frm_edit_forms' ), 'User does not have permission' );\n\n\t\t$format = '^([a-zA-Z]\\d{4})$';\n\t\t$original_field = $this->factory->field->create_and_get(\n\t\t\tarray(\n\t\t\t\t'form_id' => $this->form_id,\n\t\t\t\t'type' => 'text',\n\t\t\t\t'field_options' => array(\n\t\t\t\t\t'format' => $format,\n\t\t\t\t\t'in_section' => 0,\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->assertNotEmpty( $original_field->id );\n\t\t$this->assertEquals( $format, $original_field->field_options['format'] );\n\n\t\t$_POST = array(\n\t\t\t'action' => 'frm_duplicate_field',\n\t\t\t'nonce' => wp_create_nonce( 'frm_ajax' ),\n\t\t\t'field_id' => $original_field->id,\n\t\t\t'form_id' => $original_field->form_id,\n\t\t);\n\n\t\t$response = $this->trigger_action( 'frm_duplicate_field' );\n\t\t$this->assertNotFalse( strpos( $response, '<input type=\"hidden\" name=\"frm_fields_submitted[]\" ' ), 'Field was not created in form ' . $original_field->form_id . ' duplicated from field ' . $original_field->id );\n\n\t\tglobal $frm_duplicate_ids;\n\t\t$this->assertNotEmpty( $frm_duplicate_ids );\n\t\t$this->assertTrue( isset( $frm_duplicate_ids[ $original_field->id ] ), 'No id saved for duplicated field.' );\n\t\t$newest_field_id = $frm_duplicate_ids[ $original_field->id ];\n\n\t\t// make sure the field exists\n\t\t$field = FrmField::getOne( $newest_field_id );\n\t\t$this->assertTrue( is_object( $field ), 'Field id ' . $newest_field_id . ' does not exist' );\n\t\t$this->assertEquals( $format, $field->field_options['format'] );\n\n\t\tself::check_in_section_variable( $field, 0 );\n\t}", "protected function duplicateField($field, $n = 2) {\n if (!isset($this->form[$field])) {\n return FALSE;\n }\n $item = $this->form[$field];\n for ($i = 1; $i <= $n; $i++) {\n $this->form[\"{$field}_$i\"] = $item;\n }\n return TRUE;\n }", "function fieldset(array $fields = [])\n {\n return new \\Grogu\\Acf\\Entities\\FieldSet($fields);\n }", "public function duplicate(){\n\t\treturn self::cloneObject($this);\n\t}", "public static function make($items = [])\n {\n $fieldCollection = new static($items);\n\n $fieldCollection->validateFields();\n\n return $fieldCollection;\n }", "public function duplicate() {\n \t\t\n \t\ttry {\n\t\t\t\n\t \t\t// start duplicate\n\t\t\t$class = get_class($this);\n \t\t\t$duplicate = new $class;\n \t\t\t\n\t \t\t// duplicate row fields\n\t \t\t$this->duplicateRow($duplicate);\n\t \t\t\n \t\t\t// duplicate data\n\t \t\t$this->duplicateData($duplicate);\n\t \t\t\n\t \t\t// duplicate items\n\t \t\t$this->duplicateChildren($duplicate);\n\t \t\t\n\t \t\t$duplicate->setDuplicate($this->getId());\n \t\t\n \t\t\treturn $duplicate;\n \t\t\t\n \t\t} catch (Exception $e) {\n \t\t\n \t\t\treturn false;\n \t\t\t\n \t\t}\n \t\t\n \t}", "public function create_fields() {\n\t\tif ( count( $this->sections ) > 0 ) {\n\t\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\t\t$method = $this->determine_method( $v, 'form' );\n\t\t\t\t$name = $v['name'];\n\t\t\t\tif ( $v['type'] == 'info' ) { $name = ''; }\n\t\t\t\tadd_settings_field( $k, $name, $method, $this->token, $v['section'], array( 'key' => $k, 'data' => $v ) );\n\n\t\t\t\t// Let the API know that we have a colourpicker field.\n\t\t\t\tif ( $v['type'] == 'range' && $this->_has_range == false ) { $this->_has_range = true; }\n\t\t\t}\n\t\t}\n\t}", "public function fieldCreate()\n\t{\n\t\t$fields=array();\n\t\tforeach($this->getTable()->result_array() as $row)\n\t\t{\n\t\t\tif($row['Extra']!=='auto_increment')\n\t\t\t{\n\t\t\t\t$fields[]=array(\n\t\t\t\t\t'field'=>$row['Field'],\n\t\t\t\t\t'max_length'=>preg_match('/varchar/',$row['Type']) ? (preg_replace('/[A-Za-z()]/','',$row['Type'])!=='' ? '\\'maxlength\\'=>'.preg_replace('/[A-Za-z()]/','',$row['Type']).',' : false) : false,\n\t\t\t\t\t'type'=>preg_match('/text/',$row['Type']) ? 'Area' : 'Field',\n\t\t\t\t\t'required'=>$row['Null']=='NO' ? true : false,\n\t\t\t\t\t'input'=>preg_match('/^(password|pass|passwd|passcode)$/i',$row['Field']) ? 'password' : 'text',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}", "protected function _Get_Container_Instance($_el) {\r\n\t\t$form_instance = $this->form_instance;\r\n // Retrieve the container name\r\n\t\t$type = $_el['type'];\r\n // Retrieve the global vcff forms class\r\n $vcff_containers = vcff_get_library('vcff_containers');\r\n // If the context does not exist\r\n if (!isset($vcff_containers->contexts[$type])) { return; }\r\n // Retrieve the context\r\n $_context = $vcff_containers->contexts[$type]; \r\n // Retrieve the container name\r\n\t\t$machine_code = $_el['name'];\r\n // If no form instance was found\r\n\t\tif (!$machine_code) { return; }\r\n\t\t// Create the field item classname\r\n\t\t$container_classname = $_context['class'];\r\n\t\t// If no form instance was found\r\n\t\tif (!$container_classname) { return; } \r\n\t\t// Create a new item instance for this field\r\n\t\t$container_instance = new $container_classname();\r\n\t\t// Populate the container form\r\n\t\t$container_instance->form_instance = $this->form_instance;\r\n\t\t$container_instance->machine_code = $machine_code;\r\n\t\t$container_instance->container_type = $_context['type'];\r\n\t\t$container_instance->context = $_context;\r\n\t\t$container_instance->attributes = $_el['attributes'];\r\n // Populate the handler object\r\n\t\t$container_instance->el = $_el['el'];\r\n\t\t$container_instance->el_children = $_el['children'];\r\n // Add any child fields\r\n $this->_Add_Child_Fields($container_instance);\r\n $this->_Add_Child_Supports($container_instance);\r\n // If the field has a sanitize method\r\n if (method_exists($container_instance,'On_Create')) { $container_instance->On_Create(); }\r\n // Do any create actions\r\n $container_instance->Do_Action('create');\r\n // Do a wordpress hook\r\n do_action('vcff_container_create',$container_instance);\r\n\t\t// Return the generated field instance\r\n\t\treturn $container_instance;\r\n\t}", "public function prepareFieldset();", "public function creer_oql_Pdu(\n\t\t\t$fields = array ()) {\n\t\t$filtre = array ();\n\t\tforeach ( $this->getMandatory () as $field => $inutile ) {\n\t\t\tswitch ($field) {\n\t\t\t\tcase 'org_id' :\n\t\t\t\t\tif (isset ( $fields ['organization_name'] )) {\n\t\t\t\t\t\t$filtre ['organization_name'] = $fields ['organization_name'];\n\t\t\t\t\t} else if (isset ( $fields ['org_name'] )) {\n\t\t\t\t\t\t$filtre ['organization_name'] = $fields ['org_name'];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'location_id' :\n\t\t\t\t\t$filtre ['location_name'] = $fields ['location_name'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'rack_id' :\n\t\t\t\t\t$filtre ['rack_name'] = $fields ['rack_name'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\t$filtre [$field] = $fields [$field];\n\t\t\t}\n\t\t}\n\t\treturn parent::creer_oql ( $filtre );\n\t}", "public function groupBy($fields, $overwrite = false);", "public function clone() {\n\t\t\t$class = get_called_class();\n\t\t\t$obj = new $class($this->_db);\n\t\t\t$obj->setFromArray($this->toArray());\n\t\t\t$obj->setChanged($this->hasChanged());\n\t\t\treturn $obj;\n\t\t}", "public function create()\n {\n $fieldset = factory(Fieldset::class)->create();\n\n if (! $this->sections) {\n $this->sections = SectionFactory::times(3)->create();\n }\n\n $fieldset->sections()->saveMany($this->sections);\n\n return $fieldset;\n }", "public function __clone()\n {\n $this->items = ConfigUtil::cloneItems($this->items);\n $this->fields = ConfigUtil::cloneObjects($this->fields);\n }", "public function create () {\n reset($this->__fields);\n $pk = key($this->__fields);\n $form = $this->getForm();\n $placeholders = array();\n\n foreach ($form as $k => $v) {\n $placeholders[$k] = ':' . $k;\n }\n\n $sql = sprintf(\n 'INSERT INTO %s (%s) VALUES (%s)'\n , $this->getTableName()\n , implode(',', array_keys($placeholders))\n , implode(',', $placeholders)\n );\n\n $stmt = $this->__db->prepare($sql);\n\n foreach ($form as $k => $v) {\n if (is_object($v->getData()) && get_class($v->getData()) == 'DateTime') {\n $stmt->bindValue($k, $v->getData(), $this->__fields[$k]['type']);\n } else {\n $stmt->bindValue($k, $v->getData());\n }\n }\n\n $stmt->execute();\n $this->$pk = $this->__db->lastInsertId();\n\n return $this;\n }", "public function fieldsDataProvider() {\n $data['no fields'] = [\n 'configuration' => [\n 'ids' => ['id'],\n ],\n 'expected' => [\n 'id' => 'id',\n 'first_name' => 'first_name',\n 'last_name' => 'last_name',\n 'email' => 'email',\n 'country' => 'country',\n 'ip_address' => 'ip_address',\n ],\n ];\n $data['with fields override'] = [\n 'configuration' => [\n 'ids' => ['id'],\n 'fields' => [\n [\n 'name' => 'id',\n ],\n [\n 'name' => 'first_name',\n 'label' => 'First Name',\n ],\n ],\n ],\n 'expected' => [\n 'id' => 'id',\n 'first_name' => 'First Name',\n ],\n ];\n return $data;\n }", "public function add_fields($fields)\n {\n // `fields` is an array of field objects from fields.php\n if (empty($fields))\n {\n return;\n }\n\n foreach ($fields as $field)\n {\n $cls = is_object($field) ? get_class($field) : NULL;\n\n if (array_key_exists($cls, $this->CLASS_CONTAINER))\n {\n $container = $this->CLASS_CONTAINER[$cls];\n $this->{$container}[] = $field;\n } elseif(array_key_exists($cls, $this->singular_fields)) {\n $this->{$this->singular_fields[$cls]} = $field;\n } else {\n $type = empty($cls) ? gettype($field) : $cls;\n throw new InvalidArgumentException('Object of type ' . $type . ' is an invalid field');\n }\n }\n }", "function copyTo($name,$fields=NULL) {\n\t\tif (is_string($fields))\n\t\t\t$list=explode('|',$fields);\n\t\tforeach (array_keys($this->object) as $field)\n\t\t\tif (!isset($list) || in_array($field,$list)) {\n\t\t\t\t$var=&self::ref($name);\n\t\t\t\t$var[$field]=$this->object[$field];\n\t\t\t}\n\t}", "public function create($fields)\r\n {\r\n return $this->__create($fields);\r\n }", "public function buildFields() {\n }", "protected function addField() {\n foreach(func_get_args() as $argument) {\n if ( (!is_null($argument)) && (is_array($argument)) ) {\n $this->form_fields[$argument['name']] = new UIFormField($argument);\n }\n }\n return $this;\n }", "protected function addFields()\n {\n $groupCustomOptionsName = CustomOptions::GROUP_CUSTOM_OPTIONS_NAME;\n $optionContainerName = CustomOptions::CONTAINER_OPTION;\n $commonOptionContainerName = CustomOptions::CONTAINER_COMMON_NAME;\n\n // Add fields to the option\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'] = array_replace_recursive(\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'],\n $this->getOptionFieldsConfig()\n );\n\n // Add fields to the values\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'] = array_replace_recursive(\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'],\n // $this->getValueFieldsConfig()\n // );\n }", "public static function makeWith(array $fields)\n {\n $instance = new static();\n\n $instance->fields = collect($fields);\n $instance->buildGroups();\n\n return $instance;\n }", "public static function create() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$field_type = FrmAppHelper::get_post_param( 'field_type', '', 'sanitize_text_field' );\n\t\t$form_id = FrmAppHelper::get_post_param( 'form_id', 0, 'absint' );\n\n\t\t$field = self::include_new_field( $field_type, $form_id );\n\n // this hook will allow for multiple fields to be added at once\n do_action('frm_after_field_created', $field, $form_id);\n\n wp_die();\n }", "public function copyTo($_name,$_fields=NULL) {\n\t\tif (is_string($_fields))\n\t\t\t$_list=explode('|',$_fields);\n\t\tforeach (array_keys($this->fields) as $_field)\n\t\t\tif (!isset($_list) || in_array($_field,$_list))\n\t\t\t\tF3::set($_name.'.'.$_field,$this->fields[$_field]);\n\t}", "public function buildFormFields()\n {\n $this->addField(\n SharpFormTextField::make('title')\n ->setLabel('Title')\n )->addField(\n SharpFormUploadField::make('cover')\n ->setLabel('Cover')\n ->setFileFilterImages()\n ->setCropRatio('1:1')\n ->setStorageBasePath('data/service')\n )->addField(\n SharpFormNumberField::make('price')\n ->setLabel('Price')\n )->addField(\n SharpFormMarkdownField::make('description')->setToolbar([\n SharpFormMarkdownField::B, SharpFormMarkdownField::I,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::IMG,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::A,\n ])\n )->addField(\n SharpFormTagsField::make('tags',\n Tag::orderBy('label')->get()->pluck('label', 'id')->all()\n )->setLabel('Tags')\n ->setCreatable(true)\n ->setCreateAttribute('name')\n );\n }", "private function loadFields() {\n\t\tif (count($this->fields) > 0) return;\n\t\t$db = getDB();\n\t\t$stat = $db->prepare(\"SELECT * FROM collection_has_field WHERE collection_id=:cid ORDER BY sort_order DESC\");\n\t\t$stat->execute(array('cid'=>$this->collection_id));\n\t\twhile($d = $stat->fetch()) {\n\t\t\tif ($d['type'] == \"STRING\") {\n\t\t\t\t$this->fields[] = new ItemFieldString( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"TEXT\") {\n\t\t\t\t$this->fields[] = new ItemFieldText( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"HTML\") {\n\t\t\t\t$this->fields[] = new ItemFieldHTML( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"EMAIL\") {\n\t\t\t\t$this->fields[] = new ItemFieldEmail( $d, $this->collection_id, $this);\n\t\t\t} else if ($d['type'] == \"PHONE\") {\n\t\t\t\t$this->fields[] = new ItemFieldPhone( $d, $this->collection_id, $this);\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"We don't know about type: \".$d['type']);\n\t\t\t}\n\t\t}\n\t}", "abstract function fields();", "public function clone(array $parameters = []): FormInterface;", "public function __clone()\r\n {\r\n $schema = new self();\r\n\r\n $schema->columns = $this->columns;\r\n $schema->lastError = '';\r\n\r\n return $schema;\r\n }", "public function add($name, $label = '', array $attributes = array(), array $rules = array()) {\n\t\tif ($name instanceof Fieldset_Field) {\n\t\t\tif ($name->name == '' or $this->field ( $name->name ) !== false) {\n\t\t\t\tthrow new \\RuntimeException ( 'Fieldname empty or already exists in this Fieldset: \"' . $name->name . '\".' );\n\t\t\t}\n\t\t\t\n\t\t\t$name->set_fieldset ( $this );\n\t\t\t$this->fields [$name->name] = $name;\n\t\t\treturn $name;\n\t\t} elseif ($name instanceof Fieldset) {\n\t\t\tif (empty ( $name->name ) or $this->field ( $name->name ) !== false) {\n\t\t\t\tthrow new \\RuntimeException ( 'Fieldset name empty or already exists in this Fieldset: \"' . $name->name . '\".' );\n\t\t\t}\n\t\t\t\n\t\t\t$name->set_parent ( $this );\n\t\t\t$this->fields [$name->name] = $name;\n\t\t\treturn $name;\n\t\t}\n\t\t\n\t\tif (empty ( $name ) || (is_array ( $name ) and empty ( $name ['name'] ))) {\n\t\t\tthrow new \\InvalidArgumentException ( 'Cannot create field without name.' );\n\t\t}\n\t\t\n\t\t// Allow passing the whole config in an array, will overwrite other values if that's the case\n\t\tif (is_array ( $name )) {\n\t\t\t$attributes = $name;\n\t\t\t$label = isset ( $name ['label'] ) ? $name ['label'] : '';\n\t\t\t$rules = isset ( $name ['rules'] ) ? $name ['rules'] : array ();\n\t\t\t$name = $name ['name'];\n\t\t}\n\t\t\n\t\t// Check if it exists already, if so: return and give notice\n\t\tif ($field = $this->field ( $name )) {\n\t\t\t\\Error::notice ( 'Field with this name exists already in this fieldset: \"' . $name . '\".' );\n\t\t\treturn $field;\n\t\t}\n\t\t\n\t\t$this->fields [$name] = new \\Fieldset_Field ( $name, $label, $attributes, $rules, $this );\n\t\t\n\t\treturn $this->fields [$name];\n\t}", "function add_repeater_specific_fields( $repeater ) {\n\t\treturn false;\n\t}", "abstract public function fields();", "function procEditDup($ar){\n $r=parent::procEditDup($ar);\n if(!empty($r['oid'])){\n $d1=$this->display(array('oid'=>$r['oid'], 'tplentry'=>TZR_RETURN_DATA));\n $groups=XDataSource::objectFactoryHelper8('BCLASS=XDSTable&SPECS='.'GRP');\n foreach($d1['oGRP']->oidcollection as $groupoid) {\n\t$d2=&$groups->rDisplay($groupoid);\n\tif(!empty($d2['oprefs']->raw)) {\n\t // on duplique le contenu des préférences stockées dans la table OPTS\n\t $templateoid=$d2['oprefs']->raw;\n\t $useroid=$r['oid'];\n\t $rs2=selectQuery('select * from OPTS where user=\"'.$templateoid.'\"');\n\t $opts=XDataSource::objectFactoryHelper8('BCLASS=XDSTable&SPECS='.'OPTS');\n\t while($rs2 && ($ors2=$rs2->fetch())) {\n\t $opts->procInput(array('user'=>$useroid, 'specs'=>$ors2['specs'], 'modid'=>$ors2['modid'],\n\t\t\t\t 'dtype'=>$ors2['dtype']));\n\t }\n\t}\n }\n }\n return $r;\n }", "public function fields(string ...$fields): static\n {\n return $this->withPropertyItem('opts', new FieldsOption($fields));\n }", "public function createClone()\n {\n return clone $this;\n }", "private static function duplicateRecord($from, $to) {\n $fields = $from->as_array();\n unset($fields['id']);\n foreach ($fields as $name => $value) {\n $to->$name = $value;\n }\n\n return $to;\n }", "public function __construct(){\n if(count($this->fillable) == 0){\n foreach($this->attributes as $key => $attr){\n array_push($this->fillable, $key);\n }\n }\n }", "public static function fromFields(array $fields)\n {\n return static::makeWith($fields);\n }", "public function field(string ...$fieldNames): FieldCollection {\r\n\r\n $fieldCollection = new FieldCollection($fieldNames);\r\n $fieldCollection -> bail($this -> bail);\r\n $this -> fieldCollection[] = $fieldCollection;\r\n $this -> addFieldNames($fieldNames, FieldCollection::class);\r\n\r\n return $fieldCollection;\r\n }", "public function duplicateData(&$duplicate) {\n\t\t\n\t\t$id = $this->getId();\n \t\t$object = $this;\n \t\t\n \t\t// get data\n \t\t$data = $this->getDataValues();\n $duplicate->dataLoaded = true;\n \t\t// set data\n \t\t$duplicate->setDataByArray($data);\n \t\t\n \t\treturn $this;\n \t\t\n\t}", "public function copyFrom($_name) {\n\t\tforeach (array_keys($this->fields) as $_field)\n\t\t\tif (is_array(F3::get($_name)) &&\n\t\t\t\tarray_key_exists($_field,F3::get($_name)))\n\t\t\t\t\t$this->fields[$_field]=F3::get($_name.'.'.$_field);\n\t\t$this->empty=FALSE;\n\t}", "public function repopulate() {\n\t\t$fields = $this->field ( null, true );\n\t\tforeach ( $fields as $f ) {\n\t\t\t// Don't repopulate the CSRF field\n\t\t\tif ($f->name === \\Config::get ( 'security.csrf_token_key', 'fuel_csrf_token' )) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif (($value = $f->input ()) !== null) {\n\t\t\t\t$f->set_value ( $value, true );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "public function fields_to_array(){\n $d = array();\n\n foreach (array_values($this->CLASS_CONTAINER) as $container){\n $fields = $this->{$container};\n if (!empty($fields)){\n $all_fields = array();\n foreach($fields as $field) {\n $all_fields[] = $field->to_array();\n }\n if (count($all_fields) > 0){\n $d[$container] = $all_fields;\n }\n }\n }\n foreach (array_values($this->singular_fields) as $container){\n $field = $this->{$container};\n if (!empty($field)){\n $d[$container] = $field->to_array();\n }\n }\n return $d;\n }", "abstract protected function fields();", "abstract protected function fields();", "private function _createContainerForms() {\n $forms = [\n [\n 'name' => 'inline',\n 'classname' => 'App\\Models\\Backoffice\\ContainerForms\\Inline'\n ],\n [\n 'name' => 'popup',\n 'classname' => 'App\\Models\\Backoffice\\ContainerForms\\Popup'\n ]\n ];\n\n foreach ($forms as $form) {\n $newForm = new ContainerForm;\n $newForm->fill($form);\n $newForm->save();\n }\n }", "function addFields($entity, $name, $not_for_field_list = \"\")\n{\n $fields = array();\n $page_info = getPageInfo($entity['pagename']);\n global $db;\n \n $link = getDBLink();\n \n //do we know where to look at all?\n if ($name == \"\") {\n $entity['fields'] = array();\n return $entity;\n }\n \n // -- first, we see what we find in the database's metadata\n \n //test for Information_schema.columns (SQL-92 standard)\n $client_api = explode('.', mysqli_get_server_info(getDBLink()));\n if ($client_api[0] >= 5) {\n //test for existence of/access to INFORMATION_SCHEMA database\n $info_schema_accessible = false;\n $db_list = pp_run_query('Show databases;');\n foreach($db_list as $row){\n if ($row[\"Database\"] == \"information_schema\") {\n $info_schema_accessible = true;\n }\n }\n if ($info_schema_accessible) {\n // information_schema exists\n //we align the columns that we'd also find in the \"SHOW COLUMNS\"-\n //Query (see below) to the standard query with \" AS \"\n $query = \" SELECT\nCOLUMN_NAME AS `Field`,\nCOLUMN_KEY AS `Key`,\nCOLUMN_TYPE AS `Type`,\nCHARACTER_MAXIMUM_LENGTH,\nNUMERIC_PRECISION,\nCOLUMN_DEFAULT AS `Default`,\nEXTRA AS `Extra`,\nCOLUMN_COMMENT\nFROM information_schema.COLUMNS WHERE TABLE_NAME = '\".$entity[\"tablename\"].\"' AND TABLE_SCHEMA = '\".$db.\"'\";\n }\n }\n //if we can't use it, do it the old way, with less information, sadly\n if ($query == \"\") {\n $query = \"SHOW COLUMNS FROM `\".$entity[\"tablename\"].\"`\";\n }\n \n $res = pp_run_query($query);\n $i = 0;\n foreach($res as $row){\n \n //primary key\n if ($row['Key']=='PRI') {\n if ($entity['pk']!=\"\") {\n // seems to be a 2-field PK - not supported!\n $entity['pk_multiple'] = true;\n }\n $entity[\"pk\"] = $row['Field'];\n //overwriting the first!\n $entity[\"pk_type\"] = preg_replace('@\\([0-9]+\\,?[0-9]*\\)$@', '', $row['Type']);\n }\n \n \n if (!eregi($row['Field'], $not_for_field_list)) {\n //determine length - use only \"Type\" due to http://polypager.nicolashoening.de/?bugs&nr=318\n //$len = $row['CHARACTER_MAXIMUM_LENGTH'];\n //if ($len == \"\" or $len == \"NULL\") {\n // $len = $row['NUMERIC_PRECISION'];\n //}\n //those fields are not there when we said SHOW COLUMNS, so...\n //if ($len == \"\" or $len == \"NULL\") {\n $hits = array();\n eregi('[0-9]+',$row['Type'],$hits);\n $len = $hits[0];\n //}\n //support sets or enums,\n //but we save the valuelist - PolyPager can handle those\n if (eregi('^set\\(', $row['Type']) or eregi('^enum\\(', $row['Type'])) {\n $type = preg_replace('@\\((\\'.+\\'\\,?)+(\\'.+\\')\\)$@', '', $row['Type']);\n eregi('\\((\\'.*\\')\\)', $row['Type'], $hits);\n $hlist = explode(',', $hits[1]);\n $valuelist = array();\n //remove '' on outsets\n foreach($hlist as $l) $valuelist[] = trim($l,\"'\");\n $valuelist = implode(',', $valuelist);\n $valuelist = str_replace(\",,\", \",\", $valuelist);\n } else {\n $type = preg_replace('@\\([0-9]+\\,?[0-9]*\\)$@', '', $row['Type']);\n $valuelist = \"\";\n }\n $field = array(\"name\"=>$row['Field'],\n \"data_type\"=>$type,\n \"size\"=>$len,\n \"order_index\"=>''.$i,\n \"help\"=>$row['COLUMN_COMMENT'],\n \"default\"=>$row['Default'],\n \"valuelist\"=>$valuelist);\n \n //if default is CURRENT_TIMESTAMP, then retrieve it\n if ($type=\"timestamp\" and $row['Default']==\"CURRENT_TIMESTAMP\") {\n $field['default'] = date(\"Y-m-d H:i:s\");\n }\n \n if ($row['Extra'] == 'auto_increment') {\n $entity['hidden_form_fields'].=','.$row['Field'];\n $field['auto'] = 1;\n } else {\n $field['auto'] = 0;\n }\n \n //IMPORTANT: In MySQL we code a boolean as int(1) !!!\n if (($row['Type'] == \"int(1)\" or $row['Type'] == \"tinyint(1)\")) {\n $field[\"data_type\"] = \"bool\";\n }\n \n //set some defaults\n $field['formgroup'] = \"\";\n \n $fields[count($fields)] = $field;\n \n $i++;\n }\n \n }\n \n // -- now we enrich with data from the _sys_fields table\n if ($page_info != \"\") {\n $query = \"SELECT * FROM _sys_fields WHERE pagename = '\".$page_info[\"name\"].\"'\";\n $res = pp_run_query($query);\n foreach($res as $row){\n for ($i=0; $i<count($fields); $i++) {\n \n if ($fields[$i][\"name\"] == $row[\"name\"]) {\n $fields[$i][\"label\"] = $row[\"label\"];\n $fields[$i][\"validation\"] = $row[\"validation\"];\n if ($fields[$i][\"valuelist\"] == \"\") {\n //if from db (set/enum-type), it shouldn't be overwritten\n $fields[$i][\"valuelist\"] = stripCSVList($row[\"valuelist\"]);\n }\n $fields[$i][\"not_brief\"] = $row[\"not_brief\"];\n $fields[$i][\"order_index\"] = $row[\"order_index\"];\n $fields[$i][\"embed_in\"] = $row[\"embed_in\"];\n }\n if (eregi('int',$fields[$i][\"data_type\"]) and $fields[$i][\"size\"] != 1) {\n $fields[$i][\"validation\"] = 'number';\n }\n }\n }\n }\n \n // group field : valuelist stuff\n for ($i=0; $i<count($fields); $i++) {\n // remember from where the values come\n if ($fields[$i][\"valuelist\"] != \"\") {\n $fields[$i]['valuelist_from_db'] = true;\n } else {\n $fields[$i]['valuelist_from_db'] = false;\n }\n }\n \n uasort($fields,\"cmpByOrderIndexAsc\");\n $entity[\"fields\"] = $fields;\n \n return $entity;\n}", "public static function make(array $fields): self\n {\n return new static($fields);\n }", "public function groupBy() {\n $fields = func_get_args();\n\n if (is_array($fields[0])) {\n $fields = $fields[0];\n }\n\n $this->_groupBy = array_unique(array_merge($this->_groupBy, $fields));\n\n return $this;\n }", "function createField($pFieldDetails) {\r\n\t\tswitch ($pFieldDetails['html_control_type']) {\r\n\t\t\tdefault :\r\n\t\t\tcase (int) FIELD_HTML_INPUT_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_VIDEO_YOUTUBE_LINK_TYPE :\r\n\t\t\t\treturn new cfield_input($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_THESIS_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_ANTITHESIS_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_THESIS_NEXT_COUPLET_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_THESIS_TAXON_NAME_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_TABLE :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_MATERIAL_FIELD :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_REFERENCE_FIELD :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_SECTION_TITLE_FIELD :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_PLATE_DESCRIPTION_FIELD :\r\n\t\t\t\treturn new cfield_textarea($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_EDITOR_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_EDITOR_TYPE_ONLY_REFERENCE_CITATIONS :\r\n\t\t\t\treturn new cfield_editor($pFieldDetails);\r\n\t\t\t\r\n\t\t\tcase (int) FIELD_HTML_EDITOR_TYPE_NO_CITATIONS :\r\n\t\t\t\treturn new cfield_editor_no_citations($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_SIMPLE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_ROUNDED_SIMPLE_TEXTAREA :\r\n\t\t\tcase (int) FIELD_HTML_TEXTAREA_PLATE_DESCRIPTION_TYPE :\r\n\t\t\t\treturn new cfield_textarea_simple($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_SELECT_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_MULTIPLE_SELECT_TYPE :\r\n\t\t\t\treturn new cfield_select($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_RADIO_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_CHECKBOX_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_RADIO_PLATE_APPEARANCE_TYPE :\r\n\t\t\t\treturn new cfield_radio($pFieldDetails);\r\n\t\t\t\r\n\t\t\tcase (int) FIELD_HTML_AUTOCOMPLETE_TYPE :\r\n\t\t\t\treturn new cfield_autocomplete($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_FACEBOOK_AUTOCOMPLETE_TYPE :\r\n\t\t\t\treturn new cfield_facebookautocomplete($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_TAXON_CLASSIFICATION_AUTOCOMPLETE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TAXON_CLASSIFICATION_AUTOCOMPLETE_SINGLE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_SUBJECT_CLASSIFICATION_AUTOCOMPLETE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_SUBJECT_CLASSIFICATION_AUTOCOMPLETE_SINGLE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_CHRONOLOGICAL_CLASSIFICATION_AUTOCOMPLETE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_CHRONOLOGICAL_CLASSIFICATION_AUTOCOMPLETE_SINGLE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_GEOGRAPHICAL_CLASSIFICATION_AUTOCOMPLETE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_GEOGRAPHICAL_CLASSIFICATION_AUTOCOMPLETE_SINGLE_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_TAXON_TREATMENT_CLASSIFICATION :\r\n\t\t\t\treturn new cfield_taxon_classification_autocomplete($pFieldDetails);\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_MATERIAL_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_CHECKLIST_TAXON_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_TAXONOMIC_COVERAGE_TAXA_TYPE :\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_FIGURE_IMAGE :\r\n\t\t\tcase (int) FIELD_HTML_FILE_UPLOAD_FIGURE_PLATE_IMAGE :\r\n\t\t\t\treturn new cfield_file_upload($pFieldDetails);\r\n\t\t}\r\n\t}", "public function create($fields) {\n return $this->model->create($fields);\n }", "public function addField();", "public function add(...$fields): self\n {\n foreach ($fields as $field) {\n $this->fields[] = $field;\n }\n\n return $this;\n }", "public static function createInstance()\n {\n return new CompoundListField('ISerializable', 'ISerializable');\n }", "public function create(Request $request)\n {\n $request->validate(\n [\n 'subscriber_id' => 'required|exists:subscribers,id',\n 'title' => 'required|max:255',\n 'value' => 'required|max:255',\n 'type' => ['required', 'max:255']\n ],\n [\n 'required' => 'The :attribute field is required.',\n 'exists' => 'There is no subscriber with this id.',\n ]\n );\n\n $this->validateUniqueField($request);\n\n return Fields::create($request->all());\n }", "public function copy()\n {\n return new Container($this);\n }", "public function __construct($fields = [])\n {\n\n parent::__construct($this->prepareFields($fields));\n }", "public function clearFields()\r\n {\r\n $this->fields = array();\r\n\r\n return $this;\r\n }", "public function __clone()\n {\n $keep_prefix = 'CLASS_';\n $keep_len = strlen($keep_prefix);\n $keep_prefix2 = 'CONF_';\n $keep_len2 = strlen($keep_prefix2);\n foreach ((array) get_object_vars($this) as $k => $v) {\n if (substr($k, 0, $keep_len) === $keep_prefix) {\n continue;\n }\n if (substr($k, 0, $keep_len2) === $keep_prefix2) {\n continue;\n }\n $this->$k = null;\n }\n }", "public function loadFields()\n\t{\n\t\t// Get only the fields from the class instance, not its descendants\n\t\t$getFields = create_function('$obj', 'return get_object_vars($obj);');\n\t\t$fields = $getFields($this);\n\n\t\t// Field defaults\n\t\t$defaults = array(\n\t\t\t'primary' => false,\n\t\t\t'relation' => false\n\t\t);\n\n\t\t// Go through and set up each field\n\t\tforeach ($fields as $name => $options)\n\t\t{\n\t\t\t// Merge the defaults\n\t\t\t$options = array_merge($defaults, $options);\n\n\t\t\t// Is this the primary field?\n\t\t\tif ($options['primary'] === true)\n\t\t\t{\n\t\t\t\t$this->primaryKeyField = $name;\n\t\t\t}\n\n\t\t\t// Is this a relation?\n\t\t\tif ($options['relation'] !== false)\n\t\t\t{\n\t\t\t\t$this->relations[$name] = $options;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->fields[$name] = array();\n\t\t}\n\t}", "public function addCategoryFields ($productId, array $fields)\n\t{\n\t\tforeach ($fields as $field => $value) {\n\t\t\tif (!isset($this->_categoryFields[$field])) {\n\t\t\t\t$this->_categoryFields[$field] = array();\n\t\t\t}\n\t\t\t$this->_categoryFields[$field][$productId] = $value;\n\t\t}\n\t\treturn $this;\n\t}", "public function addField($type) {\n\t\t$files = array('fields.xml', 'profiles/profile.xml', 'profile.xml');\n\n\t\t// init DomDocument with indentation\n\t\t$dom = new DOMDocument;\n\t\t$dom->preserveWhiteSpace = false;\n\t\t$dom->formatOutput = true;\n\n\t\t// loop through xmls files\n\t\tforeach ($files as $key => $file) {\n\n\t\t\t$this->file = $file;\n\n\t\t\t// load current file fields\n\t\t\t$dom->load($file);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\t$root = $dom->documentElement;\n\t\t\t$fields = $root->getElementsByTagName('field');\n\n\t\t\t// init some logic vars\n\t\t\t$count = $this->countFieldsOfThisType($type, $fields);\n\t\t\t$mustInsert = false;\n\t\t\t$multiCloning = false;\n\t\t\t$i = 0;\n\n\t\t\t// loop through all fields and add field if found\n\t\t\tforeach ($fields as $field) {\n\n\t\t\t\t// insertBefore part\n\t\t\t\tif ($mustInsert == true) {\n\t\t\t\t\t$path = $field->getNodePath();\n\t\t\t\t\t$node = $xpath->query($path)->item(0);\n\t\t\t\t\tforeach ($clones as $clone) {\n\t\t\t\t\t\t$node->parentNode->insertBefore($clone, $node);\n\t\t\t\t\t}\n\t\t\t\t\t$i = 0;\n\t\t\t\t\t$mustInsert = false;\n\t\t\t\t}\n\n\t\t\t\t// comparison & cloning part\n\t\t\t\t$fieldType = $this->getFieldType($field);\n\t\t\t\tif ($fieldType == $type || $multiCloning == true) {\n\t\t\t\t\t$fieldNum = $this->getFieldNum($field);\n\t\t\t\t\tif ($fieldNum == $count) {\n\t\t\t\t\t\tif ($field->getAttribute('class') == 'address') {\n\t\t\t\t\t\t\t$clones[$i] = $this->cloneField($field, $fieldNum, $fieldType);\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t$multiCloning = true;\n\t\t\t\t\t\t\tif ($i > 4) {\n\t\t\t\t\t\t\t\t$mustInsert = true;\n\t\t\t\t\t\t\t\t$multiCloning = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$clones[$i] = $this->cloneField($field, $fieldNum, $fieldType);\n\t\t\t\t\t\t\t$mustInsert = true;\n\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\t// save the xml file\n\t\t\t$dom->saveXML();\n\t\t\t$dom->save('fields.xml');\n\t\t}\n\n\t\t// get type to the right format\n\t\t$type = strtoupper($type);\n\t\tif ($type == 'WEBSITE') {\n\t\t\t$type = 'WEB_SITE';\n\t\t}\n\t\telse if ($type == 'FAVORITEBOOK') {\n\t\t\t$type = 'FAVORITE_BOOK';\n\t\t}\n\t\telse if ($type == 'ABOUTME') {\n\t\t\t$type = 'ABOUT_ME';\n\t\t}\n\n\t\t// $fd = fopend(JPATH_BASE.\"/administrator/language/en-GB/en-GB.plg_user_profile.ini\", \"r+\");\n\t\t$fd = fopen('C:\\\\Program Files (x86)\\\\EasyPHP-DevServer-14.1VC11\\\\data\\\\localweb\\\\projects\\\\administrator\\\\language\\\\en-GB\\\\en-GB.plg_user_profile.ini', 'r+');\n\t\tif ($fd) {\n\t\t\t// load the file\n\t\t\t$rowList = new SplDoublyLinkedList();\n\t\t\twhile (($row = fgets($fd)) !== false) {\n\t\t\t\t$rowList->push($row);\n\t\t }\n\n\t\t\t$rowList = $this->addInLang($type, $rowList);\n\n\t\t\trewind($fd);\n\t\t\tforeach ($rowList as $row) {\n\t\t\t\tif (fwrite($fd, $row) === false) {\n\t\t\t\t\techo \"fok\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t if (!feof($fd)) {\n\t\t echo \"Erreur: fgets() failed\\n\";\n \t\t}\n\t\t\tfclose($fd);\n\t\t}\n\t}", "protected function prepareFields($fields)\n {\n return collect($fields)->each(function($field) {\n if($field->isReadonly(app(NovaRequest::class))) {\n $field->withMeta(['readOnly' => true]);\n }\n if (!$field->showOnIndex) {\n $field->withMeta(['hideFromIndex' => true]);\n }\n if (!$field->showOnCreation) {\n $field->withMeta(['hideWhenCreating' => true]);\n }\n if (!$field->showOnUpdate) {\n $field->withMeta(['hideWhenUpdating' => true]);\n }\n if (!$field->showOnDetail) {\n $field->withMeta(['hideFromDetail' => true]);\n }\n });\n }", "function gotravel_mikado_add_repeater_field($attributes) {\n\t\t$name = '';\n\t\t$label = '';\n\t\t$description = '';\n\t\t$fields = array();\n\t\t$parent = '';\n\t\t$button_text = '';\n\n\t\textract($attributes);\n\n\t\tif(!empty($parent) && !empty($name)) {\n\t\t\t$field = new GoTravelMikadoRepeater($fields, $name, $label, $description, $button_text);\n\n\t\t\tif(is_object($parent)) {\n\t\t\t\t$parent->addChild($name, $field);\n\n\t\t\t\treturn $field;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function testDuplicate()\n {\n $this->duplicate(\n [\n 'imageModel' => $this->_imageModelCreateData(),\n 'tabModel' => $this->_tabModelCreateData(),\n 'fieldModel' => $this->_fieldModelCreateData(),\n 'descriptionTextModel'\n => $this->_descriptionTextModelCreateData(),\n 'designCatalogModel' => array_merge(\n $this->_designCatalogModelCreateData1(),\n $this->_designCatalogModelCreateData2()\n ),\n 'hasImages' => true,\n 'useAutoload' => true,\n 'pageNavigationSize' => 10,\n 'shortCardDateType' => 1,\n 'fullCardDateType' => 1,\n 'hasRelations' => true,\n 'relationsLabel' => 'Relations label',\n 'hasBin' => true,\n ],\n [\n 'imageModel' => $this->_imageModelExpectData(),\n 'tabModel' => $this->_tabModelExpectData(),\n 'descriptionTextModel'\n => $this->_descriptionTextModelExpectData(),\n 'designCatalogModel'\n => $this->_designCatalogModelExpectData(),\n 'hasImages' => true,\n 'useAutoload' => true,\n 'pageNavigationSize' => 10,\n 'shortCardDateType' => 1,\n 'fullCardDateType' => 1,\n 'hasRelations' => true,\n 'relationsLabel' => 'Relations label',\n 'hasBin' => true,\n ],\n null,\n [\n 'imageModel',\n 'tabModel',\n 'fieldModel',\n 'descriptionTextModel',\n 'designCatalogModel',\n ]\n );\n }", "protected function __fields() {\n $Fields = array_keys(get_object_vars($this));\n if (!empty ($this->__onlyFields)) {\n $Fields = $this->__onlyFields;\n }\n $NewFields = array();\n foreach ($Fields as $field) {\n if (in_array ($field, array ('__bound', '__Data', 'cleaned_data', 'label_suffix', 'required_suffix', 'is_editable', 'suppress_errors'))) continue;\n if (!is_object($this->$field)) continue;\n if (!empty ($this->disabled[$field])) continue;\n if (in_array ($field, $this->__Exclude)) continue;\n $NewFields[] = $field;\n }\n return $NewFields;\n }", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}" ]
[ "0.624753", "0.6145237", "0.61396486", "0.6005771", "0.58641756", "0.5862885", "0.58347183", "0.58033276", "0.5592819", "0.55850637", "0.5571071", "0.5549673", "0.5547072", "0.55413437", "0.5529647", "0.5510982", "0.54914224", "0.54812837", "0.5462868", "0.5448393", "0.54186267", "0.5391562", "0.5370341", "0.535891", "0.53399557", "0.52992404", "0.5283695", "0.52703166", "0.52664727", "0.5265554", "0.5259282", "0.5190635", "0.5167204", "0.51657736", "0.5084738", "0.5081177", "0.5070467", "0.5064666", "0.5064021", "0.505191", "0.503887", "0.50300413", "0.5026822", "0.50239766", "0.49952835", "0.4992524", "0.49875724", "0.4984941", "0.49840316", "0.4979452", "0.49754745", "0.49727002", "0.49660778", "0.4933786", "0.49181408", "0.48878747", "0.48840478", "0.48804194", "0.48624888", "0.4848733", "0.48476517", "0.4844934", "0.48437184", "0.48322007", "0.48316061", "0.4822889", "0.48203892", "0.48185325", "0.48082727", "0.4805758", "0.47974747", "0.4793502", "0.47914785", "0.47748846", "0.47637266", "0.47637266", "0.47636896", "0.47578672", "0.4755468", "0.47450086", "0.47386575", "0.47362953", "0.47344422", "0.47290447", "0.47231457", "0.4719474", "0.4716163", "0.46991888", "0.46940246", "0.46905017", "0.4688314", "0.4684983", "0.46828932", "0.4680042", "0.4674051", "0.46733138", "0.4670664", "0.46694115", "0.46694115", "0.46694115", "0.46694115" ]
0.0
-1
Get the metabox tab fields containers.
public function getContainers() { return $this->getTab( '_options_tab' )->getContainers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function metabox(){\n\t\tif ($this->options('use_metabox')){\n\t\t\treturn array(\n\t\t\t\t'id' => $this->options('name').'_metabox',\n\t\t\t\t'title' => __($this->options('singular_name').' Fields'),\n\t\t\t\t'page' => $this->options('name'),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}", "public function getMetaboxes()\n\t{\n\t\treturn $this->_metaboxes;\n\t}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Options Fields:\n \n $fields->addFieldsToTab(\n 'Root.Options',\n [\n FieldSection::create(\n 'GalleryOptions',\n $this->fieldLabel('Gallery'),\n [\n CheckboxField::create(\n 'ShowImageCounts',\n $this->fieldLabel('ShowImageCounts')\n )\n ]\n )\n ]\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Options Tab:\n \n $fields->findOrMakeTab('Root.Options', $this->fieldLabel('Options'));\n \n // Create Options Fields:\n \n $fields->addFieldsToTab(\n 'Root.Options',\n [\n FieldSection::create(\n 'PortfolioOptions',\n $this->fieldLabel('Portfolio'),\n [\n TextField::create(\n 'DetailsHeading',\n $this->fieldLabel('DetailsHeading')\n )\n ]\n )\n ]\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Main Fields:\n \n $fields->addFieldsToTab(\n 'Root.Main',\n [\n UploadField::create(\n 'Image',\n $this->fieldLabel('Image')\n )->setAllowedFileCategories('image')->setFolderName($this->getAssetFolder()),\n HTMLEditorField::create(\n 'Caption',\n $this->fieldLabel('Caption')\n )->setRows(10)\n ]\n );\n \n // Create Options Fields:\n \n $fields->addFieldToTab(\n 'Root.Options',\n CompositeField::create([\n CheckboxField::create(\n 'HideCaption',\n $this->fieldLabel('HideCaption')\n )\n ])->setName('ImageComponentOptions')->setTitle($this->i18n_singular_name())\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Remove Field Objects:\n \n $fields->removeFieldFromTab('Root.Main', 'Content');\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Main Fields:\n \n $fields->addFieldsToTab(\n 'Root.Main',\n [\n HTMLEditorField::create(\n 'HeaderContent',\n $this->fieldLabel('HeaderContent')\n )->setRows(10),\n HTMLEditorField::create(\n 'FooterContent',\n $this->fieldLabel('FooterContent')\n )->setRows(10)\n ]\n );\n \n // Insert Links Tab:\n \n $fields->insertAfter(\n Tab::create(\n 'Links',\n $this->fieldLabel('Links')\n ),\n 'Main'\n );\n \n // Add Links Fields:\n \n $fields->addFieldsToTab(\n 'Root.Links',\n [\n DropdownField::create(\n 'LinkMode',\n $this->fieldLabel('LinkMode'),\n $this->getLinkModeOptions()\n ),\n PageMultiselectField::create(\n 'LinkedPages',\n $this->fieldLabel('LinkedPages')\n )\n ]\n );\n \n // Create Options Fields:\n \n $fields->addFieldToTab(\n 'Root.Options',\n FieldSection::create(\n 'NavigationOptions',\n $this->fieldLabel('NavigationOptions'),\n [\n DropdownField::create(\n 'SortBy',\n $this->fieldLabel('SortBy'),\n $this->getSortByOptions()\n ),\n CheckboxField::create(\n 'ShowIcons',\n $this->fieldLabel('ShowIcons')\n )\n ]\n )\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Options Fields:\n \n $fields->addFieldsToTab(\n 'Root.Options',\n [\n FieldSection::create(\n 'FeedOptions',\n $this->fieldLabel('FeedOptions'),\n [\n ToggleGroup::create(\n 'FeedEnabled',\n $this->fieldLabel('FeedEnabled'),\n [\n TextField::create(\n 'FeedTitle',\n $this->fieldLabel('FeedTitle')\n ),\n TextField::create(\n 'FeedDescription',\n $this->fieldLabel('FeedDescription')\n ),\n NumericField::create(\n 'FeedNumberOfArticles',\n $this->fieldLabel('FeedNumberOfArticles')\n )\n ]\n )\n ]\n )\n ]\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Remove Field Objects:\n \n $fields->removeFieldsFromTab('Root.Main', ['Image', 'Caption', 'LinkTo']);\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Field Objects:\n \n if ($this->isInDB()) {\n \n // Create Main Fields:\n \n $fields->addFieldToTab(\n 'Root.Main',\n TextField::create(\n 'Title',\n $this->fieldLabel('Title')\n )\n );\n \n // Create Options Fields:\n \n $fields->addFieldToTab(\n 'Root.Options',\n CompositeField::create([\n CheckboxField::create(\n 'HideTitle',\n $this->fieldLabel('HideTitle')\n )\n ])->setName('TitleOptions')->setTitle($this->fieldLabel('TitleOptions'))\n );\n \n }\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Insert Image Tab:\n \n $fields->insertAfter(\n Tab::create(\n 'Image',\n $this->fieldLabel('Image')\n ),\n 'Main'\n );\n \n // Create Image Fields:\n \n $fields->addFieldsToTab(\n 'Root.Image',\n [\n FieldSection::create(\n 'LinkImage',\n $this->fieldLabel('LinkImage'),\n [\n $image = UploadField::create(\n 'LinkImage',\n $this->fieldLabel('LinkImageFile')\n ),\n ViewportsField::create(\n 'LinkImageWidth',\n $this->fieldLabel('LinkImageWidth')\n )->setUseTextInput(true),\n ViewportsField::create(\n 'LinkImageHeight',\n $this->fieldLabel('LinkImageHeight')\n )->setUseTextInput(true),\n CheckboxField::create(\n 'InlineVector',\n $this->fieldLabel('InlineVector')\n )\n ]\n )\n ]\n );\n \n // Define Image Field:\n \n $image->setAllowedExtensions(['gif', 'jpg', 'jpeg', 'png', 'svg']);\n $image->setFolderName($this->getAssetFolder());\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields() {\n\t\t$fields = parent::getCMSFields(); \n\t\t$fields->removeByName('FaqPageID');\n\t\t$fields->removeByName('FaqTags');\n\t\t$fields->removeByName('SortOrder');\n\t\t\n\t\t$fields->addFieldToTab('Root.Main', new TextField('Question', 'Question'));\t\t\n\t\t$fields->addFieldToTab('Root.Main', new HtmlEditorField('Answer', 'Answer'));\n\t\t\n\t\t// faq section - has_one relation\n\t\t$map = FaqSection::get()\n\t\t\t->sort('Title')\n\t\t\t->map('ID', 'Title');\n\t\t$field = new DropdownField('FaqSectionID', 'Faq section', $map);\n\t\t$field->setEmptyString('None');\n\t\t$fields->addFieldToTab('Root.Main', $field, 'Question');\n\t\t\n\t\t// faq tags - has_many relation\n\t\t$tagMap = FaqTag::get()\n\t\t\t->sort('Title')\n\t\t\t->map('ID', 'Title')\n\t\t\t->toArray();\n\t\t$tagsField = new ListboxField('FaqTags', 'Faq tags');\n\t\t$tagsField->setMultiple(true)->setSource($tagMap);\n\t\t$fields->addFieldToTab( 'Root.Main', $tagsField, 'Question' );\n\t\t\n\t\treturn $fields;\n\t}", "public function getFields()\r\n {\r\n $effects = [\r\n \"fadeInUp\"=>\"fadeInUp\",\r\n \"fadeInDown\"=>\"fadeInDown\",\r\n \"fadeInLeft\"=>\"fadeInLeft\",\r\n \"fadeInRight\"=>\"fadeInRight\",\r\n \"lightSpeedIn\"=>\"lightSpeedIn\",\r\n \"slideInUp\"=>\"slideInUp\",\r\n \"slideInDown\"=>\"slideInDown\",\r\n \"slideInLeft\"=>\"slideInLeft\",\r\n \"slideInRight\"=>\"slideInRight\",\r\n \"zoomIn\"=>\"zoomIn\"\r\n ];\r\n \r\n $fields = [\r\n [\r\n 'name' => 'basic_information',\r\n 'type' => 'group',\r\n 'visible' => 'ce',\r\n 'tabs' => [\r\n [\r\n 'name' => 'slide_information',\r\n 'type' => 'tab',\r\n 'visible' => 'ce',\r\n 'fields' => [\r\n [\r\n 'name' => 'id',\r\n 'type' => 'text',\r\n 'visible' => 'io',\r\n ],\r\n [\r\n 'name' => 'slider_id',\r\n 'display' => 'slider',\r\n 'type' => 'relation',\r\n 'relation' => ['slider', 'name'],\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'file',\r\n 'type' => 'image',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'caption_1',\r\n 'type' => 'text',\r\n 'visible' => 'ice',\r\n ],\r\n [\r\n 'name' => 'caption_2',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'caption_3',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'call_to_action_text',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'call_to_action_url',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'open_in_new_window',\r\n 'type' => 'select',\r\n 'data' => ['1' => trans('slider::panel.yes'), '0' => trans('slider::panel.no')],\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'position',\r\n 'type' => 'position',\r\n 'visible' => 'ce',\r\n ]\r\n\r\n ]\r\n ],\r\n [\r\n 'name' => 'options',\r\n 'type' => 'tab',\r\n 'visible' => 'ce',\r\n 'fields' => [\r\n [\r\n 'name' => 'options[caption_1][delay]',\r\n 'display' => 'caption_1_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_1][color]',\r\n 'display' => 'caption_1_color',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_1][effect]',\r\n 'display' => 'caption_1_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_2][delay]',\r\n 'display' => 'caption_2_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_2][color]',\r\n 'display' => 'caption_2_color',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_2][effect]',\r\n 'display' => 'caption_2_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_3][delay]',\r\n 'display' => 'caption_3_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_3][color]',\r\n 'display' => 'caption_3_color',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_3][effect]',\r\n 'display' => 'caption_3_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[call_to_action][delay]',\r\n 'display' => 'call_to_action_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[call_to_action][effect]',\r\n 'display' => 'call_to_action_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n ]\r\n ]\r\n ]\r\n ]\r\n ];\r\n return $fields;\r\n }", "public function getCMSFields(){\n\t\t\t$fields = parent::getCMSFields();\n\t\t\t$fields->addFieldToTab('Root.Images', new UploadField('Photo'));\n\n\t\t\treturn $fields;\n\t\t}", "public function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\n\t\t//$fields = $this->addCommonFields( $fields );\n\n\t\t$fields->removeFieldFromTab( 'Root.Main', 'Content' );\n\t\t$fields->addFieldToTab( 'Root.Main', new TextField( 'Title', 'Topic Name' ) );\n\t\t//$fields->addFieldToTab( 'Root.Main', new UploadField( 'CoverImage', 'Cover Image' ) );\n\t\t$gridFieldConfigEssayPages = GridFieldConfig_RelationEditor::create();\n\t\t$gridFieldConfigEssayPages->addComponent( new GridFieldSortableRows( 'PageNo' ) );\n\t\t$gridFieldConfigEssayPages->getComponentByType( GridFieldAddExistingAutocompleter::class )->setSearchFields( array( 'PageNo', 'Content' ) );\n\t\t$gridFieldConfigEssayPages->getComponentByType( GridFieldPaginator::class )->setItemsPerPage( 20 );\n\t\t$gridfield = new GridField( \"EssayPages\", \"Essay Pages\", $this->EssayPages(), $gridFieldConfigEssayPages );\n\t\t$fields->addFieldToTab( 'Root.Main', $gridfield );\n\n\t\t$fields->addFieldToTab( 'Root.Main', new TextField( 'Tags', 'Tags' ) );\n\n\t\treturn $fields;\n\n\t}", "function getCMSFields() {\n\t\t\n\t\t$f = new FieldList();\n\t\t\t\n\t\t\t$image_field = new UploadField('SlideImage', _t('Content.SLIDEIMAGE','Slide image'));\n\t\t\t$image_field->getValidator()->allowedExtensions = array('jpg', 'gif', 'png');\n\t\t\t$image_field->setFolderName('Uploads/sliderimages');\n\n\t\t// DropDown to select link from SiteTree\n\n\t\t\t$treedropdownfield = new TreeDropdownField('ButtonLinkLocID', 'Button link location', 'SiteTree');\n\n\t\t// Create Tabs\n\t\n\t\t$t = new TabSet(\n\t\t\t'Root',\n\t\t\tnew Tab(\n\t\t\t\t'Main',\n\t\t\t\tnew TextField(\"Heading\", _t('Content.HEADING','Heading of Slide')),\n\t\t\t\tnew TextField(\"Subtitle\", _t('Content.SUBTITLE','Subtitle of Slide')),\n\t\t\t\tnew HTMLEditorField(\"SlideContent\", _t('Content.CONTENT','HTML-content to slide')),\n\t\t\t\tnew TextField(\"ButtonText\", _t('Content.BUTTONTEXT','Button text')),\n\t\t\t\t$treedropdownfield,\n\t\t\t\tnew DropdownField('SlideTxtDisplay', _t('Content.SLIDETXTDISPLAY','Enable Texts over slide'),singleton('JumbotronSlideshowSlide')->dbObject('SlideTxtDisplay')->enumValues()),\n\t\t\t\tnew CheckboxField('Published', _t('Content.PUBLISHED','Is item published?'))\n\t\t\t),\n\t\t\tnew Tab(\n\t\t\t\t'Image',\n\t\t\t\t$image_field\n\t\t\t),\n\t\t\tnew Tab(\n\t\t\t\t'FX',\n\t\t\t\tnew DropdownField('SlideEffect', _t('Content.SLIDEEFFECT','SlideEffect'),singleton('JumbotronSlideshowSlide')->dbObject('SlideEffect')->enumValues())\n\t\t\t)\n\t\t\t\n\t\t);\n\t\t\n\t\t$f->push($t);\n\t\t\n\t\treturn $f;\n\t}", "public function form_fields() {\n\t\treturn apply_filters( \"appthemes_{$this->box_id}_metabox_fields\", $this->form() );\n\t}", "public function getCMSFields()\n {\n //declare var $fields\n $fields = parent::getCMSFields();\n //create Reviews Section GridField\n $fields->addFieldToTab('Root.Reviews', GridField::create(\n 'Reviews',\n 'Client Reviews',\n $this->Reviews(),\n GridFieldConfig_RecordEditor::create()\n ));\n\n return $fields;\n }", "public function getCMSFields()\n {\n // Create Field Tab Set:\n \n $fields = FieldList::create(TabSet::create('Root'));\n \n // Create Main Tab:\n \n $fields->findOrMakeTab('Root.Main', $this->fieldLabel('Main'));\n \n // Create Class Field:\n \n if (!$this->isInDB()) {\n \n // Define Placeholder:\n \n $placeholder = _t(__CLASS__ . '.SELECTTYPETOCREATE', '(Select type to create)');\n \n // Create Dropdown Field:\n \n $classField = DropdownField::create(\n 'ClassName',\n $this->fieldLabel('ClassName'),\n $this->getClassNameOptions()\n )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder);\n \n } else {\n \n // Create Read-Only Field:\n \n $classField = ReadonlyField::create(\n 'Type',\n $this->fieldLabel('Type')\n );\n \n }\n \n // Add Class Field to Main Tab:\n \n $fields->addFieldToTab('Root.Main', $classField);\n \n // Apply Extensions:\n \n if ($this->isInDB()) {\n \n // Extend Field Objects:\n \n $this->extend('updateCMSFields', $fields);\n \n }\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getBoxes()\n\t{\n\t\t$boxes = array();\n\t\tforeach($this->getData() as $data){\n\t\t\tif($this->idAllowed($data['id'])){\n\t\t\t\t$boxes[] = array(\n\t\t\t\t\t'class' => sprintf('Webwijs\\Admin\\Metabox\\%s', $data['type']), \n\t\t\t\t\t'settings' => array('id' => $this->getMetaboxId($data['id']), 'title' => $data['title'])\n\t\t\t\t);\t\n\t\t\t}\n\t\t};\n\t\treturn $boxes;\n\t}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Main Fields:\n \n $fields->addFieldsToTab(\n 'Root.Main',\n [\n FieldSection::create(\n 'EmailSection',\n $this->fieldLabel('Email'),\n [\n TextField::create(\n 'EmailSubject',\n $this->fieldLabel('EmailSubject')\n )->setRightTitle(\n _t(\n __CLASS__ . '.EMAILSUBJECTRIGHTTITLE',\n 'Uses the title of the current page if blank.'\n )\n ),\n TextField::create(\n 'EmailMessage',\n $this->fieldLabel('EmailMessage')\n )->setRightTitle(\n _t(\n __CLASS__ . '.EMAILMESSAGERIGHTTITLE',\n 'Included in the body of the email before the shared link.'\n )\n )\n ]\n )\n ]\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields() {\n\n\t\t// $fields = new FieldList(\n\t\t// $rootTab = new TabSet('Root',\n\t\t// $tabMain = new Tab('Region',\n\t\t// TextField::create('Code', _t('Region.CODE', 'Code')),\n\t\t// TextField::create('Title', _t('Region.TITLE', 'Title')),\n\t\t// DropdownField::create('CountryID', 'Country', Country_Shipping::get()->map()->toArray())\n\t\t// )\n\t\t// )\n\t\t// );\n\t\t// return $fields;\n\n\t\t$fields = parent::getCMSFields();\n\t\t$fields->replaceField('CountryID', DropdownField::create('CountryID', 'Country', Country_Shipping::get()->map()->toArray()));\n\t\t$fields->removeByName('SortOrder');\n\t\t$fields->removeByName('ShopConfigID');\n\t\treturn $fields;\n\t}", "public function children() {\n\t\treturn $this->fieldset_children;\n\t}", "public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n\n $fields->addFIeldTOTab('Root.Main',new TextField('Title','Image Title'));\n $fields->addFIeldTOTab('Root.Main',new TextareaField('Description','Photo Description (Max 500 Charachters)'));\n $fields->addFIeldTOTab('Root.Main',new UploadField('Image','Photo'));\n\n return $fields;\n }", "public function meta_box_form_items() {\n\t\t$vfb_post = '';\n\t\t// Run Create Post add-on\n\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) )\n\t\t\t$vfb_post = new VFB_Pro_Create_Post();\n\t?>\n\t\t<div class=\"taxonomydiv\">\n\t\t\t<p><strong><?php _e( 'Click or Drag' , 'visual-form-builder-pro'); ?></strong> <?php _e( 'to Add a Field' , 'visual-form-builder-pro'); ?> <img id=\"add-to-form\" alt=\"\" src=\"<?php echo admin_url( '/images/wpspin_light.gif' ); ?>\" class=\"waiting spinner\" /></p>\n\t\t\t<ul class=\"posttype-tabs add-menu-item-tabs\" id=\"vfb-field-tabs\">\n\t\t\t\t<li class=\"tabs\"><a href=\"#standard-fields\" class=\"nav-tab-link vfb-field-types\"><?php _e( 'Standard' , 'visual-form-builder-pro'); ?></a></li>\n\t\t\t\t<li><a href=\"#advanced-fields\" class=\"nav-tab-link vfb-field-types\"><?php _e( 'Advanced' , 'visual-form-builder-pro'); ?></a></li>\n\t\t\t\t<?php\n\t\t\t\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) && method_exists( $vfb_post, 'form_item_tab' ) )\n\t\t\t\t\t\t$vfb_post->form_item_tab();\n\t\t\t\t?>\n\t\t\t</ul>\n\t\t\t<div id=\"standard-fields\" class=\"tabs-panel tabs-panel-active\">\n\t\t\t\t<ul class=\"vfb-fields-col-1\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-fieldset\">Fieldset</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-text\"><b></b>Text</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-checkbox\"><b></b>Checkbox</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-select\"><b></b>Select</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-datepicker\"><b></b>Date</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-url\"><b></b>URL</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-digits\"><b></b>Number</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-phone\"><b></b>Phone</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-file\"><b></b>File Upload</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class=\"vfb-fields-col-2\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-section\">Section</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-textarea\"><b></b>Textarea</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-radio\"><b></b>Radio</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-address\"><b></b>Address</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-email\"><b></b>Email</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-currency\"><b></b>Currency</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-time\"><b></b>Time</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-html\"><b></b>HTML</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-instructions\"><b></b>Instructions</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div> <!-- #standard-fields -->\n\t\t\t<div id=\"advanced-fields\"class=\"tabs-panel tabs-panel-inactive\">\n\t\t\t\t<ul class=\"vfb-fields-col-1\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-username\"><b></b>Username</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-hidden\"><b></b>Hidden</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-autocomplete\"><b></b>Autocomplete</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-min\"><b></b>Min</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-range\"><b></b>Range</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-name\"><b></b>Name</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-likert\"><b></b>Likert</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class=\"vfb-fields-col-2\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-password\"><b></b>Password</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-color\"><b></b>Color Picker</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-ip\"><b></b>IP Address</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-max\"><b></b>Max</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-pagebreak\"><b></b>Page Break</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-rating\"><b></b>Rating</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div> <!-- #advanced-fields -->\n\t\t\t<?php\n\t\t\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) && method_exists( $vfb_post, 'form_items' ) )\n\t\t\t\t\t$vfb_post->form_items();\n\t\t\t?>\n\t\t</div> <!-- .taxonomydiv -->\n\t\t<div class=\"clear\"></div>\n\t<?php\n\t}", "public function getCMSFields()\n {\n $fields = parent::getCMSFields();\n $fields->replaceField('Country', new DropdownField('Country', 'based on a sale to ', EcommerceCountry::get_country_dropdown()));\n $fields->replaceField('Root.Main', new DropdownField('TaxType', 'Tax Type', singleton($this->ClassName)->dbObject('TaxType')->enumValues()));\n\n $fields->removeByName('DefaultCountry');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DefaultCountryShown', 'Prices are based on sale to', $this->DefaultCountry));\n\n $fields->removeByName('DefaultRate');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DefaultRateShown', 'Default rate', $this->DefaultRate));\n\n $fields->removeByName('CurrentRate');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('CurrentRateShown', 'Rate for current order', $this->CurrentRate));\n\n $fields->removeByName('RawTableValue');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('RawTableValueShown', 'Raw table value', $this->RawTableValue));\n\n $fields->removeByName('DebugString');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DebugStringShown', 'Debug String', $this->DebugString));\n\n return $fields;\n }", "public function getFieldsets()\n {\n return $this->fieldsets;\n }", "public function fields() {\n\t\tif( !$this->fields ) {\n\t\t\t$this->fields = new Form/Fields( $this->id );\n\t\t}//end if\n\t\treturn $this->fields;\n\t}", "public function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\n\t\t// define tabs\n\t\t$fields->findOrMakeTab('Root.Content.Form', _t('UserDefinedForm.FORM', 'Form'));\n\t\t$fields->findOrMakeTab('Root.Content.EmailRecipients', _t('UserDefinedForm.EMAILRECIPIENTS', 'Email Recipients'));\n\t\t$fields->findOrMakeTab('Root.Content.OnComplete', _t('UserDefinedForm.ONCOMPLETE', 'On Complete'));\n\t\t$fields->findOrMakeTab('Root.Content.Submissions', _t('UserDefinedForm.SUBMISSIONS', 'Submissions'));\n\t\t\n\t\t// field editor\n\t\t$fields->addFieldToTab(\"Root.Content.Form\", new FieldEditor(\"Fields\", 'Fields', \"\", $this ));\n\t\t\n\t\t// view the submissions\n\t\t$fields->addFieldToTab(\"Root.Content.Submissions\", new CheckboxField('DisableSaveSubmissions',_t('UserDefinedForm.SAVESUBMISSIONS',\"Disable Saving Submissions to Server\")));\n\t\t$fields->addFieldToTab(\"Root.Content.Submissions\", new SubmittedFormReportField( \"Reports\", _t('UserDefinedForm.RECEIVED', 'Received Submissions'), \"\", $this ) );\n\n\t\t// who do we email on submission\n\t\t$emailRecipients = new ComplexTableField(\n\t\t\t$this,\n\t \t'EmailRecipients',\n\t \t'UserDefinedForm_EmailRecipient',\n\t \tarray(\n\t\t\t\t'EmailAddress' => _t('UserDefinedForm.EMAILADDRESS', 'Email'),\n\t\t\t\t'EmailSubject' => _t('UserDefinedForm.EMAILSUBJECT', 'Subject'),\n\t\t\t\t'EmailFrom' => _t('UserDefinedForm.EMAILFROM', 'From')\n\t \t),\n\t \t'getCMSFields_forPopup',\n\t\t\t\"\\\"FormID\\\" = '$this->ID'\"\n\t\t);\n\t\t$emailRecipients->setAddTitle(_t('UserDefinedForm.AEMAILRECIPIENT', 'A Email Recipient'));\n\t\t\n\t\t$fields->addFieldToTab(\"Root.Content.EmailRecipients\", $emailRecipients);\n\t\n\t\t// text to show on complete\n\t\t$onCompleteFieldSet = new FieldSet(\n\t\t\tnew HtmlEditorField( \"OnCompleteMessage\", _t('UserDefinedForm.ONCOMPLETELABEL', 'Show on completion'),3,\"\",_t('UserDefinedForm.ONCOMPLETEMESSAGE', $this->OnCompleteMessage), $this )\n\t\t);\n\t\t\n\t\t$fields->addFieldsToTab(\"Root.Content.OnComplete\", $onCompleteFieldSet);\n\t\t\n\t\treturn $fields;\n\t}", "protected function _getFields()\n {\n return array(\n 'xf_tab_name' => array(\n 'tab_name_id' => array(\n 'type' => self::TYPE_UINT,\n 'autoIncrement' => true\n ), /* END 'tab_name_id' */\n 'display_order' => array(\n 'type' => self::TYPE_UINT,\n 'default' => 0\n ), /* END 'display_order' */\n )\n );\n }", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "public function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\t\t$fields->addFieldToTab(\"Root.Content.PageRatingWidget\", new WidgetAreaEditor( 'PageRatingWidget' ) );\n\t\t\n\t\treturn $fields;\n\t}", "public function getCMSFields()\n {\n // Create Field Tab Set:\n \n $fields = FieldList::create(TabSet::create('Root'));\n \n // Create Main Fields:\n \n $fields->addFieldsToTab(\n 'Root.Main',\n [\n TextField::create(\n 'Name',\n $this->fieldLabel('Name')\n ),\n FieldGroup::create(\n $this->fieldLabel('SendTo'),\n [\n TextField::create(\n 'NameTo',\n $this->fieldLabel('NameTo')\n )->setAttribute('size', 30),\n EmailField::create(\n 'EmailTo',\n $this->fieldLabel('EmailTo')\n )->setAttribute('size', 40)\n ]\n ),\n FieldGroup::create(\n $this->fieldLabel('SendFrom'),\n [\n TextField::create(\n 'NameFrom',\n $this->fieldLabel('NameFrom')\n )->setAttribute('size', 30),\n EmailField::create(\n 'EmailFrom',\n $this->fieldLabel('EmailFrom')\n )->setAttribute('size', 40)\n ]\n ),\n TextField::create(\n 'EmailSubject',\n $this->fieldLabel('EmailSubject')\n ),\n TextField::create(\n 'OnSendMessage',\n $this->fieldLabel('OnSendMessage')\n )->setRightTitle(\n _t(\n __CLASS__ . '.ONSENDMESSAGERIGHTTITLE',\n 'Shown to the user after sending a message.'\n )\n ),\n CheckboxField::create(\n 'Disabled',\n $this->fieldLabel('Disabled')\n )\n ]\n );\n \n // Extend Field Objects:\n \n $this->extend('updateCMSFields', $fields);\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function get_fieldset() {\n\t\treturn $this->fieldset;\n\t}", "public function getControlFields()\n {\n $fields = array();\n $query = 'response > record > marcRecord > controlfield';\n $controlFields = $this->domCrawler->filter($query)->each(function(Crawler $node) {\n return new ControlField($node);\n });\n\n\n return $controlFields;\n }", "public function get_fields() {\n\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'type' => 'tab',\n\t\t\t\t'name' => __( 'Dribbble', 'publisher' ),\n\t\t\t\t'id' => 'dribbble',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Dribbble ID', 'publisher' ),\n\t\t\t\t'id' => 'user_id',\n\t\t\t\t'type' => 'text',\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Access Token', 'publisher' ),\n\t\t\t\t'id' => 'access_token',\n\t\t\t\t'type' => 'text',\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Number of Shots', 'publisher' ),\n\t\t\t\t'id' => 'photo_count',\n\t\t\t\t'type' => 'text',\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Columns', 'publisher' ),\n\t\t\t\t'id' => 'style',\n\t\t\t\t//\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t2 => __( '2 Column', 'publisher' ),\n\t\t\t\t\t3 => __( '3 Column', 'publisher' ),\n\t\t\t\t\t'slider' => __( 'Slider', 'publisher' ),\n\t\t\t\t),\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t),\n\t\t);\n\n\t\t/**\n\t\t * Retrieve heading fields from outside (our themes are defining them)\n\t\t */\n\t\t{\n\t\t\t$heading_fields = apply_filters( 'better-framework/shortcodes/heading-fields', array(), $this->id );\n\n\t\t\tif ( $heading_fields ) {\n\t\t\t\t$fields = array_merge( $fields, $heading_fields );\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Retrieve design fields from outside (our themes are defining them)\n\t\t */\n\t\t{\n\t\t\t$design_fields = apply_filters( 'better-framework/shortcodes/design-fields', array(), $this->id );\n\n\t\t\tif ( $design_fields ) {\n\t\t\t\t$fields = array_merge( $fields, $design_fields );\n\t\t\t}\n\t\t}\n\n\t\tbf_array_insert_after(\n\t\t\t'bs-show-phone',\n\t\t\t$fields,\n\t\t\t'bs-text-color-scheme',\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Block Text Color Scheme', 'publisher' ),\n\t\t\t\t'id' => 'bs-text-color-scheme',\n\t\t\t\t//\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'' => __( '-- Default --', 'publisher' ),\n\t\t\t\t\t'light' => __( 'White Color Texts', 'publisher' ),\n\t\t\t\t),\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t)\n\t\t);\n\n\t\treturn $fields;\n\t}", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "function thd_re_meta_box_fields() {\n\t$prefix = 're_';\n\n\t$fields = array(\n\t\tarray(\n\t\t\t'label'\t=> 'Title',\n\t\t\t'desc'\t=> '',\n\t\t\t'id'\t\t=> $prefix.'title',\n\t\t\t'type'\t=> 'text'\n\t\t)\n\t);\n\n\treturn $fields;\n}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Add Status Message (if exists):\n \n $fields->addStatusMessage($this->getSiteConfig()->getGoogleStatusMessage());\n \n // Create Main Fields:\n \n $fields->addFieldsToTab(\n 'Root.Main',\n [\n FieldSection::create(\n 'Coordinates',\n $this->fieldLabel('Coordinates'),\n [\n TextField::create(\n 'Latitude',\n $this->fieldLabel('Latitude')\n ),\n TextField::create(\n 'Longitude',\n $this->fieldLabel('Longitude')\n )\n ]\n ),\n ToggleGroup::create(\n 'ShowMarker',\n $this->fieldLabel('ShowMarker'),\n [\n TextField::create(\n 'MarkerTitle',\n $this->fieldLabel('MarkerTitle')\n )->setRightTitle(\n _t(\n __CLASS__ . '.MARKERTITLERIGHTTITLE',\n 'If empty, the marker will use the component title.'\n )\n ),\n TextField::create(\n 'MarkerLabel',\n $this->fieldLabel('MarkerLabel')\n ),\n HTMLEditorField::create(\n 'MarkerContent',\n $this->fieldLabel('MarkerContent')\n )->setRows(12),\n CheckboxField::create(\n 'HideMarkerContent',\n $this->fieldLabel('HideMarkerContent')\n )\n ]\n )\n ]\n );\n \n // Insert Markers Tab:\n \n $fields->insertAfter(\n Tab::create(\n 'Markers',\n $this->fieldLabel('Markers')\n ),\n 'Main'\n );\n \n // Create Markers Field:\n \n $fields->addFieldsToTab(\n 'Root.Markers',\n [\n GridField::create(\n 'Markers',\n $this->fieldLabel('Markers'),\n $this->Markers(),\n $config = GridFieldConfig_RecordEditor::create()\n )\n ]\n );\n \n // Create Style Fields:\n \n $fields->addFieldToTab(\n 'Root.Style',\n FieldSection::create(\n 'MapStyle',\n $this->fieldLabel('MapStyle'),\n [\n DropdownField::create(\n 'HeightMode',\n $this->fieldLabel('HeightMode'),\n $this->getHeightModeOptions()\n ),\n TextField::create(\n 'HeightManual',\n $this->fieldLabel('HeightManual')\n )\n ]\n )\n );\n \n // Create Options Fields:\n \n $fields->addFieldToTab(\n 'Root.Options',\n FieldSection::create(\n 'MapOptions',\n $this->fieldLabel('MapOptions'),\n [\n DropdownField::create(\n 'MapType',\n $this->fieldLabel('MapType'),\n $this->getMapTypeOptions()\n ),\n DropdownField::create(\n 'Zoom',\n $this->fieldLabel('Zoom'),\n $this->getZoomOptions()\n )\n ]\n )\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "function wc_testimonial_fields_boxes() {\r\n\t \r\n\t /**\r\n\t * Create a custom meta boxes array that we pass to \r\n\t * the OptionTree Meta Box API Class.\r\n\t */\r\n\t \r\n\t\t$testimonial_fields_array = array(\r\n\t\t\t'id' => 'wc_testimonial_settings',\r\n\t\t\t'title' => esc_html__('Testimonials Detail', 'eyecare' ),\r\n\t\t\t'desc' => '',\r\n\t\t\t'pages' => array(esc_html__('testimonial', 'eyecare')),\r\n\t\t\t'context' => 'normal',\r\n\t\t\t'priority' => 'high',\r\n\t\t\t'fields' => array(\r\n\t\t\t\t array(\r\n\t\t\t\t\t'label' => esc_html__('Testimonial By', 'eyecare' ),\r\n\t\t\t\t\t'id' => 'wc_testimonial_by',\r\n\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t'desc' => esc_html__( 'Name of Client who wrote this Testimonial', 'eyecare' ),\r\n\t\t\t\t\t'std' => ''\r\n\t\t\t\t ),\r\n\t\t\t\t array(\r\n\t\t\t\t\t'label' => esc_html__('Testimonial Detail', 'eyecare' ),\r\n\t\t\t\t\t'id' => 'wc_testimonial_detail',\r\n\t\t\t\t\t'type' => 'textarea',\r\n\t\t\t\t\t'desc' => esc_html__( 'Text of Testimonial', 'eyecare' ),\r\n\t\t\t\t\t'std' => ''\r\n\t\t\t\t )\r\n\t\t)\r\n\t );\r\n \r\n\t/**\r\n\t * Register our meta boxes using the \r\n\t * ot_register_meta_box() function.\r\n\t * if plugin is installed\r\n\t */\r\n\tif ( function_exists( 'ot_register_meta_box' ) )\r\n\t\tot_register_meta_box($testimonial_fields_array);\r\n\t}", "public function getFieldSet() {\n\t\treturn $this->fieldset;\n\t}", "protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}", "function df_meta_boxes( ) {\n\t\tglobal $post, $df_box_objects;\n\t\tforeach( $df_box_objects as $df_box ) {\n\t\t\t\n\t\t\t//Get current post type. If is a revision - get parent post type.\n\t\t\t$post_type = get_post_type( $post->ID );\n\t\t\tif( $post_type == 'revision' ) {\n\t\t\t\tglobal $post;\n\t\t\t\t$post_type = get_post_type( $post->post_parent );\n\t\t\t}\t\t\n\t\t\t\n\t\t\tif( in_array( $post_type, $df_box->post_types ) ) :\n\t\t\t\tforeach( $df_box->post_types as $post_type ) {\n\t\t\t\t\tadd_meta_box( $df_box->id . \"_box\", $df_box->title, 'df_meta_fields', $post_type, 'side', 'low', $df_box );\n\t\t\t\t}\n\t\t\tendif;\n\t\t}\n\t}", "public function getMyTabs() {\n $aMyTabsByForm = [];\n\n # Build Query to get User Based Columns\n $oTabsSel = new Select(CoreEntityModel::$aEntityTables['user-form-tabs']->getTable());\n $oTabsSel->join(['core_tab'=>'core_form_tab'],'core_tab.Tab_ID = user_form_tab.tab_idfs');\n $oTabsSel->where(['user_idfs'=>$this->getID()]);\n\n # Get My Tabs from Database\n $oMyTabsDB = CoreEntityModel::$aEntityTables['user-form-tabs']->selectWith($oTabsSel);\n\n foreach($oMyTabsDB as $oTab) {\n # Order By Form\n if(!array_key_exists($oTab->form,$aMyTabsByForm)) {\n $aMyTabsByForm[$oTab->form] = [];\n }\n $aMyTabsByForm[$oTab->form][$oTab->Tab_ID] = $oTab;\n }\n\n return $aMyTabsByForm;\n }", "public function metaFields()\n {\n $metaFields = [];\n foreach ($this->metaFieldDefinitions() as $fieldData) {\n $metaFields[] = Field::createFromData($fieldData);\n }\n return $metaFields;\n }", "public function getCMSFields()\n {\n $fields = parent::getCMSFields();\n\n // Hide those fields because those values are not useful for standard users.\n $fields->removeByName('Location');\n $fields->removeByName('Region');\n $fields->removeByName('Bucket');\n $fields->removeByName('Key');\n $fields->removeByName('ETag');\n $fields->removeByName('Size');\n\n // Add a human friendly readonly size field\n $fields->addFieldToTab('Root.Main',\n ReadonlyField::create('FakeSize', 'Size', $this->SizeForHuman));\n\n // Display a few usefull bits of data in readonly mod.\n $fields->addFieldToTab('Root.Main',\n ReadonlyField::create('Type', 'Type'));\n $fields->addFieldToTab('Root.Main',\n DatetimeField_Readonly::create('LastModified', 'Last Modified'));\n\n\n return $fields;\n }", "private function getSectionSettingFields(){\n\t\t\t\n\t\t\t$fields = array(\n\n\t\t\t\tField::text(\n\t\t\t\t\t'name',\n\t\t\t\t\t__( 'Template name', 'chefsections' )\n\t\t\t\t),\n\n\t\t\t\tField::text( \n\t\t\t\t\t'classes',\n\t\t\t\t\t__( 'CSS Classes', 'chefsections' ),\n\t\t\t\t\tarray( \n\t\t\t\t\t\t'placeholder' => __( 'Seperate with commas\\'s', 'chefsections' ),\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t\tField::checkbox(\n\t\t\t\t\t'hide_container',\n\t\t\t\t\t__( 'Hide Container', 'chefsections' )\n\t\t\t\t),\n\n\t\t\t);\n\n\t\t\t$fields = apply_filters( 'chef_sections_setting_fields', $fields, $this );\n\n\t\t\treturn $fields;\n\t\t}", "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n //google map module\n $location = new Location();\n $googlemapfield = new GoogleMapField($location, \"Google Map Field\");\n $Latitude = new ReadonlyField('Latitude', 'Latitude', $googlemapfield->getDefaultValue('Latitude'));\n $Longitude = new ReadonlyField('Longitude', 'Longitude', $googlemapfield->getDefaultValue('Longitude'));\n $fields->addFieldToTab('Root.Map', $googlemapfield);\n $fields->addFieldToTab('Root.Map', $Latitude);\n $fields->addFieldToTab('Root.Map', $Longitude);\n\n return $fields;\n }", "public function tab_containers()\n\t{\n\t\t$html = '';\n\t\t$tabs = $this->tabs;\n\n\t\tforeach($tabs as $tab)\n\t\t{\n\t\t\tif(isset($tab['render']))\n\t\t\t{\n\t\t\t\t$tpl = $tab['render']();\n\t\t\t\tif(is_object($tpl))\n\t\t\t\t{\n\t\t\t\t\t$renderer = Kostache_Layout::factory();\n\t\t\t\t\t$renderer->set_layout('admin/user/tab');\n\t\t\t\t\t$tpl->id = $tab['id'];\n\n\t\t\t\t\tif(!isset($tpl->title))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tpl->title = $tab['title'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$html .= $renderer->render($tpl);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= $tpl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "function get_forms()\n {\n $forms = array();\n $form_manager = C_Form_Manager::get_instance();\n foreach ($form_manager->get_forms($this->object->get_form_type()) as $form) {\n $forms[] = $this->get_registry()->get_utility('I_Form', $form);\n }\n return $forms;\n }", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "public function getCMSFields()\n {\n if (isset($_REQUEST[\"sc\"]) && !self::$called) {\n // just create an instance and return getCMSFields on that\n $subclass = $_REQUEST[\"sc\"];\n $inst = new $subclass;\n\n // prevent handling this case again.\n self::$called = true;\n\n // Get the fields from the subclass. It will in turn self::getCMSFields, but that one will return the actual\n // fields of this class.\n return $inst->getCMSFields();\n }\n\n $fields = parent::getCMSFields();\n\n $fields->removeByName(\"ParentID\");\n\n if ($helperText = $this->helperText()) {\n $helperText = \" - \" . $helperText;\n }\n\n if (isset($_REQUEST[\"sc\"])) {\n $subclass = $_REQUEST[\"sc\"];\n if (ClassInfo::exists($subclass)) {\n $className = preg_replace('/(?!^)[[:upper:]]+/', ' \\0', $subclass);\n $fields->addFieldToTab(\"Root.Main\", new HiddenField(\"SubClass\", \"SubClass\", $subclass));\n if (isset($_REQUEST[\"id\"])) {\n $fields->addFieldToTab(\"Root.Main\", new HiddenField(\"ParentID\", \"ParentID\", $_REQUEST[\"id\"]));\n }\n $fields->addFieldToTab(\"Root.Main\", new ReadonlyField(\"Class\", \"Variation Type\", $className . $helperText), \"Name\");\n }\n } else {\n $className = preg_replace('/(?!^)[[:upper:]]+/', ' \\0', $this->ClassName);\n $fields->addFieldToTab(\"Root.Main\", new ReadonlyField(\"Class\", \"Variation Type\", $className . $helperText), \"Name\");\n }\n\n return $fields;\n }", "static function metabox($post){\n\t\twp_nonce_field( 'flat-options', 'flat-options_nonce' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\techo '<style>';\n\t\techo '.admin-meta-input{display:block; margin-top: 10px;}';\n\t\techo 'div.field-holder{display: block;float: left; margin: 10px 20px; height: 80px;}';\n\t\techo '.field-block{display: inline-block;clear: both;float: none;}';\n\t\techo '.postbox .inside .field-block h2{padding: 8px 12px;font-weight: 600;font-size: 18px;margin: 0;line-height: 1.4}';\n\t\techo '</style>';\n\t\t\t\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Licitálással kapcsolatos adatok</h2>';\n\t\tforeach ($fieldblocks['licit'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Hely adatok</h2>';\n\t\tforeach ($fieldblocks['location'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlan adatok és településrendezési előírások</h2>';\n\t\tforeach ($fieldblocks['parameters'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlanjogi jellemzők</h2>';\n\t\tforeach ($fieldblocks['info'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Közművek, energiaellátás, telekommunikáció</h2>';\n\t\tforeach ($fieldblocks['sources'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\n\t\t\t\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Építmény (épület) jellemzői</h2>';\n\t\tforeach ($fieldblocks['building'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\techo \"\n\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('.datepicker').datepicker();\t\n\t\t\t\t});\t\n\t\t\t</script>\t\n\t\t\";\n\t\t\n\t\techo '<br clear=\"all\">';\n\t\t\n }", "private function initializeMetabox()\n {\n\n $this->_metabox = new \\RWC\\Metabox( $this->get_library(), array(\n 'renderer' => 'vertical-tabs',\n 'id' => 'rwc-fundraiser-metabox',\n 'title' => 'Fundraiser Options',\n 'post_types' => array( self::POST_TYPE ),\n 'sections' => array(\n array(\n 'id' => 'payment',\n 'name' => 'Payment'\n ),\n array(\n 'id' => 'customer',\n 'name' => 'Customer Details'\n ),\n array(\n 'id' => 'dates',\n 'name' => 'Open/Close Dates'\n ),\n array(\n 'id' => 'products',\n 'name' => 'Products'\n )\n ),\n 'fields' => array(\n\n 'customer-name' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Customer Name'\n ),\n\n 'customer-business' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Business Name'\n ),\n\n 'address1' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Address 1'\n ),\n\n 'address2' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Address 2'\n ),\n\n 'city' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'City'\n ),\n\n 'state' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'State'\n ),\n\n 'zipcode' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Zipcode'\n ),\n\n 'paypal-api-username' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Username',\n 'description' => 'The email address associated with ' .\n 'the PayPal account that should receive payment ' .\n 'for this fundraiser.'\n ),\n 'paypal-api-key' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Key',\n 'description' => 'The account\\'s PayPal API password.'\n ),\n 'paypal-api-signature' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Signature',\n 'description' => 'The account\\'s PayPal API signature.'\n ),\n\n 'start-date' => array(\n 'type' => 'date',\n 'section' => 'dates',\n 'name' => 'Start Date',\n ),\n\n 'end-date' => array(\n 'type' => 'date',\n 'section' => 'dates',\n 'name' => 'End Date',\n ),\n\n 'products' => array(\n 'type' => 'fundraiser-products',\n 'section' => 'products',\n 'name' => 'Product Setup'\n )\n )\n ));\n }", "public function getFieldSets() {\n\t\treturn $this->fieldsets;\n\t}", "public function getFields()\n {\n return $this->getForm()->getFields();\n }", "function wpf_load_post_type_metaboxes() {\n\tglobal $wpf_classes;\n\n\t$metabox_class = wpf_get_class( 'metaboxes' );\n\n\treturn $wpf_classes['metaboxes'] = new $metabox_class();\n}", "public function getMyTabs()\n {\n $aMyTabsByForm = [];\n\n # Build Query to get User Based Columns\n $oTabsSel = new Select(CoreEntityModel::$aEntityTables['user-form-tabs']->getTable());\n $oTabsSel->join(['core_tab' => 'core_form_tab'], 'core_tab.Tab_ID = user_form_tab.tab_idfs');\n $oTabsSel->where(['user_idfs' => $this->getID()]);\n\n # Get My Tabs from Database\n $oMyTabsDB = CoreEntityModel::$aEntityTables['user-form-tabs']->selectWith($oTabsSel);\n\n foreach ($oMyTabsDB as $oTab) {\n # Order By Form\n if (! array_key_exists($oTab->form, $aMyTabsByForm)) {\n $aMyTabsByForm[$oTab->form] = [];\n }\n $aMyTabsByForm[$oTab->form][$oTab->Tab_ID] = $oTab;\n }\n\n return $aMyTabsByForm;\n }", "public function fields(): array\n {\n return MyField::withSlug('name', MyField::withMeta([\n MyField::relation('categories')\n ->fromModel(ProductCategory::class, 'name')\n ->multiple(),\n MyField::uploadMedia(),\n MyField::input('price')\n ->step(0.001)\n ->required(),\n MyField::input('discount')\n ->step(0.001)\n ->required(),\n MyField::quill('body'),\n MyField::switcher('is_active')\n ->value(true)\n ]));\n }", "public function get_metabox()\n {\n return $this->_metabox;\n }", "public function get_metabox() {\n\n return $this->_metabox;\n }", "public function get_tabs() {\n return $this->_tabs;\n }", "public function getTabs()\n {\n // so we need to set current handler object for rendering. \n $tabs = static::$tabs;\n foreach ($tabs as $tab) {\n $tab->setHandler($this);\n }\n return $tabs;\n }", "public function Fields()\n {\n foreach ($this->getExtraFields() as $field) {\n if (!$this->fields->fieldByName($field->getName())) {\n $this->fields->push($field);\n }\n }\n\n return $this->fields;\n }", "public function getFields()\n\t{\n\t\tif (!isset($this->_fields))\n\t\t{\n\t\t\t$this->_fields = array();\n\n\t\t\t$fieldLayoutFields = $this->getFieldLayout()->getFields();\n\n\t\t\tforeach ($fieldLayoutFields as $fieldLayoutField)\n\t\t\t{\n\t\t\t\t$field = $fieldLayoutField->getField();\n\t\t\t\t$field->required = $fieldLayoutField->required;\n\t\t\t\t$this->_fields[] = $field;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_fields;\n\t}", "public function fields()\n {\n $series = [];\n for ($i = 1; $i <= 110; $i++) {\n $name = \"第${i}集\";\n $series[$name] = $name;\n }\n return [\n Select::make('剧集', 'name')\n ->options($series)\n ->withMeta([\n 'value' => '第1集',\n 'extraAttributes' => [\n 'placeholder' => '第几集...'],\n ]),\n Text::make(\"播放地址\", 'url', )->withMeta(['extraAttributes' => [\n 'placeholder' => '目前仅支持m3u8播放地址'],\n ]),\n Select::make(\"是否完成求片处理\", 'fixed')->options([\n 0 => '否',\n 1 => '是',\n ])\n ->withMeta(['value' => 0])\n ->displayUsingLabels(),\n ];\n }", "public function getDefinitions()\n {\n return $this->containers;\n }", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }", "function get_content_testimonial_local_field( $id = '1234QWERasdf' ) {\n\treturn array (\n\t\tarray (\n\t\t\t'key' => $id . '_T9X5zN1Ad48f9',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'tab_content',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_Nj1a271cd48f1',\n\t\t\t'label' => 'Testimonials',\n\t\t\t'name' => 'testimonials',\n\t\t\t'type' => 'post_object',\n\t\t\t'required' => 0,\n\t\t\t'post_type' => array (\n\t\t\t\t'testimonial'\n\t\t\t),\n\t\t\t'multiple' => 1,\n\t\t\t'return_format' => 'object',\n\t\t\t'ui' => 1,\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_T9a3zN1cd48f6',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'tab_settings',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T9A2zN6cd48f7',\n\t\t\t'label' => 'Margins',\n\t\t\t'name' => 'margins',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'marg_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t\t'wrapper' => array(\n\t\t\t\t'width' => 50\n\t\t\t)\n\t\t),\n\t);\n}", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}", "public function getControls()\n\t{\t\t\t \n\t\treturn $this->getComponents(TRUE, 'Nette\\Forms\\IFormControl');\n\t}", "public function getFieldDefinitions()\n {\n return $this->innerContentType->getFieldDefinitions();\n }", "function get_field_list()\r\n\t{\r\n\t\t$fields = array();\r\n\r\n\t\tif (Authority::can('edit', 'admin/item/definition'))\r\n\t\t{\r\n\t\t\t$id_definition = $this->input->post('id_item_definition');\r\n\r\n\t\t\t$fields = $this->extend_field_model->get_lang_list(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'parent' => 'item',\r\n\t\t\t\t\t'id_parent' => $id_definition\r\n\t\t\t\t),\r\n\t\t\t\tSettings::get_lang('default')\r\n\t\t\t);\r\n\r\n\t\t\t// Set type names\r\n\t\t\tforeach($fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$field['type_name'] = self::$_TYPE_NAMES[$field['type']];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t$this->template['id_item_definition'] = $id_definition;\r\n\t\t$this->template['fields'] = $fields;\r\n\r\n\t\t$this->output('item/definition/fields');\r\n\t}", "public function getFields()\n {\n return $this->content->getFields();\n }", "public function getFormFields() {\n $fields = array(\n 'shapes[]' => array(\n 'type' => 'select',\n 'multiplicate' => '5',\n 'values' => array(\n '-' => '-',\n 'cube' => 'cube',\n 'round' => 'round',\n )\n ),\n 'width[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Width'\n ),\n 'higth[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Higth'\n ),\n 'x_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'X position'\n ),\n 'y_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Y position'\n ),\n 'red[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color red',\n ),\n 'green[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color green',\n ),\n 'blue[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color blue',\n ),\n 'size[]' => array(\n 'type' => 'text',\n 'multiplicate' => '1',\n 'label' => 'Size holst'\n ),\n 'enable[]' => array(\n 'type' => 'checkbox',\n 'multiplicate' => '5',\n 'label' => 'enable'\n )\n );\n return $fields;\n }", "public function tabs()\r\n\t{\r\n\t\tif(!$this->tabs instanceof \\Zbase\\Models\\Ui\\Tabs)\r\n\t\t{\r\n\t\t\t$className = zbase_model_name('ui.tabs', null, '\\Zbase\\Models\\Ui\\Tabs');\r\n\t\t\t$this->tabs = new $className;\r\n\t\t}\r\n\t\treturn $this->tabs;\r\n\t}", "function dw_index_tab_fields($cf)\n{\n global $post;\n $tab_num = get_post_meta($post->ID, 'guidance_tabs', true);\n if (is_numeric($tab_num)) {\n for ($t = 0; $t < $tab_num; $t++) {\n $cf[] = 'guidance_tabs_' . $t . '_tab_title';\n\n $section_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_sections', true);\n\n if (is_numeric($section_num)) {\n for ($s = 0; $s < $section_num; $s++) {\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_title';\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_html_content';\n }\n }\n\n $links_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_links', true);\n\n if (is_numeric($links_num)) {\n for ($l = 0; $l < $links_num; $l++) {\n $cf[] = 'guidance_tabs_' . $t . '_links_' . $l . '_link_title';\n }\n }\n }\n }\n\n return $cf;\n}", "public function getCMSFields()\n {\n $fields = parent::getCMSFields();\n\n // Remove _this_ object's redundant fields (Their values are set in onBeforeWrite()\n $fields->removeByName('BlockID');\n $fields->removeByName('BlockSort');\n $fields->removeByName('ParentPageID');\n $fields->removeByName('ParentDataID');\n $fields->removeByName('ViewGroups');\n $fields->removeByName('EditGroups');\n\n $blockTypes = $this->acService->getBlockTypes()->map('ClassName', 'SingularName');\n $blockTypeField = DropdownField::create(\n 'BlockClass',\n 'Block type',\n $blockTypes\n );\n \n $fields->addFieldToTab('Root.Main', $blockTypeField);\n\n $blockRecordClass = $this->getField('BlockClass');\n if ($blockRecordClass && $this->exists()) {\n $blockRecord = $this->getProxiedObject();\n \n // Now that a block class selection exists, we don't need it anymore.\n $fields->dataFieldByName('BlockClass')\n ->setDisabled(true)\n ->setReadonly(true)\n ->setEmptyString('dummy'); // The only way to disable validation\n \n $cmsFields = $blockRecordClass::create()->getCMSFields();\n // Populate the proxied model field's data\n if ($blockRecord) {\n $cmsFields->setValues($blockRecord->toMap());\n }\n $attFields = $this->attributeControls(AdvancedContentAttribute::ADV_ATTR_TYPE_FORM)->toArray();\n $blockFields = FieldList::create(array_merge($cmsFields->toArray(), $attFields));\n \n // Add the block-class's fields along with those of its attribute(s)\n $fields->addFieldsToTab('Root.Main', $blockFields);\n }\n\n return $fields;\n }", "function meta_box_field_groups(){\n \n foreach($this->field_groups as $field_group){ ?>\n\n <div class=\"acf-field\">\n\n <div class=\"acf-label\">\n <label><a href=\"<?php echo admin_url(\"post.php?post={$field_group['ID']}&action=edit\"); ?>\"><?php echo $field_group['title']; ?></a></label>\n <p class=\"description\"><?php echo $field_group['key']; ?></p>\n </div>\n\n <div class=\"acf-input\">\n \n <?php if(acf_maybe_get($field_group, 'fields')){ ?>\n\n <table class=\"acf-table\">\n <thead>\n <th class=\"acf-th\" width=\"25%\"><strong>Label</strong></th>\n <th class=\"acf-th\" width=\"25%\"><strong>Name</strong></th>\n <th class=\"acf-th\" width=\"25%\"><strong>Key</strong></th>\n <th class=\"acf-th\" width=\"25%\"><strong>Type</strong></th>\n </thead>\n\n <tbody>\n <?php\n \n $array = array();\n foreach($field_group['fields'] as $field){\n \n $this->get_fields_labels_recursive($array, $field);\n \n }\n \n foreach($array as $field_key => $field_label){\n \n $field = acf_get_field($field_key);\n $type = acf_get_field_type($field['type']);\n $type_label = '-';\n if(isset($type->label))\n $type_label = $type->label;\n ?>\n\n <tr class=\"acf-row\">\n <td width=\"25%\"><?php echo $field_label; ?></td>\n <td width=\"25%\"><code style=\"font-size:12px;\"><?php echo $field['name']; ?></code></td>\n <td width=\"25%\"><code style=\"font-size:12px;\"><?php echo $field_key; ?></code></td>\n <td width=\"25%\"><?php echo $type_label; ?></td>\n </tr>\n \n <?php } ?>\n </tbody>\n </table>\n \n <?php } ?>\n </div>\n\n </div>\n \n <?php } ?>\n\n <script type=\"text/javascript\">\n if(typeof acf !== 'undefined'){\n\n acf.newPostbox(<?php echo wp_json_encode(array(\n 'id' => 'acfe-form-details',\n 'key' => '',\n 'style' => 'default',\n 'label' => 'left',\n 'edit' => false\n )); ?>);\n\n }\n </script>\n <?php\n \n }", "public function Populate() {\r\n\t\t$form_instance = $this->form_instance;\r\n\t\t// Retrieve the field data\r\n\t\t$_els = vcff_parse_container_data($form_instance->form_content);\r\n\t\t// If an error has been detected, return out\r\n\t\tif (!$_els || !is_array($_els)) { return; }\r\n\t\t// Retrieve the form instance\r\n\t\t$form_instance = $this->form_instance; \r\n\t\t// Loop through each of the containers\r\n\t\tforeach ($_els as $k => $_el) {\r\n\t\t\t// Retrieve the container instance\r\n\t\t\t$container_instance = $this->_Get_Container_Instance($_el);\r\n\t\t\t// Add the container to the form instance\r\n\t\t\t$form_instance->Add_Container($container_instance);\r\n\t\t}\r\n\t}", "public function fields() {\n // The fields are passed to the constructor for this plugin.\n return $this->fields;\n }", "function get_fields()\n\t{\n\t\trequire_code('ocf_members');\n\n\t\t$indexes=collapse_2d_complexity('i_fields','i_name',$GLOBALS['FORUM_DB']->query_select('db_meta_indices',array('i_fields','i_name'),array('i_table'=>'f_member_custom_fields'),'ORDER BY i_name'));\n\n\t\t$fields=array();\n\t\tif (has_specific_permission(get_member(),'view_profiles'))\n\t\t{\n\t\t\t$rows=ocf_get_all_custom_fields_match(NULL,1,1);\n\t\t\trequire_code('fields');\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\tif (!array_key_exists('field_'.strval($row['id']),$indexes)) continue;\n\n\t\t\t\t$ob=get_fields_hook($row['cf_type']);\n\t\t\t\t$temp=$ob->get_search_inputter($row);\n\t\t\t\tif (is_null($temp))\n\t\t\t\t{\n\t\t\t\t\t$type='_TEXT';\n\t\t\t\t\t$special=make_string_tempcode(get_param('option_'.strval($row['id']),''));\n\t\t\t\t\t$display=$row['trans_name'];\n\t\t\t\t\t$fields[]=array('NAME'=>strval($row['id']),'DISPLAY'=>$display,'TYPE'=>$type,'SPECIAL'=>$special);\n\t\t\t\t} else $fields=array_merge($fields,$temp);\n\t\t\t}\n\n\t\t\t$age_range=get_param('option__age_range',get_param('option__age_range_from','').'-'.get_param('option__age_range_to',''));\n\t\t\t$fields[]=array('NAME'=>'_age_range','DISPLAY'=>do_lang_tempcode('AGE_RANGE'),'TYPE'=>'_TEXT','SPECIAL'=>$age_range);\n\t\t}\n\n\t\t$map=has_specific_permission(get_member(),'see_hidden_groups')?array():array('g_hidden'=>0);\n\t\t$group_count=$GLOBALS['FORUM_DB']->query_value('f_groups','COUNT(*)');\n\t\tif ($group_count>300) $map['g_is_private_club']=0;\n\t\tif ($map==array()) $map=NULL;\n\t\t$rows=$GLOBALS['FORUM_DB']->query_select('f_groups',array('id','g_name'),$map,'ORDER BY g_order');\n\t\t$groups=form_input_list_entry('',true,'---');\n\t\t$default_group=get_param('option__user_group','');\n\t\t$group_titles=array();\n\t\tforeach ($rows as $row)\n\t\t{\n\t\t\t$row['text_original']=get_translated_text($row['g_name'],$GLOBALS['FORUM_DB']);\n\n\t\t\tif ($row['id']==db_get_first_id()) continue;\n\t\t\t$groups->attach(form_input_list_entry(strval($row['id']),strval($row['id'])==$default_group,$row['text_original']));\n\t\t\t$group_titles[$row['id']]=$row['text_original'];\n\t\t}\n\t\tif (strpos($default_group,',')!==false)\n\t\t{\n\t\t\t$bits=explode(',',$default_group);\n\t\t\t$combination=new ocp_tempcode();\n\t\t\tforeach ($bits as $bit)\n\t\t\t{\n\t\t\t\tif (!$combination->is_empty()) $combination->attach(do_lang_tempcode('LIST_SEP'));\n\t\t\t\t$combination->attach(escape_html(@$group_titles[intval($bit)]));\n\t\t\t}\n\t\t\t$groups->attach(form_input_list_entry(strval($default_group),true,do_lang_tempcode('USERGROUP_SEARCH_COMBO',escape_html($combination))));\n\t\t}\n\t\t$fields[]=array('NAME'=>'_user_group','DISPLAY'=>do_lang_tempcode('GROUP'),'TYPE'=>'_LIST','SPECIAL'=>$groups);\n\t\tif (has_specific_permission(get_member(),'see_hidden_groups'))\n// $fields[]=array('NAME'=>'_photo_thumb_url','DISPLAY'=>do_lang('PHOTO'),'TYPE'=>'','SPECIAL'=>'','CHECKED'=>false);\n\t\t{\n\t\t\t//$fields[]=array('NAME'=>'_emails_only','DISPLAY'=>do_lang_tempcode('EMAILS_ONLY'),'TYPE'=>'_TICK','SPECIAL'=>'');\tCSV export better now\n\t\t}\n\n\t\treturn $fields;\n\t}", "function tabify_add_meta_boxes($post_type)\n {\n }", "public function show_forms() {\n ?>\n <div class=\"metabox-holder\">\n <?php foreach ( $this->settings_tabs as $tab ) { ?>\n <div id=\"<?php echo $tab['id']; ?>\" class=\"group\" style=\"display: none;\">\n <form method=\"post\" action=\"options.php\">\n <?php\n do_action( $this->settings_prefix . '_settings_form_top_' . $tab['id'], $tab );\n settings_fields( $tab['id'] );\n\n $this->do_settings_sections( $tab['id'] );\n\n do_action( $this->settings_prefix . '_settings_form_bottom_' . $tab['id'], $tab );\n ?>\n <div>\n <?php submit_button(); ?>\n </div>\n </form>\n </div>\n <?php } ?>\n </div>\n <?php\n $this->script();\n }", "function admin_metaboxes() {\r\n\r\n// \t\t\t/** Check if wpeo_log_select_post_type exist */\r\n// \t\t\tif( !empty(\t$this->wpeologs_settings['post_type'] ) ) {\r\n// \t\t\t\tforeach ( $this->wpeologs_settings['post_type'] as $post_type ) {\r\n\r\n// \t\t\t\t\t//add_meta_box( 'wpeologs_metabox_' . $post_type, __( 'Logs', 'wpeologs-i18n'), array( &$this, 'associated_post_type_metabox' ), $post_type, 'normal' );\r\n// \t\t\t\t}\r\n// \t\t\t}\r\n\t\t}", "public function getFrontendFields();", "public function getContainers()\n\t\t{\n\t\t\treturn $this->_containers;\n\t\t}", "public function getFormCustomFields(){\n\t}", "public function getFormFields()\n {\n return $this->form->getFields();\n }", "function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\t\t//new field, add above \"Content\" area\n\t\t$fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('dot_zero_warning','Warning text for x.y.0 Versions (leave emtpy to disable)', 10), 'Content');\n\t\t$fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('dot_one_warning', 'Warning text for x.y.1 Versions (leave emtpy to disable)', 10), 'Content');\n\n\t\treturn $fields;\n\t}", "public function getCMSFields() {\n $fields = parent::getCMSFields();\n // Create a default configuration for the new GridField, allowing record editing\n $config = GridFieldConfig_RelationEditor::create();\n // Set the names and data for our gridfield columns\n $config->getComponentByType('GridFieldDataColumns')->setDisplayFields(array(\n\t\t\t'Title' => 'Title',\n\t\t\t'Date' => 'Date',\n\t\t\t'Time' => 'Time',\n ));\n\n $sectionField = new GridField(\n 'Perfomance', // Field name\n 'Perfomances', // Field title\n $this->Perfomances(),\n $config\n );\n // Create a tab named \"Students\" and add our field to it\n $fields->addFieldToTab('Root.Main', $sectionField);\n\t\treturn $fields;\n\t}", "public function getContainers()\n {\n return $this->containers;\n }", "public function getContainers()\n {\n return $this->containers;\n }", "public function getControls()\n\t{\n\t\t$this->ensureChildControls();\n\t\treturn $this->_container->getControls();\n\t}", "function getSubFields( $options = true ) {\n\n\treturn [\n\t\t$options ? [\n\t\t\t'label' => 'General',\n\t\t\t'name' => 'generalTab',\n\t\t\t'type' => 'tab',\n\t\t\t'placement' => 'top',\n\t\t\t'endpoint' => 0,\n\t\t] : [],\n\t\t$options ? [\n\t\t\t'label' => '',\n\t\t\t'name' => 'info',\n\t\t\t'type' => 'message',\n\t\t\t'instructions' => '',\n\t\t\t'required' => 0,\n\t\t\t'wrapper' => \n\t\t\t[\n\t\t\t 'width' => '',\n\t\t\t 'class' => '',\n\t\t\t 'id' => '',\n\t\t\t],\n\t\t\t'message' => 'Nessuna impostazione necessaria. <br>Il blocco stampa un form di iscrizione newsletter (servizio mailchimp) con nome, cognome ed email',\n\t\t\t'new_lines' => 'wpautop',\n\t\t\t'esc_html' => 0,\n\t\t] : [],\n\t\t$options ? [\n\t\t\t'label' => 'Options',\n\t\t\t'name' => 'optionsTab',\n\t\t\t'type' => 'tab',\n\t\t\t'placement' => 'top',\n\t\t\t'endpoint' => 0\n\t\t] : [],\n\t\t$options ? [\n\t\t\t'label' => '',\n\t\t\t'name' => 'options',\n\t\t\t'type' => 'group',\n\t\t\t'layout' => 'row',\n\t\t\t'sub_fields' => [\n\t\t\t\tFieldVariables\\getSectionId(),\n\t\t\t\tFieldVariables\\getSectionClasses(),\n\t\t\t\tFieldVariables\\getContainer(),\n\t\t\t\tFieldVariables\\getRow(),\n\t\t\t\tFieldVariables\\getColsClasses(),\n\t\t\t\tFieldVariables\\getItemClasses(),\n\t\t\t]\n\t\t] : [],\n\t];\n}", "function igv_cmb_metaboxes() {\n\t$prefix = '_igv_';\n\n\t/**\n\t * Metaboxes declarations here\n * Reference: https://github.com/WebDevStudios/CMB2/blob/master/example-functions.php\n\t */\n\n}" ]
[ "0.6859011", "0.6856228", "0.67007095", "0.6644312", "0.66294056", "0.6554838", "0.64986354", "0.6446725", "0.6436388", "0.6430829", "0.6391465", "0.6388531", "0.62939185", "0.6246513", "0.623329", "0.62321764", "0.6229016", "0.62222", "0.6192383", "0.6172652", "0.616805", "0.6155919", "0.6102335", "0.60278064", "0.5983694", "0.5962442", "0.5950116", "0.59445155", "0.59341556", "0.5891061", "0.5880126", "0.5853698", "0.5846999", "0.5827476", "0.5795942", "0.57878566", "0.5773653", "0.5751556", "0.57335645", "0.56987095", "0.5698335", "0.56930363", "0.5684011", "0.5674375", "0.5672629", "0.56646013", "0.5649233", "0.5647106", "0.56459945", "0.563674", "0.5634725", "0.56334513", "0.56176066", "0.5613389", "0.5611585", "0.55952436", "0.5588545", "0.5570067", "0.55565804", "0.5556463", "0.555535", "0.55443215", "0.55292803", "0.5529277", "0.5525039", "0.55171853", "0.5510935", "0.5501", "0.5497023", "0.54896265", "0.5486321", "0.546601", "0.54545885", "0.5433134", "0.540113", "0.5380548", "0.5375306", "0.53751034", "0.5371391", "0.53685325", "0.536699", "0.53639394", "0.5363884", "0.53625524", "0.5359514", "0.5358141", "0.5350535", "0.5345726", "0.5340977", "0.5334021", "0.5326704", "0.5318105", "0.5316014", "0.53155476", "0.530742", "0.5306838", "0.5306838", "0.53025955", "0.5282136", "0.5275352" ]
0.5805501
34
Get a metabox tab fields container by its slug.
public function getContainer( $slug ) { return $this->getTab( '_options_tab' )->getContainer( $slug ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function metabox(){\n\t\tif ($this->options('use_metabox')){\n\t\t\treturn array(\n\t\t\t\t'id' => $this->options('name').'_metabox',\n\t\t\t\t'title' => __($this->options('singular_name').' Fields'),\n\t\t\t\t'page' => $this->options('name'),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}", "public function getField($slug);", "public function getMetabox( $slug )\n\t{\n\t\treturn isset( $this->_metaboxes[( string ) $slug] ) ? $this->_metaboxes[( string ) $slug] : false;\n\t}", "function get_content_testimonial_local_field( $id = '1234QWERasdf' ) {\n\treturn array (\n\t\tarray (\n\t\t\t'key' => $id . '_T9X5zN1Ad48f9',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'tab_content',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_Nj1a271cd48f1',\n\t\t\t'label' => 'Testimonials',\n\t\t\t'name' => 'testimonials',\n\t\t\t'type' => 'post_object',\n\t\t\t'required' => 0,\n\t\t\t'post_type' => array (\n\t\t\t\t'testimonial'\n\t\t\t),\n\t\t\t'multiple' => 1,\n\t\t\t'return_format' => 'object',\n\t\t\t'ui' => 1,\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_T9a3zN1cd48f6',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'tab_settings',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T9A2zN6cd48f7',\n\t\t\t'label' => 'Margins',\n\t\t\t'name' => 'margins',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'marg_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t\t'wrapper' => array(\n\t\t\t\t'width' => 50\n\t\t\t)\n\t\t),\n\t);\n}", "public function createContainer( $title, $slug, $index = false )\n\t\t{\n\t\t\t$container = new THB_TabFieldsContainer($title, $slug);\n\t\t\t$this->addContainer($container, $index);\n\n\t\t\treturn $container;\n\t\t}", "public function get_fields() {\n\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'type' => 'tab',\n\t\t\t\t'name' => __( 'Dribbble', 'publisher' ),\n\t\t\t\t'id' => 'dribbble',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Dribbble ID', 'publisher' ),\n\t\t\t\t'id' => 'user_id',\n\t\t\t\t'type' => 'text',\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Access Token', 'publisher' ),\n\t\t\t\t'id' => 'access_token',\n\t\t\t\t'type' => 'text',\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Number of Shots', 'publisher' ),\n\t\t\t\t'id' => 'photo_count',\n\t\t\t\t'type' => 'text',\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Columns', 'publisher' ),\n\t\t\t\t'id' => 'style',\n\t\t\t\t//\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t2 => __( '2 Column', 'publisher' ),\n\t\t\t\t\t3 => __( '3 Column', 'publisher' ),\n\t\t\t\t\t'slider' => __( 'Slider', 'publisher' ),\n\t\t\t\t),\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t),\n\t\t);\n\n\t\t/**\n\t\t * Retrieve heading fields from outside (our themes are defining them)\n\t\t */\n\t\t{\n\t\t\t$heading_fields = apply_filters( 'better-framework/shortcodes/heading-fields', array(), $this->id );\n\n\t\t\tif ( $heading_fields ) {\n\t\t\t\t$fields = array_merge( $fields, $heading_fields );\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Retrieve design fields from outside (our themes are defining them)\n\t\t */\n\t\t{\n\t\t\t$design_fields = apply_filters( 'better-framework/shortcodes/design-fields', array(), $this->id );\n\n\t\t\tif ( $design_fields ) {\n\t\t\t\t$fields = array_merge( $fields, $design_fields );\n\t\t\t}\n\t\t}\n\n\t\tbf_array_insert_after(\n\t\t\t'bs-show-phone',\n\t\t\t$fields,\n\t\t\t'bs-text-color-scheme',\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Block Text Color Scheme', 'publisher' ),\n\t\t\t\t'id' => 'bs-text-color-scheme',\n\t\t\t\t//\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'' => __( '-- Default --', 'publisher' ),\n\t\t\t\t\t'light' => __( 'White Color Texts', 'publisher' ),\n\t\t\t\t),\n\t\t\t\t//\n\t\t\t\t'vc_admin_label' => false,\n\t\t\t)\n\t\t);\n\n\t\treturn $fields;\n\t}", "function wpf_load_post_type_metaboxes() {\n\tglobal $wpf_classes;\n\n\t$metabox_class = wpf_get_class( 'metaboxes' );\n\n\treturn $wpf_classes['metaboxes'] = new $metabox_class();\n}", "function getCMSFields() {\n\t\t\n\t\t$f = new FieldList();\n\t\t\t\n\t\t\t$image_field = new UploadField('SlideImage', _t('Content.SLIDEIMAGE','Slide image'));\n\t\t\t$image_field->getValidator()->allowedExtensions = array('jpg', 'gif', 'png');\n\t\t\t$image_field->setFolderName('Uploads/sliderimages');\n\n\t\t// DropDown to select link from SiteTree\n\n\t\t\t$treedropdownfield = new TreeDropdownField('ButtonLinkLocID', 'Button link location', 'SiteTree');\n\n\t\t// Create Tabs\n\t\n\t\t$t = new TabSet(\n\t\t\t'Root',\n\t\t\tnew Tab(\n\t\t\t\t'Main',\n\t\t\t\tnew TextField(\"Heading\", _t('Content.HEADING','Heading of Slide')),\n\t\t\t\tnew TextField(\"Subtitle\", _t('Content.SUBTITLE','Subtitle of Slide')),\n\t\t\t\tnew HTMLEditorField(\"SlideContent\", _t('Content.CONTENT','HTML-content to slide')),\n\t\t\t\tnew TextField(\"ButtonText\", _t('Content.BUTTONTEXT','Button text')),\n\t\t\t\t$treedropdownfield,\n\t\t\t\tnew DropdownField('SlideTxtDisplay', _t('Content.SLIDETXTDISPLAY','Enable Texts over slide'),singleton('JumbotronSlideshowSlide')->dbObject('SlideTxtDisplay')->enumValues()),\n\t\t\t\tnew CheckboxField('Published', _t('Content.PUBLISHED','Is item published?'))\n\t\t\t),\n\t\t\tnew Tab(\n\t\t\t\t'Image',\n\t\t\t\t$image_field\n\t\t\t),\n\t\t\tnew Tab(\n\t\t\t\t'FX',\n\t\t\t\tnew DropdownField('SlideEffect', _t('Content.SLIDEEFFECT','SlideEffect'),singleton('JumbotronSlideshowSlide')->dbObject('SlideEffect')->enumValues())\n\t\t\t)\n\t\t\t\n\t\t);\n\t\t\n\t\t$f->push($t);\n\t\t\n\t\treturn $f;\n\t}", "public function getContainer( $slug )\n\t\t{\n\t\t\tforeach( $this->_containers as $container ) {\n\t\t\t\tif( $container->getSlug() == $slug ) {\n\t\t\t\t\treturn $container;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function get_metabox()\n {\n return $this->_metabox;\n }", "function get_gallery_local_field( $id = '1234QWERasdf' ) {\n\treturn array (\n\t\tarray (\n\t\t\t'key' => $id . '_T521QzPcd48f4',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'tab_content',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_Gl21QzPcd48f5',\n\t\t\t'label' => 'Gallery',\n\t\t\t'name' => 'gallery',\n\t\t\t'type' => 'gallery',\n\t\t\t'required' => 0,\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_Gl21QZPcd48f6',\n\t\t\t'label' => 'Button label',\n\t\t\t'name' => 'label',\n\t\t\t'type' => 'text',\n\t\t\t'required' => 0,\n\t\t\t'conditional_logic' => array (\n\t\t\t\tarray (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'field' => $id . '_T5MbQzPcd57f4',\n\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t'value' => 'full-screen'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_QzP1zN1cd48f3',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'tab_settings',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T5MtzN1cd4QzP',\n\t\t\t'label' => 'Margins',\n\t\t\t'name' => 'margins',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'marg_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t\t'wrapper' => array(\n\t\t\t\t'width' => 50\n\t\t\t)\n\t\t),\n\t\tarray(\n\t\t\t'key' => $id . '_T5MbQzPcd16f0',\n\t\t\t'name' => 'width',\n\t\t\t'label' => 'Width',\n\t\t\t'type' => 'select',\n\t\t\t'required' => '',\n\t\t\t'choices' => array (\n\t\t\t\t'auto' => 'Auto',\n\t\t\t\t'full' => 'Full width',\n\t\t\t),\n\t\t\t'default_values' => array(\n\t\t\t\t'full'\n\t\t\t),\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => 25\n\t\t\t)\n\t\t),\n\t\tarray(\n\t\t\t'key' => $id . '_T5MbQzPcd57f4',\n\t\t\t'name' => 'type',\n\t\t\t'label' => 'Type of the gallery',\n\t\t\t'type' => 'select',\n\t\t\t'required' => '',\n\t\t\t'choices' => array (\n\t\t\t\t'simple' => 'Simple slider',\n\t\t\t\t'full-screen' => 'Full screen popup'\n\t\t\t),\n\t\t\t'default_values' => array(\n\t\t\t\t'simple'\n\t\t\t),\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => 25\n\t\t\t)\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_T5MbQzPcd84f7',\n\t\t\t'label' => 'Single type of gallery explanation',\n\t\t\t'name' => 'text_1',\n\t\t\t'type' => 'message',\n\t\t\t'required' => 0,\n\t\t\t'message' => 'That means the gallery looks like just single image and arrows placed on left and right edges of the gallery. Clicking on these arrows will smooth switch to next or previous image.',\n\t\t\t'new_lines' => '',\n\t\t\t'esc_html' => 0,\n\t\t\t'conditional_logic' => array (\n\t\t\t\tarray (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'field' => $id . '_T5MbQzPcd57f4',\n\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t'value' => 'simple'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T5MbQzPcd92f9',\n\t\t\t'label' => 'Full screen popup type of gallery explanation',\n\t\t\t'name' => 'text_3',\n\t\t\t'type' => 'message',\n\t\t\t'required' => 0,\n\t\t\t'message' => 'This one is just one image without any arrows but has a button tells something like \"yo man, click me\". Afterwards clicking action, you have a full screen slider opened.',\n\t\t\t'new_lines' => '',\n\t\t\t'esc_html' => 0,\n\t\t\t'conditional_logic' => array (\n\t\t\t\tarray (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'field' => $id . '_T5MbQzPcd57f4',\n\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t'value' => 'full-screen'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t);\n}", "function bp_dynamic_tab_content() {\n\treturn BP_Dynamic_User_Tab_Content::get_instance();\n}", "public function getTab( $slug )\n\t\t{\n\t\t\tforeach( $this->_tabs as $tab ) {\n\t\t\t\tif( $tab->getSlug() == $slug ) {\n\t\t\t\t\treturn $tab;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function meta_box_form_items() {\n\t\t$vfb_post = '';\n\t\t// Run Create Post add-on\n\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) )\n\t\t\t$vfb_post = new VFB_Pro_Create_Post();\n\t?>\n\t\t<div class=\"taxonomydiv\">\n\t\t\t<p><strong><?php _e( 'Click or Drag' , 'visual-form-builder-pro'); ?></strong> <?php _e( 'to Add a Field' , 'visual-form-builder-pro'); ?> <img id=\"add-to-form\" alt=\"\" src=\"<?php echo admin_url( '/images/wpspin_light.gif' ); ?>\" class=\"waiting spinner\" /></p>\n\t\t\t<ul class=\"posttype-tabs add-menu-item-tabs\" id=\"vfb-field-tabs\">\n\t\t\t\t<li class=\"tabs\"><a href=\"#standard-fields\" class=\"nav-tab-link vfb-field-types\"><?php _e( 'Standard' , 'visual-form-builder-pro'); ?></a></li>\n\t\t\t\t<li><a href=\"#advanced-fields\" class=\"nav-tab-link vfb-field-types\"><?php _e( 'Advanced' , 'visual-form-builder-pro'); ?></a></li>\n\t\t\t\t<?php\n\t\t\t\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) && method_exists( $vfb_post, 'form_item_tab' ) )\n\t\t\t\t\t\t$vfb_post->form_item_tab();\n\t\t\t\t?>\n\t\t\t</ul>\n\t\t\t<div id=\"standard-fields\" class=\"tabs-panel tabs-panel-active\">\n\t\t\t\t<ul class=\"vfb-fields-col-1\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-fieldset\">Fieldset</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-text\"><b></b>Text</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-checkbox\"><b></b>Checkbox</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-select\"><b></b>Select</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-datepicker\"><b></b>Date</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-url\"><b></b>URL</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-digits\"><b></b>Number</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-phone\"><b></b>Phone</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-file\"><b></b>File Upload</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class=\"vfb-fields-col-2\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-section\">Section</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-textarea\"><b></b>Textarea</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-radio\"><b></b>Radio</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-address\"><b></b>Address</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-email\"><b></b>Email</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-currency\"><b></b>Currency</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-time\"><b></b>Time</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-html\"><b></b>HTML</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-instructions\"><b></b>Instructions</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div> <!-- #standard-fields -->\n\t\t\t<div id=\"advanced-fields\"class=\"tabs-panel tabs-panel-inactive\">\n\t\t\t\t<ul class=\"vfb-fields-col-1\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-username\"><b></b>Username</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-hidden\"><b></b>Hidden</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-autocomplete\"><b></b>Autocomplete</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-min\"><b></b>Min</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-range\"><b></b>Range</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-name\"><b></b>Name</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-likert\"><b></b>Likert</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class=\"vfb-fields-col-2\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-password\"><b></b>Password</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-color\"><b></b>Color Picker</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-ip\"><b></b>IP Address</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-max\"><b></b>Max</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-pagebreak\"><b></b>Page Break</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-rating\"><b></b>Rating</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div> <!-- #advanced-fields -->\n\t\t\t<?php\n\t\t\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) && method_exists( $vfb_post, 'form_items' ) )\n\t\t\t\t\t$vfb_post->form_items();\n\t\t\t?>\n\t\t</div> <!-- .taxonomydiv -->\n\t\t<div class=\"clear\"></div>\n\t<?php\n\t}", "public function getFieldSlug();", "public function getCMSFields() {\n\t\t$fields = parent::getCMSFields(); \n\t\t$fields->removeByName('FaqPageID');\n\t\t$fields->removeByName('FaqTags');\n\t\t$fields->removeByName('SortOrder');\n\t\t\n\t\t$fields->addFieldToTab('Root.Main', new TextField('Question', 'Question'));\t\t\n\t\t$fields->addFieldToTab('Root.Main', new HtmlEditorField('Answer', 'Answer'));\n\t\t\n\t\t// faq section - has_one relation\n\t\t$map = FaqSection::get()\n\t\t\t->sort('Title')\n\t\t\t->map('ID', 'Title');\n\t\t$field = new DropdownField('FaqSectionID', 'Faq section', $map);\n\t\t$field->setEmptyString('None');\n\t\t$fields->addFieldToTab('Root.Main', $field, 'Question');\n\t\t\n\t\t// faq tags - has_many relation\n\t\t$tagMap = FaqTag::get()\n\t\t\t->sort('Title')\n\t\t\t->map('ID', 'Title')\n\t\t\t->toArray();\n\t\t$tagsField = new ListboxField('FaqTags', 'Faq tags');\n\t\t$tagsField->setMultiple(true)->setSource($tagMap);\n\t\t$fields->addFieldToTab( 'Root.Main', $tagsField, 'Question' );\n\t\t\n\t\treturn $fields;\n\t}", "public function get_metabox() {\n\n return $this->_metabox;\n }", "public function getCMSFields()\n {\n if (isset($_REQUEST[\"sc\"]) && !self::$called) {\n // just create an instance and return getCMSFields on that\n $subclass = $_REQUEST[\"sc\"];\n $inst = new $subclass;\n\n // prevent handling this case again.\n self::$called = true;\n\n // Get the fields from the subclass. It will in turn self::getCMSFields, but that one will return the actual\n // fields of this class.\n return $inst->getCMSFields();\n }\n\n $fields = parent::getCMSFields();\n\n $fields->removeByName(\"ParentID\");\n\n if ($helperText = $this->helperText()) {\n $helperText = \" - \" . $helperText;\n }\n\n if (isset($_REQUEST[\"sc\"])) {\n $subclass = $_REQUEST[\"sc\"];\n if (ClassInfo::exists($subclass)) {\n $className = preg_replace('/(?!^)[[:upper:]]+/', ' \\0', $subclass);\n $fields->addFieldToTab(\"Root.Main\", new HiddenField(\"SubClass\", \"SubClass\", $subclass));\n if (isset($_REQUEST[\"id\"])) {\n $fields->addFieldToTab(\"Root.Main\", new HiddenField(\"ParentID\", \"ParentID\", $_REQUEST[\"id\"]));\n }\n $fields->addFieldToTab(\"Root.Main\", new ReadonlyField(\"Class\", \"Variation Type\", $className . $helperText), \"Name\");\n }\n } else {\n $className = preg_replace('/(?!^)[[:upper:]]+/', ' \\0', $this->ClassName);\n $fields->addFieldToTab(\"Root.Main\", new ReadonlyField(\"Class\", \"Variation Type\", $className . $helperText), \"Name\");\n }\n\n return $fields;\n }", "protected static function getFacadeAccessor() { return 'metabox'; }", "public function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\n\t\t//$fields = $this->addCommonFields( $fields );\n\n\t\t$fields->removeFieldFromTab( 'Root.Main', 'Content' );\n\t\t$fields->addFieldToTab( 'Root.Main', new TextField( 'Title', 'Topic Name' ) );\n\t\t//$fields->addFieldToTab( 'Root.Main', new UploadField( 'CoverImage', 'Cover Image' ) );\n\t\t$gridFieldConfigEssayPages = GridFieldConfig_RelationEditor::create();\n\t\t$gridFieldConfigEssayPages->addComponent( new GridFieldSortableRows( 'PageNo' ) );\n\t\t$gridFieldConfigEssayPages->getComponentByType( GridFieldAddExistingAutocompleter::class )->setSearchFields( array( 'PageNo', 'Content' ) );\n\t\t$gridFieldConfigEssayPages->getComponentByType( GridFieldPaginator::class )->setItemsPerPage( 20 );\n\t\t$gridfield = new GridField( \"EssayPages\", \"Essay Pages\", $this->EssayPages(), $gridFieldConfigEssayPages );\n\t\t$fields->addFieldToTab( 'Root.Main', $gridfield );\n\n\t\t$fields->addFieldToTab( 'Root.Main', new TextField( 'Tags', 'Tags' ) );\n\n\t\treturn $fields;\n\n\t}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Options Tab:\n \n $fields->findOrMakeTab('Root.Options', $this->fieldLabel('Options'));\n \n // Create Options Fields:\n \n $fields->addFieldsToTab(\n 'Root.Options',\n [\n FieldSection::create(\n 'PortfolioOptions',\n $this->fieldLabel('Portfolio'),\n [\n TextField::create(\n 'DetailsHeading',\n $this->fieldLabel('DetailsHeading')\n )\n ]\n )\n ]\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "function ga_formulario_instancia() {\n // ID del metabox\n $metabox_id = 'ga_enviar_receta';\n \n // No aplica el object_id ya que se va a generar automaticamente al crearlo.\n $object_id = 'fake-object-id';\n \n return cmb2_get_metabox($metabox_id, $object_id);\n}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Remove Field Objects:\n \n $fields->removeFieldFromTab('Root.Main', 'Content');\n \n // Answer Field Objects:\n \n return $fields;\n }", "function thd_re_meta_box_fields() {\n\t$prefix = 're_';\n\n\t$fields = array(\n\t\tarray(\n\t\t\t'label'\t=> 'Title',\n\t\t\t'desc'\t=> '',\n\t\t\t'id'\t\t=> $prefix.'title',\n\t\t\t'type'\t=> 'text'\n\t\t)\n\t);\n\n\treturn $fields;\n}", "protected function _Get_Container_Instance($_el) {\r\n\t\t$form_instance = $this->form_instance;\r\n // Retrieve the container name\r\n\t\t$type = $_el['type'];\r\n // Retrieve the global vcff forms class\r\n $vcff_containers = vcff_get_library('vcff_containers');\r\n // If the context does not exist\r\n if (!isset($vcff_containers->contexts[$type])) { return; }\r\n // Retrieve the context\r\n $_context = $vcff_containers->contexts[$type]; \r\n // Retrieve the container name\r\n\t\t$machine_code = $_el['name'];\r\n // If no form instance was found\r\n\t\tif (!$machine_code) { return; }\r\n\t\t// Create the field item classname\r\n\t\t$container_classname = $_context['class'];\r\n\t\t// If no form instance was found\r\n\t\tif (!$container_classname) { return; } \r\n\t\t// Create a new item instance for this field\r\n\t\t$container_instance = new $container_classname();\r\n\t\t// Populate the container form\r\n\t\t$container_instance->form_instance = $this->form_instance;\r\n\t\t$container_instance->machine_code = $machine_code;\r\n\t\t$container_instance->container_type = $_context['type'];\r\n\t\t$container_instance->context = $_context;\r\n\t\t$container_instance->attributes = $_el['attributes'];\r\n // Populate the handler object\r\n\t\t$container_instance->el = $_el['el'];\r\n\t\t$container_instance->el_children = $_el['children'];\r\n // Add any child fields\r\n $this->_Add_Child_Fields($container_instance);\r\n $this->_Add_Child_Supports($container_instance);\r\n // If the field has a sanitize method\r\n if (method_exists($container_instance,'On_Create')) { $container_instance->On_Create(); }\r\n // Do any create actions\r\n $container_instance->Do_Action('create');\r\n // Do a wordpress hook\r\n do_action('vcff_container_create',$container_instance);\r\n\t\t// Return the generated field instance\r\n\t\treturn $container_instance;\r\n\t}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Main Fields:\n \n $fields->addFieldsToTab(\n 'Root.Main',\n [\n UploadField::create(\n 'Image',\n $this->fieldLabel('Image')\n )->setAllowedFileCategories('image')->setFolderName($this->getAssetFolder()),\n HTMLEditorField::create(\n 'Caption',\n $this->fieldLabel('Caption')\n )->setRows(10)\n ]\n );\n \n // Create Options Fields:\n \n $fields->addFieldToTab(\n 'Root.Options',\n CompositeField::create([\n CheckboxField::create(\n 'HideCaption',\n $this->fieldLabel('HideCaption')\n )\n ])->setName('ImageComponentOptions')->setTitle($this->i18n_singular_name())\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Field Objects:\n \n if ($this->isInDB()) {\n \n // Create Main Fields:\n \n $fields->addFieldToTab(\n 'Root.Main',\n TextField::create(\n 'Title',\n $this->fieldLabel('Title')\n )\n );\n \n // Create Options Fields:\n \n $fields->addFieldToTab(\n 'Root.Options',\n CompositeField::create([\n CheckboxField::create(\n 'HideTitle',\n $this->fieldLabel('HideTitle')\n )\n ])->setName('TitleOptions')->setTitle($this->fieldLabel('TitleOptions'))\n );\n \n }\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function removeMetabox( $slug )\n\t{\n\t\tif ( isset( $this->_metaboxes[$slug] ) ) {\n\t\t\tunset( $this->_metaboxes[$slug] );\n\t\t}\n\t\treturn $this;\n\t}", "public function metabox_start( $post ) {\n\t\t\tif ( ! $post ) global $post;\n\n\t\t\tif ( ! in_array( $post->post_type, $this->_meta_box['pages'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$pageTpl = null;\n\t\t\t$tabbed = ( $this->_meta_box['tabs'] ) ? ( ' jquery-ui-tabs' ) : ( '' );\n\t\t\t$metaFields = $this->_fields;\n\n\t\t\tif ( 'page' == $post->post_type ) {\n\t\t\t\t$pageTpl = get_post_meta( $post->ID, '_wp_page_template', true );\n\t\t\t\tif ( $post->ID == get_option( 'page_for_posts' ) )\n\t\t\t\t\t$pageTpl = 'blog-page';\n\t\t\t}\n\n\t\t\twp_nonce_field( 'wm-' . $post->post_type . '-metabox-nonce', $post->post_type . '-metabox-nonce' );\n\n\t\t\t//display meta box form HTML\n\t\t\t$out = '<div class=\"wm-wrap meta meta-special' . $tabbed . '\">';\n\n\t\t\t\t//tabs\n\t\t\t\tif ( $tabbed ) {\n\t\t\t\t\t$out .= '<ul class=\"tabs no-js\">';\n\t\t\t\t\t$out .= '<li class=\"item-0 visual-editor\"><a href=\"#wm-meta-visual-editor\">' . __( 'Content', 'clifden_domain_adm' ) . '</a></li>';\n\t\t\t\t\t$i = 0;\n\t\t\t\t\tforeach ( $metaFields as $tab ) {\n\t\t\t\t\t\tif ( 'section-open' == $tab['type'] ) {\n\t\t\t\t\t\t\t$hideThis = null;\n\t\t\t\t\t\t\tif ( 'page' == $post->post_type && isset( $tab['exclude'] ) && in_array( $pageTpl, $tab['exclude'] ) ) {\n\t\t\t\t\t\t\t\t$hideThis = ' hide';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$out .= '<li class=\"item-' . ++$i . $hideThis . ' ' . $tab['section-id'] . '\"><a href=\"#wm-meta-' . $tab['section-id'] . '\">' . $tab['title'] . '</a></li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$out .= '</ul> <!-- /tabs -->';\n\t\t\t\t}\n\n\t\t\techo $out;\n\n\t\t\t$editorTabContent = array(\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"section-open\",\n\t\t\t\t\t\"section-id\" => \"visual-editor\",\n\t\t\t\t\t\"exclude\" => array( 'page-template/redirect.php', 'tpl-redirect.php' )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t//Content\n\t\t\twm_render_form( $editorTabContent, 'meta', $pageTpl );\n\t\t}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Remove Field Objects:\n \n $fields->removeFieldsFromTab('Root.Main', ['Image', 'Caption', 'LinkTo']);\n \n // Answer Field Objects:\n \n return $fields;\n }", "static function mega_get_field( $field_id ) {\n\t\tif ( is_post_type_archive() ) {\n\t\t\t// acf archive fields must have a prefix with single post name, i.e: product-content.\n\t\t\t$obj = get_queried_object();\n\t\t\t$name = $obj->name;\n\t\t\t$field = get_field( \"{$name}_{$field_id}\", 'option' );\n\t\t} elseif ( is_tax() || is_category() ) {\n\t\t\t$term = get_queried_object();\n\n\t\t\tif ( get_field( $field_id, $term ) ) {\n\t\t\t\t$field = get_field( $field_id, $term );\n\t\t\t} elseif ( $term->parent && get_field( $field_id, $term->taxonomy . '_' . $term->parent ) ) {\n\t\t\t\t$field = get_field( $field_id, $term->taxonomy . '_' . $term->parent );\n\t\t\t}\n\t\t} elseif ( get_field( $field_id ) ) {\n\t\t\t$field = get_field( $field_id );\n\t\t}\n\n\t\tif ( ! isset( $field ) && get_field( $field_id, 'option' ) ) {\n\t\t\t$field = get_field( $field_id, 'option' );\n\t\t}\n\n\t\tif ( isset( $field ) ) {\n\t\t\treturn $field;\n\t\t}\n\t}", "function edc_campos_blog() {\n $prefix = 'edc_blog_';\n \n\t$id_blog = get_option('page_for_posts');\n\t\n\t$edc_campos_blog = new_cmb2_box( array(\n\t\t'id' => $prefix . 'blog',\n\t\t'title' => esc_html__( 'Campos Blog', 'cmb2' ),\n\t\t'object_types' => array( 'page' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t'show_on' => array(\n\t\t\t'id' => array( $id_blog ),\n\t\t), // Specific post IDs to display this metabox\n\t) );\n\t\n\t$edc_campos_blog->add_field( array(\n\t\t'name' => esc_html__( 'Slogan Blog', 'cmb2' ),\n\t\t'desc' => esc_html__( 'Añada una descripción a la página web', 'cmb2' ),\n\t\t'id' => $prefix . 'slogan_blog',\n\t\t'type' => 'text',\n\t) );\n}", "public function meta_box( $post, $metabox ) {\n\t\t$sidebars = get_option( 'ups_sidebars' );\n\t\t$sidebar_id = esc_attr( $metabox['args']['id'] );\n\t\t$sidebar = $sidebars[$sidebar_id];\n\n\t\t$options_fields = array(\n\t\t\t'name' => 'Name',\n\t\t\t'description' => __('Description', self::TEXT_DOMAIN),\n\t\t\t'before_title' => __('Before Title', self::TEXT_DOMAIN),\n\t\t\t'after_title' => __('After Title', self::TEXT_DOMAIN),\n\t\t\t'before_widget' => __('Before Widget', self::TEXT_DOMAIN),\n\t\t\t'after_widget' => __('After Widget', self::TEXT_DOMAIN),\n\t\t\t'children' => __('Child Behavior', self::TEXT_DOMAIN),\n\t\t);\n\n\t\t$post_types = get_post_types( array( '_builtin' => false ), 'objects' );\n\t\t$post_types = array_merge( $post_types, array( 'page' => get_post_type_object( 'page' ), 'post' => get_post_type_object( 'post' ) ) );\n\t\t?>\n\t\t<div style=\"float: left; width: 25%;\">\n\t\t\t<ul class=\"wp-tab-bar\">\n\t\t\t\t<?php $i = 0; foreach ( $post_types as $post_type ) : ?>\n\t\t\t\t\t<li <?php echo ($i == 0) ? 'class=\"wp-tab-active\"' : ''; ?>>\n\t\t\t\t\t\t<a href=\"#post-type-<?php echo esc_attr( $post_type->name ); ?>\">\n\t\t\t\t\t\t\t<?php echo esc_html( $post_type->labels->name ); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t<?php ++$i; endforeach; ?>\n\t\t\t</ul>\n\t\t\t<?php $i = 0; foreach ( $post_types as $post_type ) : ?>\n\t\t\t\t<div class=\"wp-tab-panel\" id=\"post-type-<?php echo esc_attr( $post_type->name ); ?>\" <?php echo ($i > 0) ? 'style=\"display: none;\"' : ''; ?>>\n\t\t\t\t\t<?php\n\t\t\t\t\t$items = new WP_Query( array(\n\t\t\t\t\t\t'offset' => 0,\n\t\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t\t\t'orderby' => 'title',\n\t\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t\t'post_type' => $post_type->name,\n\t\t\t\t\t\t'suppress_filters' => true,\n\t\t\t\t\t\t'update_post_term_cache' => false,\n\t\t\t\t\t\t'update_post_meta_cache' => false,\n\t\t\t\t\t\t'no_found_posts' => true,\n\t\t\t\t\t) );\n\t\t\t\t\tif ( $items->have_posts() ) : ?>\n\t\t\t\t\t\t<ul id=\"<?php echo esc_attr( $post_type->name ); ?>checklist\" class=\"categorychecklist form-no-clear\">\n\t\t\t\t\t\t\t<?php while ( $items->have_posts() ) : $items->the_post(); ?>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t<?php $name = 'ups_sidebars[' . $sidebar_id . '][locations][' . $post_type->name . '][' . get_the_ID() . ']'; ?>\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" class=\"menu-item-checkbox\" name=\"<?php echo esc_attr( $name ); ?>\" value=\"<?php echo esc_attr( get_the_title( get_the_ID() ) ); ?>\" <?php echo ( isset( $sidebar['locations'][$post_type->name] ) && array_key_exists( get_the_ID(), $sidebar['locations'][$post_type->name] ) ) ? 'checked=\"checked\"' : ''; ?> />\n\t\t\t\t\t\t\t\t\t<?php echo esc_html( get_the_title( get_the_ID() ) ); ?>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<?php endwhile; ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t<?php ++$i; endforeach; ?>\n\t\t</div>\n\t\t<script>\n\t\tjQuery(document).ready( function($) {\n\t\t\t// WP tabs\n\t\t\t$('.wp-tab-bar a').click(function(event){\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// Limit effect to the container element.\n\t\t\t\tvar context = $(this).parents('.wp-tab-bar').first().parent();\n\t\t\t\t$('.wp-tab-bar li', context).removeClass('wp-tab-active');\n\t\t\t\t$(this).parents('li').first().addClass('wp-tab-active');\n\t\t\t\t$('.wp-tab-panel', context).hide();\n\t\t\t\t$( $(this).attr('href'), context ).show();\n\t\t\t});\n\n\t\t\t// Make setting wp-tab-active optional.\n\t\t\t$('.wp-tab-bar').each(function(){\n\t\t\t\tif ( $('.wp-tab-active', this).length )\n\t\t\t\t\t$('.wp-tab-active', this).click();\n\t\t\t\telse $('a', this).first().click();\n\t\t\t});\n\t\t});\n\t\t</script>\n\t\t<div style=\"float: right; width: 70%;\">\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<?php foreach ( $options_fields as $id => $label ) : ?>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\"><?php echo esc_html( $label ); ?></label></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t<?php if ( 'children' == $id ) : ?>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\tif ( array_key_exists( 'children', $sidebar ) && $sidebar['children'] == 'on' ) {\n\t\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" value=\"on\" id=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\"<?php echo $checked; ?> />\n\t\t\t\t\t\t<span class=\"description\"><?php _e('Set page children to use the parent page sidebar by default?', self::TEXT_DOMAIN) ?></span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t<input id=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" class=\"regular-text\" type=\"text\" name=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" value=\"<?php echo esc_html( $sidebar[$id] ); ?>\" />\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</table>\n\t\t</div>\n\t\t<div class=\"clear submitbox\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save all sidebars', self::TEXT_DOMAIN) ?>\" />&nbsp;&nbsp;&nbsp;\n\t\t\t<label><input type=\"checkbox\" name=\"ups_sidebars[delete]\" value=\"<?php echo esc_attr( $sidebar_id ); ?>\" /> <?php _e('Delete this sidebar?', self::TEXT_DOMAIN) ?></label>\n\t\t</div>\n\t\t<?php\n\t}", "function show() {\n global $post;\n\n $saved = $this->is_saved();\n\n // Container\n printf(\n '<div class=\"rwmb-meta-box\" data-autosave=\"%s\">',\n $this->meta_box['autosave'] ? 'true' : 'false'\n );\n\n wp_nonce_field( \"rwmb-save-{$this->meta_box['id']}\", \"nonce_{$this->meta_box['id']}\" );\n\n // Allow users to add custom code before meta box content\n // 1st action applies to all meta boxes\n // 2nd action applies to only current meta box\n do_action( 'rwmb_before', $this );\n do_action( \"rwmb_before_{$this->meta_box['id']}\", $this );\n\n // Print HTML code for all fields\n $current_tab = null;\n $tab_heading = $tab_body = '';\n\n foreach ( $this->fields as $field ) {\n if ( isset( $field['tab'] ) && $current_tab != $field['tab'] ) {\n $tab_id = sanitize_key( $field['tab'] );\n\n // Update tab heading.\n $tab_heading .= '\n\t\t\t\t\t<li class=\"meta-box-tab-' . $tab_id . ( empty( $current_tab ) ? ' active' : '' ) . '\">\n\t\t\t\t\t\t<a href=\"#' . $tab_id . '\">' . $field['tab'] . '</a>\n\t\t\t\t\t</li>';\n\n // Update tab body.\n $tab_body .= ( empty( $current_tab ) ? '' : '</div>' ) . '\n\t\t\t\t\t<div id=\"' . $tab_id . '\" class=\"meta-box-tabs-content ' . ( empty( $current_tab ) ? '' : 'hidden' ) . '\">';\n\n $current_tab = $field['tab'];\n }\n\n // Start output buffering to hold field output.\n ob_start();\n\n if ( method_exists( __CLASS__, 'get_class_name' ) ) {\n call_user_func( array( self::get_class_name( $field ), 'show' ), $field, $saved );\n } elseif ( class_exists( 'RWMB_Field' ) && method_exists( 'RWMB_Field', 'call' ) ) {\n RWMB_Field::call( 'show', $field, $saved );\n }\n\n $tab_body .= ob_get_contents();\n\n ob_end_clean();\n }\n\n if ( ! empty( $tab_heading ) ) {\n echo '\n\t\t\t\t<div class=\"meta-box-tabs\" id=\"' . $this->meta_box['id'] . '\">\n\t\t\t\t\t<ul class=\"meta-box-tabs-nav\">' . $tab_heading . '</ul>\n\t\t\t\t\t' . $tab_body . '</div>\n\t\t\t\t</div>\n\t\t\t\t<scr' . 'ipt>\n\t\t\t\t\t(function($) {\n\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . '\").on(\"click\", \".meta-box-tabs-nav a\", function(e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . ' .meta-box-tabs-nav li\").removeClass(\"active\");\n\t\t\t\t\t\t\t$(this).parent().addClass(\"active\");\n\t\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . ' .meta-box-tabs-content\").addClass(\"hidden\").filter($(this).attr(\"href\")).removeClass(\"hidden\");\n\t\t\t\t\t\t});\n\t\t\t\t\t})(jQuery);\n\t\t\t\t</scr' . 'ipt>';\n } else {\n echo worldmart_output('' . $tab_body) ;\n }\n\n // Include validation settings for this meta-box\n if ( isset( $this->validation ) && $this->validation ) {\n echo '\n\t\t\t\t<scr' . 'ipt>\n\t\t\t\tif ( typeof rwmb == \"undefined\" )\n\t\t\t\t{\n\t\t\t\t\tvar rwmb = {\n\t\t\t\t\t\tvalidationOptions : jQuery.parseJSON( \\'' , json_encode( $this->validation ) , '\\' ),\n\t\t\t\t\t\tsummaryMessage : \"' , esc_js( esc_html__( 'Please correct the errors highlighted below and try again.', 'worldmart' ) ) , '\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar tempOptions = jQuery.parseJSON( \\'' , json_encode( $this->validation ) . '\\' );\n\t\t\t\t\tjQuery.extend( true, rwmb.validationOptions, tempOptions );\n\t\t\t\t}\n\t\t\t\t</scr' . 'ipt>\n\t\t\t';\n }\n\n // Allow users to add custom code after meta box content\n // 1st action applies to all meta boxes\n // 2nd action applies to only current meta box\n do_action( 'rwmb_after', $this );\n do_action( \"rwmb_after_{$this->meta_box['id']}\", $this );\n\n // End container\n echo '</div>';\n }", "function post_slug_meta_box($post)\n {\n }", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "function show_c_p_tab_field($field){\n global $woocommerce;\n ?><tr valign=\"top\">\n <th scope=\"row\" class=\"titledesc\">\n <label for=\"<?php echo esc_attr( $field['id'] ); ?>\"><?php echo esc_html( $field['title'] ); ?></label>\n <?php echo '<img class=\"help_tip\" data-tip=\"' . esc_attr( $field['desc'] ) . '\" src=\"' . $woocommerce->plugin_url() . '/assets/images/help.png\" height=\"16\" width=\"16\" />'; ?>\n </th>\n <td class=\"forminp forminp-<?php echo sanitize_title( $field['type'] ) ?>\">\n <p class=\"form-field custom_product_tabs\">\n <select id=\"custom_product_tabs\" style=\"width: 50%;\" name=\"<?php echo $field['id'];?>[]\" class=\"ajax_chosen_select_tabs\" multiple=\"multiple\" data-placeholder=\"<?php _e( 'Search for a custom tab&hellip;', 'GWP' ); ?>\">\n <?php \n $tabs_ids = get_option($field['id']);\n $_ids = ! empty( $tabs_ids ) ? array_map( 'absint', $tabs_ids ) : array();\n foreach ( $this->get_custom_tabs_list() as $id => $label ) {\n $selected = in_array($id, $_ids)? 'selected=\"selected\"' : '';\n echo '<option value=\"' . esc_attr( $id ) . '\"'.$selected.'>' . esc_html( $label ) . '</option>';\n }\n ?>\n </select>\n </p>\n </td>\n </tr><?php\n add_action('admin_footer',array($this,'ajax_footer_js'));\n }", "function get_voter_ballot_object() {\n $metabox_id = '_cmb_voter_ballot_form';\n $object_id = 'fake-oject-id'; // since post ID will not exist yet, just need to pass it something\n return cmb2_get_metabox( $metabox_id, $object_id );\n}", "public static function get_instance() {\n\n if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Envira_Gallery_Metaboxes ) ) {\n self::$instance = new Envira_Gallery_Metaboxes();\n }\n\n return self::$instance;\n\n }", "private function initializeMetabox()\n {\n\n $this->_metabox = new \\RWC\\Metabox( $this->get_library(), array(\n 'renderer' => 'vertical-tabs',\n 'id' => 'rwc-fundraiser-metabox',\n 'title' => 'Fundraiser Options',\n 'post_types' => array( self::POST_TYPE ),\n 'sections' => array(\n array(\n 'id' => 'payment',\n 'name' => 'Payment'\n ),\n array(\n 'id' => 'customer',\n 'name' => 'Customer Details'\n ),\n array(\n 'id' => 'dates',\n 'name' => 'Open/Close Dates'\n ),\n array(\n 'id' => 'products',\n 'name' => 'Products'\n )\n ),\n 'fields' => array(\n\n 'customer-name' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Customer Name'\n ),\n\n 'customer-business' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Business Name'\n ),\n\n 'address1' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Address 1'\n ),\n\n 'address2' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Address 2'\n ),\n\n 'city' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'City'\n ),\n\n 'state' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'State'\n ),\n\n 'zipcode' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Zipcode'\n ),\n\n 'paypal-api-username' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Username',\n 'description' => 'The email address associated with ' .\n 'the PayPal account that should receive payment ' .\n 'for this fundraiser.'\n ),\n 'paypal-api-key' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Key',\n 'description' => 'The account\\'s PayPal API password.'\n ),\n 'paypal-api-signature' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Signature',\n 'description' => 'The account\\'s PayPal API signature.'\n ),\n\n 'start-date' => array(\n 'type' => 'date',\n 'section' => 'dates',\n 'name' => 'Start Date',\n ),\n\n 'end-date' => array(\n 'type' => 'date',\n 'section' => 'dates',\n 'name' => 'End Date',\n ),\n\n 'products' => array(\n 'type' => 'fundraiser-products',\n 'section' => 'products',\n 'name' => 'Product Setup'\n )\n )\n ));\n }", "public function createDuplicableContainer( $title, $slug, $index = false )\n\t\t{\n\t\t\t$container = new THB_TabDuplicableFieldsContainer($title, $slug);\n\t\t\t$this->addContainer($container, $index);\n\n\t\t\treturn $container;\n\t\t}", "private function initMetaBox(){\n\t\t$path = get_template_directory() . '/sub/customfield/';\n\t\tif(function_exists('of_get_option')){\n\t\t\tif(of_get_option('is-seo',true)){\n\t\t\t\tnew WPO_MetaBox(array(\n\t\t\t\t 'id' => 'wpo_seo',\n\t\t\t\t 'title' => $this->l('SEO Fields'),\n\t\t\t\t 'types' => array('page','portfolio','post','video'),\n\t\t\t\t 'priority' => 'high',\n\t\t\t\t 'template' => $path . 'seo.php',\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_template',\n\t\t 'title' => $this->l('Advanced Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page-advanced.php'\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_pageconfig',\n\t\t 'title' => $this->l('Page Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page.php',\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_post',\n\t\t 'title' => $this->l('Embed Options'),\n\t\t 'types' => array('post','video'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'post.php',\n\t\t));\n\t}", "public function getFieldType($fieldSlug);", "function tabify_add_meta_boxes($post_type)\n {\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Options Fields:\n \n $fields->addFieldsToTab(\n 'Root.Options',\n [\n FieldSection::create(\n 'GalleryOptions',\n $this->fieldLabel('Gallery'),\n [\n CheckboxField::create(\n 'ShowImageCounts',\n $this->fieldLabel('ShowImageCounts')\n )\n ]\n )\n ]\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Main Fields:\n \n $fields->addFieldsToTab(\n 'Root.Main',\n [\n HTMLEditorField::create(\n 'HeaderContent',\n $this->fieldLabel('HeaderContent')\n )->setRows(10),\n HTMLEditorField::create(\n 'FooterContent',\n $this->fieldLabel('FooterContent')\n )->setRows(10)\n ]\n );\n \n // Insert Links Tab:\n \n $fields->insertAfter(\n Tab::create(\n 'Links',\n $this->fieldLabel('Links')\n ),\n 'Main'\n );\n \n // Add Links Fields:\n \n $fields->addFieldsToTab(\n 'Root.Links',\n [\n DropdownField::create(\n 'LinkMode',\n $this->fieldLabel('LinkMode'),\n $this->getLinkModeOptions()\n ),\n PageMultiselectField::create(\n 'LinkedPages',\n $this->fieldLabel('LinkedPages')\n )\n ]\n );\n \n // Create Options Fields:\n \n $fields->addFieldToTab(\n 'Root.Options',\n FieldSection::create(\n 'NavigationOptions',\n $this->fieldLabel('NavigationOptions'),\n [\n DropdownField::create(\n 'SortBy',\n $this->fieldLabel('SortBy'),\n $this->getSortByOptions()\n ),\n CheckboxField::create(\n 'ShowIcons',\n $this->fieldLabel('ShowIcons')\n )\n ]\n )\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "function get_chunk( $chunkslug='' ) \n{\n if ( $chunkslug != '' ) {\n\t // Will return a cached version or a new Query\n\t $chunk = Chunks::RenderChunk( $chunkslug ); \n\t \n\t /* Careful here. \n\t * Chunks have a 'description' field which we use just to describe to the user where this info is presented in a template. \n\t * So if we run $chunk->get_content() it could return the contents of the description field, \n\t * because Events use a field called 'description' instead of 'content'\n\t */\n\t return $chunk;\n }\n}", "function get_flexi_local_field( $id = '1234QWERasdf' ) {\n\treturn array(\n\t\tarray (\n\t\t\t'key' => $id . '_FC12qiX8p1A9',\n\t\t\t'label' => 'Components',\n\t\t\t'name' => 'components',\n\t\t\t'type' => 'flexible_content',\n\t\t\t'required' => '',\n\t\t\t'button_label' => 'Add component',\n\t\t\t'layouts' => array (\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_FC12qiX7p2A8',\n\t\t\t\t\t'name' => 'image',\n\t\t\t\t\t'label' => 'Image',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'max' => 1,\n\t\t\t\t\t'sub_fields' => array (\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX4p5b7',\n\t\t\t\t\t\t\t'label' => 'Content',\n\t\t\t\t\t\t\t'name' => 'tab1',\n\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX5p4b6',\n\t\t\t\t\t\t\t'label' => 'Image',\n\t\t\t\t\t\t\t'name' => 'image',\n\t\t\t\t\t\t\t'type' => 'image',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'return_format' => 'object',\n\t\t\t\t\t\t\t'preview_size' => 'full'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX2p1C1',\n\t\t\t\t\t\t\t'label' => 'Layouts',\n\t\t\t\t\t\t\t'name' => 'layout',\n\t\t\t\t\t\t\t'type' => 'flexible_content',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'button_label' => 'Add layout',\n\t\t\t\t\t\t\t'layouts' => array (\n\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX2p0C2',\n\t\t\t\t\t\t\t\t\t'name' => 'over-image',\n\t\t\t\t\t\t\t\t\t'label' => 'Over image',\n\t\t\t\t\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t\t\t\t'sub_fields' => array (\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX6i3B7',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'tab1',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Content',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX2p3c5',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Title',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'title',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 30\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX1p8c9',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Description',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'description',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 40\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q3X9p6c8',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Price',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'price',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q4X8p5c7',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Label',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'label',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX7i3B7',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'tab2',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX6i4B6',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'type',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Type',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => '33'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t'choices' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'Default',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 1',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 2',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 3'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t'default_values' => array( 0 )\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX3p1C3',\n\t\t\t\t\t\t\t\t\t'name' => 'mouseover',\n\t\t\t\t\t\t\t\t\t'label' => 'Mouseover',\n\t\t\t\t\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t\t\t\t'sub_fields' => array (\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX7P3c7',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'tab1',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Content',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q5X1p3c5',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Title',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'title',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 30\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q6X7p8c9',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Description',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'description',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 40\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q7X9p6c8',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Price',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'price',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12q8X8p5c7',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Label',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'label',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX7i3c7',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'tab2',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t\t\t\t\t'key' => $id . '_FC12qiX6i4c6',\n\t\t\t\t\t\t\t\t\t\t\t'name' => 'type',\n\t\t\t\t\t\t\t\t\t\t\t'label' => 'Type',\n\t\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'width' => '33'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t'choices' => array (\n\t\t\t\t\t\t\t\t\t\t\t\t'Default',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 1',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 2',\n\t\t\t\t\t\t\t\t\t\t\t\t'Type 3'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t'default_values' => array( 0 )\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t)\n\t\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\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX3p6b4',\n\t\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t\t'name' => 'tab2',\n\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX4p7b3',\n\t\t\t\t\t\t\t'label' => 'Height',\n\t\t\t\t\t\t\t'name' => 'height',\n\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => 33\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'choices' => array (\n\t\t\t\t\t\t\t\t'auto' => 'Auto',\n\t\t\t\t\t\t\t\t'scuare' => 'Square',\n\t\t\t\t\t\t\t\t'200' => '200 pixels',\n\t\t\t\t\t\t\t\t'300' => '300 pixels',\n\t\t\t\t\t\t\t\t'400' => '400 pixels',\n\t\t\t\t\t\t\t\t'500' => '500 pixels',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'default_value' => 'auto'\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_FC12qiX6p3A7',\n\t\t\t\t\t'name' => 'content',\n\t\t\t\t\t'label' => 'Content',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'max' => 2,\n\t\t\t\t\t'sub_fields' => array (\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX7k3N7',\n\t\t\t\t\t\t\t'name' => 'tab1',\n\t\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12q9X1p3c5',\n\t\t\t\t\t\t\t'label' => 'Title',\n\t\t\t\t\t\t\t'name' => 'title',\n\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => 30\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12q917p8c9',\n\t\t\t\t\t\t\t'label' => 'Description',\n\t\t\t\t\t\t\t'name' => 'description',\n\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'rows' => '1',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => 40\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12q329p6c8',\n\t\t\t\t\t\t\t'label' => 'Price',\n\t\t\t\t\t\t\t'name' => 'price',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12q328p5c7',\n\t\t\t\t\t\t\t'label' => 'Label',\n\t\t\t\t\t\t\t'name' => 'label',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => 15\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX7i3N7',\n\t\t\t\t\t\t\t'name' => 'tab2',\n\t\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t\t'required' => ''\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'key' => $id . '_FC12qiX6i4N6',\n\t\t\t\t\t\t\t'name' => 'type',\n\t\t\t\t\t\t\t'label' => 'Type',\n\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t'required' => '',\n\t\t\t\t\t\t\t'wrapper' => array (\n\t\t\t\t\t\t\t\t'width' => '33'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'choices' => array (\n\t\t\t\t\t\t\t\t'Default',\n\t\t\t\t\t\t\t\t'Type 1',\n\t\t\t\t\t\t\t\t'Type 2',\n\t\t\t\t\t\t\t\t'Type 3'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'default_values' => array( 0 )\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t);\n}", "protected function getMetaFields($field)\n\t{\n\t\t$termId = $_GET['tag_ID'];\n\t\t$key = 'slideshow-' . $termId . '-' . $field;\n\n\t\treturn get_option($key);\n\t}", "function acf_get_fields($parent)\n{\n}", "function dw_index_tab_fields($cf)\n{\n global $post;\n $tab_num = get_post_meta($post->ID, 'guidance_tabs', true);\n if (is_numeric($tab_num)) {\n for ($t = 0; $t < $tab_num; $t++) {\n $cf[] = 'guidance_tabs_' . $t . '_tab_title';\n\n $section_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_sections', true);\n\n if (is_numeric($section_num)) {\n for ($s = 0; $s < $section_num; $s++) {\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_title';\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_html_content';\n }\n }\n\n $links_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_links', true);\n\n if (is_numeric($links_num)) {\n for ($l = 0; $l < $links_num; $l++) {\n $cf[] = 'guidance_tabs_' . $t . '_links_' . $l . '_link_title';\n }\n }\n }\n }\n\n return $cf;\n}", "public function getCMSFields(){\n\t\t\t$fields = parent::getCMSFields();\n\t\t\t$fields->addFieldToTab('Root.Images', new UploadField('Photo'));\n\n\t\t\treturn $fields;\n\t\t}", "public static function render_meta_tab_container_open( $field_args, $field ) {\n\t\techo '<div id=\"' . $field->prop( 'id' ) . '\" class=\"rank-math-tabs\">';\n\t\tif ( Admin_Helper::is_term_profile_page() ) :\n\t\t\t?>\n\t\t\t<h2 class=\"rank-math-metabox-frame-title\"><?php esc_html_e( 'Rank Math', 'rank-math' ); ?></h2>\n\t\t<?php endif; ?>\n\t\t<div class=\"rank-math-tabs-navigation rank-math-custom wp-clearfix\">\n\n\t\t\t<?php\n\t\t\tforeach ( $field->args( 'tabs' ) as $id => $tab ) :\n\t\t\t\tif ( empty( $tab ) || ! Helper::has_cap( $tab['capability'] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<a href=\"#setting-panel-<?php echo $id; ?>\"><span class=\"<?php echo esc_attr( $tab['icon'] ); ?>\"></span><span class=\"rank-math-tab-text\"><?php echo $tab['title']; ?></span></a>\n\t\t\t<?php endforeach; ?>\n\t\t</div>\n\n\t\t<div class=\"rank-math-tabs-content rank-math-custom\">\n\t\t<?php\n\t\treturn $field;\n\t}", "function tomahk_shortcodes() {\n\treturn tomahk_shortcodes::instance();\n}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Insert Image Tab:\n \n $fields->insertAfter(\n Tab::create(\n 'Image',\n $this->fieldLabel('Image')\n ),\n 'Main'\n );\n \n // Create Image Fields:\n \n $fields->addFieldsToTab(\n 'Root.Image',\n [\n FieldSection::create(\n 'LinkImage',\n $this->fieldLabel('LinkImage'),\n [\n $image = UploadField::create(\n 'LinkImage',\n $this->fieldLabel('LinkImageFile')\n ),\n ViewportsField::create(\n 'LinkImageWidth',\n $this->fieldLabel('LinkImageWidth')\n )->setUseTextInput(true),\n ViewportsField::create(\n 'LinkImageHeight',\n $this->fieldLabel('LinkImageHeight')\n )->setUseTextInput(true),\n CheckboxField::create(\n 'InlineVector',\n $this->fieldLabel('InlineVector')\n )\n ]\n )\n ]\n );\n \n // Define Image Field:\n \n $image->setAllowedExtensions(['gif', 'jpg', 'jpeg', 'png', 'svg']);\n $image->setFolderName($this->getAssetFolder());\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getCMSFields() {\n $fields = parent::getCMSFields();\n\n\n $fields->addFIeldTOTab('Root.Main',new TextField('Title','Image Title'));\n $fields->addFIeldTOTab('Root.Main',new TextareaField('Description','Photo Description (Max 500 Charachters)'));\n $fields->addFIeldTOTab('Root.Main',new UploadField('Image','Photo'));\n\n return $fields;\n }", "function cmb2_kalypso_metaboxes() {\n\n $prefix = 'kalypso_';\n $front_page_ID = get_option('page_on_front');\n\n /*\n * Register meatabox - Slider post type\n * */\n $cmb = new_cmb2_box( array(\n 'id' => 'slider_metabox',\n 'title' => __( 'Slider settings', 'cmb2' ),\n 'object_types' => array( 'slide' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Text under the slide title', 'cmb2' ),\n 'id' => $prefix . 'text_under_slide_title',\n 'type' => 'text'\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Slide button url', 'cmb2' ),\n 'id' => $prefix . 'url_for_slide_button',\n 'type' => 'text_url'\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Slide button name', 'cmb2' ),\n 'id' => $prefix . 'name_for_slide_button',\n 'type' => 'text'\n ) );\n\n /*\n * Homepage metaboxes\n * */\n\n $cmb = new_cmb2_box( array(\n 'id' => 'frontpage_picture_section_metabox',\n 'title' => __( 'Picture Section', 'cmb2' ),\n 'object_types' => array( 'page' ),\n 'show_on'\t => array( 'id' => array( $front_page_ID, ) ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n // 'closed' => true, // Keep the metabox closed by default\n ) );\n\n /*\n * Repeeatable service section\n * */\n\n $group_field_id = $cmb->add_field( array(\n 'id' => $prefix . 'service_section',\n 'type' => 'group',\n 'description' => 'Generates service section items',\n // 'repeatable' => false, // use false if you want non-repeatable group\n 'options' => array(\n 'group_title' => __('Service {#}', 'cmb2'),\n 'add_button' => __('Add Another Service', 'cmb2'),\n 'remove_button' => __('Remove Service', 'cmb2'),\n 'sortable' => true,\n // 'closed' => true,\n ),\n ) );\n\n $cmb->add_group_field( $group_field_id, array(\n 'name' => __('Entry service name', 'cmb2'),\n 'id' => $prefix . 'service_title',\n 'type' => 'text',\n ) );\n\n $cmb->add_group_field( $group_field_id, array(\n 'name' => __('Description', 'cm2'),\n 'description' => 'Write a short description for this service',\n 'id' => $prefix . 'service_description',\n 'type' => 'textarea_small',\n ) );\n\n $cmb->add_group_field( $group_field_id, array(\n 'name' => __('Entry service image', 'cmb2'),\n 'id' => $prefix . 'service_image',\n 'type' => 'file',\n 'query_args' => array( 'type' => 'image' ),\n ) );\n\n $cmb->add_group_field( $group_field_id, array(\n 'name' => __('Service url', 'cmb2'),\n 'id' => $prefix . 'service_url',\n 'type' => 'text_url',\n ) );\n\n\n // Picture section 1\n\n $cmb->add_field( array(\n 'name' => __( 'Header 1 text', 'cmb2' ),\n 'id' => $prefix . 'header_picture_section_1',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Content 1 text', 'cmb2' ),\n 'id' => $prefix . 'content_picture_section_1',\n 'type' => 'textarea',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Button 1 name', 'cmb2' ),\n 'id' => $prefix . 'button_name_picture_section_1',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Button 1 url', 'cmb2' ),\n 'id' => $prefix . 'button_url_picture_section_1',\n 'type' => 'text_url',\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Image 1',\n 'desc' => 'Recomended image size: 960 x 641px',\n 'id' => $prefix . 'image_picture_section_1',\n 'type' => 'file',\n 'preview_size' => array( 100, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => 'Add or Upload image',\n 'remove_image_text' => 'Remove Image',\n ),\n ) );\n\n\n // Picture section 2\n $cmb->add_field( array(\n 'name' => __( 'Header 2 text', 'cmb2' ),\n 'id' => $prefix . 'header_picture_section_2',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Content 2 text', 'cmb2' ),\n 'id' => $prefix . 'content_picture_section_2',\n 'type' => 'textarea',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Button 2 name', 'cmb2' ),\n 'id' => $prefix . 'button_name_picture_section_2',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Button 2 url', 'cmb2' ),\n 'id' => $prefix . 'button_url_picture_section_2',\n 'type' => 'text_url',\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Image 2',\n 'desc' => 'Recomended image size: 960 x 641px',\n 'id' => $prefix . 'image_picture_section_2',\n 'type' => 'file',\n 'preview_size' => array( 100, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => 'Add or Upload image',\n 'remove_image_text' => 'Remove Image',\n ),\n ) );\n\n /*\n * Logotypes Carausel\n * */\n\n $cmb = new_cmb2_box( array(\n 'id' => 'logos_home_section_metabox',\n 'title' => __( 'Logotype Section', 'cmb2' ),\n 'object_types' => array( 'page' ),\n 'show_on'\t => array( 'id' => array( $front_page_ID, ) ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n 'closed' => false,\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Logotypes',\n 'desc' => '',\n 'id' => $prefix . 'logotype_home_section',\n 'type' => 'file_list',\n 'preview_size' => array( 160, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => __('Add or Upload Logos', 'cmb2'),\n 'remove_image_text' => __('Remove logo', 'cmb2'),\n 'file_text' => __('File', 'cmb2'),\n 'file_download_text' => __('Download', 'cmb2'),\n 'remove_text' => __('Remove logo', 'cmb2'),\n ),\n ) );\n\n /*\n * ABOUT US\n * */\n\n // Slider Section\n\n $cmb = new_cmb2_box( array(\n 'id' => $prefix . 'slider_section',\n 'title' => 'Slider Section',\n 'object_types' => array( 'page' ),\n 'show_on' => array( 'key' => 'page-template', 'value' => 'about-us.php' ),\n 'context' => 'normal', // 'normal', 'advanced', or 'side'\n 'priority' => 'high', // 'high', 'core', 'default' or 'low'\n 'show_names' => true, // Show field names on the left\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Header', 'cmb2' ),\n 'id' => $prefix . 'header_slider_section',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Description', 'cmb2' ),\n 'id' => $prefix . 'description_slider_section',\n 'type' => 'textarea',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Slider images',\n 'desc' => '',\n 'id' => $prefix . 'images_slider_section',\n 'type' => 'file_list',\n 'preview_size' => array( 160, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => __('Add or Upload Images', 'cmb2'),\n 'remove_image_text' => __('Remove image', 'cmb2'),\n 'file_text' => __('File', 'cmb2'),\n 'file_download_text' => __('Download', 'cmb2'),\n 'remove_text' => __('Remove image', 'cmb2'),\n ),\n ) );\n\n\n // Meet Team Section\n\n $cmb = new_cmb2_box( array(\n 'id' => $prefix . 'meet_team_section',\n 'title' => 'Meet Team Section',\n 'object_types' => array( 'page' ),\n 'show_on' => array( 'key' => 'page-template', 'value' => 'about-us.php' ),\n 'context' => 'normal', // 'normal', 'advanced', or 'side'\n 'priority' => 'high', // 'high', 'core', 'default' or 'low'\n 'show_names' => true, // Show field names on the left\n ) );\n\n $meet_team_section_id = $cmb->add_field( array(\n 'id' => 'meet_team_section_repeat_group',\n 'type' => 'group',\n 'options' => array(\n 'group_title' => __( 'Person {#}', 'cmb2' ),\n 'add_button' => __( 'Add Another Person', 'cmb2' ),\n 'remove_button' => __( 'Remove Person', 'cmb2' ),\n 'sortable' => true,\n 'closed' => true, \n ),\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __('Image', 'cmb2'),\n 'description' => __('Required field', 'cmb2'),\n 'id' => $prefix . 'image_meet_team_person',\n 'type' => 'file',\n 'preview_size' => array( 100, 160 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => 'Add or Upload image',\n 'remove_image_text' => 'Remove Image',\n ),\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __( 'Name', 'cmb2' ),\n 'description' => __('Required field', 'cmb2'),\n 'id' => $prefix . 'name_meet_team_person',\n 'type' => 'text'\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __( 'Position', 'cmb2' ),\n 'id' => $prefix . 'position_meet_team_person',\n 'type' => 'text'\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __( 'Description', 'cmb2' ),\n 'description' => __('Required field', 'cmb2'),\n 'id' => $prefix . 'desc_meet_team_person',\n 'type' => 'text_medium'\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __( 'Facebook url', 'cmb2' ),\n 'id' => $prefix . 'url_facebook_meet_team_person',\n 'type' => 'text_url'\n ) );\n\n $cmb->add_group_field( $meet_team_section_id, array(\n 'name' => __( 'Linkedin url', 'cmb2' ),\n 'id' => $prefix . 'linkedin_facebook_meet_team_person',\n 'type' => 'text_url'\n ) );\n\n /*\n * Contact Page\n * */\n\n // Map Location\n\n $cmb = new_cmb2_box( array(\n 'id' => $prefix . 'map_section',\n 'title' => 'Map location',\n 'object_types' => array( 'page' ),\n 'show_on' => array( 'key' => 'page-template', 'value' => 'contact.php' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Location', 'cmb2' ),\n 'desc' => __('Drag the marker to set the exact location'),\n 'id' => $prefix . 'location',\n 'type' => 'pw_map',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Address', 'cmb2' ),\n 'id' => $prefix . 'address',\n 'type' => 'textarea',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Phone number', 'cmb2' ),\n 'id' => $prefix . 'phone_number',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Email address', 'cmb2' ),\n 'id' => $prefix . 'email_address',\n 'type' => 'text_email',\n 'show_on_cb' => 'cmb2_hide_if_no_cats',\n ) );\n\n /*\n * Blog Page\n * */\n $cmb = new_cmb2_box( array(\n 'id' => $prefix . 'header_blog_section',\n 'title' => 'Header blog section',\n 'object_types' => array( 'page' ),\n 'show_on' => array( 'key' => 'id', 'value' => array( get_option( 'page_for_posts' ) ) ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n ) );\n\n $cmb->add_field( array(\n 'name' => __( 'Header text', 'cmb2' ),\n 'id' => $prefix . 'header_blog_title',\n 'type' => 'text'\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Header image',\n 'desc' => 'Recomended image size: 1920 x 400px',\n 'id' => $prefix . 'image_blog_header',\n 'type' => 'file',\n 'preview_size' => array( 400, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => 'Add or Upload image',\n 'remove_image_text' => 'Remove Image',\n ),\n ) );\n\n /*\n * Category Page\n * */\n $cmb = new_cmb2_box( array(\n 'id' => $prefix . 'header_category_section',\n 'title' => 'Header category section',\n 'object_types' => array( 'term' ),\n 'taxonomies' => array( 'category' )\n ) );\n\n $cmb->add_field( array(\n 'name' => 'Header image',\n 'desc' => 'Recomended image size: 1920 x 250px',\n 'id' => $prefix . 'image_category_header',\n 'type' => 'file',\n 'preview_size' => array( 400, 100 ),\n 'query_args' => array( 'type' => 'image' ),\n 'text' => array(\n 'add_upload_files_text' => 'Add or Upload image',\n 'remove_image_text' => 'Remove Image',\n ),\n ) );\n\n\n}", "static function metabox($post){\n\t\twp_nonce_field( 'flat-options', 'flat-options_nonce' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\techo '<style>';\n\t\techo '.admin-meta-input{display:block; margin-top: 10px;}';\n\t\techo 'div.field-holder{display: block;float: left; margin: 10px 20px; height: 80px;}';\n\t\techo '.field-block{display: inline-block;clear: both;float: none;}';\n\t\techo '.postbox .inside .field-block h2{padding: 8px 12px;font-weight: 600;font-size: 18px;margin: 0;line-height: 1.4}';\n\t\techo '</style>';\n\t\t\t\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Licitálással kapcsolatos adatok</h2>';\n\t\tforeach ($fieldblocks['licit'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Hely adatok</h2>';\n\t\tforeach ($fieldblocks['location'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlan adatok és településrendezési előírások</h2>';\n\t\tforeach ($fieldblocks['parameters'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlanjogi jellemzők</h2>';\n\t\tforeach ($fieldblocks['info'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Közművek, energiaellátás, telekommunikáció</h2>';\n\t\tforeach ($fieldblocks['sources'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\n\t\t\t\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Építmény (épület) jellemzői</h2>';\n\t\tforeach ($fieldblocks['building'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\techo \"\n\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('.datepicker').datepicker();\t\n\t\t\t\t});\t\n\t\t\t</script>\t\n\t\t\";\n\t\t\n\t\techo '<br clear=\"all\">';\n\t\t\n }", "function rng_METANAME_metabox_init() {\n}", "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "function acf_get_instance($class = '')\n{\n}", "function acf_get_sub_field($id, $field)\n{\n}", "public function lazyload_metabox() {\r\n\t\t$this->view(\r\n\t\t\t'lazyload/meta-box',\r\n\t\t\tarray(\r\n\t\t\t\t'settings' => $this->settings->get_setting( WP_SMUSH_PREFIX . 'lazy_load' ),\r\n\t\t\t\t'cpts' => get_post_types( // custom post types.\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'public' => true,\r\n\t\t\t\t\t\t'_builtin' => false,\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'objects',\r\n\t\t\t\t\t'and'\r\n\t\t\t\t),\r\n\t\t\t)\r\n\t\t);\r\n\t}", "function accueil_metabox() {\n\t$prefix = '_accueil_titre_';\n\t\n\t$cmb_accueil = new_cmb2_box ( array (\n\t\t\t'id' => $prefix . 'metabox',\n\t\t\t'title' => __ ( 'TITRE', 'cmb2' ),\n\t\t\t'object_types' => array (\n\t\t\t\t\t'page' \n\t\t\t) \n\t) );\n\t\n\t$cmb_accueil->add_field ( array (\n\t\t\t'name' => 'Sur-titre',\n\t\t\t'desc' => 'Texte au dessus du titre de la page',\n\t\t\t'type' => 'text_medium',\n\t\t\t'id' => $prefix . 'titre' \n\t) );\n\t\n\t$cmb_accueil->add_field ( array (\n\t\t\t'name' => 'Description',\n\t\t\t'desc' => 'Description',\n\t\t\t'default' => '',\n\t\t\t'id' => $prefix . 'text',\n\t\t\t'type' => 'wysiwyg',\n\t\t\t'options' => array () \n\t) );\n}", "public function getCMSFields()\n {\n // Create Field Tab Set:\n \n $fields = FieldList::create(TabSet::create('Root'));\n \n // Create Main Tab:\n \n $fields->findOrMakeTab('Root.Main', $this->fieldLabel('Main'));\n \n // Create Class Field:\n \n if (!$this->isInDB()) {\n \n // Define Placeholder:\n \n $placeholder = _t(__CLASS__ . '.SELECTTYPETOCREATE', '(Select type to create)');\n \n // Create Dropdown Field:\n \n $classField = DropdownField::create(\n 'ClassName',\n $this->fieldLabel('ClassName'),\n $this->getClassNameOptions()\n )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder);\n \n } else {\n \n // Create Read-Only Field:\n \n $classField = ReadonlyField::create(\n 'Type',\n $this->fieldLabel('Type')\n );\n \n }\n \n // Add Class Field to Main Tab:\n \n $fields->addFieldToTab('Root.Main', $classField);\n \n // Apply Extensions:\n \n if ($this->isInDB()) {\n \n // Extend Field Objects:\n \n $this->extend('updateCMSFields', $fields);\n \n }\n \n // Answer Field Objects:\n \n return $fields;\n }", "public function getMetaboxes()\n\t{\n\t\treturn $this->_metaboxes;\n\t}", "private function get_definition( $slug = null ) {\n\n\tif( empty( $slug ) ) {\n\t return false;\n\t}\n\t$arg = array(\n\t 'name' => sanitize_key( $slug ),\n 'post_type' => 'form',\n 'post_status' => 'publish',\n 'numberposts' => 1\n );\n $form_definition = get_posts( $arg );\n\n\tif( !empty( $form_definition ) ) {\n\t return $this->get_form_meta( $form_definition[0]->ID );\n\t}\n\tdbug( 'Invalid form name (slug) ' . $slug );\n return false;\n }", "public function getFields()\r\n {\r\n $effects = [\r\n \"fadeInUp\"=>\"fadeInUp\",\r\n \"fadeInDown\"=>\"fadeInDown\",\r\n \"fadeInLeft\"=>\"fadeInLeft\",\r\n \"fadeInRight\"=>\"fadeInRight\",\r\n \"lightSpeedIn\"=>\"lightSpeedIn\",\r\n \"slideInUp\"=>\"slideInUp\",\r\n \"slideInDown\"=>\"slideInDown\",\r\n \"slideInLeft\"=>\"slideInLeft\",\r\n \"slideInRight\"=>\"slideInRight\",\r\n \"zoomIn\"=>\"zoomIn\"\r\n ];\r\n \r\n $fields = [\r\n [\r\n 'name' => 'basic_information',\r\n 'type' => 'group',\r\n 'visible' => 'ce',\r\n 'tabs' => [\r\n [\r\n 'name' => 'slide_information',\r\n 'type' => 'tab',\r\n 'visible' => 'ce',\r\n 'fields' => [\r\n [\r\n 'name' => 'id',\r\n 'type' => 'text',\r\n 'visible' => 'io',\r\n ],\r\n [\r\n 'name' => 'slider_id',\r\n 'display' => 'slider',\r\n 'type' => 'relation',\r\n 'relation' => ['slider', 'name'],\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'file',\r\n 'type' => 'image',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'caption_1',\r\n 'type' => 'text',\r\n 'visible' => 'ice',\r\n ],\r\n [\r\n 'name' => 'caption_2',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'caption_3',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'call_to_action_text',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'call_to_action_url',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'open_in_new_window',\r\n 'type' => 'select',\r\n 'data' => ['1' => trans('slider::panel.yes'), '0' => trans('slider::panel.no')],\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'position',\r\n 'type' => 'position',\r\n 'visible' => 'ce',\r\n ]\r\n\r\n ]\r\n ],\r\n [\r\n 'name' => 'options',\r\n 'type' => 'tab',\r\n 'visible' => 'ce',\r\n 'fields' => [\r\n [\r\n 'name' => 'options[caption_1][delay]',\r\n 'display' => 'caption_1_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_1][color]',\r\n 'display' => 'caption_1_color',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_1][effect]',\r\n 'display' => 'caption_1_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_2][delay]',\r\n 'display' => 'caption_2_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_2][color]',\r\n 'display' => 'caption_2_color',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_2][effect]',\r\n 'display' => 'caption_2_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_3][delay]',\r\n 'display' => 'caption_3_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_3][color]',\r\n 'display' => 'caption_3_color',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_3][effect]',\r\n 'display' => 'caption_3_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[call_to_action][delay]',\r\n 'display' => 'call_to_action_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[call_to_action][effect]',\r\n 'display' => 'call_to_action_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n ]\r\n ]\r\n ]\r\n ]\r\n ];\r\n return $fields;\r\n }", "function quadnotion_portfolio_metabox() {\n\n\t// Start with an underscore to hide fields from custom fields list\n\t$prefix = 'quadnotion_post_';\n\n\t/**\n\t * Metabox to be displayed on a single page ID\n\t */\n\t$portfolio_meta = new_cmb2_box( array(\n\t\t'id' => $prefix . 'portfolio_metabox',\n\t\t'title' => esc_html__( 'Portfolio Options', 'cmb2' ),\n\t\t'object_types' => array( 'quadnotion-portfolio' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true,\n\t) );\n\n\n\t$portfolio_meta->add_field( array(\n\t'name' => esc_html__('Category:'),\n\t'desc' => '',\n\t'id' => $prefix . 'category',\n\t'type' => 'text_medium'\n) );\n\n\n\n\t$portfolio_meta->add_field( array(\n\t'name' => 'Select Layout',\n\t'id' => $prefix . 'layout',\n\t'type' => 'radio_inline',\n\t'options' => array(\n\t\t'one-half' => __( 'One Half', 'cmb2' ),\n\t\t'one-third' => __( 'One Third', 'cmb2' ),\n\t\t'two-third' => __( 'Two third', 'cmb2' ),\n\t),\n\t'default' => 'one-half',\n) );\n\n}", "function create_metabox() {\n\t$prefix = '_cmb_';\n\t$metabox_var = new_cmb2_box( array(\n\t\t'id' => $prefix . 'metabox_name',\n\t\t'title' => __( 'Metabox Title', 'cmb2' ),\n\t\t'object_types' => array( 'posttype'), // Post type\n\t));\n\n\t// Add your fields below...\n\t$metabox_var->add_field( array(\n\n\t));\n}", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }", "function get_editor_local_field( $id = '1234QWERasdf' ) {\n\treturn array (\n\t\tarray (\n\t\t\t'key' => $id . '_T121zN1cd48f4',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'tab_content',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_N121z7Ocd48f1',\n\t\t\t'label' => 'Content editor',\n\t\t\t'name' => 'editor',\n\t\t\t'type' => 'wysiwyg',\n\t\t\t'required' => '',\n\t\t\t'tabs' => 'all',\n\t\t\t'toolbar' => 'full',\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T421zN1cd48f3',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'tab_settings',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T4MtzN1cd48f3',\n\t\t\t'label' => 'Margins',\n\t\t\t'name' => 'margins',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'marg_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t\t'wrapper' => array(\n\t\t\t\t'width' => 50\n\t\t\t)\n\t\t),\n\t);\n}", "function pro_expert_finder_metabox() {\n\n\t/*-------------------------------------------\n\t * Slider metabox\n\t -------------------------------------------*/\n\t$pro_Experts_slider = new_cmb2_box( array(\n\t\t'id' => 'pro_expert_slider_metabox_id',\n\t\t'title' => __( 'Slider', 'proexpert' ),\n\t\t'object_types' => array( 'pro-experts' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t'closed' => true, // true to have the groups closed by default\n\t) );\n\n\t$pro_expert_profession_slider = $pro_Experts_slider->add_field( array(\n\t'id' => 'pro_expert_profession_slider_group',\n\t'type' => 'group',\n\t// 'repeatable' => false, // use false if you want non-repeatable group\n\t'options' => array(\n\t\t'group_title' => __( 'Slider {#}', 'proexpert' ), // since version 1.1.4, {#} gets replaced by row number\n\t\t'add_button' => __( 'Add Another Slider', 'proexpert' ),\n\t\t'remove_button' => __( 'Remove Slider', 'proexpert' ),\n\t\t'sortable' => true,\n\t\t'closed' => true, // true to have the groups closed by default\n\t\t'remove_confirm' => esc_html__( 'Are you sure you want to remove?', 'proexpert' ), // Performs confirmation before removing group.\n\t\t),\n\t) );\n\n\n\t// Regular text field\n\t$pro_Experts_slider->add_group_field($pro_expert_profession_slider, array(\n\t\t'name' => __( 'Slide Image', 'proexpert' ),\n\t\t'desc' => __( 'Please upload your slider image, recommended dimension full width like 1920px', 'proexpert' ),\n\t\t'id' => 'professional-expert-slider-image',\n\t\t'type' => 'file',\n\t) );\n\n\t// Regular text field\n\t$pro_Experts_slider->add_group_field($pro_expert_profession_slider, array(\n\t\t'name' => __( 'Slider Text', 'proexpert' ),\t\t\n\t\t'id' => 'professional-expert-slider-text',\n\t\t'type' => 'text',\n\t) );\n\t// Regular text field\n\t$pro_Experts_slider->add_group_field($pro_expert_profession_slider, array(\n\t\t'name' => __( 'Learn Text', 'proexpert' ),\t\t\n\t\t'id' => 'professional-expert-slider-learn-text',\n\t\t'type' => 'text',\n\t\t'default'\t=> 'Learn More',\n\t) );\n\t// Regular text field\n\t$pro_Experts_slider->add_group_field($pro_expert_profession_slider, array(\n\t\t'name' => __( 'Learn URL', 'proexpert' ),\t\t\n\t\t'id' => 'professional-expert-slider-learn-url',\n\t\t'type' => 'text_url',\t\t\n\t) );\n\n\t/*-------------------------------------------\n\t * General the metabox\n\t -------------------------------------------*/\n\t$pro_Experts = new_cmb2_box( array(\n\t\t'id' => 'pro_expert_metabox_id',\n\t\t'title' => __( 'Professional Information', 'proexpert' ),\n\t\t'object_types' => array( 'pro-experts' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t'closed' => true, // true to have the groups closed by default\n\t) );\n\n\t// Regular text field\n\t$pro_Experts->add_field( array(\n\t\t'name' => __( 'Location', 'proexpert' ),\n\t\t'desc' => __( 'Please write this professional expert location state/city', 'proexpert' ),\n\t\t'id' => 'pro-experts-location',\n\t\t'type' => 'text',\n\t) );\n\n\t// Regular text field\n\t$pro_Experts->add_field( array(\n\t\t'name' => __( 'Short Description', 'proexpert' ),\n\t\t'desc' => __( 'Please write something about this professional expert', 'proexpert' ),\n\t\t'id' => 'pro_expert-short-desc',\n 'type' => 'wysiwyg',\n 'options' => array(\n 'media_buttons' => false,\n 'textarea_rows' => get_option('default_post_edit_rows', 5)\n ),\n\t) );\n\n\t// Regular text field\n\t$pro_Experts->add_field( array(\n\t\t'name' => __( 'Picture', 'proexpert' ),\n\t\t'desc' => __( 'Please upload your professional expert profile picture, recommended dimension 200x200px', 'proexpert' ),\n\t\t'id' => 'professional-expert-profile-picture',\n\t\t'type' => 'file',\n\t) );\n\n\t$pro_expert_profession = $pro_Experts->add_field( array(\n\t'id' => 'pro_expert_profession_group',\n\t'type' => 'group',\n\t// 'repeatable' => false, // use false if you want non-repeatable group\n\t'options' => array(\n\t\t'group_title' => __( 'Profession {#}', 'proexpert' ), // since version 1.1.4, {#} gets replaced by row number\n\t\t'add_button' => __( 'Add Another profession', 'proexpert' ),\n\t\t'remove_button' => __( 'Remove profession', 'proexpert' ),\n\t\t'sortable' => true,\n\t\t'closed' => true, // true to have the groups closed by default\n\t\t'remove_confirm' => esc_html__( 'Are you sure you want to remove?', 'proexpert' ), // Performs confirmation before removing group.\n\t\t),\n\t) );\n\n\t// Id's for group's fields only need to be unique for the group. Prefix is not needed.\n\t$pro_Experts->add_group_field( $pro_expert_profession, array(\n\t\t'name' => 'Professoin Name',\n\t\t'id' => 'pro_expert_professoin_name',\n\t\t'type' => 'text',\t\t\n\t) );\n\n\t$pro_Experts->add_group_field( $pro_expert_profession, array(\n\t\t'name' => 'Description',\n\t\t'description' => 'Write a short description for this professoin',\n\t\t'id' => 'pro_expert_professoin_content',\n\t\t'type' => 'textarea_small',\n\t) );\n\n\n\n\t/*-------------------------------------------\n\t * Social metabox\n\t -------------------------------------------*/\n\t$pro_Experts_social_profile = new_cmb2_box( array(\n\t\t'id' => 'pro_expert_social_metabox_id',\n\t\t'title' => __( 'Social Information', 'proexpert' ),\n\t\t'object_types' => array( 'pro-experts' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t'closed' => true, // true to have the groups closed by default\n\t) );\n\n\t// Regular text field\n\t$pro_Experts_social_profile->add_field( array(\n\t\t'name' => __( 'Facebook', 'proexpert' ),\n\t\t'desc' => __( 'Please Input expert facebook profile url', 'proexpert' ),\n\t\t'id' => 'pro-experts-facebook-url',\n\t\t'type' => 'text_url',\n\t) );\n\t// Regular text field\n\t$pro_Experts_social_profile->add_field( array(\n\t\t'name' => __( 'Twitter', 'proexpert' ),\n\t\t'desc' => __( 'Please Input expert twitter profile url', 'proexpert' ),\n\t\t'id' => 'pro-experts-twitter-url',\n\t\t'type' => 'text_url',\n\t) );\n\t// Regular text field\n\t$pro_Experts_social_profile->add_field( array(\n\t\t'name' => __( 'LinkedIn', 'proexpert' ),\n\t\t'desc' => __( 'Please Input expert linkedIn profile url', 'proexpert' ),\n\t\t'id' => 'pro-experts-linkedin-url',\n\t\t'type' => 'text_url',\n\t) );\n\t// Regular text field\n\t$pro_Experts_social_profile->add_field( array(\n\t\t'name' => __( 'Instagram', 'proexpert' ),\n\t\t'desc' => __( 'Please Input expert instagram profile url', 'proexpert' ),\n\t\t'id' => 'pro-experts-instagram-url',\n\t\t'type' => 'text_url',\n\t) );\n\n\n\t/*-------------------------------------------\n\t * Value metabox\n\t --------------------------------------------*/\n\t$pro_expert_value = new_cmb2_box( array(\n\t\t'id' => 'pro_expert_value_metabox_id',\n\t\t'title' => __( 'Value', 'proexpert' ),\n\t\t'object_types' => array( 'pro-experts' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t'closed' => true, // true to have the groups closed by default\n\t) );\n\n\t$pro_expert_value_field = $pro_expert_value->add_field( array(\n\t'id' => 'pro_expert_value_group',\n\t'type' => 'group',\n\t// 'repeatable' => false, // use false if you want non-repeatable group\n\t'options' => array(\n\t\t'group_title' => __( 'Value {#}', 'proexpert' ), // since version 1.1.4, {#} gets replaced by row number\n\t\t'add_button' => __( 'Add Another Value', 'proexpert' ),\n\t\t'remove_button' => __( 'Remove Value', 'proexpert' ),\n\t\t'sortable' => true,\n\t\t'closed' => true, // true to have the groups closed by default\n\t\t'remove_confirm' => esc_html__( 'Are you sure you want to remove?', 'proexpert' ), // Performs confirmation before removing group.\n\t\t),\n\t) );\n\n\t// Id's for group's fields only need to be unique for the group. Prefix is not needed.\n\t$pro_expert_value->add_group_field( $pro_expert_value_field, array(\n\t\t'name' => 'Value Title',\n\t\t'id' => 'pro_expert_value_title',\n\t\t'type' => 'text',\t\t\n\t) );\n\n\t$pro_expert_value->add_group_field( $pro_expert_value_field, array(\n\t\t'name' => 'Description',\n\t\t'description' => 'Write a short description for this value',\n\t\t'id' => 'pro_expert_value_content',\n\t\t'type' => 'textarea_small',\n\t) );\n\n\n\n\t/*-------------------------------------------\n\t * Skills metabox\n\t -------------------------------------------*/\n\t$pro_expert_skills = new_cmb2_box( array(\n\t\t'id' => 'pro_expert_skills_metabox_id',\n\t\t'title' => __( 'Skills', 'proexpert' ),\n\t\t'object_types' => array( 'pro-experts' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t'closed' => true, // true to have the groups closed by default\n\t) );\n\t// Regular text field\n\t$pro_expert_skills->add_field( array(\n\t\t'name' => __( 'Short Description', 'proexpert' ),\n\t\t'desc' => __( 'Please write something about this professional expert', 'proexpert' ),\n\t\t'id' => 'pro_expert-skill-short-desc',\n 'type' => 'wysiwyg',\n 'options' => array(\n 'media_buttons' => false,\n 'textarea_rows' => get_option('default_post_edit_rows', 5)\n ),\n\t) );\n\n\t// Regular text field\n\t$pro_expert_skills->add_field( array(\n\t\t'name' => __( 'Contact URL', 'proexpert' ),\n\t\t'desc' => __( 'Contact url', 'proexpert' ),\n\t\t'id' => 'pro_expert_skill_contact_url',\n\t\t'type' => 'text_url',\n\t) );\n\n\t$pro_expert_profession = $pro_expert_skills->add_field( array(\n\t'id' => 'pro_expert_skills_group',\n\t'type' => 'group',\n\t// 'repeatable' => false, // use false if you want non-repeatable group\n\t'options' => array(\n\t\t'group_title' => __( 'Skill {#}', 'proexpert' ), // since version 1.1.4, {#} gets replaced by row number\n\t\t'add_button' => __( 'Add Another Skill', 'proexpert' ),\n\t\t'remove_button' => __( 'Remove skill', 'proexpert' ),\n\t\t'sortable' => true,\n\t\t'closed' => true, // true to have the groups closed by default\n\t\t'remove_confirm' => esc_html__( 'Are you sure you want to remove?', 'proexpert' ), // Performs confirmation before removing group.\n\t\t),\n\t) );\n\n\t// Id's for group's fields only need to be unique for the group. Prefix is not needed.\n\t$pro_expert_skills->add_group_field( $pro_expert_profession, array(\n\t\t'name' => 'Skill Name',\n\t\t'id' => 'pro_expert_skill_name',\n\t\t'type' => 'text',\t\t\n\t) );\n\n\t$pro_expert_skills->add_group_field( $pro_expert_profession, array(\n\t\t'name' => 'Percent',\n\t\t'description' => 'Input Number for how much percent do you have experience with this skill, like 80',\n\t\t'id' => 'pro_expert_skill_percent',\n\t\t'type' => 'text_small',\n\t) );\n\n\n\n\t/*-------------------------------------------\n\t * Resume metabox\n\t -------------------------------------------*/\n\t$pro_expert_resume = new_cmb2_box( array(\n\t\t'id' => 'pro_expert_resume_metabox_id',\n\t\t'title' => __( 'Resume', 'proexpert' ),\n\t\t'object_types' => array( 'pro-experts' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t'closed' => true, // true to have the groups closed by default\n\t) );\n\t// Regular text field\n\t$pro_expert_resume->add_field( array(\n\t\t'name' => __( 'Short Description', 'proexpert' ),\n\t\t'desc' => __( 'Please write something about this resume', 'proexpert' ),\n\t\t'id' => 'pro_expert-result-short-desc',\n 'type' => 'textarea_small',\n\t) );\n\n\t// Regular text field\n\t$pro_expert_resume->add_field( array(\n\t\t'name' => __( 'Download', 'proexpert' ),\n\t\t'desc' => __( 'Download url', 'proexpert' ),\n\t\t'id' => 'pro_expert_resume_download_url',\n\t\t'type' => 'text_url',\n\t) );\n\n\n\n\t/*-------------------------------------------\n\t * Education metabox\n\t -------------------------------------------*/\n\t$pro_expert_education = new_cmb2_box( array(\n\t\t'id' => 'pro_expert_education_metabox_id',\n\t\t'title' => __( 'Education', 'proexpert' ),\n\t\t'object_types' => array( 'pro-experts' ), // Post type\t\t\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t'closed' => true, // true to have the groups closed by default\n\t) );\n\t// Regular text field\n\t$pro_expert_education->add_field( array(\n\t\t'name' => __( 'Short Description', 'proexpert' ),\n\t\t'desc' => __( 'Please write something about this professional expert', 'proexpert' ),\n\t\t'id' => 'pro_expert-education-short-desc',\n 'type' => 'wysiwyg',\n 'options' => array(\n 'media_buttons' => false,\n 'textarea_rows' => get_option('default_post_edit_rows', 5)\n ),\n\t) );\n\t$pro_expert_education_group = $pro_expert_education->add_field( array(\n\t'id' => 'pro_expert_education_group',\n\t'type' => 'group',\n\t 'repeatable' => true, // use false if you want non-repeatable group\n\t'options' => array(\n\t\t'group_title' => __( 'Education {#}', 'proexpert' ), // since version 1.1.4, {#} gets replaced by row number\n\t\t'add_button' => __( 'Add Education', 'proexpert' ),\n\t\t'remove_button' => __( 'Remove Education', 'proexpert' ),\n\t\t'sortable' => true,\n\t\t'closed' => true, // true to have the groups closed by default\n\t\t'remove_confirm' => esc_html__( 'Are you sure you want to remove?', 'proexpert' ), // Performs confirmation before removing group.\n\t\t),\n\t) );\n\n\t// Id's for group's fields only need to be unique for the group. Prefix is not needed.\n\t$pro_expert_education->add_group_field( $pro_expert_education_group, array(\n\t\t'name' => 'Education Name',\n\t\t'id' => 'pro_expert_education_name',\n\t\t'type' => 'text',\t\t\n\t) );\n\n\t// Id's for group's fields only need to be unique for the group. Prefix is not needed.\n\t$pro_expert_education->add_group_field( $pro_expert_education_group, array(\n\t\t'name' => 'Collage Name',\n\t\t'id' => 'pro_expert_collage_name',\n\t\t'type' => 'text',\t\t\n\t) );\n\n\t// Id's for group's fields only need to be unique for the group. Prefix is not needed.\n\t$pro_expert_education->add_group_field( $pro_expert_education_group, array(\n\t\t'name' => 'Education Year',\n\t\t'id' => 'pro_expert_education_year',\n\t\t'type' => 'text_date',\t\t\n\t) );\n\t// Id's for group's fields only need to be unique for the group. Prefix is not needed.\n\t$pro_expert_education->add_group_field( $pro_expert_education_group, array(\n\t\t'name' => 'GPA',\n\t\t'id' => 'pro_expert_education_gpa',\n\t\t'type' => 'text_small',\t\t\n\t) );\n\n\t// Id's for group's fields only need to be unique for the group. Prefix is not needed.\n\t$pro_expert_education->add_group_field( $pro_expert_education_group, array(\n\t\t'name' => 'GPA',\n\t\t'id' => 'pro_expert_education_desc',\n\t\t'type' => 'textarea_small',\t\t\n\t) );\n\n\n\n\t/*-------------------------------------------\n\t * Review metabox\n\t -------------------------------------------*/\n\t$pro_expert_review = new_cmb2_box( array(\n\t\t'id' => 'pro_expert_review_metabox_id',\n\t\t'title' => __( 'Review For Professional Expert', 'proexpert' ),\n\t\t'object_types' => array( 'pro-expert-review' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t) );\n\n\t// Regular text field\n\t$pro_expert_review->add_field( array(\n\t\t'name' => __( 'Select Expert', 'proexpert' ),\n\t\t'desc' => __( 'Please select professional expert, for whom this review?', 'proexpert' ),\n\t\t'id' => 'pro_expert_select_for_review',\n 'type' => 'select',\n 'show_option_none' => true,\n 'options_cb' => 'pro_expert_finder_list',\n\t) );\n\t\n\n\t// Regular text field\n\t$pro_expert_review->add_field( array(\n\t\t'name' => __( 'Pro Expert ID (Optional)', 'proexpert' ),\n\t\t'desc' => __( 'Please Input Pro Expert ID, If not\\' found! Pro Expert in above the list, You can find the professional expert id from professional expert list after hover.', 'proexpert' ),\n\t\t'id' => 'pro_expert_unique_id',\n 'type' => 'text_small',\n\t) );\n\n\n\n}", "function get_oembed_local_field( $id = '1234QWERasdf' ) {\n\treturn array (\n\t\tarray (\n\t\t\t'key' => $id . '_T9X1zN1cd48f3',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'tab_content',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_N1Viz71cd48f1',\n\t\t\t'label' => 'Video',\n\t\t\t'name' => 'video',\n\t\t\t'type' => 'oembed',\n\t\t\t'required' => ''\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_T9X5zN1cd48f3',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'tab_settings',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T9X1zN6cd48f3',\n\t\t\t'label' => 'Margins',\n\t\t\t'name' => 'margins',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'marg_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t\t'wrapper' => array(\n\t\t\t\t'width' => 50\n\t\t\t)\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T9XSzD1cd47f4',\n\t\t\t'label' => 'Width',\n\t\t\t'name' => 'width',\n\t\t\t'type' => 'select',\n\t\t\t'required' => 0,\n\t\t\t'choices' => array (\n\t\t\t\t'auto' => 'Auto',\n\t\t\t\t'full' => 'Full'\n\t\t\t),\n\t\t\t'default_value' => 'auto',\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t),\n\t);\n}", "public function getCMSFields() {\n\t\t$fields = parent::getCMSFields();\n\t\t$fields->addFieldToTab(\"Root.Content.PageRatingWidget\", new WidgetAreaEditor( 'PageRatingWidget' ) );\n\t\t\n\t\treturn $fields;\n\t}", "public static function getTabById($tab_id) {\r\n $result = db_select('{md_megamenu_tabs}', 'mgmt')\r\n ->fields('mgmt')\r\n ->condition('tid', $tab_id)\r\n ->execute()\r\n ->fetchAll(PDO::FETCH_CLASS, 'MDMegaTab');\r\n\r\n if (!count($result)) {\r\n return NULL;\r\n }\r\n\r\n foreach ($result as &$tab) {\r\n if ($tab instanceof stdClass)\r\n $tab = _megamenu_recast('MDMegaTab', $tab);\r\n\r\n $tab->initialize();\r\n }\r\n\r\n return array_shift($result);\r\n }", "function carrousel_metaboxes(){\n add_meta_box(\"MonCarrousel\", \"lien\", \"carrousel_metabox\");\n}", "function acf_get_field_post($id = 0)\n{\n}", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Options Fields:\n \n $fields->addFieldsToTab(\n 'Root.Options',\n [\n FieldSection::create(\n 'FeedOptions',\n $this->fieldLabel('FeedOptions'),\n [\n ToggleGroup::create(\n 'FeedEnabled',\n $this->fieldLabel('FeedEnabled'),\n [\n TextField::create(\n 'FeedTitle',\n $this->fieldLabel('FeedTitle')\n ),\n TextField::create(\n 'FeedDescription',\n $this->fieldLabel('FeedDescription')\n ),\n NumericField::create(\n 'FeedNumberOfArticles',\n $this->fieldLabel('FeedNumberOfArticles')\n )\n ]\n )\n ]\n )\n ]\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "function pacz_woocommerce_view_demo() {\t\t\n \n\tadd_filter( 'cmb_meta_boxes', 'pacz_woo_metaboxes' );\n \n\tfunction pacz_woo_metaboxes( $meta_boxes ) {\n\t\n\t\t//global $prefix;\n\t\t$prefix = '_pacz_'; // Prefix for all fields\n\t\t\n\t\t// Add metaboxes to the 'Product' CPT\n\t\t$meta_boxes[] = array(\n\t\t\t'id' => 'pacz_woo_metabox',\n\t\t\t'title' => 'demo url',\n\t\t\t'pages' => array( 'product' ), // Which post type to associate with?\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'default',\n\t\t\t'show_names' => true, \t\t\t\t\t\n\t\t\t'fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'url', 'classiadspro' ),\n\t\t\t\t\t'desc' => __( 'demo url', 'classiadspro' ),\n\t\t\t\t\t'id' => $prefix . 'pacz_demo_url',\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n \n\t\treturn $meta_boxes;\n\t\t\n}\n?>\n<div class=\"demo-button\">\n\t<a href=\"\">View Demo</a>\n</div>\n<?php\n}", "function igv_cmb_metaboxes() {\n $prefix = '_igv_';\n\n if (isset($_GET['post'])) {\n $post_ID = $_GET['post'];\n } else {\n $post_ID = null;\n }\n\n $parent_args = array(\n 'post_type' => 'project',\n 'post_status' => 'any',\n 'posts_per_page' => -1\n );\n\n $gallery_args = array(\n 'post_type' => 'photograph',\n 'posts_per_page' => -1,\n 'meta_query' => array(\n array(\n 'key' => '_igv_parent',\n 'value' => $post_ID,\n 'type' => 'NUMERIC',\n 'compare' => '='\n )\n )\n );\n\n /**\n * Metaboxes declarations here\n * Reference: https://github.com/WebDevStudios/CMB2/blob/master/example-functions.php\n */\n\n $gallery = new_cmb2_box( array(\n 'id' => $prefix . 'gallery_metabox',\n 'title' => __( 'Gallery', 'cmb2' ),\n 'object_types' => array( 'project', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n ) );\n\n $gallery->add_field( array(\n 'name' => __( 'Gallery', 'cmb2' ),\n 'desc' => __( 'Create the gallery in the right hand column', 'cmb2' ),\n 'id' => $prefix . 'gallery',\n 'type' => 'custom_attached_posts',\n 'options' => array(\n 'query_args' => $gallery_args,\n 'show_thumbnails' => true\n ),\n ) );\n\n $project_meta = new_cmb2_box( array(\n 'id' => $prefix . 'project_metabox',\n 'title' => __( 'Project meta', 'cmb2' ),\n 'object_types' => array( 'project', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n ) );\n\n $project_meta->add_field( array(\n 'name' => __( 'Year', 'cmb2' ),\n 'desc' => __( '...', 'cmb2' ),\n 'id' => $prefix . 'year',\n 'type' => 'text'\n ) );\n\n // PHOTOGRAPH\n\n $photo_meta = new_cmb2_box( array(\n 'id' => $prefix . 'photograph_metabox',\n 'title' => __( 'Photograph meta', 'cmb2' ),\n 'object_types' => array( 'photograph' ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n ) );\n\n $photo_meta->add_field( array(\n 'name' => 'Photograph details',\n 'desc' => 'Set the caption for the photograph as the title of this post. Set the image as the featured image.',\n 'type' => 'title',\n 'id' => $prefix . 'instructions'\n ) );\n\n $photo_meta->add_field( array(\n 'name' => __( 'Parent project', 'cmb2' ),\n 'desc' => __( 'Choose the project which this photograph belongs to', 'cmb2' ),\n 'id' => $prefix . 'parent',\n 'type' => 'select',\n 'show_option_none' => true,\n 'options' => get_post_objects($parent_args),\n ) );\n\n\n // SPREAD\n\n $spread_meta = new_cmb2_box( array(\n 'id' => $prefix . 'spread_metabox',\n 'title' => __( 'Spread images', 'cmb2' ),\n 'object_types' => array( 'spread', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n ) );\n\n $spread_colorpicker = $spread_meta->add_field( array(\n 'name' => 'Spread color',\n 'id' => $prefix . 'spread_color',\n 'type' => 'colorpicker',\n 'default' => '#FDFDFD',\n ) );\n\n $spread_meta_group = $spread_meta->add_field( array(\n 'id' => $prefix . 'spread_images',\n 'type' => 'group',\n 'description' => __( 'Generates reusable form entries', 'cmb' ),\n 'options' => array(\n 'group_title' => __( 'Entry {#}', 'cmb' ), // since version 1.1.4, {#} gets replaced by row number\n 'add_button' => __( 'Add Another Entry', 'cmb' ),\n 'remove_button' => __( 'Remove Entry', 'cmb' ),\n 'sortable' => true, // beta\n ),\n ) );\n\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Image',\n 'description' => 'DO NOT upload a file here! Choose an existing upload that you have already added to a project',\n 'id' => 'image',\n 'type' => 'file',\n ) );\n\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Top',\n 'description' => '% value for css',\n 'id' => 'top',\n 'type' => 'text',\n ) );\n\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Left',\n 'description' => '% value for css',\n 'id' => 'left',\n 'type' => 'text',\n ) );\n\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Right',\n 'description' => '% value for css',\n 'id' => 'right',\n 'type' => 'text',\n ) );\n\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Max-width',\n 'description' => '% value for css',\n 'id' => 'maxwidth',\n 'type' => 'text',\n ) );\n\n/*\n $spread_meta->add_group_field( $spread_meta_group, array(\n 'name' => 'Scale',\n 'description' => '% value for css',\n 'id' => 'scale',\n 'type' => 'text',\n ) );\n*/\n\n $gallery = new_cmb2_box( array(\n 'id' => $prefix . 'page_metabox',\n 'title' => __( 'Page data', 'cmb2' ),\n 'object_types' => array( 'page', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n ) );\n\n $gallery->add_field( array(\n 'name' => __( '2nd column', 'cmb2' ),\n 'desc' => __( 'Text in the second column', 'cmb2' ),\n 'id' => $prefix . 'extra_copy',\n 'type' => 'wysiwyg'\n ) );\n\n}", "public function load_field($field_slug) {\n\n // Verify if field exists\n if ( isset(self::$the_fields[$field_slug]) ) {\n\n return self::$the_fields;\n\n } else {\n\n return false;\n\n }\n\n }", "public function getMixtapeBySlug($slug)\n {\n $post = $this->model->with('user', 'tags')->whereSlug($slug)->firstOrFail();\n\n $comments = $this->comment\n ->wherePostId($post->id)\n ->with('user')\n ->whereHas('user', function ($q) {\n $q->whereValid(true);\n })\n ->get();\n\n return compact('post', 'comments');\n }", "function get_content_local_field( $id = '1234QWERasdf' ) {\n\treturn array(\n\t\tarray (\n\t\t\t'key' => $id . '_5121z71cd49f1',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'CC',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_N121z71cd48f1',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'content',\n\t\t\t'type' => 'flexible_content',\n\t\t\t'required' => 0,\n\t\t\t'button_label' => 'Add Content',\n\t\t\t'layouts' => array (\n\n\t\t\t\t// Headline\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_N121zN1cd48f3',\n\t\t\t\t\t'name' => 'headline',\n\t\t\t\t\t'label' => 'Headline',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'sub_fields' => get_headline_local_field( $id ),\n\t\t\t\t),\n\n\t\t\t\t// Editor\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_N121z7Ocd48f2',\n\t\t\t\t\t'name' => 'editor',\n\t\t\t\t\t'label' => 'Editor',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'sub_fields' => get_editor_local_field( $id ),\n\t\t\t\t),\n\n\t\t\t\t// Button\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_N121z7ocd48f1',\n\t\t\t\t\t'name' => 'button-group',\n\t\t\t\t\t'label' => 'Button',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'sub_fields' => get_button_group_local_field( $id ),\n\t\t\t\t),\n\n\t\t\t\t// Map\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_N121z71md48f1',\n\t\t\t\t\t'name' => 'map',\n\t\t\t\t\t'label' => 'Map',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'sub_fields' => get_map_local_field( $id ),\n\t\t\t\t),\n\n\t\t\t\t// Image\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_NImGz71cd48f1',\n\t\t\t\t\t'name' => 'image',\n\t\t\t\t\t'label' => 'Image',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'sub_fields' => get_image_local_field( $id ),\n\t\t\t\t),\n\n\t\t\t\t// Video\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_N1Viz71cd48f0',\n\t\t\t\t\t'name' => 'oembed',\n\t\t\t\t\t'label' => 'oEmbed Video',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'sub_fields' => get_oembed_local_field( $id ),\n\t\t\t\t),\n\n\t\t\t\t// Horizontal line\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_N1Viz71cHe8f0',\n\t\t\t\t\t'name' => 'line',\n\t\t\t\t\t'label' => 'Horizontal Line',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'sub_fields' => get_hr_local_field( $id ),\n\t\t\t\t),\n\n\t\t\t\t// Accordion\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_N121z66cd48f1',\n\t\t\t\t\t'name' => 'accordion',\n\t\t\t\t\t'label' => 'Accordion',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'sub_fields' => get_accordion_local_field( $id )\n\t\t\t\t),\n\n\t\t\t\t// Testimonial\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_Nj2j271cd48f0',\n\t\t\t\t\t'name' => 'testimonials',\n\t\t\t\t\t'label' => 'Testimonials',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'sub_fields' => get_content_testimonial_local_field( $id ),\n\t\t\t\t),\n\n\t\t\t\t// Gravity Form\n\t\t\t\tarray (\n\t\t\t\t\t'key' => $id . '_N1F1z71Fd48f1',\n\t\t\t\t\t'name' => 'form',\n\t\t\t\t\t'label' => 'Form',\n\t\t\t\t\t'display' => 'block',\n\t\t\t\t\t'sub_fields' => get_gform_local_field( $id ),\n\t\t\t\t),\n\t\t\t)\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_5121e71cd49f1',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'CS_Type_tab_0',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_8121e7Ecd4Ef8',\n\t\t\t'label' => 'Style',\n\t\t\t'name' => 'style',\n\t\t\t'type' => 'select',\n\t\t\t'required' => 0,\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '33'\n\t\t\t),\n\t\t\t'choices' => get_available_styles_list( 'placeholder' ),\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_8I2ie7Ecd3Rc9',\n\t\t\t'label' => 'Wrapper',\n\t\t\t'name' => 'wrapper',\n\t\t\t'type' => 'select',\n\t\t\t'required' => 0,\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '33',\n\t\t\t),\n\t\t\t'choices' => array (\n\t\t\t\t'auto' => 'Auto',\n\t\t\t\t'card' => 'Card'\n\t\t\t),\n\t\t\t'allow_null' => 0,\n\t\t\t'default_value' => 'auto',\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_8I2ie7Ecd4Ef8',\n\t\t\t'label' => 'Borders',\n\t\t\t'name' => 'borders',\n\t\t\t'type' => 'select',\n\t\t\t'required' => 0,\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '33',\n\t\t\t),\n\t\t\t'choices' => array (\n\t\t\t\t'none' => 'None',\n\t\t\t\t'both' => 'Both',\n\t\t\t\t'left' => 'Left',\n\t\t\t\t'right' => 'Light'\n\t\t\t),\n\t\t\t'allow_null' => 0,\n\t\t\t'default_value' => 'none',\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_5111ee172a422',\n\t\t\t'label' => 'Borders',\n\t\t\t'name' => 'Bows_tab_0',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top',\n\t\t\t'conditional_logic' => array (\n\t\t\t\tarray (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'field' => $id . '_8I2ie7Ecd4Ef8',\n\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t'value' => 'none',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_bIziQ7ecd4Ef8',\n\t\t\t'label' => 'Width',\n\t\t\t'name' => 'border-width',\n\t\t\t'type' => 'number',\n\t\t\t'required' => 0,\n\t\t\t'conditional_logic' => array (\n\t\t\t\tarray (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'field' => $id . '_8I2ie7Ecd4Ef8',\n\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t'value' => 'none',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t\t'default_value' => '1',\n\t\t\t'placeholder' => '1',\n\t\t\t'append' => 'px',\n\t\t\t'min' => '1',\n\t\t\t'max' => '10'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_bIziQ7Ecd4EV8',\n\t\t\t'label' => 'Style',\n\t\t\t'name' => 'border-style',\n\t\t\t'type' => 'select',\n\t\t\t'required' => 0,\n\t\t\t'conditional_logic' => array (\n\t\t\t\tarray (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'field' => $id . '_8I2ie7Ecd4Ef8',\n\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t'value' => 'none'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t\t'choices' => array (\n\t\t\t\t'solid' => 'Solid',\n\t\t\t\t'dashed' => 'Dashed',\n\t\t\t\t'dotted' => 'Dotted'\n\t\t\t),\n\t\t\t'allow_null' => 0,\n\t\t\t'default_value' => 'solid',\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_8I2ie7ECd4Ef8',\n\t\t\t'label' => 'Color',\n\t\t\t'name' => 'border-color',\n\t\t\t'type' => 'rgba_color',\n\t\t\t'required' => 0,\n\t\t\t'conditional_logic' => array (\n\t\t\t\tarray (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'field' => $id . '_8I2ie7Ecd4Ef8',\n\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t'value' => 'none'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_8u2ie7ECd4Ef8',\n\t\t\t'label' => 'Size',\n\t\t\t'name' => 'border-size',\n\t\t\t'type' => 'text',\n\t\t\t'required' => 0,\n\t\t\t'conditional_logic' => array (\n\t\t\t\tarray (\n\t\t\t\t\tarray (\n\t\t\t\t\t\t'field' => $id . '_8I2ie7Ecd4Ef8',\n\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t'value' => 'none'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t\t'placeholder' => '50px or 10%',\n\t\t\t'maxlength' => '5',\n\t\t),\n\t);\n}", "public function meta_box_content()\n {\n global $post_id;\n $fields = get_post_custom($post_id);\n $field_data = $this->get_custom_fields_settings();\n\n $html = '';\n\n $html .= '<input type=\"hidden\" name=\"' . $this->token . '_nonce\" id=\"' . $this->token . '_nonce\" value=\"' . wp_create_nonce(plugin_basename($this->dir)) . '\" />';\n\n if (0 < count($field_data)) {\n $html .= '<table class=\"form-table\">' . \"\\n\";\n $html .= '<tbody>' . \"\\n\";\n\n $html .= '<input id=\"' . $this->token . '_post_id\" type=\"hidden\" value=\"' . $post_id . '\" />';\n\n foreach ($field_data as $k => $v) {\n $data = $v['default'];\n $placeholder = $v['placeholder'];\n $type = $v['type'];\n if (isset($fields[$k]) && isset($fields[$k][0])) {\n $data = $fields[$k][0];\n }\n\n if ($type == 'text') {\n $html .= '<tr valign=\"top\"><th scope=\"row\"><label for=\"' . esc_attr($k) . '\">' . $v['name'] . '</label></th><td>';\n $html .= '<input style=\"width:100%\" name=\"' . esc_attr($k) . '\" id=\"' . esc_attr($k) . '\" placeholder=\"' . esc_attr($placeholder) . '\" type=\"text\" value=\"' . esc_attr($data) . '\" />';\n $html .= '<p class=\"description\">' . $v['description'] . '</p>' . \"\\n\";\n $html .= '</td><tr/>' . \"\\n\";\n } elseif ($type == 'posts') {\n $html .= '<tr valign=\"top\"><th scope=\"row\"><label for=\"' . esc_attr($k) . '\">' . $v['name'] . '</label></th><td>';\n $html .= '<select style=\"width:100%\" name=\"' . esc_attr($k) . '\" id=\"' . esc_attr($k) . '\">';\n $html .= '<option value=\"\">Select a Page to Use</option>';\n\n // Query posts\n global $post;\n $args = [\n 'posts_per_page' => 20,\n 'post_type' => $v['default'],\n 'post_status' => 'publish'\n ];\n $custom_posts = get_posts($args);\n foreach ($custom_posts as $post) : setup_postdata($post);\n $link = str_replace(home_url(), '', get_permalink());\n $selected = '';\n if ($link == $data) {\n $selected = 'selected';\n }\n\n $html .= '<option value=\"' . $link . '\" ' . $selected . '>' . get_the_title() . '</option>';\n endforeach;\n wp_reset_postdata();\n\n $html .= '</select><p class=\"description\">' . $v['description'] . '</p>' . \"\\n\";\n $html .= '</td><tr/>' . \"\\n\";\n } elseif ($type == 'select') {\n $html .= '<tr valign=\"top\"><th scope=\"row\"><label for=\"' . esc_attr($k) . '\">' . $v['name'] . '</label></th><td>';\n $html .= '<select style=\"width:100%\" name=\"' . esc_attr($k) . '\" id=\"' . esc_attr($k) . '\">';\n foreach ($v['options'] as $option) {\n $selected = '';\n if ($option == $data) {\n $selected = 'selected';\n }\n\n $html .= '<option value=\"' . $option . '\" ' . $selected . '>' . ucfirst($option) . '</option>';\n }\n $html .= '</select>';\n if ($k == 'area') {\n $area_custom_val = '';\n if (isset($fields['area_custom'])) {\n $area_custom_val = 'value=\"' . esc_attr($fields['area_custom'][0]) . '\"';\n }\n $html .= '<input type=\"text\" name=\"area_custom\" id=\"area_custom\" ' . $area_custom_val . ' placeholder=\"Your Custom Area\" style=\"width:100%;display:none;\">';\n }\n $html .= '<p class=\"description\">' . $v['description'] . '</p>' . \"\\n\";\n $html .= '</td><tr/>' . \"\\n\";\n } elseif ($type == 'upload') {\n $html .= '<tr valign=\"top\"><th scope=\"row\"><label for=\"' . esc_attr($k) . '\">' . $v['name'] . '</label></th><td><input type=\"button\" class=\"button\" id=\"upload_media_file_button\" value=\"' . __('Upload Image', $this->token) . '\" data-uploader_title=\"Choose an image\" data-uploader_button_text=\"Insert image file\" /><input name=\"' . esc_attr($k) . '\" type=\"text\" id=\"upload_media_file\" class=\"regular-text\" value=\"' . esc_attr($data) . '\" />' . \"\\n\";\n $html .= '<p class=\"description\">' . $v['description'] . '</p>' . \"\\n\";\n $html .= '</td><tr/>' . \"\\n\";\n } elseif ($type == 'hidden') {\n $html .= '';\n } else {\n $default_color = '';\n $html .= '<tr valign=\"top\"><th scope=\"row\"><label for=\"' . esc_attr($k) . '\">' . $v['name'] . '</label></th><td>';\n $html .= '<input name=\"' . esc_attr($k) . '\" id=\"primary_color\" class=\"quiz-color\" type=\"text\" value=\"' . esc_attr($data) . '\"' . $default_color . ' />';\n $html .= '<p class=\"description\">' . $v['description'] . '</p>' . \"\\n\";\n $html .= '</td><tr/>' . \"\\n\";\n }\n\n $html .= '</td><tr/>' . \"\\n\";\n }\n\n $html .= '</tbody>' . \"\\n\";\n $html .= '</table>' . \"\\n\";\n }\n\n echo $html;\n }", "function arconix_single_plugin_filter( $content ) {\n $custom = get_post_custom();\n isset( $custom[\"_acpl_slug\"][0] )? $slug = $custom[\"_acpl_slug\"][0] : $slug = '';\n\n // Bail if $slug is not defined\n if( ! $slug ) return $content;\n\n // Pass the slug into the WP API to get the data we need\n $details = unserialize( ARCONIX_PLUGINS::get_wporg_custom_plugin_data( $slug ) );\n\n // Bail if $details isn't defined\n if( ! $details ) return $content;\n\n $sections = $details->sections;\n $description = $sections['description'];\n $installation = $sections['installation'];\n $screenshots = $sections['screenshots'];\n $faq = $sections['faq'];\n $changelog = $sections['changelog'];\n\n // Our page content\n $content = '[tabs]';\n $content .= '[tab title=\"Description\"]' . $description . '[/tab]'; \n $content .= '[tab title=\"Screenshots\"]' . $screenshots . '[/tab]';\n $content .= '[tab title=\"Installation\"]' . $installation . '[/tab]';\n $content .= '[tab title=\"FAQ\"]' . $faq . '[/tab]';\n $content .= '[tab title=\"Changelog\"]' . $changelog . '[/tab]';\n $content .= '[/tabs]';\n\n return $content;\n}", "function tumi_metaboxes() {\n\n // Start with an underscore to hide fields from custom fields list\n $prefix = '_tumi_';\n\n /**\n * Initiate the metabox\n */\n $tumi_event_metabox = new_cmb2_box( array(\n 'id' => 'tumi_event_metabox',\n 'title' => __( 'Event Metabox', 'cmb2' ),\n 'object_types' => array( 'events', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n // 'cmb_styles' => false, // false to disable the CMB stylesheet\n // 'closed' => true, // Keep the metabox closed by default\n ) );\n $tumi_portfolio_metabox = new_cmb2_box( array(\n 'id' => 'tumi_portfolio_metabox',\n 'title' => __( 'Portfolio Metabox', 'cmb2' ),\n 'object_types' => array( 'portfolis', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n ) );\n\n // Regular text field\n $tumi_event_metabox->add_field( array(\n 'name' => __( 'Event Sub-Title', 'cmb2' ),\n 'desc' => __( 'Put your sub-tile here', 'cmb2' ),\n 'id' => $prefix . 'event_sub_title',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats', // function should return a bool value\n\t\t'default' => 'Lorem '\n // 'sanitization_cb' => 'my_custom_sanitization', // custom sanitization callback parameter\n // 'escape_cb' => 'my_custom_escaping', // custom escaping callback parameter\n // 'on_front' => false, // Optionally designate a field to wp-admin only\n // 'repeatable' => true,\n ) );\n\n // URL text field\n $tumi_event_metabox->add_field( array(\n 'name' => __( 'Event Date', 'cmb2' ),\n 'desc' => __( 'Put event date', 'cmb2' ),\n 'id' => $prefix . 'event_date',\n 'type' => 'text_date',\n // 'protocols' => array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'), // Array of allowed protocols\n // 'repeatable' => true,\n ) );\n\n // event format \n $tumi_event_metabox->add_field( array(\n 'name' => __( 'Event Format', 'cmb2' ),\n 'desc' => __( 'select event format', 'cmb2' ),\n 'id' => $prefix . 'event_format',\n 'type' => 'select',\n\t\t'options' => array(\n\t\t\t'1' => __( 'Left Image & Right Content', 'cmb2' ),\n\t\t\t'2' => __( 'Right Image & Left Content', 'cmb2' ),\n\t\t),\t\t\n ) );\n\n\t$tumi_event_metabox->add_field( array(\n\t\t'name' => __( 'Event Taxonomy Select', 'cmb2' ),\n\t\t'desc' => __( 'field description (optional)', 'cmb2' ),\n\t\t'id' => $prefix . 'event_taxonomy_select',\n\t\t'type' => 'taxonomy_select',\n\t\t'taxonomy' => 'events_cat', // Taxonomy Slug\n\t) );\n\n $tumi_portfolio_metabox->add_field( array(\n 'name' => __( 'Portfolio Thin Title', 'cmb2' ),\n 'desc' => __( 'Put your thin-title here', 'cmb2' ),\n 'id' => $prefix . 'portfolio_thin_title',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats', // function should return a bool value\n\t\t'default' => 'Zoe '\n ) );\n\t\n\t$tumi_portfolio_metabox->add_field( array(\n\t\t'name' => __( 'Portfolio Link', 'cmb2' ),\n\t\t'desc' => __( 'Put your link here', 'cmb2' ),\n\t\t'id' => $prefix . 'portfolio_link',\n\t\t'type' => 'text_url',\n\t\t'default' => 'http://google.com'\n\t) );\n\n $tumi_portfolio_metabox->add_field( array(\n 'name' => __( 'Portfolio Content', 'cmb2' ),\n 'desc' => __( 'Put your content here', 'cmb2' ),\n 'id' => $prefix . 'portfolio_details',\n 'type' => 'textarea',\n 'show_on_cb' => 'cmb2_hide_if_no_cats', // function should return a bool value\n\t\t'default' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing'\n ) );\t\n\t\n}", "public function fields(Request $request)\n {\n /**\n * Details panel\n */\n $panels[] = new Panel('Details', [\n ID::make(__('ID'), 'id')\n ->sortable()\n ->exceptOnForms(),\n Text::make('Title', 'title'),\n Textarea::make('Post Snippet', 'post_introduction'),\n Text::make('Author', 'author')\n ->hideFromIndex(),\n Select::make('Locale')\n ->options(config('nova-blog.locales'))\n ->default(array_key_first(config('nova-blog.locales'))),\n Boolean::make('Feature Post?', 'is_featured')\n ->default(false),\n Boolean::make('Publish Post?', 'is_published')\n ->default(false),\n DateTime::make('Published at', 'published_at')\n ->rules('required')\n ->sortable()\n ->default(Carbon::now()),\n Slug::make('Slug')\n ->from('Title')\n ->rules('required')\n ->separator('-')\n ->required()\n ->hideWhenUpdating(),\n ]);\n\n /**\n * Post Content\n */\n $panels[] = new Panel('Content', [\n NovaTinyMCE::make('Content', 'post_content')\n ->hideFromIndex(),\n File::make('Featured Image or Video', 'featured_image')\n ->disk(config('filesystems.default'))\n ->nullable(),\n Tags::make('Categories')\n ->withMeta(['placeholder' => 'Add categories...'])\n ->hideFromIndex()\n ->type('post_categories'),\n Tags::make('Tags')\n ->withMeta(['placeholder' => 'Add tags...'])\n ->hideFromIndex()\n ->type('post_tags'),\n ]);\n\n /**\n * Post SEO Meta Info\n */\n $panels[] = new Panel('SEO', [\n Text::make('SEO Title', 'seo_title')\n ->hideFromIndex()\n ->nullable(),\n Text::make('SEO Description', 'seo_description')\n ->hideFromIndex()\n ->nullable(),\n Image::make('SEO Image', 'seo_image')\n ->hideFromIndex()\n ->disk(config('filesystems.default'))\n ->nullable(),\n ]);\n\n return [ (new Tabs('Blog Post', $panels))->withToolbar() ];\n }", "function siteorigin_panels_metaboxes() {\n\tforeach( siteorigin_panels_setting( 'post-types' ) as $type ){\n\t\tadd_meta_box( 'so-panels-panels', __( 'Page Builder', 'positive-panels' ), 'siteorigin_panels_metabox_render', $type, 'advanced', 'high' );\n\t}\n}", "function dka_metaboxes( array $meta_boxes ) {\r\n\r\n// Start with an underscore to hide fields from custom fields list\r\n$prefix = '_dka_';\r\n\r\n// Skills\r\n\r\n$meta_boxes['skills_metabox'] = array(\r\n 'id' => 'skills_metabox',\r\n\t'title' => __('Skills', 'cmb'),\r\n\t'pages' => array('skill',), //Post type\r\n\t'context' => 'normal',\r\n\t'priority' => 'high',\r\n\t'show_names' => true,\r\n\t'fields' => array(\r\n\t\tarray(\r\n\t\t\t'name' => __('SVG', 'cmb'),\r\n\t\t\t'desc' => __('Enter slug->name', 'cmb'),\r\n\t\t\t'id' => $prefix . 'svg',\r\n\t\t\t'type' => 'text_small',\r\n\t\t),\r\n\t),\r\n);\r\n\r\n\r\n\r\n// Projects \r\n\r\n$meta_boxes['project_metabox'] = array(\r\n'id' => 'project_metabox',\r\n'title' => 'Projects Meta Information',\r\n'pages' => array( 'project', ), // Post type\r\n'context' => 'normal',\r\n'priority' => 'high',\r\n'show_names' => true, // Show field names on the left\r\n'fields' => array(\r\n\tarray(\r\n\t'name' => __('URL', 'cmb'),\r\n\t'desc' => __('Project URL', 'cmb'),\r\n\t'id' => $prefix . 'project_url',\r\n\t'type' => 'text_medium',\r\n\t),\r\n\tarray(\r\n\t\t'name' => __('Tech', 'cmb'),\r\n\t\t'desc' => __('What tech was used', 'cmb'),\r\n\t\t'id' => $prefix . 'tech_select',\r\n\t\t'type' => 'taxonomy_multicheck',\r\n\t\t'taxonomy' => 'tech', // Taxonomy Slug\r\n\t),\r\n\tarray(\r\n\t'name' => __('Project Background Image [680 x 460]', 'cmb'),\r\n\t'desc' => __('Upload an image or enter the URL.', 'cmb'),\r\n\t'id' => $prefix . 'project_img',\r\n\t'type' => 'file',\r\n\t),\r\n\tarray(\r\n\t'name' => __('Screenshot_1', 'cmb'),\r\n\t'desc' => __('Upload an image or enter the URL.', 'cmb'),\r\n\t'id' => $prefix . 'ss1',\r\n\t'type' => 'file',\r\n\t),\r\n\tarray(\r\n\t'name' => __('Screenshot_2', 'cmb'),\r\n\t'desc' => __('Upload an image or enter the URL.', 'cmb'),\r\n\t'id' => $prefix . 'ss2',\r\n\t'type' => 'file',\r\n\t),\r\n\tarray(\r\n\t'name' => __('Screenshot_3', 'cmb'),\r\n\t'desc' => __('Upload an image or enter the URL.', 'cmb'),\r\n\t'id' => $prefix . 'ss3',\r\n\t'type' => 'file',\r\n\t),\r\n),\r\n);\r\n\r\n\r\n\r\n// Add other metaboxes as needed\r\n\r\nreturn $meta_boxes;\r\n}", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "function toolbox_add_portfolio_meta_box() {\n add_meta_box(\n 'toolbox_portfolio_metabox', // Unique ID (ID of Div Tag ** Note: DO NOT NAME same as field(s) below **)\n esc_html__( 'Portfolio Entry', 'lorainccc' ), // Title & Text Domain\n 'toolbox_show_portfolio_meta_box', // Callback function\n 'portfolio', // Admin Page or Post Type\n 'normal', // Context (Position)\n 'default' // Priority\n );\n}", "function campaign_register_metabox() {\n $prefix = '_ppm_';\n\n /**\n * Sample metabox to demonstrate each field type included\n */\n \n $home_meta = new_cmb2_box( array(\n 'id' => $prefix . 'home_metabox',\n 'title' => __( 'Home Page Meta', 'cmb2' ),\n 'object_types' => array( 'page' ), // Post type\n 'show_on' => array('key'=>'page-template','value'=>'page-home.php'),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n // 'cmb_styles' => false, // false to disable the CMB stylesheet\n // 'closed' => true, // true to keep the metabox closed by default\n ) );\n\n $home_meta->add_field( array(\n 'name' => __( 'Slider Posts', 'cmb2' ),\n 'desc' => __( 'Drag posts from the left column to the right column to attach them to the home page slider.<br />You may rearrange the order of the slides in the right column by dragging and dropping.', 'cmb2' ),\n 'id' => 'attached_cmb2_attached_posts',\n 'type' => 'custom_attached_posts',\n 'options' => array(\n 'show_thumbnails' => true, // Show thumbnails on the left\n 'filter_boxes' => true, // Show a text box for filtering the results\n 'query_args' => array( 'posts_per_page' => 10 ), // override the get_posts args\n )\n ) );\n\n\n $home_meta->add_field( array(\n 'name' => 'About Excerpt',\n 'desc' => 'Enter about section excerpt...',\n 'id' => $prefix.'about_excerpt',\n 'type' => 'textarea_small',\n ) );\n\n $home_meta->add_field( array(\n 'name' => 'About Profile Image',\n 'desc' => 'Enter about section profile image...',\n 'id' => $prefix.'about_image',\n 'type' => 'file',\n ) );\n\n $home_meta->add_field( array(\n 'name' => 'About Profile Link',\n 'desc' => 'Enter about profile link',\n 'id' => $prefix.'about_link',\n 'type' => 'text',\n ) );\n\n $pageoptions_meta = new_cmb2_box( array(\n 'id' => $prefix . 'post_metabox',\n 'title' => __( 'Page Options', 'cmb2' ),\n 'object_types' => array( 'page', ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n // 'cmb_styles' => false, // false to disable the CMB stylesheet\n // 'closed' => true, // true to keep the metabox closed by default\n ) );\n\n $pageoptions_meta->add_field( array(\n 'name' => 'Slider Images',\n 'desc' => 'Add the images to be displayed in the page slider at the top of the page',\n 'id' => $prefix.'slider_file_list',\n 'type' => 'file_list',\n // 'preview_size' => array( 100, 100 ), // Default: array( 50, 50 )\n ) );\n\n $pageoptions_meta->add_field( array(\n 'name' => 'Slider Text',\n 'desc' => 'Enter text to appear on the slider',\n 'id' => $prefix.'slider_text',\n 'type' => 'text',\n ) );\n\n $group_field_id = $pageoptions_meta->add_field( array(\n 'id' => 'btn_group',\n 'type' => 'group',\n 'description' => __( 'Generates reusable form entries', 'cmb' ),\n 'options' => array(\n 'group_title' => __( 'Button {#}', 'cmb' ), // since version 1.1.4, {#} gets replaced by row number\n 'add_button' => __( 'Add Another Entry', 'cmb' ),\n 'remove_button' => __( 'Remove Entry', 'cmb' ),\n 'sortable' => true, // beta\n // 'closed' => true, // true to have the groups closed by default\n ),\n ) );\n\n // Id's for group's fields only need to be unique for the group. Prefix is not needed.\n $pageoptions_meta->add_group_field( $group_field_id, array(\n 'name' => 'Button Title',\n 'id' => 'btntitle',\n 'type' => 'text',\n // 'repeatable' => true, // Repeatable fields are supported w/in repeatable groups (for most types)\n ) );\n\n $pageoptions_meta->add_group_field( $group_field_id, array(\n 'name' => 'Button Link',\n 'id' => 'btnlink',\n 'type' => 'text', \n ) );\n\n\n $category_meta = new_cmb2_box( array(\n 'id' => $prefix . 'category_metabox',\n 'title' => __( 'Portfolio Options', 'cmb2' ),\n 'object_types' => array( 'page' ), // Post type\n 'show_on' => array( 'key' => 'page-template',\n 'value' => array(\n 'template-about.php',\n 'template-gallery.php'\n )\n ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n // 'cmb_styles' => false, // false to disable the CMB stylesheet\n // 'closed' => true, // true to keep the metabox closed by default\n ) );\n\n\n $category_meta->add_field( array(\n 'name' => 'Category',\n 'desc' => 'Select the connected category for content',\n 'id' => $prefix.'category_select',\n 'type' => 'text',\n ) );\n\n $category_meta->add_field( array(\n 'name' => 'Gallery Shortcode',\n 'desc' => 'Paste the gallery shortcode here',\n 'id' => $prefix.'gallery_shortcode',\n 'type' => 'text',\n ) );\n \n\n\n}", "function get_accordion_local_field( $id = '1234QWERasdf' ) {\n\treturn array (\n\t\tarray (\n\t\t\t'key' => $id . '_T9X5zN1cd48f9',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'tab_content',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_N121z66cd48f2',\n\t\t\t'label' => 'Label',\n\t\t\t'name' => 'label',\n\t\t\t'type' => 'text',\n\t\t\t'required' => 0,\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => 50,\n\t\t\t),\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_N121z66cd48f3',\n\t\t\t'label' => 'Open label',\n\t\t\t'name' => 'open',\n\t\t\t'type' => 'text',\n\t\t\t'required' => 0,\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => 25,\n\t\t\t),\n\t\t\t'default_value' => 'Show More',\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_N121z66cd48f4',\n\t\t\t'label' => 'Close label',\n\t\t\t'name' => 'close',\n\t\t\t'type' => 'text',\n\t\t\t'required' => 0,\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => 25,\n\t\t\t),\n\t\t\t'default_value' => 'Close More',\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_N121z66cd48f5',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'wysiwyg',\n\t\t\t'type' => 'wysiwyg',\n\t\t\t'required' => 0,\n\t\t\t'tabs' => 'all',\n\t\t\t'toolbar' => 'full',\n\t\t\t'media_upload' => 1,\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_T9X5zN1cd48f6',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'tab_settings',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T9X1zN6cd48f7',\n\t\t\t'label' => 'Margins',\n\t\t\t'name' => 'margins',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'marg_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t\t'wrapper' => array(\n\t\t\t\t'width' => 50\n\t\t\t)\n\t\t),\n\t);\n}", "function acf_get_field_group_post($id = 0)\n{\n}", "function acf_get_meta_field($key = 0, $post_id = 0)\n{\n}", "function getDiv($slug){\n\tglobal $conn;\n\t// Get single div slug\n\t$div_slug = $_GET['div-slug'];\n\t$sql = \"SELECT * FROM division WHERE slug='$div_slug'\";\n\t$result = mysqli_query($conn, $sql);\n\n\t// fetch query results as associative array.\n\t$divdetails = mysqli_fetch_assoc($result);\n\t/* if ($post) {\n\t\t// get the topic to which this post belongs\n\t\t$post['topic'] = getPostTopic($post['id']);\n\t} */\n\treturn $divdetails;\n}", "public function register_metabox() {\n\t\t$fm = new Fieldmanager_Group( [\n\t\t\t'name' => 'hero_fields', // \"name\" id deceiving, used as the key/ID.\n\t\t\t'serialize_data' => false,\n\t\t\t'add_to_prefix' => false,\n\t\t\t'children' => [\n\t\t\t\t'_headline' => new Fieldmanager_RichTextArea( 'Main Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t\t'_subheadline' => new Fieldmanager_RichTextArea( 'Sub Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t],\n\t\t] );\n\n\t\t/**\n\t\t * Initiate the metabox\n\t\t */\n\t\t$fm->add_meta_box( 'Hero', 'page' );\n\t}", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "public function form_fields() {\n\t\treturn apply_filters( \"appthemes_{$this->box_id}_metabox_fields\", $this->form() );\n\t}" ]
[ "0.6219824", "0.61011446", "0.59922266", "0.5723239", "0.5701285", "0.55793786", "0.5515148", "0.5504085", "0.5399804", "0.53994924", "0.53844714", "0.53614366", "0.5348587", "0.5347112", "0.5345169", "0.5336028", "0.5330845", "0.5300717", "0.53004545", "0.52736574", "0.5256386", "0.52540296", "0.52194947", "0.52049917", "0.5186729", "0.5182894", "0.5171442", "0.5154175", "0.51339406", "0.5127656", "0.5126961", "0.5123687", "0.5116437", "0.5102688", "0.5089582", "0.5087831", "0.50710976", "0.5066365", "0.5066136", "0.5061682", "0.50571805", "0.5043528", "0.50234944", "0.50228095", "0.50224006", "0.5018334", "0.5015523", "0.5011532", "0.5010818", "0.50055385", "0.5003586", "0.49847433", "0.4980897", "0.49728072", "0.49716017", "0.49675947", "0.49629062", "0.49628708", "0.4960077", "0.49580547", "0.4945636", "0.49452236", "0.4936922", "0.49324003", "0.4930961", "0.49307543", "0.49217895", "0.4889404", "0.4886119", "0.4876771", "0.4875045", "0.48613563", "0.48600394", "0.4859329", "0.48587614", "0.48551887", "0.4853467", "0.48482436", "0.48449135", "0.48075092", "0.48061645", "0.4804863", "0.47959995", "0.4788073", "0.4787702", "0.47821116", "0.4770201", "0.4769701", "0.47682667", "0.47599828", "0.47569075", "0.47472677", "0.4745648", "0.47448108", "0.47424054", "0.473819", "0.4737398", "0.47367537", "0.4731643", "0.4729894" ]
0.63341564
0
Get a metabox tab by its slug.
public function getTab( $slug ) { foreach( $this->_tabs as $tab ) { if( $tab->getSlug() == $slug ) { return $tab; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMetabox( $slug )\n\t{\n\t\treturn isset( $this->_metaboxes[( string ) $slug] ) ? $this->_metaboxes[( string ) $slug] : false;\n\t}", "public function getBySlug(string $slug);", "public function getPageBySlug($slug)\n {\n return $this->findOneBy(array('slug' => $slug));\n }", "public function getBySlug()\n {\n }", "public function createTab( $title, $slug, $index=false )\n\t\t{\n\t\t\t$tab = new THB_MetaboxTab( $title, $slug );\n\t\t\t$this->addTab( $tab, $index );\n\n\t\t\treturn $tab;\n\t\t}", "public static function getTabById($tab_id) {\r\n $result = db_select('{md_megamenu_tabs}', 'mgmt')\r\n ->fields('mgmt')\r\n ->condition('tid', $tab_id)\r\n ->execute()\r\n ->fetchAll(PDO::FETCH_CLASS, 'MDMegaTab');\r\n\r\n if (!count($result)) {\r\n return NULL;\r\n }\r\n\r\n foreach ($result as &$tab) {\r\n if ($tab instanceof stdClass)\r\n $tab = _megamenu_recast('MDMegaTab', $tab);\r\n\r\n $tab->initialize();\r\n }\r\n\r\n return array_shift($result);\r\n }", "public function getRecord($slug){\n return $this->where(\"slug\", $slug)->first();\n }", "public function findBySlug($slug)\n {\n return $this->model->where('slug', $slug)->first();\n }", "public function findBySlug($slug)\n {\n return $this->model->where('slug', $slug)->first();\n }", "public function findBySlug($slug)\n {\n return $this->model->whereSlug($slug)->first();\n }", "public function bySlug($slug);", "public function getBySlug($slug)\n\t{\n\t\treturn $this->model->where('slug',$slug)->firstOrFail();\n\t}", "public function get_tab( $id ) {\n if ( ! isset( $this->_tabs[ $id ] ) )\n return null;\n return $this->_tabs[ $id ];\n }", "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "function pmpro_getAddonBySlug( $slug ) {\n\t$addons = pmpro_getAddons();\n\n\tif ( empty( $addons ) ) {\n\t\treturn false;\n\t}\n\n\tforeach ( $addons as $addon ) {\n\t\tif ( $addon['Slug'] == $slug ) {\n\t\t\treturn $addon;\n\t\t}\n\t}\n\n\treturn false;\n}", "public function findBySlug($slug);", "public function findBySlug($slug);", "public function findBySlug($slug);", "public function findBySlug($slug);", "public function findBySlug($slug);", "public function getField($slug);", "public function show($slug)\n {\n $page = $this->page->where('slug', $slug)->firstOrFail();\n return $page;\n }", "public function findBySlug(string $slug) {\n return $this->getFirstBy('slug', $slug);\n }", "public function findBySlug(string $slug);", "public function findBySlug(string $slug);", "static function get_post_by_slug($slug){\n\t\treturn self::$db->where('slug',$slug)->get('blog')->row();\n\t}", "function cinerama_edge_get_admin_tab() {\n\t\treturn isset( $_GET['page'] ) ? cinerama_edge_strafter( $_GET['page'], 'tab' ) : null;\n\t}", "public function getContainer( $slug )\n\t\t{\n\t\t\treturn $this->getTab( '_options_tab' )->getContainer( $slug );\n\t\t}", "public static function findByTitleSlug($slug = null)\n {\n if (is_null($slug))\n {\n return null;\n }\n\n return self::where('slug', '=', $slug)->first();\n }", "public function getPage($slug)\n { \n $data = StaticPage::where('page_slug',$slug)->first();\n return $data;\n }", "public function find($slug)\n {\n if (isset($this->storage[$slug]))\n {\n return $this->storage[$slug];\n }\n }", "public function get_movie($slug)\n {\n return $this->db\n ->get_where('tbl_movies', ['slug' => $slug])\n ->row_array();\n\n }", "public function getFilmBySlug($slug)\n {\n return Film::where('slug', '=' ,$slug)->firstOrFail();\n }", "public function getBySlug(string $slug)\n {\n $category = HandbookCategory::where('ru_slug', $slug)->first();\n return $category;\n }", "function get_post_by_slug($slug) {\n if (!$slug) return false;\n $args = array(\n 'name' => $slug,\n 'post_type' => 'post',\n 'post_status' => 'publish',\n 'posts_per_page' => 1\n );\n $my_posts = get_posts( $args );\n if ( $my_posts ) return $my_posts[0];\n}", "public function getSlug();", "public function getSlug();", "public function getSlug();", "public function getSlug();", "public function _getTab()\n\t{\n\t\treturn $this->_tab;\n\t}", "public function show($slug)\n {\n $column = is_numeric($slug) ? 'id' : 'slug';\n\n return Post::where($column, $slug)->firstOrFail();\n }", "public function tab() {\n $args = func_get_args();\n\n if (count($args) == 0) {\n return $this->info['tab'];\n } else {\n $tab = array();\n\n if (!is_array($args[0])) {\n $tab['name'] = $args[0];\n } else {\n $tab = $args[0];\n }\n\n if (isset($args[1])) {\n $tab['plugin'] = $args[0];\n }\n\n if (isset($args[2])) {\n $tab['label'] = $args[2];\n }\n\n $tab = array_merge(array(\n 'plugin' => $this->id(),\n 'flag' => null,\n ), $tab);\n\n $this->hook('nav-tab', 'createNavTab', array(\n $tab['name'],\n $tab['plugin'],\n $tab['label'],\n $tab['flag'])\n );\n }\n }", "public function getOneBySlug($slug)\n {\n return reset($this->prepare(array(DB::findOne($this->table, 'slug = ?', array($slug)))));\n }", "public function findOneBySlug($slug) {\r\n $sql = \"SELECT * FROM `$this->table` WHERE `slug` = '$slug' LIMIT 1\";\r\n $cms = $this->db->fetchAssoc($sql);\r\n\r\n $cms['is_visible'] = $cms['is_visible'] ? true : false;\r\n\r\n return $cms;\r\n }", "public static function getFromSlug($slug, $controller) {\n\t\n\t\t$res = null;\n\n\t\t$db = db::instance();\n\t\t$rows = $db->select('id', self::$tbl_gallery, \"slug='$slug'\", null, array(0, 1));\n\t\tif(count($rows)) {\n\t\t\t$res = new multimediaGallery($rows[0]['id'], $controller);\n\t\t}\n\n\t\treturn $res;\n\t\t\t\n\t}", "private function settingsTab()\r\n {\r\n $availableTabs = array('general');\r\n $tab = 'general';\r\n if (isset($_GET['tab']) and in_array($_GET['tab'], $availableTabs)) {\r\n $tab = $_GET['tab'];\r\n }\r\n return $tab;\r\n }", "function bp_dynamic_tab_content() {\n\treturn BP_Dynamic_User_Tab_Content::get_instance();\n}", "function getPlace($slug){\n\tglobal $conn;\n\t// Get single div slug\n\t$place_slug = $_GET['place-slug'];\n\t$sql = \"SELECT * FROM place WHERE slug='$place_slug'\";\n\t$result = mysqli_query($conn, $sql);\n\n\t// fetch query results as associative array.\n\t$placedetails = mysqli_fetch_assoc($result);\n\treturn $placedetails;\n}", "function get_chunk( $chunkslug='' ) \n{\n if ( $chunkslug != '' ) {\n\t // Will return a cached version or a new Query\n\t $chunk = Chunks::RenderChunk( $chunkslug ); \n\t \n\t /* Careful here. \n\t * Chunks have a 'description' field which we use just to describe to the user where this info is presented in a template. \n\t * So if we run $chunk->get_content() it could return the contents of the description field, \n\t * because Events use a field called 'description' instead of 'content'\n\t */\n\t return $chunk;\n }\n}", "public function removeMetabox( $slug )\n\t{\n\t\tif ( isset( $this->_metaboxes[$slug] ) ) {\n\t\t\tunset( $this->_metaboxes[$slug] );\n\t\t}\n\t\treturn $this;\n\t}", "public function show($id)\n {\n $tab = Tab::findOrFail($id);\n\n return $tab;\n }", "protected function findModel($slug)\n {\n $model = Game::find()->where(['slug' => $slug])->one();\n\n if ($model !== null) {\n return $model;\n }\n\n $this->notFound('The requested page does not exist.');\n }", "protected function getTabNavigationItem() {\n return Navigation::getItem($this->navlink);\n }", "function oo_get_post_by_slug($slug) {\n $posts = get_posts(array(\n 'name' => $slug,\n 'post_type' => 'post',\n 'posts_per_page' => 1,\n 'post_status' => 'any',\n ));\n\n return count($posts) > 0 ? $posts[0] : null;\n}", "public function show($id)\n {\n return May::where('slug', $id)->first();\n }", "public function showPostBySlug($slug)\n{\n \n $sql = \"SELECT p.ID, p.media_id, p.post_author,\n p.post_date, p.post_modified, p.post_title,\n p.post_slug, p.post_content, p.post_summary, \n p.post_keyword, p.post_tags,\n p.post_status, p.post_type, p.comment_status, u.user_login\n FROM tbl_posts AS p\n INNER JOIN tbl_users AS u ON p.post_author = u.ID\n WHERE p.post_slug = :slug AND p.post_type = 'blog'\";\n\n $this->setSQL($sql);\n\n $postBySlug = $this->findRow([':slug' => $slug]);\n\n return (empty($postBySlug)) ?: $postBySlug;\n \n}", "public function getMeta(){\n return $this->tabMeta;\n }", "function post_slug_meta_box($post)\n {\n }", "public function findBySlug($slug)\n {\n $result = $this->_model->where('news_slug', '=', $slug)->first();\n\n return $result;\n }", "public static function getSubpageBySlugQuery($slug)\n {\n return Doctrine_Query::create()\n ->from('tdSubpage s')\n ->where('s.slug = ?', $slug);\n }", "function get_category_by_slug($slug)\n {\n }", "public function getTagBySlug($slug = '')\n {\n try {\n return $this->model::where('slug', $slug)->first();\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n }", "public function findBySlug($slug, MenuItemGatewayInterface $gateway)\n {\n return $gateway->retrieveBySlug($slug);\n }", "public function getModelName($type, $slug)\r\r\n {\r\r\n switch ($type) {\r\r\n case 'combo':\r\r\n return ExamSeries::where('slug', '=', $slug)->first();\r\r\n break;\r\r\n case 'lms':\r\r\n return LmsSeries::where('slug', '=', $slug)->first();\r\r\n break;\r\r\n case 'exam':\r\r\n return Quiz::where('slug', '=', $slug)->first();\r\r\n break;\r\r\n }\r\r\n return null;\r\r\n }", "public function getManifest(string $slug);", "public function getTabItem()\n {\n return $this->tabItem;\n }", "public function getContainer( $slug )\n\t\t{\n\t\t\tforeach( $this->_containers as $container ) {\n\t\t\t\tif( $container->getSlug() == $slug ) {\n\t\t\t\t\treturn $container;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function teacherMatter($slug){\n\n }", "function getIdFromSlug($slug='') {\n\t\tif(!$slug) return 0;\n\t\t$result = $this->select('id',\"`store_id` = '\".$this->store_id.\"' AND slug = '$slug'\");\n\t\tif($result) return $result[0]['id'];\n\t\treturn 0;\n\t}", "public function get_tabs() {\n return $this->_tabs;\n }", "public static function findBySlug($slug, array $columns = ['*'])\n {\n return static::whereSlug($slug)->first($columns);\n }", "public function get_tab( $tabs ) {\n\t\t$tabs['tweaks'] = array(\n\t\t\t'label' => __( 'Tweaks', 'wpcd' ),\n\t\t\t'icon' => 'fad fa-car-tilt',\n\t\t);\n\t\treturn $tabs;\n\t}", "public function findBySlugWithCategory($slug);", "public function auction_meta_tab( $tabs ) { \n\n\t\t$tabs[ 'simple_auction' ] = array( \n\t\t\t\t\t'label' => __( 'Auction', 'wcvendors-pro-simple-auctions' ), \n\t\t\t\t\t'target' => 'auction',\n\t\t\t\t\t'class' => array( 'auction_tab', 'show_if_auction', 'hide_if_grouped', 'hide_if_external', 'hide_if_variable', 'hide_if_simple' ),\n\t\t\t\t);\n\n\t\treturn $tabs; \n\t\n\t}", "public function findBySlug($slug)\n {\n return Category::where('slug', $slug)\n ->first();\n }", "public function findOneBySlug(Slug $slug);", "public function findOneBySlug(Slug $slug);", "public function show($slug)\n {\n $board = Board::with('messages')->where('slug', $slug)->first();\n return $board;\n }", "public function get_instantiated_dropin_by_slug( $slug = '' ) {\n\t\tif ( empty( $slug ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ( $this->get_instantiated_dropins() as $one_dropin ) {\n\t\t\tif ( $slug === $one_dropin['instance']->get_slug() ) {\n\t\t\t\treturn $one_dropin['instance'];\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function getNameFromSlug($slug='') {\n\t\tif(!$slug) return '';\n\t\t$result = $this->select('name',\"`store_id` = '\".$this->store_id.\"' AND slug = '$slug'\");\n\t\tif($result) return $result[0]['name'];\n\t\treturn '';\n\t}", "function getDiv($slug){\n\tglobal $conn;\n\t// Get single div slug\n\t$div_slug = $_GET['div-slug'];\n\t$sql = \"SELECT * FROM division WHERE slug='$div_slug'\";\n\t$result = mysqli_query($conn, $sql);\n\n\t// fetch query results as associative array.\n\t$divdetails = mysqli_fetch_assoc($result);\n\t/* if ($post) {\n\t\t// get the topic to which this post belongs\n\t\t$post['topic'] = getPostTopic($post['id']);\n\t} */\n\treturn $divdetails;\n}", "public function get_tab_page($params=array()) {\n return new $this->tab_page($params);\n }", "public function show($tag)\n {\n $tag = Tag::where('slug', $tag)->firstOrFail();\n return $tag;\n }", "public function getSelectedItem()\n {\n $tab = intval($_REQUEST[\"tab\"]);\n $swagPostItems = $this->getSwagPostItems();\n return $swagPostItems[$tab];\n }", "public function getBySlug($slug)\n\t{\n\t\treturn $this->doll->with('DollTypes')->where('slug', $slug)->firstOrFail();\n\t}", "static function get_category_by_slug($slug){\n\t\treturn self::$db->where('slug',$slug)->get('categories')->row();\n\t}", "public function getFieldSlug();", "function get_voter_ballot_object() {\n $metabox_id = '_cmb_voter_ballot_form';\n $object_id = 'fake-oject-id'; // since post ID will not exist yet, just need to pass it something\n return cmb2_get_metabox( $metabox_id, $object_id );\n}", "function display_metaslider_by_slug() {\n\tif ( is_front_page() ) {\n\t\techo do_shortcode(\"[metaslider id=front-page]\");\n\t}\n\telseif ( is_page() ) {\n\t\techo do_shortcode(\"[metaslider id=page]\");\n\t}\n\telse {\n\t\techo do_shortcode(\"[metaslider id=default]\");\n\t}\n}", "public function getMixtapeBySlug($slug)\n {\n $post = $this->model->with('user', 'tags')->whereSlug($slug)->firstOrFail();\n\n $comments = $this->comment\n ->wherePostId($post->id)\n ->with('user')\n ->whereHas('user', function ($q) {\n $q->whereValid(true);\n })\n ->get();\n\n return compact('post', 'comments');\n }", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "static function get_project_by_slug($slug){\n\t\treturn self::$db->select('st.*,cat.name,u.*')->from('stock as st')->where('st.slug',$slug)->join('users as u','u.id = st.user_id')->join('categories as cat','cat.id = st.cat_id')->get()->row();\n\t}", "public function show($slug)\n {\n $post = Post::whereSlug($slug)->get();\n dd($post);\n }", "public function getModel(string $slug): string\n {\n return $this->routeSlugs[$slug] ?? null;\n }", "public function bySlug($menuSlug)\n {\n return Menu::with('permission')->whereSlug($menuSlug)->first();\n }", "public function meta_box( $post, $metabox ) {\n\t\t$sidebars = get_option( 'ups_sidebars' );\n\t\t$sidebar_id = esc_attr( $metabox['args']['id'] );\n\t\t$sidebar = $sidebars[$sidebar_id];\n\n\t\t$options_fields = array(\n\t\t\t'name' => 'Name',\n\t\t\t'description' => __('Description', self::TEXT_DOMAIN),\n\t\t\t'before_title' => __('Before Title', self::TEXT_DOMAIN),\n\t\t\t'after_title' => __('After Title', self::TEXT_DOMAIN),\n\t\t\t'before_widget' => __('Before Widget', self::TEXT_DOMAIN),\n\t\t\t'after_widget' => __('After Widget', self::TEXT_DOMAIN),\n\t\t\t'children' => __('Child Behavior', self::TEXT_DOMAIN),\n\t\t);\n\n\t\t$post_types = get_post_types( array( '_builtin' => false ), 'objects' );\n\t\t$post_types = array_merge( $post_types, array( 'page' => get_post_type_object( 'page' ), 'post' => get_post_type_object( 'post' ) ) );\n\t\t?>\n\t\t<div style=\"float: left; width: 25%;\">\n\t\t\t<ul class=\"wp-tab-bar\">\n\t\t\t\t<?php $i = 0; foreach ( $post_types as $post_type ) : ?>\n\t\t\t\t\t<li <?php echo ($i == 0) ? 'class=\"wp-tab-active\"' : ''; ?>>\n\t\t\t\t\t\t<a href=\"#post-type-<?php echo esc_attr( $post_type->name ); ?>\">\n\t\t\t\t\t\t\t<?php echo esc_html( $post_type->labels->name ); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t<?php ++$i; endforeach; ?>\n\t\t\t</ul>\n\t\t\t<?php $i = 0; foreach ( $post_types as $post_type ) : ?>\n\t\t\t\t<div class=\"wp-tab-panel\" id=\"post-type-<?php echo esc_attr( $post_type->name ); ?>\" <?php echo ($i > 0) ? 'style=\"display: none;\"' : ''; ?>>\n\t\t\t\t\t<?php\n\t\t\t\t\t$items = new WP_Query( array(\n\t\t\t\t\t\t'offset' => 0,\n\t\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t\t\t'orderby' => 'title',\n\t\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t\t'post_type' => $post_type->name,\n\t\t\t\t\t\t'suppress_filters' => true,\n\t\t\t\t\t\t'update_post_term_cache' => false,\n\t\t\t\t\t\t'update_post_meta_cache' => false,\n\t\t\t\t\t\t'no_found_posts' => true,\n\t\t\t\t\t) );\n\t\t\t\t\tif ( $items->have_posts() ) : ?>\n\t\t\t\t\t\t<ul id=\"<?php echo esc_attr( $post_type->name ); ?>checklist\" class=\"categorychecklist form-no-clear\">\n\t\t\t\t\t\t\t<?php while ( $items->have_posts() ) : $items->the_post(); ?>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t<?php $name = 'ups_sidebars[' . $sidebar_id . '][locations][' . $post_type->name . '][' . get_the_ID() . ']'; ?>\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" class=\"menu-item-checkbox\" name=\"<?php echo esc_attr( $name ); ?>\" value=\"<?php echo esc_attr( get_the_title( get_the_ID() ) ); ?>\" <?php echo ( isset( $sidebar['locations'][$post_type->name] ) && array_key_exists( get_the_ID(), $sidebar['locations'][$post_type->name] ) ) ? 'checked=\"checked\"' : ''; ?> />\n\t\t\t\t\t\t\t\t\t<?php echo esc_html( get_the_title( get_the_ID() ) ); ?>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<?php endwhile; ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t<?php ++$i; endforeach; ?>\n\t\t</div>\n\t\t<script>\n\t\tjQuery(document).ready( function($) {\n\t\t\t// WP tabs\n\t\t\t$('.wp-tab-bar a').click(function(event){\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// Limit effect to the container element.\n\t\t\t\tvar context = $(this).parents('.wp-tab-bar').first().parent();\n\t\t\t\t$('.wp-tab-bar li', context).removeClass('wp-tab-active');\n\t\t\t\t$(this).parents('li').first().addClass('wp-tab-active');\n\t\t\t\t$('.wp-tab-panel', context).hide();\n\t\t\t\t$( $(this).attr('href'), context ).show();\n\t\t\t});\n\n\t\t\t// Make setting wp-tab-active optional.\n\t\t\t$('.wp-tab-bar').each(function(){\n\t\t\t\tif ( $('.wp-tab-active', this).length )\n\t\t\t\t\t$('.wp-tab-active', this).click();\n\t\t\t\telse $('a', this).first().click();\n\t\t\t});\n\t\t});\n\t\t</script>\n\t\t<div style=\"float: right; width: 70%;\">\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<?php foreach ( $options_fields as $id => $label ) : ?>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\"><?php echo esc_html( $label ); ?></label></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t<?php if ( 'children' == $id ) : ?>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\tif ( array_key_exists( 'children', $sidebar ) && $sidebar['children'] == 'on' ) {\n\t\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" value=\"on\" id=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\"<?php echo $checked; ?> />\n\t\t\t\t\t\t<span class=\"description\"><?php _e('Set page children to use the parent page sidebar by default?', self::TEXT_DOMAIN) ?></span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t<input id=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" class=\"regular-text\" type=\"text\" name=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" value=\"<?php echo esc_html( $sidebar[$id] ); ?>\" />\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</table>\n\t\t</div>\n\t\t<div class=\"clear submitbox\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save all sidebars', self::TEXT_DOMAIN) ?>\" />&nbsp;&nbsp;&nbsp;\n\t\t\t<label><input type=\"checkbox\" name=\"ups_sidebars[delete]\" value=\"<?php echo esc_attr( $sidebar_id ); ?>\" /> <?php _e('Delete this sidebar?', self::TEXT_DOMAIN) ?></label>\n\t\t</div>\n\t\t<?php\n\t}", "public function getBySlug( $slug ) {\n\n // prepara a busca\n $this->ci->db->from( 'sg_settings' )\n ->select( '*' )\n ->where( \" slug = '$slug' \" );\n\n // faz a busca\n $busca = $this->ci->db->get();\n\n // verifica se existem resultados\n if ( $busca->num_rows() > 0 ) {\n return $busca->result_array();\n } else return null;\n }", "private function show_metabox() {\n\t\t$option_key = 'display-metabox-tax-' . $this->taxonomy;\n\n\t\treturn WPSEO_Options::get( $option_key );\n\t}", "public function getBySlug($slug) {\n\t\treturn $this->find('first', array(\n\t\t\t'conditions' => array($this->alias . '.slug' => $slug),\n\t\t\t'contain' => array_keys($this->belongsTo),\n\t\t\t'cache' => array($this->alias . '::' . __FUNCTION__, $slug)\n\t\t));\n\t}", "public function metabox(){\n\t\tif ($this->options('use_metabox')){\n\t\t\treturn array(\n\t\t\t\t'id' => $this->options('name').'_metabox',\n\t\t\t\t'title' => __($this->options('singular_name').' Fields'),\n\t\t\t\t'page' => $this->options('name'),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.6548058", "0.59527993", "0.5923917", "0.58874154", "0.581092", "0.5763104", "0.56834656", "0.56618106", "0.56618106", "0.5594112", "0.5581636", "0.55160314", "0.551114", "0.5475707", "0.54657066", "0.5464961", "0.5464961", "0.5464961", "0.5464961", "0.5464961", "0.5459085", "0.54426694", "0.5435914", "0.5406153", "0.5406153", "0.5403762", "0.53899324", "0.53686404", "0.5349529", "0.53402215", "0.53097737", "0.52768576", "0.52752256", "0.5266096", "0.52513516", "0.52417386", "0.52417386", "0.52417386", "0.52417386", "0.5236726", "0.5230282", "0.5204832", "0.5204179", "0.51958805", "0.5193883", "0.5189043", "0.5186579", "0.5152611", "0.5148023", "0.51474595", "0.5127316", "0.51197255", "0.51153153", "0.51087075", "0.5089468", "0.50630414", "0.5050766", "0.5047286", "0.50468993", "0.50424254", "0.50345653", "0.5023002", "0.50206465", "0.50082606", "0.4994703", "0.4990092", "0.49894854", "0.49864876", "0.49811944", "0.4971039", "0.49662256", "0.49592933", "0.49511248", "0.4947285", "0.49421537", "0.49393165", "0.49393165", "0.4938318", "0.49355793", "0.49342164", "0.49299198", "0.49280962", "0.49109325", "0.49082747", "0.49056625", "0.49021992", "0.48982632", "0.48952097", "0.48928463", "0.48915392", "0.4876128", "0.48746374", "0.4872657", "0.4871391", "0.48701948", "0.48691186", "0.4868911", "0.48594055", "0.48484212", "0.4848278" ]
0.7139707
0
Get the metabox tabs.
public function getTabs() { return $this->_tabs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "public function get_tabs() {\n return $this->_tabs;\n }", "public function getTabs()\n {\n // so we need to set current handler object for rendering. \n $tabs = static::$tabs;\n foreach ($tabs as $tab) {\n $tab->setHandler($this);\n }\n return $tabs;\n }", "public function tabs()\r\n\t{\r\n\t\tif(!$this->tabs instanceof \\Zbase\\Models\\Ui\\Tabs)\r\n\t\t{\r\n\t\t\t$className = zbase_model_name('ui.tabs', null, '\\Zbase\\Models\\Ui\\Tabs');\r\n\t\t\t$this->tabs = new $className;\r\n\t\t}\r\n\t\treturn $this->tabs;\r\n\t}", "protected function getTabs()\n {\n return $this->_tabs;\n }", "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "public static function getTabs() {\r\n\t\treturn self::getModulesForUser(Config::$sis_tab_folder);\r\n\t}", "public function getTabs(): array\n {\n return $this->tabs;\n }", "public function getMetaboxes()\n\t{\n\t\treturn $this->_metaboxes;\n\t}", "private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }", "public static function getAll() {\r\n $result = db_select(\"{md_megamenu_tabs}\", \"mt\")\r\n ->fields(\"mt\")\r\n ->execute()\r\n ->fetchAll(PDO::FETCH_CLASS, \"MDMegaTab\");\r\n\r\n foreach ($result as &$tab) {\r\n if ($tab instanceof stdClass)\r\n $tab = _megamenu_recast(\"MDMegaTab\", $tab);\r\n $tab->initialize();\r\n }\r\n\r\n return $result;\r\n }", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "public function getMyTabs() {\n $aMyTabsByForm = [];\n\n # Build Query to get User Based Columns\n $oTabsSel = new Select(CoreEntityModel::$aEntityTables['user-form-tabs']->getTable());\n $oTabsSel->join(['core_tab'=>'core_form_tab'],'core_tab.Tab_ID = user_form_tab.tab_idfs');\n $oTabsSel->where(['user_idfs'=>$this->getID()]);\n\n # Get My Tabs from Database\n $oMyTabsDB = CoreEntityModel::$aEntityTables['user-form-tabs']->selectWith($oTabsSel);\n\n foreach($oMyTabsDB as $oTab) {\n # Order By Form\n if(!array_key_exists($oTab->form,$aMyTabsByForm)) {\n $aMyTabsByForm[$oTab->form] = [];\n }\n $aMyTabsByForm[$oTab->form][$oTab->Tab_ID] = $oTab;\n }\n\n return $aMyTabsByForm;\n }", "protected function _getNavigationTabs()\n {\n return array(\n 'bible' => array(\n 'title' => new XenForo_Phrase('th_bible_bible'),\n 'href' => XenForo_Link::buildPublicLink('bible'),\n 'position' => 'middle',\n 'linksTemplate' => 'th_navigation_tabs_bible'\n )\n );\n }", "public function tabsAction()\n {\n\t\treturn array();\n }", "public function get_help_tabs()\n {\n }", "public function getMyTabs()\n {\n $aMyTabsByForm = [];\n\n # Build Query to get User Based Columns\n $oTabsSel = new Select(CoreEntityModel::$aEntityTables['user-form-tabs']->getTable());\n $oTabsSel->join(['core_tab' => 'core_form_tab'], 'core_tab.Tab_ID = user_form_tab.tab_idfs');\n $oTabsSel->where(['user_idfs' => $this->getID()]);\n\n # Get My Tabs from Database\n $oMyTabsDB = CoreEntityModel::$aEntityTables['user-form-tabs']->selectWith($oTabsSel);\n\n foreach ($oMyTabsDB as $oTab) {\n # Order By Form\n if (! array_key_exists($oTab->form, $aMyTabsByForm)) {\n $aMyTabsByForm[$oTab->form] = [];\n }\n $aMyTabsByForm[$oTab->form][$oTab->Tab_ID] = $oTab;\n }\n\n return $aMyTabsByForm;\n }", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "function getTabs($action) \n { \n if (isset($this->m_results[\"getTabs\"])) \n return $this->m_results[\"getTabs\"]; \n return parent::getTabs($action);\n }", "public function metabox(){\n\t\tif ($this->options('use_metabox')){\n\t\t\treturn array(\n\t\t\t\t'id' => $this->options('name').'_metabox',\n\t\t\t\t'title' => __($this->options('singular_name').' Fields'),\n\t\t\t\t'page' => $this->options('name'),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}", "public function get_envira_tab_nav() {\n\n $tabs = array(\n 'images' => __( 'Images', 'envira-gallery' ),\n 'config' => __( 'Config', 'envira-gallery' ),\n 'lightbox' => __( 'Lightbox', 'envira-gallery' ),\n 'mobile' => __( 'Mobile', 'envira-gallery' ),\n );\n $tabs = apply_filters( 'envira_gallery_tab_nav', $tabs );\n\n // \"Misc\" tab is required.\n $tabs['misc'] = __( 'Misc', 'envira-gallery' );\n\n return $tabs;\n\n }", "public function get_tab( $tabs ) {\n\t\t$tabs['tweaks'] = array(\n\t\t\t'label' => __( 'Tweaks', 'wpcd' ),\n\t\t\t'icon' => 'fad fa-car-tilt',\n\t\t);\n\t\treturn $tabs;\n\t}", "public function getTabs(array $params)\n {\n $tabs = parent::getTabs($params);\n\n unset($tabs['usersadmin_add']);\n unset($tabs['usersadmin_search']);\n\n return $tabs;\n }", "public function get_settings_tabs() {\n\t\t// Sort by order, where higher number means earlier output.\n\t\tusort(\n\t\t\t$this->arr_settings_tabs,\n\t\t\tfunction( $a, $b ) {\n\t\t\t\t$a_order = $a['order'] ?? 0;\n\t\t\t\t$b_order = $b['order'] ?? 0;\n\t\t\t\treturn $b_order <=> $a_order;\n\t\t\t}\n\t\t);\n\n\t\treturn $this->arr_settings_tabs;\n\t}", "function getCustomTabsInfo(){\n $custom_tabs_info = array(array('name' => 'Tab1', 'url' => 'javascript://'),\n array('name' => 'Tab2', 'url' => 'javascript://'),\n array('name' => 'Tab3', 'url' => 'javascript://'), );\n $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);\n mysql_select_db(DB_NAME);\n $sql = \"select * from healingcrystals_user_custom_tabs where user_id='\" . $this->getId() . \"'\";\n $result = mysql_query($sql);\n if (mysql_num_rows($result)){\n while($entry = mysql_fetch_assoc($result)){\n $custom_tabs_info[$entry['tab_index']-1]['name'] = $entry['tab_description'];\n $custom_tabs_info[$entry['tab_index']-1]['url'] = $entry['tab_link'];\n }\n }\n mysql_close($link);\n return $custom_tabs_info;\n }", "public function getMeta(){\n return $this->tabMeta;\n }", "abstract protected function tabs();", "public function get_tab( $tabs ) {\n\t\t$tabs['goaccess'] = array(\n\t\t\t'label' => __( 'Goaccess', 'wpcd' ),\n\t\t\t'icon' => 'fad fa-user-chart',\n\t\t);\n\t\treturn $tabs;\n\t}", "function bp_dynamic_tab_content() {\n\treturn BP_Dynamic_User_Tab_Content::get_instance();\n}", "public function IndexGet() {\n $resp = array();\n $dtos = SiteTabService::GetTabList(999);\n $resp['dtos'] = $dtos;\n $resp['dto'] = SiteTabService::NewTabGroup();\n return $resp;\n }", "public static function getAllPortalTabs()\n {\n\n $tabs = array('Home');\n\n $browser = new SugarPortalBrowser();\n $browser->loadModules();\n foreach ($browser->modules as $moduleName => $sugarPortalModule) {\n if (!empty($sugarPortalModule->views['list.php'])) {\n $tabs[] = $moduleName;\n }\n }\n\n return $tabs;\n }", "public function _getTab()\n\t{\n\t\treturn $this->_tab;\n\t}", "protected function get_tabs_for_filter_dialog() {\n\t\treturn array();\n\t}", "public function set_tabs() {\n\t\t\t$tabs = [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'business_info',\n\t\t\t\t\t'title' => __( 'Business info', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'admin-home',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'opening_hours',\n\t\t\t\t\t'title' => __( 'Opening hours', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'clock',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'maps_settings',\n\t\t\t\t\t'title' => __( 'Map settings', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'location-alt',\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t$tabs = apply_filters( 'wpseo-local-location-meta-tabs', $tabs );\n\n\t\t\t$this->tabs = $tabs;\n\t\t}", "public function getTabPageNames()\n {\n return $this->getChildren()->getTypedControlNames(true, \"TabPage\");\n }", "public function auction_meta_tab( $tabs ) { \n\n\t\t$tabs[ 'simple_auction' ] = array( \n\t\t\t\t\t'label' => __( 'Auction', 'wcvendors-pro-simple-auctions' ), \n\t\t\t\t\t'target' => 'auction',\n\t\t\t\t\t'class' => array( 'auction_tab', 'show_if_auction', 'hide_if_grouped', 'hide_if_external', 'hide_if_variable', 'hide_if_simple' ),\n\t\t\t\t);\n\n\t\treturn $tabs; \n\t\n\t}", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "public static function get_tabs_by_menus($mids) {\r\n $results = array();\r\n\r\n $results = db_select('{md_megamenu_tabs}', 'mgmt')\r\n ->fields('mgmt')\r\n ->condition('mid', $mids, 'IN')\r\n ->orderBy('position')\r\n ->execute()\r\n ->fetchAll(PDO::FETCH_CLASS, 'MDMegaTab');\r\n\r\n if ($results) {\r\n foreach ($results as &$tab) {\r\n if ($tab instanceof stdClass)\r\n $tab = _megamenu_recast('MDMegaTab', $tab);\r\n $tab->initialize();\r\n }\r\n }\r\n\r\n return $results;\r\n }", "protected function getTabOptions() {\n $options = [\n 'members' => $this->t('Members'),\n 'admins' => $this->t('Administrators'),\n ];\n if (($this->currentUser->hasPermission('manage circle spaces') &&\n $this->moduleHandler->moduleExists('living_spaces_circles')) ||\n $this->moduleHandler->moduleExists('living_spaces_subgroup')\n ) {\n $options['inherit'] = $this->t('Inherited');\n }\n return $options;\n }", "public function get_system_tabs($filter = true)\n {\n global $moduleList;\n\n $system_tabs_result = null;\n\n $administration = Administration::getSettings('MySettings', true);\n if (isset($administration->settings) && isset($administration->settings['MySettings_tab'])) {\n $tabs = $administration->settings['MySettings_tab'];\n $trimmed_tabs = trim($tabs);\n //make sure serialized string is not empty\n if (!empty($trimmed_tabs)) {\n // TODO: decode JSON rather than base64\n $tabs = base64_decode($tabs);\n $tabs = unserialize($tabs, ['allowed_classes' => false]);\n //Ensure modules saved in the prefences exist.\n foreach ($tabs as $id => $tab) {\n\t\t\t\t\tif (!in_array($tab, $moduleList))\n unset($tabs[$id]);\n }\n if ($filter) {\n $tabs = SugarACL::filterModuleList($tabs, 'access', true);\n }\n $system_tabs_result = $this->get_key_array($tabs);\n } else {\n $system_tabs_result = $this->get_key_array($moduleList);\n }\n } else {\n $system_tabs_result = $this->get_key_array($moduleList);\n }\n\n return $system_tabs_result;\n }", "public function menu_local_tabs()\n {\n return menu_local_tabs();\n }", "private function get_main_tabs_array() {\n\t\treturn apply_filters(\n\t\t\t'updraftplus_main_tabs',\n\t\t\tarray(\n\t\t\t\t'backups' => __('Backup / Restore', 'updraftplus'),\n\t\t\t\t'migrate' => __('Migrate / Clone', 'updraftplus'),\n\t\t\t\t'settings' => __('Settings', 'updraftplus'),\n\t\t\t\t'expert' => __('Advanced Tools', 'updraftplus'),\n\t\t\t\t'addons' => __('Premium / Extensions', 'updraftplus'),\n\t\t\t)\n\t\t);\n\t}", "public static function getPortalTabs()\n {\n $modules = array();\n $administration = BeanFactory::newBean('Administration');\n // TODO: Refactor this to use the method provided to select `portal`\n // settings.\n $q = \"SELECT value FROM config WHERE category='MySettings' AND name = 'tab' AND platform = 'portal'\";\n $row = $administration->db->query($q);\n $MySettings_tab = $administration->db->fetchByAssoc($row, false);\n if (!empty($MySettings_tab['value'])) {\n $modules = json_decode($MySettings_tab['value']);\n } else {\n $modules = self::getAllPortalTabs();\n self::setPortalTabs($modules);\n }\n\n return $modules;\n }", "function woocommerce_settings_tabs_array( $settings_tabs ) {\n $settings_tabs[$this->id] = __('GWP Custom Tabs','GWP');\n return $settings_tabs;\n }", "function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}", "public function getTabularItems()\n {\n return SATabularListM::model()->findAll(array('order'=>'tabularlist_block'),array('tabularlist_aktif'=>TRUE));\n // return Yii::app()->db->createCommand('SELECT tabularlist_id, tabularlist_block FROM tabularlist_m WHERE tabularlist_aktif=TRUE')->queryAll();\n }", "public function getAdminTabs($package)\n {\n if ($package->meta->type == 'domain') {\n return [\n 'tabWhois' => Language::_('Ispapi.tab_whois.title', true),\n 'tabNameservers' => Language::_('Ispapi.tab_nameservers.title', true),\n 'tabSettings' => Language::_('Ispapi.tab_settings.title', true),\n ];\n } else {\n # Handle other services than ''domain'. for eg: ssl certificates\n }\n }", "public function getBoxes()\n\t{\n\t\t$boxes = array();\n\t\tforeach($this->getData() as $data){\n\t\t\tif($this->idAllowed($data['id'])){\n\t\t\t\t$boxes[] = array(\n\t\t\t\t\t'class' => sprintf('Webwijs\\Admin\\Metabox\\%s', $data['type']), \n\t\t\t\t\t'settings' => array('id' => $this->getMetaboxId($data['id']), 'title' => $data['title'])\n\t\t\t\t);\t\n\t\t\t}\n\t\t};\n\t\treturn $boxes;\n\t}", "public function getTABAQUISMO()\r\n {\r\n return $this->TABAQUISMO;\r\n }", "protected function createTabs() {}", "public static function getTabsByMenu($menu_id) {\r\n $results = array();\r\n\r\n $results = db_select('{md_megamenu_tabs}', 'mgmt')\r\n ->fields('mgmt')\r\n ->condition('mid', $menu_id, '=')\r\n ->orderBy('position')\r\n ->execute()\r\n ->fetchAll(PDO::FETCH_CLASS, 'MDMegaTab');\r\n\r\n if ($results) {\r\n foreach ($results as &$tab) {\r\n if ($tab instanceof stdClass)\r\n $tab = _megamenu_recast('MDMegaTab', $tab);\r\n $tab->initialize();\r\n }\r\n }\r\n\r\n return $results;\r\n }", "public function metabox( $post, $box ) {\r\n\t\t$defaults = array('taxonomy' => 'category');\r\n\t\tif ( !isset($box['args']) || !is_array($box['args']) )\r\n\t\t\t$args = array();\r\n\t\telse\r\n\t\t\t$args = $box['args'];\r\n\t\textract( wp_parse_args($args, $defaults), EXTR_SKIP );\r\n\r\n\t\t$tax = get_taxonomy($taxonomy);\r\n\r\n\t\t//get current terms\r\n\t\t$checked_terms = $post->ID ? get_the_terms( $post->ID, $taxonomy) : array();\r\n\r\n\t\t//get first term object\r\n $current_term = ! empty( $checked_terms ) && ! is_wp_error( $checked_terms ) ? array_pop( $checked_terms ) : false;\r\n $current_id = ( $current_term ) ? $current_term->term_id : '';\r\n\r\n\t\t?>\r\n\t\t<div id=\"taxonomy-<?php echo $taxonomy; ?>\" class=\"radio-buttons-for-taxonomies\">\r\n\t\t\t<ul id=\"<?php echo $taxonomy; ?>-tabs\" class=\"category-tabs\">\r\n\t\t\t\t<li class=\"tabs\"><a href=\"#<?php echo $taxonomy; ?>-all\" tabindex=\"3\"><?php echo $tax->labels->all_items; ?></a></li>\r\n\t\t\t\t<li class=\"hide-if-no-js\"><a href=\"#<?php echo $taxonomy; ?>-pop\" tabindex=\"3\"><?php _e( 'Most Used' ); ?></a></li>\r\n\t\t\t</ul>\r\n\r\n\t\t\t<style>\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.categorychecklist, .radio-buttons-for-taxonomies ul.tagchecklist { margin: 0; }\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.children { margin-left: 18px; }\r\n\t\t\t</style>\r\n\r\n\t\t\t<?php wp_nonce_field( 'radio_nonce-' . $taxonomy, '_radio_nonce-' . $taxonomy ); ?>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-pop\" class=\"wp-tab-panel tabs-panel\" style=\"display: none;\">\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist-pop\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\" >\r\n\t\t\t\t\t<?php $popular = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );\r\n\r\n\t\t\t\t\t\tif ( ! current_user_can($tax->cap->assign_terms) )\r\n\t\t\t\t\t\t\t$disabled = 'disabled=\"disabled\"';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$disabled = '';\r\n\r\n\t\t\t\t\t\t$popular_ids = array(); ?>\r\n\r\n\t\t\t\t\t\t<?php foreach( $popular as $term ){\r\n\r\n\t\t\t\t\t\t\t$popular_ids[] = $term->term_id;\r\n\r\n\t\t\t\t\t $value = is_taxonomy_hierarchical( $taxonomy ) ? $term->term_id : $term->slug;\r\n\t\t\t\t\t $id = 'popular-'.$taxonomy.'-'.$term->term_id;\r\n\r\n\t\t\t\t\t echo \"<li id='$id'><label class='selectit'>\";\r\n\t\t\t\t\t echo \"<input type='radio' id='in-{$id}'\" . checked( $current_id, $term->term_id, false ) . \" value='{$value}' {$disabled} />&nbsp;{$term->name}<br />\";\r\n\r\n\t\t\t\t\t echo \"</label></li>\";\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-all\" class=\"wp-tab-panel tabs-panel\">\r\n\t\t\t\t<?php\r\n\t $name = 'radio_tax_input[' . $taxonomy . ']';\r\n\t echo \"<input type='hidden' name='{$name}[]' value='0' />\"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.\r\n\t ?>\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist\" data-wp-lists=\"list:<?php echo $taxonomy?>\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\">\r\n\t\t\t\t\t<?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t<?php if ( current_user_can( $tax->cap->edit_terms ) ) : ?>\r\n\t\t\t\t<div id=\"<?php echo $taxonomy; ?>-adder\" class=\"wp-hidden-children\">\r\n\t\t\t\t\t<h4>\r\n\t\t\t\t\t\t<a id=\"<?php echo $taxonomy; ?>-add-toggle\" href=\"#<?php echo $taxonomy; ?>-add\" class=\"hide-if-no-js\" tabindex=\"3\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t/* translators: %s: add new taxonomy label */\r\n\t\t\t\t\t\t\t\tprintf( __( '+ %s' ), $tax->labels->add_new_item );\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t</h4>\r\n\t\t\t\t\t<p id=\"<?php echo $taxonomy; ?>-add\" class=\"category-add wp-hidden-child\">\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>\"><?php echo $tax->labels->add_new_item; ?></label>\r\n\t\t\t\t\t\t<input type=\"text\" name=\"new<?php echo $taxonomy; ?>\" id=\"new<?php echo $taxonomy; ?>\" class=\"form-required form-input-tip\" value=\"<?php echo esc_attr( $tax->labels->new_item_name ); ?>\" aria-required=\"true\"/>\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>_parent\">\r\n\t\t\t\t\t\t\t<?php echo $tax->labels->parent_item_colon; ?>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t<?php if( is_taxonomy_hierarchical($taxonomy) ) {\r\n\t\t\t\t\t\t\twp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $tax->labels->parent_item . ' &mdash;', 'tab_index' => 3 ) );\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t<input type=\"button\" id=\"<?php echo $taxonomy; ?>-add-submit\" data-wp-lists=\"add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add\" class=\"button <?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'category-add-submit'; } else { echo 'radio-add-submit';} ?>\" value=\"<?php echo esc_attr( $tax->labels->add_new_item ); ?>\" tabindex=\"3\" />\r\n\t\t\t\t\t\t<?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy ); ?>\r\n\t\t\t\t\t\t<span id=\"<?php echo $taxonomy; ?>-ajax-response\"></span>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t</div>\r\n\t<?php\r\n\t}", "public function register_data_tab( $tabs ) {\r\n $tabs['tm_extra_product_options'] = array(\r\n 'label' => __( 'TM Extra Product Options', TM_EPO_TRANSLATION ),\r\n 'target' => 'tm_extra_product_options',\r\n 'class' => array( 'tm_epo_class', 'hide_if_grouped' )\r\n );\r\n return $tabs;\r\n }", "public function settings_tabs( $tabs ) {\n\t\t$new_tab = array( 'app-vpn' => __( 'APP: VPN - Settings', 'wpcd' ) );\n\t\t$tabs = $tabs + $new_tab;\n\t\treturn $tabs;\n\t}", "public function get_metabox()\n {\n return $this->_metabox;\n }", "protected function _listTabs($type, $dn = NULL)\n {\n $this->checkAccess($type, NULL, $dn);\n\n if ($dn === NULL) {\n $tabobject = objects::create($type);\n } else {\n $tabobject = objects::open($dn, $type);\n }\n\n $tabs = array();\n foreach ($tabobject->by_object as $tab => $obj) {\n $tabs[$tab] = array(\n 'name' => $tabobject->by_name[$tab],\n 'active' => ($obj->is_account || $obj->ignore_account)\n );\n }\n return $tabs;\n }", "public function get_metabox() {\n\n return $this->_metabox;\n }", "public function tab_containers()\n\t{\n\t\t$html = '';\n\t\t$tabs = $this->tabs;\n\n\t\tforeach($tabs as $tab)\n\t\t{\n\t\t\tif(isset($tab['render']))\n\t\t\t{\n\t\t\t\t$tpl = $tab['render']();\n\t\t\t\tif(is_object($tpl))\n\t\t\t\t{\n\t\t\t\t\t$renderer = Kostache_Layout::factory();\n\t\t\t\t\t$renderer->set_layout('admin/user/tab');\n\t\t\t\t\t$tpl->id = $tab['id'];\n\n\t\t\t\t\tif(!isset($tpl->title))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tpl->title = $tab['title'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$html .= $renderer->render($tpl);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= $tpl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}", "public function getTabItem()\n {\n return $this->tabItem;\n }", "public function describeTabs();", "function _getTabs($tabs, $showTabs = true, $selectedGroup='All')\n {\n if($selectedGroup=='All')\n \t$selectedGroup=translate('LBL_TABGROUP_ALL');\n\n \t// Set up a mapping from subpanelID, found in the $tabs list, to the source module name\n \t// As the $GLOBALS['tabStructure'] array holds the Group Tabs by module name we need to efficiently convert between the two\n \t// when constructing the subpanel tabs\n \t// Note that we can't use the very similar GroupedTabStructure class as it lacks this mapping, and logically, it is designed\n \t// for use when constructing the module by module tabs, not the subpanel tabs, as we move away from using module names to represent\n \t// subpanels, and use unique subpanel IDs instead.\n\n \t$moduleNames = array () ;\n \tforeach ( $tabs as $subpanelID )\n \t{\n // Bug #44344 : Custom relationships under same module only show once in subpanel tabs\n // use object property instead new object to have ability run unit test (can override subpanel_definitions)\n $subpanel = $this->subpanel_definitions->load_subpanel( $subpanelID );\n \t\tif ($subpanel !== false)\n \t\t $moduleNames [ $subpanelID ] = $subpanel->get_module_name() ;\n \t}\n\n \t$groups = array () ;\n \t$found = array () ;\n\n foreach( $GLOBALS['tabStructure'] as $mainTab => $subModules)\n {\n foreach( $subModules['modules'] as $key => $subModule )\n {\n \t\t\tforeach ( $tabs as $subpanelID )\n if (isset($moduleNames[ $subpanelID ] ) && strcasecmp( $subModule , $moduleNames[ $subpanelID ] ) === 0)\n {\n // Bug #44344 : Custom relationships under same module only show once in subpanel tabs\n $groups [ translate ( $mainTab ) ] [ 'modules' ] [] = $subpanelID ;\n \t$found [ $subpanelID ] = true ;\n \t}\n }\n }\n\n // Put all the remaining subpanels into the 'Other' tab.\n\n foreach( $tabs as $subpanelID )\n {\n \tif ( ! isset ( $found [ $subpanelID ] ) )\n\t \t$groups [ translate ('LBL_TABGROUP_OTHER') ]['modules'] [] = $subpanelID ;\n }\n\n /* Move history to same tab as activities */\n if(in_array('history', $tabs) && in_array('activities', $tabs))\n {\n foreach($groups as $mainTab => $group)\n {\n \tif(in_array('activities', array_map('strtolower', $group['modules'])))\n {\n \tif(!in_array('history', array_map('strtolower', $group['modules'])))\n {\n \t/* Move hist from there to here */\n $groups[$mainTab]['modules'] []= 'history';\n }\n }\n else if(false !== ($i = array_search('history', array_map('strtolower', $group['modules']))))\n {\n unset($groups[$mainTab]['modules'][$i]);\n if(empty($groups[$mainTab]['modules']))\n {\n \tunset($groups[$mainTab]);\n }\n }\n }\n }\n\n /* Add the 'All' group.\n * Note that if a tab group already exists with the name 'All',\n * it will be overwritten in this union operation.\n */\n if(count($groups) <= 1)\n \t$groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs));\n else\n $groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs)) + $groups;\n /* Note - all $display checking and array_intersects with $tabs\n * are now redundant (thanks to GroupedTabStructure), and could\n * be removed for performance, but for now can stay to help ensure\n * that the tabs get renedered correctly.\n */\n\n $retTabs = array();\n if($showTabs)\n {\n \trequire_once('include/SubPanel/SugarTab.php');\n \t$sugarTab = new SugarTab();\n\n $displayTabs = array();\n $otherTabs = array();\n\n \t foreach ($groups as $key=>$tab)\n \t\t{\n $display = false;\n foreach($tab['modules'] as $subkey=>$subtab)\n {\n if(in_array(strtolower($subtab), $tabs))\n {\n $display = true;\n break;\n }\n }\n\n $selected = '';\n\n if($selectedGroup == $key)\n {\n $selected = 'current';\n }\n\n if($display)\n {\n $relevantTabs = SubPanelTilesTabs::applyUserCustomLayoutToTabs($tabs, $key);\n\n $sugarTabs[$key] = array(//'url'=>'index.php?module=' . $_REQUEST['module'] . '&record=' . $_REQUEST['record'] . '&action=' . $_REQUEST['action']. '&subpanel=' . $key.'#tabs',\n //'url'=>\"javascript:SUGAR.util.retrieveAndFill('index.php?to_pdf=1&module=MySettings&action=LoadTabSubpanels&loadModule={$_REQUEST['module']}&record={$_REQUEST['record']}&subpanel=$key','subpanel_list',null,null,null);\",\n 'label'=>( !empty($tab['label']) ? $tab['label']: $key ),\n 'type'=>$selected);\n\n $otherTabs[$key] = array('key'=>$key, 'tabs'=>array());\n\n $orderedTabs = array_intersect($relevantTabs, array_map('strtolower', $groups[$key]['modules']));\n\n foreach($orderedTabs as $subkey => $subtab)\n {\n $otherTabs[$key]['tabs'][$subkey] = array('key'=>$subtab, 'label'=>translate($this->subpanel_definitions->layout_defs['subpanel_setup'][$subtab]['title_key']));\n }\n\n if($selectedGroup == $key)\n {\n $displayTabs = $otherTabs[$key]['tabs'];\n $retTabs = $orderedTabs;\n }\n }\n \t\t}\n\n if(empty($displayTabs) && !empty($otherTabs))\n {\n //WDong Bug: 12258 \"All\" tab in the middle of a record's detail view is not localized.\n $selectedGroup = translate('LBL_TABGROUP_ALL');\n $displayTabs = $otherTabs[$selectedGroup]['tabs'];\n $sugarTabs[$selectedGroup]['type'] = 'current';\n $retTabs = array_intersect($tabs, array_map('strtolower', $groups[$selectedGroup]['modules']));\n }\n\n if (!empty($sugarTabs) || !empty($otherTabs) ) {\n \t$sugarTab->setup($sugarTabs, $otherTabs, $displayTabs, $selectedGroup);\n \t$sugarTab->display();\n }\n }\n else\n {\n $tabs = SubPanelTilesTabs::applyUserCustomLayoutToTabs($tabs, $selectedGroup);\n\n $retTabs = array_intersect($tabs, array_map('strtolower', $groups[$selectedGroup]['modules']));\n }\n\n\t\treturn $retTabs;\n\t}", "function wpf_load_post_type_metaboxes() {\n\tglobal $wpf_classes;\n\n\t$metabox_class = wpf_get_class( 'metaboxes' );\n\n\treturn $wpf_classes['metaboxes'] = new $metabox_class();\n}", "function media_upload_tabs($tabs) {\n\t\tif ( $this->is_sp_widget_context() ) {\n\t\t\tunset($tabs['type_url']);\n\t\t}\n\t\treturn $tabs;\n\t}", "function account_tab( $tabs ) {\n\n\t\t$tabs[1000]['points']['icon'] = 'um-faicon-trophy';\n\t\t$tabs[1000]['points']['title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['submit_title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['show_button'] = false;\n\n\t\treturn $tabs;\n\t}", "public function getClientTabs($package) \n {\n return [\n 'tabClientActions' => Language::_('Cwatch.tab_client_actions', true),\n 'tabClientMalWare' => Language::_('Cwatch.site.malware', true)\n ];\n }", "function setTabs(){\n global $ilTabs, $ilCtrl, $ilAccess, $ilLocator;\n\n // show current quiz round inlcuding link and QR code (deadline)\n if ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showCurrentRound\", $this->txt(\"tabmenu_showCurrentRound\"), $ilCtrl->getLinkTarget($this, \"showCurrentRound\"));\n }\n\n // tab for the \"edit quiz\" command\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"editQuiz\", $this->txt(\"tabmenu_edit_quiz\"), $ilCtrl->getLinkTarget($this, \"editQuiz\"));\n }\n\n // show round results\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showResults\", $this->txt(\"tabmenu_show_result\"), $ilCtrl->getLinkTarget($this, \"showResults\"));\n }\n\n // a \"properties\" tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"properties\", $this->txt(\"tabmenu_properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n $this->addPermissionTab();\n }\n\n // information Tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"info\", $this->txt(\"tabmenu_info\"), $ilCtrl->getLinkTarget($this, \"info\"));\n }\n\n }", "public function register_tabs() {\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/get-response.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/mailchimp.php' );\n\n\t\t$tabs = apply_filters( 'jet-engine/dashboard/form-tabs', array(\n\t\t\tnew Captcha(),\n\t\t\tnew Active_Campaign(),\n\t\t\tnew Get_Response(),\n\t\t\tnew Mailchimp(),\n\t\t) );\n\n\t\tforeach ( $tabs as $tab ) {\n\t\t\tif ( $tab instanceof Base_Form_Tab ) {\n\t\t\t\t$this->register_tab( $tab );\n\t\t\t}\n\t\t}\n\t}", "public function lite_tabs( $tabs ) {\n\n $tabs['mobile'] = __( 'Mobile', 'envira-gallery' );\n $tabs['videos'] = __( 'Videos', 'envira-gallery' );\n $tabs['social'] = __( 'Social', 'envira-gallery' );\n $tabs['tags'] = __( 'Tags', 'envira-gallery' );\n $tabs['pagination'] = __( 'Pagination', 'envira-gallery' );\n return $tabs;\n\n }", "function cre_banner_metabox_tab($property_metabox_tabs)\n{\n\tif (is_array($property_metabox_tabs)) {\n\t\t$property_metabox_tabs['banner'] = array(\n\t\t\t'label' => esc_html__('Top Banner', 'crucial-real-estate'),\n\t\t\t'icon' => 'dashicons-format-image',\n\t\t);\n\t}\n\n\treturn $property_metabox_tabs;\n}", "public function media_upload_tabs($tabs)\n\t{\n\t\tif($_GET['type'] == 'picasa')\n\t\t\treturn array('picasa_upload' => 'Upload', 'picasa_list' => 'Pictures');\n\n\t\treturn $tabs;\n\t}", "public static function get_instance() {\n\n if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Envira_Gallery_Metaboxes ) ) {\n self::$instance = new Envira_Gallery_Metaboxes();\n }\n\n return self::$instance;\n\n }", "function echotheme_tabs_func( $atts, $content = null ) {\n global $tabs;\n $tabs = array(); // clear the array\n\tdo_shortcode($content); // execute the '[tab]' shortcode first to get the title and content\n\n $tabs_nav = '<div class=\"clear\"></div>';\n $tabs_nav .= '<div class=\"tabs-wrapper\">';\n $tabs_nav .= '<ul class=\"tabs\">';\n\t$tabs_content .= '<ul class=\"tabs-content\">';\n \n\tforeach ($tabs as $tab => $tab_atts) {\n\t\t$id = str_replace(' ', '-', $tab_atts['title']);\n\t\t$default = ( $tab == 0 ) ? ' class=\"active\"' : '';\n\t\n\t\t$tabs_nav .= '<li><a href=\"#'.$id.'\"'.$default.'>'.$tab_atts['title'].'</a></li>';\n\t\t$tabs_content .= '<li id=\"'.$id.'\"'.$default.'>'.$tab_atts['content'].'</li>';\n }\n\n $tabs_nav .= '</ul>';\n\t$tabs_content .= '</ul>';\n $tabs_output .= $tabs_nav . $tabs_content;\n $tabs_output .= '</div><!-- tabs-wrapper end -->';\n $tabs_output .= '<div class=\"clear\"></div>';\n\t\n return $tabs_output;\n}", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "function dt_admin_get_metabox_list( $opts = array() ) {\n\tglobal $wp_meta_boxes;\n\n\t$defaults = array(\n\t\t'id' => 'dt_page_box',\n\t\t'page' => 'page'\n\t);\n\t$opts = wp_parse_args( $opts, $defaults );\n\n\t$meta_boxes = array();\n\n\tforeach( array('side', 'normal') as $context ) {\n\t\tforeach( array('high', 'sorted', 'core', 'default', 'low') as $priority ) {\n\t\t\tif( isset($wp_meta_boxes[$opts['page']][$context][$priority]) ) {\n\t\t\t\tforeach ( (array) $wp_meta_boxes[$opts['page']][$context][$priority] as $id=>$box ) {\n\t\t\t\t\tif( false !== strpos( $id, $opts['id']) ) {\n\t\t\t\t\t\t$meta_boxes[] = $id; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $meta_boxes;\n}", "public function getControls();", "private function initializeMetabox()\n {\n\n $this->_metabox = new \\RWC\\Metabox( $this->get_library(), array(\n 'renderer' => 'vertical-tabs',\n 'id' => 'rwc-fundraiser-metabox',\n 'title' => 'Fundraiser Options',\n 'post_types' => array( self::POST_TYPE ),\n 'sections' => array(\n array(\n 'id' => 'payment',\n 'name' => 'Payment'\n ),\n array(\n 'id' => 'customer',\n 'name' => 'Customer Details'\n ),\n array(\n 'id' => 'dates',\n 'name' => 'Open/Close Dates'\n ),\n array(\n 'id' => 'products',\n 'name' => 'Products'\n )\n ),\n 'fields' => array(\n\n 'customer-name' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Customer Name'\n ),\n\n 'customer-business' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Business Name'\n ),\n\n 'address1' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Address 1'\n ),\n\n 'address2' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Address 2'\n ),\n\n 'city' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'City'\n ),\n\n 'state' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'State'\n ),\n\n 'zipcode' => array(\n 'type' => 'text',\n 'section' => 'customer',\n 'name' => 'Zipcode'\n ),\n\n 'paypal-api-username' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Username',\n 'description' => 'The email address associated with ' .\n 'the PayPal account that should receive payment ' .\n 'for this fundraiser.'\n ),\n 'paypal-api-key' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Key',\n 'description' => 'The account\\'s PayPal API password.'\n ),\n 'paypal-api-signature' => array(\n 'type' => 'text',\n 'section' => 'payment',\n 'name' => 'PayPal API Signature',\n 'description' => 'The account\\'s PayPal API signature.'\n ),\n\n 'start-date' => array(\n 'type' => 'date',\n 'section' => 'dates',\n 'name' => 'Start Date',\n ),\n\n 'end-date' => array(\n 'type' => 'date',\n 'section' => 'dates',\n 'name' => 'End Date',\n ),\n\n 'products' => array(\n 'type' => 'fundraiser-products',\n 'section' => 'products',\n 'name' => 'Product Setup'\n )\n )\n ));\n }", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }", "public function getTabOrder() {}", "function tomahk_shortcodes() {\n\treturn tomahk_shortcodes::instance();\n}", "function tab($courseid, $blockid, $forum, $chatid, $groupid, $current_tab = 'description') {\n global $CFG;\n\n $tabs = array();\n $row = array();\n $inactive = array();\n $activated = array();\n\n if (!$groupid) { // Imprime o map somente se houver grupo.\n $inactive[] = 'map';\n }\n\n $row[] = new tabobject('description',\n $CFG->wwwroot.'/blocks/pbltool/view.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid,\n get_string('description', 'block_pbltool'));\n $row[] = new tabobject('tasks',\n $CFG->wwwroot.'/blocks/pbltool/view_tasks.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid ,\n get_string('tasks', 'block_pbltool'));\n $row[] = new tabobject('map',\n $CFG->wwwroot.'/blocks/pbltool/view_gantt.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid.'\"\n onclick=\"this.target=\\'map\\'; return\n openpopup(\\'/blocks/pbltool/view_gantt.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid.'\\'\n ,\\'map\\', \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('map', 'block_pbltool'));\n $row[] = new tabobject('forum', $CFG->wwwroot.'/mod/forum/view.php?f='.$forum . '&group=' . $groupid . '\"\n onclick=\"this.target=\\'forum\\';\n return openpopup(\\'/mod/forum/view.php?f='.$forum .'&group=' . $groupid .'\\' ,\\'forum\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=1000,height=600\\');',\n get_string('forum', 'block_pbltool'));\n\n if ($groupid) {\n $row[] = new tabobject('chat', $CFG->wwwroot.'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid. '\"\n onclick=\"this.target=\\'chat\\';\n return openpopup(\\'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid .'\\' ,\\'chat\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('groupchat', 'block_pbltool'));\n } else {\n $row[] = new tabobject('chat', $CFG->wwwroot.'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid. '\"\n onclick=\"this.target=\\'chat\\';\n return openpopup(\\'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid .'\\' ,\\'chat\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('Chat', 'block_pbltool'));\n }\n\n if (count($row) > 1) {\n $tabs[] = $row;\n return print_tabs($tabs, $current_tab, $inactive, $activated, true);\n }\n}", "public function metabox_start( $post ) {\n\t\t\tif ( ! $post ) global $post;\n\n\t\t\tif ( ! in_array( $post->post_type, $this->_meta_box['pages'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$pageTpl = null;\n\t\t\t$tabbed = ( $this->_meta_box['tabs'] ) ? ( ' jquery-ui-tabs' ) : ( '' );\n\t\t\t$metaFields = $this->_fields;\n\n\t\t\tif ( 'page' == $post->post_type ) {\n\t\t\t\t$pageTpl = get_post_meta( $post->ID, '_wp_page_template', true );\n\t\t\t\tif ( $post->ID == get_option( 'page_for_posts' ) )\n\t\t\t\t\t$pageTpl = 'blog-page';\n\t\t\t}\n\n\t\t\twp_nonce_field( 'wm-' . $post->post_type . '-metabox-nonce', $post->post_type . '-metabox-nonce' );\n\n\t\t\t//display meta box form HTML\n\t\t\t$out = '<div class=\"wm-wrap meta meta-special' . $tabbed . '\">';\n\n\t\t\t\t//tabs\n\t\t\t\tif ( $tabbed ) {\n\t\t\t\t\t$out .= '<ul class=\"tabs no-js\">';\n\t\t\t\t\t$out .= '<li class=\"item-0 visual-editor\"><a href=\"#wm-meta-visual-editor\">' . __( 'Content', 'clifden_domain_adm' ) . '</a></li>';\n\t\t\t\t\t$i = 0;\n\t\t\t\t\tforeach ( $metaFields as $tab ) {\n\t\t\t\t\t\tif ( 'section-open' == $tab['type'] ) {\n\t\t\t\t\t\t\t$hideThis = null;\n\t\t\t\t\t\t\tif ( 'page' == $post->post_type && isset( $tab['exclude'] ) && in_array( $pageTpl, $tab['exclude'] ) ) {\n\t\t\t\t\t\t\t\t$hideThis = ' hide';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$out .= '<li class=\"item-' . ++$i . $hideThis . ' ' . $tab['section-id'] . '\"><a href=\"#wm-meta-' . $tab['section-id'] . '\">' . $tab['title'] . '</a></li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$out .= '</ul> <!-- /tabs -->';\n\t\t\t\t}\n\n\t\t\techo $out;\n\n\t\t\t$editorTabContent = array(\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"section-open\",\n\t\t\t\t\t\"section-id\" => \"visual-editor\",\n\t\t\t\t\t\"exclude\" => array( 'page-template/redirect.php', 'tpl-redirect.php' )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t//Content\n\t\t\twm_render_form( $editorTabContent, 'meta', $pageTpl );\n\t\t}", "function pexeto_show_tabs( $atts, $content = null ) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t\t\t'titles' => '',\r\n\t\t\t\t\t'width' => 'medium'\r\n\t\t\t\t), $atts ) );\r\n\t\t$titlearr=explode( ',', $titles );\r\n\t\t$html='<div class=\"tabs-container\"><ul class=\"tabs \">';\r\n\t\tif ( $width=='small' ) {\r\n\t\t\t$wclass='w1';\r\n\t\t}elseif ( $width=='big' ) {\r\n\t\t\t$wclass='w3';\r\n\t\t}else {\r\n\t\t\t$wclass='w2';\r\n\t\t}\r\n\t\tforeach ( $titlearr as $title ) {\r\n\t\t\t$html.='<li class=\"'.$wclass.'\"><a href=\"#\">'.$title.'</a></li>';\r\n\t\t}\r\n\t\t$html.='</ul><div class=\"panes\">'.do_shortcode( $content ).'</div></div>';\r\n\t\treturn $html;\r\n\t}", "function get_settings(){\n $settings = array(\n 'section_title' => array(\n 'name' => __('GWP Custom Tabs','GWP'),\n 'type' => 'title',\n 'desc' => '',\n 'id' => 'wc_'.$this->id.'_section_title'\n ),\n 'title' => array(\n 'name' => __( 'Global Custom Tabs', 'GWP' ),\n 'type' => $this->post_type,\n 'desc' => __( 'Start typing the Custom Tab name, Used for including custom tabs on all products.', 'GWP' ),\n 'desc_tip' => true,\n 'default' => '',\n 'id' => 'wc_'.$this->id.'_globals'\n ),\n 'section_end' => array(\n 'type' => 'sectionend',\n 'id' => 'wc_'.$this->id.'_section_end'\n )\n );\n return apply_filters( 'wc_'.$this->id.'_settings', $settings );\n }", "function get_meta_objs() {\n return $this->meta_objs;\n }", "public function settings_metaboxes( $metaboxes ) {\n\n\t\t$metaboxes[] = array(\n\t\t\t'id' => 'vpn',\n\t\t\t'title' => __( 'All VPN Settings', 'wpcd' ),\n\t\t\t'settings_pages' => 'wpcd_settings',\n\t\t\t'tab' => 'app-vpn', // this is the top level tab on the setttings screen, not to be confused with the tabs inside a metabox as we're defining below.\n\t\t\t// List of tabs in the metabox, in one of the following formats.\n\t\t\t// 1) key => label.\n\t\t\t// 2) key => array( 'label' => Tab label, 'icon' => Tab icon ).\n\t\t\t'tabs' => $this->metabox_tabs(),\n\t\t\t'tab_style' => 'left',\n\t\t\t'tab_wrapper' => true,\n\t\t\t'fields' => $this->all_fields(),\n\n\t\t);\n\n\t\treturn $metaboxes;\n\t}", "public function getClientTabs($package)\n {\n if ($package->meta->type == 'domain') {\n return [\n 'tabClientWhois' => Language::_('Ispapi.tab_whois.title', true),\n 'tabClientNameservers' => Language::_('Ispapi.tab_nameservers.title', true),\n 'tabClientSettings' => Language::_('Ispapi.tab_settings.title', true)\n ];\n } else {\n # Handle other services than 'domain'. for eg: ssl certificates\n }\n }", "function get_posts_tabs() { ?>\n\t<div id=\"custom-post-tabs\">\n\t<ul class=\"tab-links\">\n\t <li><a href=\"#recommended-posts\">Recommended Posts</a></li>\n\t <li><a href=\"#popular-posts\">Popular Posts</a></li>\n\t <li><a href=\"#latest-posts\">Latest Posts</a></li>\n\t <?php \n\t get_recommended_posts();\n\t get_popular_posts();\n\t get_latest_posts();\n\t ?>\n \t</ul>\n\t</div>\n<?php }", "public static function getModules()\n\t{\n\t\treturn (new \\App\\Db\\Query())->select(['vtiger_tab.tabid', 'vtiger_tab.tablabel', 'tabname' => 'vtiger_tab.name'])->from('vtiger_field')\n\t\t\t->innerJoin('vtiger_tab', 'vtiger_field.tabid = vtiger_tab.tabid')->where(['uitype' => [15, 16, 33, 115], 'vtiger_field.presence' => [0, 2], 'vtiger_tab.presence' => 0])\n\t\t\t->distinct('vtiger_tab.tabid')->orderBy(['vtiger_tab.tabid' => SORT_ASC])->createCommand()->queryAllByGroup(1);\n\t}", "function group_get_menu_tabs() {\n global $USER;\n static $menu;\n\t\n $group = group_current_group();\n if (!$group) {\n return null;\n }\n\t\n\t//Start-Anusha\n\tif($group->outcome){\n\t\t$groupmem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t//End-Anusha\n\t\n\t//Start-Eshwari\n\tif($group->courseoutcome){\n\t\t$groupcoursemem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t\n\t//End-Eshwari\n\t//Start-Eshwari\n\t\n\tif($group->courseoffering){\n\t\t$groupofferingmem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t\n\t/*\n $menu = array(\n 'info' => array(\n 'path' => 'coursetemplate/info',\n 'url' => 'coursetemplate/view.php?id='.$group->id,\n\n 'title' => 'About',\n 'weight' => 20\n ),\n\t);\n\t*/\n\t//End-Eshwari\n\t $menu = array(\n 'info' => array(\n 'path' => 'groups/info',\n 'url' => 'group/view.php?id='.$group->id,\n 'title' => get_string('About', 'group'),\n\n\n 'weight' => 20\n ),\n\t);\n//Start-Anusha\n\tif($groupmem){\n\t\tif($groupmem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n//End-Anusha\n\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n//Start-Anusha\n\t}\n\t//Start-Eshwari \n\t\n\tif($groupcoursemem){\n\t\tif($groupcoursemem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n\n\t\t$menu['members'] = array(\n\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n\n\t}\n\t\n\tif($groupofferingmem){\n\t\tif($groupofferingmem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n\n\t\t$menu['members'] = array(\n\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n\n\t}\n\t\n\t\n\t//End-Eshwari\n\t/*\n\t//Start of subgroup logic by Shashank\n\t$menu['subgroups'] = array(\n\t\t\t\t'path' => 'coursetemplate/subgroups',\n\t\t\t\t'url' => 'coursetemplate/subgroups.php?id='.$group->id,\n\t\t\t\t'title' => 'Sub Template',\n\t\t\t\t'weight' => 35\n\t\t);\n\t//End of subgroup logic by Shashank\n\t*/\n\t//Start of subgroup logic by Shashank\n\t$menu['subgroups'] = array(\n\t\t\t\t'path' => 'groups/subgroups',\n\t\t\t\t'url' => 'group/subgroups.php?id='.$group->id,\n\t\t\t\t'title' => 'Sub Groups',\n\t\t\t\t'weight' => 35\n\t\t);\n//End of subgroup logic by Shashank\n//End-Anusha\t\n if ($group->public || group_user_access($group->id)) {\n $menu['forums'] = array( // @todo: get this from a function in the interaction plugin (or better, make forums an artefact plugin)\n 'path' => 'groups/forums',\n 'url' => 'interaction/forum/index.php?group='.$group->id,\n 'title' => get_string('nameplural', 'interaction.forum'),\n 'weight' => 40,\n );\n }\n\t/*\n $menu['views'] = array(\n 'path' => 'coursetemplate/views',\n 'url' => 'view/groupviews.php?group='.$group->id,\n\n 'title' => 'Views',\n 'weight' => 50,\n );\n\t*/\n\t $menu['views'] = array(\n 'path' => 'groups/views',\n 'url' => 'view/groupviews.php?group='.$group->id,\n 'title' => get_string('Views', 'group'),\n\n\n 'weight' => 50,\n );\n//Start-Anusha\nif($group->outcome){\n $menu['outcome'] = array(\n 'path' => 'groups/outcomes',\n 'url' => 'group/groupoutcome.php?group='.$group->id,\n 'title' => 'Outcome Results',\n 'weight' => 60,\n );\n}\n//End-Anusha\n//Start-Eshwari\n\nif($group->courseoutcome){\n $menu['courseoutcome'] = array(\n 'path' => 'groups/courseofferings',\n 'url' => 'group/groupcourseoffering.php?group='.$group->id,\n 'title' => 'Course offering Outcome Results',\n 'weight' => 60,\n );\n}\n//End-Eshwari\n\n\n if (group_user_access($group->id)) {\n safe_require('grouptype', $group->grouptype);\n $artefactplugins = call_static_method('GroupType' . $group->grouptype, 'get_group_artefact_plugins');\n if ($plugins = get_records_array('artefact_installed', 'active', 1)) {\n foreach ($plugins as &$plugin) {\n if (!in_array($plugin->name, $artefactplugins)) {\n continue;\n }\n safe_require('artefact', $plugin->name);\n $plugin_menu = call_static_method(generate_class_name('artefact',$plugin->name), 'group_tabs', $group->id);\n $menu = array_merge($menu, $plugin_menu);\n }\n }\n }\n\n if (defined('MENUITEM')) {\n $key = substr(MENUITEM, strlen('groups/'));\n if ($key && isset($menu[$key])) {\n $menu[$key]['selected'] = true;\n }\n }\n\n return $menu;\n}", "public function startTabs() {\n\t\t\tglobal $oSecurity; \n\t\t\t$arTabs = array( \n\t\t\t\t\"home\" => array(\n\t\t\t\t\t\"title\" => \"Home\", \n\t\t\t\t\t\"url\" => \"main.php\", \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"home\"), \n\t\t\t\t) \n\t\t\t); \n\t\t\t$oOwaesTypes = new owaestype(); \n\t\t\tforeach ($oOwaesTypes->getAllTypes() as $strKey=>$strTitle) {\n\t\t\t\t$arTabs[\"market.\" . $strKey] = array(\n\t\t\t\t\t\"title\" => $strTitle, \n\t\t\t\t\t\"url\" => \"index.php?t=\" . $strKey, \n\t\t\t\t\t\"classes\" => array(\"menu-item\", $strKey), \n\t\t\t\t);\n\t\t\t}\n\t\t\t/*$arTabs[\"users\"] = array(\n\t\t\t\t\t\"title\" => \"gebruikers\", \n\t\t\t\t\t\"url\" => \"users.php\", \n\t\t\t\t\t\"classes\" => array(\"users\", \"extratab\"), \n\t\t\t\t);*/\n\t\t\tif ($this->bLoggedInUser) {\n\t\t\t\t/*$oInbox = new inbox();\n\t\t\t\tif (count($oInbox->discussions()) > 0) {\n\t\t\t\t\t$arTabs[\"messages\"] = array(\n\t\t\t\t\t\t\"title\" => \"berichten\", \n\t\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\t\"classes\" => array(\"extratab\", \"mailbox\"), \n\t\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t\t); \n\t\t\t\t\tforeach ($oInbox->discussions() as $iKey=>$arUser) {\n\t\t\t\t\t\tif ($arUser[\"unread\"] > 0) {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"] . \" (\" . $arUser[\"unread\"] . \")\"] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation unread\"); \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"]] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation\"); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n */\n $arTabs[\"lijsten\"] = array (\n \"title\" => \"Lijsten\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"lijsten\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n \n if (user(me())->levelrights(\"groepslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"groups.php\", \"groups\");\n if (user(me())->levelrights(\"gebruikerslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Gebruikers\"] = array(\"users.php\", \"gebruikers\");\n $arTabs[\"lijsten\"][\"sub\"][\"Vrienden\"] = array(\"friends.php\", \"friends\");\n\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Badges\"] = array(\"badges.php\", \"badges\");\n\t\t\t\tif ($oSecurity->admin()) {\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Admin\"] = array(\"admin.php\", \"admin\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Reports\"] = array(\"meldingen.php\", \"meldingen\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"admin.groepen.php\", \"groups\");\n\t\t\t\t}\n \n $arTabs[\"account\"] = array (\n \"title\" => \"Account\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"account\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n $arTabs[\"account\"][\"sub\"][\"Profiel\"] = array(\"profile.php\", \"profiel\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Berichten\"] = array(\"conversation.php\", \"berichten\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Instellingen\"] = array(\"settings.php\", \"instellingen\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Paswoord aanpassen\"] = array(\"modal.changepass.php\", \"paswoord domodal\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Afmelden\"] = array(\"logout.php\", \"afmelden\");\t\n \n\t\t\t\t/*$arTabs[\"settings\"] = array(\n\t\t\t\t\t\"title\" => \"instellingen\", \n\t\t\t\t\t\"url\" => \"settings.php\", \n\t\t\t\t\t\"classes\" => array(\"extratab\", \"settings\"), \n\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t);\n \n\t\t\t\tforeach (user(me())->groups() as $oGroep) {\n\t\t\t\t\t$arTabs[\"settings\"][\"sub\"][$oGroep->naam()] = array(\"group.php?id=\" . $oGroep->id(), \"groep\"); \n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t//if ($oSecurity->admin()) $arTabs[\"account\"][\"sub\"][\"admin\"] = array(\"admin.php\", \"admin\"); \n\t\t\t\t/*\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"instellingen\"] = array(\"settings.php\", \"settings\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"profiel\"] = array(\"profile.php\", \"profile\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"uitloggen\"] = array(\"logout.php\", \"login\");\n */\n\t\t\t} else {\n\t\t\t\t$arTabs[\"login\"] = array(\n\t\t\t\t\t\"url\" => \"login.php?p=\" . urlencode($this->filename()), \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"login\"), \n\t\t\t\t); \n\t\t\t}\n\t\t\tif (isset($arTabs[$this->tab()][\"classes\"])) $arTabs[$this->tab()][\"classes\"][] = \"active\"; \n \n $strHTML = \"\";\n $strHTML .= \"<nav class=\\\"navbar navbar-default\\\">\";\n $strHTML .= \"<div class=\\\"container\\\"><div class=\\\"row\\\"><div class=\\\"navbar-header\\\">\";\n $strHTML .= \"<a href=\\\"main.php\\\"><h1 class=\\\"navbar-brand\\\">OWAES</h1></a>\";\n $strHTML .= \"<button class=\\\"navbar-toggle\\\" type=\\\"button\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#navbar-main\\\"><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span></button>\";\n\t\t\t$strHTML .= \"</div><div class=\\\"navbar-collapse collapse\\\" id=\\\"navbar-main\\\"><ul class=\\\"nav navbar-nav navbar-right\\\">\"; \n\t\t\tforeach ($arTabs as $strKey => $arDetails) {\n\t\t\t\t$strTitel = isset($arDetails[\"title\"]) ? $arDetails[\"title\"] : $strKey; \n if (!isset($arDetails[\"sub\"])){\n $strHTML .= \"<li>\";\n\t\t\t\t $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span></a>\";\n $strHTML .= \"</li>\";\n } else{\n $strHTML .= \"<li class=\\\"dropdown\\\">\";\n $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\" data-toggle=\\\"dropdown\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span> <span class=\\\"caret\\\"></span></a>\";\n \n $strHTML .= \"<ul class=\\\"dropdown-menu\\\">\"; \n\t\t\t\t\tforeach ($arDetails[\"sub\"] as $strSubTitel => $arSubDetails) {\n\t\t\t\t\t\t$strHTML .= \"<li><a href=\\\"\" . fixPath($arSubDetails[0]) . \"\\\" class=\\\"\" . $arSubDetails[1] . \"\\\"><span class=\\\"icon-\" . $arSubDetails[1] . \"\\\"></span><span>$strSubTitel</span></a></li>\";\n\t\t\t\t\t}\n\t\t\t\t\t$strHTML .= \"</ul>\"; \n $strHTML .= \"</li>\";\n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t$strHTML .= \"</ul></div></div></div></nav>\"; \n\t\t\t//$strHTML .= \"<div class=\\\"clock\\\">\" . clock() . \"</div>\"; \n\t\t\t/*$strHTML .= \"<form class=\\\"search\\\" action=\\\"\" . fixPath(\"search.php\") . \"\\\" method=\\\"get\\\">\n\t\t\t\t\t\t\t<input class=\\\"searchfield\\\" type=\\\"text\\\" name=\\\"q\\\" \" . (isset($_GET[\"q\"])?(\"value=\\\"\" . inputfield($_GET[\"q\"]) . \"\\\"\"):\"\") . \" />\n\t\t\t\t\t\t\t<input class=\\\"searchbutton\\\" type=\\\"submit\\\" value=\\\"zoeken\\\" />\n\t\t\t\t\t\t</form>\"; */\n //$strHTML .= \"<ul class=\\\"popupmessages\\\"></ul>\"; \n\t\t\tif (!$this->bLoggedInUser) { \n\t\t\t\t$strHTML .= \"<div class=\\\"loginbar\\\">\n\t\t\t\t\t\t\t\tLog in: \n\t\t\t\t\t\t\t\t<form action=\\\"\" . fixPath(\"login.php\") . \"\\\" method=\\\"post\\\">\n\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"from\\\" id=\\\"from\\\" value=\\\"\" . $this->filename(TRUE) . \"\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"username\\\" id=\\\"username\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"password\\\" name=\\\"pass\\\" id=\\\"pass\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"submit\\\" name=\\\"dologin\\\" value=\\\"inloggen\\\" />\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\tof <a href=\\\"\" . fixPath(\"login.php?p=\" . urlencode($this->filename())) . \"\\\">registreer</a>\n\t\t\t\t\t\t\t</div>\";\n\t\t\t} \n\t\t\t//$strHTML .= \"<div id=\\\"ADMIN\\\">\n\t\t\t//\t\t\t\t\t<ul><a href=\\\"#\\\" rel=\\\"SQL\\\">show/hide SQL</a></ul>\n\t\t\t//\t\t\t\t</div>\";\n\t\t\t\n\t\t\tif(settings(\"analytics\")!=\"\") {\n\t\t\t\t$strHTML = \"<script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n ga('create', '\" . settings(\"analytics\") . \"', 'auto');\n ga('send', 'pageview');\n\n</script>\" . $strHTML; \t\n\t\t\t}\n\t\t\t\n\t\t\treturn $strHTML; \n\t\t}", "function the_media_upload_tabs()\n {\n }", "public function actionIndex()\n {\n $this->can('viewTabs');\n $searchModel = new TabsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function providerTestHorizontalTabsLabels() {\n return array_reduce($this->themeList, function (array $carry, string $theme_name) {\n $carry[$theme_name] = [\n 'theme_name' => $theme_name,\n ];\n return $carry;\n }, []);\n }", "private function parse_options()\n\t\t{\n\t\t\t$options = $this->options;\n\n\t\t\tforeach ( $options as $option ) {\n\n\t\t\t\tif ( $option[ 'type' ] == 'heading' ) {\n\t\t\t\t\t$tab_name = sanitize_title( $option[ 'name' ] );\n\t\t\t\t\t$this->tab_headers = array( $tab_name => $option[ 'name' ] );\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$option[ 'tab' ] = $tab_name;\n\t\t\t\t$tabs[ $tab_name ][ ] = $option;\n\n\t\t\t}\n\n\t\t\t$this->tabs = $tabs;\n\n\t\t\treturn $tabs;\n\t\t}", "private function tabs_panels() {\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$panel_class = [ 'wpseo-local-meta-section' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$panel_class[] = 'active';\n\t\t\t\t}\n\n\t\t\t\techo '<div role=\"tabpanel\" id=\"wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $panel_class ) . '\">';\n\t\t\t\techo '<div class=\"wpseo-local-metabox-content\">';\n\t\t\t\tdo_action( 'wpseo-local-panel-content-' . $tab['id'] );\n\t\t\t\techo '</div>';\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t}", "function get_toolbars()\n {\n }" ]
[ "0.8287205", "0.752857", "0.7210512", "0.71752465", "0.7169767", "0.704058", "0.70309263", "0.69890857", "0.6913948", "0.66730154", "0.6547791", "0.6283648", "0.62319225", "0.61603034", "0.6135458", "0.6127408", "0.6122459", "0.60828656", "0.60721046", "0.6048926", "0.6005547", "0.60045063", "0.5998652", "0.5980417", "0.5956897", "0.5951341", "0.59234655", "0.58595145", "0.58478177", "0.5831787", "0.58198583", "0.5771428", "0.57697684", "0.57422715", "0.57367915", "0.5733951", "0.5708011", "0.57008564", "0.56989557", "0.56918406", "0.5681955", "0.56357723", "0.5623879", "0.56195563", "0.5608921", "0.5606352", "0.55874735", "0.5579815", "0.5578648", "0.55603194", "0.5554125", "0.55457616", "0.55102456", "0.54623204", "0.5455925", "0.54029393", "0.54004383", "0.538591", "0.53713894", "0.53635764", "0.534236", "0.5333462", "0.53308976", "0.5325743", "0.52765816", "0.5269051", "0.5247402", "0.52387166", "0.5199516", "0.5189727", "0.5171737", "0.5165532", "0.5164942", "0.5164497", "0.5141606", "0.5139061", "0.5119819", "0.510906", "0.5094934", "0.50909925", "0.50796527", "0.5057492", "0.50506514", "0.5047376", "0.5047182", "0.504677", "0.5042311", "0.5028231", "0.5020332", "0.5015251", "0.5010648", "0.49992582", "0.49970528", "0.4983461", "0.49805772", "0.49713892", "0.49706382", "0.49611965", "0.4960726", "0.49594256" ]
0.70845234
5
Get the metabox post type.
public function getPostType() { return $this->_postType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function type() { return $this->post->post_type; }", "public static function get_post_type(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_post_type();\n }", "function tc_get_post_type() {\r\n global $post;\r\n\r\n if ( !isset($post) )\r\n return;\r\n \r\n return $post -> post_type;\r\n }", "public function getType()\n {\n return $this->type = $this->get()->post_type;\n }", "public function get_post_type() {\n\t\treturn $this->post_type_key;\n\t}", "public function getPostType() {\n\t\treturn $this->post_type;\n\t}", "public function getPostType(): string {\n return $this->post_type;\n }", "public function get_post_type($value='') {\n\t\t\treturn $this->post_type;\n\t\t}", "public static function get_meta_type();", "public function get_meta_type() {\n\t\treturn $this->get_list_screen()->get_meta_type();\n\t}", "public function get_meta_type() {\n\t\tif ( $this instanceof Term ) {\n\t\t\treturn 'term';\n\t\t}\n\n\t\tif ( $this instanceof Post ) {\n\t\t\treturn 'post';\n\t\t}\n\n\t\tif ( isset( $this->meta_type ) ) {\n\t\t\treturn $this->meta_type;\n\t\t}\n\n\t\treturn null;\n\t}", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "public static function get_class_post_type()\n {\n return self::$post_type;\n }", "protected function get_meta_type() {\n\t\tif ( $current_filter = current_filter() ) {\n\t\t\treturn papi_get_meta_type( explode( '_', $current_filter )[1] );\n\t\t}\n\n\t\treturn papi_get_meta_type();\n\t}", "function get_post_type($post = \\null)\n {\n }", "public function getPostType(){\n return $this->wpdsPostType;\n }", "public function meta_type()\n\t{\n\t\treturn $this->get_context_meta_value( __FUNCTION__ );\n\t}", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "private function get_post_type()\n {\n $post_id = get_the_ID();\n\n // Check post for post type\n if( $post_id )\n {\n return get_post_type($post_id);\n }\n\n // Check query vars for post type\n if( $post_type = get_query_var('post_type') )\n {\n return $post_type;\n }\n\n // No post type found\n return '';\n\n }", "public function getMetaType(): string\n {\n return $this->meta_type;\n }", "public function get_type() {\n\t\treturn isset( $this->item['type'] ) ? esc_attr( $this->item['type'] ) : false;\n\t}", "public function _get_current_post_type($instance)\n {\n\t\tif (!empty($instance[\"post_type\"] ) && post_type_exists($instance[\"post_type\"])) {\n\t\t\treturn $instance[\"post_type\"];\n\t\t}\n\n\t\treturn \"\";\n\t}", "function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}", "protected abstract function get_meta_type();", "public function get_post_types() {\n\n\t\treturn $this->post_type;\n\n\t}", "public function getContentType()\n {\n return $this->item['type'];\n }", "public function getContentType()\r\n\t{\r\n\t\treturn $this->m_type;\r\n\t}", "public function get_content_type() {\n return $this->content_type;\n }", "public static function current_object_type() {\n\t\tglobal $pagenow;\n\t\t$type = 'post';\n\n\t\tif ( in_array( $pagenow, [ 'user-edit.php', 'profile.php', 'user-new.php' ], true ) ) {\n\t\t\t$type = 'user';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-comments.php', 'comment.php' ], true ) ) {\n\t\t\t$type = 'comment';\n\t\t}\n\n\t\tif ( in_array( $pagenow, [ 'edit-tags.php', 'term.php' ], true ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\tif ( Conditional::is_ajax() && 'add-tag' === Param::post( 'action' ) ) {\n\t\t\t$type = 'term';\n\t\t}\n\n\t\treturn $type;\n\t}", "public function getType()\r\n {\r\n return $this->m_type;\r\n }", "protected function get_post_type() {\n\t\tif ( $post = get_post() ) {\n\t\t\treturn get_post_type( $post );\n\t\t}\n\n\t\tif ( isset( $_GET['post'] ) ) {\n\t\t\treturn get_post_type( sanitize_text_field( $_GET['post'] ) );\n\t\t}\n\n\t\tif ( isset( $_GET['post_type'] ) ) {\n\t\t\treturn strtolower( sanitize_text_field( $_GET['post_type'] ) );\n\t\t}\n\n\t\t$req_uri = $_SERVER['REQUEST_URI'];\n\t\t$exploded = explode( '/', $req_uri );\n\t\t$last = end( $exploded );\n\t\t$last = parse_url( $last, PHP_URL_PATH );\n\n\t\tif ( $last === 'post-new.php' || $last === 'edit.php' ) {\n\t\t\treturn 'post';\n\t\t}\n\n\t\treturn '';\n\t}", "function _get_type() {\n\t\treturn $this->type();\n\n\t}", "function get_post_type_object($post_type)\n {\n }", "public function post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'Departamentos'),\n\t\t\t'singular_name' => __( 'Departamento' ),\n\t\t\t'add_new' => __('Añadir nuevo'),\n\t\t\t'add_new_item' => __('Añadir nuevo Departamento'),\n\t\t\t'edit_item' => __('Editar Departamento'),\n\t\t\t'new_item' => __('Nuevo Departamento'),\n\t\t\t'view_item' => __('Ver Departamento'),\n\t\t\t'search_items' => __('Buscar'),\n\t\t\t'not_found' => __('No se encontraron Departamentos'),\n\t\t\t'not_found_in_trash' => __('No se encontraron Departamentos en la Papelera'), \n\t\t\t'parent_item_colon' => ''\n\t\t );\n\t\t \n\t\t $args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true, \n\t\t\t'query_var' => true,\n\t 'has_archive' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => true,\n\t\t 'show_ui' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t 'show_in_menu' => 'bn_config',\n\t\t\t'menu_position' => 57,\n\t\t\t'menu_icon' => 'dashicons-clipboard',\n\t\t\t'rewrite' => array('slug' => __( $this->post_type )),\n\t\t\t'supports' => array('title', 'excerpt', 'page-attributes') //,'editor'\n\t\t );\n\t\t \n\t\t register_post_type(__( $this->post_type ), $args);\n\t}", "public function metabox(){\n\t\tif ($this->options('use_metabox')){\n\t\t\treturn array(\n\t\t\t\t'id' => $this->options('name').'_metabox',\n\t\t\t\t'title' => __($this->options('singular_name').' Fields'),\n\t\t\t\t'page' => $this->options('name'),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}", "function wpf_load_post_type_metaboxes() {\n\tglobal $wpf_classes;\n\n\t$metabox_class = wpf_get_class( 'metaboxes' );\n\n\treturn $wpf_classes['metaboxes'] = new $metabox_class();\n}", "public function getType()\n\t{\n\t\treturn $this->get('type');\n\t}", "public function getBoxType()\n {\n return $this->get(self::_BOX_TYPE);\n }", "public function getMtype()\n {\n return $this->mtype;\n }", "public function get_post_types(){ return $this->post_types; }", "function getContentType() {\n\t\treturn $this->getData('content_type');\n\t}", "public static function post_type(){}", "public function contenttype() {\n return $this->info['content_type'];\n }", "public function getType()\n\t{\n\t\treturn $this->getObject('type', null, 'type');\n\t}", "public function get_type() {\n\t\treturn $this->type;\n\t}", "function get_post_type_advanced() {\n\n $post_type = get_post_type();\n\n if( is_post_type_archive() ) {\n $post_type = get_query_var( 'post_type' );\n }\n\n if( is_tax() ) {\n $post_type = get_taxonomy( get_queried_object()->taxonomy )->object_type[0];\n }\n\n return $post_type;\n}", "public function getType()\n {\n return $this->i18n_singular_name();\n }", "final protected function get_type() {\n return $this->type;\n }", "public function get_metabox() {\n\n return $this->_metabox;\n }", "public function get_metabox()\n {\n return $this->_metabox;\n }", "public function get_type() {\n return $this->type;\n }", "public static function get_post_type( $id = '', $page = false ) {\n\n\t\t\tif ( self::$plugin ) {\n\n\t\t\t\treturn Codevz_Plus::get_post_type( $id, $page );\n\n\t\t\t} else {\n\n\t\t\t\treturn get_post_type( $id );\n\n\t\t\t}\n\n\t\t}", "public function get_post_type() {\n\n\t\treturn array(\n\t\t\tPost_Type_Movie::SLUG,\n\t\t);\n\n\t}", "public function type() {\n\t\t\treturn $this->_type;\n\t\t}", "public function getType()\n {\n return $this->getProperty('type');\n }", "public function meta_type();", "public function type()\n {\n return $this->_type;\n }", "public function type()\n\t{\n\t\treturn $this->definition->name;\n\t}", "public function get_type(){\n\t\treturn $this->_type;\n\t}", "public function type()\n\t{\n\t\treturn $this->belongsTo('Lainga9\\BallDeep\\app\\PostType', 'post_type_id');\n\t}", "function getType () {\n\t\treturn $this->type;\n\t}", "protected function type()\n {\n return $this->options['type'];\n }", "function getType() {\n\t\treturn $this->_type;\n\t}", "public function get_type() {\n return $this->_type;\n }", "public function getForcedType()\n {\n return $this->_forcedType;\n }", "public function type()\n {\n return $this->type;\n }", "public function type()\n {\n return $this->type;\n }", "public function type()\n {\n return $this->type;\n }", "public function getType()\n {\n return isset($this->type) ? $this->type : null;\n }", "function getType() {\n\t\treturn $this->type;\n\t}", "public function getType()\n\t{\n\t\treturn empty($this->type) ? $this->guessType() : $this->type;\n\t}", "private function get_type(){\n\t\treturn $this->_type;\n\t}", "public function getType()\n\t\t{\n\t\t\treturn $this->type;\n\t\t}", "public function getContentType()\n {\n return $this->get(self::_CONTENT_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function postTypes()\n {\n return $this->morphedByMany(\n PostType::class,\n 'metable',\n 'metables',\n 'meta_id',\n );\n }", "public function getType()\n {\n\treturn $this->type;\n }", "public function getContentType()\n\t{\n\t\treturn $this->contenttype;\n\t}", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }", "public function getType()\n {\n return $this->_type;\n }" ]
[ "0.7782287", "0.74383503", "0.73941356", "0.7316453", "0.72325605", "0.71699166", "0.71079636", "0.7025792", "0.6962204", "0.6955979", "0.6891002", "0.68227893", "0.68227893", "0.68159735", "0.6799693", "0.6735182", "0.6712479", "0.6706258", "0.6706258", "0.6706258", "0.6706258", "0.66993415", "0.6681663", "0.6559839", "0.6547581", "0.6529391", "0.6478315", "0.64427847", "0.6377843", "0.63657993", "0.6343345", "0.6337673", "0.6314716", "0.62910855", "0.6290518", "0.6286731", "0.6273804", "0.6272992", "0.61789554", "0.6140806", "0.61264455", "0.61217946", "0.6120008", "0.6117267", "0.61068785", "0.6098854", "0.6061272", "0.6058414", "0.60499406", "0.6045663", "0.6034052", "0.602855", "0.6028214", "0.6020977", "0.60112405", "0.6004366", "0.60025233", "0.5990588", "0.5978542", "0.5973564", "0.5973043", "0.59656394", "0.59647804", "0.5961556", "0.5953471", "0.59533966", "0.59493977", "0.5947967", "0.5943955", "0.5943955", "0.5943955", "0.5942693", "0.5941302", "0.5937108", "0.5925246", "0.5923058", "0.5922434", "0.5920354", "0.5920354", "0.5920354", "0.5919622", "0.5919622", "0.5919622", "0.5919622", "0.5919622", "0.5919622", "0.5919622", "0.5919622", "0.5919622", "0.5919622", "0.59148353", "0.5908676", "0.59049505", "0.59046835", "0.59046835", "0.59046835", "0.59046835", "0.59046835", "0.59046835", "0.59046835" ]
0.69556177
10
Get the metabox slug.
public function getSlug() { return $this->_slug; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSlug()\n {\n return $this->__get(self::FIELD_SLUG);\n }", "public function get_slug() {\n\t\treturn $this->slug;\n\t}", "public function slug()\n\t{\n\t\treturn $this->slug;\n\t}", "public function get_slug()\n {\n return $this->slug;\n }", "public function getSlug()\n {\n return $this->sSlug;\n }", "public function getSlug()\n\t{\n\t\treturn self::buildSlug();\n\t}", "public function getSlug();", "public function getSlug();", "public function getSlug();", "public function getSlug();", "function post_slug_meta_box($post)\n {\n }", "public function getSlug()\n\t{\n\t\treturn $this->slug;\n\t}", "public function getSlug()\n\t{\n\t\treturn $this->slug;\n\t}", "public function getSlug()\n\t{\n\t\treturn $this->slug;\n\t}", "public function getSlug()\n {\n return $this->slug;\n }", "public function getSlug()\n {\n return $this->slug;\n }", "public function getSlug()\n {\n return $this->slug;\n }", "public function getSlug()\n {\n return $this->slug;\n }", "public function getSlug()\n {\n return $this->slug;\n }", "public function getSlug()\n {\n return $this->slug;\n }", "public function get_slug() {\n\t\treturn self::SLUG;\n\t}", "public function getSlug(): string\n {\n return $this->slug;\n }", "public function getSlug() {\n return $this->slug;\n }", "public function getSlug()\n {\n return $this->slug ?? $this->id;\n }", "public function getSlug()\n {\n return $this->getValue('nb_catalog_item_lang_slug');\n }", "public function getSlug()\n {\n return $this->nicename;\n }", "public function get_slug() {\n\t\tif ( ! empty( $this->data->slug ) )\n\t\t\treturn $this->data->slug;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getSlug(): string\n {\n return $this->name_slug;\n }", "public function get_slug(){ return $this->slug; }", "public function wpAjaxSlug()\n\t{\n\t\treturn $this->getSlug();\n\t}", "function get_the_slug() {\n\treturn basename(get_permalink());\n}", "function the_slug() {\n\techo get_the_slug();\n}", "public function getSlug()\n\t{\n\t\treturn strtolower($this->getName());\n\t}", "public function getSlug()\n\t{\n\t\t$posttype_class = get_called_class();\n\t\treturn ( string ) $posttype_class::$post_type;\n\t}", "public function getMenuSlug(): string;", "public function slug() {\n\t\treturn $this->createSlug($this->title);\n\t}", "protected function getSlug(){\n $this->Name = UrlUtils::getSlug($this->FriendlyName);\n return $this->Name;\n }", "public function slug()\n\t{\n\t\t$explode = explode('/', $this->getField('key'));\n\n\t\t// Check if the page have a parent.\n\t\tif(!empty($explode[1])) {\n\t\t\treturn $explode[1];\n\t\t}\n\n\t\treturn $explode[0];\n\t}", "public function getSlug()\n {\n return (! $this->isExtension) ? $this->blockSlug : $this->extensionSlug;\n }", "protected function getSlugName() {\n return $this->title;\n }", "public static function getSlug(): string\n {\n return static::SLUG;\n }", "public function getSlug()\n {\n return $this->getCurrentTranslation()->getSlug() ?: 'n-a';\n }", "public function getFieldSlug();", "public static function getSlugField()\n {\n return 'slug';\n }", "public function slug(): string;", "public function getSlug()\n {\n return $this->provider .'-'. str_replace('_', '-', $this->postId);\n }", "public function slug();", "public function slug();", "public function getSlug(ContentfulEntry $contentfulEntry): string;", "protected function slugField()\n {\n return 'slug';\n }", "public function slug()\n {\n return $this->username ? : $this->slug;\n }", "function article_slug() {\n return Registry::prop('article', 'slug');\n}", "public function getSlug()\n {\n if (!isset($this->slug))\n {\n $this->slug = $this->getHelper()->getSlugFromPath($this->getPathname());\n }\n\n return $this->slug;\n }", "public function slugTarget(){\n\t\treturn 'title';\n\t}", "public function getSlug()\n {\n $slug = $this->cekUrl(str_slug($this->param));\n return $slug;\n }", "public function getMetabox( $slug )\n\t{\n\t\treturn isset( $this->_metaboxes[( string ) $slug] ) ? $this->_metaboxes[( string ) $slug] : false;\n\t}", "private final function getSlug()\n {\n $className = get_called_class();\n $className = explode('\\\\', $className);\n return end($className);\n }", "public function getTemplateSlug(): string;", "public function getSlug() : string\n {\n return 'template';\n }", "public function getSlug()\n\t{\n\t\t$name = get_class($this);\n\t\t$name = str_replace('\\\\', '/', $name);\n\t\t$name = basename($name);\n\n\t\treturn strtolower($name);\n\t}", "public function get_plugin_slug()\n {\n }", "public function getName() {\n return 'Slug';\n }", "function ss_get_slug( $id ) {\r\n\tif ( $id==null ) $id=$post->ID;\r\n\t$post_data = get_post( $id, ARRAY_A );\r\n\t$slug = $post_data['post_name'];\r\n\treturn $slug;\r\n}", "protected function getSlug()\n {\n return trim(str_replace($this->website->domain, '', $this->getStrippedUrl()), '/') ?: '/';\n }", "public function get_slug( $context = 'view' ) {\n\t\treturn $this->get_prop( 'slug', $context );\n\t}", "public function get_slug() {\n\n\t\t$plugin_data = $this->client->get_plugin_update_info();\n\t\t$slug = $plugin_data->slug;\n\n\t\treturn $slug;\n\n\t}", "protected function getSlugAttribute(): string\n {\n return $this->getSlug();\n }", "public function getSlug(){\n $slugString = sprintf(\"%s\",$this->transaction_role);\n $phalconSlugLibrary = new \\Phalcon\\Utils\\Slug();\n return $phalconSlugLibrary->generate($slugString);\n }", "public function getSlugKey()\n {\n return 'slug';\n }", "public function get_slug( $post_type ) {\n\t\t$name = $this->get_default_names()[$post_type]['slug'];\n\t\treturn $name;\n\t}", "public function getSlug() : string\n {\n return 'support';\n }", "public function sluggable()\n {\n return 'title';\n }", "function be_metabox_show_on_slug( $display, $meta_box ) {\n if ( ! isset( $meta_box['show_on']['key'], $meta_box['show_on']['value'] ) ) {\n return $display;\n }\n\n if ( 'slug' !== $meta_box['show_on']['key'] ) {\n return $display;\n }\n\n $post_id = 0;\n\n // If we're showing it based on ID, get the current ID\n if ( isset( $_GET['post'] ) ) {\n $post_id = $_GET['post'];\n } elseif ( isset( $_POST['post_ID'] ) ) {\n $post_id = $_POST['post_ID'];\n }\n\n if ( ! $post_id ) {\n return $display;\n }\n\n $slug = get_post( $post_id )->post_name;\n\n // See if there's a match\n return in_array( $slug, (array) $meta_box['show_on']['value']);\n}", "public function generateSlug();", "public function getSlug() : string\n {\n return 'block_editor';\n }", "function app_get_the_slug( $echo=true )\n\t\t{\n\t\t\t$slug = basename(get_permalink());\n\t\t\tdo_action('before_slug', $slug);\n\t\t\t$slug = apply_filters('slug_filter', $slug);\n\t\t\tif( $echo ) echo $slug;\n\t\t\tdo_action('after_slug', $slug);\n\t\t\treturn $slug;\n\t\t}", "public static function getQualifiedSlugField()\n {\n return 'roles.slug';\n }", "public function makeSlug () {\n\t\tif(empty($this->slug)) {\n\t\t\t$this->slug = UTF8::slugify($this->name);\n\t\t}\n\t\treturn $this->slug;\n\t}", "public function options_slug() {\n\t\t\treturn $this->options_slug;\n\t\t}", "abstract public static function slug(): string;", "public function getIdentityField() \n {\n return self::FIELD_SLUG;\n }", "public function get_plugin_slug() {\n return $this->plugin_slug;\n }", "public function get_widget_slug() {\n return $this->widget_slug;\n }", "function get_the_slug( $id=null ){\n if( empty($id) ):\n global $post;\n if( empty($post) )\n return ''; // No global $post var available.\n $id = $post->ID;\n endif;\n $slug = basename( get_permalink($id) );\n return $slug;\n}", "protected function getHomeSlug()\n {\n return config('cms-wiki-module.home.slug');\n }", "public function getSlug()\n {\n /** @var \\Dimsav\\Translatable\\Translatable $this */\n /** @var \\Cviebrock\\EloquentSluggable\\SluggableInterface $translation */\n $translation = $this->getTranslation();\n\n if (empty($translation)) return null;\n\n return $translation->getSlug();\n }", "public function getSlug()\n {\n if ($this->hasLocalizedSlug()) {\n //Cast model slug to propert type\n $slug = $this->getValue('slug');\n $slug = is_array($slug) ? $slug : (array) json_decode($slug);\n\n $lang = Localization::get();\n\n //Return selected language slug\n if (array_key_exists($lang->slug, $slug) && $slug[$lang->slug]) {\n return $slug[$lang->slug];\n }\n\n $default = Localization::getFirstLanguage();\n\n //Return default slug value\n if ($default->getKey() != $lang->getKey() && array_key_exists($default->slug, $slug) && $slug[$default->slug]) {\n return $slug[$default->slug];\n }\n\n //Return one of set slug from any language\n foreach (Localization::getLanguages() as $lang) {\n if (array_key_exists($lang->slug, $slug) && $slug[$lang->slug]) {\n return $slug[$lang->slug];\n }\n }\n\n //If languages has been hidden, and no slug has been defined from any known language\n //we can return any existing\n return array_values($slug)[0] ?? null;\n }\n\n return $this->slug;\n }", "public function getSlugAttribute()\n\t{\n\t\treturn $this->getOriginal('slug') ?: $this->id;\n\t}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "public static function slugProperty() : ? string {\n return null;\n }", "public function getSlugKey(): string|null;", "public function getSlugKeyName(): string;", "function getNameFromSlug($slug='') {\n\t\tif(!$slug) return '';\n\t\t$result = $this->select('name',\"`store_id` = '\".$this->store_id.\"' AND slug = '$slug'\");\n\t\tif($result) return $result[0]['name'];\n\t\treturn '';\n\t}" ]
[ "0.72124475", "0.68690884", "0.6868905", "0.6852305", "0.68192595", "0.68177533", "0.6816848", "0.6816848", "0.6816848", "0.6816848", "0.6798254", "0.6797756", "0.6797756", "0.6797756", "0.67523545", "0.67523545", "0.67523545", "0.67523545", "0.67523545", "0.67523545", "0.673866", "0.6707899", "0.6669641", "0.66140884", "0.6602944", "0.6578149", "0.653671", "0.6524089", "0.65058196", "0.6502506", "0.64925057", "0.6471831", "0.6465027", "0.6452077", "0.6449778", "0.6440076", "0.64244586", "0.6413475", "0.6405711", "0.6399881", "0.63591707", "0.63408124", "0.63375014", "0.6332437", "0.62660235", "0.6244247", "0.62282026", "0.62282026", "0.6224079", "0.6186794", "0.6171072", "0.61350214", "0.6129681", "0.6125872", "0.6093079", "0.6093024", "0.6053317", "0.6051648", "0.60381764", "0.60251516", "0.5982488", "0.5953472", "0.5948561", "0.593605", "0.5900442", "0.58987147", "0.5894628", "0.5865156", "0.58284813", "0.58262974", "0.5811105", "0.5805553", "0.5790554", "0.5765054", "0.57538533", "0.5748086", "0.5730914", "0.5724366", "0.57217807", "0.5703603", "0.57001144", "0.56853354", "0.56616294", "0.56580806", "0.565535", "0.5649737", "0.56468284", "0.5634887", "0.56344974", "0.56344974", "0.56344974", "0.56344974", "0.56344974", "0.56344974", "0.56344974", "0.561992", "0.55805755", "0.5577936", "0.554846" ]
0.6730209
22
Get the metabox title.
public function getTitle() { return $this->_title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTitle()\r\n {\r\n return $this->m_title;\r\n }", "protected function getMetaTitle() {\r\n\t\treturn $this->metaTitle;\r\n\t}", "public function getMetaTitle()\n\t{\n\t\treturn $this->metaTitle ? $this->metaTitle : $this->getName();\n\t}", "public function metaTitle()\n\t{\n\t\treturn ($this->title == '') ? $this->name : $this->title;\n\t}", "public function getMetaTitle();", "public function getTitle()\n {\n return $this->metaTitle;\n }", "public function get_title()\n\t{\n\t\treturn $this->title;\n\t}", "public function title()\n {\n return $this->{static::$title};\n }", "public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}", "function get_title() {\n\t\treturn $this->settings['title'];\n\t}", "public function get_title()\n {\n return $this->get_default_property(self::PROPERTY_TITLE);\n }", "public function getTitle() {\n\t\treturn $this->item->getTitle()->getText();\n\t}", "public function title() { \n $title = $this->content()->get('title');\n if($title != '') {\n return $title;\n } else {\n $title->value = $this->uid();\n return $title;\n }\n }", "function getTitle() {\n\t\treturn $this->title;\n\t}", "public function title(): string {\n\t\treturn $this->m_title;\n\t}", "public function getTitle()\n {\n return $this->getField('Title');\n }", "public function getTitle()\n {\n return $this->getValue('title');\n }", "function getTitle() {\n\t\treturn $this->_title;\n\t}", "public function title()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\t\n\t}", "public function gettitle()\n {\n return $this->title;\n }", "public function getTitle() {\n\t\treturn $this->_title;\n\t}", "public function getTitle() {\r\n\t\treturn $this->_title;\r\n\t}", "public function getTitle()\n {\n\t\treturn $this->title;\n\t}", "public function getTitle()\r\n\t{\r\n\t\treturn $this->_title;\r\n\t}", "public function get_title(){\n\t\treturn $this->title;\n\t}", "public function get_title(){\n\t\treturn $this->title;\n\t}", "public function getTitle()\r\n\t\t{\r\n\t\t\treturn $this->_title;\r\n\t\t}", "public function getTitle() {\r\n\t\treturn $this->title;\r\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "function get_the_title() {\n\n md_get_the_title();\n \n }", "public function getTitle(){\r\n\t\t\treturn $this->title;\r\n\t\t}", "public function getTitle()\n {\n return $this->get(self::_TITLE);\n }", "public function getTitle()\n {\n return $this->get(self::_TITLE);\n }", "public function getTitle(){\n\t\t\treturn $this->title;\n\t\t}", "function get_title() \t{\n \t\treturn $this->title;\t\n \t}", "public function getTitle() {\n\t\t\treturn $this->title;\n\t\t}", "function getPageTitle() {\n return $this->title;\n }", "public function getTitle(){\r\n\t\treturn $this->title;\r\n\t}", "public function getTitle() {\n\t\t\n\t\t\treturn $this->_title;\n\t\t\n\t\t}", "public function getTitle()\n {\n return $this->_title;\n }", "public function getTitle()\n {\n return $this->_title;\n }", "public function getTitle()\n {\n return $this->_title;\n }", "public function getTitle()\n {\n return $this->_title;\n }", "public function getTitle()\n {\n return $this->_title;\n }", "public function getTitle()\n {\n return $this->_title;\n }", "public function getTitle()\n {\n return $this->_title;\n }", "public static function getTitle()\n {\n return self::$title;\n }", "public function getTitle()\n {\n return $this->data['fields']['title'];\n }", "function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle() {\r\n return $this->_title;\r\n }", "public function getTitle()\n {\n return isset($this->metas['title']) ? $this->metas['title'] : '';\n }", "public function get_title() {\n\t\treturn __( 'Elhelper Post Mansory', 'elhelper' );\n\t}", "public function getTitle() {\r\n\tif (!is_null($this->title))\r\n\t return $this->title;\r\n\telse\r\n\t return $this->name;\r\n }", "public function getMetaTitle() {\n\t\t$title = $this->data()->getTitle();\n\t\t$filter = $this->FilterDescription();\n\t\tif($filter) {\n\t\t\t$title = \"{$title} - {$filter}\";\n\t\t}\n\n\t\t$this->extend('updateMetaTitle', $title);\n\t\treturn $title;\n\t}", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }" ]
[ "0.75212586", "0.74773794", "0.74288666", "0.74201864", "0.7388739", "0.73869735", "0.7352137", "0.73392564", "0.73377955", "0.73364323", "0.7331421", "0.7310629", "0.7303539", "0.728246", "0.7279436", "0.7276779", "0.72706795", "0.72692746", "0.72665834", "0.7250433", "0.72495437", "0.72448325", "0.7244823", "0.7243617", "0.72429794", "0.724204", "0.724204", "0.72412026", "0.72313887", "0.7231024", "0.7231024", "0.7231024", "0.7231024", "0.7224072", "0.7224072", "0.7224072", "0.7224072", "0.7224072", "0.7224072", "0.7224072", "0.7224072", "0.7224072", "0.7224072", "0.7224072", "0.7224072", "0.72164", "0.7204914", "0.72001785", "0.72001785", "0.7194188", "0.7194144", "0.71739817", "0.7169535", "0.716798", "0.716713", "0.7166302", "0.7166302", "0.7166302", "0.7166302", "0.7166302", "0.7166302", "0.7166302", "0.7155542", "0.7146253", "0.713353", "0.71331286", "0.71331066", "0.71256995", "0.71231556", "0.7123084", "0.7116272", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927", "0.71052927" ]
0.72242916
34
Check if the metabox has already been saved.
public function isAlreadySaved() { return $this->_alreadySaved == true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function setAlreadySaved()\n\t\t{\n\t\t\t$this->_alreadySaved = true;\n\t\t}", "public function checkIsSaved()\n {\n if (isset($this->owner->primaryKey) == false) {\n throw new ModelIsUnsaved();\n }\n }", "function checkSaveCall()\n{\tif ( !wp_verify_nonce( $_POST['smille_fields_nonce'], plugin_basename(__FILE__) )) {\n\t\treturn false;\n\t}\n\t\n\t// verify if this is an auto save routine. If it is our form has not been submitted, so we dont want to do anything\n\tif ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { return false; }\n\t\n\t return true;\n}", "public function is_saved()\n\t\t{\n\t\t\treturn $this->hash && file_exists($this->get_path_hashed()) || $this->saved;\n\t\t}", "function beforesave(){\n\t\t// if it returns true, the item will be saved; if it returns false, it won't\n\t\treturn true;\n\t}", "protected function onSaved()\n {\n return true;\n }", "function do_save(){\n\t\t// check that number and post_ID is set\n\t\tif( empty($this->post_ID) || empty($this->number) ) return false;\n\t\t\n\t\t// check that we have data in POST\n\t\tif( $this->id_base != 'checkbox' && (\n\t\t\t\tempty($_POST['field-'.$this->id_base][$this->number]) ||\n\t\t\t\t!is_array($_POST['field-'.$this->id_base][$this->number])\n\t\t\t)\n\t\t )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$input = @$_POST['field-'.$this->id_base][$this->number];\n\t\t// get real values\n\t\t$values = $this->save( $input );\n\t\t// save to post meta\n\t\tupdate_post_meta($this->post_ID, $this->slug, $values);\n\t\treturn true;\n\t}", "protected function autosave_check() {\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public function onSave()\n\t{\n\t\t$value = $this->getValue();\n\t\tif(!empty( $value ))\n\t\t{\n\t\t\treturn $this->getLookupTable()->set(\n\t\t\t\t $this->getValue(),\n\t\t\t\t $this->getValueObject()->getKey()\n\t\t\t ) > 0;\n\t\t}\n\t\treturn false;\n\t}", "public function alreadyExists()\n\t{\n\t\tif(file_exists($this->getSavePath())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function have_settings_been_saved() {\n\t\treturn self::$settings_saved;\n\t}", "protected function saveCustomFields() : bool\n {\n if ($this->hasCustomFields()) {\n foreach ($this->customFields as $key => $value) {\n if (!property_exists($this, $key)) {\n $this->set($key, $value);\n }\n }\n }\n\n return true;\n }", "function checkduplicatetypefield()\n\t{\n\n\t\t$check = $this->base_model->fetch_records_from(TBL_SETTINGS_FIELDS,array('field_name' => $this->input->post('field_name'), 'sms_gateway_id' => $this->input->post('sms_gateway_id')));\t\t\n\t\tif (count($check) == 0 && $this->input->post('id') == '') {\n\t\t return true;\n\t\t} elseif((count($check) >= 1 || count($check) == 0)&& $this->input->post('id') != '') {\n\t\t\treturn true;\n\t\t}else {\n\t\t $this->form_validation->set_message('checkduplicatetypefield', $this->phrases['duplicate']);\n\t\t return false;\n\t\t}\n\t}", "public function hasOnChange(): bool\n {\n return ! empty($this->onChange);\n }", "public function getNeedsSaving ()\n {\n return $this->needsSaving;\n }", "public function hasDirtyData(): bool\n {\n return ($this->state == self::STATE_MANAGED\n && ($data = $this->itemReflection->dehydrate($this->item))\n && (! $this->isDataEqual($data, $this->originalData))\n );\n }", "public function dirty() {\n\t\treturn ! $this->exists or count($this->get_dirty()) > 0;\n\t}", "public function checkDuplicate($check) {\n $existing_plot = $this->find('count', array(\n 'conditions' => $check,\n 'recursive' => -1\n ));\n\t/*\t\n\t\tif($existing_plot >= 1)\n\t\t\techo '<script>alert(\"Plot already in use.\");</script>';\n\t*/\t\t\n\t return $existing_plot < 1 ;\n }", "public function canSave()\n {\n return $this->save;\n }", "protected function canSave()\n {\n if( $this->ticket != null and\n $this->filename != null)\n {\n return true;\n }\n else\n return false;\n }", "function wck_save_single_metabox( $post_id, $post ){\r\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\r\n return $post_id;\r\n\r\n // Check the user's permissions.\r\n if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\r\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\r\n return $post_id;\r\n }\r\n } else {\r\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\r\n return $post_id;\r\n }\r\n }\r\n\r\n /* only go through for metaboxes defined for this post type */\r\n if( get_post_type( $post_id ) != $this->args['post_type'] )\r\n return $post_id;\r\n\r\n if( !empty( $_POST ) ){\r\n /* for single metaboxes we save a hidden input that contains the meta_name attr as a key so we need to search for it */\r\n foreach( $_POST as $request_key => $request_value ){\r\n if( strpos( $request_key, '_wckmetaname_' ) !== false && strpos( $request_key, '#wck' ) !== false ){\r\n /* found it so now retrieve the meta_name from the key formatted _wckmetaname_actuaname#wck */\r\n $request_key = str_replace( '_wckmetaname_', '', $request_key );\r\n $meta_name = sanitize_text_field( str_replace( '#wck', '', $request_key ) );\r\n /* we have it so go through only on the WCK object instance that has this meta_name */\r\n if( $this->args['meta_name'] == $meta_name ){\r\n\r\n /* get the meta values from the $_POST and store them in an array */\r\n $meta_values = array();\r\n if( !empty( $this->args['meta_array'] ) ){\r\n foreach ($this->args['meta_array'] as $meta_field){\r\n /* in the $_POST the names for the fields are prefixed with the meta_name for the single metaboxes in case there are multiple metaboxes that contain fields wit hthe same name */\r\n $single_field_name = $this->args['meta_name'] .'_'. Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'],$meta_field );\r\n if (isset($_POST[$single_field_name])) {\r\n /* checkbox needs to be stored as string not array */\r\n if( $meta_field['type'] == 'checkbox' )\r\n $_POST[$single_field_name] = implode( ', ', $_POST[$single_field_name] );\r\n\r\n $meta_values[Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'], $meta_field )] = wppb_sanitize_value( $_POST[$single_field_name] );\r\n }\r\n else\r\n $meta_values[Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'], $meta_field )] = '';\r\n }\r\n }\r\n\r\n /* test if we have errors for the required fields */\r\n $errors = self::wck_test_required( $this->args['meta_array'], $meta_name, $meta_values, $post_id );\r\n if( !empty( $errors ) ){\r\n /* if we have errors then add them in the global. We do this so we get all errors from all single metaboxes that might be on that page */\r\n global $wck_single_forms_errors;\r\n if( !empty( $errors['errorfields'] ) ){\r\n foreach( $errors['errorfields'] as $key => $field_name ){\r\n $errors['errorfields'][$key] = $this->args['meta_name']. '_' .$field_name;\r\n }\r\n }\r\n $wck_single_forms_errors[] = $errors;\r\n }\r\n else {\r\n /* no errors so we can save */\r\n update_post_meta($post_id, $meta_name, array($meta_values));\r\n /* handle unserialized fields */\r\n if ($this->args['unserialize_fields']) {\r\n if (!empty($this->args['meta_array'])) {\r\n foreach ($this->args['meta_array'] as $meta_field) {\r\n update_post_meta($post_id, $meta_name . '_' . Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'], $meta_field ) . '_1', $_POST[$this->args['meta_name'] . '_' . Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'], $meta_field )]);\r\n }\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }", "function wp_is_post_autosave($post)\n {\n }", "public function isDuplicateValue(): bool\n\t{\n\t\t$picklistValues = \\App\\Fields\\Picklist::getValuesName($this->fieldModel->getName());\n\t\tif ($this->id) {\n\t\t\tunset($picklistValues[$this->id]);\n\t\t}\n\n\t\treturn \\in_array(strtolower($this->name), array_map('strtolower', $picklistValues));\n\t}", "protected function hasItemSavedValue($item_id)\n {\n return isset($this->itemValues[$item_id]) and $this->itemValues[$item_id] !== null;\n }", "public function isSetItemData()\n {\n return !is_null($this->_fields['ItemData']['FieldValue']);\n }", "public function isDirty();", "function meta_boxes_save() {\n\n\t\t// Bail out now if something not set\n\t\tif (\n\t\t\tisset( $_POST['_wpnonce'] ) &&\n\t\t\tisset( $_POST['post_ID'] ) &&\n\t\t\tisset( $_POST['_lingo_hidden'] ) // This is required to ensure that auto-saves are not processed\n\t\t) {\n\n\t\t\t// Do nonce security check\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\n\n\t\t\t// Grab post ID\n\t\t\t$post_ID = (int) $_POST['post_ID'];\n\t\t\t\n\t\t\t// Set wrong answers\n\t\t\tdelete_post_meta( $post_ID, '_wrong_answers' );\n\t\t\tforeach( $_POST['_wrong_answers'] as $key => $value ) {\n\t\t\t\tif ( $value != '' && $value != 0 ) {\n\t\t\t\t\t$value = (int) $value;\n\t\t\t\t\tadd_post_meta( $post_ID, '_wrong_answers', $value );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Stash all the post meta\n\t\t\tforeach( $this->post_meta as $key => $x ) {\n\t\t\t\tif ( isset( $_POST[$key] ) ) {\n\t\t\t\t\t$value = (int) $_POST[$key];\n\t\t\t\t\tif ( $value != 0 )\n\t\t\t\t\t\tupdate_post_meta( $post_ID, $key, $value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function onSaving()\n {\n return true;\n }", "protected function MetaBeforeSave() {\n\t\t\treturn SERIA_Meta::allowEdit($this);\n\t\t}", "function mf_SALF_artist_meta_save_data($post_id) {\n\tglobal $artist_meta_box;\n\t\n\t\n\t\n\t\n \n \n // verify nonce\n if (!wp_verify_nonce($_POST['artist_meta_box_nonce'], basename(__FILE__))) {\n return $post_id;\n }\n\n // check autosave\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post_id;\n }\n\n // check permissions\n if ('page' == $_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) {\n return $post_id;\n }\n } elseif (!current_user_can('edit_post', $post_id)) {\n return $post_id;\n }\n \n foreach ($artist_meta_box['fields'] as $field) {\n\t\t\n\t\tif($field['type']!='checkbox'){\n $old = get_post_meta($post_id, $field['id'], true);\n $new = $_POST[$field['id']];\n\t\t \n\t\t\n if ($new && $new != $old) {\n update_post_meta($post_id, $field['id'], $new);\n } elseif ('' == $new && $old) {\n delete_post_meta($post_id, $field['id'], $old);\n }\n\n\t\t} else {\n\t\t\n\t\t$old = get_post_meta($post_id, 'mf_SALF_artist_meta_checks', true);\n\t\t$new = $_POST['mf_SALF_artist_meta_checks'];\n\t\t\n\t\t\n\t\tif ($new && $new != $old) {\n update_post_meta($post_id, 'mf_SALF_artist_meta_checks', $new);\n } elseif ('' == $new && $old) {\n delete_post_meta($post_id, 'mf_SALF_artist_meta_checks', $old);\n }\t\n\t\t}\n\t\t\n }\n}", "public function hasMaxSave(){\n return $this->_has(16);\n }", "function metabox_save( $post_id ) {\n\t\t// because save_post can be triggered at other times\n\t\tglobal $wpdb;\n\t\t\n\t\tif( ! isset( $_POST['mhPresentatie_noncename'] ) || ! wp_verify_nonce( $_POST['mhPresentatie_noncename'], plugin_basename( __FILE__ ) ) ) {\n\t\t\treturn $post_id;\n\t\t}\n\n\t\t// verify if this is an auto save routine. If it is our form has not been submitted, so we dont want to do anything\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\n\t\t{\n\t\t\treturn $post_id;\n\t\t}\n\n\t\t// Check permissions\n\t\tif ( !current_user_can( 'edit_post', $post_id ) )\n\t\t{\n\t\t\treturn $post_id;\n\t\t}\n\n\t\tupdate_post_meta( $post_id, '_style', $_POST['presentation_style'] );\n\t\tupdate_post_meta( $post_id, '_css', $_POST['presentationCSS'] );\n\t}", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "protected function afterSave()\n {\n return true;\n }", "function checkSaveButtons() {\n if ($this->arrTableParameters['savedok'] || $this->arrTableParameters['saveandclosedok']) {\n $tce = GeneralUtility::makeInstance('t3lib_TCEmain');\n $tce->stripslashes_values=0;\n if (count($this->arrTableParameters['grps'])) {\n\t $arrSave['grps'] = $this->arrTableParameters['grps'];\n\t $arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = serialize($arrSave);\n } else {\n \t$arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = '';\n }\n $tce->start($arrData,array());\n\t $tce->process_datamap();\n if ($this->arrTableParameters['saveandclosedok']) {\n header('Location: ' . GeneralUtility::locationHeaderUrl($this->arrWizardParameters['returnUrl']));\n\t\t\t\texit;\n }\n }\n }", "protected abstract function canSave();", "public function save()\n {\n return FALSE;\n }", "function fb_like_meta_box_save( $post_id )\n{\n global $meta_box_fb_like;\n // Bail if we're doing an auto save\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n \n // if our nonce isn't there, or we can't verify it, bail\n if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n \n // if our current user can't edit this post, bail\n if( !current_user_can( 'edit_post' ) ) return;\n \n $chk = isset( $_POST[$meta_box_fb_like] )? 'on' : 'off';\n update_post_meta( $post_id, $meta_box_fb_like, $chk );\n}", "public function isPersisted() {}", "public function hasStored()\n\t{\n\t\tif( $_SESSION[__CLASS__][$this->questionId] !== null )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function valid() {\n\t\tif (isset($this->allSets[$this->key()])) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function sm_meta_save( $post_id ) {\n \n // Checks save status\n $is_autosave = wp_is_post_autosave( $post_id );\n $is_revision = wp_is_post_revision( $post_id );\n $is_valid_nonce = ( isset( $_POST[ 'sm_nonce' ] ) && wp_verify_nonce( $_POST[ 'sm_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\n \n // Exits script depending on save status\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\n return;\n }\n \n // Checks for input and saves\nif( isset( $_POST[ 'meta-feature-checkbox' ] ) ) {\n update_post_meta( $post_id, 'meta-feature-checkbox', 'yes' );\n} else {\n update_post_meta( $post_id, 'meta-feature-checkbox', '' );\n}\n \n}", "public function areDirty()\n {\n return !empty($this->current) || !empty($this->remove);\n }", "function meta_boxes_save() {\r\n\t\t\r\n\t\t// Only process if the form has actually been submitted\r\n\t\tif (\r\n\t\t\tisset( $_POST['_wpnonce'] ) &&\r\n\t\t\tisset( $_POST['post_ID'] )\r\n\t\t) {\r\n\t\t\t\r\n\t\t\t// Do nonce security check\r\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\r\n\t\t\t\r\n\t\t\t// Grab post ID\r\n\t\t\t$post_ID = (int) $_POST['post_ID'];\r\n\t\t\t\r\n\t\t\t// Iterate through each possible piece of meta data\r\n\t\t\tforeach( $this->post_meta as $key => $value ) {\r\n\t\t\t\tif ( isset( $_POST['_' . $key] ) ) {\r\n\t\t\t\t\t$data = esc_html( $_POST['_' . $key] ); // Sanitise data input\r\n\t\t\t\t\tupdate_post_meta( $post_ID, '_' . $key, $data ); // Store the data\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public function getIsNewRecord()\n {\n return $this->_item === null;\n }", "public function valid()\n {\n return isset($this->collection->getItems()[$this->position]);\n }", "function isSaveAllowed() {\n\t\t\treturn $this->isAllowedAction( 'save' );\n\t\t}", "public function isSetValueActive() {}", "public function save()\n {\n if(!parent::save()) {\n return false;\n }\n \n if($this->_rebuildSearchIndex) {\n $this->_rebuildSearchIndex = false;\n MazelabVpopqmail_Model_DiFactory::getIndexManager()->setRobot($this->getId());\n }\n \n return true;\n }", "public function isSetValue()\n {\n return !is_null($this->_fields['Value']['FieldValue']);\n }", "public function fermer()\n {\n // On enregistre la fermeture\n if ($this->set('mission_statut', 0)) {\n return true;\n } else {\n return false;\n }\n }", "public function hasChanges () {\n return !!$this->dirty;\n }", "public function isDirty()\r\n {\r\n if (!$this->id)\r\n return true;\r\n \r\n return $this->dirty;\r\n }", "public function isPersisted();", "public function isPersisted();", "public function isPersisted();", "protected function postSave() {\n\t\treturn true;\n\t}", "public function beforeSave()\n {\n if (!$this->checkPermissions()) {\n return $this->modx->lexicon('access_denied');\n }\n\n return true;\n }", "public function beforeSave()\n {\n if (!$this->checkPermissions()) {\n return $this->modx->lexicon('access_denied');\n }\n\n return true;\n }", "public function getIsNewRecord () {\n return $this->_item === null;\n }", "function __checkDuplicateName()\n {\n $result = $this->find('first', array('conditions' => array('name' => $this->data[$this->name]['name'])));\n if ($result) {\n $this->errorMessage='Duplicate name found. Please change the name.';\n return false;\n }\n\n return true;\n }", "function liblynx_save_meta_box_data($post_id)\n{\n\n /*\n * We need to verify this came from our screen and with proper authorization,\n * because the save_post action can be triggered at other times.\n */\n\n // Check if our nonce is set.\n if (!isset($_POST['liblynx_meta_box_nonce'])) {\n return;\n }\n\n\n\n // Verify that the nonce is valid.\n if (!wp_verify_nonce($_POST['liblynx_meta_box_nonce'], 'liblynx_save_meta_box_data')) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return;\n }\n\n // Check the user's permissions.\n if (isset($_POST['post_type']) && 'page'==$_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) {\n return;\n }\n } else {\n if (!current_user_can('edit_post', $post_id)) {\n return;\n }\n }\n\n /* OK, it's safe for us to save the data now. */\n\n //is our metabox is being submitted?\n if (!isset($_POST['liblynx_metabox'])) {\n return;\n }\n\n //determine new state\n $protect=isset($_POST['liblynx_protect'])?true:false;\n $unit=trim($_POST['liblynx_custom_unit']);\n\n // Update the meta field in the database.\n update_post_meta($post_id, '_liblynx_protect', $protect);\n update_post_meta($post_id, '_liblynx_unit', $unit);\n}", "public function isDirty()\n\t{\n\t\treturn (bool)count($this->dirtyFields);\n\t}", "public function hasRepeatedObjField()\n {\n return count($this->get(self::REPEATED_OBJ_FIELD)) !== 0;\n }", "public function beforeSave()\n {\n if (!$this->checkPermissions()) {\n return $this->modx->lexicon('access_denied');\n }\n return true;\n }", "private function _isCardSaved() {\n\t $tokenId = (int) $this->getInfoInstance()->getAdditionalInformation('token_id');\n\t return (boolean)($this->getInfoInstance()->getAdditionalInformation('create_token') === 'true') &&\n\t !($tokenId && ($tokenId > 0));\n\t}", "public function hasSavedJob($job)\n {\n return $this->savedJobs->contains($job);\n }", "function sm_meta_save( $post_id ) {\r\n \r\n // Checks save status\r\n $is_autosave = wp_is_post_autosave( $post_id );\r\n $is_revision = wp_is_post_revision( $post_id );\r\n $is_valid_nonce = ( isset( $_POST[ 'sm_nonce' ] ) && wp_verify_nonce( $_POST[ 'sm_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\r\n \r\n // Exits script depending on save status\r\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\r\n return;\r\n }\r\n \r\n // Checks for input and saves\r\nif( isset( $_POST[ 'meta-checkbox' ] ) ) {\r\n update_post_meta( $post_id, 'meta-checkbox', 'featured' );\r\n} else {\r\n update_post_meta( $post_id, 'meta-checkbox', '' );\r\n}\r\n \r\n}", "public function isUsed()\n\t{\n\t\treturn $this->data && $this->data['forms_attempts'] > 0;\n\t}", "function hasForm() {\n\t\t\t$form = $this->getForm( );\n\n\t\t\tif (!empty( $$form )) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function has_submit() {\n\t\treturn false;\n\t}", "public function isDirty()\n {\n if (count($this->errors)) {\n return true;\n }\n\n return false;\n }", "function cd_meta_box_garoe_prom_product_save( $post_id )\n{\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n \n // if our nonce isn't there, or we can't verify it, bail\n if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n \n // if our current user can't edit this post, bail\n if( !current_user_can( 'edit_post' ) ) return;\n \n // Make sure your data is set before trying to save it\n\t$chk = isset( $_POST['mb_garoe_prom_product'] ) && $_POST['mb_garoe_prom_product'] ? 'on' : 'off';\n update_post_meta( $post_id, 'mb_garoe_prom_product', $chk );\n}", "function idem_pop_up_save_post( $post_id )\n{\n //On sauve la valeur, ou par defaut si deselect\n if( isset( $_POST[\"idem_pop_up_selected\"] ) )\n update_post_meta( $post_id, 'idem_pop_up_selected', $_POST[\"idem_pop_up_selected\"] );\n else {\n $default = getDefault();\n update_post_meta( $post_id, 'idem_pop_up_selected', $default );\n }\n\n //On sauve le template, ou par defaut si aucun\n if( isset( $_POST[\"idem_pop_up_template\"] ) )\n update_post_meta( $post_id, 'idem_pop_up_template', $_POST[\"idem_pop_up_template\"] );\n else {\n update_post_meta( $post_id, 'idem_pop_up_template', 'default' );\n }\n\n //On sauve le mode de fonctionnement\n if( isset( $_POST[\"idem_pop_up_action\"] ) )\n update_post_meta( $post_id, 'idem_pop_up_action', $_POST[\"idem_pop_up_action\"] );\n else {\n update_post_meta( $post_id, 'idem_pop_up_action', 'auto' );\n }\n\n //On sauve l'action caller du mode manuel\n if( isset( $_POST[\"idem_pop_up_action_caller\"] ) )\n update_post_meta( $post_id, 'idem_pop_up_action_caller', $_POST[\"idem_pop_up_action_caller\"] );\n else {\n update_post_meta( $post_id, 'idem_pop_up_action_caller', '' );\n }\n\n //On active ou desactive la pop up suivant la checkbox\n if( isset( $_POST[\"activate_idem_pop_up\"] ) )\n update_post_meta( $post_id, 'activate_idem_pop_up', 1 );\n else \n update_post_meta( $post_id, 'activate_idem_pop_up', 0 );\n}", "public function save() {\r\n $fields = array();\r\n\r\n foreach ($this->dbFields() as $field_name) {\r\n $fields[$field_name] = $this->{$field_name};\r\n }\r\n\r\n if (!is_string($fields['settings'])) {\r\n $fields['settings'] = serialize($fields['settings']);\r\n }\r\n\r\n # check update or create new\r\n if (!$this->mid) {\r\n $mid = db_insert('md_megamenus')\r\n ->fields($fields)\r\n ->execute();\r\n\r\n if (!$mid) {\r\n return FALSE;\r\n }\r\n $this->mid = $mid;\r\n }\r\n else {\r\n # update for menu\r\n db_update('{md_megamenus}')\r\n ->condition('mid', $this->mid)\r\n ->fields($fields)\r\n ->execute();\r\n }\r\n\r\n # Generate css custom for menu\r\n generate_menu_css_configure($this->mid, $this->settings);\r\n\r\n return TRUE;\r\n }", "public function hasLastInput(): bool\n {\n return isset($this->lastInput);\n }", "function meta_boxes_save() {\n\n\t\t// Bail out now if something not set\n\t\tif (\n\t\t\tisset( $_POST['_wpnonce'] ) &&\n\t\t\tisset( $_POST['post_ID'] ) &&\n\t\t\tisset( $_POST['_lingo_hidden'] ) // This is required to ensure that auto-saves are not processed\n\t\t) {\n\t\t\t// Do nonce security check\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\n\n\t\t\t// Grab post ID\n\t\t\t$post_ID = (int) $_POST['post_ID'];\n\n//echo '<textarea style=\"width:800px;height:600px;\">';print_r( $_POST['_translation'] );echo '</textarea>';\n//die('dead');\n\n\t\t\t// Stash all the post meta\n\t\t\tif ( isset( $_POST['_translation'] ) ) {\n\t\t\t\t$_translation = $_POST['_translation'];\n\t\t\t\tdelete_post_meta( $post_ID, '_translation' );\n\t\t\t\tforeach( $_translation as $key => $trans ) {\n\t\t\t\t\t$trans = wp_kses( $trans, '', '' );\n\t\t\t\t\tif ( $trans != '' )\n\t\t\t\t\t\tadd_post_meta( $post_ID, '_translation', $trans );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function valid() {\r\n return isset($this->_data[$this->_position]);\r\n }", "public function MetaIsNew() {\n\t\t\treturn $this->metaNew;\n\t\t}", "function save_meta_box( $post_id ) {\n if ( defined( 'DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\n if ( $parent_id = wp_is_post_revision( $post_id ) ) {\n $post_id = $parent_id;\n }\n $fields = ['published_date'];\n foreach ( $fields as $field ) {\n if ( array_key_exists( $field, $_POST ) ) {\n update_post_meta( $post_id, $field, sanitize_text_field( $_POST[$field] ) );\n }\n }\n }", "public function valid()\n {\n return isset($this->items[$this->k]);\n }", "public function valid() {\n\t\t\treturn (isset($this->data[$this->index]));\n\t\t}", "private function isEditMode(){\n\t\tif(isset($this->AddRecordInsertData) and count($this->AddRecordInsertData) > 0 )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "function save_book_meta_box_data( $post_id ) {\n\n // Check if our nonce is set.\n if ( ! isset( $_POST['global_notice_nonce'] ) ) {\n return;\n }\n\n // Verify that the nonce is valid.\n if ( ! wp_verify_nonce( $_POST['global_notice_nonce'], 'global_notice_nonce' ) ) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n // Check the user's permissions.\n if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return;\n }\n\n }\n else {\n\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n }\n\n /* OK, it's safe for us to save the data now. */\n\n // Make sure that it is set.\n if ( ! isset( $_POST['book_meta'] ) ) {\n return;\n }\n\n // Sanitize user input.\n $my_data = sanitize_text_field( $_POST['book_meta'] );\n\n // Update the meta field in the database.\n update_post_meta( $post_id, '_book_meta', $my_data );\n\n if(isset($_POST[\"meta-checkbox\"]))\n {\n $meta_box_checkbox_value = $_POST[\"meta-checkbox\"];\n }\n update_post_meta($post_id, \"meta-checkbox\", $meta_box_checkbox_value);\n}", "function italystrap_meta_box_save( $post_id ){\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\n\t// if our nonce isn't there, or we can't verify it, bail\n\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n\t\n\t// if our current user can't edit this post, bail\n\t//http://code.tutsplus.com/tutorials/how-to-create-custom-wordpress-writemeta-boxes--wp-20336#comment-802227555\n\t//prevents undefined offset notice and cannot modify header warning - add second parameters $post_id\n\tif( !current_user_can( 'edit_post' , $post_id ) ) return;\n\t\n\t// now we can actually save the data\t\n\t// Probably a good idea to make sure your data is set\n\t// This is purely my personal preference for saving checkboxes\n\t$chk = ( isset( $_POST['slide'] ) && $_POST['slide'] ) ? 'on' : 'off';\n\tupdate_post_meta( $post_id, 'slide', $chk );\n}", "public function valid() {\n\t\treturn isset($this->data[$this->position]);\n\t}", "public function valid()\n {\n return (\n !is_null($this->current) &&\n $this->dataStore->has($this->current[$this->dataStore->getIdentifier()])\n );\n }", "public function valid(): bool\n {\n return isset($this->collection[$this->position]);\n }", "protected function performPostSaveCallback()\n {\n // echo 'saved a record ...';\n return true;\n }" ]
[ "0.6891282", "0.6891282", "0.6891282", "0.6891282", "0.6891282", "0.6891282", "0.6891282", "0.6891282", "0.6891282", "0.6891282", "0.653351", "0.6445044", "0.62988615", "0.6247506", "0.62234575", "0.6154589", "0.60333365", "0.59868604", "0.59693813", "0.59482473", "0.5822844", "0.57848173", "0.5782552", "0.574139", "0.572416", "0.571992", "0.5718396", "0.5716421", "0.5713645", "0.5697642", "0.5658049", "0.56451714", "0.5636799", "0.5628064", "0.56229705", "0.5611406", "0.5564008", "0.55618495", "0.5561285", "0.55598694", "0.55531734", "0.55505735", "0.5544034", "0.5544034", "0.55381024", "0.55328804", "0.55311304", "0.5530717", "0.55229336", "0.55206996", "0.5511434", "0.55088264", "0.55041593", "0.55039227", "0.54957503", "0.5485917", "0.54806834", "0.54804003", "0.5467845", "0.54357785", "0.543358", "0.54308665", "0.5430175", "0.5427702", "0.5424454", "0.5424454", "0.5424454", "0.5421139", "0.54175496", "0.54175496", "0.54149157", "0.5414122", "0.54106414", "0.5406898", "0.5402474", "0.54005814", "0.54004204", "0.53965765", "0.5391495", "0.53675395", "0.536505", "0.5360931", "0.5350587", "0.5348086", "0.53402954", "0.53345", "0.5330848", "0.53299105", "0.53287435", "0.53259456", "0.5323814", "0.52983767", "0.5290048", "0.5288538", "0.5287948", "0.52877575", "0.52848834", "0.52841103", "0.5281883", "0.5277957" ]
0.75158954
0
Parse the metabox showing conditions.
private function parseMetaboxConditions() { foreach( $this->_conditions as $condition ) { if( !$condition ) { return '<style>#' . $this->_id . ' { display: none !important; }</style>'; } } return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_conditions() {\n\t\t$output = '';\n\t\tforeach($this->conditions as $id => $set) {\n\t\t\tif(is_array($set)) {\n\t\t\t\t$ret = $this->do_set($set,$id.'_container');\n\t\t\t\tif(!$ret) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$output .= $ret;\n\t\t\t}\n\t\t}\n//echo '<pre>'.htmlentities($output).'</pre>';\n\t\tif(strlen(trim($output))) {\n\t\t\techo '\n<script type=\"text/javascript\">\n//<![CDATA[\n\t// Dynamically Generated Javascript for CF-Meta box display control\n\tjQuery(document).ready(function(){\n'.$output.'\n\t});'.PHP_EOL;\n\t\t\tif(is_array($this->comparison_funcs)) {\n\t\t\t\tforeach($this->comparison_funcs as $id => $func) {\n\t\t\t\t\techo PHP_EOL.'\t// CF-Meta comparison function for '.$id.$func;\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '\n//]]>\n</script>'.PHP_EOL;\n\t\t}\n\t}", "function get_menu_item_criteres() {\n\treturn new icone_action('criteres',\"showHide('criteres','','show')\",'menu_criteres');\n\t\n}", "function sb_modals_load_conditions_meta_box_callback() {\r\n\t\tglobal $post;\r\n\t\twp_nonce_field( $this->_nonce_action, $this->_nonce_name );\r\n\r\n\t\t$load_condition = get_post_meta( $post->ID, 'sb_modals__load_condition', true );\r\n?>\r\n\t\t<p>\r\n\t\t\t<label for=\"sb_modals__load_condition\"><?php echo __('Include modal code', 'sbmodal'); ?></label>\r\n\t\t\t<select name=\"sb_modals__load_condition\" id=\"sb_modals__load_condition\">\r\n\t\t\t<?php foreach( $this->_load_conditions as $value => $label):\r\n\t\t\t\t\t$_checked = ( strcmp($value, $load_condition)===0 ) ? 'selected=\"selected\"' : '' ;\r\n\t\t\t?>\r\n\t\t\t\t<option value=\"<?php echo $value; ?>\" <?php echo $_checked; ?>><?php echo $label; ?></option>\r\n\t\t\t<?php endforeach; ?>\r\n\t\t\t</select>\r\n\t\t</p>\r\n\t\t<p class=\"description\">If <b>\"<?php echo $this->_load_conditions['custom']; ?>\"</b> select the modal on the corresponding Page/Post edit page.</p>\r\n<?php\r\n\t}", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "function miracle_add_visibility_fields($widget, $instance = false)\n {\n if ('advanced_text' == get_class($widget))\n return;\n\n $conditions = $this->miracle_widget_visibility_conditions();\n\n if (!$instance)\n {\n $widget_settings = get_option($widget->option_name);\n $instance = $widget_settings[$widget->number];\n }\n\n $allSelected = $homeSelected = $postSelected = $postInCategorySelected = $pageSelected =\n $categorySelected = $blogSelected = $searchSelected = false;\n switch ($instance['action'])\n {\n case \"1\":\n $showSelected = true;\n break;\n case \"0\":\n $dontshowSelected = true;\n break;\n }\n\n?>\t\t\t\n\t<div class=\"atw-conditions\">\n\t<strong><?php _e('Widget Visibility:', $this->textdomain);?></strong>\n <br /><br />\n\t<label for=\"<?php echo $widget->get_field_id('action');?>\" title=\"<?php _e('Show only on specified page(s)/post(s)/category. Default is All', $this->textdomain); ?>\" style=\"line-height:35px;\">\t\t\n\t<select name=\"<?php echo $widget->get_field_name('action');?>\">\n <option value=\"1\" <?php echo ($showSelected)? 'selected=\"selected\"':'';?>><?php _e('Show', $this->textdomain);?></option>\n\t\t\t<option value=\"0\" <?php echo ($dontshowSelected)? 'selected=\"selected\"':'';?>><?php _e('Do NOT show', $this->textdomain);?></option>\n\t\t</select> \n <?php _e('on', $this->textdomain); ?>\n\t\t<select name=\"<?php echo $widget->get_field_name('show');?>\" id=\"<?php echo $widget->get_field_id('show');?>\">\n <?php\n if (is_array($conditions) && !empty($conditions))\n {\n foreach ($conditions as $k => $item)\n {\n $output .= '<option label=\"' . $item['name'] . '\" value=\"' . $k . '\"' . selected($instance['show'],\n $k) . '>' . $item['name'] . '</option>';\n }\n }\n echo $output;\n ?>\n\t\t</select>\n\t</label>\n\t<br/> \n\t<label for=\"<?php echo $widget->get_field_id('slug'); ?>\" title=\"<?php _e('Optional limitation to specific page, post or category. Use ID, slug or title.',$this->textdomain);?>\"><?php _e('Slug/Title/ID:',$this->textdomain); ?> \n\t\t<input type=\"text\" style=\"width: 99%;\" id=\"<?php echo $widget->get_field_id('slug');?>\" name=\"<?php echo $widget->get_field_name('slug');?>\" value=\"<?php echo htmlspecialchars($instance['slug']); ?>\" />\n\t</label>\n\t<?php\n if ($postInCategorySelected)\n _e(\"<p>In <strong>Post In Category</strong> add one or more cat. IDs (not Slug or Title) comma separated!</p>\",$this->textdomain);\n ?>\n\t<br />\n\t<label for=\"<?php echo $widget->get_field_id('suppress_title'); ?>\" title=\"<?php _e('Do not output widget title in the front-end.', $this->textdomain);?>\">\n\t\t<input id=\"<?php echo $widget->get_field_name('suppress_title'); ?>\" name=\"<?php echo $widget->get_field_name('suppress_title'); ?>\" type=\"checkbox\" value=\"1\" <?php checked($instance['suppress_title'], '1', true);?> />\n <?php _e('Suppress Title Output', $this->textdomain); ?>\n\t</label>\n\t</div>\n<?php\n\n $return = null;\n }", "function edd_incentives_render_conditions() {\n global $post;\n\n $post_id = $post->ID;\n $meta = get_post_meta( $post_id, '_edd_incentive_meta', true );\n $downloads = get_posts( array( 'post_type' => 'download', 'numberposts' => 999999, 'post_status' => 'publish' ) );\n $product_css = ( ! isset( $meta['condition_type'] ) || $meta['condition_type'] == 'products' ? '' : ' style=\"display: none;\"' );\n $value_css = ( isset( $meta['condition_type'] ) && $meta['condition_type'] == 'value' ? '' : ' style=\"display: none;\"' );\n $count_css = ( isset( $meta['condition_type'] ) && $meta['condition_type'] == 'count' ? '' : ' style=\"display: none;\"' );\n\n // Condition type\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_condition_type\">' . __( 'Type', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[condition_type]\" id=\"_edd_incentive_condition_type\">';\n echo '<option value=\"products\"' . ( ! isset( $meta['condition_type'] ) || $meta['condition_type'] == 'products' ? ' selected' : '' ) . '>' . __( 'Products in cart', 'edd-incentives' ) . '</option>';\n echo '<option value=\"value\"' . ( $meta['condition_type'] == 'value' ? ' selected' : '' ) . '>' . __( 'Combined value', 'edd-incentives' ) . '</option>';\n echo '<option value=\"count\"' . ( $meta['condition_type'] == 'count' ? ' selected' : '' ) . '>' . __( 'Number of products', 'edd-incentives' ) . '</option>';\n echo '</select>';\n echo '</p>';\n\n echo '<div class=\"edd-incentive-condition-product\"' . $product_css . '>';\n\n // Condition... condition?\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_product_condition\">' . __( 'Condition', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[product_condition]\" id=\"_edd_incentive_product_condition\">';\n echo '<option value=\"any\"' . ( ! isset( $meta['product_condition'] ) || $meta['product_condition'] == 'any' ? ' selected' : '' ) . '>' . __( 'Any of the products', 'edd-incentives' ) . '</option>';\n echo '<option value=\"all\"' . ( $meta['product_condition'] == 'all' ? ' selected' : '' ) . '>' . __( 'All of the products', 'edd-incentives' ) . '</option>';\n echo '</select>';\n echo '</p>';\n\n // Downloads\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_downloads\">' . __( 'Downloads', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[downloads][]\" id=\"_edd_incentive_downloads\" multiple>';\n foreach( $downloads as $key => $download ) {\n echo '<option value=\"' . $download->ID . '\"' . ( array_key_exists( $download->ID, $meta['downloads'] ) ? ' selected' : '' ) . '>' . $download->post_title . '</option>';\n }\n echo '</select>';\n echo '</p>';\n\n echo '</div>';\n\n echo '<div class=\"edd-incentive-condition-value\"' . $value_css . '>';\n\n // Minimum value\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_minimum_value\">' . __( 'Minimum Value', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" name=\"_edd_incentive_meta[minimum_value]\" id=\"_edd_incentive_minimum_value\" value=\"' . ( isset( $meta['minimum_value'] ) ? $meta['minimum_value'] : '' ) . '\" placeholder=\"' . edd_incentives_get_currency() . '\" />';\n echo '</p>';\n\n // Maximum value\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_maximum_value\">' . __( 'Maximum Value', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" name=\"_edd_incentive_meta[maximum_value]\" id=\"_edd_incentive_maximum_value\" value=\"' . ( isset( $meta['maximum_value'] ) ? $meta['maximum_value'] : '' ) . '\" placeholder=\"' . edd_incentives_get_currency() . '\" />';\n echo '</p>';\n\n echo '</div>';\n\n echo '<div class=\"edd-incentive-condition-count\"' . $count_css . '>';\n\n // Minimum count\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_minimum_count\">' . __( 'Minimum Number', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"number\" min=\"0\" name=\"_edd_incentive_meta[minimum_count]\" id=\"_edd_incentive_minimum_count\" value=\"' . ( isset( $meta['minimum_count'] ) && $meta['minimum_count'] != '' ? $meta['minimum_count'] : '0' ) . '\" />';\n echo '</p>';\n\n // Maximum count\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_maximum_count\">' . __( 'Maximum Number', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"number\" min=\"0\" name=\"_edd_incentive_meta[maximum_count]\" id=\"_edd_incentive_maximum_count\" value=\"' . ( isset( $meta['maximum_count'] ) && $meta['maximum_count'] != '' ? $meta['maximum_count'] : '0' ) . '\" />';\n echo '</p>';\n\n echo '</div>';\n}", "public function getConditions();", "public function getConditions();", "public function getConditions();", "function itg_loyalty_reward_rules_condition_info() {\n return array(\n 'itg_loyalty_reward_visit_content_condition' => array(\n 'label' => t('Validate user is visiting node first time.'),\n 'parameter' => array(\n 'node' => array('type' => 'node', 'label' => t('Current Node')),\n 'user' => array('type' => 'user', 'label' => t('Current logged in user.')),\n ),\n 'group' => t('ITG'), \n ),\n );\n}", "protected function get_conditions( ) {\n// to decode all conditions. To learn more about weather condition codes, visit section\n// 12.6.8 - Present Weather Group of the Federal Meteorological Handbook No. 1 at\n// www.nws.noaa.gov/oso/oso1/oso12/fmh1/fmh1ch12.htm\n if (preg_match('#^(-|\\+|VC)?(NSW|TS|SH|FZ|BL|DR|MI|BC|PR|RA|DZ|SN|SG|GR|GS|PE|IC|UP|BR|FG|FU|VA|DU|SA|HZ|PY|PO|SQ|FC|SS|DS|WS//)+$#',$this->current_group_text,$pieces)) {\n $this->varConcatenate($this->wxInfo['ITEMS'][$this->tend],'CODE_CONDITIONS', $this->current_group_text);\n if (!isset($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'])) {\n//$this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] = '';\n $join = '';\n }\n else {\n $join = ', ';\n }\n if (substr($this->current_group_text,0,1) == '-') {\n $prefix = $this->get_i18nCondition('-');\n $this->current_group_text = substr($this->current_group_text,1);\n }\n elseif (substr($this->current_group_text,0,1) == '+') {\n $prefix = $this->get_i18nCondition('+');\n $this->current_group_text = substr($this->current_group_text,1);\n }\n else $prefix = ''; // moderate conditions have no descriptor\n while ($code = substr($this->current_group_text,0,2)) {\n if (!isset($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'])) {\n $this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] = '';\n }\n $this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] .= $join . $this->get_i18nCondition($code) . ' ';\n $this->current_group_text = substr($this->current_group_text,2);\n }\n if (strlen($prefix)>0) {\n $this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] .= $prefix ;\n }\n $this->current_ptr++;\n }\n else {\n if (isset($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'])) {\n//$this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] = '';\n $this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] = trim($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS']);\n if ($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS']=='') unset($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS']);\n }\n $this->current_group++;\n }\n }", "protected function getFieldsFromShowItem() {}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "function ods_hide_draw_conditions() {\n $draws = $this->dom->getElementsByTagName('frame');\n foreach ($draws as $draw) {\n $hide_image = false;\n\n $title = $draw->getElementsByTagName('title');\n\n if ($title->length > 0 && $title->item(0)->nodeValue == 'conditions') {\n\n $desc = $draw->getElementsByTagName('desc');\n if ($desc->length > 0 && $desc->item(0)->nodeValue) {\n $conditions = $desc->item(0)->nodeValue;\n\n $data = $this->data;\n $hide_image = eval(\"return \" . $conditions . \";\");\n }\n }\n\n if ($hide_image) {\n $draw->parentNode->removeChild($draw);\n }\n }\n }", "public function show_term_conditionAction() {\r\n\t\t$helper = Mage::helper('onestepcheckout');\r\n\t\tif ($helper->enableTermsAndConditions()) {\r\n\t\t\t$html = $helper->getTermsConditionsHtml();\r\n\t\t\techo $html;\r\n\t\t\techo '<p class=\"a-right\"><a href=\"#\" onclick=\"javascript:TINY.box.hide();return false;\">Close</a></p>';\r\n\t\t}\r\n\t}", "public static function getConditionsHook()\n\t{\n\t\t$conditions = array();\n\n\t\t$conditions['select'] = '`id`, `id` AS sid, `title`, \\'\\' AS `alias`, 1 AS parent_id, `section` AS extension, `description`, `published`, `checked_out`, `checked_out_time`, `access`, `params`, `section`';\n\n\t\t$where_or = array();\n\t\t$where_or[] = \"section REGEXP '^[\\\\-\\\\+]?[[:digit:]]*\\\\.?[[:digit:]]*$'\";\n\t\t$where_or[] = \"section IN ('com_banner', 'com_contact', 'com_contact_details', 'com_content', 'com_newsfeeds', 'com_sections', 'com_weblinks' )\";\n\t\t$conditions['where_or'] = $where_or;\n\n\t\t$conditions['order'] = \"id ASC, section ASC, ordering ASC\";\t\n\n\t\treturn $conditions;\n\t}", "public function conditionsProvider()\n {\n return [[[new \\Urbania\\AppleNews\\Format\\Condition()]]];\n }", "public function conditionsProvider()\n {\n return [[[new \\Urbania\\AppleNews\\Format\\Condition()]]];\n }", "function open_condition($val){\n\t\t$var_cond=$val;\n\t\t$this->condition_passed=false;\n\t\tglobal $in;\n\t\tglobal $inputval;\n\t\t$val_cond=$this->attributes['CONDITION_VALUE'];\n\t\tif ($this->attributes['HIDE']=='yes') {\n\t\t\tif (preg_match(\"/,/\", $val_cond)){\n\n\t\t\t\t$this->check_js.=\"\n\t valore=document.forms[0].\".$this->id.\".value;\n\t\t\t\t\tdocument.forms[0].\".$this->id.\".value='';\n\t\t\t\t if (document.getElementById('tr_\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('tr_\".$this->id.\"').style.display='none';\n\t\t\t\t\t\";\n\t\t\t\t$vals=explode(\",\",$val_cond);\n\t\t\t\t//$this->condition_passed=false;\n\t\t\t\tforeach ($vals as $key => $value){\n\t\t\t\t\tif (isset($in['INVIOCO'])) $value_to_control=$in[$var_cond];\n\t\t\t\t\telse $value_to_control=$inputval[$var_cond];\n\t\t\t\t\tif ($value_to_control==$value) $this->condition_passed=true;\n\t\t\t\t\t$this->check_js.=\" \\n\n\t\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\t\tif (value=='$value')\n\t\t\t\t\t\t{\n\t\t\t\t \tif (document.getElementById('tr_\".$this->id.\"'))\n\t\t\t\t\t\t\t\tdocument.getElementById('tr_\".$this->id.\"').style.display='';\n\t\t\t\t\t\t document.forms[0].\".$this->id.\".value=valore;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t$op ='!=';\n\t\t\t\tif (preg_match(\"/\\!/\", $val_cond)) {\n\t\t\t\t\t$val_cond=str_replace(\"!\", \"\",$val_cond);\n\t\t\t\t\t$op='==';\n\t\t\t\t}\n\t\t\t\tif (isset($in['INVIOCO'])) $value_to_control=$in[$var_cond];\n\t\t\t\telse $value_to_control=$inputval[$var_cond];\n\t\t\t\tif ($op=='==') $this->condition_passed=($value_to_control!=$val_cond);\n\t\t\t\telse $this->condition_passed=($value_to_control==$val_cond);\n\t\t\t\t//echo \"<hr>$op - $var_cond - $val_cond - {$this->attributes['VAR']}<hr>\";\n\n\t\t\t\t$this->check_js=\" \\n\n\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\tif (value $op '$val_cond')\n\t\t\t\t\t{\n\t\t\t\t\t\t\";\n\t\t\t\tforeach($this->values as $key=> $val){\n\t\t\t\t\t$this->check_js.=\"\n\t\t\t\t document.forms[0].\".$key.\".checked=false;\n\t\t\t\t if (document.getElementById('tr_\".$this->id.\"')) document.getElementById('tr_\".$this->id.\"').style.display='none';\n\t\t\t\t\";\n\t\t\t\t}\n\t\t\t\t$this->check_js.=\"\n\t\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t if (document.getElementById('tr_\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('tr_\".$this->id.\"').style.display='';\n\t\t\t\t\t\";\n\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ($this->attributes['HIDE_THIS']=='yes') {\n\t\t\t\tif (preg_match(\"/,/\", $val_cond)){\n\t\t\t\t\t$this->check_js.=\"\n\t valore=document.forms[0].\".$this->id.\".value;\n\t\t\t\t\tdocument.forms[0].\".$this->id.\".value='';\n\t\t\t\t \tif (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t \tdocument.getElementById('cell_\".$this->id.\"').style.display='none';\n\t\t\t\t\tif (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t \tdocument.getElementById('cell_input\".$this->id.\"').style.display='none';\n\t\t\t\t\t\";\n\t\t\t\t\t$vals=explode(\",\",$val_cond);\n\t\t\t\t\t//$this->condition_passed=false;\n\t\t\t\t\tforeach ($vals as $key => $value){\n\t\t\t\t\t\tif ($in[$var_cond]==$value) $this->condition_passed=true;\n\t\t\t\t\t\t$this->check_js.=\" \\n\n\t\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\t\tif (value=='$value')\n\t\t\t\t\t\t{\n\t\t\t\t \t\t\tif (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t\t\t\tdocument.getElementById('cell_\".$this->id.\"').style.display='';\n\t\t\t\t\t\t\tif (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t\t\t\tdocument.getElementById('cell_input\".$this->id.\"').style.display='';\n\t\t\t\t\t\t document.forms[0].\".$this->id.\".value=valore;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$op ='!=';\n\t\t\t\t\tif (preg_match(\"/\\!/\", $val_cond)) {\n\t\t\t\t\t\t$val_cond=str_replace(\"!\", \"\",$val_cond);\n\t\t\t\t\t\t$op='==';\n\t\t\t\t\t}\n\t\t\t\t\tif ($op=='==') $this->condition_passed=($in[$var_cond]!=$val_cond);\n\t\t\t\t\telse $this->condition_passed=($in[$var_cond]==$val_cond);\n\t\t\t\t\t//echo \"<hr>$op - $var_cond - $val_cond - {$this->attributes['VAR']}<hr>\";\n\t\t\t\t\t$this->check_js=\" \\n\n\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\tif (value $op '$val_cond')\n\t\t\t\t\t{\n\t\t\t\t\t\t\";\n\t\t\t\t\t$this->check_js.=\"\n\t\t\t\t\tif (document.forms[0].\".$this->id.\")\n\t\t\t\t\t\tdocument.forms[0].\".$this->id.\".value='';\n\t\t\t\t \tif (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('cell_\".$this->id.\"').style.display='none';\n\t\t\t\t\tif (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('cell_input\".$this->id.\"').style.display='none';\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t if (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t\t document.getElementById('cell_\".$this->id.\"').style.display='';\n\t\t\t\t\t if (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t \tdocument.getElementById('cell_input\".$this->id.\"').style.display='';\n\t\t\t\t\t}\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ($in[$var_cond]==$value) $this->condition_passed=true;\n\t\t\t\t$this->check_js.=\"\n\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\t\tif (value!='$val_cond')\n\t\t\t\t\t\t{ \";\n\t\t\t\tforeach($this->values as $key => $val) $this->check_js.=\"\n\n\t\t\t\t\t\tdocument.forms[0].\".$key.\".checked=false;\n\t\t\t\t\t\t//document.getElementById('\".$this->id.\"').style.display='none';\n\n\t\t\t\t\t\t\";\n\t\t\t\t$this->check_js.=\"}\";\n\t\t\t}\n\t\t}\n\n\t\t$this->html=\"<tr id='\".$this->id.\"' style=\\\"display:\\\">\".$this->html.\"</tr>\";\n\t}", "public function getFields()\r\n {\r\n $effects = [\r\n \"fadeInUp\"=>\"fadeInUp\",\r\n \"fadeInDown\"=>\"fadeInDown\",\r\n \"fadeInLeft\"=>\"fadeInLeft\",\r\n \"fadeInRight\"=>\"fadeInRight\",\r\n \"lightSpeedIn\"=>\"lightSpeedIn\",\r\n \"slideInUp\"=>\"slideInUp\",\r\n \"slideInDown\"=>\"slideInDown\",\r\n \"slideInLeft\"=>\"slideInLeft\",\r\n \"slideInRight\"=>\"slideInRight\",\r\n \"zoomIn\"=>\"zoomIn\"\r\n ];\r\n \r\n $fields = [\r\n [\r\n 'name' => 'basic_information',\r\n 'type' => 'group',\r\n 'visible' => 'ce',\r\n 'tabs' => [\r\n [\r\n 'name' => 'slide_information',\r\n 'type' => 'tab',\r\n 'visible' => 'ce',\r\n 'fields' => [\r\n [\r\n 'name' => 'id',\r\n 'type' => 'text',\r\n 'visible' => 'io',\r\n ],\r\n [\r\n 'name' => 'slider_id',\r\n 'display' => 'slider',\r\n 'type' => 'relation',\r\n 'relation' => ['slider', 'name'],\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'file',\r\n 'type' => 'image',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'caption_1',\r\n 'type' => 'text',\r\n 'visible' => 'ice',\r\n ],\r\n [\r\n 'name' => 'caption_2',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'caption_3',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'call_to_action_text',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'call_to_action_url',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'open_in_new_window',\r\n 'type' => 'select',\r\n 'data' => ['1' => trans('slider::panel.yes'), '0' => trans('slider::panel.no')],\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'position',\r\n 'type' => 'position',\r\n 'visible' => 'ce',\r\n ]\r\n\r\n ]\r\n ],\r\n [\r\n 'name' => 'options',\r\n 'type' => 'tab',\r\n 'visible' => 'ce',\r\n 'fields' => [\r\n [\r\n 'name' => 'options[caption_1][delay]',\r\n 'display' => 'caption_1_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_1][color]',\r\n 'display' => 'caption_1_color',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_1][effect]',\r\n 'display' => 'caption_1_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_2][delay]',\r\n 'display' => 'caption_2_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_2][color]',\r\n 'display' => 'caption_2_color',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_2][effect]',\r\n 'display' => 'caption_2_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_3][delay]',\r\n 'display' => 'caption_3_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_3][color]',\r\n 'display' => 'caption_3_color',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[caption_3][effect]',\r\n 'display' => 'caption_3_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[call_to_action][delay]',\r\n 'display' => 'call_to_action_delay',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'text',\r\n 'visible' => 'ce',\r\n ],\r\n [\r\n 'name' => 'options[call_to_action][effect]',\r\n 'display' => 'call_to_action_effect',\r\n 'col' => 'col-sm-4',\r\n 'type' => 'select',\r\n 'data' => $effects,\r\n 'visible' => 'ce',\r\n ],\r\n ]\r\n ]\r\n ]\r\n ]\r\n ];\r\n return $fields;\r\n }", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "function MCW_checkshow($MyFilter){\n $myfilteroptions = MCW_get_all_filters();\n $max = count($myfilteroptions);\n $erg = false;\n for ( $i = 0; $i < $max; ++$i ) {\n $c=\"if ((\".stripslashes($myfilteroptions[$i][1]).\") && isset(\\$MyFilter[\\$myfilteroptions[\\$i][0]])) {\\$erg = true;}\";\n eval($c);\n }\n return $erg;\n }", "public static function parse() {\n if (\\CMS::$_vars[3] == 'submit') {\n switch (\\CMS::$_vars[2]) {\n case 'add':\n self::add_submit();\n break;\n \n case 'edit':\n self::edit_submit();\n break;\n }\n }\n\n\n /* Page Content Handlers */\n switch (\\CMS::$_vars[2]) {\n case 'add':\n self::$_pagemode = 'add';\n self::add();\n break;\n \n case 'edit':\n self::$_pagemode = 'edit';\n self::edit();\n break;\n \n case 'confirmdelete':\n self::$_pagemode = 'confirmdelete';\n self::confirmdelete();\n break;\n \n case 'delete':\n self::$_pagemode = 'delete';\n self::delete();\n break;\n \n \n case 'list':\n self::$_pagemode = 'listall';\n self::listall();\n break;\n \n default:\n self::$_pagemode = 'listall';\n self::listall(); \n }\n\n if (self::$_status) {\n \\Html::set('{status}', self::$_status);\n }else{\n \\Html::set('{status}', '');\n }\n }", "function isDisplayCondition($displayCond,$row,$ffValueKey='')\t{\n\t\t$output = FALSE;\n\n\t\t$orparts = t3lib_div::trimExplode('||', $displayCond, 1);\n\t\tforeach ($orparts as $orpart)\t{\n\t\t\t$andparts = t3lib_div::trimExplode('&&', trim($orpart), 1);\n\t\t\t$andout = true;\n\t\t\tforeach ($andparts as $part)\t{\n\t\t\t\t$part = trim($part);\n\t\t\t\tif (strpos(strtoupper($part), ':CONTAINS:')!==false)\t{\n\t\t\t\t\t$parts = explode(':',$part);\n\t\t\t\t\tswitch(strtoupper($parts[0]))\t{\t// Type of condition:\n\t\t\t\t\t\tcase 'FIELD':\n\t\t\t\t\t\t\t$theFieldValue = $ffValueKey ? $row[$parts[1]][$ffValueKey] : $row[$parts[1]];\n\t\t\t\t\t\t\tswitch((string)$parts[2])\t{\n\t\t\t\t\t\t\t\tcase 'CONTAINS':\n\t\t\t\t\t\t\t\t\tif (!preg_match('/(^|,)'.preg_quote($parts[3], '/').'($|,|\\|)/', $theFieldValue))\t{\n\t\t\t\t\t\t\t\t\t\t$andout = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t$andout = 0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$andout = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else\t{\n\t\t\t\t\t$andout &= parent::isDisplayCondition($part, $row, $ffValueKey);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$output |= $andout;\n\t\t}\n\t\treturn $output;\n\t}", "protected function _buildCondition(){\n \t$aryCondition = array();\n \t\n \tif(!empty($this->postData)){\n \t\t //search\n\t\t\t \t\t\t\n\t\t\tif($this->postData['title']!=''){\n \t\t \t$aryCondition['like'][] = array(\"mt.title\"=>$this->postData['title']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['page']!=''){\n \t\t \t$aryCondition['and'][] = array(\"mt.page\"=>$this->postData['page']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['code']!=''){\n \t\t \t$aryCondition['like'][] = array(\"mt.code\"=>$this->postData['code']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['status']!=''){\n \t\t \t$aryCondition['and'][] = array(\"mt.status\"=>$this->postData['status']);\n \t\t }\t\t\t\n\n \t}\n \treturn $aryCondition;\n }", "function metabox_styles() { ?>\n\t<style type=\"text/css\">\n\t.hidetable { display:none; }\n\t#uploadfield { width:500px; }\n\t#uploadfield input { display:inline; }\n\t.req { font-size:12px; color:#FF0000; font-weight:bold; }\n\t.attchmt { border-bottom:21px solid #666; padding:10px 0; margin:10px 0; }\n\t.prevImage { float:right; width:250px; text-align:center; }\n\t.fr { float:right; }\n\t</style>\n\t<?php\t\n}", "public function getConditionsHook()\n\t{\n\t\t$conditions = array();\n\t\t\n\t\t$conditions['select'] = '`bid` AS id, `cid`, `type`, `name`, `alias`, `imptotal`, `impmade`, '\n\t\t\t\t\t\t\t\t\t\t\t\t\t.'`clicks`, `imageurl`, `clickurl`, `date`, `showBanner` AS state, `checked_out`, '\n\t\t\t\t\t\t\t\t\t\t\t\t\t.'`checked_out_time`, `editor`, `custombannercode`, `catid`, `description`, '\n\t\t\t\t\t\t\t\t\t\t\t\t\t.'`sticky`, `ordering`, `publish_up`, `publish_down`, `tags`, `params`'\t;\n\t\t\n\t\t$conditions['where'] = array();\n\t\t\n\t\treturn $conditions;\n\t}", "private function parse()\n {\n // form was unsubscribed?\n if ($this->URL->getParameter('unsubscribed') === 'true') {\n // show message\n $this->tpl->assign('mailmotorUnsubscribeIsSuccess', true);\n\n // hide form\n $this->tpl->assign('mailmotorUnsubscribeHideForm', true);\n }\n }", "public function condition()\n {\n if (!$this->condition) {\n $this->condition = array();\n foreach (monsterToCondition::select('ctype', 'condition')->where('mid', '=', $this->id)->get() as $r) {\n $this->condition[] = $r->condition;\n };\n }\n return $this->condition;\n }", "function plugin_add_custom_meta_boxes(){\n add_meta_box( \"vehicle_inspector\", __(\"Vehicle Inspector\", \"listings\"), \"vehicle_inspector_make_meta_box\", \"listings\", \"side\", \"core\", array(\"name\" => \"vehicle_inspector\"));\n\tadd_meta_box( \"vehicle_status\", __(\"Vehicle Status\", \"listings\"), \"vehicle_status_make_meta_box\", \"listings\", \"side\", \"core\", array(\"name\" => \"vehicle_status\"));\n add_meta_box( \"options\", __(\"Options\", \"listings\"), \"plugin_make_meta_box\", \"listings\", \"side\", \"core\", array(\"name\" => \"options\"));\n\t$listing_categories = get_listing_categories();\n\t\n\tforeach($listing_categories as $category){\t\n\t\t\t\n\t\t$sfield = str_replace(\" \", \"_\", strtolower($category['singular']));\n\t\t\t\t\n\t\t$field = $name = $category['singular'];\n\n\t\tif($category['filterable'] == 1){\n\t\t\t$field = $field . \" (\" . __(\"Filterable\", \"listings\") . \")\";\n\t\t}\n\t}\n}", "public function getBoxes()\n\t{\n\t\t$boxes = array();\n\t\tforeach($this->getData() as $data){\n\t\t\tif($this->idAllowed($data['id'])){\n\t\t\t\t$boxes[] = array(\n\t\t\t\t\t'class' => sprintf('Webwijs\\Admin\\Metabox\\%s', $data['type']), \n\t\t\t\t\t'settings' => array('id' => $this->getMetaboxId($data['id']), 'title' => $data['title'])\n\t\t\t\t);\t\n\t\t\t}\n\t\t};\n\t\treturn $boxes;\n\t}", "function get_mecanismos_carga()\n\t{\n\t\t$param = $this->get_definicion_parametros(true);\t\t\n\t\t$tipos = array();\n\t\tif (in_array('carga_metodo', $param, true)) {\n\t\t\t$tipos[] = array('carga_metodo', 'Método de consulta PHP');\n\t\t}\n\t\tif (in_array('carga_lista', $param, true)) {\n\t\t\t$tipos[] = array('carga_lista', 'Lista fija de Opciones');\n\t\t}\t\t\n\t\tif (in_array('carga_sql', $param, true)) {\t\t\n\t\t\t$tipos[] = array('carga_sql', 'Consulta SQL');\n\t\t}\n\t\treturn $tipos;\n\t}", "public function metabox( $post, $box ) {\r\n\t\t$defaults = array('taxonomy' => 'category');\r\n\t\tif ( !isset($box['args']) || !is_array($box['args']) )\r\n\t\t\t$args = array();\r\n\t\telse\r\n\t\t\t$args = $box['args'];\r\n\t\textract( wp_parse_args($args, $defaults), EXTR_SKIP );\r\n\r\n\t\t$tax = get_taxonomy($taxonomy);\r\n\r\n\t\t//get current terms\r\n\t\t$checked_terms = $post->ID ? get_the_terms( $post->ID, $taxonomy) : array();\r\n\r\n\t\t//get first term object\r\n $current_term = ! empty( $checked_terms ) && ! is_wp_error( $checked_terms ) ? array_pop( $checked_terms ) : false;\r\n $current_id = ( $current_term ) ? $current_term->term_id : '';\r\n\r\n\t\t?>\r\n\t\t<div id=\"taxonomy-<?php echo $taxonomy; ?>\" class=\"radio-buttons-for-taxonomies\">\r\n\t\t\t<ul id=\"<?php echo $taxonomy; ?>-tabs\" class=\"category-tabs\">\r\n\t\t\t\t<li class=\"tabs\"><a href=\"#<?php echo $taxonomy; ?>-all\" tabindex=\"3\"><?php echo $tax->labels->all_items; ?></a></li>\r\n\t\t\t\t<li class=\"hide-if-no-js\"><a href=\"#<?php echo $taxonomy; ?>-pop\" tabindex=\"3\"><?php _e( 'Most Used' ); ?></a></li>\r\n\t\t\t</ul>\r\n\r\n\t\t\t<style>\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.categorychecklist, .radio-buttons-for-taxonomies ul.tagchecklist { margin: 0; }\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.children { margin-left: 18px; }\r\n\t\t\t</style>\r\n\r\n\t\t\t<?php wp_nonce_field( 'radio_nonce-' . $taxonomy, '_radio_nonce-' . $taxonomy ); ?>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-pop\" class=\"wp-tab-panel tabs-panel\" style=\"display: none;\">\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist-pop\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\" >\r\n\t\t\t\t\t<?php $popular = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );\r\n\r\n\t\t\t\t\t\tif ( ! current_user_can($tax->cap->assign_terms) )\r\n\t\t\t\t\t\t\t$disabled = 'disabled=\"disabled\"';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$disabled = '';\r\n\r\n\t\t\t\t\t\t$popular_ids = array(); ?>\r\n\r\n\t\t\t\t\t\t<?php foreach( $popular as $term ){\r\n\r\n\t\t\t\t\t\t\t$popular_ids[] = $term->term_id;\r\n\r\n\t\t\t\t\t $value = is_taxonomy_hierarchical( $taxonomy ) ? $term->term_id : $term->slug;\r\n\t\t\t\t\t $id = 'popular-'.$taxonomy.'-'.$term->term_id;\r\n\r\n\t\t\t\t\t echo \"<li id='$id'><label class='selectit'>\";\r\n\t\t\t\t\t echo \"<input type='radio' id='in-{$id}'\" . checked( $current_id, $term->term_id, false ) . \" value='{$value}' {$disabled} />&nbsp;{$term->name}<br />\";\r\n\r\n\t\t\t\t\t echo \"</label></li>\";\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-all\" class=\"wp-tab-panel tabs-panel\">\r\n\t\t\t\t<?php\r\n\t $name = 'radio_tax_input[' . $taxonomy . ']';\r\n\t echo \"<input type='hidden' name='{$name}[]' value='0' />\"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.\r\n\t ?>\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist\" data-wp-lists=\"list:<?php echo $taxonomy?>\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\">\r\n\t\t\t\t\t<?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t<?php if ( current_user_can( $tax->cap->edit_terms ) ) : ?>\r\n\t\t\t\t<div id=\"<?php echo $taxonomy; ?>-adder\" class=\"wp-hidden-children\">\r\n\t\t\t\t\t<h4>\r\n\t\t\t\t\t\t<a id=\"<?php echo $taxonomy; ?>-add-toggle\" href=\"#<?php echo $taxonomy; ?>-add\" class=\"hide-if-no-js\" tabindex=\"3\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t/* translators: %s: add new taxonomy label */\r\n\t\t\t\t\t\t\t\tprintf( __( '+ %s' ), $tax->labels->add_new_item );\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t</h4>\r\n\t\t\t\t\t<p id=\"<?php echo $taxonomy; ?>-add\" class=\"category-add wp-hidden-child\">\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>\"><?php echo $tax->labels->add_new_item; ?></label>\r\n\t\t\t\t\t\t<input type=\"text\" name=\"new<?php echo $taxonomy; ?>\" id=\"new<?php echo $taxonomy; ?>\" class=\"form-required form-input-tip\" value=\"<?php echo esc_attr( $tax->labels->new_item_name ); ?>\" aria-required=\"true\"/>\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>_parent\">\r\n\t\t\t\t\t\t\t<?php echo $tax->labels->parent_item_colon; ?>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t<?php if( is_taxonomy_hierarchical($taxonomy) ) {\r\n\t\t\t\t\t\t\twp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $tax->labels->parent_item . ' &mdash;', 'tab_index' => 3 ) );\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t<input type=\"button\" id=\"<?php echo $taxonomy; ?>-add-submit\" data-wp-lists=\"add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add\" class=\"button <?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'category-add-submit'; } else { echo 'radio-add-submit';} ?>\" value=\"<?php echo esc_attr( $tax->labels->add_new_item ); ?>\" tabindex=\"3\" />\r\n\t\t\t\t\t\t<?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy ); ?>\r\n\t\t\t\t\t\t<span id=\"<?php echo $taxonomy; ?>-ajax-response\"></span>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t</div>\r\n\t<?php\r\n\t}", "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "private function show_metabox() {\n\t\t$option_key = 'display-metabox-tax-' . $this->taxonomy;\n\n\t\treturn WPSEO_Options::get( $option_key );\n\t}", "public function ajax_conditional_fields() {\n\t\tglobal $wpdb;\n\n\t\t$form_id = absint( $_REQUEST['form_id'] );\n\t\t$field_id = absint( $_REQUEST['field_id'] );\n\n\t\t// Get the field name and cache the query for the other variables\n\t\t$field_name = $wpdb->get_var( $wpdb->prepare( \"SELECT field_name, field_key, field_rule_setting, field_rule FROM $this->field_table_name WHERE field_id = %d AND form_id = %d ORDER BY field_sequence ASC\", $field_id, $form_id ) );\n\t\t$field_key\t \t\t= $wpdb->get_var( null, 1 );\n\t\t$field_rule_setting = $wpdb->get_var( null, 2 );\n\t\t$rules \t\t\t\t= unserialize( $wpdb->get_var( null, 3 ) );\n\n\t\t// Only get checkbox, select, and radio for list of options\n\t\t$fields = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->field_table_name WHERE field_type IN('checkbox', 'select', 'radio') AND form_id = %d ORDER BY field_sequence ASC\", $form_id ) );\n\t\t$field_options = $wpdb->get_var( null, 4 );\n\n\t\t// Display the conditional rules if setting is on\n\t\t$display = ( $field_rule_setting ) ? ' class=\"show-fields\"' : '';\n\n\t\t// Count the number of rules for our index\n\t\t$num_fields = count( $rules['rules'] );\n\n\t\tif ( !$fields ) :\n\t\t\techo sprintf( '<div class=\"warning error\"><p>%s</p></div>', __( 'A Checkbox, Select, or Radio field is needed in order to perform conditional logic.', 'visual-form-builder-pro' ) );\n\t\telse :\n\t?>\n<div id=\"vfb-conditional-fields\">\n\t<form id=\"vfb-add-conditional-fields\" class=\"media-upload-form type-form validate\">\n\t\t<h3 class=\"media-title\">Conditional Field Rules</h3>\n\t\t\t<label for=\"vfb-conditional-setting\">\n\t\t\t\t<input type=\"checkbox\" name=\"conditional_setting\" id=\"vfb-conditional-setting\" value=\"1\" <?php checked( $field_rule_setting, '1' ); ?> />\n\t\t\t\t<?php _e( 'Enable Conditional Rule for this field', 'visual-form-builder-pro' ); ?>\n\t\t\t</label>\n\n\t\t\t<div id=\"vfb-build-conditional-fields-container\"<?php echo $display; ?>>\n\t\t\t\t\t<?php if ( 1 == $field_rule_setting ) : ?>\n\t\t\t\t\t<p><select name=\"conditional_show\">\n\t\t\t\t\t\t<option value=\"show\" <?php selected( $rules['conditional_show'], 'show' ); ?>><?php _e( 'Show', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t\t<option value=\"hide\" <?php selected( $rules['conditional_show'], 'hide' ); ?>><?php _e( 'Hide', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t</select> the <strong><?php echo esc_html( stripslashes( $field_name ) ); ?></strong> field based on\n\t\t\t\t\t<select name=\"conditional_logic\">\n\t\t\t\t\t\t<option value=\"all\" <?php selected( $rules['conditional_logic'], 'all' ); ?>><?php _e( 'all', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t\t<option value=\"any\" <?php selected( $rules['conditional_logic'], 'any' ); ?>><?php _e( 'any', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t</select>\n\t\t\t\t\t of the following rules:\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<?php for ( $i = 0; $i < $num_fields; $i++ ) : ?>\n\n\t\t\t\t\t<div class=\"vfb-conditional-fields-data\">\n\t\t\t\t\t\tif <select name=\"rules[<?php echo $i; ?>][field]\" class=\"vfb-conditional-other-fields\">\n\t\t\t\t\t\t\t<?php foreach ( $fields as $field ) : ?>\n\t\t\t\t\t\t\t\t<option value=\"<?php echo $field->field_id; ?>\" <?php selected( $rules['rules'][ $i ]['field'], $field->field_id ); ?>><?php echo esc_html( stripslashes( $field->field_name ) ); ?></option>\n\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t<select name=\"rules[<?php echo $i; ?>][condition]>\" class=\"vfb-conditional-condition\">\n\t\t\t\t\t\t\t<option value=\"is\" <?php selected( $rules['rules'][ $i ]['condition'], 'is' ); ?>><?php _e( 'is', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t\t\t<option value=\"isnot\" <?php selected( $rules['rules'][ $i ]['condition'], 'isnot' ); ?>><?php _e( 'is not', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$these_opts = $wpdb->get_var( $wpdb->prepare( \"SELECT field_options FROM $this->field_table_name WHERE field_id = %d ORDER BY field_sequence ASC\", $rules['rules'][ $i ]['field'] ) );\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<select name=\"rules[<?php echo $i; ?>][option]\" class=\"vfb-conditional-other-fields-options\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif ( !empty( $these_opts ) ) {\n\t\t\t\t\t\t\t\t$options = maybe_unserialize( $these_opts );\n\n\t\t\t\t\t\t\t\tforeach ( $options as $option ) {\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<option value=\"<?php echo esc_attr( stripslashes( $option ) ); ?>\" <?php selected( esc_attr( stripslashes( $rules['rules'][ $i ]['option'] ) ), esc_html( stripslashes( $option ) ) ); ?>><?php echo esc_html( stripslashes( $option ) ); ?></option>\n\t\t\t\t\t\t\t\t<?php }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t<a href=\"#\" class=\"vfb-add-condition vfb-interface-icon vfb-interface-plus\" title=\"Add Condition\">\n\t\t\t\t\t\t\t<?php _e( 'Add', 'visual-form-builder-pro' ); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<a href=\"#\" class=\"vfb-delete-condition vfb-interface-icon vfb-interface-minus\" title=\"Delete Condition\">\n\t\t\t\t\t\t\t<?php _e( 'Delete', 'visual-form-builder-pro' ); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div> <!-- #vfb-conditional-fields-data -->\n\t\t\t\t\t<?php endfor; ?>\n\n\t\t\t\t\t<?php else: ?>\n\n\t\t\t\t\t<p><select name=\"conditional_show\">\n\t\t\t\t\t\t<option value=\"show\"><?php _e( 'Show', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t\t<option value=\"hide\"><?php _e( 'Hide', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t</select> the <strong><?php echo esc_html( stripslashes( $field_name ) ); ?></strong> field based on\n\t\t\t\t\t<select name=\"conditional_logic\">\n\t\t\t\t\t\t<option value=\"all\"><?php _e( 'all', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t\t<option value=\"any\"><?php _e( 'any', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t</select> of the following rules:\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<div class=\"vfb-conditional-fields-data\">\n\t\t\t\t\t\tif <select name=\"rules[0][field]\" class=\"vfb-conditional-other-fields\">\n\t\t\t\t\t\t\t<?php foreach ( $fields as $field ) : ?>\n\t\t\t\t\t\t\t\t<option value=\"<?php echo $field->field_id; ?>\"><?php echo esc_html( stripslashes( $field->field_name ) ); ?></option>\n\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t<select name=\"rules[0][condition]>\" class=\"vfb-conditional-condition\">\n\t\t\t\t\t\t\t<option value=\"is\"><?php _e( 'is', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t\t\t<option value=\"isnot\"><?php _e( 'is not', 'visual-form-builder-pro' ); ?></option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t<select name=\"rules[0][option]\" class=\"vfb-conditional-other-fields-options\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif ( !empty( $field_options ) ) {\n\t\t\t\t\t\t\t\t$options = maybe_unserialize( $field_options );\n\n\t\t\t\t\t\t\t\tforeach ( $options as $option ) {\n\t\t\t\t\t\t\t\t\techo sprintf( '<option value=\"%1$s\">%2$s</option>', esc_attr( stripslashes( $option ) ), esc_html( stripslashes( $option ) ) );\n\t\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</select>\n\t\t\t\t\t\t<a href=\"#\" class=\"vfb-add-condition vfb-interface-icon vfb-interface-plus\" title=\"Add Condition\">\n\t\t\t\t\t\t\t<?php _e( 'Add', 'visual-form-builder-pro' ); ?></a>\n\t\t\t\t\t\t<a href=\"#\" class=\"vfb-delete-condition vfb-interface-icon vfb-interface-minus\" title=\"Delete Condition\">\n\t\t\t\t\t\t\t<?php _e( 'Delete', 'visual-form-builder-pro' ); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div> <!-- #vfb-conditional-fields-data -->\n\t\t\t\t\t<?php endif; ?>\n\t\t\t</div> <!-- #vfb-build-conditional-fields-container -->\n\t\t<input type=\"hidden\" name=\"field_id\" value=\"<?php echo $field_id; ?>\" />\n\t\t<p>\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"Save\" />\n\t\t\t<span id=\"vfb-saving-conditional\">\n\t\t\t\t<img alt=\"\" src=\"<?php echo admin_url( '/images/wpspin_light.gif' ); ?>\" class=\"waiting spinner\" />\n\t\t\t\t<div id=\"vfb-saving-conditonal-error\"></div>\n\t\t\t</span>\n\t\t</p>\n\t</form>\n</div> <!-- #vfb-conditional-fields -->\n\t<?php\n\t\tendif;\n\n\t\tdie(1);\n\t}", "function data_term_condition() {\n return $this->db->get('t_page_term_condition');\n }", "public static function render_metabox(){\n\t\t\t\t$all_tags = get_terms( [ 'taxonomy' => rForum_Tax::get_slug(), 'hide_empty' => 0 ] ); \n\n\t\t\t\t// get all tags assigned to a post\n\t\t\t\t$all_tags_of_post = get_the_terms( $post->ID, rForum_Tax::get_slug() ); \n\n\t\t\t\t// create an array of post tags ids\n\t\t\t\t$ids = [];\n\t\t\t\tif( $all_tags_of_post ){\n\t\t\t\t\tforeach( $all_tags_of_post as $tag ){\n\t\t\t\t\t\t$ids[] = $tag->term_id;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTML\n\t\t\t\techo '<div id=\"'. rForum_Tax::get_slug() .'-all\" class=\"categorydiv\">';\n\t\t\t\techo '<input type=\"hidden\" name=\"tax_input['. rForum_Tax::get_slug() .'][]\" value=\"0\" />';\n\t\t\t\techo '<ul>';\n\t\t\t\tforeach( $all_tags as $tag ){\n\t\t\t\t\t// unchecked by default\n\t\t\t\t\t$checked = \"\";\n\t\t\t\t\t// if an ID of a tag in the loop is in the array of assigned post tags - then check the checkbox\n\t\t\t\t\tif( in_array( $tag->term_id, $ids ) ){\n\t\t\t\t\t\t$checked = \" checked='checked'\";\n\t\t\t\t\t}\n\t\t\t\t\t$id = rForum_Tax::get_slug() .'-' . $tag->term_id;\n\t\t\t\t\techo \"<li id='{$id}'>\";\n\t\t\t\t\techo \"<label><input type='checkbox' name='tax_input[\". rForum_Tax::get_slug() .\"][]' id='in-$id'\". $checked .\" value='$tag->slug' /> $tag->name</label><br />\";\n\t\t\t\t\techo \"</li>\";\n\t\t\t\t}\n\t\t\t\techo '</ul></div>'; // end HTML\n\t\t\t}", "function gecapa_mant_BeforeShow()\n{\n $gecapa_mant_BeforeShow = true;\n//End gecapa_mant_BeforeShow\n\n//Custom Code @300-8D83BE6B\n// ------------------------- Si agrega una categorža, tomar la categoria padre del QueryString\n global $gecapa_mant;\n\t\n\tIF (!$gecapa_mant->EditMode) {\n\t\t$liCatPadre = CCGetParam(\"pPadre\", 0);\n\t\tif (is_null($liCatPadre) or empty ($liCatPadre)) $liCatPadre = 0;\n\t\t$gecapa_mant->lkNuevo->Visible = False;\n\t\t$gecapa_mant->cat_CodPadre->SetValue($liCatPadre);\n\t}\n if (!isset($_GET[\"pPadre\"]) AND !isset($_GET[\"cat_Codigo\"])) $gecapa_mant->Visible = False;\n if (isset($_GET[\"pPadre\"])) {\n\t\t$gecapa_mant->tbTitulo1->SetValue(\"NUEVA CATEGORIA\"); } \n if (isset($_GET[\"cat_Codigo\"])) {\n\t\t$gecapa_mant->tbTitulo1->SetValue(\"MODIFICACION DE CATEGORIA\"); } \n// -------------------------\n//End Custom Code\n\n//Close gecapa_mant_BeforeShow @288-96845E7F\n return $gecapa_mant_BeforeShow;\n}", "function admin_metaboxes() {\r\n\r\n// \t\t\t/** Check if wpeo_log_select_post_type exist */\r\n// \t\t\tif( !empty(\t$this->wpeologs_settings['post_type'] ) ) {\r\n// \t\t\t\tforeach ( $this->wpeologs_settings['post_type'] as $post_type ) {\r\n\r\n// \t\t\t\t\t//add_meta_box( 'wpeologs_metabox_' . $post_type, __( 'Logs', 'wpeologs-i18n'), array( &$this, 'associated_post_type_metabox' ), $post_type, 'normal' );\r\n// \t\t\t\t}\r\n// \t\t\t}\r\n\t\t}", "function get_form_filter() {\n\n $val_ = new OrSysvalue();\n if (!is_null($var_)) {\n foreach ($val_->filter AS $id => $value) {\n //echo '$id [ ' . $id . ' ] = [ ' . $value . ' ] <br>' ;\n if ($id != 'filter_by') {\n if (!$this->filter_use[$id]) {\n $my_filter = new OrFieldHidden($id, 'val_filter[' . $id . ']');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n\n if ($val_->compare[$id] == 'BETWEEN' OR $val_->message[$id . '_II'] != '') {\n $my_filter = new OrFieldHidden($id . '_II', 'val_msg[' . $id . '_II]');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n }\n }\n $my_compare = new OrFieldHidden('val_compare_' . $id . '_', 'val_compare[' . $id . ']');\n $my_compare->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_compare->get_tag();\n }\n }\n }\n\n\n /* $my_table = new OrTable('table_query');\n $my_table->OP_[align_table]->set('center');\n $my_table->OP_[class_name]->set('tbl_body');\n $my_table->set_col(' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n $my_table->set_row(); */\n $my_table = (' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n return $my_table;\n }", "abstract function buildShowFields(): void;", "public function page_filter_display_rule_controls()\n {\n $page_filter_control_args = apply_filters(\n \"mo_optin_form_customizer_page_filter_controls\",\n array(\n 'load_optin_index' => apply_filters('mo_optin_form_customizer_load_optin_index_args',\n array(\n 'type' => 'checkbox',\n 'label' => __('Front Page, Archive and Search Pages', 'mailoptin'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[load_optin_index]',\n 'description' => __('Loads the optin on home front page, archive and search pages', 'mailoptin'),\n 'priority' => 30\n )\n ),\n 'exclusive_post_types_posts_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[exclusive_post_types_posts_load]',\n apply_filters('mo_optin_form_customizer_exclusive_post_types_posts_load_args', array(\n 'label' => __('Load optin exclusively on:'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[exclusive_post_types_posts_load]',\n 'description' => __('Loads the optin only on the selected \"post types\" posts.', 'mailoptin'),\n 'search_type' => 'exclusive_post_types_posts_load',\n 'choices' => ControlsHelpers::get_all_post_types_posts(),\n 'priority' => 35\n )\n )\n ),\n 'exclusive_post_types_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[exclusive_post_types_load]',\n apply_filters('mo_optin_form_customizer_exclusive_post_types_load_args', array(\n 'label' => __('Load optin only on \"post types\":'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[exclusive_post_types_load]',\n 'description' => __('Loads the optin only on the selected \"post types\".', 'mailoptin'),\n 'choices' => ControlsHelpers::get_post_types(),\n 'priority' => 38\n )\n )\n ),\n 'posts_never_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[posts_never_load]',\n apply_filters('mo_optin_form_customizer_posts_never_load_args', array(\n 'label' => __('Never load optin on these posts:'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[posts_never_load]',\n 'description' => __('Select the posts this optin should never be loaded on.', 'mailoptin'),\n 'search_type' => 'posts_never_load',\n 'choices' => ControlsHelpers::get_post_type_posts('post'),\n 'priority' => 40\n )\n )\n ),\n 'pages_never_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[pages_never_load]',\n apply_filters('mo_optin_form_customizer_pages_never_load_args', array(\n 'label' => __('Never load optin on these pages:'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[pages_never_load]',\n 'description' => __('Select the pages this optin should never be loaded on.', 'mailoptin'),\n 'search_type' => 'pages_never_load',\n 'choices' => ControlsHelpers::get_post_type_posts('page'),\n 'priority' => 50\n )\n )\n ),\n 'cpt_never_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[cpt_never_load]',\n apply_filters('mo_optin_form_customizer_cpt_never_load_args', array(\n 'label' => __('Never load optin on these CPT posts:'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[cpt_never_load]',\n 'description' => __('Select \"custom post type\" posts this optin should never be loaded on.', 'mailoptin'),\n 'search_type' => 'cpt_never_load',\n 'choices' => ControlsHelpers::get_all_post_types_posts(array('post', 'page')),\n 'priority' => 60\n )\n )\n ),\n 'post_categories_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[post_categories_load]',\n apply_filters('mo_optin_form_customizer_post_categories_load_args', array(\n 'label' => __('Load on post categories:'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[post_categories_load]',\n 'description' => __('Loads the optin on posts that are in one of the selected categories.', 'mailoptin'),\n 'choices' => ControlsHelpers::get_categories(),\n 'priority' => 70\n )\n )\n ),\n ),\n $this->wp_customize,\n $this->option_prefix,\n $this->customizerClassInstance\n );\n\n do_action('mailoptin_before_page_filter_controls_addition');\n\n foreach ($page_filter_control_args as $id => $args) {\n if (is_object($args)) {\n $this->wp_customize->add_control($args);\n } else {\n $this->wp_customize->add_control($this->option_prefix . '[' . $id . ']', $args);\n }\n }\n\n do_action('mailoptin_after_page_filter_controls_addition');\n\n }", "public function flexformConditionStringDataProvider() {}", "function show_metabox_home_position($post){\r\n\r\n\t\t$position_number = get_position($post->ID);\r\n\r\n\t\t\techo \"\r\n\t\t\t<div class='meta-container cf'>\r\n\t\t\t\t<div class='position_mini'>izquierda</div>\r\n\t\t\t\t<div class='position_mini'>centro</div>\r\n\t\t\t\t<div class='position_mini'>derecha</div>\r\n\r\n\t\t\t\t<input class='position_checkbox' type='radio' name='position_meta' value='1' \";\r\n\t\t\t\techo ( $position_number == 1 ) ? 'checked>' : '>' ;\r\n\t\t\t\techo \"\r\n\t\t\t\t<input class='position_checkbox' type='radio' name='position_meta' value='2' \";\r\n\t\t\t\techo ( $position_number == 2 ) ? 'checked>' : '>' ;\r\n\t\t\t\techo \"<input class='position_checkbox' type='radio' name='position_meta' value='3' \";\r\n\t\t\t\techo ( $position_number == 3 ) ? 'checked>' : '>' ;\r\n\t echo \"</div>\";\r\n\r\n\r\n\t}", "abstract public function getConditionsInstance();", "public function getColumns()\n {\n return [\n 'form' => [\n 'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['form'],\n 'exclude' => true,\n 'inputType' => 'select',\n 'foreignKey' => 'tl_form.title',\n 'eval' => [\n 'includeBlankOption' => true,\n 'style' => 'width:300px',\n 'chosen' => true,\n 'columnPos' => 'checkout',\n ],\n ],\n 'step' => [\n 'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['step'],\n 'inputType' => 'select',\n 'options_callback' => ['Isotope\\Backend\\Module\\OrderConditionFields', 'getSteps'],\n 'eval' => [\n 'decodeEntities' => true,\n 'includeBlankOption' => true,\n 'style' => 'width:300px',\n 'columnPos' => 'checkout',\n ],\n ],\n 'position' => [\n 'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['position'],\n 'default' => 'before',\n 'inputType' => 'select',\n 'options' => ['before', 'after'],\n 'reference' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['position'],\n 'eval' => [\n 'style' => 'width:300px',\n 'columnPos' => 'checkout',\n ],\n ],\n 'product_types' => [\n 'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['product_types'],\n 'inputType' => 'select',\n 'foreignKey' => 'tl_iso_producttype.name',\n 'eval' => [\n 'multiple' => true,\n 'style' => 'width:300px',\n 'columnPos' => 'product_type',\n ],\n ],\n 'product_types_condition' => [\n 'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['product_types_condition'],\n 'inputType' => 'select',\n 'options' => ['oneAvailable', 'allAvailable', 'onlyAvailable'],\n 'reference' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['product_types_condition'],\n 'eval' => [\n 'style' => 'width:300px',\n 'columnPos' => 'product_type',\n ],\n ],\n ];\n }", "public function get_field_conditions_modal( $args ) {\n\n $name_id = $args['name_id'];\n $elment_id = str_replace( '.', '--', $name_id );\n $elment_id = str_replace( '[', '_', $elment_id );\n $elment_id = str_replace( ']', '', $elment_id );\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $value = (isset($value['options']) && is_array($value['options'])) ? $value['options'] : array();\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n\n\n $options = $this->get_conditions();\n\n $multiselect_html = sprintf( '<select multiple=\"multiple\" class=\"%1$s-multi-select-field\" name=\"%2$s[]\" id=\"%3$s_conditions\" %4$s>', $this->settings_prefix, $name_id, $elment_id, $disable );\n\n foreach ( $options as $key => $label ) {\n $selected = (is_array($value) && in_array( $key, $value )) ? $key : '0';\n $multiselect_html .= sprintf( '<option value=\"%s\" %s>%s</option>', $key, selected( $selected, $key, false ), $label );\n }\n\n $multiselect_html .= sprintf( '</select>' );\n\n add_thickbox();\n\n $html = sprintf( '<a href=\"#TB_inline?&height=370&width=470&inlineId=%1$s_modal_%2$s\" title=\"%3$s\" class=\"button button thickbox\">%4$s</a>', $this->settings_prefix, $elment_id, __('Select your conditions', 'wp-ng'), __('Conditions', 'wp-ng') );\n $html .= sprintf( '<div id=\"%1$s_modal_%2$s\" style=\"display:none;\"><p>%3$s</p></div>', $this->settings_prefix, $elment_id, $multiselect_html );\n\n return $html;\n }", "public function get_conditions() {\n $conditions = get_post_meta( $this->post_id, '_wcs_conditions', true );\n\n if ( ! $conditions ) {\n return array();\n }\n\n return (array) $conditions;\n }", "function vulcan_slideshow_meta_boxes() {\r\r\n $meta_boxes = array(\r\r\n \"slideshow_image\" => array(\r\r\n \"name\" => \"slideshow_image\",\r\r\n \"title\" => \"Slideshow Image\",\r\r\n \"description\" => \"Add image url for your slideshow.\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"slideshow_url\" => array(\r\r\n \"name\" => \"slideshow_url\",\r\r\n \"title\" => \"Slideshow Url\",\r\r\n \"description\" => \"Link url for slideshow.\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"slideshow_readmore\" => array(\r\r\n \"name\" => \"slideshow_readmore\",\r\r\n \"title\" => \"Slideshow Read More Text\",\r\r\n \"description\" => \"Please enter the read more text for slideshow, eg : Continue Reading, Read More.\",\r\r\n \"type\" => \"text\"\r\r\n ),\r\r\n \"slideshow_style\" => array(\r\r\n \"name\" => \"slideshow_style\",\r\r\n \"title\" => \"Slideshow Stage Style\",\r\r\n \"description\" => \"Please one style of them for each image slideshow.\",\r\r\n \"type\" => \"select\",\r\r\n \"options\" => array(\"full image\",\"with right description\",\"with left description\",\"with bottom description\")\r\r\n ), \r\r\n \"num_excerpt\" => array(\r\r\n \"name\" => \"num_excerpt\",\r\r\n \"title\" => \"Number of Words for Slideshow Excerpt\",\r\r\n \"description\" => \"Add number of words excerpt to display in slideshow description, eg. 20\",\r\r\n \"type\" => \"text\"\r\r\n ) \r\r\n );\r\r\n \r\r\n return $meta_boxes;\r\r\n}", "public function &havingConditions();", "private function parse()\n\t{\n\t\t// parse datagrids\n\t\tif(!empty($this->datagrids)) $this->tpl->assign('datagrids', $this->datagrids);\n\t}", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "public function paramsFilter(){\n\t\t\t\n\t\t\t$f = [];\n\t\t\t\n\t\t\t// Установка металла\n\t\t\t$add = [\n 'type' => \"checkbox-group\",\n 'title' => 'Металл',\n 'variabled' => 'metall',\n 'impact' => 'filter',\n 'data' => []\n\t\t\t]; \n\t\t\t$metallList = ['Комбинированное золото','Красное золото','Белое золото','Золочёное серебро','Чернёное серебро'];\n\t\t\t$metallListVals = ['kombinZoloto','krasnZoloto','belZoloto','zoloZoloto','chernZoloto']; \n\t\t\tforeach( $metallList as $k => $v ){\n\t\t\t\t$add['data'][] = [\n 'title' => $v,\n 'variabled' => $metallListVals[$k] \n\t\t\t\t];\n\t\t\t} \n\t\t\t$f[] = $add;\n\t\t\t\n\t\t\t// Установка для кого\n\t\t\t$add = [\n 'type' => \"checkbox-group\",\n 'title' => 'Для кого',\n 'variabled' => 'sex',\n 'impact' => 'filter',\n 'data' => []\n\t\t\t]; \n\t\t\t$dlaKogo = ['Для женщин','Для мужчин', 'Для женщин, Для мужчин'];\n\t\t\t$dlaKogoVals = ['woman','men', 'unisex']; \n\t\t\tforeach( $dlaKogo as $k => $v ){\n\t\t\t\t$add['data'][] = [\n 'title' => $v,\n 'variabled' => $dlaKogoVals[$k] \n\t\t\t\t];\n\t\t\t} \n\t\t\t$f[] = $add;\n\t\t\t\n\t\t\t// Установка размера\n\t\t\t$add = [\n 'type' => \"checkbox-group\",\n 'title' => 'Размер',\n 'variabled' => 'size',\n 'impact' => 'filter',\n 'data' => []\n\t\t\t]; \n\t\t\t$razmerList = ['2.0','12.0','13.0','13.5','14.0','14.5','15.0','15.5','16.0','16.5','17.0','17.5','18.0','18.5','19.0','19.5','20.0','20.5','21.0','21.5','22.0','22.5','23.0','23.5','24.0','24.5','25.0'];\n\t\t\t$razmerListVals = ['2_0','12_0','13_0','13_5','14_0','14_5','15_0','15_5','16_0','16_5','17_0','17_5','18_0','18_5','19_0','19_5','20_0','20_5','21_0','21_5','22_0','22_5','23_0','23_5','24_0','24_5','25_0']; \n\t\t\tforeach( $razmerList as $k => $v ){\n\t\t\t\t$add['data'][] = [\n 'title' => $v,\n 'variabled' => $razmerListVals[$k] \n\t\t\t\t];\n\t\t\t} \n\t\t\t$f[] = $add; \n\t\t\t\n\t\t\t// Установка вставки\n\t\t\t$add = [\n 'type' => \"checkbox-group\",\n 'title' => 'Вставка',\n 'variabled' => 'kamen',\n 'impact' => 'filter',\n 'data' => []\n\t\t\t]; \n\t\t\t$kamenList = ['Бриллиант','Сапфир','Изумруд','Рубин','Жемчуг','Топаз','Аметист','Гранат','Хризолит','Цитрин','Агат','Кварц','Янтарь','Опал','Фианит'];\n\t\t\t$kamenListVals = ['brilliant','sapfir','izumrud','rubin','jemchug','topaz','ametist','granat','hrizolit','citrin','agat','kvarc','jantar','opal','fianit']; \n\t\t\tforeach( $kamenList as $k => $v ){\n\t\t\t\t$add['data'][] = [\n 'title' => $v,\n 'variabled' => $kamenListVals[$k] \n\t\t\t\t];\n\t\t\t} \n\t\t\t$f[] = $add;\n\t\t\t\n\t\t\t// Установка формы вставки\n\t\t\t$add = [\n 'type' => \"checkbox-group\",\n 'title' => 'Форма вставки',\n 'variabled' => 'forma_vstavki',\n 'impact' => 'filter',\n 'data' => []\n\t\t\t];\t\t\t\n\t\t\t$formaList = ['Кабошон','Круг','Овал','Груша','Маркиз', 'Багет', 'Квадрат', 'Октагон', 'Триллион', 'Сердце', 'Кушон', 'Пятигранник', 'Шестигранник', 'Восьмигранник'];\n\t\t\t$formaListVals = ['Kaboshon','Krug','Oval','Grusha','Markiz', 'Baget', 'Kvadrat', 'Oktagon', 'Trillion', 'Serdtce', 'Kushon', 'Piatigranniq', 'Shestigranniq', 'Vosmigrannic']; \n\t\t\tforeach( $formaList as $k => $v ){\n\t\t\t\t$add['data'][] = [\n 'title' => $v,\n 'variabled' => $formaListVals[$k] \n\t\t\t\t];\n\t\t\t} \n\t\t\t$f[] = $add;\n \n /*\n\t\t\t\techo json_encode( $f );\n\t\t\t*/\n\t\t\techo \"<pre>\";\n\t\t\tprint_r( $f );\n\t\t\techo \"</pre>\";\t\n\t\t\t\n\t\t\t\n \n \n // металл\n \n // для кого\n \n // размер\n \n // Камень\n \n // Форма вставки\n \n \n /*{\"type\":\"checkbox-group\",\"title\":\"Размер\",\"variabled\":\"Razmer\",\"impact\":\"products\",\"data\":[{\"title\":\"2.0\",\"value\":\"\",\"variabled\":\"2_0\"},{\"title\":\"12.0\",\"value\":\"\",\"variabled\":\"12_0\"},{\"title\":\"13.0\",\"value\":\"\",\"variabled\":\"13_0\"},{\"title\":\"13.5\",\"value\":\"\",\"variabled\":\"13_5\"},{\"title\":\"14.0\",\"value\":\"\",\"variabled\":\"14_0\"},{\"title\":\"14.5\",\"value\":\"\",\"variabled\":\"14_5\"},{\"title\":\"15.0\",\"value\":\"\",\"variabled\":\"15_0\"},{\"title\":\"15.5\",\"value\":\"\",\"variabled\":\"15_5\"},{\"title\":\"16.0\",\"value\":\"\",\"variabled\":\"16_0\"}]},\n\t\t\t\t\n\t\t\t\t{\"type\":\"checkbox-group\",\"title\":\"Проба\",\"variabled\":\"Proba\",\"impact\":\"products\",\"data\":[{\"title\":\"585\",\"value\":\"\",\"variabled\":\"proba_585\"},{\"title\":\"925\",\"value\":\"\",\"variabled\":\"proba_925\"}]},\n\t\t\t\t\n\t\t\t{\"type\":\"checkbox-group\",\"title\":\"Металл\",\"variabled\":\"Metall\",\"impact\":\"products\",\"data\":[{\"title\":\"Золото\",\"value\":\"\",\"variabled\":\"met_zoloto\"},{\"title\":\"Серебро\",\"value\":\"\",\"variabled\":\"met_serebro\"}]}*/\n \n\t\t\t/*\n\t\t\t[{\"type\":\"range-values\",\"title\":\"Цена\",\"variabled\":\"Cena\",\"impact\":\"price\",\"data\":[{\"title\":\"Цена от:\",\"value\":\"0\",\"variabled\":\"_ot\"},{\"title\":\"Цена до:\",\"value\":\"900000\",\"variabled\":\"_do\"}]},{\"type\":\"checkbox-group\",\"title\":\"Размер\",\"variabled\":\"Razmer\",\"impact\":\"products\",\"data\":[{\"title\":\"2.0\",\"value\":\"\",\"variabled\":\"2_0\"},{\"title\":\"12.0\",\"value\":\"\",\"variabled\":\"12_0\"},{\"title\":\"13.0\",\"value\":\"\",\"variabled\":\"13_0\"},{\"title\":\"13.5\",\"value\":\"\",\"variabled\":\"13_5\"},{\"title\":\"14.0\",\"value\":\"\",\"variabled\":\"14_0\"},{\"title\":\"14.5\",\"value\":\"\",\"variabled\":\"14_5\"},{\"title\":\"15.0\",\"value\":\"\",\"variabled\":\"15_0\"},{\"title\":\"15.5\",\"value\":\"\",\"variabled\":\"15_5\"},{\"title\":\"16.0\",\"value\":\"\",\"variabled\":\"16_0\"}]},{\"type\":\"checkbox-group\",\"title\":\"Проба\",\"variabled\":\"Proba\",\"impact\":\"products\",\"data\":[{\"title\":\"585\",\"value\":\"\",\"variabled\":\"proba_585\"},{\"title\":\"925\",\"value\":\"\",\"variabled\":\"proba_925\"}]},{\"type\":\"checkbox-group\",\"title\":\"Металл\",\"variabled\":\"Metall\",\"impact\":\"products\",\"data\":[{\"title\":\"Золото\",\"value\":\"\",\"variabled\":\"met_zoloto\"},{\"title\":\"Серебро\",\"value\":\"\",\"variabled\":\"met_serebro\"}]}]*/\n\t\t\t\n\t\t\t\n\t\t}", "public function metabox(){\n\t\tif ($this->options('use_metabox')){\n\t\t\treturn array(\n\t\t\t\t'id' => $this->options('name').'_metabox',\n\t\t\t\t'title' => __($this->options('singular_name').' Fields'),\n\t\t\t\t'page' => $this->options('name'),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}", "protected function parse_condition($recordid, $item, $fields) {\n if (is_array($item)) {\n $field = '';\n $operator = '';\n $value = '';\n switch (count($item)) {\n case 3:\n list($field, $operator, $value) = $item;\n break;\n case 2:\n list($field, $operator) = $item;\n break;\n case 1:\n list($field) = $item;\n $operator = 'IS NOT EMPTY';\n break;\n }\n if (is_string($field) && $field && array_key_exists($field, $fields)) {\n if (empty($operator)) {\n $operator = 'IS NOT EMPTY';\n } else {\n $operator = trim(strtoupper($operator));\n }\n if (is_string($operator)) {\n if (in_array($operator, array('IS NULL', 'IS NOT NULL', 'IS EMPTY', 'IS NOT EMPTY'))) {\n // $value not required\n $value = '';\n } else if (in_array($operator, array('=', '!=', '<>', '<', '<=', '>', '>='))) {\n // value required\n $value = $this->compute($recordid, $value, '');\n } else {\n // invalid operator\n $operator = '';\n $value = '';\n }\n }\n if ($field && $operator) {\n return array($field, $operator, $value);\n }\n }\n }\n return false;\n }", "function termsConditions()\r\r\n\t{\r\r\n\t $this->data['content'] \t\t\t= 'general/terms_conditions';\r\r\n\t\t$this->_render_page('temp/template', $this->data);\r\r\n\t}", "function awm_fields_positions()\n {\n $metas = array(\n 'awm_positions' => array(\n 'item_name' => __('Position', 'extend-wp'),\n 'label' => __('Positions', 'extend-wp'),\n 'case' => 'repeater',\n 'include' => array(\n 'case' => array(\n 'label' => __('Position', 'extend-wp'),\n 'case' => 'select',\n 'options' => awm_position_options(),\n 'label_class' => array('awm-needed'),\n 'attributes' => array('data-callback' => \"awm_get_position_settings\"),\n ),\n 'position_content' => array(\n 'label' => __('Position configuration', 'extend-wp'),\n 'case' => 'html',\n 'value' => '<div class=\"awm-position-configuration\"></div>',\n 'exclude_meta' => true,\n 'show_label' => true\n )\n )\n )\n /**/\n );\n return apply_filters('awm_fields_position_filter', $metas);\n }", "function condition_values() {\n return array();\n }", "public function parse_options(){\n\t\t\n\t\t//switch (explode(',',$this->options)){case title: $return[]='title: {usw}';break;} $this->parsed_options=implode(',',return);\n\t\t\n\t\t$this->parsed_options=\"chart: {\trenderTo: 'container',\tdefaultSeriesType: 'area',\t\tinverted: true},\n\t\t\t\t\ttitle: {\ttext: 'ein Beispiel'},\n\t\t\t\t\tsubtitle: {\tstyle: {position: 'absolute',right: '0px',\tbottom: '10px'\t}},\n\t\t\t\t\tlegend: {\tlayout: 'vertical',\talign: 'right',\tverticalAlign: 'top',x: -150,y: 100,floating: true,\tborderWidth: 1,\tbackgroundColor: '#FFFFFF'},\n\t\t\t\t\txAxis: {categories: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']},\n\t\t\t\t\tyAxis: {title: {text: 'x-Axentitel'},labels: {formatter: function() {return this.value;}},min: 0},\n\t\t\t\t\t\";\n\t\treturn true;\n\t}", "function get_search_condition()\r\n {\r\n return $this->get_search_form()->get_condition();\r\n }", "function section_optionator( $settings ){\n\t\t$settings = wp_parse_args($settings, $this->optionator_default);\n\t\t$opt_array = array(\n\t\t\t'tm_candy_open' => array(\n\t\t\t\t'title'\t\t\t=> 'Show at the start',\n\t\t\t\t'type' \t=> 'check',\n\t\t\t\t'inputlabel' \t=> __( 'Show at the start', $this->domain ),\n\t\t\t\t'shortexp' \t\t=> 'Default: Hidden',\n\t\t\t\t'exp' \t\t=> 'Check if you want to show the notification when the page is loaded, by default the notification area is hidden and it show the ribbon to open it.'\n\t\t\t),\n\t\t\t'tm_candys_set' \t=> array(\n\t\t\t\t'type' \t\t\t=> 'select_taxonomy',\n\t\t\t\t'taxonomy_id'\t=> $this->tax_id,\n\t\t\t\t'title' \t\t=> __('Select notiofication set to show', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('The set to show', $this->domain),\n\t\t\t\t'inputlabel'\t=> __('Select a set', $this->domain),\n\t\t\t\t'exp' \t\t\t=> __('if don\\'t select a set it will show all notification entries', $this->domain)\n\t\t\t),\n\t\t\t'tm_candys_items' => array(\n\t\t\t\t'type' \t\t\t=> 'count_select',\n\t\t\t\t'inputlabel'\t=> __('Number of notifications to show', $this->domain),\n\t\t\t\t'title' \t\t=> __('Number of notifications', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('Default value is 1', $this->domain),\n\t\t\t\t'count_start'\t=> 1, \n \t\t\t\t'count_number'\t=> 5,\n\t\t\t),\n\t\t\t'tm_candys_pause_on_hover' => array(\n\t\t\t\t'type'\t\t\t=> 'check',\n\t\t\t\t'title'\t\t\t=> __('Pause on hover', $this->domain),\n\t\t\t\t'inputlabel'\t=> __('Pause on hover', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('', $this->domain),\n\t\t\t\t'exp'\t\t\t=> __('Determines whether the timeout between transitions should be paused \"onMouseOver\"', $this->domain)\n\t\t\t),\n\t\t\t'tm_candys_duration_pause' \t=> array(\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t\t'inputlabel'\t=> __('Pause Duration', $this->domain),\n\t\t\t\t'title' \t\t=> __('Pause Duration', $this->domain),\n\t\t\t\t'shortexp'\t\t=> '',\n\t\t\t\t'exp'\t\t\t=> __('The amount of milliseconds the carousel will pause. 1000 = 1 second', $this->domain),\n\t\t\t),\n\n\t\t\t\t\n\t\t);\n\n\t\t$settings = array(\n\t\t\t'id' \t\t=> $this->id.'_meta',\n\t\t\t'name' \t\t=> $this->name,\n\t\t\t'icon' \t\t=> $this->icon, \n\t\t\t'clone_id'\t=> $settings['clone_id'], \n\t\t\t'active'\t=> $settings['active']\n\t\t);\n\n\t\tregister_metatab($settings, $opt_array);\n\t\t\n\t}", "public function buildConditionAction()\n {\n /** @var Form $form */\n $form = $this->formRepository->findByIdentifier($this->powermailArguments['mail']['form']);\n $this->setTextFields($form);\n\n /** @var ConditionContainer $conditionContainer */\n $conditionContainer = $this->containerRepository->findOneByForm($form);\n if ($conditionContainer !== null) {\n $arguments = $conditionContainer->applyConditions($form, $this->powermailArguments);\n SessionUtility::setSession($arguments);\n ArrayUtility::unsetByKeys($arguments, ['backup', 'field']);\n return json_encode($arguments);\n }\n return null;\n }", "function _display_status_meta( $post ) {\n\t\tinclude( 'includes/metaboxes/unit-status.php' );\n\t}", "public function getMetaboxes()\n\t{\n\t\treturn $this->_metaboxes;\n\t}", "public function displayConditionCreateMode($post)\r\n {\r\n $r = Recipe::load($post['recipe']);\r\n $s = $r->getStepById($post['step']); \r\n $this->context->smarty->assign(\r\n array(\r\n 'recipe' => $r,\r\n 'step' => $s, \r\n 'row' => $post['row']\r\n )\r\n ); \r\n if (array_key_exists('condition',$post)) \r\n $this->context->smarty->assign('condition',$post['condition']); \r\n if (array_key_exists('cid',$post)) \r\n $this->context->smarty->assign('cid',$post['cid']); \r\n switch ($post['time'])\r\n {\r\n case 'start':\r\n $this->context->smarty->assign('time','start');\r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/displayConditionCreateMode.tpl'); \r\n break;\r\n //Both verb and param are triggered via jquery.load function\r\n case 'verb':\r\n $this->context->smarty->assign('time','verb'); \r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/params/displayConditionVerb.tpl'); \r\n break;\r\n case 'param': \r\n $this->context->smarty->assign('time','param');\r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/params/displayConditionParam.tpl'); \r\n break;\r\n case 'buttons':\r\n $this->context->smarty->assign('time','buttons'); \r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/params/displayConditionButtons.tpl'); \r\n break;\r\n case 'type':\r\n $this->context->smarty->assign('time','type'); \r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/params/displayConditionType.tpl'); \r\n break;\r\n case 'left':\r\n $this->context->smarty->assign('time','left'); \r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/params/displayConditionLeft.tpl'); \r\n break;\r\n case 'right':\r\n $this->context->smarty->assign('time','right'); \r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/params/displayConditionRight.tpl'); \r\n break; \r\n case 'editbuttons':\r\n $this->context->smarty->assign('time','buttons');\r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/params/displayConditionEditButtons.tpl'); \r\n break; \r\n } \r\n return $tpl;\r\n }", "function get_hidden_meta_boxes($screen)\n {\n }", "public function get_clauses()\n {\n }", "function job_career_level_meta() {\n if (get_field('_job_career_level')) {\n echo '<li class=\"meta-field career-level-meta\">';\n echo '<img class=\"icon svg-icon\" src=\"'. esc_url( get_template_directory_uri() .'/images/career-level-icon.svg') .'\" alt=\"'. esc_html__('Career Level', 'capstone') .'\">';\n echo '<label class=\"title\">'. esc_html__('Career Level', 'capstone') .':</label>';\n echo '<span class=\"value\">'. wp_kses_post(get_post_meta(get_the_ID(), '_job_career_level', true)) .'</span>';\n echo '</li>';\n }\n }", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "public static function info_box() {\n\t\t\t\n\t\t\tglobal $post;\n\t\t\t\n\t\t\t$ptype = get_post_meta($post->ID, 'post_dishtype', true );\n\t\t\t\n\t\t\tif(empty($ptype)){\n\t\t\t\t$type0 = 0; \n\t\t\t\t$type1 = 0; \n\t\t\t\t$type2 = 0; \n\t\t\t\t$type3 = 0; \n\t\t\t\t$type4 = 0; \n\t\t\t} else {\n\t\t\t\t$type = explode(\"=\",$ptype);\t\n\t\t\t\t$type0 = $type[0]; \n\t\t\t\t$type1 = $type[1]; \n\t\t\t\t$type2 = $type[2]; \n\t\t\t\t$type3 = $type[3]; \n\t\t\t\t$type4 = $type[4]; \n\t\t\t}\n\t\t\t\n\t\t\t?>\n\t\t\t<div style=\"margin:20px; float;left; min-height:120px;\">\n\n\t\t\t\t\t<div style='float:left; font-size:14px; font-weight:bold; width:100%;'>\n\t\t\t\t\tOverview Type of Dish:</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style='float:left; font-size:14px; margin-left:20px; width:340px;'><div style=\"width:150px; float:left\">1.) New Dish?</div> \n\t\t\t\t\t\t<div style=\"float:left\">\n\t\t\t\t\t\t<label><input type=\"radio\" name=\"new_dish\" value=\"1\" <?php echo ($type0 == true) ? \"checked\":\"\"; ?>>&nbsp;Yes</label>\n\t\t\t\t\t\t<label><input type=\"radio\" name=\"new_dish\" value=\"0\" <?php echo ($type0 == false || empty($type)) ? \"checked\":\"\"; ?>>&nbsp;No</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style='float:left; font-size:14px; margin-left:20px; width:340px;'><div style=\"width:150px; float:left\">2.) Special Dish?</div> \n\t\t\t\t\t\t<div style=\"float:left\">\n\t\t\t\t\t\t<label><input type=\"radio\" name=\"special_dish\" value=\"1\" <?php echo ($type1 == true) ? \"checked\":\"\"; ?>>&nbsp;Yes</label>\n\t\t\t\t\t\t<label><input type=\"radio\" name=\"special_dish\" value=\"0\" <?php echo ($type1 == false || empty($type)) ? \"checked\":\"\"; ?>>&nbsp;No</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style='float:left; font-size:14px; margin-left:20px; width:340px;'><div style=\"width:150px; float:left\">3.) Hot Dish?</div> \n\t\t\t\t\t\t<div style=\"float:left\">\n\t\t\t\t\t\t<label><input type=\"radio\" name=\"hot_dish\" value=\"1\" <?php echo ($type2 == true) ? \"checked\":\"\"; ?>>&nbsp;Yes</label>\n\t\t\t\t\t\t<label><input type=\"radio\" name=\"hot_dish\" value=\"0\" <?php echo ($type2 == false || empty($type)) ? \"checked\":\"\"; ?>>&nbsp;No</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style='float:left; font-size:14px; margin-left:20px; width:340px;'><div style=\"width:150px; float:left\">4.) Spicy Dish?</div> \n\t\t\t\t\t\t<div style=\"float:left\">\n\t\t\t\t\t\t<label><input type=\"radio\" name=\"spicy_dish\" value=\"1\" <?php echo ($type3 == true) ? \"checked\":\"\"; ?>>&nbsp;Yes</label>\n\t\t\t\t\t\t<label><input type=\"radio\" name=\"spicy_dish\" value=\"0\" <?php echo ($type3 == false || empty($type)) ? \"checked\":\"\"; ?>>&nbsp;No</label>\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div style='float:left; font-size:14px; margin-left:20px; width:340px;'><div style=\"width:150px; float:left\">5.) Vegetarian Dish?</div> \n\t\t\t\t\t\t<div style=\"float:left\">\n\t\t\t\t\t\t<label><input type=\"radio\" name=\"vegetarian_dish\" value=\"1\" <?php echo ($type4 == true) ? \"checked\":\"\"; ?>>&nbsp;Yes</label>\n\t\t\t\t\t\t<label><input type=\"radio\" name=\"vegetarian_dish\" value=\"0\" <?php echo ($type4 == false || empty($type)) ? \"checked\":\"\"; ?>>&nbsp;No</label>\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t</div>\n\t\t\n\t\t\t<?php\n\t\t}", "private function showInfo()\n {\n $this->results = array('error' => '');\n $this->countMulticolumnElements();\n $this->findDifferentMCElementConfigs();\n $this->isGridelementsInstalled();\n return $this->returnResults();\n }", "public function manageColumns( $column ){\n global $post; \n if( $this->fields_list[$column] == 'checkbox' && get_post_meta( $post->ID, $column, true) == 1):\n echo \"Yes\";\n else:\n echo __( get_post_meta($post->ID, $column, true) );\n endif;\n }", "function conditionsWizard($arrRecord)\t{\n\t\t$arrTable = $this->getTableCode($arrRecord);\n\t\t$strOutput = $this->wizardHTML($arrTable);\n\t\treturn $strOutput;\n\t}", "function getSearchOptions() {\n\n $tab = array();\n $tab['common'] = __('Characteristics');\n\n $tab[2]['table'] = $this->getTable();\n $tab[2]['field'] = 'id';\n $tab[2]['name'] = __('ID');\n $tab[2]['massiveaction'] = false;\n $tab[2]['datatype'] = 'number';\n\n if (!preg_match('/^itemtype/', static::$itemtype_1)) {\n $tab[3]['table'] = getTableForItemType(static::$itemtype_1);\n $tab[3]['field'] = static::$items_id_1;\n $tab[3]['name'] = call_user_func(array(static::$itemtype_1, 'getTypeName'));\n $tab[3]['datatype'] = 'text';\n $tab[3]['massiveaction'] = false;\n }\n\n if (!preg_match('/^itemtype/', static::$itemtype_2)) {\n $tab[4]['table'] = getTableForItemType(static::$itemtype_2);\n $tab[4]['field'] = static::$items_id_2;\n $tab[4]['name'] = call_user_func(array(static::$itemtype_2, 'getTypeName'));\n $tab[4]['datatype'] = 'text';\n $tab[4]['massiveaction'] = false;\n }\n\n return $tab;\n }", "function _assignment_calculator_conditional_fields() {\r\n $items = array();\r\n\r\n $items[\"node:assignment_template:0\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step10',\r\n 'dependee' => 'field_add_step9',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:1\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step11',\r\n 'dependee' => 'field_add_step10',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:2\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step12',\r\n 'dependee' => 'field_add_step11',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:3\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step13',\r\n 'dependee' => 'field_add_step12',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:4\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step14',\r\n 'dependee' => 'field_add_step13',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:5\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step2',\r\n 'dependee' => 'field_add_step1',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:6\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step3',\r\n 'dependee' => 'field_add_step2',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:7\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step4',\r\n 'dependee' => 'field_add_step3',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:8\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step5',\r\n 'dependee' => 'field_add_step4',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:9\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step6',\r\n 'dependee' => 'field_add_step5',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:10\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step7',\r\n 'dependee' => 'field_add_step6',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:11\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step8',\r\n 'dependee' => 'field_add_step7',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:12\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_add_step9',\r\n 'dependee' => 'field_add_step8',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:13\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete10',\r\n 'dependee' => 'field_add_step9',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:14\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete11',\r\n 'dependee' => 'field_add_step10',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:15\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete12',\r\n 'dependee' => 'field_add_step11',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:16\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete13',\r\n 'dependee' => 'field_add_step12',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:17\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete14',\r\n 'dependee' => 'field_add_step13',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:18\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete15',\r\n 'dependee' => 'field_add_step14',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:19\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete2',\r\n 'dependee' => 'field_add_step1',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:20\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete3',\r\n 'dependee' => 'field_add_step2',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:21\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete4',\r\n 'dependee' => 'field_add_step3',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:22\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete5',\r\n 'dependee' => 'field_add_step4',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:23\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete6',\r\n 'dependee' => 'field_add_step5',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:24\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete7',\r\n 'dependee' => 'field_add_step6',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:25\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete8',\r\n 'dependee' => 'field_add_step7',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:26\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_date_complete9',\r\n 'dependee' => 'field_add_step8',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:27\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage10',\r\n 'dependee' => 'field_add_step9',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:28\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage11',\r\n 'dependee' => 'field_add_step10',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:29\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage12',\r\n 'dependee' => 'field_add_step11',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:30\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage13',\r\n 'dependee' => 'field_add_step12',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:31\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage14',\r\n 'dependee' => 'field_add_step13',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:32\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage15',\r\n 'dependee' => 'field_add_step14',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:33\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage2',\r\n 'dependee' => 'field_add_step1',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:34\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage3',\r\n 'dependee' => 'field_add_step2',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:35\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage4',\r\n 'dependee' => 'field_add_step3',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:36\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage5',\r\n 'dependee' => 'field_add_step4',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:37\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage6',\r\n 'dependee' => 'field_add_step5',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:38\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage7',\r\n 'dependee' => 'field_add_step6',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:39\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage8',\r\n 'dependee' => 'field_add_step7',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:40\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_percentage9',\r\n 'dependee' => 'field_add_step8',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:41\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources10',\r\n 'dependee' => 'field_add_step9',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:42\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources11',\r\n 'dependee' => 'field_add_step10',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:43\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources12',\r\n 'dependee' => 'field_add_step11',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:44\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources13',\r\n 'dependee' => 'field_add_step12',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:45\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources14',\r\n 'dependee' => 'field_add_step13',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:46\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources15',\r\n 'dependee' => 'field_add_step14',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:47\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources2',\r\n 'dependee' => 'field_add_step1',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:48\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources3',\r\n 'dependee' => 'field_add_step2',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:49\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources4',\r\n 'dependee' => 'field_add_step3',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:50\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources5',\r\n 'dependee' => 'field_add_step4',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:51\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources6',\r\n 'dependee' => 'field_add_step5',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:52\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources7',\r\n 'dependee' => 'field_add_step6',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:53\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources8',\r\n 'dependee' => 'field_add_step7',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:54\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_resources9',\r\n 'dependee' => 'field_add_step8',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:55\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title10',\r\n 'dependee' => 'field_add_step9',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:56\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title11',\r\n 'dependee' => 'field_add_step10',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:57\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title12',\r\n 'dependee' => 'field_add_step11',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:58\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title13',\r\n 'dependee' => 'field_add_step12',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:59\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title14',\r\n 'dependee' => 'field_add_step13',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:60\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title15',\r\n 'dependee' => 'field_add_step14',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:61\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title2',\r\n 'dependee' => 'field_add_step1',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:62\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title3',\r\n 'dependee' => 'field_add_step2',\r\n 'options' => array(\r\n 'state' => 'visible',\r\n 'condition' => 'checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:63\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title4',\r\n 'dependee' => 'field_add_step3',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:64\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title5',\r\n 'dependee' => 'field_add_step4',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:65\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title6',\r\n 'dependee' => 'field_add_step5',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:66\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title7',\r\n 'dependee' => 'field_add_step6',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:67\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title8',\r\n 'dependee' => 'field_add_step7',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n $items[\"node:assignment_template:68\"] = array(\r\n 'entity' => 'node',\r\n 'bundle' => 'assignment_template',\r\n 'dependent' => 'field_step_title9',\r\n 'dependee' => 'field_add_step8',\r\n 'options' => array(\r\n 'state' => '!visible',\r\n 'condition' => '!checked',\r\n 'grouping' => 'AND',\r\n 'effect' => 'show',\r\n 'effect_options' => array(),\r\n 'element_view' => array(\r\n 1 => 1,\r\n 2 => 0,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 'element_view_per_role' => 0,\r\n 'element_view_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 2 => 2,\r\n 5 => 0,\r\n 3 => 0,\r\n 4 => 0,\r\n ),\r\n ),\r\n 'element_edit' => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 'element_edit_per_role' => 0,\r\n 'element_edit_roles' => array(\r\n 3 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 34 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 80 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 81 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 69 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 88 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 82 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 83 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 84 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 85 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 86 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 4 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 5 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 68 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 70 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 72 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 73 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 78 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 71 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 74 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 75 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 76 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 77 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 2 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 1 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 89 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 90 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 91 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n 92 => array(\r\n 1 => 1,\r\n 3 => 0,\r\n ),\r\n ),\r\n 'selector' => '',\r\n 'values_set' => 1,\r\n 'value' => array(),\r\n 'values' => array(),\r\n 'value_form' => array(),\r\n ),\r\n );\r\n\r\n return $items;\r\n}", "function showTerms(){\n \t$html = '';\n\n \tif($this->show_terms){\n\t\t \tif($this->check_terms) $text = '<input id=\"wz_terms\" type=\"checkbox\" class=\"inputbox\" value=\"0\" name=\"terms_condition\" checked=\"checked\"/>';\n\t\t \telse $text = '<input id=\"wz_terms\" type=\"checkbox\" class=\"inputbox\" value=\"0\" name=\"terms_condition\" />';\n\n\t\t\t\tif(!empty($this->terms_condition) OR !empty($this->terms_condition)) $text .= '<a href=\"'.$this->terms_condition.'\" TARGET=\"_NEW\"> '._JNEWS_TERMS_CONDITIONS.'</a>';\n\t\t\t\telse $text .= _JNEWS_TERMS_CONDITIONS;\n\n\t\t\t\t$html .= jnews::printLine($this->linear, $text);\n\t\t }\n\n \treturn $html;\n }", "function metabox_prio() {\n return 'low';\n }", "static function metabox($post){\n\t\twp_nonce_field( 'flat-options', 'flat-options_nonce' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\techo '<style>';\n\t\techo '.admin-meta-input{display:block; margin-top: 10px;}';\n\t\techo 'div.field-holder{display: block;float: left; margin: 10px 20px; height: 80px;}';\n\t\techo '.field-block{display: inline-block;clear: both;float: none;}';\n\t\techo '.postbox .inside .field-block h2{padding: 8px 12px;font-weight: 600;font-size: 18px;margin: 0;line-height: 1.4}';\n\t\techo '</style>';\n\t\t\t\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Licitálással kapcsolatos adatok</h2>';\n\t\tforeach ($fieldblocks['licit'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Hely adatok</h2>';\n\t\tforeach ($fieldblocks['location'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlan adatok és településrendezési előírások</h2>';\n\t\tforeach ($fieldblocks['parameters'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlanjogi jellemzők</h2>';\n\t\tforeach ($fieldblocks['info'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Közművek, energiaellátás, telekommunikáció</h2>';\n\t\tforeach ($fieldblocks['sources'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\n\t\t\t\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Építmény (épület) jellemzői</h2>';\n\t\tforeach ($fieldblocks['building'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\techo \"\n\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('.datepicker').datepicker();\t\n\t\t\t\t});\t\n\t\t\t</script>\t\n\t\t\";\n\t\t\n\t\techo '<br clear=\"all\">';\n\t\t\n }", "public function CltvoDisplayMetabox( $object ){ ?>\n <?php for ($i=0; $i < 2; $i++): ?>\n <div style=\"display: inline-block; width:48%; margin-right: 2%\">\n <p><label>Texto:</label></p>\n <textarea class=\"\" style=\"width:100%;\" name='<?php echo \"$this->meta_key[$i][texto]\";?>'><?php echo $this->meta_value[$i]['texto'];?></textarea>\n </div><div style=\"display: inline-block; width:48%; margin-right: 2%\">\n <p><label>Código de botón de PayPal:</label></p>\n <textarea class=\"\" style=\"width:100%;\" name='<?php echo \"$this->meta_key[$i][boton]\";?>'><?php echo $this->meta_value[$i]['boton'];?></textarea>\n </div>\n <?php endfor; ?>\n\n <?php\n\t}", "public function filterElementInputMmd($components, $args)\n {\n $db = get_db();\n \n $element = $args['element'];\n $record = $args['record'];\n $elementName = $element->name;\n $elementId = $element->id;\n $recordId = $record->id;\n $index = $args['index'];\n\t\t$mmdManualTypes = array( \"Disputed\" => \"disputed\", \n \"Erroneous\" =>\"erroneous\");\n $mmdBoxOptions = $db->getTable('MetaMetaData')->findMetaMetaDataByItem($args); #retrieve the metadata for this item\n if (!$mmdBoxOptions){\n $mmdBoxOptions[\"generated\"] = 0;\n $mmdBoxOptions[\"disputed\"] = 0;\n $mmdBoxOptions[\"erroneous\"] = 0;\n }\n# $mmdBoxOptions = array( \"disputed\" => 0 , \"generated\" => 1, \"proofread\" =>1, \"erroneous\" => 0, \"confidence\" => \"0.6\");\n $addHtml = \"<div class='metametadata' style='background-color:lightgray;'>\";\n if ($mmdBoxOptions[\"generated\"] == 1){\n $checked = ($mmdBoxOptions[\"proofread\"] == 1) ? \"checked\": \"\";\n $addHtml .= \"<span class='deprecated' style='font-size=6; color:red;'>Computer generated: \".$mmdBoxOptions[\"generated_confidence_value\"].\"</span> - \";\n $addHtml .= \"Proofread: \";\n $addHtml .= \"<input type='checkbox' name='metametadata[$elementId][$index][proofread]' id='metametadata-$recordId-$elementName-proofread' $checked><br>\";\n }\n foreach($mmdManualTypes as $mmdType => $lowercaseType){\n $checked = ($mmdBoxOptions[$lowercaseType] == 1) ? \"checked\": \"\";\n $addHtml .= \"<b>$mmdType: </b>\";\n $addHtml .= \"<input type='checkbox' name='metametadata[$elementId][$index][$lowercaseType]' id='metametadata-$recordId-$elementName-$lowercaseType' $checked>\";\n $addHtml .= \" &nbsp&nbsp&nbsp \";\n }\n $addHtml .= \"</div>\";\n\n\t\t$components['input'] = $components['input'] . $addHtml; \t\t\t\t#here the original input should be put. \n if ((boolean)get_option('show_html_box_on_forms')) {$components['html_checkbox'] = false;}\n \n return $components;\n }", "public function get_options(&$mform) {\n global $DB;\n $none = false;\n $availablebadges = null;\n\n $mform->addElement('header', 'first_header', $this->get_title());\n $mform->addHelpButton('first_header', 'criteria_' . $this->criteriatype, 'badges');\n\n // Determine if this badge is a course badge or a site badge.\n $thisbadge = $DB->get_record('badge', array('id' => $this->badgeid));\n\n if ($thisbadge->type == BADGE_TYPE_SITE) {\n // Only list site badges that are enabled.\n $select = \" type = :site AND (status = :status1 OR status = :status2)\";\n $params = array('site' => BADGE_TYPE_SITE,\n 'status1' => BADGE_STATUS_ACTIVE,\n 'status2' => BADGE_STATUS_ACTIVE_LOCKED);\n $availablebadges = $DB->get_records_select_menu('badge', $select, $params, 'name ASC', 'id, name');\n\n } else if ($thisbadge->type == BADGE_TYPE_COURSE) {\n // List both site badges and course badges belonging to this course.\n $select = \" (type = :site OR (type = :course AND courseid = :courseid)) AND (status = :status1 OR status = :status2)\";\n $params = array('site' => BADGE_TYPE_SITE,\n 'course' => BADGE_TYPE_COURSE,\n 'courseid' => $thisbadge->courseid,\n 'status1' => BADGE_STATUS_ACTIVE,\n 'status2' => BADGE_STATUS_ACTIVE_LOCKED);\n $availablebadges = $DB->get_records_select_menu('badge', $select, $params, 'name ASC', 'id, name');\n }\n if (!empty($availablebadges)) {\n $select = array();\n $selected = array();\n foreach ($availablebadges as $bid => $badgename) {\n if ($bid != $this->badgeid) {\n // Do not let it use itself as criteria.\n $select[$bid] = format_string($badgename, true);\n }\n }\n\n if ($this->id !== 0) {\n $selected = array_keys($this->params);\n }\n $settings = array('multiple' => 'multiple', 'size' => 20, 'class' => 'selectbadge', 'required' => 'required');\n $mform->addElement('select', 'badge_badges', get_string('addbadge', 'badges'), $select, $settings);\n $mform->addRule('badge_badges', get_string('requiredbadge', 'badges'), 'required');\n $mform->addHelpButton('badge_badges', 'addbadge', 'badges');\n\n if ($this->id !== 0) {\n $mform->setDefault('badge_badges', $selected);\n }\n } else {\n $mform->addElement('static', 'nobadges', '', get_string('error:nobadges', 'badges'));\n $none = true;\n }\n\n // Add aggregation.\n if (!$none) {\n $mform->addElement('header', 'aggregation', get_string('method', 'badges'));\n $agg = array();\n $agg[] =& $mform->createElement('radio', 'agg', '', get_string('allmethodbadges', 'badges'), 1);\n $agg[] =& $mform->createElement('radio', 'agg', '', get_string('anymethodbadges', 'badges'), 2);\n $mform->addGroup($agg, 'methodgr', '', array('<br/>'), false);\n if ($this->id !== 0) {\n $mform->setDefault('agg', $this->method);\n } else {\n $mform->setDefault('agg', BADGE_CRITERIA_AGGREGATION_ANY);\n }\n }\n\n return array($none, get_string('noparamstoadd', 'badges'));\n }", "private function ts_getCondition()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n $tableField = $this->curr_tableField;\n\n // Get TS configuration array\n $conf_name = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'condition' ];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'condition.' ];\n\n // RETURN true: any condition isn't defined\n if ( empty( $conf_name ) )\n {\n if ( $this->pObj->b_drs_filter )\n {\n $prompt = $tableField . ' hasn\\'t any condition. Filter will displayed.';\n t3lib_div :: devLog( '[INFO/FILTER] ' . $prompt, $this->pObj->extKey, 0 );\n }\n return true;\n }\n // RETURN true: any condition isn't defined\n // Get condition result\n $value = $this->pObj->cObj->cObjGetSingle( $conf_name, $conf_array );\n switch ( $value )\n {\n case( false ):\n $bool_condition = false;\n if ( $this->pObj->b_drs_filter )\n {\n $prompt = 'Condition of ' . $tableField . ' is false. Filter won\\'t displayed.';\n t3lib_div :: devLog( '[INFO/FILTER] ' . $prompt, $this->pObj->extKey, 0 );\n }\n break;\n case( true ):\n default;\n $bool_condition = true;\n if ( $this->pObj->b_drs_filter )\n {\n $prompt = 'Condition of ' . $tableField . ' is true. Filter will displayed.';\n t3lib_div :: devLog( '[INFO/FILTER] ' . $prompt, $this->pObj->extKey, 0 );\n }\n break;\n }\n // Get condition result\n // RETURN condition result\n return $bool_condition;\n }", "public function conditionStringDataProvider() {}", "function _voicemail_status_field_defintion() {\n return array (\n 'field_name' => VOICEMAIL_STATUS_FIELD_NAME,\n 'type_name' => 'story',\n 'display_settings' =>\n array (\n 'label' =>\n array (\n 'format' => 'above',\n 'exclude' => 0,\n ),\n 'teaser' =>\n array (\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'full' =>\n array (\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 4 =>\n array (\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'token' =>\n array (\n 'format' => 'default',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'number_integer',\n 'required' => '1',\n 'multiple' => '0',\n 'db_storage' => '1',\n 'module' => 'number',\n 'active' => '1',\n 'locked' => '0',\n 'columns' =>\n array (\n 'value' =>\n array (\n 'type' => 'int',\n 'not null' => false,\n 'sortable' => true,\n ),\n ),\n 'prefix' => '',\n 'suffix' => '',\n 'min' => '0',\n 'max' => '1',\n 'allowed_values' => '1|Yes\n 0|No',\n 'allowed_values_php' => '',\n 'widget' =>\n array (\n 'default_value' =>\n array (\n 0 =>\n array (\n 'value' => '0',\n ),\n ),\n 'default_value_php' => NULL,\n 'label' => 'Voicemail box status',\n 'weight' => '4',\n 'description' => '',\n 'type' => 'optionwidgets_buttons',\n 'module' => 'optionwidgets',\n ),\n );\n}", "public function getGroupsOptions()\n {\n return array(\n 'compulsory' => array(\n array('name' => 'Run Subtitle Spell Check before delivery', 'description' => 'Run Subtitle Spell Check before delivery', 'notice' => 'STOPPER'),\n array('name' => 'Run Subtitle Quality Check (SQC) before delivery', 'description' => 'Run Subtitle Quality Check (SQC) before delivery', 'notice' => 'STOPPER'),\n array('name' => 'Identical Narrative as in English template found', 'description' => 'When the text in the translate file is identical to the English template', 'notice' => 'STOPPER'),\n array('name' => 'Allow Empty Boxes', 'description' => 'Allow users to deliver file with empty boxes (boxes not containing any text)', 'notice' => 'STOPPER'),\n array('name' => 'Maximum Lines Per Box', 'description' => 'The maximum lines allowed in one box', 'notice' => 'STOPPER'),\n array('name' => 'Maximum Characters Per Line (Horizontal, Vertical)', 'description' => 'The maximum number of characters allowed per (horizontal, vertical) line', 'notice' => 'STOPPER'),\n array('name' => 'Main Title tag required', 'description' => 'The main title has not been tagged with a Main Title tag', 'notice' => 'STOPPER'),\n array('name' => 'Non-standard apostrophe used at position (pos)', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'English template revision not acknowledged', 'description' => 'English template revision is not reviewed by a language user by clicking on the blinking red alarm clock', 'notice' => 'STOPPER'),\n array('name' => 'Minimum Box Duration', 'description' => 'The shortest duration allowed for a box. In frames or seconds', 'notice' => 'STOPPER'),\n array('name' => 'Maximum Box Duration', 'description' => 'The longest duration allowed for a box. In frames or seconds', 'notice' => 'STOPPER'),\n array('name' => 'Allow Box Overlap', 'description' => 'Allow users to deliver overlapping boxes', 'notice' => 'STOPPER'),\n array('name' => 'Floating captions found', 'description' => 'Allow caption to touch top or bottom', 'notice' => 'STOPPER'),\n array('name' => 'Teletext Character Set Only', 'description' => 'This is a special requirement for teletext deliveries as this format has restrictions on the characters allowed', 'notice' => 'STOPPER'),\n array('name' => 'Box start time is equal / exceeds its end time', 'description' => 'Timing discrepancy when a file has been imported into the system where the start timecode of a box can be greater than the end timecode of the box', 'notice' => 'STOPPER'),\n array('name' => 'Chapter stop overlaps with subtitle', 'description' => '', 'notice' => 'STOPPER'),\n ),\n \n 'spec' => array(\n array('name' => 'Maximum Lines Per Box', 'description' => 'The maximum lines allowed in one box', 'notice' => 'STOPPER'),\n array('name' => 'Minimum Frame Gap Between Boxes', 'description' => 'Minimal gap allowed between boxes. In frames or seconds', 'notice' => 'STOPPER'),\n array('name' => 'Frame gap violation between consecutive boxes found', 'description' => 'This puts restrictions on the frame gaps allowed between boxes. This is meant to disallow small gaps (under 1 second) between consecutive boxes, a special requirement. Example: 3f;1s mean that gap >= 3 frames and < 1 second not allowed', 'notice' => 'STOPPER'),\n array('name' => 'Allow Italics', 'description' => 'Are italics allowed?', 'notice' => 'STOPPER'),\n array('name' => 'Forced', 'description' => 'Allow Burned-in tag?', 'notice' => 'STOPPER'),\n array('name' => 'Only one sentence per box is allowed', 'description' => 'Only one sentence per subtitle is permitted', 'notice' => 'STOPPER'),\n array('name' => 'Text-heavy box found', 'description' => 'When too much text is present in a box as opposed to the box duration, readability gets affected', 'notice' => 'STOPPER'),\n ),\n \n 'compliance' => array(\n array('name' => 'Rating Allowed', 'description' => 'Is a rating allowed?', 'notice' => 'STOPPER'),\n array('name' => 'Translator Credit Allowed', 'description' => 'Is the translator credit allowed?', 'notice' => 'STOPPER'),\n array('name' => 'Disallowed characters found at start of subtitle', 'description' => 'Subtitle cannot start with any of the entered chars. Input chars as a string, without separators', 'notice' => 'STOPPER'),\n ),\n \n 'special' => array(\n array('name' => 'Allowable unedited auto-translation limit', 'description' => 'This special limit is set for translate jobs to define maximum allowable unedited auto translation in percents', 'notice' => 'STOPPER'),\n array('name' => 'Consecutive text-heavy 2-line subtitle found', 'description' => 'The maximum number of consecutive 2 line subs. Should be more than 1 or Disabled(-1). This is special requirement meant to discourage consecutive text heavy boxes', 'notice' => 'STOPPER'),\n array('name' => 'Space After Hypens Between Words', 'description' => 'Checks for space after or before a hyphen between two words. This is meant for a specific captioning requirement', 'notice' => 'STOPPER'),\n array('name' => 'Do Not Allow \"#\" Symbol', 'description' => 'This prevents users from delivering a file containing the pound symbol. This is a special requirement by some clients or file types', 'notice' => 'STOPPER'),\n array('name' => 'Space After Double Chevron', 'description' => 'Requires a space after a double hyphen. This is meant for specific French captioning requirements', 'notice' => 'STOPPER'),\n array('name' => 'Space After Hyphens', 'description' => 'Set a required space after speaker hyphen. This is meant for a specific captioning requirement', 'notice' => 'STOPPER'),\n array('name' => 'Speaker Hyphens style', 'description' => 'Set a required speaker hyphen style. This is meant for a specific captioning requirement', 'notice' => 'STOPPER'),\n array('name' => 'Disallowed characters found in subtitle', 'description' => 'Subtitle cannot contain any of entered chars. Input chars as a string, without separators', 'notice' => 'STOPPER'),\n array('name' => 'Text contains invalid XML characters', 'description' => '', 'notice' => 'STOPPER'),\n ),\n \n 'captions' => array(\n array('name' => 'Allow 32 Character Lines With Italics', 'description' => 'Is it possible to add 32 character line with italics?', 'notice' => 'STOPPER'),\n array('name' => 'Sound Cue Format', 'description' => 'Examples: \"[music]\", \"(MUSIC)\", ...', 'notice' => 'STOPPER'),\n ),\n \n 'other' => array( \n array('name' => 'Possible acronym should be written without periods and spaces', 'description' => '', 'notice' => 'NOTICE'),\n array('name' => 'Possible acronym should be written without accents', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Semicolon should be removed', 'description' => 'This is one of the SDH system checks only for LAS language', 'notice' => 'STOPPER'),\n array('name' => 'Continuity ellipsis at the end of the box should be removed', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Extra punctuation found', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Double quotation marks should be written without spaces', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Period should be written after a closing quote', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Song box should be fully italicized', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Song box punctuation: only question and exclamation marks allowed at the end of line', 'description' => '', 'notice' => 'STOPPER'), \n array('name' => 'Song box is not translated. Please OMIT box because translation is not required', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Unallowable forward slash in dialog', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'HBO prohibited words', 'description' => 'Prevents the user from delivering a file containing some predefined words: \"A Em Por\", \"Até Entre Porém\", \"Ao Entretanto Quando\", \"Após Lhe Que\", \"Com Uma Se\", \"Como Me Sem\", \"Contudo Nos Sob\", \"Da O Sobre\", \"De Ou Te\", \"Desde Para Todavia\", \"Do Perante Vos\", \"E Pois\". This is a special requirement by some clients or file types', 'notice' => 'STOPPER'),\n array('name' => 'Do Not Allow \"$\" At The Beginning Of Sentence', 'description' => 'This prevents users from delivering a file containing the \"$\" symbol. This is a special requirement by some clients or file types', 'notice' => 'STOPPER'),\n array('name' => 'Positioning not allowed for this overlapped subtitle', 'description' => 'Positioning not allowed for particular overlapped subtitle. (For Japanese only)', 'notice' => 'STOPPER'),\n array('name' => 'Text casing does not match source', 'description' => '', 'notice' => 'NOTICE'),\n array('name' => 'Acceptance suggestion is unresolved', 'description' => 'Flagged for all boxes which are not accepted or declined by the QAer', 'notice' => 'STOPPER'),\n array('name' => 'Text alignment not permitted as per spec', 'description' => 'When text alignment does not match what is in the delivery specs', 'notice' => 'STOPPER'),\n array('name' => 'BRP Disallowed End Words', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'BRP Disallowed Start Words', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Text found on the first cell of the first gridline', 'description' => 'Text resting on the first cell of the first gridline.(i.e. position 0,0) (For CC mode only)', 'notice' => 'NOTICE'),\n array('name' => 'File should contain an EMPTY first box', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Single quaver box should be min 5 secs long and have min 1 sec gap after it', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Italics or Underline found within word', 'description' => 'When italics or underline tags are found inside words. (For CC mode only)', 'notice' => 'STOPPER'), \n array('name' => 'Enter some note for the box with error type: Translation (objective/subjective)', 'description' => 'It forces a QA user to input a note if box error type is Translation: objective/subjective. (For Netflix client only)', 'notice' => 'STOPPER'),\n array('name' => 'Incorrect text formatting (&#60;HTML&#62;|&#60;P&#62;)', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Alignment / Positioning does not match source', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Box should be removed (omitted) according to the \"Texted\" delivery format', 'description' => '', 'notice' => 'NOTICE'),\n array('name' => 'Stand-alone punctuation present', 'description' => 'When any box in a file has only punctuation and no text in it', 'notice' => 'STOPPER'),\n array('name' => 'Double space found at line #(number)', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Error type is not chosen', 'description' => 'When a QAer makes a change but does not select an error category', 'notice' => 'STOPPER'),\n ),\n );\n }", "public function getTabLabel()\r\n {\r\n return Mage::helper('attributeSplash')->__('Conditions');\r\n }", "function displayOptions($n,$pos,$limit,$order,$brand,$pattern,$category,$recent,$searchCategory,$searchItem,$nResults,$monogram){\n\tglobal $borderClass;\n\n $so=\"<div class=\\\"row tableHead $borderClass[$category]\\\" id=\\\"searchResultsOptions\\\">\n \t\t<form name=\\\"searchValues\\\" id=\\\"searchVariables\\\">\n <input type=\\\"hidden\\\" name=\\\"searchCategory\\\" value=\\\"$searchCategory\\\">\n <input type=\\\"hidden\\\" name=\\\"category\\\" value=\\\"$category\\\">\n <input type=\\\"hidden\\\" name=\\\"template\\\" value=\\\"$template\\\">\n <input type=\\\"hidden\\\" name=\\\"searchItem\\\" value=\\\"$searchItem\\\" id=\\\"item\\\">\n <input type=\\\"hidden\\\" name=\\\"recent\\\" value=\\\"$recent\\\">\n <input type=\\\"hidden\\\" name=\\\"brand\\\" value=\\\"$brand\\\">\n <input type=\\\"hidden\\\" name=\\\"pattern\\\" value=\\\"$pattern\\\">\n <input type=\\\"hidden\\\" name=\\\"pos\\\" value=\\\"$pos\\\">\n <input type=\\\"hidden\\\" name=\\\"order\\\" value=\\\"$order\\\">\n <input type=\\\"hidden\\\" name=\\\"gift\\\" value=\\\"$gift\\\">\n <input type=\\\"hidden\\\" name=\\\"limit\\\" value=\\\"$limit\\\">\n <input type=\\\"hidden\\\" id=\\\"results\\\" name=\\\"nResults\\\" value=\\\"$nResults\\\">\n <input type=\\\"hidden\\\" name=\\\"monogram\\\" value=\\\"$monogram\\\">\n \n <div class=\\\"cell twoColumns middleAlign\\\">\n \t<strong>$n results</strong>\n </div>\";\n \n //add 'Now showing n of N\n $so.=\"<div class=\\\"cell fourColumns middleAlign\\\" id=\\\"searchResultsPosition\\\">\n Now Showing $pos - \".(($pos+$limit-1>$n)?$n:$pos+$limit-1).\"\n </div>\n <div class=\\\"cell twoColumns middleAlign\\\">Sort by:</div>\n\t <div class=\\\"cell fourColumns middleAlign\\\">\n <select id=\\\"resultsOrder\\\" class=\\\"searchSort\\\" onchange=\\\"sortResults('$category','$brand','$pattern','$recent','$searchCategory','$item','$itemname','$pos','$limit');\\\">\n <option value=\\\"category,item,pattern,brand\\\" \".(($order==\"item,pattern,brand\")?\"selected\":\"\").\">Item A to Z</option>\n <option value=\\\"category,item DESC,pattern,brand\\\" \".(($order==\"item,pattern,brand\")?\"selected\":\"\").\">Item Z to A</option>\n <option value=\\\"pattern,brand,category,item\\\" \".(($order==\"pattern,brand,item\")?\"selected\":\"\").\">Pattern</option>\n <option value=\\\"brand,pattern,category,item\\\" \".(($order==\"brand,pattern,item\")?\"selected\":\"\").\">Manufacturer</option>\n <option value=\\\"dimension,pattern,brand\\\"\".(($order==\"dimension,pattern,brand\")?\"selected\":\"\").\">Dimensions</option>\n <option value=\\\"retail ASC\\\" \".(($order==\"retail ASC pattern,brand,category,item\")?\"selected\":\"\").\">Price: Low to High</option>\n <option value=\\\"retail DESC\\\" \".(($order==\"retail DESC,pattern,brand,category,item\")?\"selected\":\"\").\">Price: High to Low</option>\n </select> \n </div>\";\n \n \nif($n>10){\n \n $so.=\"<div class=\\\"cell threeColumns rightAlign middleAlign\\\">\n <select class=\\\"searchSort\\\" id=\\\"displayNResults\\\" name=\\\"limit\\\" onChange=\\\"changeDisplayLimit('$category','$brand','$pattern','$recent','$searchCategory','$item','$itemname','0');\\\">\n <option value=\\\"10\\\" \". (($limit==10)?'':'').\">Display 10 Items\n <option value=\\\"50\\\" \". (($limit==50)?'':'').\">Display 50 Items\n <option value=\\\"100\\\" selected \". (($limit==100)?'':'').\">Display 100 Items\n </select>\n </div>\";\n }\n\n else{\n \t$so.=\"<div class=\\\"cell threeColumns rightAlign\\\"></div>\";\n \t}\n \n\n$so.=\"</form></div>\";\n\nreturn $so;\n\t\n}", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "public function getTabTitle()\n {\n return Mage::helper('catalogrule')->__('Conditions');\n }", "function print_gather_ua_jobs_tools_meta_boxes( $post, $metabox ) {\n global $gather_ua_jobs_recurrence_intervals;\n\n switch( $metabox[ 'id' ] ) {\n\n // About this Plugin\n case 'gather-ua-jobs-tools-about-mb':\n\n ?><h3 style=\"margin:0;padding:0;\"><?php _e( 'Gathering UA Faculty Jobs', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></h3>\n <p style=\"margin-top: 5px;\"><?php _e( 'This plugin \"gathers\" UA faculty jobs and allows you to be notified via email when jobs containing certain keywords are posted.', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></p>\n <p><?php _e( 'You can also use the gather_ua_faculty_jobs() function to gather the job information and use at will.', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></p>\n\n <h3 style=\"margin:20px 0 0 0;padding:0;\"><?php _e( 'Gathering UA Staff Jobs', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></h3>\n <p style=\"margin-top: 5px;\"><?php printf( __( 'At this point in time, %1$sthis plugin only gathers information for faculty jobs%2$s. The %3$sstaff jobs website%4$s does, however, have the capability to send you job alerts (filtered by keyword or category) via email. You can %5$ssetup UA staff job alerts%6$s on their website.', GATHER_UA_JOBS_TEXT_DOMAIN ), '<strong>', '</strong>', '<a href=\"http://staffjobs.ua.edu/jobAlert.html\" target=\"_blank\">', '</a>', '<a href=\"http://staffjobs.ua.edu/jobAlert.html\" target=\"_blank\">', '</a>' ); ?></p><?php\n\n break;\n\n // Settings\n case 'gather-ua-jobs-tools-settings-mb':\n\n // Get the saved settings\n $saved_settings = get_option( 'gather_ua_jobs_settings', array() );\n\n // Define the settings\n $keywords_setting = isset( $saved_settings ) && isset( $saved_settings[ 'keywords' ] ) ? $saved_settings[ 'keywords' ] : NULL;\n $email_notif_setting = isset( $saved_settings ) && isset( $saved_settings[ 'email_notification' ] ) ? $saved_settings[ 'email_notification' ] : NULL;\n\n // Define the email notification settings\n $email_notif_enabled_setting = isset( $email_notif_setting ) && isset( $email_notif_setting[ 'enabled' ] ) && 0 == strcasecmp( 'yes', $email_notif_setting[ 'enabled' ] ) ? true : false;\n $email_notif_emails_setting = isset( $email_notif_setting ) && isset( $email_notif_setting[ 'emails' ] ) ? $email_notif_setting[ 'emails' ] : NULL;\n $email_notif_recurrence_digit_setting = isset( $email_notif_setting ) && isset( $email_notif_setting[ 'recurrence_digit' ] ) ? $email_notif_setting[ 'recurrence_digit' ] : 1;\n $email_notif_recurrence_interval_setting = isset( $email_notif_setting ) && isset( $email_notif_setting[ 'recurrence_interval' ] ) ? $email_notif_setting[ 'recurrence_interval' ] : 'hours';\n\n ?><form method=\"post\" action=\"options.php\"><?php\n\n // Handle the settings\n settings_fields( 'gather_ua_jobs_settings' );\n\n ?><table class=\"form-table\">\n <tbody>\n <tr>\n <th scope=\"row\"><label for=\"gather-ua-jobs-settings-keywords\"><?php _e( 'Job Keywords', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></label></th>\n <td>\n <input name=\"gather_ua_jobs_settings[keywords]\" type=\"text\" id=\"gather-ua-jobs-settings-keywords\" value=\"<?php echo is_array( $keywords_setting ) ? implode( ', ', $keywords_setting ) : $keywords_setting; ?>\" class=\"regular-text\" />\n <p class=\"description\"><strong><?php _e( 'Separate your keywords with commas.', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></strong> <?php _e( 'These will decide which jobs you\\'d like to view and are highlighted below.', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></p>\n </td>\n </tr>\n <tr>\n <th scope=\"row\"><label for=\"gather-ua-jobs-settings-email-notification-0\"><?php _e( 'Would you like to be notified by email when a job posting matches one of your keywords?', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></label></th>\n <td>\n <fieldset>\n <label><input id=\"gather-ua-jobs-settings-email-notification-0\" name=\"gather_ua_jobs_settings[email_notification][enabled]\" type=\"radio\" value=\"yes\"<?php checked( $email_notif_enabled_setting ); ?> /> <?php _e( 'Yes', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></label> &nbsp;&nbsp;\n <label><input id=\"gather-ua-jobs-settings-email-notification-1\" name=\"gather_ua_jobs_settings[email_notification][enabled]\" type=\"radio\" value=\"\"<?php checked( ! $email_notif_enabled_setting ); ?> /> <?php _e( 'No', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></label>\n </fieldset>\n\n <h4 class=\"subsection-header\"><?php _e( 'To Which Email Address(es)?', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></h4>\n <input name=\"gather_ua_jobs_settings[email_notification][emails]\" type=\"text\" id=\"gather-ua-jobs-settings-email-notification-emails\" value=\"<?php echo is_array( $email_notif_emails_setting ) ? implode( ', ', $email_notif_emails_setting ) : $email_notif_emails_setting; ?>\" class=\"regular-text\" />\n <p class=\"description\"><strong><?php _e( 'Separate your email addresses with commas.', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></strong></p>\n\n <h4 class=\"subsection-header\"><?php _e( 'How Often Would You Like To Check The Jobs?', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></h4>\n <p>Every <input name=\"gather_ua_jobs_settings[email_notification][recurrence_digit]\" type=\"number\" id=\"gather-ua-jobs-settings-email-notification-recurrence-digit\" style=\"width:60px;\" value=\"<?php echo $email_notif_recurrence_digit_setting > 1 ? $email_notif_recurrence_digit_setting : 1; ?>\" class=\"regular-text\" />\n <select name=\"gather_ua_jobs_settings[email_notification][recurrence_interval]\" id=\"gather-ua-jobs-settings-email-notification-recurrence\"><?php\n\n foreach ( $gather_ua_jobs_recurrence_intervals as $interval ) {\n ?><option value=\"<?php echo $interval; ?>\"<?php selected( $interval, $email_notif_recurrence_interval_setting ); ?>><?php _e( ucwords( $interval ), GATHER_UA_JOBS_TEXT_DOMAIN ); ?></option><?php\n }\n\n ?></select></p>\n\n </td>\n </tr>\n <tr>\n <td></td>\n <td style=\"padding-top: 0;\"><?php echo submit_button( __( 'Save Your Settings', GATHER_UA_JOBS_TEXT_DOMAIN ), 'primary', 'save_gather_ua_jobs_settings', false, array( 'id' => 'save-gather-ua-jobs-settings-button' ) ); ?></td>\n </tr>\n </tbody>\n </table>\n\n </form><?php\n\n break;\n\n // Faculty Jobs\n case 'gather-ua-jobs-tools-faculty-jobs-mb':\n\n // Get the saved settings\n $saved_settings = get_option( 'gather_ua_jobs_settings', array() );\n\n // Define the settings\n $keywords_setting = isset( $saved_settings ) && isset( $saved_settings[ 'keywords' ] ) ? $saved_settings[ 'keywords' ] : NULL;\n\n // Have the faculty jobs been refreshed?\n $faculty_jobs_refreshed = isset( $_GET[ 'faculty-jobs-refreshed' ] ) && $_GET[ 'faculty-jobs-refreshed' ] ? true : false;\n\n // Print the \"Refresh List\" button\n ?><a class=\"refresh-button button button-secondary\" href=\"<?php echo add_query_arg( array( 'page' => 'gather-ua-jobs', 'refresh-faculty-jobs-feed' => 1 ), admin_url( 'tools.php' ) ); ?>\"><?php _e( 'Refresh List', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></a><?php\n\n // If we just refreshed the list...\n if ( $faculty_jobs_refreshed ) {\n\n // If refreshed, this will highlight the area\n ?><style type=\"text/css\">\n #gather-ua-jobs-tools-faculty-jobs-mb {\n background-color: #009f3f;\n -webkit-animation: fadeToWhite 1s forwards;\n -moz-animation: fadeToWhite 1s forwards;\n -ms-animation: fadeToWhite 1s forwards;\n -o-animation: fadeToWhite 1s forwards;\n animation: fadeToWhite 1s forwards;\n }\n @keyframes fadeToWhite {\n to { background-color: #fff; }\n }\n @-webkit-keyframes fadeToWhite {\n to { background-color: #fff; }\n }\n @-moz-keyframes fadeToWhite {\n to { background-color: #fff; }\n }\n\n @-o-keyframes fadeToWhite {\n to { background-color: #fff; }\n }\n @-ms-keyframes fadeToWhite {\n to { background-color: #fff; }\n }\n </style>\n\n <p class=\"refreshed-message\"><strong><?php _e( 'The faculty jobs list has been refreshed.', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></strong></p><?php\n\n }\n\n ?><p><?php _e( 'If you have provided keywords, jobs that include those keywords will be listed, and highlighted, at the top.', GATHER_UA_JOBS_TEXT_DOMAIN ); ?></p><?php\n\n // Print the faculty jobs from the feed\n print_ua_faculty_jobs( array( 'keywords' => $keywords_setting ) );\n\n break;\n\n }\n\n}", "function wa_wcc_hide_if_empty(){\n\t\techo '\n\t\t<div id=\"wa_wcc_hide_if_empty\" class=\"wplikebtns\">';\n\n\t\tforeach($this->choices as $val => $trans)\n\t\t{\n\t\t\techo '\n\t\t\t<input id=\"rll-galleries-'.$val.'\" type=\"radio\" name=\"wa_wcc_settings[hide_if_empty]\" value=\"'.esc_attr($val).'\" '.checked(($val === 'yes' ? TRUE : FALSE), $this->options['settings']['hide_if_empty'], FALSE).' />\n\t\t\t<label for=\"rll-galleries-'.$val.'\">'.$trans.'</label>';\n\t\t}\n\n\t\techo '</div>';\n\t}", "protected function condition() {\n\t\treturn apply_filters( 'appthemes_html_term_description_condition', true, $this->get_current_taxonomy() );\n\t}", "public function canShow()\r\n {\r\n return count($this->getTermAndConditions());\r\n }", "function filtering_menus()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\n\t\t// In order to build our filtering options we need to gather \n\t\t// all the channels, categories and custom statuses\n\n\t\t$channel_array\t= array();\n\t\t$status_array = array();\n\t\t\n\t\t$this->api->instantiate('channel_categories');\n\n\t\t$allowed_channels = $this->functions->fetch_assigned_channels(TRUE);\n\n\t\tif (count($allowed_channels) > 0)\n\t\t{\n\t\t\t// Fetch channel titles\n\t\t\t$this->db->select('channel_title, channel_id, cat_group, status_group, field_group');\n\t\t\t$this->db->where_in('channel_id', $allowed_channels);\n\t\t\t$this->db->where('site_id', $this->config->item('site_id'));\n\t\t\t\n\t\t\t$this->db->order_by('channel_title');\n\t\t\t$query = $this->db->get('channels');\n\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$channel_array[$row['channel_id']] = array(str_replace('\"','',$row['channel_title']), $row['cat_group'], $row['status_group'], $row['field_group']);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t/** ----------------------------- \n\t\t/** Category Tree\n\t\t/** -----------------------------*/\n\t\t\n\t\t$order = ($this->nest_categories == 'y') ? 'group_id, parent_id, cat_name' : 'cat_name';\n\n\t\t$this->db->select('categories.group_id, categories.parent_id, categories.cat_id, categories.cat_name');\n\t\t$this->db->from('categories');\n\t\t$this->db->where('site_id', $this->config->item('site_id'));\n\t\t$this->db->order_by($order);\n\t\t\n\t\t$query = $this->db->get();\n\n\t\t// Load the text helper\n\t\t$this->load->helper('text');\n\t\t\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$categories[] = array($row['group_id'], $row['cat_id'], entities_to_ascii($row['cat_name']), $row['parent_id']);\n\t\t\t}\n\n\t\t\tif ($this->nest_categories == 'y')\n\t\t\t{\n\t\t\t\tforeach($categories as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif (0 == $val['3']) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->api_channel_categories->cat_array[] = array($val['0'], $val['1'], $val['2']);\n\t\t\t\t\t\t$this->api_channel_categories->category_edit_subtree($val['1'], $categories, $depth=1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->api_channel_categories->cat_array = $categories;\n\t\t\t}\n\t\t} \n\t\t \n\t\t/** ----------------------------- \n\t\t/** Entry Statuses\n\t\t/** -----------------------------*/\n\t\t\n\t\t$this->db->select('group_id, status');\n\t\t$this->db->where('site_id', $this->config->item('site_id'));\t\t\n\t\t$this->db->order_by('status_order');\n\t\t$query = $this->db->get('statuses');\n\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$status_array[] = array($row['group_id'], $row['status']);\n\t\t\t}\n\t\t}\n\n\t\t$default_cats[] = array('', $this->lang->line('filter_by_category'));\n\t\t$default_cats[] = array('all', $this->lang->line('all'));\n\t\t$default_cats[] = array('none', $this->lang->line('none'));\t\t\n\t\t\n\t\t$dstatuses[] = array('', $this->lang->line('filter_by_status'));\n\t\t$dstatuses[] = array('open', $this->lang->line('open'));\n\t\t$dstatuses[] = array('closed', $this->lang->line('closed'));\n\n\t\t$channel_info['0']['categories'] = $default_cats;\t\t\n\t\t$channel_info['0']['statuses'] = $dstatuses;\n\n\t\tforeach ($channel_array as $key => $val)\n\t\t{\n\t\t\t$any = 0;\n\t\t\t$cats = $default_cats;\n\t\n\t\t\tif (count($this->api_channel_categories->cat_array) > 0)\n\t\t\t{\n\t\t\t\t$last_group = 0;\n\t\t\n\t\t\t\tforeach ($this->api_channel_categories->cat_array as $k => $v)\n\t\t\t\t{\n\t\t\t\t\tif (in_array($v['0'], explode('|', $val['1'])))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($last_group == 0 OR $last_group != $v['0'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cats[] = array('', '-------');\n\t\t\t\t\t\t\t$last_group = $v['0'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$cats[] = array($v['1'], $v['2']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$channel_info[$key]['categories'] = $cats;\n\t\t\t\n\t\t\t$statuses = array();\n\t\t\t$statuses[] = array('', $this->lang->line('filter_by_status'));\n\n\t\t\tif (count($status_array) > 0)\n\t\t\t{\n\t\t\t\tforeach ($status_array as $k => $v)\n\t\t\t\t{\n\t\t\t\t\tif ($v['0'] == $val['2'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$status_name = ($v['1'] == 'closed' OR $v['1'] == 'open') ? $this->lang->line($v['1']) : $v['1'];\n\t\t\t\t\t\t$statuses[] = array($v['1'], $status_name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$statuses[] = array('open', $this->lang->line('open'));\n\t\t\t\t$statuses[] = array('closed', $this->lang->line('closed'));\n\t\t\t}\n\n\t\t\t$channel_info[$key]['statuses'] = $statuses;\n\t\t}\n\n\t\t$this->javascript->set_global('edit.channelInfo', $channel_info);\n\t}", "function ua_webtide_print_jobs_meta_boxes( $post, $metabox ) {\n\t\n\tswitch( $metabox[ 'id' ] ) {\n\t\t\n\t\tcase 'mc-wt-job-notifications':\n\t\t\n\t\t\t// Get our notification time, if set, for the job postings subscription list\n\t\t\tif ( ( $notification_str = get_post_meta( $post->ID, '_mailchimp_webtide_job_subscription_notification', true ) )\n\t\t\t\t&& strtotime( $notification_str ) !== false ) {\n\t\t\t\t\t\n\t\t\t\t// Get the current date/time in Central time\n\t\t\t\t$right_now = new DateTime();\n\t\t\t\t$right_now->setTimeZone( new DateTimeZone( 'America/Chicago' ) );\n\t\t\t\t\n\t\t\t\t// Convert to central time\n\t\t\t\t$notification = new DateTime( $notification_str, new DateTimeZone( 'UTC' ) );\n\t\t\t\t$notification->setTimeZone( new DateTimeZone( 'America/Chicago' ) );\n\t\t\t\t\n\t\t\t\t?><p>This job <?php echo $notification > $right_now ? 'will be' : 'was'; ?> sent to the \"UA Job Postings For Web Professionals\" MailChimp mailing list on <strong><?php echo $notification->format( 'n/j/Y \\a\\t\\ g:i a' ); ?></strong>.</p><?php\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t?><p style=\"color:red;\">This job has not been sent to the \"UA Job Postings For Web Professionals\" MailChimp mailing list.</p><?php\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Get our notification time, if set, for the WebTide list\n\t\t\tif ( ( $notification_str = get_post_meta( $post->ID, '_mailchimp_webtide_job_webtide_notification', true ) )\n\t\t\t\t&& strtotime( $notification_str ) !== false ) {\n\t\t\t\t\t\n\t\t\t\t// Get the current date/time in Central time\n\t\t\t\t$right_now = new DateTime();\n\t\t\t\t$right_now->setTimeZone( new DateTimeZone( 'America/Chicago' ) );\n\t\t\t\t\n\t\t\t\t// Convert to central time\n\t\t\t\t$notification = new DateTime( $notification_str, new DateTimeZone( 'UTC' ) );\n\t\t\t\t$notification->setTimeZone( new DateTimeZone( 'America/Chicago' ) );\n\t\t\t\t\n\t\t\t\t?><p>This job <?php echo $notification > $right_now ? 'will be' : 'was'; ?> sent to the WebTide MailChimp mailing list on <strong><?php echo $notification->format( 'n/j/Y \\a\\t\\ g:i a' ); ?></strong>.</p><?php\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t?><p style=\"color:red;\">This job has not been sent to the WebTide MailChimp mailing list.</p><?php\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t}\n\t\n}", "function mf_SALF_artist_meta_show_box() {\n global $artist_meta_box, $post;\n \n // Use nonce for verification\n \n\techo '<input type=\"hidden\" name=\"artist_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n \n echo '<table class=\"form-table\">';\n\n foreach ($artist_meta_box['fields'] as $field) {\n // get current post meta data\n \n switch ($field['type']) {\n \n\t\t\t\tcase 'select2':\n\t\t\t\t$meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\t\t\n\t\t\t\techo '<div style=\"margin: 12px 0; float: left;\">';\n\t\t echo '<h2><label for=\"', $field['id'], '\">', $field['name'], '</label></h2>';\n\t\t\t\techo '<select name=\"', $field['id'], '\" id=\"', $field['id'], '\">';\n foreach ($field['options'] as $ID => $option) {\n echo '<option value=\"'. $ID .'\" ', $meta == $ID ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>';\n\t\t\t\techo '</div><h2 style=\"clear: both; margin: 12px 0;\">Additional Speakers</h2>';\t\n\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox';\n\t\t\t\t$meta = get_post_meta($post->ID, 'mf_SALF_artist_meta_checks', true);\n\t\t\t\tif (!$meta){\n\t\t\t\t\t$meta = array();\n\t\t\t\t}\n\t\techo '<div style=\"margin-right: 12px; float: left;\">';\n echo '<label for=\"', $field['id'], '\">', $field['name'], '</label>';\n\n \n\t\techo '<input type=\"checkbox\" name=\"mf_SALF_artist_meta_checks[]\"value=\"', $field['id'], '\" id=\"', $field['id'], '\"', in_array($field['id'],$meta) ? ' checked=\"checked\"' : '', ' />';\n\t\techo '</div>';\n\t\t\t break;\n\t\t}\t\t\t \n \n }\n \n echo '</table>';\n}", "public function condition_field(course_format_flexpage_model_condition_field $condition = null) {\n global $DB;\n\n // Static so we only build it once...\n static $operators = null;\n static $useroptions = null;\n\n if (is_null($condition)) {\n $field = 0;\n $operator = '';\n $value = '';\n } else {\n $field = $condition->get_field();\n $operator = $condition->get_operator();\n $value = $condition->get_value();\n }\n if (is_null($operators) || is_null($useroptions)) {\n $operators = array(\n OP_CONTAINS => get_string('contains', 'format_flexpage'),\n OP_DOES_NOT_CONTAIN => get_string('doesnotcontain', 'format_flexpage'),\n OP_IS_EQUAL_TO => get_string('isequalto', 'format_flexpage'),\n OP_STARTS_WITH => get_string('startswith', 'format_flexpage'),\n OP_ENDS_WITH => get_string('endswith', 'format_flexpage'),\n OP_IS_EMPTY => get_string('isempty', 'format_flexpage'),\n OP_IS_NOT_EMPTY => get_string('isnotempty', 'format_flexpage'),\n );\n $useroptions = array(\n 'firstname' => get_user_field_name('firstname'),\n 'lastname' => get_user_field_name('lastname'),\n 'email' => get_user_field_name('email'),\n 'city' => get_user_field_name('city'),\n 'country' => get_user_field_name('country'),\n 'url' => get_user_field_name('url'),\n 'icq' => get_user_field_name('icq'),\n 'skype' => get_user_field_name('skype'),\n 'aim' => get_user_field_name('aim'),\n 'yahoo' => get_user_field_name('yahoo'),\n 'msn' => get_user_field_name('msn'),\n 'idnumber' => get_user_field_name('idnumber'),\n 'institution' => get_user_field_name('institution'),\n 'department' => get_user_field_name('department'),\n 'phone1' => get_user_field_name('phone1'),\n 'phone2' => get_user_field_name('phone2'),\n 'address' => get_user_field_name('address')\n );\n\n // Go through the custom profile fields now\n if ($user_info_fields = $DB->get_records('user_info_field')) {\n foreach ($user_info_fields as $userfield) {\n $useroptions[$userfield->id] = format_string(\n $userfield->name, true, array('context' => $this->page->context)\n );\n }\n }\n asort($useroptions);\n $useroptions = array(0 => get_string('none', 'format_flexpage')) + $useroptions;\n }\n $fieldid = html_writer::random_id('field');\n $operatorid = html_writer::random_id('field');\n $valueid = html_writer::random_id('field');\n\n $elements = html_writer::label(get_string('userfield', 'format_flexpage'), $fieldid, false, array('class' => 'accesshide')).\n html_writer::select($useroptions, 'fields[]', $field, false, array('id' => $fieldid)).\n html_writer::label(get_string('operator', 'format_flexpage'), $operatorid, false, array('class' => 'accesshide')).\n html_writer::select($operators, 'operators[]', $operator, false, array('id' => $operatorid)).\n html_writer::label(get_string('fieldvalue', 'format_flexpage'), $valueid, false, array('class' => 'accesshide')).\n html_writer::empty_tag('input', array('type' => 'text', 'name' => 'values[]', 'value' => $value, 'id' => $valueid));\n\n return html_writer::tag('div', $elements, array('class' => 'format_flexpage_condition_field'));\n }", "public function getConditionsDescription()\n {\n return $this->conditionsDescription;\n }", "public function travel_conditions_lists() {\n\t\tCheckAdminLoginSession();\n\t\t$per_page = 20;\n if($this->uri->segment(4)) {\n \t$page = ($this->uri->segment(4)) ;\n }\n else {\n \t$page = 1;\n }\n $start = ($page-1)*$per_page;\n $limit = $per_page;\n $totalCount = $this->admin_model->totalRecord($this->travel);\n\t\t$data[\"dataCollection\"] = $this->admin_model->getDataCollection($this->travel,$limit,$start);\n $totalResult = count($data['dataCollection']);\n\t\t$data[\"pagination\"] = Jpagination($totalCount,$limit,$start);\n\t\t$this->load->view('admin/include/head');\n\t\t$this->load->view('admin/include/header');\n\t\t$this->load->view('admin/include/sidebar');\n\t\t$this->load->view('admin/travel/condition_lists',$data);\n\t\t$this->load->view('admin/include/footer');\n\t\t$this->load->view('admin/include/foot');\n\t}" ]
[ "0.59526193", "0.53614926", "0.523919", "0.5221911", "0.52041733", "0.5161571", "0.51588225", "0.51588225", "0.51588225", "0.49778008", "0.49752837", "0.49115595", "0.4904188", "0.48980242", "0.48862484", "0.4845856", "0.48385328", "0.48385328", "0.4770255", "0.4760105", "0.47239214", "0.47194055", "0.4718376", "0.4696831", "0.4684002", "0.46815956", "0.46755412", "0.46750894", "0.46519965", "0.4643987", "0.46357042", "0.46335414", "0.46160454", "0.46001098", "0.45932415", "0.45840696", "0.45687196", "0.4565642", "0.45461524", "0.45426223", "0.4524164", "0.45225206", "0.45197263", "0.45085666", "0.44935128", "0.44918072", "0.44913593", "0.44824857", "0.4477459", "0.44767717", "0.4467131", "0.44579852", "0.44557887", "0.44531828", "0.4452521", "0.44458574", "0.44309562", "0.44196433", "0.43981737", "0.43863523", "0.43853605", "0.43703866", "0.43691063", "0.43621343", "0.43587917", "0.43571353", "0.43531492", "0.43488955", "0.43417642", "0.43385148", "0.4338265", "0.4336921", "0.43368176", "0.43361774", "0.433483", "0.43343937", "0.4333801", "0.43278462", "0.4325715", "0.43251213", "0.43204775", "0.431863", "0.4314853", "0.43106008", "0.4307976", "0.4307592", "0.4307283", "0.42977127", "0.42959186", "0.4293432", "0.42867967", "0.4284023", "0.4283901", "0.42836323", "0.42737308", "0.42718625", "0.42706037", "0.42673793", "0.4265142", "0.4262409" ]
0.7115626
0
Register the post type's metabox
public function register() { if( empty($this->_postType) ) { wp_die( 'Empty metabox post type.' ); } $all_empty = true; foreach( $this->getTabs() as $tab ) { if ( ! $this->_alwaysDisplay && $tab->getContainers()->size() == 0 ) { continue; } foreach ( $tab->getContainers() as $container ) { if ( ! $this->_alwaysDisplay && $container->getFields()->size() == 0 ) { continue; } else { $all_empty = false; break; } } } if( $all_empty ) { return; } $this->_id = "metabox_{$this->_postType}_{$this->_slug}"; add_meta_box( $this->_id, $this->_title, array($this, 'render'), $this->_postType, $this->_position, $this->_priority ); add_action( 'admin_head', array($this, 'disableHideMetaboxes') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register_post_metabox( $id,$title,$post_type) {\r\n\t\t$this->has_post_meta = true;\r\n\t\tadd_meta_box( \r\n\t\t\t$id, \r\n\t\t\t$title, \r\n\t\t\tarray(&$this,'post_meta_builder'), \r\n\t\t\t$post_type, \r\n\t\t\t'normal', \r\n\t\t\t'high', \r\n\t\t\t$this->postmeta[$post_type][$id] \r\n\t\t);\r\n\t}", "function register_and_do_post_meta_boxes($post)\n {\n }", "public function register_metaboxes(){\n\t\tif ($this->options('use_metabox')){\n\t\t\t$metabox = $this->metabox();\n\t\t\tadd_meta_box(\n\t\t\t\t$metabox['id'],\n\t\t\t\t$metabox['title'],\n\t\t\t\t'show_meta_boxes',\n\t\t\t\t$metabox['page'],\n\t\t\t\t$metabox['context'],\n\t\t\t\t$metabox['priority']\n\t\t\t);\n\t\t}\n\t}", "public function registerMetaBox() {\n\n add_meta_box(\n 'post-clone',\n 'Clone',\n array($this, 'buildForm'),\n self::$post_types,\n 'side',\n 'low');\n }", "public function register_meta_box() {\n\n\t\t\tadd_meta_box($this->slug, $this->options['title'], array($this, 'setup_meta_box'), $this->screen, $this->options['context'], $this->options['priority']);\n\t\t\tremove_meta_box('postcustom', $this->screen, 'normal');\n\t\t}", "function tower_register_meta_boxes() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n $meta = $custom_type['meta'];\n add_meta_box(\n $meta['handle'],\n $meta['title'],\n $meta['callback'],\n $key\n );\n }\n}", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "function ir_register_post_metabox() {\n\tglobal $post;\n\t$related_food_id = 0;\n\tif ( isset( $_GET['post'] ) ) {\n\t\t$related_food_id = get_post_meta( $_GET['post'], 'ir_related_food', true );\n\t}\n\t$prefix = 'ir_';\n\t/**\n\t * Sample metabox to demonstrate each field type included\n\t */\n\t$cmb_post = new_cmb2_box( array(\n\t\t'id' => $prefix . 'post_metabox',\n\t\t'title' => esc_html__( 'Material data', 'cmb2' ),\n\t\t'object_types' => array( 'post' ),\n\t) );\n\t// Add new field\n\t$cmb_post->add_field( array(\n\t\t'name' => __( 'Liittyvä raaka-aine', 'cmb2' ),\n\t\t'id' => $prefix . 'related_food',\n\t\t'desc' => __( 'Klikkaa hakuikonia tai syötä kenttään suoraan raaka-aineen id', 'cmb2' ),\n\t\t'type' => 'post_search_text', // This field type\n\t\t// post type also as array\n\t\t'post_type' => 'food',\n\t\t// Default is 'checkbox', used in the modal view to select the post type\n\t\t'select_type' => 'radio',\n\t\t// Will replace any selection with selection from modal. Default is 'add'\n\t\t'select_behavior' => 'replace',\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Näytettävät ravintoarvot?',\n\t\t'type' => 'title',\n\t\t'id' => $prefix . 'nutrients_title',\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Perusravintoaineet',\n\t\t'id' => $prefix . 'perusravintoaineet',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'energy' => __( 'Energia, laskennallinen', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_energy' ),\n\t\t\t$prefix . 'hiilihydraatti' => __( 'Hiilihydraatti', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_hiilihydraatti' ),\n\t\t\t$prefix . 'proteiini' => __( 'Proteiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_proteiini' ),\n\t\t\t$prefix . 'rasva' => __( 'Rasva', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_rasva' ),\n\t\t),\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Hiilihydraattifraktiot',\n\t\t'id' => $prefix . 'hiilihydraattifraktiot',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'sokeri' => __( 'Kuitu', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_sokeri' ),\n\t\t\t$prefix . 'kuitu' => __( 'Sokerit', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_kuitu' ),\n\t\t),\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Vitamiinit',\n\t\t'id' => $prefix . 'vitamiinit',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'folaatti' => __( 'Folaatti', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_folaatti' ),\n\t\t\t$prefix . 'niasiiniekvivalentti' => __( 'Niasiiniekvivalentti NE', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_niasiiniekvivalentti' ),\n\t\t\t$prefix . 'niasiini' => __( 'Niasiini (nikotiinihappo + nikotiiniamidi)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_niasiini' ),\n\t\t\t$prefix . 'b6' => __( 'Pyridoksiini vitameerit (vetykloridi) (B6)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b6' ),\n\t\t\t$prefix . 'b2' => __( 'Riboflaviini (B2)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b2' ),\n\t\t\t$prefix . 'b1' => __( 'Tiamiini (B1)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b1' ),\n\t\t\t$prefix . 'b12' => __( 'B12-vitamiini (kobalamiini)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b12' ),\n\t\t\t$prefix . 'C' => __( 'C-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_C' ),\n\t\t\t$prefix . 'A_RAE' => __( 'A-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_A_RAE' ),\n\t\t\t$prefix . 'karotenoidit' => __( 'Karotenoidit', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_karotenoidit' ),\n\t\t\t$prefix . 'D' => __( 'D-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_D' ),\n\t\t\t$prefix . 'E' => __( 'E-vitamiini alfatokoferoli', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_E' ),\n\t\t\t$prefix . 'K' => __( 'K-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_K' ),\n\t\t),\n\t\t'display_cb' => 'yourprefix_display_text_small_column', // Output the display of the column values through a callback.\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Kivennäis- ja hivenaineet',\n\t\t'id' => $prefix . 'kivennaisaineet',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'kalsium' => __( 'Kalsium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_kalsium' ),\n\t\t\t$prefix . 'rauta' => __( 'Rauta', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_rauta' ),\n\t\t\t$prefix . 'jodidi' => __( 'Jodidi', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_jodidi' ),\n\t\t\t$prefix . 'kalium' => __( 'Kalium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_kalium' ),\n\t\t\t$prefix . 'magnesium' => __( 'Magnesium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_magnesium' ),\n\t\t\t$prefix . 'natrium' => __( 'Natrium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_natrium' ),\n\t\t\t$prefix . 'suola' => __( 'Suola', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_suola' ),\n\t\t\t$prefix . 'fosfori' => __( 'Fosfori', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_fosfori' ),\n\t\t\t$prefix . 'seleeni' => __( 'Seleeni', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_seleeni' ),\n\t\t\t$prefix . 'sinkki' => __( 'Sinkki', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_sinkki' ),\n\t\t),\n\t) );\n}", "function tabify_add_meta_boxes($post_type)\n {\n }", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "function add_meta_boxes($post_type, $post)\n {\n }", "function register_metaboxes() {\n\n\t\t$this->metaboxes = array(\n\t\t\t'example-metabox' => array(\n\t\t\t\t'title' => 'Example Post Type Metabox',\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'description',\n\t\t\t\t\t'date'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tparent::register_metaboxes();\n\n\t}", "function ilusix_my_custom_meta_box() {\n global $myMetaBoxPostTypes;\n\n foreach($myMetaBoxPostTypes as $postType) {\n add_meta_box(\n 'my_custom_meta_box_identifier' . '-' . $postType,\n 'Meta box title',\n 'ilusix_my_custom_meta_box_callback',\n $postType,\n 'normal',\n 'default'\n );\n }\n}", "public function add_meta_boxes()\n \t{\n\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('WP_Custom_Login_Profile_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray(&$this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\n\n \t}", "public function register_meta_boxes()\n {\n }", "public function register_meta_box( $post ) {\n\t\tadd_meta_box(\n\t\t\t$this->meta_box['id'],\n\t\t\t$this->meta_box['title'],\n\t\t\t[$this, 'render_meta_box'],\n\t\t\t$this->post_type,\n\t\t\t$this->meta_box['context'],\n\t\t\t$this->meta_box['priority']\n\t\t);\n\t}", "public function add_meta_boxes()\n \t{\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('wp_plugin_template_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray($this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\t\t\t\t\n \t}", "function wtfdivi099_add_meta_boxes() {\r\n\tforeach(get_post_types() as $pt) {\r\n\t\tif (post_type_supports($pt, 'editor') and function_exists('et_single_settings_meta_box')) {\r\n\t\t\tadd_meta_box('et_settings_meta_box', __('Divi Custom Post Settings', 'Divi'), 'et_single_settings_meta_box', $pt, 'side', 'high');\r\n\t\t}\r\n\t} \r\n}", "public function registerMetaBoxes()\n\t {\n\t \t$dataMetas = self::getDataMetas();\n\n\t \tif ( !empty($dataMetas) ) {\n\t \t\tforeach ($dataMetas as $key => $meta) {\n\t \t\t\t/* CHECK IF HAS PAGES */\n\t \t\t\tif ( isset($meta[\"_pages\"]) && !empty($meta[\"_pages\"][0]) ) {\n\t \t\t\t\tself::createMetasPages($meta);\n\t \t\t\t}\n\n\t \t\t\t/* POSTS TYPES REGISTER METAS */\n\t \t\t\tif ( isset($meta[\"_posts_types\"]) && !empty($meta[\"_posts_types\"][0]) ) {\n\t \t\t\t\tself::createMetasPostTypes($meta);\n\t \t\t\t}\n\n\t \t\t\t/* CHECK IF ALL POSTS IS true */\n\t \t\t\tif ( isset($meta[\"_all_posts\"]) && $meta['_all_posts'] == 'yes' ) {\n\t \t\t\t\tself::createMetasPosts($meta);\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\n\t }", "public static function create_meta_box() {\n\t\t$content_types_array = self::_get_active_content_types();\n\t\tforeach ( $content_types_array as $content_type ) {\n\t\t\tadd_meta_box( 'custom-content-type-mgr-custom-fields'\n\t\t\t\t, __('Custom Fields', CCTM::txtdomain )\n\t\t\t\t, 'StandardizedCustomFields::print_custom_fields'\n\t\t\t\t, $content_type\n\t\t\t\t, 'normal'\n\t\t\t\t, 'high'\n\t\t\t\t, $content_type \n\t\t\t);\n\t\t}\n\t}", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "public function kiwip_add_meta_box(){\t\t\t\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->title,\n\t\t\tarray(&$this, 'kiwip_metabox_callback'),\n\t\t\t$this->cpt_name,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\t}", "public function add_meta_box( $post_type ) {\n\t\t// Limit meta box to certain post types.\n\t\t$post_types = $this->get_support_post_types();\n\t\tif ( in_array( $post_type, $post_types ) ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'customify_page_settings',\n\t\t\t\t__( 'Customify Settings', 'customify' ),\n\t\t\t\tarray( $this, 'render_meta_box_content' ),\n\t\t\t\t$post_type,\n\t\t\t\t'normal',\n\t\t\t\t'high'\n\t\t\t);\n\t\t}\n\t}", "function add_meta_box() {\t\t\n\t\t\t/* Gets available public post types. */\n\t\t\t$post_types = get_post_types( array( 'public' => true ), 'objects' );\n\t\t\t\n\t\t\t$post_types = apply_filters( 'remove_youtube_white_label_meta_box', $post_types );\n\t\t\t\n\t\t\t/* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */\n\t\t\tforeach ( $post_types as $type ) {\n\t\t\t\t/* Add the meta box. */\n\t\t\t\tadd_meta_box( self::DOMAIN . \"-{$type->name}-meta-box\", __( 'YouTube Embed Shortcode Creator (does not save meta)', self::DOMAIN ), array( $this, 'meta_box' ), $type->name, 'side', 'default' );\n\t\t\t}\n\t\t}", "function register_metabox( $_genesis_theme_settings_pagehook ) {\n\t\tadd_meta_box( 'be-title-toggle', __( 'Title Toggle', 'genesis-title-toggle' ), array( $this, 'create_sitewide_metabox' ), $_genesis_theme_settings_pagehook, 'main', 'high' );\n\t}", "function create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' POST SETTINGS', 'new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "public function register_metabox(){\n add_filter( 'attachment_fields_to_edit', array($this, 'add_metabox'), 10, 2 );\n /* Saves the field value*/\n add_action( 'edit_attachment', array($this->meta_field, 'save_metabox'), 20, 2 );\n }", "public static function registerMetaBoxes() {\n add_meta_box( 'mail_settings', __('Email Settings', WPXTREME_TEXTDOMAIN ), array( __CLASS__, 'display_mail_settings' ), WPXTREME_MAIL_CPT_KEY, 'normal', 'high');\n }", "function add_meta_box() {\n global $post;\n\n $post_types = get_post_types( array( 'public' => true ) );\n\n if ( !empty( $post ) ) {\n if ( $this->check_user_analytics_exist( $post ) ) {\n foreach ( $post_types as $post_type ) {\n add_meta_box( 'show_user_analytics', __( 'Post Author Analytics Info', 'wpuf-pro' ), array( $this, 'render_meta_box_content' ), $post_type, 'advanced', 'high' );\n }\n }\n }\n }", "function wck_settings_page_add_meta_boxes() {\r\n global $post;\r\n\t\tdo_action( 'add_meta_boxes', $this->hookname, $post );\r\n\t}", "public function add_post_metaboxes() {\n\t\tif( empty( $this->push_syndicate_settings['selected_post_types'] ) )\n\t\t\treturn;\n\n\t\tif( !$this->current_user_can_syndicate() )\n\t\t\treturn;\n\n\t\t$selected_post_types = $this->push_syndicate_settings[ 'selected_post_types' ];\n\t\tforeach( $selected_post_types as $selected_post_type ) {\n\t\t\tadd_meta_box( 'syndicatediv', __( ' Syndicate ' ), array( $this, 'add_syndicate_metabox' ), $selected_post_type, 'side', 'high' );\n\t\t\t//add_meta_box( 'syndicationstatusdiv', __( ' Syndication Status ' ), array( $this, 'add_syndication_status_metabox' ), $selected_post_type, 'normal', 'high' );\n\t\t}\n\n\t}", "public function register_meta_box() {\r\n add_meta_box( self::POST_TYPE . '-meta', 'Downloadable Resource URL', array ($this, 'meta_box_html'), self::POST_TYPE, 'side', 'default', '');\r\n }", "function wpbm_register_post_type(){\n include('inc/admin/register/wpbm-register-post.php');\n register_post_type( 'WP Blog Manager', $args );\n }", "public function add_meta_box() {\r\n\r\n\t\tif( ! is_wp_error( $this->tax_obj ) && isset($this->tax_obj->object_type ) ) foreach ( $this->tax_obj->object_type as $post_type ):\r\n\t\t\t$label = $this->tax_obj->labels->name;\r\n\t\t\t$id = ! is_taxonomy_hierarchical( $this->taxonomy ) ? 'radio-tagsdiv-'.$this->taxonomy : 'radio-' .$this->taxonomy .'div' ;\r\n\t\t\tadd_meta_box( $id, $label ,array( $this,'metabox' ), $post_type ,'side','core', array( 'taxonomy'=>$this->taxonomy ) );\r\n\t\tendforeach;\r\n\t}", "public static function add_meta_boxes_post($post) {\n add_meta_box(\"medium\", \"Medium\", array(\"Medium_Admin\", \"meta_box_callback\"),\n null, \"side\", \"high\");\n }", "function add_metabox() {\n\tadd_meta_box(\n\t\t'external-connection-groups',\n\t\t__( 'External Connection Groups', 'distributor' ),\n\t\t__NAMESPACE__ . '\\render_metabox',\n\t\t\\Distributor\\Waves\\get_distributable_custom_post_types(),\n\t\t'side',\n\t\t'high'\n\t);\n\n}", "public function register_metabox() {\n\t\t$fm = new Fieldmanager_Group( [\n\t\t\t'name' => 'hero_fields', // \"name\" id deceiving, used as the key/ID.\n\t\t\t'serialize_data' => false,\n\t\t\t'add_to_prefix' => false,\n\t\t\t'children' => [\n\t\t\t\t'_headline' => new Fieldmanager_RichTextArea( 'Main Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t\t'_subheadline' => new Fieldmanager_RichTextArea( 'Sub Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t],\n\t\t] );\n\n\t\t/**\n\t\t * Initiate the metabox\n\t\t */\n\t\t$fm->add_meta_box( 'Hero', 'page' );\n\t}", "Function Wp_meta_box_store(){\n\n\t$mult_posts = array( 'post', 'page' );\n\n\tforeach ($mult_posts as $mult_post) {\n\t\tadd_meta_box(\n\t\t\t'meta_box_id', \t\t\t\t\t# metabox id\n\t\t\t__('Author Bio', 'textdomain'),\t# Title \n\t\t\t'wp_meta_box_call_back_func_store', \t# Callback Function \n\t\t\t$mult_post, \t\t\t\t\t# Post Type\n\t\t\t'normal'\t\t\t\t\t\t# textcontent\n\t\t);\n\t}\n\t\n}", "public static function add_meta_box() {\n add_meta_box(\n 'link_meta', // Unique ID\n 'Properties', // Box title\n [self::class, 'meta_html'], // Content callback, must be of type callable\n \"link\" // Post type\n );\n }", "public static function registerMetaBoxes() {}", "function create_meta_box() {\n\n\tglobal $postmetas;\n\t\n\tif(!isset($_GET['post_type']) OR empty($_GET['post_type']))\n\t{\n\t\tif(isset($_GET['post']) && !empty($_GET['post']))\n\t\t{\n\t\t\t$post_obj = get_post($_GET['post']);\n\t\t\t$_GET['post_type'] = $post_obj->post_type;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_GET['post_type'] = 'post';\n\t\t}\n\t}\n\t\n\tif ( function_exists('add_meta_box') && isset($postmetas) && count($postmetas) > 0 ) { \n\t\tforeach($postmetas as $key => $postmeta)\n\t\t{\n\t\t\tif($_GET['post_type']==$key)\n\t\t\t{\n\t\t\t\tadd_meta_box( 'metabox', ucfirst($key).' Options', 'new_meta_box', $key, 'side', 'high' ); \n\t\t\t}\n\t\t}\n\t}\n\n}", "public function addMetaBox(WP_Post $post): void\n {\n $slug = $post->post_type;\n add_meta_box(\n $slug . '_editor',\n __('Informationen', 'wp-plugin-core'),\n array( $this, 'editorByPost' ),\n $slug,\n 'advanced',\n 'high'\n );\n }", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "static function metabox_at_post_edit_page(){\n\t\t \tadd_meta_box('matebox-to-handle-keywords', 'Affiliate Keywords', array(get_class(), 'metabox_to_deal_keywords'), 'product', 'advanced', 'high');\t \t\n\t\t }", "public static function add_meta_box() {\n\t\tadd_meta_box( 'sponsor-meta', __( 'Sponsor Meta', self::$text_domain ), array( __CLASS__, 'do_meta_box' ), self::$post_type_name , 'normal', 'high' );\n\t}", "public function add_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t$this->plugin_slug . '-post-metabox',\n\t\t\tesc_html__( 'Review Settings', $this->plugin_slug ),\n\t\t\tarray( $this, 'review_settings_view' ),\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'core'\n \t \t);\n\t}", "function registry_add_post_meta_boxes() {\n\n add_meta_box(\n 'registry-info', // Unique ID\n 'When did you complete the Cozmeena Shawl?', // Title\n 'registry_coz_info_meta_box', // Callback function\n 'coz_registry', // Admin page (or post type)\n 'side', // Context\n 'core' // Priority\n );\n\n global $current_user;\n if($current_user->roles[0] == 'administrator') {\n add_meta_box(\n\t\t'registry-num', // Unique ID\n\t\t'International Cozmeena Registration Number', // Title\n\t\t'registry_coz_num_meta_box', // Callback function\n\t\t'coz_registry', // Admin page (or post type)\n\t\t'normal', // Context\n\t\t'low' // Priority\n\t\t);\n }\n}", "function AP_Meta_Box_Setup() {\n\tadd_action('add_meta_boxes','AP_Meta_Box_Add');\n\n\tadd_action( 'save_post', 'AP_Meta_Box_Save', 10, 2 );\n}", "function pavi_post_meta_boxes_setup() {\n add_action( 'add_meta_boxes', 'pavi_textarea_meta_boxes' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'pavi_save_post_class_meta', 10, 2 );\n}", "function master_sidebar_post_type_meta_boxes() {\n\t\n\t$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' );\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tif ( ! $post_types ) {\n\t\treturn;\n\t}\n\n\t// Add metabox for each posttype\n\tforeach ( $post_types as $post_type ) {\n\t\t$post_type = apply_filters( 'master_sidebar_meta_box_object', $post_type );\n\t\tif ( $post_type ) {\n\t\t\t$id = $post_type->name;\n\t\t\tadd_meta_box( \n\t\t\t\t\"master-add-{$id}\", \n\t\t\t\t$post_type->labels->name, \n\t\t\t\t'master_sidebar_item_post_type_meta_box', \n\t\t\t\t$admin_page_name, \n\t\t\t\t'side', \n\t\t\t\t'default', \n\t\t\t\t$post_type \n\t\t\t);\n\t\t}\n\t}\n}", "function add_custom_fields_meta_box( $posttypes , $custom_field_set , $custom_field_item )\n\t{\n\t\tif( $custom_field_set == 'sliders' ) \n\t\t\t$this->slider_field_item = $custom_field_item != '' ? $custom_field_item : 'base';\n\t\t\t\n\t\t\tadd_action('add_meta_boxes', function() use( $posttypes, $custom_field_set , $custom_field_item ) {\n\t\t\t\t\t\n\t\t\t\t$custom_field_item_info = include( get_template_directory().'/module/'.$custom_field_set.'/'.$custom_field_item.'/config.details.php' );\n\n\t\t\t\tforeach ($posttypes as $key => $posttype_section ) {\n\t\t\t\t\t\n\t\t\t\t\tadd_meta_box('custom_post_type_section_'.$posttype_section . '-' . $custom_field_item , $custom_field_item_info['title'], function() use( $custom_field_set , $custom_field_item ){\n\n\t\t\t\t\t\t\t$custom_fields = $this->get_fields( $custom_field_set , $custom_field_item );\n\t\t\t\t\t\t\t$data['type'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['dir'] = array('module',$custom_field_set , $custom_field_item , 'admin' ,'views');\n\t\t\t\t\t\t\t$data['view'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['customfields'] = $custom_fields;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tload_view( $data );\n\n\t\t\t\t\t}, $posttype_section );\n\n\t\t\t\t}\n\t\t});\n\n\t\t$this->save_post( $custom_field_set , $custom_field_item );\n\t}", "public function add_meta_box( $post_type ) {\n // Limit meta box to certain post types.\n $post_types = array( 'post', 'page' );\n \n $box_label = __('Opcionais para esta transformação');\n if ( $post_type == 'transform' ) {\n add_meta_box(\n 'emertech_transform_optionals',\n $box_label,\n array( $this, 'render_meta_box_content' ),\n $post_type,\n 'advanced',\n 'high'\n );\n }\n }", "function moutheme_register_meta_boxes()\n{\n\tglobal $meta_boxes;\n\n\t// Make sure there's no errors when the plugin is deactivated or during upgrade\n\tif ( class_exists( 'RW_Meta_Box' ) ) {\n\t\tforeach ( $meta_boxes as $meta_box ) {\n\t\t\tnew RW_Meta_Box( $meta_box );\n\t\t}\n\t}\n}", "private function add_meta_boxes() {\n\t\t$post_types = $this->post->get_types();\n\n\t\tforeach ( $post_types as $post_type => $value ) {\n\t\t\tadd_meta_box( 'subway_comment_metabox',\n\t\t\t\tesc_html__( 'Memberships Discussion', 'subway' ),\n\t\t\t\tfunction ( $post ) {\n\t\t\t\t\t$this->discussion( $post );\n\t\t\t\t},\n\t\t\t\t$post_type, 'side', 'high'\n\t\t\t);\n\t\t\tadd_meta_box( 'subway_visibility_metabox',\n\t\t\t\tesc_html__( 'Memberships Access', 'subway' ),\n\t\t\t\tfunction ( $post ) {\n\t\t\t\t\t$this->visibility( $post );\n\t\t\t\t},\n\t\t\t\t$post_type, 'side', 'high'\n\t\t\t);\n\t\t}\n\n\t}", "public function sailthru_post_metabox() {\n\n\t\tadd_meta_box(\n\t\t\t'sailthru-post-data',\n\t\t\t__( 'Sailthru Post Data', 'sailthru' ),\n\t\t\tarray( $this, 'post_metabox_display' ),\n\t\t\t'post',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t}", "function cnew_custom_metabox_add() {\r\n add_meta_box(\r\n 'cnew_custom_metabox_workshop', \r\n __( 'Informações da Oficina', 'cnew' ), \r\n 'cnew_workshop_custom_metabox_callback', \r\n 'cnew_workshop', \r\n 'normal',\r\n 'high'\r\n );\r\n\r\n add_meta_box(\r\n 'cnew_custom_metabox_registration', \r\n __( 'Formulário de Inscrição', 'cnew' ), \r\n 'cnew_registration_custom_metabox_callback', \r\n 'cnew_registration', \r\n 'normal',\r\n 'high'\r\n );\r\n }", "static function metabox($post){\n\t\twp_nonce_field( 'flat-options', 'flat-options_nonce' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\techo '<style>';\n\t\techo '.admin-meta-input{display:block; margin-top: 10px;}';\n\t\techo 'div.field-holder{display: block;float: left; margin: 10px 20px; height: 80px;}';\n\t\techo '.field-block{display: inline-block;clear: both;float: none;}';\n\t\techo '.postbox .inside .field-block h2{padding: 8px 12px;font-weight: 600;font-size: 18px;margin: 0;line-height: 1.4}';\n\t\techo '</style>';\n\t\t\t\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Licitálással kapcsolatos adatok</h2>';\n\t\tforeach ($fieldblocks['licit'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Hely adatok</h2>';\n\t\tforeach ($fieldblocks['location'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlan adatok és településrendezési előírások</h2>';\n\t\tforeach ($fieldblocks['parameters'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlanjogi jellemzők</h2>';\n\t\tforeach ($fieldblocks['info'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Közművek, energiaellátás, telekommunikáció</h2>';\n\t\tforeach ($fieldblocks['sources'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\n\t\t\t\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Építmény (épület) jellemzői</h2>';\n\t\tforeach ($fieldblocks['building'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\techo \"\n\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('.datepicker').datepicker();\t\n\t\t\t\t});\t\n\t\t\t</script>\t\n\t\t\";\n\t\t\n\t\techo '<br clear=\"all\">';\n\t\t\n }", "function scalia_slides_register_meta_box($post) {\r\r\n\tremove_meta_box('postimagediv', 'scalia_slide', 'side');\r\r\n\tadd_meta_box('postimagediv', __('Slide Image', 'scalia'), 'post_thumbnail_meta_box', 'scalia_slide', 'normal', 'high');\r\r\n\tadd_meta_box('scalia_slide_settings', __('Slide Settings', 'scalia'), 'scalia_slide_settings_box', 'scalia_slide', 'normal', 'high');\r\r\n}", "function mustsee_register_theme_settings_metaboxes( $_genesis_theme_settings_pagehook ) {\n\tadd_meta_box('mustsee-social-settings', 'Social Links and Contact Info', 'mustsee_social_settings_box', $_genesis_theme_settings_pagehook, 'main', 'high');\n}", "public function add_meta_boxes() {\r\n\t\tadd_meta_box( 'zakra-page-setting', esc_html__( 'Page Settings', 'zakra' ), 'Zakra_Meta_Box_Page_Settings::render', array(\r\n\t\t\t'post',\r\n\t\t\t'page',\r\n\t\t) );\r\n\t}", "function admin_metaboxes() {\r\n\r\n// \t\t\t/** Check if wpeo_log_select_post_type exist */\r\n// \t\t\tif( !empty(\t$this->wpeologs_settings['post_type'] ) ) {\r\n// \t\t\t\tforeach ( $this->wpeologs_settings['post_type'] as $post_type ) {\r\n\r\n// \t\t\t\t\t//add_meta_box( 'wpeologs_metabox_' . $post_type, __( 'Logs', 'wpeologs-i18n'), array( &$this, 'associated_post_type_metabox' ), $post_type, 'normal' );\r\n// \t\t\t\t}\r\n// \t\t\t}\r\n\t\t}", "function add_metaboxes() \n {\n // add a metabox to the Event using the callback add_time_date_metabox \n add_meta_box( \n \"bbquotations-source\",\n __(\"Quote source url\", $this->localization_domain),\n array(&$this, \"add_source_metabox\"), $this->custom_post_type_name, \"normal\", \"high\"\n );\n\n add_meta_box( \n \"bbquotations-cheatsheet\",\n __(\"Quotes usage cheatsheet\", $this->localization_domain),\n array(&$this, \"add_cheatsheet_metabox\"), $this->custom_post_type_name, \"side\", \"high\"\n );\n }", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "public function add_meta_box() {\n\t\tif (count($post_types = $this->get_post_types())) {\n\t\t\t$this->load_textdomain();\n\t\t\tforeach ($post_types as $post_type)\n\t\t\t\tadd_meta_box('im8_additional_css_box', __(\"Additional CSS\", 'im8-additional-css'), array($this, 'print_meta_box'), $post_type, 'normal', 'high');\n\t\t}\n\t}", "function post_custom_meta_box($post)\n {\n }", "public function add_meta_box( $post_type ) {\n // Limit meta box to certain post types.\n $post_types = array( 'post', 'page','book' );\n \n if ( in_array( $post_type, $post_types ) ) {\n add_meta_box(\n 'some_meta_box_name',\n __( 'Some Meta Box Headline', 'textdomain' ),\n array( $this, 'render_meta_box_content' ),\n $post_type,\n 'advanced',\n 'high'\n );\n }\n }", "function registry_post_meta_boxes_setup() {\n\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'registry_add_post_meta_boxes', 1 );\n\n /* Save post info meta on the 'save_post' hook. */\n add_action( 'save_post', 'registry_save_coz_info_meta', 10, 2 );\n \n /* Save post info meta on the 'save_post' hook. */\n add_action( 'save_post', 'registry_save_coz_num_meta', 10, 2 );\n \n}", "function snax_mashshare_add_post_types_to_metaboxes( $metaboxes ) {\n\t$metaboxes[0]['pages'][] = 'snax_quiz';\n\treturn $metaboxes;\n}", "public function add_meta_box($post_type)\r\n {\r\n\r\n if (in_array($post_type, $this->post_types))\r\n {\r\n add_meta_box(\r\n 'multi_image_upload_meta_box'\r\n , __('Upload Multiple Images', 'miu_textdomain')\r\n , array($this, 'render_meta_box_content')\r\n , $post_type\r\n , 'advanced'\r\n , 'high'\r\n );\r\n }\r\n }", "function add_meta_boxes()\n {\n }", "public function setup_meta_box($post) {\n\t\t\t\n\t\t\t$build = new Build($post->ID, $this->slug, $this->options);\n\t\t\t$build->build_meta_box();\n\t\t}", "function add_custom_content_fields_meta_box( $posttypes , $custom_field_set , $custom_field_item )\n\t{\n\t\t\n\t\t/* assign current slider item */\n\t\tif( $custom_field_set == 'sliders' ) \n\t\t\t\n\t\t\t$this->slider_field_item = $custom_field_item != '' ? $custom_field_item : 'base';\n\t\t\n\t\t\n\t\tadd_action('add_meta_boxes', function() use( $posttypes, $custom_field_set , $custom_field_item ) {\n\t\t\t\t\n\t\t\t$custom_field_item_info = include( get_template_directory().'/module/'.$custom_field_set.'/'.$custom_field_item.'/config.details.php' );\n\n\t\t\tforeach ($posttypes as $key => $posttype_section ) {\n\t\t\t\t\n\t\t\t\tadd_meta_box('custom_post_type_section_'.$posttype_section . '-' . $custom_field_item , $custom_field_item_info['title'], function() use( $custom_field_set , $custom_field_item ){\n\n\t\t\t\t\t\t$custom_fields = $this->get_fields( $custom_field_set , $custom_field_item );\n\t\t\t\t\t\t$data['type'] = $custom_field_item;\n\t\t\t\t\t\t$data['dir'] = array('module',$custom_field_set , $custom_field_item , 'admin' ,'views');\n\t\t\t\t\t\t$data['view'] = $custom_field_item;\n\t\t\t\t\t\t$data['customfields'] = $custom_fields;\n\t\t\t\t\t\t\n\t\t\t\t\t\tload_view( $data );\n\n\t\t\t\t}, $posttype_section );\n\n\t\t\t}\n\n\t\t});\n\n\t\t$this->save_post( $custom_field_set , $custom_field_item );\n\t}", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Word linkages',\n\t\t\t'Word linkages',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'linkages_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'Answers',\n\t\t\t'Answers',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'answers_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "function add_your_fields_meta_box(){\r\nadd_meta_box(\r\n'your_fields_meta_box',// $id\r\n'Auteur',// $title\r\n'show_your_fields_meta_box',// $callback\r\n'Livre',// $screen\r\n'normal',// $context\r\n'high'// $priority\r\n);\r\n}", "public function add_meta_box(){\n\t\t\n\t\t/**\n\t\t * Includes our array of post types\n\t\t */\n\t\tinclude( 'q-and-a-post-types.php' );\n\t\t\n\t\tforeach ( $q_and_a_post_types as $post_type ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'q-and-a',\n\t\t\t\t'Questions and Answers',\n\t\t\t\tarray( $this, 'display_meta_box' ),\n\t\t\t\t$post_type, \n\t\t\t\t'normal',\n\t\t\t\t'default'\n\t\t\t);\n\t\t}\n\t}", "function sample_add_metabox() {\n\tadd_meta_box(\n\t\t'post-notes',\n\t\t__( 'Post Notes', 'textdomain' ),\n\t\t'sample_render_metabox',\n\t\t'post',\n\t\t'normal',\n\t\t'default'\n\t);\n}", "public function flo_reg_custom_post_type(){\n\t\t// call the methods that are registering the post types\n\t\t$this->flo_reg_forms_post_type();\n\t\t$this->flo_reg_entrie_post_type();\n\n\t\t$this->flo_register_form_entries_taxonomy();\n\t}", "public function adminAddMetaBoxFields($post_type)\n { //Create cleancoded SSB metabox section\n $post_types = array('post', 'page');\n if (in_array($post_type, $post_types)) {\n add_meta_box(\n 'cleancoded-ssb-meata-box',\n __('cleancoded SSB', 'cleancoded-ssb'),\n array($this, 'renderSsbFields'),\n $post_type,\n 'advanced', 'high'\n );\n }\n }", "public static function access_register_meta_boxes()\n\t{\n\t\t$self = new Access();\n\t\tadd_meta_box('access_data', __('Access data', SAPI_TEXT_DOMAIN), array(get_class($self), 'access_metabox_callback'), Access::$MACHINE_NAME);\n\n\t\tadd_action( 'edit_form_after_title', function($post) {\n\t\t\tif ($post->post_type == Access::$MACHINE_NAME) {\n\t\t\t\tprint '<div style=\"position: relative;top: 20px;z-index: 9999;padding: 5px 0;font-size: 20px;font-weight: 400\">Description:</div>';\n\t\t\t}\n\t\t} );\n\t}", "function rng_METANAME_metabox_init() {\n}", "function ncl_add_post_meta_boxes() {\n\t$post_types = get_post_types();\n\tforeach ( $post_types as $post_type ) {\n\t\tadd_meta_box( 'ncl-current-location', 'Current Location', 'ncl_current_location_meta_box', $post_type, 'side', 'default' );\n\t}\n}", "function add_post_meta_boxes() {\n\n\t\t\tadd_meta_box(\n\t\t\t\t'video-post', // Unique ID\n\t\t\t\tesc_html__( 'Video Post' ), // Title\n\t\t\t\tarray( 'VWvideoShare', 'post_meta_box'), // Callback function\n\t\t\t\t'video', // Admin page (or post type)\n\t\t\t\t'normal', // Context\n\t\t\t\t'high' // Priority\n\t\t\t);\n\t\t}", "function sm_custom_meta() {\n\tadd_meta_box('sm_meta', __( 'Post Destacado', 'sm-textdomain' ), 'sm_meta_callback', 'post' );\n}", "function wck_add_metabox() {\r\n\t\t\r\n\t\tglobal $pb_wck_pages_hooknames;\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' ){\r\n\t\t\tif( $this->args['post_id'] == '' && $this->args['page_template'] == '' ){\r\n\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $this->args['post_type'], $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );\r\n\t\t\t\t/* add class to meta box */\r\n\t\t\t\tadd_filter( \"postbox_classes_\".$this->args['post_type'].\"_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t}\r\n\t\t\telse{\t\t\t\t\r\n\t\t\t\tif( !empty( $_GET['post'] ) )\r\n\t\t\t\t\t$post_id = filter_var( $_GET['post'], FILTER_SANITIZE_NUMBER_INT );\r\n\t\t\t\telse if( !empty( $_POST['post_ID'] ) )\r\n\t\t\t\t\t$post_id = filter_var( $_POST['post_ID'], FILTER_SANITIZE_NUMBER_INT );\r\n\t\t\t\telse \r\n\t\t\t\t\t$post_id = '';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\tif( $this->args['post_id'] != '' && $this->args['page_template'] != '' ){\r\n\t\t\t\t\t$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);\t\t\t\t\r\n\t\t\t\t\tif( $this->args['post_id'] == $post_id && $template_file == $this->args['page_template'] )\r\n\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), 'page', $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array'] ) );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\tadd_filter( \"postbox_classes_page_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t\tif( $this->args['post_id'] != '' ){\r\n\t\t\t\t\t\tif( $this->args['post_id'] == $post_id ){\r\n\t\t\t\t\t\t\t$post_type = get_post_type( $post_id );\r\n\t\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $post_type, $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array'] ) );\r\n\t\t\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\t\t\tadd_filter( \"postbox_classes_\".$post_type.\"_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\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\tif( $this->args['page_template'] != '' ){\r\n\t\t\t\t\t\t$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);\t\r\n\t\t\t\t\t\tif ( $template_file == $this->args['page_template'] ){\r\n\t\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), 'page', $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );\r\n\t\t\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\t\t\tadd_filter( \"postbox_classes_page_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\telse if( $this->args['context'] == 'option' ){\r\n if( !empty( $pb_wck_pages_hooknames[$this->args['post_type']] ) ) {\r\n add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array(&$this, 'wck_content'), $pb_wck_pages_hooknames[$this->args['post_type']], $this->args['mb_context'], 'high', array('meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']));\r\n /* add class to meta box */\r\n add_filter(\"postbox_classes_\" . $pb_wck_pages_hooknames[$this->args['post_type']] . \"_\" . $this->args['metabox_id'], array(&$this, 'wck_add_metabox_classes'));\r\n }\r\n\t\t}\r\n\t}", "function init_metabox() {\n\tadd_action( 'add_meta_boxes', __NAMESPACE__ . '\\add_metabox' );\n\tadd_action( 'save_post', __NAMESPACE__ . '\\save_metabox', 10, 2 );\n\n}", "function add_custom_meta_box() { \nglobal $post, $post_type;\n\n\t// specific template\n\t//if('page-templatename.php' == get_post_meta($post->ID, '_wp_page_template', true)) {\n \tadd_meta_box( \n \t'custom_meta_box', // $id \n\t\t\t'More Stuff!', // $title \n\t\t\t'show_custom_meta_box', // $callback \n\t\t\t'post', // $page \n\t\t\t'normal', // $context \n\t\t\t'high'\n\t\t); // $priority \n\t//}\n\t\n\t//specific post-type\n\t/*if('custom post type' == $post_type) {\n \tadd_meta_box( \n \t'custom_meta_box', // $id \n\t\t\t'Options', // $title \n\t\t\t'show_custom_meta_box', // $callback \n\t\t\t'custom post type', // $page \n\t\t\t'normal', // $context \n\t\t\t'high'\n\t\t); // $priority \n\t}*/\n}", "function add_meta_boxes() {\n\t\t$post_types = get_post_types();\n\t\tif($post_types) :\n\t\t\tforeach($post_types as $post_type) :\n\t\t\t\tif(post_type_supports($post_type,'sliders')) :\n\t\t\t\t\t//It's supported!\n\t\t\t\t\tadd_meta_box('tw-sliders-box',__('Sliders','tw-sliders'),array($this,'manage_sliders'),$post_type,'normal','high');\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\tendif;\n\t}", "function ppes_admin_init(){\r\n\tadd_meta_box(\"et_post_meta\", \"ET Settings\", \"et_post_meta\", \"auctions\", \"normal\", \"high\");\r\n}", "static function register_post_type() {\n\n $args = array(\n 'labels' => array(\n\t\t'name' => __( 'Forms', 'pwp' ),\n\t\t'singular_name' => __( 'Form', 'pwp' ),\n\t\t'add_new' => __( 'Add New', 'pwp' ),\n\t\t'add_new_item' => __( 'Add New Form', 'pwp' ),\n\t\t'edit_item' => __( 'Edit Form', 'pwp' ),\n\t\t'new_item' => __( 'New Form', 'pwp' ),\n\t\t'all_items' => __( 'All Forms', 'pwp' ),\n\t\t'view_item' => __( 'View Form', 'pwp' ),\n\t\t'search_items' => __( 'Search Forms', 'pwp' ),\n\t\t'not_found' => __( 'No forms found', 'pwp' ),\n\t\t'not_found_in_trash' => __( 'No forms found in Trash', 'pwp' ),\n\t\t'parent_item_colon' => __( ':', 'pwp' ),\n\t\t'menu_name' => __( 'Forms', 'pwp' )\n\t ),\n 'public' => false,\n 'show_ui' => true,\n 'query_var' => false,\n 'supports' => array( 'title', 'custom-fields', 'editor' )\n );\n\tregister_post_type( 'form', $args );\n }", "public function addCustomBox() {\n add_meta_box( \n $this->post_type . '_meta',\n __( self::getLabel($this->post_type) . ' Meta', $this->post_type . '_meta' ),\n array($this, 'innerCustomBox'),\n $this->post_type,\n $this->fields_location, \n $this->fields_priority\n ); \n }", "public function register()\n {\n $args = apply_filters( $this->name.'_post_type_config', $this->config );\n $args['labels'] = apply_filters( $this->name.'_post_type_labels', $this->labels);\n\n register_post_type( $this->name, $args );\n }", "public function add_meta_box( $post_type ) {\n\t\tadd_meta_box(\n\t\t\t'question_author'\n\t\t\t,__( 'Question author', 'piananotizie' )\n\t\t\t,array( $this, 'render_meta_box_content' )\n\t\t\t,'askthelawyer'\n\t\t\t,'side'\n\t\t\t,'default'\n\t\t);\n\t}", "public static function add_metaboxes(){}", "private function register_post_type() {\n\t\t\t// register the post type\n\t\t\t$args = array('label' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t\t\t\t\t'public' => false,\n\t\t\t\t\t\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t\t\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t\t\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t\t\t\t\t\t'rewrite' => array('slug' => $this->post_type, 'with_front' => false),\n\t\t\t\t\t\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t\t\t\t\t\t'menu_position' => 100,\n\t\t\t\t\t\t\t\t\t\t'menu_icon' => 'dashicons-admin-generic',\n\t\t\t\t\t\t\t\t\t\t'supports' => array('title','custom-fields','revisions'),\n\t\t\t\t\t\t\t\t\t\t'labels' => array('name' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'singular_name' => __('Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'menu_name' =>\t__('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new' => __('Add Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new_item' => __('Add New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit' => __('Edit', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit_item' => __('Edit Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'new_item' => __('New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view_item' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'search_items' => __('Search Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found' => __('No Options Pages Found', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found_in_trash' => __('No Options Pages Found in Trash', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'parent' => __('Parent Options Page', $this->text_domain)));\n\t\t\tregister_post_type($this->post_type, $args);\n\t\t}", "function construction_realestate_posttype_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'construction-realestate-posttype' ), 'construction_realestate_posttype_cs_meta_callback' , 'agents');\n}", "public function register_post_type() {\n\t\tadd_action( 'init', array( $this, 'post_registration_callback' ), 0, 0 );\n\t}", "function siteorigin_panels_metaboxes() {\n\tforeach( siteorigin_panels_setting( 'post-types' ) as $type ){\n\t\tadd_meta_box( 'so-panels-panels', __( 'Page Builder', 'positive-panels' ), 'siteorigin_panels_metabox_render', $type, 'advanced', 'high' );\n\t}\n}", "public function add_metaboxes( $post_type )\n {\n add_meta_box(\n 'passster',\n __( 'Passster', 'content-protector' ),\n array( $this, 'render_passster' ),\n apply_filters( 'passster_post_types', array( 'post', 'page', 'product' ) ),\n 'side',\n 'high'\n );\n }", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }" ]
[ "0.79410565", "0.78033835", "0.76649076", "0.7625233", "0.76152015", "0.75833946", "0.7574575", "0.75581867", "0.7503565", "0.74845946", "0.7456414", "0.7438227", "0.74234104", "0.74123555", "0.74053186", "0.73705393", "0.73379433", "0.7326032", "0.73188895", "0.7314516", "0.72633344", "0.7241284", "0.72382385", "0.7204398", "0.7161563", "0.7156841", "0.7134646", "0.71220386", "0.7118767", "0.7115007", "0.71008056", "0.71007043", "0.71000296", "0.7096359", "0.7034011", "0.7031517", "0.70312005", "0.70302933", "0.7016602", "0.7012719", "0.701107", "0.7004366", "0.6982978", "0.69806993", "0.69782275", "0.6977503", "0.69774395", "0.6974431", "0.6964768", "0.6951769", "0.69388765", "0.69380903", "0.6936116", "0.6926715", "0.6924132", "0.6917392", "0.6911114", "0.69090396", "0.69075704", "0.6904953", "0.6902132", "0.69005215", "0.6891611", "0.6882058", "0.68751264", "0.6862222", "0.6854684", "0.6853167", "0.6851849", "0.68415755", "0.68347573", "0.6826019", "0.6825742", "0.6822783", "0.6805818", "0.67965895", "0.67960167", "0.679341", "0.67921823", "0.67880297", "0.67843384", "0.67835754", "0.678262", "0.6781599", "0.677882", "0.6773253", "0.67707676", "0.6764913", "0.6764578", "0.67597735", "0.6757838", "0.6751897", "0.67516243", "0.6746989", "0.6746172", "0.67461604", "0.6743504", "0.67434037", "0.6742158", "0.6740935" ]
0.8091651
0
Do not allow users to hide custom created metaboxes.
public function disableHideMetaboxes() { echo "<style type='text/css'>label[for='" . $this->_id . "-hide'] { display: none; }</style>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function block_editor_meta_box_hidden_fields()\n {\n }", "public function hideMetaBoxes()\n {\n remove_meta_box( 'pageparentdiv', 'playscripts', 'side' );\n // for some odd reason this doesn't always work. Very annoying.\n remove_meta_box( 'postimagediv', 'playscripts', 'side' );\n }", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "function th_hide_meta_box($hidden, $screen)\n {\n if ('themo_room' == $screen->post_type) {\n\n //lets hide everything\n $hidden = array('postexcerpt', 'slugdiv', 'postcustom', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');\n //$hidden[] = 'my_custom_meta_box';//for custom meta box, enter the id used in the add_meta_box() function.\n }\n return $hidden;\n }", "function GTPress_hide_postmeta() {\r\n\tif ($options['hide_postmeta'] == \"true\") {\r\n\t\tremove_meta_box( 'commentstatusdiv' , 'post' , 'normal' ); // allow comments for posts\r\n\t\tremove_meta_box( 'commentsdiv' , 'post' , 'normal' ); // recent comments for posts\r\n\t\tremove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts\r\n\t\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' ); // post trackbacks\r\n\t\tremove_meta_box( 'postexcerpt' , 'post' , 'normal' ); // post excerpts\r\n\t\tremove_meta_box( 'tagsdiv-post_tag' , 'post' , 'side' ); // post tags\r\n\t\tremove_meta_box( 'slugdiv','post','normal'); // post slug\r\n\t}\r\n}", "function GTPress_hide_pagemeta() {\r\n\tif ($options['hide_pagemeta'] == \"true\") {\r\n\t\tremove_meta_box( 'commentstatusdiv' , 'page' , 'normal' ); // allow comments for pages\r\n\t\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages\r\n\t\tremove_meta_box( 'postcustom' , 'page' , 'normal' ); // custom fields for pages\r\n\t\tremove_meta_box( 'trackbacksdiv' , 'page' , 'normal' ); // page trackbacks\r\n\t\tremove_meta_box( 'postexcerpt' , 'page' , 'normal' ); // page excerpts\r\n\t\tremove_meta_box( 'tagsdiv-post_tag' , 'page' , 'side' ); // page tags\r\n\t\tremove_meta_box( 'pageparentdiv','page','side'); // Page Parent\r\n\t\tremove_meta_box( 'slugdiv','page','normal'); // page slug\r\n\t}\r\n}", "function th_hide_meta_box($hidden, $screen)\n {\n if ('themo_tour' == $screen->post_type) {\n\n //lets hide everything\n $hidden = array('postexcerpt', 'slugdiv', 'postcustom', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');\n //$hidden[] = 'my_custom_meta_box';//for custom meta box, enter the id used in the add_meta_box() function.\n }\n return $hidden;\n }", "function gtpressMenu_disable_metas() {\r\n\r\n\tif (current_user_can('manage_options') && get_option('gtpressMenu_admins_see_everything'))\r\n\t\treturn;\r\n\r\n\tremove_action('admin_head', 'index_js');\r\n\r\n\t$disabled_metas = get_option('gtpressMenu_disabled_metas');\r\n\tif (!empty($disabled_metas)) {\r\n\t\t$metas = implode(',', $disabled_metas);\r\n\t\techo '<style type=\"text/css\">'.$metas.' {display: none !important}</style>';\r\n\t}\r\n\r\n}", "function ssep_hide_meta_field( $fields ) {\n\n\t$fields[] = array(\n\t\t'id' => '_ss_hide_meta',\n\t\t'name' => __( 'Hide Meta' ),\n\t\t'type' => 'checkbox',\n\t\t'desc' => __( 'Hide meta info for this post.', 'shoestrap' )\n\t);\n\n\treturn $fields;\n}", "public function add_admin_meta_boxes() {\n\n\t\t$id = 'hide_backend_options';\n\t\t$title = __( 'Hide Login Area', 'it-l10n-ithemes-security-pro' );\n\n\t\tadd_meta_box(\n\t\t\t$id,\n\t\t\t$title,\n\t\t\tarray( $this, 'metabox_hide_backend_settings' ),\n\t\t\t'security_page_toplevel_page_itsec_settings',\n\t\t\t'advanced',\n\t\t\t'core'\n\t\t);\n\n\t\t$this->core->add_toc_item(\n\t\t\tarray(\n\t\t\t\t'id' => $id,\n\t\t\t\t'title' => $title,\n\t\t\t)\n\t\t);\n\t}", "public function hideExtraField()\n {\n $this->houses=false;\n $this->jobs_training=false;\n $this->motorcycles =false;\n $this->cars = false;\n $this->offices=false;\n $this->lands_plots=false;\n return;\n }", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "function clix_uppe_meta_box(){\r\n\tglobal $post;\r\n\t// Use nonce for verification\r\n\techo '<input type=\"hidden\" name=\"clix_uppe_nonce\" id=\"clix_uppe_nonce\" value=\"' .\r\n\twp_create_nonce( plugin_basename(__FILE__) ) . '\" />';\r\n\t// Output checkboxes\r\n\t$options = array(\r\n\t\t'disable_home' \t\t\t=> 'Disable Listing on Home Page',\r\n\t\t'disable_tag' \t\t\t=> 'Disable on Tag Listings',\r\n\t\t'disable_archive' \t\t=> 'Disable Listing in Archives',\r\n\t\t'disable_search' \t\t=> 'Disable Listing in Search',\r\n\t\t'disable_unlesslogin' \t=> 'Disable Listing for Users Not Logged In',\r\n\t\t'disable_unlessshow'\t=> 'Disable but show available if Logged In'\r\n\t\t);\r\n\tforeach( $options as $option=>$legend ){\r\n?>\r\n<label for=\"clix_uppe_<?php echo $option; ?>\">\r\n\t<input type=\"checkbox\" name=\"_clix_uppe_<?php echo $option; ?>\" id=\"clix_uppe_<?php echo $option; ?>\" <?php\r\n\t\tif ( get_post_meta( $post->ID, \"_clix_uppe_$option\", true ) == '1' )\r\n\t\t\techo ' checked=\"checked\"';\r\n\t?>/>\r\n\t<?php echo $legend; ?>\r\n</label>\r\n<br /><?php\r\n\t}\r\n}", "public function render_metabox_hide_fields_for_page($post){\n\n\t\twp_nonce_field('post_metabox_hide_fields_for_page', 'post_metabox_hide_fields_for_page_nonce');\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_box_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_box_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_box_author.'\">'.__('Hide about author', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_date , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_date.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_date.'\">'.__('Hide published date', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_author.'\">'.__('Hide meta author', THEME_NAME).'</label></div>';\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_comments , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_comments.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for=\"'.self::$checkbox_post_comments.'\">'.__('Hide comments', THEME_NAME).'</label></div>';\n\t}", "function remove_meta_boxes()\n {\n\n \tif( UserRoleController::isStudent() || ! current_user_can( 'publish_posts' ) )\n \t{\n \t\t//remove_meta_box( 'wpseo-dashboard-overview','project','normal' );\n \t\tremove_meta_box( 'commentstatusdiv','project', 'normal' );\n \t\tremove_meta_box( 'commentsdiv','project','normal' );\n \t\tremove_meta_box( 'statusdiv','project','normal' );\n \t\t\n \t\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n \t\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n \t\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n \t\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n \t\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n \t\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n \t\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n \t\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n \t\tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8\n\n \t\tremove_meta_box( 'themeisle', 'dashboard', 'normal');//since 3.8 \t\t\n \t\tremove_meta_box( 'logincust_subscribe_widget', 'dashboard', 'normal');//since 3.8\n\n \t}\n }", "function remove_metaboxes() {\n //remove_meta_box( 'postcustom' , 'product' , 'normal' );\n remove_meta_box( 'postexcerpt' , 'product' , 'normal' );\n //remove_meta_box( 'commentsdiv' , 'product' , 'normal' );\n //remove_meta_box( 'tagsdiv-product_tag' , 'product' , 'normal' );\n}", "function get_hidden_meta_boxes($screen)\n {\n }", "protected function matchHideForNonAdminsCondition() {}", "function ssep_force_hide_meta() {\n\tglobal $post, $ss_blog;\n\n\t$hide_meta = ssep_hide_meta( $post->ID );\n\n\tif ( $hide_meta ) {\n\t\tremove_action( 'shoestrap_entry_meta', array( $ss_blog, 'meta_custom_render' ) );\n\t\tadd_filter( 'shoestrap_the_tags', '__return_null' );\n\t\tadd_filter( 'shoestrap_the_cats', '__return_null' );\n\t}\n}", "function clix_uppe_add_meta_box() {\r\n\tif( function_exists('add_meta_box') ) {\r\n\t\tadd_meta_box( 'clix_uppe_meta_box', 'Clix Category Exclusion', 'clix_uppe_meta_box', post, 'side' );\r\n \t}\r\n}", "function dreams_hide_admin_bar($content) {\r\n\treturn current_user_can('manage_options') ? $content : false;\r\n}", "function my_remove_meta_boxes() {\n\tremove_meta_box('tagsdiv-awards_sponsor_type', 'awards_sponsors', 'side');\n}", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden() {\n return false;\n }", "function wpct_hide_toolbars() {\n\t\t$user = get_userdata( get_current_user_id() );\n\t\tif(!isset($user->roles)) {\n\t\t\treturn;\n\t\t}\n\t\t$settings = get_option( 'wpct_settings' );\n\t\t$hide = $this->menus;\n\t\tforeach($user->roles as $rkey => $r) {\n\t\t\tforeach($this->menus as $mkey => $m) {\n\t\t\t\tif($settings[$r][$mkey] != 1) {\n\t\t\t\t\tunset($hide[$mkey]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach(array_keys($hide) as $h) {\n\t\t\twp_enqueue_style( \"wpct-hide-{$h}\", plugins_url( \"/css/{$h}.css\", __FILE__ ), [], microtime() );\n\t\t}\n\t}", "public function setHidden(){\n $this->_hidden = true;\n }", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "public function isHidden() {\r\n return false;\r\n }", "public function isHidden() {\r\n return false;\r\n }", "function humcore_remove_meta_boxes() {\n\n\tremove_meta_box( 'humcore_deposit_subjectdiv', 'humcore_deposit', 'side' );\n\tremove_meta_box( 'tagsdiv-humcore_deposit_tag', 'humcore_deposit', 'side' );\n\n}", "public function isHidden()\n {\n return false;\n }", "function remove_my_post_metaboxes() {\n remove_meta_box( 'formatdiv','post','normal' ); // Format Div\n remove_meta_box( 'postcustom','post','normal' ); // Custom Fields\n remove_meta_box( 'trackbacksdiv','post','normal' ); // Trackback and Pingback\n remove_meta_box( 'postexcerpt','post','normal' ); // Custom Excerpt\n remove_meta_box( 'slugdiv','post','normal' ); // Custom Slug\n}", "function lgm_theme_remove_tags_metabox() {\n\t remove_meta_box('tagsdiv-post_tag', 'post', 'side');\n\t}", "function my_remove_dashboard_widgets() {\n $user = wp_get_current_user();\n if ( ! $user->has_cap( 'manage_options' ) ) {\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n }\n}", "function remove_extra_meta_boxes() {\n\tremove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts.\n\tremove_meta_box( 'revisionsdiv' , 'post' , 'normal' ); // custom fields for posts.\n\tremove_meta_box( 'postcustom' , 'page' , 'normal' ); // custom fields for pages.\n\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages.\n\tremove_meta_box( 'tagsdiv-post_tag' , 'page' , 'side' ); // page tags.\n\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' ); // post trackbacks.\n\tremove_meta_box( 'trackbacksdiv' , 'page' , 'normal' ); // page trackbacks.\n\tremove_meta_box( 'slugdiv', 'post', 'normal' ); // post slug.\n\tremove_meta_box( 'slugdiv', 'page', 'normal' ); // page slug.\n}", "public static function add_to_wc_metabox(){\n global $post;\n\n echo '<div class=\"options_group\">';\n\n echo woocommerce_wp_checkbox( array(\n 'id' => '_only_item_in_cart',\n 'label' => __( 'Only Item In Cart' ) ,\n 'description' => __( 'For special items that need to be purchased individually.', 'wc-only-item-in-cart' )\n )\n );\n\n echo '</div>';\n\n }", "function remove_metaboxes() {\n\t// Examples:\n\t// Removes the featured image meta box from all pages\n\tremove_meta_box( 'postimagediv', 'page', 'side' );\n\t// Removes the comments meta box from all pages\n\tremove_meta_box( 'commentsdiv', 'page', 'normal' );\n\t// Removes the comments meta box from all posts\n\t// remove_meta_box( 'commentsdiv', 'post', 'normal' );\n}", "function custom_remove() { \n remove_meta_box('add-sfwd-certificates', 'nav-menus', 'side');\n remove_meta_box('add-sfwd-assignment', 'nav-menus', 'side'); \n}", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "function remove_metaboxes(){\n // remove_meta_box( 'tagsdiv-keywords', 'ticket', 'side' );\n remove_meta_box( 'versiondiv', 'ticket', 'side' );\n remove_meta_box( 'milestonediv', 'ticket', 'side' );\n remove_meta_box( 'componentdiv', 'ticket', 'side' );\n remove_meta_box( 'prioritydiv', 'ticket', 'side' );\n remove_meta_box( 'severitydiv', 'ticket', 'side' );\n remove_meta_box( 'ticket_typediv', 'ticket', 'side' );\n remove_meta_box( 'resolutiondiv', 'ticket', 'side' );\n //remove_meta_box( 'severitydiv', 'ticket', 'side' );\n //remove_meta_box( 'severitydiv', 'ticket', 'side' );\n }", "public function remove_meta_boxes(){\r\n remove_meta_box('slugdiv', 'cycloneslider', 'normal');\r\n }", "public function isHidden()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "function create_sitewide_metabox() {\n\t\t$post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' ) );\n\t\tforeach ( $post_types as $post_type )\n\t\t\techo '<p><input type=\"checkbox\" name=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\" id=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\" value=\"1\" ' . checked( genesis_get_option( 'be_title_toggle_' . $post_type ), false ) .' /> <label for=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\"> ' . sprintf( __( 'By default, remove titles in the <strong>%s</strong> post type.', 'genesis-title-toggle' ), $post_type ) .'</label></p>';\n\n\t\n\t}", "function the_block_editor_meta_box_post_form_hidden_fields($post)\n {\n }", "public function remove_meta_box() {\n\t\tremove_meta_box( $this->tax_name . 'div', 'ctrs-projects', 'side' );\n\t}", "function mom_exclude_menu_items( $items ) {\n\n $hide_children_of = array();\n\n // Iterate over the items to search and destroy\n foreach ( $items as $key => $item ) {\n\n $visible = true;\n\n // hide any item that is the child of a hidden item\n if( in_array( $item->menu_item_parent, $hide_children_of ) ){\n $visible = false;\n $hide_children_of[] = $item->ID; // for nested menus\n }\n\n // check any item that has NMR roles set\n if( $visible && isset( $item->roles ) ) {\n\n // check all logged in, all logged out, or role\n switch( $item->roles ) {\n case 'in' :\n $visible = is_user_logged_in() ? true : false;\n break;\n case 'out' :\n $visible = ! is_user_logged_in() ? true : false;\n break;\n default:\n $visible = false;\n if ( is_array( $item->roles ) && ! empty( $item->roles ) ) {\n foreach ( $item->roles as $role ) {\n if ( current_user_can( $role ) ) \n $visible = true;\n }\n }\n\n break;\n }\n\n }\n\n // add filter to work with plugins that don't use traditional roles\n $visible = apply_filters( 'nav_menu_roles_item_visibility', $visible, $item );\n\n // unset non-visible item\n if ( ! $visible ) {\n $hide_children_of[] = $item->ID; // store ID of item \n unset( $items[$key] ) ;\n }\n\n }\n\n return $items;\n}", "function remove_box() {\n\tif (!current_user_can('manage_options')){\n\t\tremove_post_type_support('location', 'title');\n\t}\n}", "function cinerama_edge_remove_default_custom_fields() {\n\t\tforeach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n\t\t\tforeach ( apply_filters( 'cinerama_edge_filter_meta_box_post_types_remove', array( 'post', 'page' ) ) as $postType ) {\n\t\t\t\tremove_meta_box( 'postcustom', $postType, $context );\n\t\t\t}\n\t\t}\n\t}", "function not_approved_menu() {\n\t\tadd_options_page(\n\t\t\t'AdControl',\n\t\t\t'AdControl',\n\t\t\t'manage_options',\n\t\t\t'adcontrol',\n\t\t\tarray( $this, 'userdash_not_approved' )\n\t\t);\n\t}", "function action_custom_box()\n {\n add_meta_box(\n $this->plugin->config['meta']['box-name'],\n 'Protect Content',\n [$this, 'custom_box_html'],\n ['page', 'post'],\n 'normal',\n 'high'\n );\n }", "function studiare_metaboxes() {\n\t$prefix = '_studiare_';\n\n\t$studiare_metaboxes = new_cmb2_box( array(\n\t\t'id' => 'page_metabox',\n\t\t'title' => esc_html__( 'Page Settings', 'studiare' ),\n\t\t'object_types' => array( 'page', 'post' ),\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true,\n\t) );\n\n\t$studiare_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Disable Page title', 'studiare' ),\n\t\t'desc' => esc_html__( 'You can hide page heading for this page', 'studiare' ),\n\t\t'id' => $prefix . 'disable_title',\n\t\t'type' => 'checkbox',\n\t) );\n\n\t$studiare_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Disable breadcrumbs', 'studiare' ),\n\t\t'desc' => esc_html__( 'You can hide breadcrumbs for this page', 'studiare' ),\n\t\t'id' => $prefix . 'disable_breadcrumbs',\n\t\t'type' => 'checkbox',\n\t) );\n\n\t$studiare_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Disable footer widgets', 'studiare' ),\n\t\t'desc' => esc_html__( 'You can disable footer widgets area for this page', 'studiare' ),\n\t\t'id' => $prefix . 'footer_off',\n\t\t'type' => 'checkbox',\n\t) );\n\n\t$studiare_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Disable sub-footer', 'studiare' ),\n\t\t'desc' => esc_html__( 'You can disable sub-footer for this page', 'studiare' ),\n\t\t'id' => $prefix . 'copyrights_off',\n\t\t'type' => 'checkbox',\n\t) );\n\n\t$studiare_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Disable top-bar', 'studiare' ),\n\t\t'desc' => esc_html__( 'You can disable top-bar for this page', 'studiare' ),\n\t\t'id' => $prefix . 'top_bar_off',\n\t\t'type' => 'checkbox',\n\t) );\n\n\t$courses_metaboxes = new_cmb2_box( array(\n\t 'id' => 'product_metabox',\n 'title' => esc_html__( 'Course Details', 'studiare' ),\n 'object_types' => array( 'product' ),\n 'context' => 'normal',\n 'priority' => 'core',\n 'show_names' => true,\n ) );\n\n\n $courses_metaboxes->add_field( array(\n 'name' => esc_html__( 'Teacher', 'studiare' ),\n 'desc' => esc_html__( 'Select teacher for this course', 'studiare' ),\n// 'default' => '',\n 'id' => $prefix . 'course_teacher',\n 'type' => 'select',\n 'options' => studiare_get_teachers_list()\n ) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Duration', 'studiare' ),\n\t\t'desc' => esc_html__( 'Duration of course in hours', 'studiare' ),\n\t\t'default' => '7 hours on-demand video',\n\t\t'id' => $prefix . 'course_duration',\n\t\t'type' => 'text',\n ) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Lessons', 'studiare' ),\n\t\t'desc' => esc_html__( 'Number of lessons included on course', 'studiare' ),\n\t\t'default' => '11 Lessons',\n\t\t'id' => $prefix . 'course_lesseons',\n\t\t'type' => 'text',\n\t) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Certifitcate', 'studiare' ),\n\t\t'id' => $prefix . 'course_certificate',\n\t\t'type' => 'text',\n 'default' => 'Certificate of Completion'\n\t) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Skill Level', 'studiare' ),\n\t\t'id' => $prefix . 'course_level',\n\t\t'type' => 'text',\n 'default' => 'Intermediate'\n\t) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Language', 'studiare' ),\n\t\t'id' => $prefix . 'course_language',\n\t\t'type' => 'text',\n\t\t'default' => 'English'\n\t) );\n\n\t$courses_metaboxes->add_field( array(\n 'name' => esc_html__( 'Intro Video URL', 'studiare' ),\n 'desc' => esc_html__( 'Supports 3 types of video urls: Direct video link, Youtube link, Vimeo link.', 'studiare' ),\n 'id' => $prefix . 'course_video',\n 'type' => 'text',\n 'default' => ''\n ) );\n\n\t$courses_metaboxes->add_field( array(\n\t 'name' => esc_html__( 'URL', 'studiare' ),\n 'id' => $prefix . 'woo_course_url',\n 'type' => 'text',\n\t 'default' => ''\n ) );\n\n\t$courses_metaboxes->add_field( array(\n\t\t'name' => esc_html__( 'Button text', 'studiare' ),\n\t\t'id' => $prefix . 'woo_course_label',\n\t\t'type' => 'text',\n\t\t'default' => ''\n\t) );\n\n}", "function wiki_shown_hidden($post){\n\t\t\n\t\t$status = get_post_meta($post->ID,'wiki-contributons-status',true);\n\t\t\n\t?>\t\n\t\tTo hide the table check the box &nbsp;\n\t\t\n\t\t<input type=\"checkbox\" value=\"hide\" name=\"wiki-tabel-shownorhide\" <?php checked('hide',$status); ?> /> \n\t\n\t<?php\t\n\t}", "protected function get_displayinmenublock() {\n return false;\n }", "function is_hidden() {\n trigger_error('Admin class does not implement method <strong>is_hidden()</strong>', E_USER_WARNING);\n return;\n }", "public function metabox_hide_backend_settings() {\n\n\t\techo '<p>' . __( 'Hides the login page (wp-login.php, wp-admin, admin and login) making it harder to find by automated attacks and making it easier for users unfamiliar with the WordPress platform.', 'it-l10n-ithemes-security-pro' ) . '</p>';\n\n\t\t$this->core->do_settings_section( 'security_page_toplevel_page_itsec_settings', 'hide_backend-enabled', false );\n\t\t$this->core->do_settings_section( 'security_page_toplevel_page_itsec_settings', 'hide_backend-settings', false );\n\n\t\techo '<p>' . PHP_EOL;\n\n\t\tsettings_fields( 'security_page_toplevel_page_itsec_settings' );\n\n\t\techo '<input class=\"button-primary\" name=\"submit\" type=\"submit\" value=\"' . __( 'Save All Changes', 'it-l10n-ithemes-security-pro' ) . '\" />' . PHP_EOL;\n\n\t\techo '</p>' . PHP_EOL;\n\n\t}", "function cc_hide_admin_bar() {\n\t$adminBar = current_user_can_for_blog( get_current_blog_id(),'edit_others_posts' );\n\n\tif ( ! $adminBar ) {\n\t\tshow_admin_bar( false );\n\t}\n}", "protected function hideFieldsForAddEdit()\n\t{\n\t\tif ($this->isAdd() || $this->isCopy() || $this->isGridAdd())\n\t\t\t$this->document_sequence->Visible = FALSE;\n\t}", "public function remove_meta_box() {\r\n\r\n\t\tif( ! is_wp_error( $this->tax_obj ) && isset($this->tax_obj->object_type) ) foreach ( $this->tax_obj->object_type as $post_type ):\r\n\t\t\t$id = ! is_taxonomy_hierarchical( $this->taxonomy ) ? 'tagsdiv-'.$this->taxonomy : $this->taxonomy .'div' ;\r\n\t \t\tremove_meta_box( $id, $post_type, 'side' );\r\n\t \tendforeach;\r\n\t}", "function admin_speedup_remove_post_meta_box() {\n\tglobal $post_type;\n\tif ( is_admin() && post_type_supports( $post_type, 'custom-fields' )) {\n\t\tremove_meta_box( 'postcustom', $post_type, 'normal' );\n\t}\n}", "public function setInvisibleFlag($invisible = true) {}", "public function isHidden();", "public function isHidden();", "public function isHidden();", "public function isHidden();", "public function hide() {\n\t\treturn true;\n\t}", "public function hide() {\n\t\treturn true;\n\t}", "function custom_hide_dashboard_widgets() {\n\n global $wp_meta_boxes;\n\n // Today widget.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] );\n // Last comments.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );\n // Incoming links.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );\n // Plugins.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );\n // WordPress blog.\n unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );\n // WordPress news.\n unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );\n\n}", "public function isHidden(): bool\n {\n return false;\n }", "public function remove_meta_boxes() {\n\n\t\t// Remove the event types taxonomy meta box.\n\t\tremove_meta_box( 'tagsdiv-event_types', 'schedule', 'side' );\n\n\t\t// Remove the session categories taxonomy meta box.\n\t\tremove_meta_box( 'tagsdiv-session_categories', 'schedule', 'side' );\n\n\t}", "function remove_person_meta_box() {\n $post_types = get_post_types( '', 'names' );\n foreach ( $post_types as $post_type ) {\n remove_meta_box( 'tagsdiv-person', ''. $post_type .'', 'side' );\n }\n}", "public function render_meta_hide_fields_for_post($post){\n\n\t\t// Add an nonce field so we can check for it later.\n\t\twp_nonce_field('post_metabox_hide_fields_for_post', 'post_metabox_hide_fields_for_post_nonce');\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_box_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_box_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_box_author.'\">'.__('Hide about author', THEME_NAME).'</label></div>';\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_related , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_related.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_related.'\">'.__('Hide related', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_date , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_date.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_date.'\">'.__('Hide published date', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_author.'\">'.__('Hide meta author', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_categories , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_categories.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_categories.'\">'.__('Hide meta categories', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_tags , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_tags.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_tags.'\">'.__('Hide meta tags', THEME_NAME).'</label></div>';\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_comments , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_comments.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for=\"'.self::$checkbox_post_comments.'\">'.__('Hide comments', THEME_NAME).'</label></div>';\n\t}", "function remove_postcustom() {\n\tremove_meta_box( 'postcustom', null, 'normal' );\n}", "function TS_VCSC_Testimonials_RemoveExternalMetaboxes() { \r\n\t\tglobal $pagenow;\r\n\t\t$screen = TS_VCSC_GetCurrentPostType();\r\n\t\tif ($screen=='ts_testimonials') {\r\n\t\t\tif ($pagenow=='post-new.php' || $pagenow=='post.php') {\r\n\t\t\t\tremove_meta_box('eg-meta-box', 'ts_testimonials', 'normal'); \r\n\t\t\t\tremove_meta_box('mymetabox_revslider_0', 'ts_testimonials', 'normal'); \r\n\t\t\t} \r\n\t\t} \r\n\t}", "function the_block_editor_meta_boxes()\n {\n }", "function TS_VCSC_RemoveMetaBoxesPostTypeGlobal() {\r\n\t\t\tforeach ($this->TS_VCSC_PostTypeMenuNames_Default as $key => $value) {\r\n\t\t\t\tif (post_type_exists($key)) {\r\n\t\t\t\t\t$this->TS_VCSC_RemoveMetaBoxesPostTypeSingle($key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function remove_categories_meta_box() {\r\n\t remove_meta_box( 'market_reports_categorydiv', 'market-reports', 'side' );// remove the Categories box\r\n\t}", "function remove_yoast_metabox_reservations(){\n\tremove_meta_box('wpseo_meta', 'hub_notification', 'normal');\n}", "function remove_meta_boxes( $hidden, $screen ) {\n\n\t\t\tglobal $wp_meta_boxes;\n\n\t\t\t$post_type = $screen->post_type;\n\t\t\t//example\n /*\n * $includes = array(\n * 'post' => array(\n * 'commentdiv' => 'equals|true',\n * 'acf_' => 'startsWith',\n * '_mybox' => 'endsWith',\n * '_editbox_' => 'contains',\n * )\n * );\n *\n */\n\t\t\t$includes = apply_filters('unity3/hide_metaboxes/include', false, $screen->post_type);\n\t\t\tif (!$includes) {\n\t\t\t return $hidden;\n }\n\n\t\t\t$post_types = array_keys($includes);\n\n\n\t\t\tif( in_array($post_type, $post_types) && isset( $wp_meta_boxes[$post_type] ) )\n\t\t\t{\n\t\t\t\t$tmp = array();\n\t\t\t\tforeach( (array) $wp_meta_boxes[$post_type] as $context_key => $context_item )\n\t\t\t\t{\n\t\t\t\t\tforeach( $context_item as $priority_key => $priority_item )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach( $priority_item as $metabox_key => $metabox_item ) {\n //establish the bias to remove the meta_box\n\t\t\t\t\t\t\t$remove_the_metabox = true;\n\t\t\t\t\t\t //now loop through our \"include\" filters\n foreach ($includes[$post_type] as $target_metabox_key => $value) {\n\n\t\t\t\t\t\t switch ($value) {\n case 'startsWith':\n\t if ( strpos($metabox_key, $target_metabox_key) === 0 ) {\n\t\t $remove_the_metabox = false;\n\t }\n break;\n case 'endsWith':\n\t $len = strlen($target_metabox_key);\n\t if ($len == 0 || substr($metabox_key, -$len) === $target_metabox_key) {\n\t\t $remove_the_metabox = false;\n\t }\n\t break;\n case 'contains':\n\t if ( strpos($metabox_key, $target_metabox_key) !== false ) {\n\t\t $remove_the_metabox = false;\n\t }\n break;\n\t\t\t\t\t\t\t case 'equals':\n\t\t\t\t\t\t\t case true:\n default:\n\t\t\t\t\t\t\t\t if ($target_metabox_key == $metabox_key) {\n\t\t\t\t\t\t\t\t\t $remove_the_metabox = false;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t break;\n }\n\n if (!$remove_the_metabox)\n break;\n }\n\n\t\t\t\t\t\t\tif ( $remove_the_metabox ) {\n\t\t\t\t\t\t\t\tunset($wp_meta_boxes[$post_type][$context_key][$priority_key][$metabox_key]);\n\t\t\t\t\t\t\t}\n\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\treturn $hidden;\n\n\t\t}", "public function add_missed_values() {\n\t\t\t/*\n\t\t\t'context' => 'normal', //where the meta box appear: normal (default), advanced, side\n\t\t\t'fields' => array(), //meta fields setup array\n\t\t\t'id' => 'demo_meta_box', //meta box id, unique per meta box\n\t\t\t'pages' => array( 'post', 'page' ), //post types\n\t\t\t'priority' => 'high', //order of meta box: high (default), low\n\t\t\t'tabs' => true, //tabbed meta box interface?\n\t\t\t'title' => 'Custom Meta Box', //meta box title\n\t\t\t*/\n\n\t\t\t// Default values for meta box\n\t\t\t$this->_meta_box = array_merge( array(\n\t\t\t\t\t\t'context' => 'normal',\n\t\t\t\t\t\t'pages' => array( 'post' ),\n\t\t\t\t\t\t'priority' => 'high',\n\t\t\t\t\t\t'tabs' => true,\n\t\t\t\t\t\t'visual-wrapper' => false,\n\t\t\t\t\t\t'visual-wrapper-add' => array()\n\t\t\t\t\t), (array) $this->_meta_box );\n\t\t}" ]
[ "0.68516964", "0.6673961", "0.6576593", "0.6425449", "0.6394282", "0.63839227", "0.6335782", "0.6296765", "0.62667173", "0.62560076", "0.6243336", "0.6225512", "0.6193966", "0.60205024", "0.60059434", "0.5996338", "0.59871435", "0.59853846", "0.5979172", "0.5955382", "0.5941871", "0.5938189", "0.59206235", "0.5915865", "0.5915865", "0.5915865", "0.5915178", "0.5913597", "0.5899398", "0.5897349", "0.58970237", "0.58970237", "0.5893779", "0.5882866", "0.58760816", "0.5875529", "0.5866062", "0.5856321", "0.5854228", "0.58471113", "0.584091", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.5837466", "0.58334136", "0.5830578", "0.58202577", "0.5801492", "0.5795262", "0.579217", "0.57797056", "0.57510865", "0.5750269", "0.5737441", "0.57340986", "0.5729977", "0.5719617", "0.57057434", "0.57023853", "0.56945467", "0.568611", "0.5684469", "0.568123", "0.5680757", "0.5678023", "0.56772494", "0.5671215", "0.5671215", "0.5671215", "0.5671215", "0.5652902", "0.5652902", "0.564764", "0.56440526", "0.56434524", "0.56367975", "0.56296754", "0.5628957", "0.5628002", "0.56252265", "0.56065774", "0.55965275", "0.5579795", "0.55646956", "0.55587244" ]
0.7478017
0
Set a mark that indicates that the metabox has already been saved.
public function setAlreadySaved() { $this->_alreadySaved = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setMark() {\n echo $this->promptMessage('choose_mark');\n $mark = $this->limitInput(array(self::X_MARK, self::O_MARK, self::QUIT_BUTTON));\n switch ($mark) {\n case self::X_MARK:\n $this->_userMark = self::X_MARK;\n $this->_botMark = self::O_MARK;\n break;\n case self::O_MARK:\n $this->_userMark = self::O_MARK;\n $this->_botMark = self::X_MARK;\n break;\n case self::QUIT_BUTTON:\n $this->quit();\n }\n echo \"You will be Player \" . $this->_userMark . \".\" . PHP_EOL;\n echo $this->promptMessage('start_game') . PHP_EOL;\n }", "public function markIfRequired($mark) {\n $this->markIfRequired = $mark;\n }", "public function setMarkToday($markToday)\n {\n $this->markToday = $markToday;\n }", "public function markIfRequired($mark);", "public function markAsPersisted(): void;", "public function setMarkIdentification($value) {\n\t\tself::$_markIdentification = $value;\n\t}", "function productMark($post)\r\n{\r\n ?>\r\n <p>\r\n <span>Признак(новинка): </span>\r\n\r\n <input type=\"checkbox\" <?php if(get_post_meta($post->ID, \"mark\", 1)){\r\n echo \"checked\";\r\n } ?> name='extra[mark]' value=\"1\">\r\n </p>\r\n <?php\r\n}", "function setMarkForDeletion($inMarkForDeletion) {\n\t\tif ( $inMarkForDeletion !== $this->_MarkForDeletion ) {\n\t\t\t$this->_MarkForDeletion = $inMarkForDeletion;\n\t\t}\n\t\treturn $this;\n\t}", "function setMarkForDeletion($inMarkForDeletion) {\n\t\tif ( $inMarkForDeletion !== $this->_MarkForDeletion ) {\n\t\t\t$this->_MarkForDeletion = $inMarkForDeletion;\n\t\t}\n\t\treturn $this;\n\t}", "function setMarkForDeletion($inMarkForDeletion) {\n\t\tif ( $inMarkForDeletion !== $this->_MarkForDeletion ) {\n\t\t\t$this->_MarkForDeletion = $inMarkForDeletion;\n\t\t}\n\t\treturn $this;\n\t}", "function setMarkForDeletion($inMarkForDeletion) {\n\t\tif ( $inMarkForDeletion !== $this->_MarkForDeletion ) {\n\t\t\t$this->_MarkForDeletion = $inMarkForDeletion;\n\t\t}\n\t\treturn $this;\n\t}", "function setMarkForDeletion($inMarkForDeletion) {\n\t\tif ( $inMarkForDeletion !== $this->_MarkForDeletion ) {\n\t\t\t$this->_MarkForDeletion = $inMarkForDeletion;\n\t\t}\n\t\treturn $this;\n\t}", "public function markForDelete() {\n\t$this->_markForDelete = true;\n }", "protected function markUndoDelete( )\r\n {\r\n $this->_sessie->registerUndoDelete( $this );\r\n }", "public function isAlreadySaved()\n\t\t{\n\t\t\treturn $this->_alreadySaved == true;\n\t\t}", "public function edit(Mark $mark)\n {\n //\n }", "protected function onSaved()\n {\n return true;\n }", "public function markRequiredFields($mark) {\n $this->markRequiredFields = $mark;\n }", "protected function _markNew() \n {\n DomainWatcher::addNewObject($this);\n }", "function mark_notification() {\n\t\tif ( check_ajax_referer( 'ht-dms', 'nonce' ) ) {\n\t\t\t$nID = pods_v_sanitized( 'nID', $_REQUEST );\n\t\t\t$value = ( pods_v( 'mark', $_REQUEST ) );\n\n\t\t\tif ( $nID && in_array( $value, array( 1, 0 ) ) ) {\n\t\t\t\t$id = ht_dms_notification_class()->viewed( $nID, null, $value );\n\n\t\t\t\tif ( $id == $nID ) {\n\t\t\t\t\twp_die( 1 );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\twp_die( 0 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "function beforesave(){\n\t\t// if it returns true, the item will be saved; if it returns false, it won't\n\t\treturn true;\n\t}", "public function markMove($cell, $pencilMarks=null, $args=array()) {\n $this->found[] = [\n \"cell\" => $cell->row() . $cell->col(),\n \"method\" => \"One Choice\",\n \"values\" => $cell->getValue(),\n \"grid\" => $this->grid->encoding(),\n ];\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "public function markAsNotDirty()\n {\n foreach ($this->getDirty() as $key) {\n $this->setDirty($key, false);\n }\n }", "function fb_like_meta_box_save( $post_id )\n{\n global $meta_box_fb_like;\n // Bail if we're doing an auto save\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n \n // if our nonce isn't there, or we can't verify it, bail\n if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n \n // if our current user can't edit this post, bail\n if( !current_user_can( 'edit_post' ) ) return;\n \n $chk = isset( $_POST[$meta_box_fb_like] )? 'on' : 'off';\n update_post_meta( $post_id, $meta_box_fb_like, $chk );\n}", "protected final function _markModified()\n {\n DomainWatcher::addModifiedObject($this);\n }", "public function isToBeMarked();", "public function markSpam()\n {\n $this->IsSpam = true;\n $this->Moderated = true;\n $this->write();\n $this->extend('afterMarkSpam');\n }", "public function getMarkToday()\n {\n return $this->markToday;\n }", "public function finish(Marker $mark)\n\t{\n\t\t$this->finish = $mark;\n\t}", "function mf_SALF_artist_meta_save_data($post_id) {\n\tglobal $artist_meta_box;\n\t\n\t\n\t\n\t\n \n \n // verify nonce\n if (!wp_verify_nonce($_POST['artist_meta_box_nonce'], basename(__FILE__))) {\n return $post_id;\n }\n\n // check autosave\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post_id;\n }\n\n // check permissions\n if ('page' == $_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) {\n return $post_id;\n }\n } elseif (!current_user_can('edit_post', $post_id)) {\n return $post_id;\n }\n \n foreach ($artist_meta_box['fields'] as $field) {\n\t\t\n\t\tif($field['type']!='checkbox'){\n $old = get_post_meta($post_id, $field['id'], true);\n $new = $_POST[$field['id']];\n\t\t \n\t\t\n if ($new && $new != $old) {\n update_post_meta($post_id, $field['id'], $new);\n } elseif ('' == $new && $old) {\n delete_post_meta($post_id, $field['id'], $old);\n }\n\n\t\t} else {\n\t\t\n\t\t$old = get_post_meta($post_id, 'mf_SALF_artist_meta_checks', true);\n\t\t$new = $_POST['mf_SALF_artist_meta_checks'];\n\t\t\n\t\t\n\t\tif ($new && $new != $old) {\n update_post_meta($post_id, 'mf_SALF_artist_meta_checks', $new);\n } elseif ('' == $new && $old) {\n delete_post_meta($post_id, 'mf_SALF_artist_meta_checks', $old);\n }\t\n\t\t}\n\t\t\n }\n}", "function mark_receiving_message($submit_mark_form, $state_check_mail_option){\n\t\tif( isset($_POST[$submit_mark_form]) ){\n\t\t\tif( !empty($_POST[$state_check_mail_option]) ){\n\t\t\t\tuser::update_sending_mail_message($_POST[$state_check_mail_option]);\n\t\t\t\theader(\"location: ../../basic_info.php\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$checkbox_insert = 0;\n\t\t\t\tuser::update_sending_mail_message($checkbox_insert);\n\t\t\t\theader(\"location: ../../basic_info.php\");\n\t\t\t}\n\n\t\t}\n\t}", "public function setSeen($seen){\n $this->seen = $seen;\n }", "public function autosaved()\n {\n }", "function _putSetCheckField($name){\n\t\tif(!isset($this->pkeyID) || isset($this->rc4key)) return;\n\t\techo \"<input type=\\\"hidden\\\" name=\\\"formitable_setcheck[]\\\" value=\\\"$name\\\"/>\\n\\n\";\n\t}", "protected function markAsChecked()\n {\n if ($this->isArrayInput()) {\n if (old()) {\n if (old($this->arrayInputBaseName())) {\n $this->addHtmlAttribute('checked', in_array($this->value, old($this->arrayInputBaseName())));\n } else {\n $this->addHtmlAttribute('checked', false);\n }\n } else {\n $this->addHtmlAttribute('checked', $this->checked);\n }\n } else {\n if (old()) {\n if (old($this->name)) {\n $this->addHtmlAttribute('checked', true);\n } else {\n $this->addHtmlAttribute('checked', false);\n }\n } else {\n $this->addHtmlAttribute('checked', $this->checked);\n }\n }\n }", "protected function markAsChecked()\n {\n if ($this->isArrayInput()) {\n if (old()) {\n if (old($this->arrayInputBaseName())) {\n $this->addHtmlAttribute('checked', in_array($this->value, old($this->arrayInputBaseName())));\n } else {\n $this->addHtmlAttribute('checked', false);\n }\n } else {\n $this->addHtmlAttribute('checked', $this->checked);\n }\n } else {\n if (old()) {\n if (old($this->name)) {\n $this->addHtmlAttribute('checked', true);\n } else {\n $this->addHtmlAttribute('checked', false);\n }\n } else {\n $this->addHtmlAttribute('checked', $this->checked);\n }\n }\n }", "public function setAutomaticLocation( $val, $markChanged=true ) {\n\t\t$this->automaticLocation = $val;\n\t\tif( $markChanged ) $this->isChanged = true;\n\t}", "function italystrap_meta_box_save( $post_id ){\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\n\t// if our nonce isn't there, or we can't verify it, bail\n\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n\t\n\t// if our current user can't edit this post, bail\n\t//http://code.tutsplus.com/tutorials/how-to-create-custom-wordpress-writemeta-boxes--wp-20336#comment-802227555\n\t//prevents undefined offset notice and cannot modify header warning - add second parameters $post_id\n\tif( !current_user_can( 'edit_post' , $post_id ) ) return;\n\t\n\t// now we can actually save the data\t\n\t// Probably a good idea to make sure your data is set\n\t// This is purely my personal preference for saving checkboxes\n\t$chk = ( isset( $_POST['slide'] ) && $_POST['slide'] ) ? 'on' : 'off';\n\tupdate_post_meta( $post_id, 'slide', $chk );\n}", "public function markUnchanged();", "public function isToBeMarked() {\n return $this->markIfRequired;\n }", "public function setFlag($flag);", "protected function beforeSave()\n {\n $this->saved = 0;\n return parent::beforeSave();\n }", "public function markAllAsSeen()\n {\n SystemLog::unseen()->update(['seen_at' => now()]);\n }", "protected function storeInitialMark()\n {\n $this->storeMark(\n 'Init',\n 'main',\n static::initialTime(),\n $this->trackMemory ? memory_get_usage(true) : 0,\n 0\n );\n }", "function _flashdata_mark()\n {\n $userdata = $this->all_userdata();\n foreach ($userdata as $name => $value)\n {\n $parts = explode(':new:', $name);\n if (is_array($parts) && count($parts) === 2)\n {\n $new_name = $this->flashdata_key.':old:'.$parts[1];\n $this->set_userdata($new_name, $value);\n $this->unset_userdata($name);\n }\n }\n }", "public function SetChecked()\n {\n $this->SetValue($this->GetCheckedValue());\n }", "public function toggleSave() : void\n {\n }", "public function resetMarker()\n {\n $this->currentMarker = -1;\n }", "public function save()\n {\n parent::save();\n\n $oRemark = oxNew(\"oxremark\");\n\n // try to load if exists\n $oRemark->load(oxRegistry::getConfig()->getRequestParameter(\"rem_oxid\"));\n\n $oRemark->oxremark__oxtext = new oxField(oxRegistry::getConfig()->getRequestParameter(\"remarktext\"));\n $oRemark->oxremark__oxheader = new oxField(oxRegistry::getConfig()->getRequestParameter(\"remarkheader\"));\n $oRemark->oxremark__oxparentid = new oxField($this->getEditObjectId());\n $oRemark->oxremark__oxtype = new oxField(\"r\");\n $oRemark->save();\n }", "function _isDirty() ;", "protected function markAsDeleted()\n {\n $this->deleted = true;\n }", "public static function unmarkAll() {\n\t\tUserEditor::unmarkAll();\n\t}", "protected function MetaAfterSave() {\n\t\t}", "function callbackSetType($value) {\n \n if ($this->type == $value) {\n return;\n }\n $this->widgets['type']->set_text($value);\n $this->type = $value;\n $this->setVisable();\n $this->table->database->dirty=true;\n $this->dirty = true;\n $this->table->database->save();\n \n }", "function updatemark($assid,$questionid, $studentid, $mark){\n\t\t\t$strQuery=\"update answers set mark = '$mark' where questionid = '$questionid' and stid = '$studentid' and assid='$assid'\";\n\t\t\t$result = $this->query($strQuery);\n\t}", "function _flashdata_mark()\n\t{\n\t\tforeach ($this->userdata as $name => $value)\n\t\t{\n\t\t\t$parts = explode(':new:', $name);\n\t\t\tif (is_array($parts) && count($parts) === 2)\n\t\t\t{\n\t\t\t\t$new_name = $this->flashdata_key.':old:'.$parts[1];\n\t\t\t\t$this->userdata[$new_name] = $value;\n\t\t\t\tunset($this->userdata[$name]);\n\t\t\t}\n\t\t}\n\t}", "public function markUnapproved()\n {\n $this->Moderated = false;\n $this->write();\n $this->extend('afterMarkUnapproved');\n }", "public function wpe_bsp_inline_post_box_save(){\n\t\t// Even though we disabled it, check for autosave\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n\t\treturn;\n\t\t// Setup data\n\t\t$post_id = get_the_ID();\n\t\t// Check if post exists\n\t\tif ( ! isset( $post_id ) )\n\t\treturn;\n\t\t// Check for user permissions\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) )\n\t\treturn;\n\t\t// Assign a value from metabox\n\t\tif ( isset( $_POST[$this->css_inline_key] ) ) {\n\t\t\t$final_value = stripslashes( $_POST[$this->css_inline_key] ) ;\n\t\t} else {\n\t\t\t$final_value = \"\";\t\n\t\t}\n\t\t// Save or delete weather empty or not\n\t\tif ( empty($final_value) ) {\n\t\t\tdelete_post_meta($post_id, $this->css_inline_key);\n\t\t} else {\n\t\t\tupdate_post_meta($post_id, $this->css_inline_key, $final_value);\n\t\t}\n\t}", "public function markFileExists($exists = true){\n $this->check_for_file = $exists ? 0 : 1;\n $this->last_file_checking = date('Y-m-d H:i:s');\n $this->save(false);\n }", "protected function onSaving()\n {\n return true;\n }", "function preSave()\n {\n }", "function meta_boxes_save() {\n\n\t\t// Bail out now if something not set\n\t\tif (\n\t\t\tisset( $_POST['_wpnonce'] ) &&\n\t\t\tisset( $_POST['post_ID'] ) &&\n\t\t\tisset( $_POST['_lingo_hidden'] ) // This is required to ensure that auto-saves are not processed\n\t\t) {\n\n\t\t\t// Do nonce security check\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\n\n\t\t\t// Grab post ID\n\t\t\t$post_ID = (int) $_POST['post_ID'];\n\t\t\t\n\t\t\t// Set wrong answers\n\t\t\tdelete_post_meta( $post_ID, '_wrong_answers' );\n\t\t\tforeach( $_POST['_wrong_answers'] as $key => $value ) {\n\t\t\t\tif ( $value != '' && $value != 0 ) {\n\t\t\t\t\t$value = (int) $value;\n\t\t\t\t\tadd_post_meta( $post_ID, '_wrong_answers', $value );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Stash all the post meta\n\t\t\tforeach( $this->post_meta as $key => $x ) {\n\t\t\t\tif ( isset( $_POST[$key] ) ) {\n\t\t\t\t\t$value = (int) $_POST[$key];\n\t\t\t\t\tif ( $value != 0 )\n\t\t\t\t\t\tupdate_post_meta( $post_ID, $key, $value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "static function setAllDirty()\n\t{\n\t\tglobal $ilDB;\n\t\n\t\t$ilDB->manipulate(\"UPDATE ut_lp_marks SET \".\n\t\t\t\" status_dirty = \".$ilDB->quote(1, \"integer\")\n\t\t\t);\n\t\t\n\t}", "public function set_mark_and_feedback($mark, $html) {\n $this->actualmark = $mark;\n $this->feedbackhtml = $html;\n if (abs($mark - $this->maxpossmark) > self::TOLERANCE) {\n $this->errorcount += 1;\n }\n }", "public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }", "public function mark($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function checkIsSaved()\n {\n if (isset($this->owner->primaryKey) == false) {\n throw new ModelIsUnsaved();\n }\n }", "protected function markConfirmDelete( )\r\n {\r\n $this->_sessie->registerConfirmDelete( $this );\r\n }", "public function save_event_history($flag)\n {\n $this->_store_history = (bool) $flag;\n }", "public function save_question($question, $form) {\n $form->defaultmark = 0;\n foreach ($form->answermark as $key => $data) {\n if (trim($form->answermark[$key]) == '' || trim($form->answer[$key]) == '') {\n continue;\n }\n // Question's default mark is the total of all non empty parts's marks.\n $form->defaultmark += $form->answermark[$key];\n }\n $question = parent::save_question($question, $form);\n return $question;\n }", "public function mark_answer($test){\n foreach ($this->questions as $key => $question){\n foreach ($question->answers as $answer) {\n if(in_array($answer->number, $test->answers)){\n $answer->marked = true;\n }\n }\n }\n }", "public function markApproved()\n {\n $this->IsSpam = false;\n $this->Moderated = true;\n $this->write();\n $this->extend('afterMarkApproved');\n }", "public function saved($artistAlias)\n {\n parent::saved($artistAlias);\n\n Log::Debug(\"Saved artist alias\", ['artist alias' => $artistAlias->id, 'artist' => $artistAlias->artist->id]);\n }", "protected function MetaBeforeSave() {\n\t\t\treturn SERIA_Meta::allowEdit($this);\n\t\t}", "function save()\n {\n parent::save();\n }", "function save()\n {\n parent::save();\n }", "function save()\n {\n parent::save();\n }", "function tm_pf_reset_like(){\n\t$screen = get_current_screen();\n\tif ( $screen->post_type == 'portfolio' && isset($_GET['action']) && $_GET['action']=='edit' && !isset($_GET['taxonomy']) ){\n\t\tglobal $post;\n\t\t$postID = $_GET['post'];\n\t\t$resetVal = get_post_meta($postID, '_thememount_portfolio_like_pflikereset' ,true );\n\t\tif( $resetVal=='on' ){\n\t\t\t// Do reset processs now\n\t\t\tupdate_post_meta($postID, 'thememount_likes' , '0' ); // Setting ZERO\n\t\t\tupdate_post_meta($postID, '_thememount_portfolio_like_pflikereset' ,'' ); // Removing checkbox\n\t\t}\n\t}\n\t\n}", "function set_checkpoint()\n\t{\n\t\t$this->guardar();\n\t}", "public function setPersisted($bool);", "public function mark($name)\n {\n $this->_marks[$name] = microtime(true);\n }", "public function setSavedData($data)\n {\n $this->getArchive()->set('saved_data', $data);\n }", "public function markRead ()\n\t{\n\t\tif (isset($_COOKIE[\"read\"]) && $_COOKIE[\"read\"] == 1)\n\t\t{\n\t\t\t$Statement = $this->Database->prepare(\"UPDATE messages SET unread = 0 WHERE reciever = ?\");\n\t\t\t$Statement->execute(array($this->id));\n\t\t\tsetcookie('read', 0, time()-3600);\n\t\t}\n\t}", "function preSave()\n\t{\n\n\t}", "function cd_meta_box_garoe_prom_product_save( $post_id )\n{\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n \n // if our nonce isn't there, or we can't verify it, bail\n if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n \n // if our current user can't edit this post, bail\n if( !current_user_can( 'edit_post' ) ) return;\n \n // Make sure your data is set before trying to save it\n\t$chk = isset( $_POST['mb_garoe_prom_product'] ) && $_POST['mb_garoe_prom_product'] ? 'on' : 'off';\n update_post_meta( $post_id, 'mb_garoe_prom_product', $chk );\n}", "function sm_meta_save( $post_id ) {\r\n \r\n // Checks save status\r\n $is_autosave = wp_is_post_autosave( $post_id );\r\n $is_revision = wp_is_post_revision( $post_id );\r\n $is_valid_nonce = ( isset( $_POST[ 'sm_nonce' ] ) && wp_verify_nonce( $_POST[ 'sm_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\r\n \r\n // Exits script depending on save status\r\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\r\n return;\r\n }\r\n \r\n // Checks for input and saves\r\nif( isset( $_POST[ 'meta-checkbox' ] ) ) {\r\n update_post_meta( $post_id, 'meta-checkbox', 'featured' );\r\n} else {\r\n update_post_meta( $post_id, 'meta-checkbox', '' );\r\n}\r\n \r\n}", "function cinerama_edge_meta_box_save( $post_id, $post ) {\n\t\tglobal $cinerama_edge_global_Framework;\n\n\t\t$nonces_array = array();\n\t\t$meta_boxes = cinerama_edge_framework()->edgtMetaBoxes->getMetaBoxesByScope( $post->post_type );\n\n\t\tif ( is_array( $meta_boxes ) && count( $meta_boxes ) ) {\n\t\t\tforeach ( $meta_boxes as $meta_box ) {\n\t\t\t\t$nonces_array[] = 'cinerama_edge_meta_box_' . $meta_box->name . '_save';\n\t\t\t}\n\t\t}\n\n\t\tif ( is_array( $nonces_array ) && count( $nonces_array ) ) {\n\t\t\tforeach ( $nonces_array as $nonce ) {\n\t\t\t\tif ( ! isset( $_POST[ $nonce ] ) || ! wp_verify_nonce( $_POST[ $nonce ], $nonce ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$postTypes = apply_filters( 'cinerama_edge_filter_meta_box_post_types_save', array( 'post', 'page' ) );\n\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! isset( $_POST['_wpnonce'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! in_array( $post->post_type, $postTypes ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $cinerama_edge_global_Framework->edgtMetaBoxes->options as $key => $box ) {\n\n\t\t\tif ( isset( $_POST[ $key ] ) && trim( $_POST[ $key ] !== '' ) ) {\n\n\t\t\t\t$value = $_POST[ $key ];\n\n\t\t\t\tupdate_post_meta( $post_id, $key, $value );\n\t\t\t} else {\n\t\t\t\tdelete_post_meta( $post_id, $key );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// save post link twitter content\n\t\t$is_twitter_post_format = false;\n\t\tif ( $post->post_type == 'post' && $_POST['post_format'] == 'link' && $_POST['edgtf_post_link_link_meta'] != '' ) {\n\t\t\t$link = $_POST['edgtf_post_link_link_meta'];\n\t\t\n\t\t\tif ( defined( 'CINERAMA_TWITTER_FEED_VERSION' ) && strpos( $link, 'twitter.com' ) !== false && strpos( $link, 'status' ) ) {\n\t\t\t\t$status_parts = explode( '/', $link );\n\t\t\t\t$status_id = $status_parts[5];\n\t\t\t\t$twitter_api = CineramaTwitterApi::getInstance();\n\t\t\t\t\n\t\t\t\tif ( $twitter_api->hasUserConnected() ) {\n\t\t\t\t\t$response = $twitter_api->getTweetById( $status_id, array() );\n\t\t\t\t\t$tweet_data = array();\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $response->data as $tweet ) {\n\t\t\t\t\t\t$tweet_data['text'] = $twitter_api->getHelper()->getTweetCleanText( $tweet );\n\t\t\t\t\t\t$tweet_data['author'] = $twitter_api->getHelper()->getTweetAuthor( $tweet );\n\t\t\t\t\t\t$tweet_data['time'] = $twitter_api->getHelper()->getTweetCreatedTime( $tweet );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( count( $tweet_data ) > 0 ) {\n\t\t\t\t\t\tupdate_post_meta( $post_id, 'edgtf_post_link_twitter_data_meta', $tweet_data );\n\t\t\t\t\t\t$is_twitter_post_format = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$is_twitter_post_format) {\n\t\t\tdelete_post_meta( $post_id, 'edgtf_post_link_twitter_data_meta' );\n\t\t}\n\t}", "public function save_meta_box( $post_id )\n {\n /* Happens every time the user saves the post */\n if ( ! ( isset ( $_POST['mtk_testimonial_author'] ) ) )\n {\n /* If the another post is saved, not the testimonial type then we just return the post id*/\n return ( $post_id );\n }\n /* then wer stoe our extra variables */\n /* We store our custom nonce */\n $nonce = $_POST['mtk_testimonial_author_nonce'];\n /* Verify the that the none is valid */\n if ( ! ( wp_verify_nonce ( $nonce , 'mtk_testimonial_author' ) ) )\n {\n /* if is not valid we stop the execution of the script */\n return ( $post_id );\n }\n /* We check if Wordpress is doing an autosave we interrupt the script */\n if ( defined ('DOING_AUTOSAVE') && DOING_AUTOSAVE)\n {\n return ( $post_id );\n }\n /* Check it the user has the ability to edit the post */\n if ( ! ( current_user_can ( 'edit_post' , $post_id ) ) )\n {\n return ( $post_id );\n }\n /* Store this metabox */\n $data = array(\n\t\t\t'name' => sanitize_text_field( $_POST['mtk_testimonial_author'] ),\n\t\t\t'email' => sanitize_email( $_POST['mtk_testimonial_email'] ),\n\t\t\t'approved' => isset($_POST['mtk_testimonial_approved']) ? 1 : 0,\n\t\t\t'featured' => isset($_POST['mtk_testimonial_featured']) ? 1 : 0,\n\t\t);\n update_post_meta( $post_id, '_mtk_testimonial_key', $data );\n }", "protected function afterSave()\n {\n return true;\n }", "protected function _preSave()\r\n {\r\n parent::_preSave();\r\n\r\n if($this->isChanged('custom_title')) {\r\n if (!$this->getOption('admin_edit')) {\r\n $this->custom_title_type = 'user_set';\r\n }\r\n }\r\n }" ]
[ "0.63364536", "0.60807633", "0.6040339", "0.6030701", "0.58288324", "0.578333", "0.55385184", "0.55079323", "0.55079323", "0.55079323", "0.55079323", "0.55079323", "0.54358995", "0.5430935", "0.53939855", "0.53809553", "0.53659403", "0.53399897", "0.53316647", "0.5329666", "0.53204584", "0.53066635", "0.5264891", "0.5264891", "0.5264891", "0.5264891", "0.5264891", "0.5264891", "0.5264891", "0.5264891", "0.5264891", "0.5264891", "0.52466446", "0.5206415", "0.51814324", "0.516945", "0.51237667", "0.5084298", "0.5054091", "0.5043288", "0.5031905", "0.5030504", "0.5017098", "0.5016488", "0.50031304", "0.50031304", "0.49857816", "0.4979258", "0.49540997", "0.49380863", "0.49336573", "0.49302912", "0.49071905", "0.48955595", "0.48939562", "0.4893694", "0.4893501", "0.48479393", "0.48392788", "0.4836359", "0.4831954", "0.48277745", "0.4827703", "0.4824944", "0.481592", "0.48157468", "0.4815298", "0.48120925", "0.48080274", "0.47974885", "0.47933322", "0.4790191", "0.47886604", "0.47845834", "0.47818053", "0.4777419", "0.47774014", "0.4772778", "0.47698247", "0.47650743", "0.4764803", "0.47646156", "0.4741205", "0.47373074", "0.4735352", "0.4735352", "0.4735352", "0.4735101", "0.47336915", "0.4719535", "0.47175407", "0.4711132", "0.47101483", "0.47049597", "0.47040778", "0.46941465", "0.46832561", "0.4682547", "0.4676416", "0.46735474" ]
0.7265603
0
Set the metabox showing conditions.
public function setConditions( $conditions ) { $this->_conditions = $conditions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_menu_item_criteres() {\n\treturn new icone_action('criteres',\"showHide('criteres','','show')\",'menu_criteres');\n\t\n}", "function display_conditions() {\n\t\t$output = '';\n\t\tforeach($this->conditions as $id => $set) {\n\t\t\tif(is_array($set)) {\n\t\t\t\t$ret = $this->do_set($set,$id.'_container');\n\t\t\t\tif(!$ret) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$output .= $ret;\n\t\t\t}\n\t\t}\n//echo '<pre>'.htmlentities($output).'</pre>';\n\t\tif(strlen(trim($output))) {\n\t\t\techo '\n<script type=\"text/javascript\">\n//<![CDATA[\n\t// Dynamically Generated Javascript for CF-Meta box display control\n\tjQuery(document).ready(function(){\n'.$output.'\n\t});'.PHP_EOL;\n\t\t\tif(is_array($this->comparison_funcs)) {\n\t\t\t\tforeach($this->comparison_funcs as $id => $func) {\n\t\t\t\t\techo PHP_EOL.'\t// CF-Meta comparison function for '.$id.$func;\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '\n//]]>\n</script>'.PHP_EOL;\n\t\t}\n\t}", "function miracle_add_visibility_fields($widget, $instance = false)\n {\n if ('advanced_text' == get_class($widget))\n return;\n\n $conditions = $this->miracle_widget_visibility_conditions();\n\n if (!$instance)\n {\n $widget_settings = get_option($widget->option_name);\n $instance = $widget_settings[$widget->number];\n }\n\n $allSelected = $homeSelected = $postSelected = $postInCategorySelected = $pageSelected =\n $categorySelected = $blogSelected = $searchSelected = false;\n switch ($instance['action'])\n {\n case \"1\":\n $showSelected = true;\n break;\n case \"0\":\n $dontshowSelected = true;\n break;\n }\n\n?>\t\t\t\n\t<div class=\"atw-conditions\">\n\t<strong><?php _e('Widget Visibility:', $this->textdomain);?></strong>\n <br /><br />\n\t<label for=\"<?php echo $widget->get_field_id('action');?>\" title=\"<?php _e('Show only on specified page(s)/post(s)/category. Default is All', $this->textdomain); ?>\" style=\"line-height:35px;\">\t\t\n\t<select name=\"<?php echo $widget->get_field_name('action');?>\">\n <option value=\"1\" <?php echo ($showSelected)? 'selected=\"selected\"':'';?>><?php _e('Show', $this->textdomain);?></option>\n\t\t\t<option value=\"0\" <?php echo ($dontshowSelected)? 'selected=\"selected\"':'';?>><?php _e('Do NOT show', $this->textdomain);?></option>\n\t\t</select> \n <?php _e('on', $this->textdomain); ?>\n\t\t<select name=\"<?php echo $widget->get_field_name('show');?>\" id=\"<?php echo $widget->get_field_id('show');?>\">\n <?php\n if (is_array($conditions) && !empty($conditions))\n {\n foreach ($conditions as $k => $item)\n {\n $output .= '<option label=\"' . $item['name'] . '\" value=\"' . $k . '\"' . selected($instance['show'],\n $k) . '>' . $item['name'] . '</option>';\n }\n }\n echo $output;\n ?>\n\t\t</select>\n\t</label>\n\t<br/> \n\t<label for=\"<?php echo $widget->get_field_id('slug'); ?>\" title=\"<?php _e('Optional limitation to specific page, post or category. Use ID, slug or title.',$this->textdomain);?>\"><?php _e('Slug/Title/ID:',$this->textdomain); ?> \n\t\t<input type=\"text\" style=\"width: 99%;\" id=\"<?php echo $widget->get_field_id('slug');?>\" name=\"<?php echo $widget->get_field_name('slug');?>\" value=\"<?php echo htmlspecialchars($instance['slug']); ?>\" />\n\t</label>\n\t<?php\n if ($postInCategorySelected)\n _e(\"<p>In <strong>Post In Category</strong> add one or more cat. IDs (not Slug or Title) comma separated!</p>\",$this->textdomain);\n ?>\n\t<br />\n\t<label for=\"<?php echo $widget->get_field_id('suppress_title'); ?>\" title=\"<?php _e('Do not output widget title in the front-end.', $this->textdomain);?>\">\n\t\t<input id=\"<?php echo $widget->get_field_name('suppress_title'); ?>\" name=\"<?php echo $widget->get_field_name('suppress_title'); ?>\" type=\"checkbox\" value=\"1\" <?php checked($instance['suppress_title'], '1', true);?> />\n <?php _e('Suppress Title Output', $this->textdomain); ?>\n\t</label>\n\t</div>\n<?php\n\n $return = null;\n }", "private function parseMetaboxConditions()\n\t\t{\n\t\t\tforeach( $this->_conditions as $condition ) {\n\t\t\t\tif( !$condition ) {\n\t\t\t\t\treturn '<style>#' . $this->_id . ' { display: none !important; }</style>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn '';\n\t\t}", "function gecapa_mant_BeforeShow()\n{\n $gecapa_mant_BeforeShow = true;\n//End gecapa_mant_BeforeShow\n\n//Custom Code @300-8D83BE6B\n// ------------------------- Si agrega una categorža, tomar la categoria padre del QueryString\n global $gecapa_mant;\n\t\n\tIF (!$gecapa_mant->EditMode) {\n\t\t$liCatPadre = CCGetParam(\"pPadre\", 0);\n\t\tif (is_null($liCatPadre) or empty ($liCatPadre)) $liCatPadre = 0;\n\t\t$gecapa_mant->lkNuevo->Visible = False;\n\t\t$gecapa_mant->cat_CodPadre->SetValue($liCatPadre);\n\t}\n if (!isset($_GET[\"pPadre\"]) AND !isset($_GET[\"cat_Codigo\"])) $gecapa_mant->Visible = False;\n if (isset($_GET[\"pPadre\"])) {\n\t\t$gecapa_mant->tbTitulo1->SetValue(\"NUEVA CATEGORIA\"); } \n if (isset($_GET[\"cat_Codigo\"])) {\n\t\t$gecapa_mant->tbTitulo1->SetValue(\"MODIFICACION DE CATEGORIA\"); } \n// -------------------------\n//End Custom Code\n\n//Close gecapa_mant_BeforeShow @288-96845E7F\n return $gecapa_mant_BeforeShow;\n}", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "public function disableHideMetaboxes()\n\t\t{\n\t\t\techo \"<style type='text/css'>label[for='\" . $this->_id . \"-hide'] { display: none; }</style>\";\n\t\t}", "function sb_modals_load_conditions_meta_box_callback() {\r\n\t\tglobal $post;\r\n\t\twp_nonce_field( $this->_nonce_action, $this->_nonce_name );\r\n\r\n\t\t$load_condition = get_post_meta( $post->ID, 'sb_modals__load_condition', true );\r\n?>\r\n\t\t<p>\r\n\t\t\t<label for=\"sb_modals__load_condition\"><?php echo __('Include modal code', 'sbmodal'); ?></label>\r\n\t\t\t<select name=\"sb_modals__load_condition\" id=\"sb_modals__load_condition\">\r\n\t\t\t<?php foreach( $this->_load_conditions as $value => $label):\r\n\t\t\t\t\t$_checked = ( strcmp($value, $load_condition)===0 ) ? 'selected=\"selected\"' : '' ;\r\n\t\t\t?>\r\n\t\t\t\t<option value=\"<?php echo $value; ?>\" <?php echo $_checked; ?>><?php echo $label; ?></option>\r\n\t\t\t<?php endforeach; ?>\r\n\t\t\t</select>\r\n\t\t</p>\r\n\t\t<p class=\"description\">If <b>\"<?php echo $this->_load_conditions['custom']; ?>\"</b> select the modal on the corresponding Page/Post edit page.</p>\r\n<?php\r\n\t}", "function setVisable() {\n $visable = array(\n //type // length // default // NotNull // Indexed // Sequence/Auto // unique // default value\n 'integer' => array( 1,1,1,1,1,1,0),\n 'decimal' => array( 1,1,1,1,0,1,0.0),\n 'float' => array( 1,1,1,1,0,1,0.0),\n 'double' => array( 1,1,1,1,0,1,0),\n 'text' => array( 1,1,1,1,0,1,''),\n 'cblob' => array( 1,0,0,0,0,0),\n 'blob' => array( 1,0,0,0,0,0),\n 'boolean' => array( 1,1,1,1,0,0),\n 'date' => array( 0,1,1,1,0,1,''),\n 'timestamp'=> array( 0,1,1,1,0,1,''),\n 'time' => array( 0,1,1,1,0,1,'')\n );\n \n $vis = $visable[$this->type];\n foreach(array('length','default','notnull','isIndex','sequence','unique') as $k=>$v) {\n if ($vis[$k]) {\n $this->widgets[$v]->show();\n $this->visable[$v] = 1;\n } else {\n $this->widgets[$v]->hide();\n $this->visable[$v] = 0;\n }\n }\n // hide defaults for sequences.\n //print_r(array($this->sequence,$vis[4]));\n if ($this->sequence && $vis[4]) {\n unset($this->default);\n $this->widgets['default']->hide();\n $this->visable['default'] = 0;\n $this->widgets['notnull']->set_active(true);\n $this->notnull = 1;\n $this->widgets['isIndex']->set_active(true);\n $this->isIndex = 1;\n }\n // set defaults if not null and !sequence and it's empty.\n if ($this->notnull && !$this->sequence && !strlen(@$this->default)) {\n $this->default = $vis[6];\n $this->widgets['default']->set_text($this->default);\n }\n \n if ($this->visable['default'] && \n isset($this->default) && \n $this->default == '' && \n isset($vis[6]) && \n ($this->default !== $vis[6])) \n {\n $this->default = $vis[6];\n $this->widgets['default']->set_text($this->default);\n }\n \n \n }", "function wiki_shown_hidden($post){\n\t\t\n\t\t$status = get_post_meta($post->ID,'wiki-contributons-status',true);\n\t\t\n\t?>\t\n\t\tTo hide the table check the box &nbsp;\n\t\t\n\t\t<input type=\"checkbox\" value=\"hide\" name=\"wiki-tabel-shownorhide\" <?php checked('hide',$status); ?> /> \n\t\n\t<?php\t\n\t}", "public function show_term_conditionAction() {\r\n\t\t$helper = Mage::helper('onestepcheckout');\r\n\t\tif ($helper->enableTermsAndConditions()) {\r\n\t\t\t$html = $helper->getTermsConditionsHtml();\r\n\t\t\techo $html;\r\n\t\t\techo '<p class=\"a-right\"><a href=\"#\" onclick=\"javascript:TINY.box.hide();return false;\">Close</a></p>';\r\n\t\t}\r\n\t}", "function create_sitewide_metabox() {\n\t\t$post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' ) );\n\t\tforeach ( $post_types as $post_type )\n\t\t\techo '<p><input type=\"checkbox\" name=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\" id=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\" value=\"1\" ' . checked( genesis_get_option( 'be_title_toggle_' . $post_type ), false ) .' /> <label for=\"' . GENESIS_SETTINGS_FIELD . '[be_title_toggle_' . $post_type . ']\"> ' . sprintf( __( 'By default, remove titles in the <strong>%s</strong> post type.', 'genesis-title-toggle' ), $post_type ) .'</label></p>';\n\n\t\n\t}", "function setDefaultWhenVisible() {\n $equations = array();\n list($branching_fields, ) = (function_exists('getBranchingFields')) ?\n getBranchingFields($_GET['page']) :\n \\DataEntry::getBranchingFields($_GET['page']);\n\n foreach ($branching_fields as $field => $equation) {\n list($equations[$field], ) = LogicTester::formatLogicToJS($equation, false, $_GET['event_id'], true);\n }\n\n // More current versions of REDCap do not have all js libraries loaded in time\n $this->setJsSetting('versionMod', version_compare(REDCAP_VERSION, '9.4.1', '>='));\n\n $this->setJsSetting('defaultWhenVisible', array('branchingEquations' => $equations));\n $this->includeJs('js/default_when_visible.js');\n }", "function hide_or_show_contributorstalbe($post_type, $post){\n\t\tadd_meta_box('wiki-table-hide-or-show',__('Show / Hide Wiki-Contribution Table'),array($this,'wiki_shown_hidden'),'incsub_wiki','advanced','high');\n\t}", "function admin_metaboxes() {\r\n\r\n// \t\t\t/** Check if wpeo_log_select_post_type exist */\r\n// \t\t\tif( !empty(\t$this->wpeologs_settings['post_type'] ) ) {\r\n// \t\t\t\tforeach ( $this->wpeologs_settings['post_type'] as $post_type ) {\r\n\r\n// \t\t\t\t\t//add_meta_box( 'wpeologs_metabox_' . $post_type, __( 'Logs', 'wpeologs-i18n'), array( &$this, 'associated_post_type_metabox' ), $post_type, 'normal' );\r\n// \t\t\t\t}\r\n// \t\t\t}\r\n\t\t}", "function checkbox_init(){\n add_meta_box(\"closing\", \"Closed ?\", \"closing\", \"closings\", \"normal\", \"high\");\n add_meta_box(\"delayed\", \"Delayed / Message ?\", \"delayed\", \"closings\", \"normal\", \"high\");\n add_meta_box(\"message_delayed\", \"Message:\", \"message_delayed\", \"closings\", \"normal\", \"high\");\n}", "function drawOptionsDisplay() {\r\n global $saveShowWbs, $saveShowClosed, $saveShowResource,$planningType, $showListFilter,$showClosedPlanningVersion;?>\r\n <table width=\"100%\">\r\n <?php if ($planningType!='contract' and $planningType!='version') {?>\r\n <tr class=\"checkboxLabel\">\r\n <td><?php echo ucfirst(i18n(\"labelShowWbs\".((isNewGui())?'':'Short')));?></td>\r\n <td width=\"35px\">\r\n <div title=\"<?php echo ucfirst(i18n('showWbs'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"showWBS\" name=\"showWBS\"\r\n <?php if ($saveShowWbs=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowWbs',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n </td>\r\n </tr>\r\n <?php }?>\r\n <tr class=\"checkboxLabel\" <?php echo ($planningType=='version')?'style=\"height:25px\"':''?>>\r\n <td><?php echo ucfirst(i18n(\"labelShowIdle\".((isNewGui() or $planningType=='version')?'':'Short')));?></td>\r\n <td style=\"width: 30px;\">\r\n <?php if ($planningType=='version') {?>\r\n <div title=\"<?php echo i18n('labelShowIdle')?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"showClosedPlanningVersion\" name=\"showClosedPlanningVersion\"\r\n <?php if ($showClosedPlanningVersion=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningVersionShowClosed',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php } else {?>\r\n <div title=\"<?php echo ucfirst(i18n('showIdleElements'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"listShowIdle\" name=\"listShowIdle\"\r\n <?php if ($saveShowClosed=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowClosed',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php }?>\r\n </td>\r\n </tr>\r\n <?php \r\n if (strtoupper(Parameter::getUserParameter('displayResourcePlan'))!='NO' and ($planningType=='planning' or $planningType=='global' or $planningType=='contract' or $planningType=='version') ) {?>\r\n <tr class=\"checkboxLabel\" <?php echo ($planningType=='version')?'style=\"height:25px\"':''?>>\r\n <td>\r\n <?php if ($planningType=='version') {?><div id=\"displayRessource\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>;\"><?php }?>\r\n <?php echo ucfirst(i18n(\"labelShowResource\".((isNewGui() or $planningType=='version')?'':'Short')));?>\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n <td style=\"width: 30px;\">\r\n <?php if ($planningType=='version') {?><div id=\"displayRessourceCheck\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>!important;\"><?php }?>\r\n <div title=\"<?php echo ucfirst(i18n('showResources'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" \r\n <?php if ($planningType=='version') {?>id=\"showRessourceComponentVersion\" name=\"showRessourceComponentVersion\"<?php } else { ?>id=\"listShowResource\" name=\"listShowResource\"<?php }?> \r\n <?php if ($saveShowResource=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowResource',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n </tr>\r\n <?php \r\n }?>\r\n </table>\r\n<?php \r\n}", "public static function add_to_wc_metabox(){\n global $post;\n\n echo '<div class=\"options_group\">';\n\n echo woocommerce_wp_checkbox( array(\n 'id' => '_only_item_in_cart',\n 'label' => __( 'Only Item In Cart' ) ,\n 'description' => __( 'For special items that need to be purchased individually.', 'wc-only-item-in-cart' )\n )\n );\n\n echo '</div>';\n\n }", "function edd_incentives_render_conditions() {\n global $post;\n\n $post_id = $post->ID;\n $meta = get_post_meta( $post_id, '_edd_incentive_meta', true );\n $downloads = get_posts( array( 'post_type' => 'download', 'numberposts' => 999999, 'post_status' => 'publish' ) );\n $product_css = ( ! isset( $meta['condition_type'] ) || $meta['condition_type'] == 'products' ? '' : ' style=\"display: none;\"' );\n $value_css = ( isset( $meta['condition_type'] ) && $meta['condition_type'] == 'value' ? '' : ' style=\"display: none;\"' );\n $count_css = ( isset( $meta['condition_type'] ) && $meta['condition_type'] == 'count' ? '' : ' style=\"display: none;\"' );\n\n // Condition type\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_condition_type\">' . __( 'Type', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[condition_type]\" id=\"_edd_incentive_condition_type\">';\n echo '<option value=\"products\"' . ( ! isset( $meta['condition_type'] ) || $meta['condition_type'] == 'products' ? ' selected' : '' ) . '>' . __( 'Products in cart', 'edd-incentives' ) . '</option>';\n echo '<option value=\"value\"' . ( $meta['condition_type'] == 'value' ? ' selected' : '' ) . '>' . __( 'Combined value', 'edd-incentives' ) . '</option>';\n echo '<option value=\"count\"' . ( $meta['condition_type'] == 'count' ? ' selected' : '' ) . '>' . __( 'Number of products', 'edd-incentives' ) . '</option>';\n echo '</select>';\n echo '</p>';\n\n echo '<div class=\"edd-incentive-condition-product\"' . $product_css . '>';\n\n // Condition... condition?\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_product_condition\">' . __( 'Condition', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[product_condition]\" id=\"_edd_incentive_product_condition\">';\n echo '<option value=\"any\"' . ( ! isset( $meta['product_condition'] ) || $meta['product_condition'] == 'any' ? ' selected' : '' ) . '>' . __( 'Any of the products', 'edd-incentives' ) . '</option>';\n echo '<option value=\"all\"' . ( $meta['product_condition'] == 'all' ? ' selected' : '' ) . '>' . __( 'All of the products', 'edd-incentives' ) . '</option>';\n echo '</select>';\n echo '</p>';\n\n // Downloads\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_downloads\">' . __( 'Downloads', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[downloads][]\" id=\"_edd_incentive_downloads\" multiple>';\n foreach( $downloads as $key => $download ) {\n echo '<option value=\"' . $download->ID . '\"' . ( array_key_exists( $download->ID, $meta['downloads'] ) ? ' selected' : '' ) . '>' . $download->post_title . '</option>';\n }\n echo '</select>';\n echo '</p>';\n\n echo '</div>';\n\n echo '<div class=\"edd-incentive-condition-value\"' . $value_css . '>';\n\n // Minimum value\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_minimum_value\">' . __( 'Minimum Value', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" name=\"_edd_incentive_meta[minimum_value]\" id=\"_edd_incentive_minimum_value\" value=\"' . ( isset( $meta['minimum_value'] ) ? $meta['minimum_value'] : '' ) . '\" placeholder=\"' . edd_incentives_get_currency() . '\" />';\n echo '</p>';\n\n // Maximum value\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_maximum_value\">' . __( 'Maximum Value', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" name=\"_edd_incentive_meta[maximum_value]\" id=\"_edd_incentive_maximum_value\" value=\"' . ( isset( $meta['maximum_value'] ) ? $meta['maximum_value'] : '' ) . '\" placeholder=\"' . edd_incentives_get_currency() . '\" />';\n echo '</p>';\n\n echo '</div>';\n\n echo '<div class=\"edd-incentive-condition-count\"' . $count_css . '>';\n\n // Minimum count\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_minimum_count\">' . __( 'Minimum Number', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"number\" min=\"0\" name=\"_edd_incentive_meta[minimum_count]\" id=\"_edd_incentive_minimum_count\" value=\"' . ( isset( $meta['minimum_count'] ) && $meta['minimum_count'] != '' ? $meta['minimum_count'] : '0' ) . '\" />';\n echo '</p>';\n\n // Maximum count\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_maximum_count\">' . __( 'Maximum Number', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"number\" min=\"0\" name=\"_edd_incentive_meta[maximum_count]\" id=\"_edd_incentive_maximum_count\" value=\"' . ( isset( $meta['maximum_count'] ) && $meta['maximum_count'] != '' ? $meta['maximum_count'] : '0' ) . '\" />';\n echo '</p>';\n\n echo '</div>';\n}", "function plugin_add_custom_meta_boxes(){\n add_meta_box( \"vehicle_inspector\", __(\"Vehicle Inspector\", \"listings\"), \"vehicle_inspector_make_meta_box\", \"listings\", \"side\", \"core\", array(\"name\" => \"vehicle_inspector\"));\n\tadd_meta_box( \"vehicle_status\", __(\"Vehicle Status\", \"listings\"), \"vehicle_status_make_meta_box\", \"listings\", \"side\", \"core\", array(\"name\" => \"vehicle_status\"));\n add_meta_box( \"options\", __(\"Options\", \"listings\"), \"plugin_make_meta_box\", \"listings\", \"side\", \"core\", array(\"name\" => \"options\"));\n\t$listing_categories = get_listing_categories();\n\t\n\tforeach($listing_categories as $category){\t\n\t\t\t\n\t\t$sfield = str_replace(\" \", \"_\", strtolower($category['singular']));\n\t\t\t\t\n\t\t$field = $name = $category['singular'];\n\n\t\tif($category['filterable'] == 1){\n\t\t\t$field = $field . \" (\" . __(\"Filterable\", \"listings\") . \")\";\n\t\t}\n\t}\n}", "public function setup_display_rule_controls()\n {\n $setup_display_control_args =\n array(\n 'activate_optin' => apply_filters('mo_optin_form_customizer_activate_optin_args',\n array(\n 'type' => 'checkbox',\n 'label' => __('Activate optin', 'mailoptin'),\n 'section' => $this->customizerClassInstance->setup_display_rule_section_id,\n 'settings' => $this->option_prefix . '[activate_optin]',\n 'description' => __('The optin will not be displayed unless this setting is checked.', 'mailoptin'),\n 'priority' => 10\n )\n )\n );\n\n if (defined('MAILOPTIN_DISPLAY_RULES_FLAG')) {\n $setup_display_control_args['load_optin_globally'] = apply_filters('mo_optin_form_customizer_load_optin_globally_args',\n array(\n 'type' => 'checkbox',\n 'label' => __('Globally load optin', 'mailoptin'),\n 'section' => $this->customizerClassInstance->setup_display_rule_section_id,\n 'settings' => $this->option_prefix . '[load_optin_globally]',\n 'description' => __('The optin will be loaded on all pages of your website if checked.', 'mailoptin'),\n 'priority' => 20\n )\n );\n $setup_display_control_args['hide_logged_in'] = apply_filters('mo_optin_form_customizer_hide_logged_in_args', array(\n 'type' => 'checkbox',\n 'label' => __('Hide for Logged-in Users', 'mailoptin'),\n 'description' => __('Check to hide the optin for users logged into your website.', 'mailoptin'),\n 'section' => $this->customizerClassInstance->setup_display_rule_section_id,\n 'settings' => $this->option_prefix . '[hide_logged_in]',\n 'priority' => 25,\n )\n );\n }\n\n $setup_display_control_args = apply_filters(\n \"mo_optin_form_customizer_setup_display_rule_controls\",\n $setup_display_control_args,\n $this->wp_customize,\n $this->option_prefix,\n $this->customizerClassInstance\n );\n\n do_action('mailoptin_before_setup_display_rule_controls_addition');\n\n foreach ($setup_display_control_args as $id => $args) {\n if (is_object($args)) {\n $this->wp_customize->add_control($args);\n } else {\n $this->wp_customize->add_control($this->option_prefix . '[' . $id . ']', $args);\n }\n }\n\n do_action('mailoptin_after_setup_display_rule_controls_addition');\n }", "abstract public function setMetas();", "public function setshowInForm($v)\n {\n if ($v !== null) {\n if (is_string($v)) {\n $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n } else {\n $v = (boolean) $v;\n }\n }\n\n if ($this->showinform !== $v) {\n $this->showinform = $v;\n $this->modifiedColumns[] = ActionTypePeer::SHOWINFORM;\n }\n\n\n return $this;\n }", "public function setConditionallyHidden($flag)\n {\n $this->_isConditionallyHidden = $flag;\n }", "public function addMetaboxes() {}", "public function SetPanelSettings()\n\t{\n\t\t$GLOBALS['ISC_CLASS_PRODUCT'] = GetClass('ISC_PRODUCT');\n\t\t$id = $GLOBALS['ISC_CLASS_PRODUCT']->GetProductId();\n\t\t// How many tags do we have?\n\t\t$query = \"\n\t\t\tSELECT p.* , pi.imagefilethumb\n\t\t\tFROM isc_products p\n\t\t\tINNER JOIN isc_product_associations pa ON ( \n\t\t\t\tpa.assocbaseid = \" . $id . \" AND pa.assocprodid = p.productid\n\t\t\t) \n\t\t\tINNER JOIN isc_product_images pi ON ( \n\t\t\t\tpi.imageprodid = pa.assocprodid AND pi.imageisthumb = 1\n\t\t\t) \n\t\t\";\n\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\n\t\t$GLOBALS['SNIPPETS']['ProductMadeByList'] = '';\n\t\twhile($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t$GLOBALS['ComponentImg'] = GetConfig('ShopPath') . '/' . GetConfig('ImageDirectory') . '/' . $row['imagefilethumb'];\n\t\t\t$GLOBALS['ComponentName'] = $row['prodname'];\n\t\t\t$GLOBALS['ComponentLink'] = ProdLink($row['prodname']);\n\t\t\t$GLOBALS['SNIPPETS']['ProductMadeByList'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('ProductMadeByItem');\n\t\t}\n\t\t\n\t\tif($GLOBALS['SNIPPETS']['ProductMadeByList'] == '') {\n\t\t\t$this->DontDisplay = true;\n\t\t}\n\t}", "public function page_filter_display_rule_controls()\n {\n $page_filter_control_args = apply_filters(\n \"mo_optin_form_customizer_page_filter_controls\",\n array(\n 'load_optin_index' => apply_filters('mo_optin_form_customizer_load_optin_index_args',\n array(\n 'type' => 'checkbox',\n 'label' => __('Front Page, Archive and Search Pages', 'mailoptin'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[load_optin_index]',\n 'description' => __('Loads the optin on home front page, archive and search pages', 'mailoptin'),\n 'priority' => 30\n )\n ),\n 'exclusive_post_types_posts_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[exclusive_post_types_posts_load]',\n apply_filters('mo_optin_form_customizer_exclusive_post_types_posts_load_args', array(\n 'label' => __('Load optin exclusively on:'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[exclusive_post_types_posts_load]',\n 'description' => __('Loads the optin only on the selected \"post types\" posts.', 'mailoptin'),\n 'search_type' => 'exclusive_post_types_posts_load',\n 'choices' => ControlsHelpers::get_all_post_types_posts(),\n 'priority' => 35\n )\n )\n ),\n 'exclusive_post_types_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[exclusive_post_types_load]',\n apply_filters('mo_optin_form_customizer_exclusive_post_types_load_args', array(\n 'label' => __('Load optin only on \"post types\":'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[exclusive_post_types_load]',\n 'description' => __('Loads the optin only on the selected \"post types\".', 'mailoptin'),\n 'choices' => ControlsHelpers::get_post_types(),\n 'priority' => 38\n )\n )\n ),\n 'posts_never_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[posts_never_load]',\n apply_filters('mo_optin_form_customizer_posts_never_load_args', array(\n 'label' => __('Never load optin on these posts:'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[posts_never_load]',\n 'description' => __('Select the posts this optin should never be loaded on.', 'mailoptin'),\n 'search_type' => 'posts_never_load',\n 'choices' => ControlsHelpers::get_post_type_posts('post'),\n 'priority' => 40\n )\n )\n ),\n 'pages_never_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[pages_never_load]',\n apply_filters('mo_optin_form_customizer_pages_never_load_args', array(\n 'label' => __('Never load optin on these pages:'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[pages_never_load]',\n 'description' => __('Select the pages this optin should never be loaded on.', 'mailoptin'),\n 'search_type' => 'pages_never_load',\n 'choices' => ControlsHelpers::get_post_type_posts('page'),\n 'priority' => 50\n )\n )\n ),\n 'cpt_never_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[cpt_never_load]',\n apply_filters('mo_optin_form_customizer_cpt_never_load_args', array(\n 'label' => __('Never load optin on these CPT posts:'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[cpt_never_load]',\n 'description' => __('Select \"custom post type\" posts this optin should never be loaded on.', 'mailoptin'),\n 'search_type' => 'cpt_never_load',\n 'choices' => ControlsHelpers::get_all_post_types_posts(array('post', 'page')),\n 'priority' => 60\n )\n )\n ),\n 'post_categories_load' => new WP_Customize_Chosen_Select_Control(\n $this->wp_customize,\n $this->option_prefix . '[post_categories_load]',\n apply_filters('mo_optin_form_customizer_post_categories_load_args', array(\n 'label' => __('Load on post categories:'),\n 'section' => $this->customizerClassInstance->page_filter_display_rule_section_id,\n 'settings' => $this->option_prefix . '[post_categories_load]',\n 'description' => __('Loads the optin on posts that are in one of the selected categories.', 'mailoptin'),\n 'choices' => ControlsHelpers::get_categories(),\n 'priority' => 70\n )\n )\n ),\n ),\n $this->wp_customize,\n $this->option_prefix,\n $this->customizerClassInstance\n );\n\n do_action('mailoptin_before_page_filter_controls_addition');\n\n foreach ($page_filter_control_args as $id => $args) {\n if (is_object($args)) {\n $this->wp_customize->add_control($args);\n } else {\n $this->wp_customize->add_control($this->option_prefix . '[' . $id . ']', $args);\n }\n }\n\n do_action('mailoptin_after_page_filter_controls_addition');\n\n }", "private function __setMedicationTileData() {\n\t\tif ($this->_requestedUser['id'] === $this->Auth->user('id')) {\n\t\t\t$showMedicationTile = true;\n\t\t\t$this->__addMedicationSchedulerFormValidation();\n\t\t\t$timezone = $this->Auth->user('timezone');\n\t\t\t$date = Date::getCurrentDate($timezone);\n\t\t\t$data = $this->__getMedicationDataOnDate($date);\n\t\t\t$this->set($data);\n\t\t} else {\n\t\t\t$showMedicationTile = false;\n\t\t}\n\t\t$this->set(compact('showMedicationTile'));\n\t}", "public function setshowTime($v)\n {\n if ($v !== null) {\n if (is_string($v)) {\n $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n } else {\n $v = (boolean) $v;\n }\n }\n\n if ($this->showtime !== $v) {\n $this->showtime = $v;\n $this->modifiedColumns[] = ActionTypePeer::SHOWTIME;\n }\n\n\n return $this;\n }", "public function contextual_section_panel_settings_control()\n {\n add_filter('mo_optin_customizer_disable_description_section', function ($status) {\n if ($this->optin_campaign_type == 'bar') {\n $status = true;\n add_filter('mailoptin_tinymce_customizer_control_count', function ($count) {\n return --$count;\n });\n }\n\n return $status;\n });\n\n add_filter('mo_optin_form_customizer_configuration_controls',\n function ($controls, $wp_customize, $option_prefix, $customizerClassInstance) {\n // do not display these controls if optin type is sidebar.\n if (in_array($customizerClassInstance->optin_campaign_type, ['sidebar', 'inpost'])) {\n unset($controls['cookie']);\n unset($controls['success_cookie']);\n }\n\n if ($customizerClassInstance->optin_campaign_type == 'bar') {\n unset($controls['hide_headline']);\n unset($controls['hide_description']);\n unset($controls['hide_note']);\n unset($controls['hide_description']);\n }\n\n if ($customizerClassInstance->optin_campaign_type != 'bar') {\n unset($controls['bar_position']);\n unset($controls['bar_sticky']);\n }\n\n if ($customizerClassInstance->optin_campaign_type != 'slidein') {\n unset($controls['slidein_position']);\n }\n\n if ( ! in_array($customizerClassInstance->optin_campaign_type, ['lightbox', 'slidein', 'bar'])) {\n unset($controls['hide_close_button']);\n }\n\n return $controls;\n }, 10, 4);\n\n add_filter('mo_optin_form_customizer_page_filter_controls',\n function ($controls, $wp_customize, $option_prefix, $customizerClassInstance) {\n // do not display these controls if optin type is inpost.\n if ($customizerClassInstance->optin_campaign_type == 'inpost') {\n unset($controls['load_optin_index']);\n }\n\n return $controls;\n }, 10, 4);\n\n add_filter('mo_optin_form_customizer_configuration_controls',\n function ($controls, $wp_customize, $option_prefix, $customizerClassInstance) {\n // restrict inpost_form_optin_position control to only inpost type\n if ('inpost' != $customizerClassInstance->optin_campaign_type) {\n unset($controls['inpost_form_optin_position']);\n }\n\n return $controls;\n }, 10, 4);\n\n add_filter('mo_optin_form_customizer_note_controls',\n function ($controls, $wp_customize, $option_prefix, $customizerClassInstance) {\n // restrict inpost_form_optin_position control to only inpost type\n if ('inpost' != $customizerClassInstance->optin_campaign_type) {\n unset($controls['inpost_form_optin_position']);\n }\n\n return $controls;\n }, 10, 4);\n }", "abstract public function showFieldSets();", "function careers_metabox() {\n\t\t\tforeach (careers_fields() as $key => $value) {\n\t\t\t\t$id = 'careers_'.$value['slug'];\n\t\t\t\t$title = __( $value['name'], 'careers_textdomain' );\n\t\t\t\tadd_meta_box($id, $title, 'careers_callback', 'Careers', 'normal', 'low',$value);\n\t\t\t}\n\t\t}", "function vw_hospital_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'vw-hospital' ), 'vw_hospital_cs_meta_callback' , 'doctors','normal', 'high' ); \n\n}", "public function setFields() {\n // Note: we can put any key/value in \"args\" key\n //'label_for' must match 'id'\n $fields = array();\n \n foreach($this->managers as $id => $title) {\n $fields[] = array(\n 'id' => $id,\n 'title' => $title,\n 'callback' => array($this->callbacks_mgr, 'checkboxField'),\n 'page' => 'pm_plugin',\n 'section' => 'pm_admin_index',\n 'args' => array(\n 'option_name' => 'pm_plugin',\n 'label_for' => $id,\n 'class' => 'ui-toggle'\n )\n );\n }\n \n $this->settings->setFields($fields);\n }", "public function addMetaBox()\r\n {\r\n add_meta_box($this->id, esc_html__($this->title, 'firalabs-tv-show'), array(\r\n $this,\r\n 'render'\r\n ), 'firalabs_tv_show', $this->context, 'default');\r\n }", "function display() {\n\t\tglobal $wp_version;\n\t\tcf_meta::display();\n\t\tif(is_array($this->wysiwyg_items)) {\n\t\t\t// Move JS to last item after admin footer scripts for WP 2.8+ compatability\n\t\t\tif(version_compare($wp_version,'2.8', '>=')) {\n\t\t\t\tadd_action('admin_print_footer_scripts',array($this,'add_wysiwyg'),999);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->add_wysiwyg();\n\t\t\t}\n\t\t}\n\t\tif(is_array($this->conditions)) {\n\t\t\t$this->display_conditions();\n\t\t}\n\t}", "function open_condition($val){\n\t\t$var_cond=$val;\n\t\t$this->condition_passed=false;\n\t\tglobal $in;\n\t\tglobal $inputval;\n\t\t$val_cond=$this->attributes['CONDITION_VALUE'];\n\t\tif ($this->attributes['HIDE']=='yes') {\n\t\t\tif (preg_match(\"/,/\", $val_cond)){\n\n\t\t\t\t$this->check_js.=\"\n\t valore=document.forms[0].\".$this->id.\".value;\n\t\t\t\t\tdocument.forms[0].\".$this->id.\".value='';\n\t\t\t\t if (document.getElementById('tr_\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('tr_\".$this->id.\"').style.display='none';\n\t\t\t\t\t\";\n\t\t\t\t$vals=explode(\",\",$val_cond);\n\t\t\t\t//$this->condition_passed=false;\n\t\t\t\tforeach ($vals as $key => $value){\n\t\t\t\t\tif (isset($in['INVIOCO'])) $value_to_control=$in[$var_cond];\n\t\t\t\t\telse $value_to_control=$inputval[$var_cond];\n\t\t\t\t\tif ($value_to_control==$value) $this->condition_passed=true;\n\t\t\t\t\t$this->check_js.=\" \\n\n\t\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\t\tif (value=='$value')\n\t\t\t\t\t\t{\n\t\t\t\t \tif (document.getElementById('tr_\".$this->id.\"'))\n\t\t\t\t\t\t\t\tdocument.getElementById('tr_\".$this->id.\"').style.display='';\n\t\t\t\t\t\t document.forms[0].\".$this->id.\".value=valore;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t$op ='!=';\n\t\t\t\tif (preg_match(\"/\\!/\", $val_cond)) {\n\t\t\t\t\t$val_cond=str_replace(\"!\", \"\",$val_cond);\n\t\t\t\t\t$op='==';\n\t\t\t\t}\n\t\t\t\tif (isset($in['INVIOCO'])) $value_to_control=$in[$var_cond];\n\t\t\t\telse $value_to_control=$inputval[$var_cond];\n\t\t\t\tif ($op=='==') $this->condition_passed=($value_to_control!=$val_cond);\n\t\t\t\telse $this->condition_passed=($value_to_control==$val_cond);\n\t\t\t\t//echo \"<hr>$op - $var_cond - $val_cond - {$this->attributes['VAR']}<hr>\";\n\n\t\t\t\t$this->check_js=\" \\n\n\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\tif (value $op '$val_cond')\n\t\t\t\t\t{\n\t\t\t\t\t\t\";\n\t\t\t\tforeach($this->values as $key=> $val){\n\t\t\t\t\t$this->check_js.=\"\n\t\t\t\t document.forms[0].\".$key.\".checked=false;\n\t\t\t\t if (document.getElementById('tr_\".$this->id.\"')) document.getElementById('tr_\".$this->id.\"').style.display='none';\n\t\t\t\t\";\n\t\t\t\t}\n\t\t\t\t$this->check_js.=\"\n\t\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t if (document.getElementById('tr_\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('tr_\".$this->id.\"').style.display='';\n\t\t\t\t\t\";\n\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ($this->attributes['HIDE_THIS']=='yes') {\n\t\t\t\tif (preg_match(\"/,/\", $val_cond)){\n\t\t\t\t\t$this->check_js.=\"\n\t valore=document.forms[0].\".$this->id.\".value;\n\t\t\t\t\tdocument.forms[0].\".$this->id.\".value='';\n\t\t\t\t \tif (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t \tdocument.getElementById('cell_\".$this->id.\"').style.display='none';\n\t\t\t\t\tif (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t \tdocument.getElementById('cell_input\".$this->id.\"').style.display='none';\n\t\t\t\t\t\";\n\t\t\t\t\t$vals=explode(\",\",$val_cond);\n\t\t\t\t\t//$this->condition_passed=false;\n\t\t\t\t\tforeach ($vals as $key => $value){\n\t\t\t\t\t\tif ($in[$var_cond]==$value) $this->condition_passed=true;\n\t\t\t\t\t\t$this->check_js.=\" \\n\n\t\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\t\tif (value=='$value')\n\t\t\t\t\t\t{\n\t\t\t\t \t\t\tif (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t\t\t\tdocument.getElementById('cell_\".$this->id.\"').style.display='';\n\t\t\t\t\t\t\tif (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t\t\t\tdocument.getElementById('cell_input\".$this->id.\"').style.display='';\n\t\t\t\t\t\t document.forms[0].\".$this->id.\".value=valore;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$op ='!=';\n\t\t\t\t\tif (preg_match(\"/\\!/\", $val_cond)) {\n\t\t\t\t\t\t$val_cond=str_replace(\"!\", \"\",$val_cond);\n\t\t\t\t\t\t$op='==';\n\t\t\t\t\t}\n\t\t\t\t\tif ($op=='==') $this->condition_passed=($in[$var_cond]!=$val_cond);\n\t\t\t\t\telse $this->condition_passed=($in[$var_cond]==$val_cond);\n\t\t\t\t\t//echo \"<hr>$op - $var_cond - $val_cond - {$this->attributes['VAR']}<hr>\";\n\t\t\t\t\t$this->check_js=\" \\n\n\t\t\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\tif (value $op '$val_cond')\n\t\t\t\t\t{\n\t\t\t\t\t\t\";\n\t\t\t\t\t$this->check_js.=\"\n\t\t\t\t\tif (document.forms[0].\".$this->id.\")\n\t\t\t\t\t\tdocument.forms[0].\".$this->id.\".value='';\n\t\t\t\t \tif (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('cell_\".$this->id.\"').style.display='none';\n\t\t\t\t\tif (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t document.getElementById('cell_input\".$this->id.\"').style.display='none';\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t if (document.getElementById('cell_\".$this->id.\"'))\n\t\t\t\t\t\t document.getElementById('cell_\".$this->id.\"').style.display='';\n\t\t\t\t\t if (document.getElementById('cell_input\".$this->id.\"'))\n\t\t\t\t\t \tdocument.getElementById('cell_input\".$this->id.\"').style.display='';\n\t\t\t\t\t}\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ($in[$var_cond]==$value) $this->condition_passed=true;\n\t\t\t\t$this->check_js.=\"\n\t\t\tvalue=value_of('$var_cond', '0');\n\t\t\t\t\t\tif (value!='$val_cond')\n\t\t\t\t\t\t{ \";\n\t\t\t\tforeach($this->values as $key => $val) $this->check_js.=\"\n\n\t\t\t\t\t\tdocument.forms[0].\".$key.\".checked=false;\n\t\t\t\t\t\t//document.getElementById('\".$this->id.\"').style.display='none';\n\n\t\t\t\t\t\t\";\n\t\t\t\t$this->check_js.=\"}\";\n\t\t\t}\n\t\t}\n\n\t\t$this->html=\"<tr id='\".$this->id.\"' style=\\\"display:\\\">\".$this->html.\"</tr>\";\n\t}", "abstract function buildShowFields(): void;", "function show_metabox_home_position($post){\r\n\r\n\t\t$position_number = get_position($post->ID);\r\n\r\n\t\t\techo \"\r\n\t\t\t<div class='meta-container cf'>\r\n\t\t\t\t<div class='position_mini'>izquierda</div>\r\n\t\t\t\t<div class='position_mini'>centro</div>\r\n\t\t\t\t<div class='position_mini'>derecha</div>\r\n\r\n\t\t\t\t<input class='position_checkbox' type='radio' name='position_meta' value='1' \";\r\n\t\t\t\techo ( $position_number == 1 ) ? 'checked>' : '>' ;\r\n\t\t\t\techo \"\r\n\t\t\t\t<input class='position_checkbox' type='radio' name='position_meta' value='2' \";\r\n\t\t\t\techo ( $position_number == 2 ) ? 'checked>' : '>' ;\r\n\t\t\t\techo \"<input class='position_checkbox' type='radio' name='position_meta' value='3' \";\r\n\t\t\t\techo ( $position_number == 3 ) ? 'checked>' : '>' ;\r\n\t echo \"</div>\";\r\n\r\n\r\n\t}", "public function render_meta_boxes_preferences()\n {\n }", "public function init()\r\n {\r\n parent::init();\r\n $this->visible = true;\r\n $this->descriptionashint = true;\r\n $this->active = false;\r\n }", "function admin_init() {\n\t\tadd_meta_box(\"1-Round\", \"First Round\", array(&$this, \"meta_options\"), \"Tournaments\" );\n\t}", "public function show_forms() {\n ?>\n <div class=\"metabox-holder\">\n <?php foreach ( $this->settings_tabs as $tab ) { ?>\n <div id=\"<?php echo $tab['id']; ?>\" class=\"group\" style=\"display: none;\">\n <form method=\"post\" action=\"options.php\">\n <?php\n do_action( $this->settings_prefix . '_settings_form_top_' . $tab['id'], $tab );\n settings_fields( $tab['id'] );\n\n $this->do_settings_sections( $tab['id'] );\n\n do_action( $this->settings_prefix . '_settings_form_bottom_' . $tab['id'], $tab );\n ?>\n <div>\n <?php submit_button(); ?>\n </div>\n </form>\n </div>\n <?php } ?>\n </div>\n <?php\n $this->script();\n }", "function metabox_styles() { ?>\n\t<style type=\"text/css\">\n\t.hidetable { display:none; }\n\t#uploadfield { width:500px; }\n\t#uploadfield input { display:inline; }\n\t.req { font-size:12px; color:#FF0000; font-weight:bold; }\n\t.attchmt { border-bottom:21px solid #666; padding:10px 0; margin:10px 0; }\n\t.prevImage { float:right; width:250px; text-align:center; }\n\t.fr { float:right; }\n\t</style>\n\t<?php\t\n}", "function show_settings_tab(){\n woocommerce_admin_fields($this->get_settings());\n }", "function MCW_checkshow($MyFilter){\n $myfilteroptions = MCW_get_all_filters();\n $max = count($myfilteroptions);\n $erg = false;\n for ( $i = 0; $i < $max; ++$i ) {\n $c=\"if ((\".stripslashes($myfilteroptions[$i][1]).\") && isset(\\$MyFilter[\\$myfilteroptions[\\$i][0]])) {\\$erg = true;}\";\n eval($c);\n }\n return $erg;\n }", "protected function specific_definition($mform) {\n $mform->addElement('header', 'configheader', get_string('blocksettings', 'block'));\n \n /**\n * Options for how long back is the log viewed \n */\n $timeoptions = array(\n 'oneDay' => get_string('oneDay', 'block_heatmap'),\n 'twoDays' => get_string('twoDays', 'block_heatmap'),\n 'oneWeek' => get_string('oneWeek', 'block_heatmap'),\n 'twoWeeks' => get_string('twoWeeks', 'block_heatmap'),\n 'month' => get_string('month', 'block_heatmap'),\n 'sincestart' => get_string('sincestart', 'block_heatmap'),\n 'sinceforever' => get_string('sinceforever', 'block_heatmap'),\n );\n \n $timelabel = get_string('checkforactivity', 'block_heatmap');\n $mform->addElement('select','config_from',$timelabel,$timeoptions);\n $mform->setDefault('config_from','sincestart');\n $mform->addHelpButton('config_from','checkforactivity','block_heatmap');\n }", "function team_option_metabox() {\n\t$screens = array( 'team');\n\tforeach ( $screens as $screen ) {\n\t\tadd_meta_box(\n\t\t\t'team_option',\n\t\t\t__( 'Team Member Info', 'team_option_textdomain' ),\n\t\t\t'team_option_callback',\n\t\t\t$screen,\n\t\t\t'side',\n \t'default'\n\t\t);\n\t}\n}", "public static function registerMetaBoxes() {\n add_meta_box( 'mail_settings', __('Email Settings', WPXTREME_TEXTDOMAIN ), array( __CLASS__, 'display_mail_settings' ), WPXTREME_MAIL_CPT_KEY, 'normal', 'high');\n }", "public function filterVisible(): self;", "protected function setConditions() {\r\n if( count($this->sqlConditions) ) {\r\n $this->sql .= ' WHERE ' . $this->sqlStrConditions;\r\n }\r\n }", "public function beforeSet() {\n $name = $this->getProperty('name');\n if (empty($name)) {\n $this->addFieldError('name',$this->modx->lexicon('required'));\n }\n\n $test = $this->getProperty('test');\n if (empty($test)) {\n $this->addFieldError('name','Required parameter test is not specified.');\n }\n\n $testObject = $this->modx->getObject('sabTest', $test);\n if (!$testObject) {\n $this->addFieldError('name','Parent test not found.');\n }\n\n $element = $this->getProperty('element');\n $elementType = $testObject->get('type');\n $elementObj = $this->modx->getObject($elementType, $element);\n if (!$elementObj) {\n $this->addFieldError('element', 'Element does not exist.');\n }\n\n /* Set checkbox */\n $this->setCheckbox('active', true);\n return parent::beforeSet();\n }", "public function setShowInMenu($show = NULL ){\n\t\t$this->showInMenu = isset($show) ? $show : $this->show_ui;\n\t}", "function frmEstimacionesShow($sender, $params)\n {\n $items[\"uno\"]=\"ADICIONAL\";\n $items[\"dos\"]=\"ADITIVA/DEDUCTIVA\";\n $items[\"tres\"]=\"EXTRAORDINARIA\";\n $items[\"cuatro\"]=\"NORMAL\";\n $this->cboTipo->setItems($items);\n $this->txtMoneda->Text=\"MONEDA NACIONAL\";\n }", "public function showIf($condition)\n {\n if ($condition instanceof Closure) {\n $this->canSee = $condition($this) ? true : false;\n }\n if (is_bool($condition)) {\n $this->canSee = $condition;\n }\n return $this;\n }", "public function createShowModal(){\n $this->modalFormVisible = true;\n }", "function BeforeShowAdd(&$xt, &$templatefile, &$pageObject)\n{\n\n\t\t$att = $xt->fetchVar(\"Approved_editcontrol\");\n$att = str_replace(\">\",\" DISABLED=DISABLED>\",$att);\n$xt->assign(\"Approved_editcontrol\",$att);\n\n\n$attz = $xt->fetchVar(\"Approvedby_editcontrol\");\n$attz = str_replace(\">\",\" DISABLED=DISABLED>\",$attz);\n$xt->assign(\"Approvedby_editcontrol\",$attz);\n\n$at1 = $xt->fetchVar(\"EmployeeID_editcontrol\");\n$at1 = str_replace(\">\",\" DISABLED=DISABLED>\",$at1);\n$xt->assign(\"EmployeeID_editcontrol\",$at1);\n\n\n$at3 = $xt->fetchVar(\"Locked_editcontrol\");\n$at3 = str_replace(\">\",\" DISABLED=DISABLED>\",$at3);\n$xt->assign(\"Locked_editcontrol\",$at3);\n\n$at4 = $xt->fetchVar(\"Posted_editcontrol\");\n$at4 = str_replace(\">\",\" DISABLED=DISABLED>\",$at4);\n$xt->assign(\"Posted_editcontrol\",$at4);\n\n\n $attr = $xt->fetchVar(\"Superior_editcontrol\");\n $attr = str_replace(\">\",\" READONLY=READONLY>\",$attr);\n $xt->assign(\"Superior_editcontrol\",$attr);\n\n $att5 = $xt->fetchVar(\"Superior2_editcontrol\");\n $att5 = str_replace(\">\",\" READONLY=READONLY>\",$att5);\n $xt->assign(\"Superior2_editcontrol\",$att5);\n\n\n $att6 = $xt->fetchVar(\"1stApproval_editcontrol\");\n $att6 = str_replace(\">\",\" READONLY=READONLY>\",$att6);\n $xt->assign(\"1stApproval_editcontrol\",$att6);\n\n $att7 = $xt->fetchVar(\"2ndApproval_editcontrol\");\n $att7 = str_replace(\">\",\" READONLY=READONLY>\",$att7);\n $xt->assign(\"2ndApproval_editcontrol\",$att7);\n\n\n\n\n\n\n\n;\t\t\n}", "function pt_init_metabox(){\n\t\t add_meta_box('job', 'Byline', array(&$this,'pt_field_job'), 'testimonials', 'side');\n\t\t}", "function show_filter_process()\n\t\t{\n\t\t\t$this->t->set_var('filter_process_up', $this->filter_process);\n\t\t\t// now show the filter process select\n\t\t\t$this->t->set_var('filter_process_selected_all', (!$this->filter_process)? 'selected=\"selected\"' : '');\n\t\t\t$this->t->set_block($this->template_name, 'block_filter_process', 'filter_process');\n\t\t\tforeach ($this->all_processes['data'] as $process)\n\t\t\t{\n\t\t\t\t$this->t->set_var(array(\n\t\t\t\t\t'filter_process_selected'\t=> ($process['wf_p_id'] == $this->filter_process)? 'selected=\"selected\"' : '',\n\t\t\t\t\t'filter_process_value'\t\t=> $process['wf_p_id'],\n\t\t\t\t\t'filter_process_name'\t\t=> $process['wf_name'],\n\t\t\t\t\t'filter_process_version'\t=> $process['wf_version'],\n\n\t\t\t\t));\n\t\t\t\t$this->t->parse('filter_process', 'block_filter_process', true);\n\t\t\t}\n\t\t}", "function wpc_client_meta_init() {\r\n add_meta_box( 'wpclients_userids-meta', 'Allowed Users', 'wpc_client_userids_options', 'clientspage', 'advanced', 'low' );\r\n //meta box for select clientpage template\r\n add_meta_box( 'wpclients_clientpage_template', 'Template', 'wpc_client_clientpage_template_meta', 'clientspage', 'side', 'low' );\r\n\r\n //meta box for select hubpage template\r\n add_meta_box( 'wpclients_hubpage_template', 'Template', 'wpc_client_hubpage_template_meta', 'hubpage', 'side', 'low' );\r\n\r\n // metabox for Client Circles\r\n add_meta_box( 'wpclients_groups_id-meta', 'Allowed Client Circles', 'wpc_client_groups_id_meta', 'clientspage', 'advanced', 'low' );\r\n\r\n add_meta_box( 'wpclients_page_update-meta', 'Send Update to Client(s)', 'wpc_client_page_update_options', 'clientspage', 'advanced', 'low' );\r\n\r\n }", "function checkboxes(){\n if($this->ChkReal->Checked){\n $this->avance_real = 'Si';\n }else{\n $this->avance_real = 'No';\n }\n if($this->ChkProg->Checked){\n $this->avance_prog = 'Si';\n }else{\n $this->avance_prog = 'No';\n }\n if($this->ChkComent->Checked){\n $this->comentario = 'Si';\n }else{\n $this->comentario = 'No';\n }\n if($this->ChkPermiso->Checked){\n $this->permiso = 'Si';\n }else{\n $this->permiso = 'No';\n }\n if($this->ChkTipoA->Checked){\n $this->tipo_admon = 'Si';\n }else{\n $this->tipo_admon = 'No';\n }\n }", "public function set_filters() {\n\t\tdo_action('emd_ext_class_init', $this);\n\t\t$search_args = Array();\n\t\t$filter_args = Array();\n\t\t$this->sing_label = __('Contact', 'wpas_attendeeinfo');\n\t\t$this->plural_label = __('Contacts', 'wpas_attendeeinfo');\n\t\t$this->menu_entity = 'emd_contact';\n\t\t$this->boxes['emd_contact_info_emd_contact_0'] = array(\n\t\t\t'id' => 'emd_contact_info_emd_contact_0',\n\t\t\t'title' => __('Contact Info', 'wpas_attendeeinfo') ,\n\t\t\t'app_name' => 'wpas_attendeeinfo',\n\t\t\t'pages' => array(\n\t\t\t\t'emd_contact'\n\t\t\t) ,\n\t\t\t'context' => 'normal',\n\t\t);\n\t\tlist($search_args, $filter_args) = $this->set_args_boxes();\n\t\tif (!post_type_exists($this->post_type) || in_array($this->post_type, Array(\n\t\t\t'post',\n\t\t\t'page'\n\t\t))) {\n\t\t\tself::register();\n\t\t}\n\t\tdo_action('emd_set_adv_filtering', $this->post_type, $search_args, $this->boxes, $filter_args, $this->textdomain, $this->plural_label);\n\t\t$ent_map_list = get_option(str_replace('-', '_', $this->textdomain) . '_ent_map_list');\n\t}", "public function actionSetFilter()\n {\n $filter = $this->module->filter;\n\n //make css class for checkbox\n foreach ($filter as $key => $property) {\n if (isset($property['class'])) {\n if (is_array($property['class'])) {\n $filter[$key]['class'] = implode(' ', $property['class']);\n }\n } else {\n $filter[$key]['class'] = '';\n }\n }\n\n //set value for js ajax variable\n $useAjax = $this->module->useAjax ? 'true' : 'false';\n\n return $this->renderPartial('filter-list', ['filter' => $filter, 'useAjax' => $useAjax]);\n }", "function siteorigin_panels_metaboxes() {\n\tforeach( siteorigin_panels_setting( 'post-types' ) as $type ){\n\t\tadd_meta_box( 'so-panels-panels', __( 'Page Builder', 'positive-panels' ), 'siteorigin_panels_metabox_render', $type, 'advanced', 'high' );\n\t}\n}", "private function setupIfAction() {\n \n Blade::directive('if_action', function($expression) {\n $act = $this->stringParamAsString($expression); //gets act\n return '<?php '\n .' if ( (isset($show_actions) && array_search('.$act.',$show_actions)!==FALSE) || '\n . '(isset($hide_actions) && array_search('.$act.',$hide_actions)===FALSE) || '\n .' (!isset($show_actions) && !isset($hide_actions)) ): ?>';\n\n });\n }", "public static function render_metabox(){\n\t\t\t\t$all_tags = get_terms( [ 'taxonomy' => rForum_Tax::get_slug(), 'hide_empty' => 0 ] ); \n\n\t\t\t\t// get all tags assigned to a post\n\t\t\t\t$all_tags_of_post = get_the_terms( $post->ID, rForum_Tax::get_slug() ); \n\n\t\t\t\t// create an array of post tags ids\n\t\t\t\t$ids = [];\n\t\t\t\tif( $all_tags_of_post ){\n\t\t\t\t\tforeach( $all_tags_of_post as $tag ){\n\t\t\t\t\t\t$ids[] = $tag->term_id;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTML\n\t\t\t\techo '<div id=\"'. rForum_Tax::get_slug() .'-all\" class=\"categorydiv\">';\n\t\t\t\techo '<input type=\"hidden\" name=\"tax_input['. rForum_Tax::get_slug() .'][]\" value=\"0\" />';\n\t\t\t\techo '<ul>';\n\t\t\t\tforeach( $all_tags as $tag ){\n\t\t\t\t\t// unchecked by default\n\t\t\t\t\t$checked = \"\";\n\t\t\t\t\t// if an ID of a tag in the loop is in the array of assigned post tags - then check the checkbox\n\t\t\t\t\tif( in_array( $tag->term_id, $ids ) ){\n\t\t\t\t\t\t$checked = \" checked='checked'\";\n\t\t\t\t\t}\n\t\t\t\t\t$id = rForum_Tax::get_slug() .'-' . $tag->term_id;\n\t\t\t\t\techo \"<li id='{$id}'>\";\n\t\t\t\t\techo \"<label><input type='checkbox' name='tax_input[\". rForum_Tax::get_slug() .\"][]' id='in-$id'\". $checked .\" value='$tag->slug' /> $tag->name</label><br />\";\n\t\t\t\t\techo \"</li>\";\n\t\t\t\t}\n\t\t\t\techo '</ul></div>'; // end HTML\n\t\t\t}", "function construction_realestate_posttype_cs_meta_callback( $post ) {\n wp_nonce_field( basename( __FILE__ ), 'construction_realestate_posttype_cs_nonce' );\n $cs_stored_meta = get_post_meta( $post->ID );\n ?>\n\t<div id=\"agent_custom_stuff\">\n <div class=\"Checkbox-home\">\n\t <label for=\"show_home\"><?php esc_html_e( 'Show it on home page' ); ?></label><?php \n\t \t$construction_realestate_posttype_upcars_status=get_post_meta($post->ID, \"construction_realestate_posttype_agents_featured\", true); \n\t \tif($construction_realestate_posttype_upcars_status==1){ ?>\n\t\t \t\t<input type=\"checkbox\" checked=\"checked\" name=\"construction_realestate_posttype\" id=\"construction_realestate_posttype_agents_featured\" ><?php\n\t\t \t}else{ ?>\t\n\t\t \t\t<input type=\"checkbox\" name=\"construction_realestate_posttype_agents_featured\" id=\"construction_realestate_posttype_agents_featured\" ><?php\n\t\t \t} ?>\t\n </div>\n\t</div>\n <?php\n}", "function termsConditions()\r\r\n\t{\r\r\n\t $this->data['content'] \t\t\t= 'general/terms_conditions';\r\r\n\t\t$this->_render_page('temp/template', $this->data);\r\r\n\t}", "static function add_show_emails(): void {\r\n\t\tself::add_acf_field(self::show_emails, [\r\n\t\t\t'label' => 'Show emails on current masthead page?',\r\n\t\t\t'type' => 'true_false',\r\n\t\t\t'instructions' => 'Public emails may be helpful for readers,'\r\n\t\t\t\t.' but increase the risk of exposure to spam.',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'message' => '',\r\n\t\t\t'default_value' => 0,\r\n\t\t\t'ui' => 1,\r\n\t\t]);\r\n\t}", "function b_minitable_show( ) {\n global $xoopsDB;\n $module_handler =& xoops_gethandler('module');\n $module =& $module_handler->getByDirname('cricketstats');\n //Get config for News module\n $config_handler =& xoops_gethandler('config');\n if ($module) {\n $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));\n }\n \n //Season id\n $sql = \"SELECT SeasonID, SeasonName FROM \".$xoopsDB->prefix(\"cricket_seasonnames\").\" WHERE SeasonDefault=1\";\n $cricket_seasonname = $xoopsDB->query($sql);\n $cricket_seasonname = $xoopsDB->fetchArray($cricket_seasonname);\n $cricket_season_id = $cricket_seasonname['SeasonID'];\n $cricket_seasonname = $cricket_seasonname['SeasonName']; \n \n //League id\n $sql2 = \"SELECT LeagueID, LeagueName FROM \".$xoopsDB->prefix(\"cricket_leaguenames\").\" WHERE LeagueDefault=1\";\n $cricket_leaguename = $xoopsDB->query($sql2);\n $cricket_leaguename = $xoopsDB->fetchArray($cricket_leaguename);\n $cricket_league_id = $cricket_leaguename['LeagueID'];\n $cricket_leaguename = $cricket_leaguename['LeagueName']; \n\n //For win, draw and lost?\n $cricket_for_win = $moduleConfig['forwin'];\n $cricket_for_draw = $moduleConfig['fordraw'];\n $cricket_for_lose = $moduleConfig['forloss'];\n \n //Query to get teams from selected season & league\n $cricket_get_teams = $xoopsDB->query(\"SELECT DISTINCT\n O.OpponentName AS name,\n O.OpponentID AS id\n FROM \".$xoopsDB->prefix(\"cricket_opponents\").\" O, \".$xoopsDB->prefix(\"cricket_leaguematches\").\" LM\n WHERE LM.LeagueMatchSeasonID = '$cricket_season_id' AND\n\t\t\t\t\t\tLM.LeagueMatchLeagueID = '$cricket_league_id' AND\n (O.OpponentID = LM.LeagueMatchHomeID OR\n O.OpponentID = LM.LeagueMatchAwayID)\n ORDER BY name\");\n \n //Lets read teams into the table\n $i = 0;\n while($cricket_data = $xoopsDB->fetchArray($cricket_get_teams))\n {\n $team[$cricket_data['id']]['name'] = $cricket_data['name'];\n $team[$cricket_data['id']]['homewins'] = 0;\n $team[$cricket_data['id']]['awaywins'] = 0;\n $team[$cricket_data['id']]['homeloss'] = 0;\n $team[$cricket_data['id']]['awayloss'] = 0;\n $team[$cricket_data['id']]['hometie'] = 0;\n $team[$cricket_data['id']]['awaytie'] = 0;\n $team[$cricket_data['id']]['homerunsfor'] = 0;\n $team[$cricket_data['id']]['homerunsagainst'] = 0;\n $team[$cricket_data['id']]['awayrunsfor'] = 0;\n $team[$cricket_data['id']]['awayrunsagainst'] = 0;\n $team[$cricket_data['id']]['matches'] = 0;\n }\n \n //Match data\n $query = $xoopsDB->query(\"SELECT\n LM.LeagueMatchID AS mid, \n LM.LeagueMatchHomeID as homeid,\n LM.LeagueMatchAwayID as awayid, \n LM.LeagueMatchHomeRuns as homeruns,\n LM.LeagueMatchAwayRuns as awayruns \n FROM\n \".$xoopsDB->prefix(\"cricket_leaguematches\").\" LM\n \tWHERE\n LM.LeagueMatchSeasonID = '$cricket_season_id' AND LM.LeagueMatchLeagueID = '$cricket_league_id' AND\n\t\t\t\t\t\t\t\tLM.LeagueMatchHomeRuns IS NOT NULL\");\n while ($cricket_matchdata = $xoopsDB->fetchArray($query)) {\n $cricket_hometeam = $cricket_matchdata['homeid'];\n $cricket_awayteam = $cricket_matchdata['awayid'];\n \n $team[$cricket_hometeam]['matches'] = $team[$cricket_hometeam]['matches'] + 1;\n $team[$cricket_awayteam]['matches'] = $team[$cricket_awayteam]['matches'] + 1;\n \n $team[$cricket_hometeam]['homerunsfor'] = $team[$cricket_hometeam]['homerunsfor'] + $cricket_matchdata['homeruns'];\n $team[$cricket_awayteam]['awayrunsagainst'] = $team[$cricket_awayteam]['awayrunsagainst'] + $cricket_matchdata['homeruns'];\n $team[$cricket_awayteam]['awayrunsfor'] = $team[$cricket_awayteam]['awayrunsfor'] + $cricket_matchdata['awayruns'];\n $team[$cricket_hometeam]['homerunsagainst'] = $team[$cricket_hometeam]['homerunsagainst'] + $cricket_matchdata['awayruns'];\n \n $rundiff = $cricket_matchdata['homeruns'] - $cricket_matchdata['awayruns'];\n if ($rundiff > 0) {\n $team[$cricket_hometeam]['homewins'] = $team[$cricket_hometeam]['homewins'] + 1;\n $team[$cricket_awayteam]['awayloss'] = $team[$cricket_awayteam]['awayloss'] + 1;\n }\n elseif ($rundiff == 0) {\n $team[$cricket_hometeam]['hometie'] = $team[$cricket_hometeam]['hometie'] + 1;\n $team[$cricket_awayteam]['awaytie'] = $team[$cricket_awayteam]['awaytie'] + 1;\n }\n elseif ($rundiff < 0) {\n $team[$cricket_hometeam]['homeloss'] = $team[$cricket_hometeam]['homeloss'] + 1;\n $team[$cricket_awayteam]['awaywins'] = $team[$cricket_awayteam]['awaywins'] + 1;\n }\n }\n $cricket_get_deduct = $xoopsDB->query(\"SELECT points, teamid FROM \".$xoopsDB->prefix(\"cricket_deductedpoints\").\" WHERE seasonid = '$cricket_season_id' AND leagueid = '$cricket_league_id'\");\n while ($cricket_d_points = $xoopsDB->fetchArray($cricket_get_deduct)) {\n $team[$cricket_d_points[\"teamid\"]]['d_points'] = $cricket_d_points['points'];\n }\n foreach ($team as $teamid => $thisteam) {\n $temp_points = isset($thisteam['d_points']) ? $thisteam['d_points'] : 0;\n $cricket_points[$teamid] = ($thisteam['homewins'] * $cricket_for_win) + ($thisteam['awaywins'] * $cricket_for_win) + ($thisteam['hometie'] * $cricket_for_draw) + ($thisteam['awaytie'] * $cricket_for_draw) + $temp_points;\n $cricket_runsfor[$teamid] = $thisteam['homerunsfor'] + $thisteam['awayrunsfor'];\n $cricket_runsagainst[$teamid] = $thisteam['homerunsagainst'] + $thisteam['awayrunsagainst'];\n }\n array_multisort($cricket_points, SORT_NUMERIC, SORT_DESC, $cricket_runsfor, SORT_NUMERIC, SORT_DESC, $cricket_runsagainst, SORT_NUMERIC, SORT_DESC, $team, SORT_STRING, SORT_ASC);\n \n //Print the table\n $block['title'] = _BL_CRICK_MINITABLE;\n $block['content'] = \"<table width='100%' cellspacing='2' cellpadding='2' border='0'>\n <tr>\n <td width='50%' align='left'><span style='font-size: 10px; font-weight: bold;'><u>\"._BL_CRICK_TEAM.\"</u></span></td>\n <td width='15%' align='center'><span style='font-size: 10px; font-weight: bold;'><u>\"._BL_CRICK_POINTS.\"</u></span></td>\n <td width='35%' align='center'><span style='font-size: 10px; font-weight: bold;'><u>\"._BL_CRICK_RUNS.\"</u></span></td> \n </tr></table><marquee behavior='scroll' direction='up' width='100%' height='100' scrollamount='1' scrolldelay='60' onmouseover='this.stop()' onmouseout='this.start()'><table width='100%' cellspacing='2' cellpadding='2' border='0'>\";\n foreach ($team as $teamid => $thisteam)\n {\n $block['content'] .= \"<tr>\n <td width='50%' align='left'><span style='font-size: 10px; font-weight: normal;'>\".$thisteam['name'].\"</span></td>\n <td width='15%' align='center'><span style='font-size: 10px; font-weight: normal;'>\".$cricket_points[$teamid].\"</span></td>\n <td width='35%' align='center'><span style='font-size: 10px; font-weight: normal;'>\".$cricket_runsfor[$teamid].\"-\".$cricket_runsagainst[$teamid].\"</span></td>\n </tr>\";\n }\n $block['content'] .= \"</table><br><div align=\\\"center\\\"><a href=\\\"\".XOOPS_URL.\"/modules/cricketstats/index.php\\\">\"._BL_CRICK_GOTOMAIN.\"</a></div></marquee>\";\n return $block;\n}", "public function SetPanelSettings()\r\n\t\t{\r\n\t\t\t$products = $this->getProducts();\r\n\t\t\t$GLOBALS['ProductsOffersList'] = \"\";\r\n\r\n\t\t\t// Should we hide the comparison button?\n\t\t\tif(GetConfig('EnableProductComparisons') == 0 || count($products) < 2) {\n\t\t\t\t$GLOBALS['HideCompareItems'] = \"none\";\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(GetConfig('ShowProductRating') == 0) {\r\n\t\t\t\t$GLOBALS['HideProductRating'] = \"display: none\";\r\n\t\t\t}\r\n\r\n\t\t\t$display_mode = ucfirst(GetConfig(\"CategoryDisplayMode\"));\r\n\t\t\tif ($display_mode == \"Grid\") {\r\n\t\t\t\t$display_mode = \"\";\r\n\t\t\t}\r\n\t\t\t$GLOBALS['DisplayMode'] = $display_mode;\r\n\r\n\t\t\tif ($display_mode == \"List\") {\r\n\t\t\t\tif (GetConfig('ShowAddToCartLink') && count($products) > 0) {\r\n\t\t\t\t\t$GLOBALS['HideAddButton'] = '';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$GLOBALS['HideAddButton'] = 'none';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$GLOBALS['ListJS'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"ListCheckForm\");\r\n\t\t\t}\r\n\r\n\t\t\t$GLOBALS['CompareButton'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CompareButton\" . $display_mode);\r\n\r\n\t\t\tif (GetConfig('CategoryProductsPerPage') > 0) {\n\t\t\t\t$this->_numpages = ceil(count($products) / GetConfig('CategoryProductsPerPage'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_numpages = 0;\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ($display_mode == \"List\" && $this->_numpages > 1) {\r\n\t\t\t\t$GLOBALS['CompareButtonTop'] = $GLOBALS['CompareButton'];\r\n\t\t\t}\r\n\r\n\t\t\t$GLOBALS['AlternateClass'] = '';\r\n\t\t\tforeach($products as $row) {\r\n\t\t\t\t$this->setProductGlobals($row);\r\n\r\n\t\t\t\t// for list style\r\n\t\t\t\tif ($display_mode == \"List\") {\r\n\t\t\t\t\t// get a small chunk of the product description\r\n\t\t\t\t\t$desc = isc_substr(strip_tags($row['proddesc']), 0, 225);\r\n\t\t\t\t\tif (isc_strlen($row['proddesc']) > 225) {\r\n\t\t\t\t\t\t// trim the description back to the last period or space so words aren't cut off\r\n\t\t\t\t\t\t$period_pos = isc_strrpos($desc, \".\");\r\n\t\t\t\t\t\t$space_pos = isc_strrpos($desc, \" \");\r\n\t\t\t\t\t\t// find the character that we should trim back to. -1 on space pos for a space that follows a period, so we dont end up with 4 periods\r\n\t\t\t\t\t\tif ($space_pos - 1 > $period_pos) {\r\n\t\t\t\t\t\t\t$pos = $space_pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$pos = $period_pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$desc = isc_substr($desc, 0, $pos);\r\n\t\t\t\t\t\t$desc .= \"...\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$GLOBALS['ProductDescription'] = $desc;\r\n\r\n\t\t\t\t\t$GLOBALS['AddToCartQty'] = \"\";\r\n\r\n\t\t\t\t\tif (CanAddToCart($row) && GetConfig('ShowAddToCartLink')) {\r\n\t\t\t\t\t\tif (isId($row['prodvariationid']) || trim($row['prodconfigfields'])!='' || $row['prodeventdaterequired']) {\r\n\t\t\t\t\t\t\t$GLOBALS['AddToCartQty'] = '<a href=\"' . $GLOBALS[\"ProductURL\"] . '\">' . $GLOBALS['ProductAddText'] . \"</a>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$GLOBALS['CartItemId'] = $GLOBALS['ProductId'];\r\n\t\t\t\t\t\t\t// If we're using a cart quantity drop down, load that\r\n\t\t\t\t\t\t\tif (GetConfig('TagCartQuantityBoxes') == 'dropdown') {\r\n\t\t\t\t\t\t\t\t$GLOBALS['Quantity0'] = \"selected=\\\"selected\\\"\";\r\n\t\t\t\t\t\t\t\t$GLOBALS['QtyOptionZero'] = '<option %%GLOBAL_Quantity0%% value=\"0\">'.GetLang('Quantity').'</option>';\r\n\t\t\t\t\t\t\t\t$GLOBALS['QtySelectStyle'] = 'width: auto;';\r\n\t\t\t\t\t\t\t\t$GLOBALS['AddToCartQty'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CartItemQtySelect\");\r\n\t\t\t\t\t\t\t// Otherwise, load the textbox\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$GLOBALS['ProductQuantity'] = 0;\r\n\t\t\t\t\t\t\t\t$GLOBALS['AddToCartQty'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CartItemQtyText\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} // for grid style\r\n\t\t\t\telse {\r\n\t\t\t\t\t$GLOBALS[\"CompareOnSubmit\"] = \"onsubmit=\\\"return compareProducts(config.CompareLink)\\\"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$GLOBALS['ProductsOffersList'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"HomeProductsOfferItem\" . $display_mode);\r\n\t\t\t}\r\n\r\n\t\t\tif(count($products) == 0) {\r\n\t\t\t\t// There are no products in this category\r\n\t\t\t\t$GLOBALS['ProductsOffersList'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryNoProductsMessage\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t// Paging\r\n\t\tif(count($products) <= GetConfig('CategoryProductsPerPage')) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Workout the paging data\n\t\t$GLOBALS['SNIPPETS']['PagingData'] = \"\";\n\t\t\n\t\t$maxPagingLinks = 5;\n\t\tif($GLOBALS['ISC_CLASS_TEMPLATE']->getIsMobileDevice()) {\n\t\t\t$maxPagingLinks = 3;\n\t\t}\n\t\t\n\t\t$start = max($this->_page-$maxPagingLinks,1);\n\t\t$end = min($this->_page+$maxPagingLinks, $this->_numpages);\n\t\t\n\t\t$queryStringAppend = array(\n\t\t\t\t'sort' => $this->_sort,\n\t\t);\n\t\t\n\t\tif(!empty($_GET['price_min'])) {\n\t\t\t$queryStringAppend['price_min'] = (float)$_GET['price_min'];\n\t\t}\n\t\t\n\t\tif(!empty($_GET['price_max'])) {\n\t\t\t$queryStringAppend['price_max'] = (float)$_GET['price_max'];\n\t\t}\n\t\t\n\t\t\n\t\tfor ($page = $start; $page <= $end; $page++) {\n\t\t\tif($page == $this->_page) {\n\t\t\t\t$snippet = \"CategoryPagingItemCurrent\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$snippet = \"CategoryPagingItem\";\n\t\t\t}\n\t\t\n\t\t\t$pageQueryStringAppend = $queryStringAppend;\n\t\t\t$pageQueryStringAppend['page'] = $page;\r\n\t\t\t$GLOBALS['PageLink'] = $this->getPageLink($pageQueryStringAppend);\n\t\t\t$GLOBALS['PageNumber'] = $page;\n\t\t\t$GLOBALS['SNIPPETS']['PagingData'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet($snippet);\n\t\t}\n\t\t\n\t\t// Parse the paging snippet\n\t\tif($this->_page > 1) {\n\t\t\t// Do we need to output a \"Previous\" link?\n\t\t\t$pageQueryStringAppend = $queryStringAppend;\n\t\t\t$pageQueryStringAppend['page'] = $this->_page- 1;\n\t\t\t$GLOBALS['PrevLink'] = $this->getPageLink($pageQueryStringAppend);\n\t\t\t$GLOBALS['SNIPPETS']['CategoryPagingPrevious'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryPagingPrevious\");\n\t\t}\n\t\t\n\t\tif($this->_page < $this->_numpages) {\n\t\t\t// Do we need to output a \"Next\" link?\n\t\t\t$pageQueryStringAppend = $queryStringAppend;\n\t\t\t$pageQueryStringAppend['page'] = $this->_page + 1;\r\n\t\t\t$GLOBALS['NextLink'] = $this->getPageLink($pageQueryStringAppend);\n\t\t\t$GLOBALS['SNIPPETS']['CategoryPagingNext'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryPagingNext\");\n\t\t}\n\t\t\n\t\t$output = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"CategoryPaging\");\n\t\t$output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']);\n\t\t$GLOBALS['SNIPPETS']['CategoryPaging'] = $output;\r\n\t\t}", "public function setHidden(){\n $this->_hidden = true;\n }", "function section_optionator( $settings ){\n\t\t$settings = wp_parse_args($settings, $this->optionator_default);\n\t\t$opt_array = array(\n\t\t\t'tm_candy_open' => array(\n\t\t\t\t'title'\t\t\t=> 'Show at the start',\n\t\t\t\t'type' \t=> 'check',\n\t\t\t\t'inputlabel' \t=> __( 'Show at the start', $this->domain ),\n\t\t\t\t'shortexp' \t\t=> 'Default: Hidden',\n\t\t\t\t'exp' \t\t=> 'Check if you want to show the notification when the page is loaded, by default the notification area is hidden and it show the ribbon to open it.'\n\t\t\t),\n\t\t\t'tm_candys_set' \t=> array(\n\t\t\t\t'type' \t\t\t=> 'select_taxonomy',\n\t\t\t\t'taxonomy_id'\t=> $this->tax_id,\n\t\t\t\t'title' \t\t=> __('Select notiofication set to show', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('The set to show', $this->domain),\n\t\t\t\t'inputlabel'\t=> __('Select a set', $this->domain),\n\t\t\t\t'exp' \t\t\t=> __('if don\\'t select a set it will show all notification entries', $this->domain)\n\t\t\t),\n\t\t\t'tm_candys_items' => array(\n\t\t\t\t'type' \t\t\t=> 'count_select',\n\t\t\t\t'inputlabel'\t=> __('Number of notifications to show', $this->domain),\n\t\t\t\t'title' \t\t=> __('Number of notifications', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('Default value is 1', $this->domain),\n\t\t\t\t'count_start'\t=> 1, \n \t\t\t\t'count_number'\t=> 5,\n\t\t\t),\n\t\t\t'tm_candys_pause_on_hover' => array(\n\t\t\t\t'type'\t\t\t=> 'check',\n\t\t\t\t'title'\t\t\t=> __('Pause on hover', $this->domain),\n\t\t\t\t'inputlabel'\t=> __('Pause on hover', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('', $this->domain),\n\t\t\t\t'exp'\t\t\t=> __('Determines whether the timeout between transitions should be paused \"onMouseOver\"', $this->domain)\n\t\t\t),\n\t\t\t'tm_candys_duration_pause' \t=> array(\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t\t'inputlabel'\t=> __('Pause Duration', $this->domain),\n\t\t\t\t'title' \t\t=> __('Pause Duration', $this->domain),\n\t\t\t\t'shortexp'\t\t=> '',\n\t\t\t\t'exp'\t\t\t=> __('The amount of milliseconds the carousel will pause. 1000 = 1 second', $this->domain),\n\t\t\t),\n\n\t\t\t\t\n\t\t);\n\n\t\t$settings = array(\n\t\t\t'id' \t\t=> $this->id.'_meta',\n\t\t\t'name' \t\t=> $this->name,\n\t\t\t'icon' \t\t=> $this->icon, \n\t\t\t'clone_id'\t=> $settings['clone_id'], \n\t\t\t'active'\t=> $settings['active']\n\t\t);\n\n\t\tregister_metatab($settings, $opt_array);\n\t\t\n\t}", "function ppes_admin_init(){\r\n\tadd_meta_box(\"et_post_meta\", \"ET Settings\", \"et_post_meta\", \"auctions\", \"normal\", \"high\");\r\n}", "public function setVisibility() {}", "function checkbox_control_display($form, $mform, $customdata, $field, $as_filter = false, $contextname = 'system') {\n if (!($form instanceof moodleform)) {\n $mform = $form;\n $form->_customdata = null;\n }\n $manual = new field_owner($field->owners['manual']);\n $manual_params = unserialize($manual->params);\n if (!empty($manual_params['options_source']) || !empty($manual_params['options'])) {\n if ($as_filter || $field->multivalued) {\n// require_once(CURMAN_DIRLOCATION.'/plugins/manual/field_controls/menu.php');\n require_once elis::plugin_file('elisfields_manual', 'field_controls/menu.php');\n return menu_control_display($form, $mform, $customdata, $field, $as_filter);\n }\n $options = array();\n if (!empty($manual_params['options'])) {\n $options = explode(\"\\n\", $manual_params['options']);\n }\n $source = '';\n if (!empty($manual_params['options_source'])) {\n $source = $manual_params['options_source'];\n }\n if (!empty($source)) {\n $srcfile = elis::plugin_file('elisfields_manual', \"sources/{$source}.php\");\n if (file_exists($srcfile)) {\n require_once elis::plugin_file('elisfields_manual','sources.php');\n require_once($srcfile);\n $classname = \"manual_options_{$source}\";\n $plugin = new $classname();\n if ($plugin && $plugin->is_applicable($contextname)) {\n $options = $plugin->get_options($customdata);\n }\n }\n }\n $controls = array();\n foreach ($options as $option) {\n $option = trim($option);\n if ($field->multivalued) {\n // FIXME: this doesn't work\n $cb = $controls[] = &$mform->createElement('checkbox', \"field_{$field->shortname}\", null, $option);\n $cb->updateAttributes(array('value'=>$option));\n } else {\n $controls[] = &$mform->createElement('radio', \"field_{$field->shortname}\", null, $option, $option);\n }\n }\n $mform->addGroup($controls, \"field_{$field->shortname}\", $field->name, '<br />', false);\n } else {\n $checkbox = $mform->addElement('advcheckbox', \"field_{$field->shortname}\", $field->name);\n }\n manual_field_add_help_button($mform, \"field_{$field->shortname}\", $field);\n}", "public function admin_init()\n \t{\t\t\t\n \t\t// Add metaboxes\n \t\t//add_action('add_meta_boxes', array(&$this, 'add_meta_boxes'));\n \t}", "public function setVisible($value) {\r\n $this->bVisible = $this->setBooleanProperty($this->bVisible, $value);\r\n }", "public function metabox_away_mode_settings() {\n\n\t\t$content = '<p>' . __( 'As most sites are only updated at certain times of the day it is not always necessary to provide access to the WordPress dashboard 24 hours a day, 7 days a week. The options below will allow you to disable access to the WordPress Dashboard for the specified period. In addition to limiting exposure to attackers this could also be useful to disable site access based on a schedule for classroom or other reasons.', 'it-l10n-ithemes-security-pro' ) . '</p>';\n\n\t\tif ( preg_match( \"/^(G|H)(:| \\\\h)/\", get_option( 'time_format' ) ) ) {\n\t\t\t$currdate = date_i18n( 'l, d F Y' . ' ' . get_option( 'time_format' ), current_time( 'timestamp' ) );\n\t\t} else {\n\t\t\t$currdate = date( 'g:i a \\o\\n l F jS, Y', current_time( 'timestamp' ) );\n\t\t}\n\n\t\t$content .= '<p>' . sprintf( __( 'Please note that according to your %sWordPress timezone settings%s your current time is:', 'it-l10n-ithemes-security-pro' ), '<a href=\"' . admin_url( 'options-general.php#timezone_string' ) . '\">', '</a>' );\n\t\t$content .= '<div class=\"current-time-date\">' . $currdate . '</div>';\n\t\t$content .= '<p>' . sprintf( __( 'If this is incorrect please correct it on the %sWordPress general settings page%s by setting the appropriate time zone. Failure to set the correct timezone may result in unintended lockouts.', 'it-l10n-ithemes-security-pro' ), '<a href=\"' . admin_url( 'options-general.php#timezone_string' ) . '\">', '</a>' ) . '</p>';\n\n\t\techo $content;\n\n\t\t//set information explaining away mode is enabled\n\t\tif ( isset( $this->settings['enabled'] ) && $this->settings['enabled'] === 1 && ( $this->settings['type'] === 1 || ( $this->settings['end'] > current_time( 'timestamp' ) ) ) ) {\n\n\t\t\t$content = '<hr />';\n\n\t\t\t$content .= sprintf( '<p><strong>%s</strong></p>', __( 'Away mode is currently enabled.', 'it-l10n-ithemes-security-pro' ) );\n\n\t\t\t//Create the appropriate notification based on daily or one time use\n\t\t\tif ( $this->settings['type'] === 1 ) {\n\n\t\t\t\t$content .= sprintf( '<p>' . __( 'The dashboard of this website will become unavailable %s%s%s from %s%s%s until %s%s%s.', 'it-l10n-ithemes-security-pro' ) . '</p>', '<strong>', __( 'every day', 'it-l10n-ithemes-security-pro' ), '</strong>', '<strong>', date_i18n( get_option( 'time_format' ), $this->settings['start'] ), '</strong>', '<strong>', date_i18n( get_option( 'time_format' ), $this->settings['end'] ), '</strong>' );\n\n\t\t\t} else {\n\n\t\t\t\t$content .= sprintf( '<p>' . __( 'The dashboard of this website will become unavailable from %s%s%s on %s%s%s until %s%s%s on %s%s%s.', 'it-l10n-ithemes-security-pro' ) . '</p>', '<strong>', date_i18n( get_option( 'time_format' ), $this->settings['start'] ), '</strong>', '<strong>', date_i18n( get_option( 'date_format' ), $this->settings['start'] ), '</strong>', '<strong>', date_i18n( get_option( 'time_format' ), $this->settings['end'] ), '</strong>', '<strong>', date_i18n( get_option( 'date_format' ), $this->settings['end'] ), '</strong>' );\n\n\t\t\t}\n\n\t\t\t$content .= '<p>' . __( 'You will not be able to log into this website when the site is unavailable.', 'it-l10n-ithemes-security-pro' ) . '</p>';\n\n\t\t\techo $content;\n\t\t}\n\n\t\t$this->core->do_settings_section( 'security_page_toplevel_page_itsec_settings', 'away_mode-enabled', false );\n\t\t$this->core->do_settings_section( 'security_page_toplevel_page_itsec_settings', 'away_mode-settings', false );\n\n\t\techo '<p>' . PHP_EOL;\n\n\t\tsettings_fields( 'security_page_toplevel_page_itsec_settings' );\n\n\t\techo '<input class=\"button-primary\" name=\"submit\" type=\"submit\" value=\"' . __( 'Save All Changes', 'it-l10n-ithemes-security-pro' ) . '\" />' . PHP_EOL;\n\n\t\techo '</p>' . PHP_EOL;\n\n\t}", "public function add_meta_boxes()\n {\n /* Author Name */\n add_meta_box(\n 'testimonial_options',\n 'Testimonial Options',\n array ( $this , 'render_features_box'),\n 'testimonial',\n 'side',\n 'default'\n );\n /* Author email */\n /* approved [checkbox] */\n /* featured [checkbox] */\n }", "function testimonials_meta_boxes() {\n\tadd_meta_box( 'testimonials_form', 'testimonials', 'normal', 'high' );\n}", "public function add_meta_boxes()\n \t{\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('wp_plugin_template_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray($this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\t\t\t\t\n \t}", "function create_metaboxes( $meta_boxes ) {\n\t\t\n\t\t// Get all post types used by plugin and split them up into show and hide.\n\t\t// Sitewide default checked = hide by default, so metabox should let you override that and show the title\n\t\t// Sitewide default empty = display by default, so metabox should let you override that and hide the title\n\t\t\n\t\t$show = array();\n\t\t$hide = array();\n\t\t$post_types = apply_filters( 'be_title_toggle_post_types', array( 'page' ) );\n\t\tforeach ( $post_types as $post_type ) {\n\t\t\t$default = genesis_get_option( 'be_title_toggle_' . $post_type );\n\t\t\tif ( ! empty( $default ) ) $show[] = $post_type;\n\t\t\telse $hide[] = $post_type;\n\t\t}\n\t\t\n\t\t\n\t\t// Create the show and hide metaboxes that override the default\n\t\t\n\t\tif ( ! empty( $show ) ) {\n\t\t\t$meta_boxes[] = array(\n\t\t\t\t'id' => 'be_title_toggle_show',\n\t\t\t\t'title' => __( 'Title Toggle', 'genesis-title-toggle' ),\n\t\t\t\t'pages' => $show,\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'show_names' => true,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' => __( 'Show Title', 'genesis-title-toggle' ),\n\t\t\t\t\t\t\t'desc' => __( 'By default, this post type is set to remove titles. This checkbox lets you show this specific page&rsquo;s title', 'genesis-title-toggle' ),\n\t\t\t\t\t\t\t'id' => 'be_title_toggle_show',\n\t\t\t\t\t\t\t'type' => 'checkbox'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty( $hide ) ) {\n\t\t\t$meta_boxes[] = array(\n\t\t\t\t'id' => 'be_title_toggle_hide',\n\t\t\t\t'title' => __( 'Title Toggle', 'genesis-title-toggle' ),\n\t\t\t\t'pages' => $hide,\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'show_names' => true,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' => __( 'Hide Title', 'genesis-title-toggle' ),\n\t\t\t\t\t\t\t'desc' => __( 'By default, this post type is set to display titles. This checkbox lets you hide this specific page&rsquo;s title', 'genesis-title-toggle' ),\n\t\t\t\t\t\t\t'id' => 'be_title_toggle_hide',\n\t\t\t\t\t\t\t'type' => 'checkbox'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $meta_boxes;\n\t}", "static function metabox($post){\n\t\twp_nonce_field( 'flat-options', 'flat-options_nonce' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\techo '<style>';\n\t\techo '.admin-meta-input{display:block; margin-top: 10px;}';\n\t\techo 'div.field-holder{display: block;float: left; margin: 10px 20px; height: 80px;}';\n\t\techo '.field-block{display: inline-block;clear: both;float: none;}';\n\t\techo '.postbox .inside .field-block h2{padding: 8px 12px;font-weight: 600;font-size: 18px;margin: 0;line-height: 1.4}';\n\t\techo '</style>';\n\t\t\t\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Licitálással kapcsolatos adatok</h2>';\n\t\tforeach ($fieldblocks['licit'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Hely adatok</h2>';\n\t\tforeach ($fieldblocks['location'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlan adatok és településrendezési előírások</h2>';\n\t\tforeach ($fieldblocks['parameters'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlanjogi jellemzők</h2>';\n\t\tforeach ($fieldblocks['info'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Közművek, energiaellátás, telekommunikáció</h2>';\n\t\tforeach ($fieldblocks['sources'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\n\t\t\t\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Építmény (épület) jellemzői</h2>';\n\t\tforeach ($fieldblocks['building'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\techo \"\n\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('.datepicker').datepicker();\t\n\t\t\t\t});\t\n\t\t\t</script>\t\n\t\t\";\n\t\t\n\t\techo '<br clear=\"all\">';\n\t\t\n }", "public function setLineupMen()\n {\n //get week\n $week = SuperAdminOption::where('option_name', 'week')->first()->option_value;\n //get current selection period\n $period = SelectionPeriod::where('week',$week)->first();\n\n $race = $period->race_name;\n //Get Users location\n $location = geoip()->getLocation();\n\n //time in EST\n $closedEST = Carbon::parse($period->closed)->tz($location->timezone)->format('l, n/j/y \\\\a\\\\t g:i A T');\n //Check if open\n $isOpen = SelectionPeriod::open($week);\n\n return view('set-lineup.set-lineup-men',compact('isOpen', 'closedEST','race'));\n }", "function wpb_add_custom_meta_boxes() {\n\tglobal $post;\n\tif ('134' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n\n\tif ('136' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n\n\tif ('138' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n}", "public function metabox( $post, $box ) {\r\n\t\t$defaults = array('taxonomy' => 'category');\r\n\t\tif ( !isset($box['args']) || !is_array($box['args']) )\r\n\t\t\t$args = array();\r\n\t\telse\r\n\t\t\t$args = $box['args'];\r\n\t\textract( wp_parse_args($args, $defaults), EXTR_SKIP );\r\n\r\n\t\t$tax = get_taxonomy($taxonomy);\r\n\r\n\t\t//get current terms\r\n\t\t$checked_terms = $post->ID ? get_the_terms( $post->ID, $taxonomy) : array();\r\n\r\n\t\t//get first term object\r\n $current_term = ! empty( $checked_terms ) && ! is_wp_error( $checked_terms ) ? array_pop( $checked_terms ) : false;\r\n $current_id = ( $current_term ) ? $current_term->term_id : '';\r\n\r\n\t\t?>\r\n\t\t<div id=\"taxonomy-<?php echo $taxonomy; ?>\" class=\"radio-buttons-for-taxonomies\">\r\n\t\t\t<ul id=\"<?php echo $taxonomy; ?>-tabs\" class=\"category-tabs\">\r\n\t\t\t\t<li class=\"tabs\"><a href=\"#<?php echo $taxonomy; ?>-all\" tabindex=\"3\"><?php echo $tax->labels->all_items; ?></a></li>\r\n\t\t\t\t<li class=\"hide-if-no-js\"><a href=\"#<?php echo $taxonomy; ?>-pop\" tabindex=\"3\"><?php _e( 'Most Used' ); ?></a></li>\r\n\t\t\t</ul>\r\n\r\n\t\t\t<style>\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.categorychecklist, .radio-buttons-for-taxonomies ul.tagchecklist { margin: 0; }\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.children { margin-left: 18px; }\r\n\t\t\t</style>\r\n\r\n\t\t\t<?php wp_nonce_field( 'radio_nonce-' . $taxonomy, '_radio_nonce-' . $taxonomy ); ?>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-pop\" class=\"wp-tab-panel tabs-panel\" style=\"display: none;\">\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist-pop\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\" >\r\n\t\t\t\t\t<?php $popular = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );\r\n\r\n\t\t\t\t\t\tif ( ! current_user_can($tax->cap->assign_terms) )\r\n\t\t\t\t\t\t\t$disabled = 'disabled=\"disabled\"';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$disabled = '';\r\n\r\n\t\t\t\t\t\t$popular_ids = array(); ?>\r\n\r\n\t\t\t\t\t\t<?php foreach( $popular as $term ){\r\n\r\n\t\t\t\t\t\t\t$popular_ids[] = $term->term_id;\r\n\r\n\t\t\t\t\t $value = is_taxonomy_hierarchical( $taxonomy ) ? $term->term_id : $term->slug;\r\n\t\t\t\t\t $id = 'popular-'.$taxonomy.'-'.$term->term_id;\r\n\r\n\t\t\t\t\t echo \"<li id='$id'><label class='selectit'>\";\r\n\t\t\t\t\t echo \"<input type='radio' id='in-{$id}'\" . checked( $current_id, $term->term_id, false ) . \" value='{$value}' {$disabled} />&nbsp;{$term->name}<br />\";\r\n\r\n\t\t\t\t\t echo \"</label></li>\";\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-all\" class=\"wp-tab-panel tabs-panel\">\r\n\t\t\t\t<?php\r\n\t $name = 'radio_tax_input[' . $taxonomy . ']';\r\n\t echo \"<input type='hidden' name='{$name}[]' value='0' />\"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.\r\n\t ?>\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist\" data-wp-lists=\"list:<?php echo $taxonomy?>\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\">\r\n\t\t\t\t\t<?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t<?php if ( current_user_can( $tax->cap->edit_terms ) ) : ?>\r\n\t\t\t\t<div id=\"<?php echo $taxonomy; ?>-adder\" class=\"wp-hidden-children\">\r\n\t\t\t\t\t<h4>\r\n\t\t\t\t\t\t<a id=\"<?php echo $taxonomy; ?>-add-toggle\" href=\"#<?php echo $taxonomy; ?>-add\" class=\"hide-if-no-js\" tabindex=\"3\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t/* translators: %s: add new taxonomy label */\r\n\t\t\t\t\t\t\t\tprintf( __( '+ %s' ), $tax->labels->add_new_item );\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t</h4>\r\n\t\t\t\t\t<p id=\"<?php echo $taxonomy; ?>-add\" class=\"category-add wp-hidden-child\">\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>\"><?php echo $tax->labels->add_new_item; ?></label>\r\n\t\t\t\t\t\t<input type=\"text\" name=\"new<?php echo $taxonomy; ?>\" id=\"new<?php echo $taxonomy; ?>\" class=\"form-required form-input-tip\" value=\"<?php echo esc_attr( $tax->labels->new_item_name ); ?>\" aria-required=\"true\"/>\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>_parent\">\r\n\t\t\t\t\t\t\t<?php echo $tax->labels->parent_item_colon; ?>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t<?php if( is_taxonomy_hierarchical($taxonomy) ) {\r\n\t\t\t\t\t\t\twp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $tax->labels->parent_item . ' &mdash;', 'tab_index' => 3 ) );\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t<input type=\"button\" id=\"<?php echo $taxonomy; ?>-add-submit\" data-wp-lists=\"add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add\" class=\"button <?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'category-add-submit'; } else { echo 'radio-add-submit';} ?>\" value=\"<?php echo esc_attr( $tax->labels->add_new_item ); ?>\" tabindex=\"3\" />\r\n\t\t\t\t\t\t<?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy ); ?>\r\n\t\t\t\t\t\t<span id=\"<?php echo $taxonomy; ?>-ajax-response\"></span>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t</div>\r\n\t<?php\r\n\t}", "function agnosia_post_excerpt_settings_meta_box() {\r\n\r\n\t\tglobal $post;\r\n\r\n\t\twp_nonce_field( basename( __FILE__ ) , 'agnosia_post_excerpt_settings_nonce' );\r\n\r\n\t\t$meta_value = get_post_meta( $post->ID, 'agnosia_post_meta' , true ) ;\r\n\r\n\t\t$value_post = isset( $meta_value['content_show_post_excerpt_in_post'] ) ? $meta_value['content_show_post_excerpt_in_post'] : '' ;\r\n\t\t$value_index = isset( $meta_value['content_show_post_excerpt_in_index'] ) ? $meta_value['content_show_post_excerpt_in_index'] : '' ;\r\n\r\n\t\t?>\r\n\r\n\t\t<div id=\"post-excerpt-settings-container\" class=\"settings-container\">\r\n\r\n\t\t\t<ul class=\"category-tabs\" id=\"post-excerpt-tabs\">\r\n\t\t\t\t<li class=\"tabs\"><a href=\"#excerpt-into-post\"><?php _e( 'Into post' , 'agnosia' ); ?></a></li>\r\n\t\t\t\t<li class=\"hide-if-no-js\"><a href=\"#excerpt-into-index\"><?php _e( 'Into index' , 'agnosia' ); ?></a></li>\r\n\t\t\t</ul>\r\n\r\n\t\t\t<div id=\"excerpt-into-post\" class=\"tabs-panel\">\r\n\r\n\t\t\t\t<input type=\"checkbox\" name=\"agnosia_post_meta[content_show_post_excerpt_in_post]\" id=\"content_show_post_excerpt_in_post\" value=\"true\" <?php agnosia_is_checked_meta_box_setting( $value_post , 'true' ); ?>>\r\n\t\t\t\t<label for=\"content_show_post_excerpt_in_post\"><?php _e( 'Show excerpt before content' , 'agnosia' ) ; ?></label><br />\r\n\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"excerpt-into-index\" class=\"tabs-panel hidden\">\r\n\r\n\t\t\t\t<input type=\"radio\" name=\"agnosia_post_meta[content_show_post_excerpt_in_index]\" id=\"content_show_post_excerpt_in_index[0]\" value=\"true\" <?php agnosia_is_checked_meta_box_setting( $value_index , 'true' ); agnosia_default_meta_box_setting( $value_index ); ?>>\r\n\t\t\t\t<label for=\"content_show_post_excerpt_in_index[0]\"><?php _e( 'Show excerpt' , 'agnosia' ) ; ?></label><br />\r\n\r\n\t\t\t\t<input type=\"radio\" name=\"agnosia_post_meta[content_show_post_excerpt_in_index]\" id=\"content_show_post_excerpt_in_index[1]\" value=\"false\" <?php agnosia_is_checked_meta_box_setting( $value_index , 'false' ); ?>>\r\n\t\t\t\t<label for=\"content_show_post_excerpt_in_index[1]\"><?php _e( 'Show content' , 'agnosia' ) ; ?></label><br />\r\n\r\n\t\t\t</div>\r\n\r\n\t\t</div>\r\n\r\n\t\t<?php\r\n\r\n\t}", "public function CltvoDisplayMetabox( $object ){ ?>\n <?php for ($i=0; $i < 2; $i++): ?>\n <div style=\"display: inline-block; width:48%; margin-right: 2%\">\n <p><label>Texto:</label></p>\n <textarea class=\"\" style=\"width:100%;\" name='<?php echo \"$this->meta_key[$i][texto]\";?>'><?php echo $this->meta_value[$i]['texto'];?></textarea>\n </div><div style=\"display: inline-block; width:48%; margin-right: 2%\">\n <p><label>Código de botón de PayPal:</label></p>\n <textarea class=\"\" style=\"width:100%;\" name='<?php echo \"$this->meta_key[$i][boton]\";?>'><?php echo $this->meta_value[$i]['boton'];?></textarea>\n </div>\n <?php endfor; ?>\n\n <?php\n\t}", "function BeforeShowView(&$xt, &$templatefile, &$values, &$pageObject)\n{\n\n\t\tif ($values['Color']) {\n\t$xt->assign(\"bgc_category\",'style=\"background:'.$values['Color'].';\" ');\n}\n\n\n;\t\t\n}", "public function display_meta_box() {\n\t\t\n\t\tinclude_once( 'views/q-and-a-admin.php' );\n }", "public static function items_needed_for_brands(){\n Metabox::make('Personalizar sección de marca', 'brand', [\n 'context' => 'normal',\n 'priority' => 'high',\n 'id' => 'brand-banner-metabox'\n ])->set([\n Field::media('brand-header-banner', [\n 'title' => 'Encabezado',\n 'info' => 'Selecciona un banner que aparecerá en el encabezado cuando la marca esté activa.'\n ]),\n Field::color('brand-header-color', [\n 'title' => 'Color del encabezado',\n 'info' => 'Selecciona un color que aparecerá cuando la pantalla exceda las dimensiones de la imagen.'\n ]),\n ]);\n }", "function register_metabox( $_genesis_theme_settings_pagehook ) {\n\t\tadd_meta_box( 'be-title-toggle', __( 'Title Toggle', 'genesis-title-toggle' ), array( $this, 'create_sitewide_metabox' ), $_genesis_theme_settings_pagehook, 'main', 'high' );\n\t}", "public function custom_meta_add() {\n\t\tif( !$this->options->show_on || in_array(get_the_id(), $this->options->show_on ) ){\n\t\t\tforeach( $this->options->display_on as $post_type ){\n\t\t\t\tadd_meta_box(\n\t\t\t\t\t$this->unique_key, // Unique Key\n\t\t\t\t\t$this->options->title ? esc_html__( $this->options->title ) : 'Related Content', //Title\n\t\t\t\t\tarray(&$this, 'custom_meta_render' ), // Callback (builds html)\n\t\t\t\t\t$post_type, // Post type\n\t\t\t\t\t$this->options->context, // Context\n\t\t\t\t\t$this->options->priority, // Priority\n\t\t\t\t\t$callback_args = null\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t}", "function hideExhibit(){\n\t\t$this->setVisible('0');\n\t\t$res = requete_sql(\"UPDATE exhibit SET visible = '\".$this->visible.\"' WHERE id = '\".$this->id.\"' \");\n\t\tif ($res) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function show_forms()\n {\n }" ]
[ "0.56808996", "0.56169385", "0.5612794", "0.55524224", "0.54794335", "0.5423806", "0.5376647", "0.5340364", "0.5320613", "0.5302954", "0.5206974", "0.518125", "0.5178473", "0.51719457", "0.5126124", "0.5096026", "0.5074389", "0.50655776", "0.5038098", "0.5023653", "0.5008565", "0.4997532", "0.49876264", "0.49740282", "0.495604", "0.494547", "0.49064875", "0.48925954", "0.48864117", "0.48858958", "0.4859274", "0.48514587", "0.48374367", "0.48216593", "0.48189485", "0.48017693", "0.4796928", "0.47941837", "0.47929186", "0.47862145", "0.478609", "0.47529653", "0.47353157", "0.47322938", "0.47260788", "0.47210813", "0.47185636", "0.4711462", "0.46958336", "0.4687592", "0.4682518", "0.46791694", "0.46696657", "0.46691743", "0.4666873", "0.46626404", "0.46589917", "0.464588", "0.4643465", "0.4642715", "0.46403748", "0.46363106", "0.46346784", "0.46298963", "0.46298644", "0.4622487", "0.4617259", "0.46131328", "0.46090558", "0.46063823", "0.4606253", "0.45990142", "0.45985723", "0.45965594", "0.45885774", "0.45859945", "0.4582811", "0.4581521", "0.45813552", "0.45796967", "0.45791355", "0.45755562", "0.45731506", "0.45640007", "0.45629817", "0.45615023", "0.45508373", "0.45502916", "0.4549063", "0.45483953", "0.45483592", "0.45433876", "0.4542133", "0.45406303", "0.45397073", "0.4537281", "0.4531542", "0.45308492", "0.45305568", "0.4529023", "0.45288134" ]
0.0
-1
Set the metabox position.
public function setPosition( $position ) { $this->_position = $position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPosition() {\n }", "public function setMenuItemPosition() {\n\t\t$this->itemPosition = array(\n\t\t\t'slider' => 4,\n\t\t\t'carousel' => 4,\n\t\t\t'testimonial' => 4,\n\t\t\t'portfolio' => 4,\n\t\t\t'options' => 1000\n\t\t);\n\t}", "public function testSetPosition ( ) {\n $this->markTestIncomplete (\n 'This test has not been implemented yet.'\n );\n\n }", "function set_position($newposition) {\n\t\t$this->position = $newposition;\n\t}", "public function setPosition()\n {\n // get the current position\n $currentX = $this->_pdf->getX();\n $currentY = $this->_pdf->getY();\n\n // save it\n $this->value['xc'] = $currentX;\n $this->value['yc'] = $currentY;\n\n if ($this->value['position']=='relative' || $this->value['position']=='absolute') {\n if ($this->value['right']!==null) {\n $x = $this->getLastWidth(true) - $this->value['right'] - $this->value['width'];\n if ($this->value['margin']['r']) $x-= $this->value['margin']['r'];\n } else {\n $x = $this->value['left'];\n if ($this->value['margin']['l']) $x+= $this->value['margin']['l'];\n }\n\n if ($this->value['bottom']!==null) {\n $y = $this->getLastHeight(true) - $this->value['bottom'] - $this->value['height'];\n if ($this->value['margin']['b']) $y-= $this->value['margin']['b'];\n } else {\n $y = $this->value['top'];\n if ($this->value['margin']['t']) $y+= $this->value['margin']['t'];\n }\n\n if ($this->value['position']=='relative') {\n $this->value['x'] = $currentX + $x;\n $this->value['y'] = $currentY + $y;\n } else {\n $this->value['x'] = $this->_getLastAbsoluteX()+$x;\n $this->value['y'] = $this->_getLastAbsoluteY()+$y;\n }\n } else {\n $this->value['x'] = $currentX;\n $this->value['y'] = $currentY;\n if ($this->value['margin']['l']) $this->value['x']+= $this->value['margin']['l'];\n if ($this->value['margin']['t']) $this->value['y']+= $this->value['margin']['t'];\n }\n\n // save the new position\n $this->_pdf->setXY($this->value['x'], $this->value['y']);\n }", "public function setPosition($position);", "function setPosition($value) {\n $this->_position = intval($value);\n }", "public function setPosX($posX);", "public function setPos($pos)\n {\n $this->pos = $pos;\n }", "public function presetEditorPosition()\n {\n $editor = $this->format;\n\n $editor->shiftCurrentXposition($this->shape->getBorderWidth() / 2);\n\n // if there is no space left on the right of the convas to shift to,\n // we update the y axis to shift down to the next line\n if ($editor->getWidth() - $editor->getCurrentXposition() < $this->shape->getWidth(true)\n && $editor->getHeight() - $editor->getCurrentYposition() >= $this->shape->getHeight(true)) {\n\n $editor->shiftCurrentYposition($editor->biggestYpostion());\n $editor->resetCurrentXposition($this->shape->getBorderWidth() / 2);\n\n }\n }", "public function updateEditotPosition()\n {\n $this->format->shiftCurrentXposition($this->shape->getWidth() + ($this->shape->getBorderWidth() / 2));\n }", "function position( $x, $y )\n\t{\n\t\t$this->x = $x;\n\t\t$this->y = $y;\n\t}", "public function setPosition($position) {\n\t\t$this->position = $position;\n\t}", "public static function setPosition(int $x, int $y) {}", "function setPosition($s)\n\t{\n\t\t$this->Info['Position'] = $s;\n\t\tupdateTableByUser('Developer', 'Position', $s, $this->Username);\n\t}", "function getPosition() {\n\t\t}", "function show_metabox_home_position($post){\r\n\r\n\t\t$position_number = get_position($post->ID);\r\n\r\n\t\t\techo \"\r\n\t\t\t<div class='meta-container cf'>\r\n\t\t\t\t<div class='position_mini'>izquierda</div>\r\n\t\t\t\t<div class='position_mini'>centro</div>\r\n\t\t\t\t<div class='position_mini'>derecha</div>\r\n\r\n\t\t\t\t<input class='position_checkbox' type='radio' name='position_meta' value='1' \";\r\n\t\t\t\techo ( $position_number == 1 ) ? 'checked>' : '>' ;\r\n\t\t\t\techo \"\r\n\t\t\t\t<input class='position_checkbox' type='radio' name='position_meta' value='2' \";\r\n\t\t\t\techo ( $position_number == 2 ) ? 'checked>' : '>' ;\r\n\t\t\t\techo \"<input class='position_checkbox' type='radio' name='position_meta' value='3' \";\r\n\t\t\t\techo ( $position_number == 3 ) ? 'checked>' : '>' ;\r\n\t echo \"</div>\";\r\n\r\n\r\n\t}", "public function setPosition($position)\n {\n $this->position = $position;\n }", "public function setPosition($position)\n {\n $this->position = $position;\n }", "public function setCaptionOffset($x, $y) {}", "public function setMenuPosition($position = 5 ){\n\t\t$this->menuPosition = $position;\n\t}", "function setLegendPosition($xpos = 1, $ypos = 0)\n {\n $xpos = intval($xpos);\n $ypos = intval($ypos);\n\n $this->legend_xpos = $xpos;\n $this->legend_ypos = $ypos;\n }", "function setLegendPosition($xpos = 1, $ypos = 0)\n {\n $xpos = intval($xpos);\n if ($xpos < 0) {\n $xpos = -1;\n }\n if ($xpos > 0) {\n $xpos = 1;\n }\n\n $ypos = intval($ypos);\n if ($ypos < 0) {\n $ypos = -1;\n }\n if ($ypos > 0) {\n $ypos = 1;\n }\n\n $this->legend_xpos = $xpos;\n $this->legend_ypos = $ypos;\n }", "public static function setPosition($position)\n {\n self::$position = $position;\n }", "public function setPosition($x, $y, $unit = null);", "public function setPositionAttribute($input)\n {\n $this->attributes['position'] = $input ? $input : null;\n }", "private function setPosition($x, $y = null)\n {\n\n if (is_array($x) && $y === null) {\n $this->getPositionInstance()->setPosition($x[0], $x[1]);\n } else {\n $this->getPositionInstance()->setPosition($x[0], $y[1]);\n }\n }", "public function assignPos(Position $position);", "public function set_position($position){\n $position = (array)$position;\n if(count($position) === 2){\n $this->posX = $position['x'];\n $this->posY = $position['y'];\n }\n return null;\n }", "public function setPosition($newposition) {\n\t\t$this->position = $newposition;\n\t}", "public function set_metabox( \\RWC\\Metabox $metabox ) {\n\n $this->_metabox = $metabox;\n }", "public function meta_box_position( $post )\n\t{\n\t\twp_enqueue_script( 'nav-position' );\n\t\t$nav_position = get_post_meta( $post->ID, '_nav-position', TRUE );\n\t\t$style = ( defined( 'Nav_Position_Image' ) AND defined( 'Nav_Position_Image_Width' ) AND defined( 'Nav_Position_Image_Height' ) ) ? 'style=\"' . apply_filters( 'nav-position-style', 'background-image:url(' . Nav_Position_Image . '); width: ' . Nav_Position_Image_Width . '; height: ' . Nav_Position_Image_Height . '\"' ) : '';\n\t\t?>\n\t\t<div class=\"nav-position-viewport\">\n\n\t\t\t<div class=\"nav-position-background\" <?php echo $style ?> >\n\n\t\t\t\t<div class=\"nav-position-title\" style=\"left:<?php echo $nav_position['left'] ?>px; top: <?php echo $nav_position['top'] ?>px\">\n\t\t\t\t\t<?php echo apply_filters( 'the_title', $post->post_title ) ?>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<p>\n\t\t\t<span class=\"alignright nav-position-info\">\n\t\t\t\t<?php\n\t\t\t\tif ( '' != $nav_position ) :\n\t\t\t\t\techo $nav_position['left'] . ':' . $nav_position['top'];\n\t\t\t\tendif;\n\t\t\t\t?>\n\t\t\t</span>\n\t\t\t<a class=\"button delete-position\" href=\"#\"><?php _e( 'Delete position', 'nav-position' ); ?></a>\n\t\t</p>\n\n\t\t<?php\n\t}", "public function position($value) {\n return $this->setProperty('position', $value);\n }", "public function position($value) {\n return $this->setProperty('position', $value);\n }", "public function position($value) {\n return $this->setProperty('position', $value);\n }", "public function position($value) {\n return $this->setProperty('position', $value);\n }", "public function setPosition($v)\n {\n $this->position = $v;\n }", "public function setNewsfeedPosition($value)\n\t{\n\t\t$this->newsfeed_position = $value;\n\t}", "public function position();", "function meta_box_position() {\n\t$post_types = get_custom_post_types();\n\t// Comment the next 2 lines to exclude Page and Post.\n\t$post_types['post'] = 'post';\n\tforeach ( $post_types as $post_type ) {\n\t\tremove_meta_box( 'postimagediv', $post_type, 'side' );\n\t\tadd_meta_box('postimagediv', __('Feature Image'), 'post_thumbnail_meta_box', $post_type, 'acf_after_title', 'high');\n\t}\n}", "public function setPosY($posY);", "function setPosition($height) {\t \r\n\t \t$this->headery = $height;\r\n\t}", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "public function setStartPosition($value) {\r\n $this->startPosition = $this->setDoubleProperty($this->startPosition, $value);\r\n }", "public function moveToCenter() { }", "function setPositionType( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->PositionType = $value;\n }", "function SetXY($x,$y)\n\t\t{\n\t\t\t$this->SetY($y);\n\t\t\t$this->SetX($x);\n\t\t}", "private function setPositionInstance($x, $y = null)\n {\n if (is_array($x) && $y === null) {\n $this->position = new Position($x[0], $y[1]);\n } else {\n $this->position = new Position($x, $y);\n }\n\n }", "public function position($x, $y) {\n $this->callMethod( 'windowObject.moveTo', array((int) $x, (int) $y) );\n }", "public function setPositionUnits($value) {\r\n if ($this->positionUnits != $value) {\r\n $this->positionUnits = $value;\r\n $this->invalidate();\r\n }\r\n }", "public function restorePosition()\n {\n if ($this->value['y']==$this->_pdf->getY()) $this->_pdf->setY($this->value['yc'], false);\n }", "protected function tempPosition()\n {\n $this->{$this->getPositionColumn()} = static::$insanePosition;\n $this->save();\n }", "public function setPosition($value)\n {\n return $this->set(self::POSITION, $value);\n }", "public function setPosition($position)\n {\n return $this->setData(self::POSITION, $position);\n }", "public function SetPosition($position)\n\t{\n\t\t$pos = str_split($position);\n\t\t\n\t\tif(in_array(strtoupper(strtoupper($pos[0])), $this->horizontal) && in_array($pos[1], $this->verticle))\n\t\t{\n\t\t\t$this->position['horizontal'] = strtoupper($pos[0]);\n\t\t\t$this->position['verticle'] = $pos[1];\n\t\t}\n\t}", "public function setLocation($x, $y, $alignment=Zend_Pdf_Cell::ALIGN_LEFT) {\n\t\t$this->_position=$alignment;\n\t\t$this->_x=$x;\n\t\t$this->_y=$y;\n\t\t\n\t}", "abstract public function setMetas();", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "function _set_new_x($size)\r\n {\r\n $this->new_x = $size;\r\n }", "public function setup_meta_box( $options ) {\n\t\t\n\t\t\t//add_meta_box\n\t\t\n\t\t}", "public function addMetaboxes() {}", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "function SetPos($aRect) {\n\tassert( $this->prect != null ) ;\n\t$this->prect->SetPos($aRect);\n }", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "abstract public function setCurrentPoint(int $x, int $y);", "private function _setPan()\n {\n if (isset($this->pan) && $this->pan) {\n switch ($this->pan) {\n case 'up':\n $x_offset = 1;\n $y_offset = 0.9;\n break;\n\n case 'right':\n $x_offset = 1.1;\n $y_offset = 1;\n break;\n\n case 'down':\n $x_offset = 1;\n $y_offset = 1.1;\n break;\n\n case 'left':\n $x_offset = 0.9;\n $y_offset = 1;\n break;\n }\n\n $new_point = ms_newPointObj();\n $new_point->setXY($this->map_obj->width/2*$x_offset, $this->map_obj->height/2*$y_offset);\n $this->map_obj->zoompoint(1, $new_point, $this->map_obj->width, $this->map_obj->height, $this->map_obj->extent);\n }\n }", "public function SetHookModulePosition()\n {\n $idShops = [];\n\n $sql = 'SELECT distinct id_shop FROM '._DB_PREFIX_.'hook_module';\n if ($results = $this->db->ExecuteS($sql)) {\n foreach ($results as $row) {\n $idShops[] = $row['id_shop'];\n }\n }\n\n $sql = 'SELECT id_hook FROM '._DB_PREFIX_.'hook where name = \"actionUpdateQuantity\"';\n $idHook = $this->db->getValue($sql);\n\n foreach ($idShops as $idShop) {\n $sql = 'SELECT * FROM '._DB_PREFIX_.'hook_module WHERE id_shop = '.$idShop.' AND id_hook = '.$idHook.' ORDER BY position';\n if ($results = $this->db->ExecuteS($sql)) {\n $pos = 2;\n foreach ($results as $row) {\n if ($row['id_module'] == $this->id) {\n $query = 'UPDATE '._DB_PREFIX_.'hook_module SET position = '. 1 .' WHERE id_shop = '.$row['id_shop'].' AND id_hook = '.$row['id_hook'].' AND id_module = '.$row['id_module'];\n } else {\n $query = 'UPDATE '._DB_PREFIX_.'hook_module SET position = '.$pos.' WHERE id_shop = '.$row['id_shop'].' AND id_hook = '.$row['id_hook'].' AND id_module = '.$row['id_module'];\n $pos++;\n }\n $this->db->Execute($query);\n }\n }\n }\n\n return true;\n }", "function _sp_custom_box_portfolio_sort_position( $post ) {\n\twp_nonce_field( '_sp_process_meta_portfolio_sort_position', '_sp_meta_portfolio_sort_position_nonce' );\t\n\n\tif ( $post->ID ) \n\t\t$position = absint( get_post_meta( $post->ID, '_sp_portfolio_sort_position', true ) );\n\n\t$output = '';\n\n\t$output .= '<div class=\"settings-container\">' . PHP_EOL;\t\n\t$output .= '<label for=\"sort-position\" class=\"howto\">' . __( 'Enter the sort position of this portfolio entry:', 'sp-theme' ) . '</label>' . PHP_EOL;\n\t$output .= '<input type=\"text\" value=\"' . esc_attr( $position ) . '\" name=\"portfolio_sort_position\" id=\"sort-position\" class=\"widefat\" />' . PHP_EOL;\n\t$output .= '</div>' . PHP_EOL;\n\n\techo $output;\n}", "public function set_position($param)\n\t{\n\t\t$this->position = (string)$param;\n\t\treturn $this;\n\t}", "public function setPosition(\\PB_Vec3 $value=null)\n {\n return $this->set(self::POSITION, $value);\n }", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "public function meta_box_setup()\n {\n add_meta_box($this->token . '-data', __('Chiro Quiz Details', $this->token), [\n $this,\n 'meta_box_content'\n ], $this->token, 'normal', 'high');\n\n do_action($this->token . '_meta_boxes');\n }", "function setTitlePosition($xpos = 0, $ypos = 0)\n {\n $this->title_xpos = $xpos;\n $this->title_ypos = $ypos;\n }", "public function set_position(INT $_position){\n $this->_position = $_position;\n\n return $this;\n }", "public function setIndex($position);", "public function getPosition(){ }", "public function getPosition() {}", "public function getPosition() {}", "protected function initPosition(): void\n {\n if (!isset($this->args['argument'])) {\n $this->position = null;\n\n return;\n }\n\n if (!is_numeric($this->args['argument'])) {\n throw new CommandWrongUsageException('Wrong usage of fact command. Check if ' . $this->args['argument'] . ' is correct argument.');\n }\n\n $this->position = (int)$this->args['argument'];\n }", "function pt_init_metabox(){\n\t\t add_meta_box('job', 'Byline', array(&$this,'pt_field_job'), 'testimonials', 'side');\n\t\t}", "public function setXPosition($measure, $unit = null, $ignoreOffset = false);", "protected function resetPosition($old = null) {\n\n if(is_array($old)) {\n $this->SetXY($old['x'], $old['y']);\n } else {\n $this->SetXY(0, 0);\n }\n }", "public function getPosition();", "public function getPosition();", "public function getPosition();", "public function getPosition() {\n }", "function rng_METANAME_metabox_init() {\n}", "#[@fromDia(xpath= 'dia:attribute[@name=\"pos\"]/dia:point/@val', value= 'array')]\n public function setPosition($position) {\n $this->setPoint('pos', $position);\n }", "public function move_meta_box() {\n\n\t\tglobal $wp_taxonomies;\n\n\t\t$post_types = $wp_taxonomies['cahnrs-category']->object_type;\n\n\t\tforeach( $post_types as $post_type ) {\n\t\t\t\\remove_meta_box( 'cahnrs-categorydiv', $post_type, 'side' );\n\t\t\t\\add_meta_box( 'cahnrs-categorydiv', 'Content Settings', array( $this, 'cahnrs_page_settings_interface' ), $post_type, 'normal', 'high' );\n\t\t}\n\n\t}", "public function get_position(){ return $this->_position;}", "function getPosition() ;", "function _mce_set_direction($mce_init)\n {\n }", "public function setOrderPosition(Record $record, $position = self::ORDER_POSITION_LAST)\n\t{\n\t\tparent::setOrderPosition($record, $position);\n\t}", "public function add_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t$this->plugin_slug . '-post-metabox',\n\t\t\tesc_html__( 'Review Settings', $this->plugin_slug ),\n\t\t\tarray( $this, 'review_settings_view' ),\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'core'\n \t \t);\n\t}", "public function setPositionOrder()\n {\n $this->getSelect()->order('main_table.position asc')\n ->order('main_table.option_id asc');\n return $this;\n }", "public function setRelativePosition($value) {\r\n $this->relativePosition = $this->setDoubleProperty($this->relativePosition, $value);\r\n }", "function moveTo($newx, $newy) {\n $this->setX($newx);\n $this->setY($newy);\n }", "public function setPosition($var)\n {\n GPBUtil::checkInt64($var);\n $this->position = $var;\n\n return $this;\n }", "public function kiwip_add_meta_box(){\t\t\t\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->title,\n\t\t\tarray(&$this, 'kiwip_metabox_callback'),\n\t\t\t$this->cpt_name,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\t}" ]
[ "0.7007031", "0.6770717", "0.6524012", "0.6295729", "0.62940127", "0.6058832", "0.5984969", "0.5979212", "0.58840674", "0.5880712", "0.58364403", "0.5782262", "0.57638985", "0.57524395", "0.5728635", "0.56447744", "0.5644328", "0.5591638", "0.5591638", "0.5582443", "0.557916", "0.55787486", "0.5567541", "0.5523225", "0.55165493", "0.5440097", "0.543719", "0.54106945", "0.5408303", "0.5397681", "0.53845793", "0.5384274", "0.5382424", "0.5382424", "0.5382424", "0.5382424", "0.535783", "0.5341277", "0.53371596", "0.53290004", "0.5318175", "0.52955365", "0.52916336", "0.5289519", "0.52739894", "0.5244318", "0.5242635", "0.5226347", "0.5180487", "0.5169074", "0.5166667", "0.51462924", "0.5137275", "0.5133666", "0.5131833", "0.51225764", "0.5112189", "0.50967354", "0.5096325", "0.50829935", "0.5082123", "0.5079307", "0.506548", "0.5060988", "0.504893", "0.5020327", "0.4993285", "0.4988384", "0.4978776", "0.49592748", "0.4957863", "0.4948688", "0.4948163", "0.49427813", "0.49280107", "0.49266496", "0.4925323", "0.49122602", "0.49122602", "0.49098575", "0.49075606", "0.4900371", "0.48892498", "0.48755014", "0.48755014", "0.48755014", "0.48651835", "0.48530596", "0.48508263", "0.48508066", "0.48468953", "0.48331234", "0.48294345", "0.48189375", "0.47933212", "0.4793129", "0.4787077", "0.4781193", "0.4780398", "0.4774437" ]
0.59353626
8
Set the metabox post type.
public function setPostType( $postType ) { $this->_postType = $postType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_post_type($post_id = 0, $post_type = 'post')\n {\n }", "protected function set_type() {\n\n\t\t\t$this->type = 'kirki-editor';\n\n\t\t}", "function snax_mashshare_add_post_types_to_metaboxes( $metaboxes ) {\n\t$metaboxes[0]['pages'][] = 'snax_quiz';\n\treturn $metaboxes;\n}", "function register_post_metabox( $id,$title,$post_type) {\r\n\t\t$this->has_post_meta = true;\r\n\t\tadd_meta_box( \r\n\t\t\t$id, \r\n\t\t\t$title, \r\n\t\t\tarray(&$this,'post_meta_builder'), \r\n\t\t\t$post_type, \r\n\t\t\t'normal', \r\n\t\t\t'high', \r\n\t\t\t$this->postmeta[$post_type][$id] \r\n\t\t);\r\n\t}", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "protected function setContentType()\n {\n $this->content_type = 'Page';\n }", "public function add_meta_box( $post_type ) {\n\t\t// Limit meta box to certain post types.\n\t\t$post_types = $this->get_support_post_types();\n\t\tif ( in_array( $post_type, $post_types ) ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'customify_page_settings',\n\t\t\t\t__( 'Customify Settings', 'customify' ),\n\t\t\t\tarray( $this, 'render_meta_box_content' ),\n\t\t\t\t$post_type,\n\t\t\t\t'normal',\n\t\t\t\t'high'\n\t\t\t);\n\t\t}\n\t}", "function tabify_add_meta_boxes($post_type)\n {\n }", "public function post_type( $key ) {\n\t\t$this->data['post_type'] = $key;\n\t\t$this->post_type_key = $key;\n\t}", "protected function setPostType($model = null) {\n if (isset($model))\n $model->post_type = Posting::POST_TYPE_UNKNOWN;\n }", "function admin_metaboxes() {\r\n\r\n// \t\t\t/** Check if wpeo_log_select_post_type exist */\r\n// \t\t\tif( !empty(\t$this->wpeologs_settings['post_type'] ) ) {\r\n// \t\t\t\tforeach ( $this->wpeologs_settings['post_type'] as $post_type ) {\r\n\r\n// \t\t\t\t\t//add_meta_box( 'wpeologs_metabox_' . $post_type, __( 'Logs', 'wpeologs-i18n'), array( &$this, 'associated_post_type_metabox' ), $post_type, 'normal' );\r\n// \t\t\t\t}\r\n// \t\t\t}\r\n\t\t}", "function wpbm_register_post_type(){\n include('inc/admin/register/wpbm-register-post.php');\n register_post_type( 'WP Blog Manager', $args );\n }", "public function type() { return $this->post->post_type; }", "public function add_meta_box( $post_type ) {\n // Limit meta box to certain post types.\n $post_types = array( 'post', 'page' );\n \n $box_label = __('Opcionais para esta transformação');\n if ( $post_type == 'transform' ) {\n add_meta_box(\n 'emertech_transform_optionals',\n $box_label,\n array( $this, 'render_meta_box_content' ),\n $post_type,\n 'advanced',\n 'high'\n );\n }\n }", "public function add_post_metaboxes() {\n\t\tif( empty( $this->push_syndicate_settings['selected_post_types'] ) )\n\t\t\treturn;\n\n\t\tif( !$this->current_user_can_syndicate() )\n\t\t\treturn;\n\n\t\t$selected_post_types = $this->push_syndicate_settings[ 'selected_post_types' ];\n\t\tforeach( $selected_post_types as $selected_post_type ) {\n\t\t\tadd_meta_box( 'syndicatediv', __( ' Syndicate ' ), array( $this, 'add_syndicate_metabox' ), $selected_post_type, 'side', 'high' );\n\t\t\t//add_meta_box( 'syndicationstatusdiv', __( ' Syndication Status ' ), array( $this, 'add_syndication_status_metabox' ), $selected_post_type, 'normal', 'high' );\n\t\t}\n\n\t}", "function wtfdivi099_add_meta_boxes() {\r\n\tforeach(get_post_types() as $pt) {\r\n\t\tif (post_type_supports($pt, 'editor') and function_exists('et_single_settings_meta_box')) {\r\n\t\t\tadd_meta_box('et_settings_meta_box', __('Divi Custom Post Settings', 'Divi'), 'et_single_settings_meta_box', $pt, 'side', 'high');\r\n\t\t}\r\n\t} \r\n}", "private function post_types() {\n\t\t$this->section_data['general_post_types'] = array(\n\t\t\t'name' \t\t\t\t\t=> 'general_post_types',\n\t\t\t'label' \t\t\t\t=> __( 'Post types', 'fixedtoc' ),\n\t\t\t'default' \t\t\t=> array( 'post', 'page' ),\n\t\t\t'type' \t\t\t\t\t=> 'multi_checkbox',\n\t\t\t'choices'\t\t\t\t=> $this->obj_field_data->get_posttype_choices(),\n\t\t\t'des'\t\t\t\t\t\t=> __( 'Check the post types to be applied. Multiple choice.', 'fixedtoc' )\n\t\t);\n\t}", "function siteorigin_panels_metaboxes() {\n\tforeach( siteorigin_panels_setting( 'post-types' ) as $type ){\n\t\tadd_meta_box( 'so-panels-panels', __( 'Page Builder', 'positive-panels' ), 'siteorigin_panels_metabox_render', $type, 'advanced', 'high' );\n\t}\n}", "public function setMetaType(string $meta_type)\n {\n $this->meta_type = $meta_type;\n return $this;\n }", "public function set_type( $type ) {\n\t\t$this->set_prop( 'type', sanitize_title( $type ) ) ;\n\t}", "public function add_meta_box($post_type)\r\n {\r\n\r\n if (in_array($post_type, $this->post_types))\r\n {\r\n add_meta_box(\r\n 'multi_image_upload_meta_box'\r\n , __('Upload Multiple Images', 'miu_textdomain')\r\n , array($this, 'render_meta_box_content')\r\n , $post_type\r\n , 'advanced'\r\n , 'high'\r\n );\r\n }\r\n }", "public function sailthru_post_metabox() {\n\n\t\tadd_meta_box(\n\t\t\t'sailthru-post-data',\n\t\t\t__( 'Sailthru Post Data', 'sailthru' ),\n\t\t\tarray( $this, 'post_metabox_display' ),\n\t\t\t'post',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t}", "public function add_meta_box( $post_type ) {\n // Limit meta box to certain post types.\n $post_types = array( 'post', 'page','book' );\n \n if ( in_array( $post_type, $post_types ) ) {\n add_meta_box(\n 'some_meta_box_name',\n __( 'Some Meta Box Headline', 'textdomain' ),\n array( $this, 'render_meta_box_content' ),\n $post_type,\n 'advanced',\n 'high'\n );\n }\n }", "public function add_brick_type_metabox()\n {\n add_meta_box(\n 'brick_type',\n 'Brick Type',\n array(&$this, 'render_brick_type_metabox'),\n self::$post_type_key,\n 'side'\n );\n }", "public function meta_box( $post, $metabox ) {\n\t\t$sidebars = get_option( 'ups_sidebars' );\n\t\t$sidebar_id = esc_attr( $metabox['args']['id'] );\n\t\t$sidebar = $sidebars[$sidebar_id];\n\n\t\t$options_fields = array(\n\t\t\t'name' => 'Name',\n\t\t\t'description' => __('Description', self::TEXT_DOMAIN),\n\t\t\t'before_title' => __('Before Title', self::TEXT_DOMAIN),\n\t\t\t'after_title' => __('After Title', self::TEXT_DOMAIN),\n\t\t\t'before_widget' => __('Before Widget', self::TEXT_DOMAIN),\n\t\t\t'after_widget' => __('After Widget', self::TEXT_DOMAIN),\n\t\t\t'children' => __('Child Behavior', self::TEXT_DOMAIN),\n\t\t);\n\n\t\t$post_types = get_post_types( array( '_builtin' => false ), 'objects' );\n\t\t$post_types = array_merge( $post_types, array( 'page' => get_post_type_object( 'page' ), 'post' => get_post_type_object( 'post' ) ) );\n\t\t?>\n\t\t<div style=\"float: left; width: 25%;\">\n\t\t\t<ul class=\"wp-tab-bar\">\n\t\t\t\t<?php $i = 0; foreach ( $post_types as $post_type ) : ?>\n\t\t\t\t\t<li <?php echo ($i == 0) ? 'class=\"wp-tab-active\"' : ''; ?>>\n\t\t\t\t\t\t<a href=\"#post-type-<?php echo esc_attr( $post_type->name ); ?>\">\n\t\t\t\t\t\t\t<?php echo esc_html( $post_type->labels->name ); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t<?php ++$i; endforeach; ?>\n\t\t\t</ul>\n\t\t\t<?php $i = 0; foreach ( $post_types as $post_type ) : ?>\n\t\t\t\t<div class=\"wp-tab-panel\" id=\"post-type-<?php echo esc_attr( $post_type->name ); ?>\" <?php echo ($i > 0) ? 'style=\"display: none;\"' : ''; ?>>\n\t\t\t\t\t<?php\n\t\t\t\t\t$items = new WP_Query( array(\n\t\t\t\t\t\t'offset' => 0,\n\t\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t\t\t'orderby' => 'title',\n\t\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t\t'post_type' => $post_type->name,\n\t\t\t\t\t\t'suppress_filters' => true,\n\t\t\t\t\t\t'update_post_term_cache' => false,\n\t\t\t\t\t\t'update_post_meta_cache' => false,\n\t\t\t\t\t\t'no_found_posts' => true,\n\t\t\t\t\t) );\n\t\t\t\t\tif ( $items->have_posts() ) : ?>\n\t\t\t\t\t\t<ul id=\"<?php echo esc_attr( $post_type->name ); ?>checklist\" class=\"categorychecklist form-no-clear\">\n\t\t\t\t\t\t\t<?php while ( $items->have_posts() ) : $items->the_post(); ?>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t<?php $name = 'ups_sidebars[' . $sidebar_id . '][locations][' . $post_type->name . '][' . get_the_ID() . ']'; ?>\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" class=\"menu-item-checkbox\" name=\"<?php echo esc_attr( $name ); ?>\" value=\"<?php echo esc_attr( get_the_title( get_the_ID() ) ); ?>\" <?php echo ( isset( $sidebar['locations'][$post_type->name] ) && array_key_exists( get_the_ID(), $sidebar['locations'][$post_type->name] ) ) ? 'checked=\"checked\"' : ''; ?> />\n\t\t\t\t\t\t\t\t\t<?php echo esc_html( get_the_title( get_the_ID() ) ); ?>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<?php endwhile; ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t<?php ++$i; endforeach; ?>\n\t\t</div>\n\t\t<script>\n\t\tjQuery(document).ready( function($) {\n\t\t\t// WP tabs\n\t\t\t$('.wp-tab-bar a').click(function(event){\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// Limit effect to the container element.\n\t\t\t\tvar context = $(this).parents('.wp-tab-bar').first().parent();\n\t\t\t\t$('.wp-tab-bar li', context).removeClass('wp-tab-active');\n\t\t\t\t$(this).parents('li').first().addClass('wp-tab-active');\n\t\t\t\t$('.wp-tab-panel', context).hide();\n\t\t\t\t$( $(this).attr('href'), context ).show();\n\t\t\t});\n\n\t\t\t// Make setting wp-tab-active optional.\n\t\t\t$('.wp-tab-bar').each(function(){\n\t\t\t\tif ( $('.wp-tab-active', this).length )\n\t\t\t\t\t$('.wp-tab-active', this).click();\n\t\t\t\telse $('a', this).first().click();\n\t\t\t});\n\t\t});\n\t\t</script>\n\t\t<div style=\"float: right; width: 70%;\">\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<?php foreach ( $options_fields as $id => $label ) : ?>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\"><?php echo esc_html( $label ); ?></label></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t<?php if ( 'children' == $id ) : ?>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\tif ( array_key_exists( 'children', $sidebar ) && $sidebar['children'] == 'on' ) {\n\t\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" value=\"on\" id=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\"<?php echo $checked; ?> />\n\t\t\t\t\t\t<span class=\"description\"><?php _e('Set page children to use the parent page sidebar by default?', self::TEXT_DOMAIN) ?></span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t<input id=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" class=\"regular-text\" type=\"text\" name=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" value=\"<?php echo esc_html( $sidebar[$id] ); ?>\" />\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</table>\n\t\t</div>\n\t\t<div class=\"clear submitbox\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save all sidebars', self::TEXT_DOMAIN) ?>\" />&nbsp;&nbsp;&nbsp;\n\t\t\t<label><input type=\"checkbox\" name=\"ups_sidebars[delete]\" value=\"<?php echo esc_attr( $sidebar_id ); ?>\" /> <?php _e('Delete this sidebar?', self::TEXT_DOMAIN) ?></label>\n\t\t</div>\n\t\t<?php\n\t}", "public function init_post_type() {\n\t\t\t\n\t\t\t$labels = array(\n\t\t\t\t'name'\t\t\t\t=> 'Meetups',\n\t\t\t\t'new_item'\t\t\t=> 'Neues Meetup',\n\t\t\t\t'singular_name'\t\t=> 'Meetup',\n\t\t\t\t'view_item'\t\t\t=> 'Zeige Meetups',\n\t\t\t\t'edit_item'\t\t\t=> 'Editiere Meetup',\n\t\t\t\t'add_new_item'\t\t=> 'Meetup hinzuf&uuml;gen',\n\t\t\t\t'not_found'\t\t\t=> 'Kein Meetup gefunden',\n\t\t\t\t'search_items'\t\t=> 'Durchsuche Meetups',\n\t\t\t\t'parent_item_colon' => ''\n\t\t\t);\n\t\t\t\n\t\t\t$supports = array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'comments',\n\t\t\t);\n\t\t\t\n\t\t\t$args = array(\n\t\t\t\t'public'\t\t\t\t=> TRUE,\n\t\t\t\t'publicly_queryable'\t=> TRUE,\n\t\t\t\t'show_ui'\t\t\t\t=> TRUE, \n\t\t\t\t'query_var'\t\t\t\t=> TRUE,\n\t\t\t\t'capability_type'\t\t=> 'post',\n\t\t\t\t'hierarchical'\t\t\t=> FALSE,\n\t\t\t\t'menu_position'\t\t\t=> NULL,\n\t\t\t\t'supports'\t\t\t\t=> $supports,\n\t\t\t\t'has_archive'\t\t\t=> TRUE,\n\t\t\t\t'rewrite'\t\t\t\t=> TRUE,\n\t\t\t\t'labels'\t\t\t\t=> $labels\n\t\t\t);\n\t\t\t\n\t\t\tregister_post_type( 'wpmeetups', $args );\n\t\t}", "public static function post_type(){}", "public function register_post_type(){\n\t\tif(!class_exists('CPT')) return;\n\t\n\t\t$this->post_type = new CPT(\n\t\t\tarray(\n\t\t\t 'post_type_name' => 'slide',\n\t\t\t 'singular' => 'Slide',\n\t\t\t 'plural' => 'Slides',\n\t\t\t 'slug' => 'slide'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'has_archive' \t\t\t=> \ttrue,\n\t\t\t\t'menu_position' \t\t=> \t8,\n\t\t\t\t'menu_icon' \t\t\t=> \t'dashicons-layout',\n\t\t\t\t'supports' \t\t\t\t=> \tarray('title', 'excerpt', 'content','thumbnail', 'post-formats', 'custom-fields')\n\t\t\t)\n\t\t);\n\t\t\n\t\t$labels = array('menu_name'=>'Types');\n\t\t$this->post_type->register_taxonomy('type',array(\n\t\t\t'hierarchical' => true,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_tagcloud' => true,\n\t\t),$labels);\n\t}", "public function setPostType($post_type) {\n\t\t$this->post_type = $post_type;\n\n\t\treturn $this;\n\t}", "public function set_content_type($contenttype)\n\t{\n\t\t$variables = &$this->cms->variables;\n\t\t$variables['content-type'] = $contenttype;\n\t}", "function ilusix_my_custom_meta_box() {\n global $myMetaBoxPostTypes;\n\n foreach($myMetaBoxPostTypes as $postType) {\n add_meta_box(\n 'my_custom_meta_box_identifier' . '-' . $postType,\n 'Meta box title',\n 'ilusix_my_custom_meta_box_callback',\n $postType,\n 'normal',\n 'default'\n );\n }\n}", "function add_meta_boxes($post_type, $post)\n {\n }", "public function add_meta_box( $post_type ) {\n\t\tadd_meta_box(\n\t\t\t'question_author'\n\t\t\t,__( 'Question author', 'piananotizie' )\n\t\t\t,array( $this, 'render_meta_box_content' )\n\t\t\t,'askthelawyer'\n\t\t\t,'side'\n\t\t\t,'default'\n\t\t);\n\t}", "public function post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'Departamentos'),\n\t\t\t'singular_name' => __( 'Departamento' ),\n\t\t\t'add_new' => __('Añadir nuevo'),\n\t\t\t'add_new_item' => __('Añadir nuevo Departamento'),\n\t\t\t'edit_item' => __('Editar Departamento'),\n\t\t\t'new_item' => __('Nuevo Departamento'),\n\t\t\t'view_item' => __('Ver Departamento'),\n\t\t\t'search_items' => __('Buscar'),\n\t\t\t'not_found' => __('No se encontraron Departamentos'),\n\t\t\t'not_found_in_trash' => __('No se encontraron Departamentos en la Papelera'), \n\t\t\t'parent_item_colon' => ''\n\t\t );\n\t\t \n\t\t $args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true, \n\t\t\t'query_var' => true,\n\t 'has_archive' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => true,\n\t\t 'show_ui' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t 'show_in_menu' => 'bn_config',\n\t\t\t'menu_position' => 57,\n\t\t\t'menu_icon' => 'dashicons-clipboard',\n\t\t\t'rewrite' => array('slug' => __( $this->post_type )),\n\t\t\t'supports' => array('title', 'excerpt', 'page-attributes') //,'editor'\n\t\t );\n\t\t \n\t\t register_post_type(__( $this->post_type ), $args);\n\t}", "public function setTyp( $type );", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "public function setContentType($type)\n\t{\n\t\t$this->contenttype = $type;\n\t}", "protected function setPostTypeObject(){\n\t\treturn array(\n\t\t\t'label' => _x('genres', 'genre', 'cpt_genre'),\n\t\t\t'labels' => array(\n\t\t\t\t'name' => _x('Genres', 'genre', 'cpt_genre'),\n\t\t\t\t'singular_name' => _x('genre', 'genre', 'cpt_genre'),\n\t\t\t\t'add_new' => _x('Add new genre', 'genre', 'cpt_genre'),\n\t\t\t\t'all_items' => _x('Genres', 'genre', 'cpt_genre'),\n\t\t\t\t'add_new_item' => _x('Add new genre', 'genre', 'cpt_genre'),\n\t\t\t\t'edit_item' => _x('Edit genre', 'genre', 'cpt_genre'),\n\t\t\t\t'new_item' => _x('New genre', 'genre', 'cpt_genre'),\n\t\t\t\t'view_item' => _x('Show genre', 'genre', 'cpt_genre'),\n\t\t\t\t'search_items' => _x('Search genres', 'genre', 'cpt_genre'),\n\t\t\t\t'not_found' => _x('No genres found', 'genre', 'cpt_genre'),\n\t\t\t\t'not_found_in_trash' => _x('No genres found in the trash', 'genre', 'cpt_genre'),\n\t\t\t\t'parent_item_colon' => _x('Genre', 'genre', 'cpt_genre'),\n\t\t\t\t'menu_name' => _x('Genres catalog', 'genre', 'cpt_genre')\n\t\t\t),\n\t\t\t'description' => _x('Genres for music catalog', 'genre', 'cpt_genre'),\n\t\t\t'public' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_nav_menus' => false,\n\t\t\t'show_in_menu' => 'edit.php?post_type=music',\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'menu_position' => null,\n\t\t\t'menu_icon' => null,\n\t\t\t'capability_type' => array( 'genre', 'genres' ),\n\t\t\t'hierarchical' => true,\n\t\t\t'supports' => array( 'title', 'editor' ),\n\t\t\t'has_archive' => true,\n\t\t\t'rewrite' => array( 'slug' => __('genres', 'cpt_genre'), 'with_front' => true, 'feeds' => true, 'pages' => true ),\n\t\t\t'query_var' => true,\n\t\t\t'can_export' => false\n\t\t);\n\t}", "public static function add_meta_boxes_post($post) {\n add_meta_box(\"medium\", \"Medium\", array(\"Medium_Admin\", \"meta_box_callback\"),\n null, \"side\", \"high\");\n }", "function wpf_load_post_type_metaboxes() {\n\tglobal $wpf_classes;\n\n\t$metabox_class = wpf_get_class( 'metaboxes' );\n\n\treturn $wpf_classes['metaboxes'] = new $metabox_class();\n}", "private function register_post_type() {\n\t\t\t// register the post type\n\t\t\t$args = array('label' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t\t\t\t\t'public' => false,\n\t\t\t\t\t\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t\t\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t\t\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t\t\t\t\t\t'rewrite' => array('slug' => $this->post_type, 'with_front' => false),\n\t\t\t\t\t\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t\t\t\t\t\t'menu_position' => 100,\n\t\t\t\t\t\t\t\t\t\t'menu_icon' => 'dashicons-admin-generic',\n\t\t\t\t\t\t\t\t\t\t'supports' => array('title','custom-fields','revisions'),\n\t\t\t\t\t\t\t\t\t\t'labels' => array('name' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'singular_name' => __('Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'menu_name' =>\t__('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new' => __('Add Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new_item' => __('Add New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit' => __('Edit', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit_item' => __('Edit Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'new_item' => __('New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view_item' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'search_items' => __('Search Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found' => __('No Options Pages Found', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found_in_trash' => __('No Options Pages Found in Trash', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'parent' => __('Parent Options Page', $this->text_domain)));\n\t\t\tregister_post_type($this->post_type, $args);\n\t\t}", "public function set_post_types() {\n\t\tadd_filter(\n\t\t\t'slack_event_transition_post_status_post_types',\n\t\t\tfunction( $post_types ) {\n\t\t\t\t$set_post_types = get_option( 'slack-post-types' );\n\t\t\t\tforeach( $set_post_types as $post_type => $on ) {\n\t\t\t\t\t$post_types[] = $post_type;\n\t\t\t\t}\n\n\t\t\t\treturn $post_types;\n\t\t\t}\n\t\t);\n\t}", "public function add_meta_boxes($post_type) {\n\n if ($post_type == 'post') {\n \tadd_meta_box(\n\t\t\t\t'post_metabox_hide_fields_for_post'\n\t\t\t\t,__('Hide fields',THEME_NAME)\n\t\t\t\t,array($this, 'render_meta_hide_fields_for_post')\n\t\t\t\t,$post_type\n\t\t\t\t,'side'\n\t\t\t\t,'default'\n\t\t\t);\n \t\n }elseif($post_type == 'page') {\n \tadd_meta_box(\n\t\t\t\t'post_metabox_hide_fields_for_page'\n\t\t\t\t,__('Hide fields',THEME_NAME)\n\t\t\t\t,array($this, 'render_metabox_hide_fields_for_page')\n\t\t\t\t,$post_type\n\t\t\t\t,'side'\n\t\t\t\t,'default'\n\t\t\t);\n }\n\n if ( in_array( $post_type, array('post','page') )) {\n\n\t\t\tadd_meta_box(\n\t\t\t\t'post_metabox_feature'\n\t\t\t\t,__('Feature',THEME_NAME)\n\t\t\t\t,array($this, 'render_meta_box_feature')\n\t\t\t\t,$post_type\n\t\t\t\t,'normal'\n\t\t\t\t,'high'\n\t\t\t);\n }\n\t}", "public function add_metaboxes( $post_type )\n {\n add_meta_box(\n 'passster',\n __( 'Passster', 'content-protector' ),\n array( $this, 'render_passster' ),\n apply_filters( 'passster_post_types', array( 'post', 'page', 'product' ) ),\n 'side',\n 'high'\n );\n }", "function create_meta_box() {\n\n\tglobal $postmetas;\n\t\n\tif(!isset($_GET['post_type']) OR empty($_GET['post_type']))\n\t{\n\t\tif(isset($_GET['post']) && !empty($_GET['post']))\n\t\t{\n\t\t\t$post_obj = get_post($_GET['post']);\n\t\t\t$_GET['post_type'] = $post_obj->post_type;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_GET['post_type'] = 'post';\n\t\t}\n\t}\n\t\n\tif ( function_exists('add_meta_box') && isset($postmetas) && count($postmetas) > 0 ) { \n\t\tforeach($postmetas as $key => $postmeta)\n\t\t{\n\t\t\tif($_GET['post_type']==$key)\n\t\t\t{\n\t\t\t\tadd_meta_box( 'metabox', ucfirst($key).' Options', 'new_meta_box', $key, 'side', 'high' ); \n\t\t\t}\n\t\t}\n\t}\n\n}", "private function add_meta_boxes() {\n\t\t$post_types = $this->post->get_types();\n\n\t\tforeach ( $post_types as $post_type => $value ) {\n\t\t\tadd_meta_box( 'subway_comment_metabox',\n\t\t\t\tesc_html__( 'Memberships Discussion', 'subway' ),\n\t\t\t\tfunction ( $post ) {\n\t\t\t\t\t$this->discussion( $post );\n\t\t\t\t},\n\t\t\t\t$post_type, 'side', 'high'\n\t\t\t);\n\t\t\tadd_meta_box( 'subway_visibility_metabox',\n\t\t\t\tesc_html__( 'Memberships Access', 'subway' ),\n\t\t\t\tfunction ( $post ) {\n\t\t\t\t\t$this->visibility( $post );\n\t\t\t\t},\n\t\t\t\t$post_type, 'side', 'high'\n\t\t\t);\n\t\t}\n\n\t}", "public function setup_meta_box($post) {\n\t\t\t\n\t\t\t$build = new Build($post->ID, $this->slug, $this->options);\n\t\t\t$build->build_meta_box();\n\t\t}", "public function set_metabox( \\RWC\\Metabox $metabox ) {\n\n $this->_metabox = $metabox;\n }", "public static function create_meta_box() {\n\t\t$content_types_array = self::_get_active_content_types();\n\t\tforeach ( $content_types_array as $content_type ) {\n\t\t\tadd_meta_box( 'custom-content-type-mgr-custom-fields'\n\t\t\t\t, __('Custom Fields', CCTM::txtdomain )\n\t\t\t\t, 'StandardizedCustomFields::print_custom_fields'\n\t\t\t\t, $content_type\n\t\t\t\t, 'normal'\n\t\t\t\t, 'high'\n\t\t\t\t, $content_type \n\t\t\t);\n\t\t}\n\t}", "private function registerPostType() {\n\t global $superfood_elated_global_Framework;\n\n\t $menuPosition = 5;\n\t $menuIcon = 'dashicons-admin-post';\n\n\t if(eltd_core_theme_installed()) {\n\t\t $menuPosition = $superfood_elated_global_Framework->getSkin()->getMenuItemPosition('masonry-gallery');\n\t\t $menuIcon = $superfood_elated_global_Framework->getSkin()->getMenuIcon('masonry-gallery');\n\t }\n\n register_post_type($this->base,\n array(\n 'labels' \t\t=> array(\n 'name' \t\t\t\t=> esc_html__('Masonry Gallery', 'eltdf-core' ),\n 'all_items'\t\t\t=> esc_html__('Masonry Gallery Items', 'eltdf-core'),\n 'singular_name' \t=> esc_html__('Masonry Gallery Item', 'eltdf-core' ),\n 'add_item'\t\t\t=> esc_html__('New Masonry Gallery Item', 'eltdf-core'),\n 'add_new_item' \t\t=> esc_html__('Add New Masonry Gallery Item', 'eltdf-core'),\n 'edit_item' \t\t=> esc_html__('Edit Masonry Gallery Item', 'eltdf-core')\n ),\n 'public'\t\t=>\tfalse,\n 'show_in_menu'\t=>\ttrue,\n 'rewrite' \t\t=> \tarray('slug' => 'masonry-gallery'),\n\t\t\t\t'menu_position' => \t$menuPosition,\n 'show_ui'\t\t=>\ttrue,\n 'has_archive'\t=>\tfalse,\n 'hierarchical'\t=>\tfalse,\n 'supports'\t\t=>\tarray('title', 'thumbnail'),\n\t\t\t\t'menu_icon' => $menuIcon\n )\n );\n }", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "public function add_meta_box( $post_type ) {\n // Limit meta box to certain post types.\n $options = get_option('sbrb_settings');\n $post_types = $options['sbrb_post_types'];\n\n if ( is_array($post_types) && in_array( $post_type, $post_types ) ) {\n add_meta_box(\n 'sbrb_short_url_metabox',\n __( 'Rebrandly URL', 'stratabeat_rebrandly_urls' ),\n array( $this, 'render_meta_box_content' ),\n $post_type,\n 'side',\n 'high'\n );\n }\n }", "function master_sidebar_post_type_meta_boxes() {\n\t\n\t$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' );\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tif ( ! $post_types ) {\n\t\treturn;\n\t}\n\n\t// Add metabox for each posttype\n\tforeach ( $post_types as $post_type ) {\n\t\t$post_type = apply_filters( 'master_sidebar_meta_box_object', $post_type );\n\t\tif ( $post_type ) {\n\t\t\t$id = $post_type->name;\n\t\t\tadd_meta_box( \n\t\t\t\t\"master-add-{$id}\", \n\t\t\t\t$post_type->labels->name, \n\t\t\t\t'master_sidebar_item_post_type_meta_box', \n\t\t\t\t$admin_page_name, \n\t\t\t\t'side', \n\t\t\t\t'default', \n\t\t\t\t$post_type \n\t\t\t);\n\t\t}\n\t}\n}", "public function addMetaBox(WP_Post $post): void\n {\n $slug = $post->post_type;\n add_meta_box(\n $slug . '_editor',\n __('Informationen', 'wp-plugin-core'),\n array( $this, 'editorByPost' ),\n $slug,\n 'advanced',\n 'high'\n );\n }", "function wpm_actus_post_type() {\n\n\t// On rentre les différentes dénominations de notre custom post type qui seront affichées dans l'administration\n\t$labels = array(\n\t\t// Le nom au pluriel\n\t\t'name' => _x( 'Actus', 'Post Type General Name'),\n\t\t// Le nom au singulier\n\t\t'singular_name' => _x( 'Actu', 'Post Type Singular Name'),\n\t\t// Le libellé affiché dans le menu\n\t\t'menu_name' => __( 'Actus'),\n\t\t// Les différents libellés de l'administration\n\t\t'all_items' => __( 'Toutes les actus'),\n\t\t'view_item' => __( 'Voir les actus'),\n\t\t'add_new_item' => __( 'Ajouter une actu'),\n\t\t'add_new' => __( 'Ajouter'),\n\t\t'edit_item' => __( 'Editer'),\n\t\t'update_item' => __( 'Modifier'),\n\t\t'search_items' => __( 'Rechercher'),\n\t\t'not_found' => __( 'Non trouvée'),\n\t\t'not_found_in_trash' => __( 'Non trouvée dans la corbeille'),\n\t);\n\n\t// On peut définir ici d'autres options pour notre custom post type\n\n\t$args = array(\n\t\t'label' => __( 'Actus'),\n\t\t'description' => __( 'Toutes les actus'),\n\t\t'labels' => $labels,\n\t\t// On définit les options disponibles dans l'éditeur de notre custom post type ( un titre, un auteur...)\n\t\t'supports' => array( 'title', 'thumbnail' ),\n\t\t/*\n\t\t* Différentes options supplémentaires\n\t\t*/\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite'\t\t\t => array( 'slug' => 'actus'),\n\n\t);\n\n\t// On enregistre notre custom post type qu'on nomme ici \"serietv\" et ses arguments\n\tregister_post_type( 'actus', $args );\n\n}", "public function setContentType($content_type);", "public function setContentType($content_type) {}", "function setType($type) {\n $this->type = $type;\n }", "function yee_post_type_testimonial_init(){\n\t$labels =array(\n\t\t'name'=>'Testimonials',\n\t\t'sigular_name'=>'Testimonial',\n\t\t'add_new'=>__('Add New Testimonial','Storefront-Child'),\n\t\t'add_new_item'=>__('Add New Testimonial','Storefront-Child'),\n\t\t'edit_item'=>__('Edit Testimonial','Storefront-Child'),\n\t\t'new_item'=>__('New Testimonial','Storefront-Child'),\n\t\t'view_item'=>__('View Testimonial','Storefront-Child'),\n\t\t'view_items'=>__('View Testimonials','Storefront-Child'),\n\t\t'all_items'=>__('All Testimonials','Storefront-Child'),\n\t\t'search_items'=>__('Search Testimonials','Storefront-Child')\n\t);\n\t$args =array(\n\t\t'labels'=>$labels,\n\t\t'public'=>true,\n\t\t'menu_position'=>5,\n\t\t'menu_icon'=>'dashicons-visibility',\n\t\t'hierarchical'=>false,\n\t\t'has_archive'=>true,\n\t\t'supports'=>array('title','editor','thumbnail','excerpt'),\n\t\t'rewrite'=>array('slug'=>'testimonial')\n\t\t\n\t);\n\tregister_post_type('yee_testimonial',$args);\n}", "public function setFieldType($field_type)\n\t{\n\t\t$this->forced_field_type = JFilterInput::getInstance()->clean($field_type, 'CMD');\n\t}", "protected function setPostTypeObject(){\n\t\treturn array(\n\t\t\t'label' => _x('artists', 'artist', 'cpt_artist'),\n\t\t\t'labels' => array(\n\t\t\t\t'name' => _x('Artists', 'artist', 'cpt_artist'),\n\t\t\t\t'singular_name' => _x('artist', 'artist', 'cpt_artist'),\n\t\t\t\t'add_new' => _x('Add new artist', 'artist', 'cpt_artist'),\n\t\t\t\t'all_items' => _x('Artists', 'artist', 'cpt_artist'),\n\t\t\t\t'add_new_item' => _x('Add new artist', 'artist', 'cpt_artist'),\n\t\t\t\t'edit_item' => _x('Edit artist', 'artist', 'cpt_artist'),\n\t\t\t\t'new_item' => _x('New artist', 'artist', 'cpt_artist'),\n\t\t\t\t'view_item' => _x('Show artist', 'artist', 'cpt_artist'),\n\t\t\t\t'search_items' => _x('Search artists', 'artist', 'cpt_artist'),\n\t\t\t\t'not_found' => _x('No artists found', 'artist', 'cpt_artist'),\n\t\t\t\t'not_found_in_trash' => _x('No artists found in the trash', 'artist', 'cpt_artist'),\n\t\t\t\t'parent_item_colon' => _x('Artist', 'artist', 'cpt_artist'),\n\t\t\t\t'menu_name' => _x('Artists catalog', 'artist', 'cpt_artist')\n\t\t\t),\n\t\t\t'description' => _x('Artists for music catalog.', 'artist', 'cpt_artist'),\n\t\t\t'public' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_nav_menus' => false,\n\t\t\t'show_in_menu' => 'edit.php?post_type=music',\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'menu_position' => null,\n\t\t\t'menu_icon' => null,\n\t\t\t'capability_type' => array( 'artist', 'artists' ),\n\t\t\t'hierarchical' => true,\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t\t'has_archive' => true,\n\t\t\t'rewrite' => array( 'slug' => __('artists', 'cpt_artist'), 'with_front' => true, 'feeds' => true, 'pages' => true ),\n\t\t\t'query_var' => true,\n\t\t\t'can_export' => false\n\t\t);\n\t}", "public function metabox( $post, $box ) {\r\n\t\t$defaults = array('taxonomy' => 'category');\r\n\t\tif ( !isset($box['args']) || !is_array($box['args']) )\r\n\t\t\t$args = array();\r\n\t\telse\r\n\t\t\t$args = $box['args'];\r\n\t\textract( wp_parse_args($args, $defaults), EXTR_SKIP );\r\n\r\n\t\t$tax = get_taxonomy($taxonomy);\r\n\r\n\t\t//get current terms\r\n\t\t$checked_terms = $post->ID ? get_the_terms( $post->ID, $taxonomy) : array();\r\n\r\n\t\t//get first term object\r\n $current_term = ! empty( $checked_terms ) && ! is_wp_error( $checked_terms ) ? array_pop( $checked_terms ) : false;\r\n $current_id = ( $current_term ) ? $current_term->term_id : '';\r\n\r\n\t\t?>\r\n\t\t<div id=\"taxonomy-<?php echo $taxonomy; ?>\" class=\"radio-buttons-for-taxonomies\">\r\n\t\t\t<ul id=\"<?php echo $taxonomy; ?>-tabs\" class=\"category-tabs\">\r\n\t\t\t\t<li class=\"tabs\"><a href=\"#<?php echo $taxonomy; ?>-all\" tabindex=\"3\"><?php echo $tax->labels->all_items; ?></a></li>\r\n\t\t\t\t<li class=\"hide-if-no-js\"><a href=\"#<?php echo $taxonomy; ?>-pop\" tabindex=\"3\"><?php _e( 'Most Used' ); ?></a></li>\r\n\t\t\t</ul>\r\n\r\n\t\t\t<style>\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.categorychecklist, .radio-buttons-for-taxonomies ul.tagchecklist { margin: 0; }\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.children { margin-left: 18px; }\r\n\t\t\t</style>\r\n\r\n\t\t\t<?php wp_nonce_field( 'radio_nonce-' . $taxonomy, '_radio_nonce-' . $taxonomy ); ?>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-pop\" class=\"wp-tab-panel tabs-panel\" style=\"display: none;\">\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist-pop\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\" >\r\n\t\t\t\t\t<?php $popular = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );\r\n\r\n\t\t\t\t\t\tif ( ! current_user_can($tax->cap->assign_terms) )\r\n\t\t\t\t\t\t\t$disabled = 'disabled=\"disabled\"';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$disabled = '';\r\n\r\n\t\t\t\t\t\t$popular_ids = array(); ?>\r\n\r\n\t\t\t\t\t\t<?php foreach( $popular as $term ){\r\n\r\n\t\t\t\t\t\t\t$popular_ids[] = $term->term_id;\r\n\r\n\t\t\t\t\t $value = is_taxonomy_hierarchical( $taxonomy ) ? $term->term_id : $term->slug;\r\n\t\t\t\t\t $id = 'popular-'.$taxonomy.'-'.$term->term_id;\r\n\r\n\t\t\t\t\t echo \"<li id='$id'><label class='selectit'>\";\r\n\t\t\t\t\t echo \"<input type='radio' id='in-{$id}'\" . checked( $current_id, $term->term_id, false ) . \" value='{$value}' {$disabled} />&nbsp;{$term->name}<br />\";\r\n\r\n\t\t\t\t\t echo \"</label></li>\";\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-all\" class=\"wp-tab-panel tabs-panel\">\r\n\t\t\t\t<?php\r\n\t $name = 'radio_tax_input[' . $taxonomy . ']';\r\n\t echo \"<input type='hidden' name='{$name}[]' value='0' />\"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.\r\n\t ?>\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist\" data-wp-lists=\"list:<?php echo $taxonomy?>\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\">\r\n\t\t\t\t\t<?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t<?php if ( current_user_can( $tax->cap->edit_terms ) ) : ?>\r\n\t\t\t\t<div id=\"<?php echo $taxonomy; ?>-adder\" class=\"wp-hidden-children\">\r\n\t\t\t\t\t<h4>\r\n\t\t\t\t\t\t<a id=\"<?php echo $taxonomy; ?>-add-toggle\" href=\"#<?php echo $taxonomy; ?>-add\" class=\"hide-if-no-js\" tabindex=\"3\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t/* translators: %s: add new taxonomy label */\r\n\t\t\t\t\t\t\t\tprintf( __( '+ %s' ), $tax->labels->add_new_item );\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t</h4>\r\n\t\t\t\t\t<p id=\"<?php echo $taxonomy; ?>-add\" class=\"category-add wp-hidden-child\">\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>\"><?php echo $tax->labels->add_new_item; ?></label>\r\n\t\t\t\t\t\t<input type=\"text\" name=\"new<?php echo $taxonomy; ?>\" id=\"new<?php echo $taxonomy; ?>\" class=\"form-required form-input-tip\" value=\"<?php echo esc_attr( $tax->labels->new_item_name ); ?>\" aria-required=\"true\"/>\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>_parent\">\r\n\t\t\t\t\t\t\t<?php echo $tax->labels->parent_item_colon; ?>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t<?php if( is_taxonomy_hierarchical($taxonomy) ) {\r\n\t\t\t\t\t\t\twp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $tax->labels->parent_item . ' &mdash;', 'tab_index' => 3 ) );\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t<input type=\"button\" id=\"<?php echo $taxonomy; ?>-add-submit\" data-wp-lists=\"add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add\" class=\"button <?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'category-add-submit'; } else { echo 'radio-add-submit';} ?>\" value=\"<?php echo esc_attr( $tax->labels->add_new_item ); ?>\" tabindex=\"3\" />\r\n\t\t\t\t\t\t<?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy ); ?>\r\n\t\t\t\t\t\t<span id=\"<?php echo $taxonomy; ?>-ajax-response\"></span>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t</div>\r\n\t<?php\r\n\t}", "public function set_type($type)\n {\n $check = '';\n\n if (empty($type)) {\n $check = new WP_Error('forgot_type',\n __('Specify the data type to sanitize.', $this->plugin_name));\n }\n\n if (is_wp_error($check)) {\n wp_die($check->get_error_message(), __('Forgot data type.', $this->plugin_name));\n }\n\n $this->type = $type;\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "protected function get_meta_type()\n {\n }", "public function set_metabox_post_types($part, $folder) {\n if ($folder == 'meta-boxes' && $part['part'] == 'best-before.php') {\n $part['data']['post_type'] = $this->get_post_types_covered();\n }\n\n return $part;\n }", "public function setType($t){\n $this->type = $t;\n }", "public static function setContentType($content_type) {}", "function ncl_add_post_meta_boxes() {\n\t$post_types = get_post_types();\n\tforeach ( $post_types as $post_type ) {\n\t\tadd_meta_box( 'ncl-current-location', 'Current Location', 'ncl_current_location_meta_box', $post_type, 'side', 'default' );\n\t}\n}", "function create_post_type() {\r\n\r\n\tregister_post_type( 'Editorials',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => __( 'Editorials' ),\r\n\t\t\t\t'singular_name' => __( 'Editorial' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'editorials'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n\tregister_post_type( 'Local news',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t\r\n\t\t\t\t'name' => __( 'Local news' ),\r\n\t\t\t\t'singular_name' => __( 'Local new' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'local news'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "function setType($type = \"\")\n\t\t{\n\t\t\t$this->type = $type;\n\t\t}", "function pavi_post_meta_boxes_setup() {\n add_action( 'add_meta_boxes', 'pavi_textarea_meta_boxes' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'pavi_save_post_class_meta', 10, 2 );\n}", "protected function setPostTypeObject(){\n\t\treturn array(\n\t\t\t'label' => _x('Music', 'music', 'cpt_music'),\n\t\t\t'labels' => array(\n\t\t\t\t'name' => _x('Music', 'music', 'cpt_music'),\n\t\t\t\t'singular_name' => _x('Music', 'music', 'cpt_music'),\n\t\t\t\t'add_new' => _x('Add new Track', 'music', 'cpt_music'),\n\t\t\t\t'all_items' => _x('Music', 'music', 'cpt_music'),\n\t\t\t\t'add_new_item' => _x('Add new Track', 'music', 'cpt_music'),\n\t\t\t\t'edit_item' => _x('Edit Track', 'music', 'cpt_music'),\n\t\t\t\t'new_item' => _x('New Track', 'music', 'cpt_music'),\n\t\t\t\t'view_item' => _x('View Track', 'music', 'cpt_music'),\n\t\t\t\t'search_items' => _x('Search Track', 'music', 'cpt_music'),\n\t\t\t\t'not_found' => _x('No Track found', 'music', 'cpt_music'),\n\t\t\t\t'not_found_in_trash' => _x('No Track found in the trash', 'music', 'cpt_music'),\n\t\t\t\t'parent_item_colon' => _x('Music', 'music', 'cpt_music'),\n\t\t\t\t'menu_name' => _x('Music catalog', 'music', 'cpt_music')\n\t\t\t),\n\t\t\t'description' => _x('Manage the music catalog', 'music', 'cpt_music'),\n\t\t\t'public' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_nav_menus' => false,\n\t\t\t'show_in_menu' => true,\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'menu_position' => 1,\n\t\t\t// 'menu_icon' => plugins_url( 'img/cd_music_w_20.png' , __FILE__ ),\n\t\t\t'menu_icon' => plugins_url().'/music_catalog/img/cd_music_w_20.png',\n\t\t\t'capability_type' => array( 'music', 'music' ),\n\t\t\t'hierarchical' => true,\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t\t'has_archive' => true,\n\t\t\t'rewrite' => array( 'slug' => __('track', 'cpt_music'), 'with_front' => true, 'feeds' => true, 'pages' => true ),\n\t\t\t'query_var' => true,\n\t\t\t'can_export' => false\n\t\t);\n\t}", "function add_portfolio_posttype_metabox() {\r\n add_meta_box('portfolio_metabox', 'Portfolio Data', 'portfolio_metabox', 'portfolio', 'normal');\r\n}", "function ir_register_post_metabox() {\n\tglobal $post;\n\t$related_food_id = 0;\n\tif ( isset( $_GET['post'] ) ) {\n\t\t$related_food_id = get_post_meta( $_GET['post'], 'ir_related_food', true );\n\t}\n\t$prefix = 'ir_';\n\t/**\n\t * Sample metabox to demonstrate each field type included\n\t */\n\t$cmb_post = new_cmb2_box( array(\n\t\t'id' => $prefix . 'post_metabox',\n\t\t'title' => esc_html__( 'Material data', 'cmb2' ),\n\t\t'object_types' => array( 'post' ),\n\t) );\n\t// Add new field\n\t$cmb_post->add_field( array(\n\t\t'name' => __( 'Liittyvä raaka-aine', 'cmb2' ),\n\t\t'id' => $prefix . 'related_food',\n\t\t'desc' => __( 'Klikkaa hakuikonia tai syötä kenttään suoraan raaka-aineen id', 'cmb2' ),\n\t\t'type' => 'post_search_text', // This field type\n\t\t// post type also as array\n\t\t'post_type' => 'food',\n\t\t// Default is 'checkbox', used in the modal view to select the post type\n\t\t'select_type' => 'radio',\n\t\t// Will replace any selection with selection from modal. Default is 'add'\n\t\t'select_behavior' => 'replace',\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Näytettävät ravintoarvot?',\n\t\t'type' => 'title',\n\t\t'id' => $prefix . 'nutrients_title',\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Perusravintoaineet',\n\t\t'id' => $prefix . 'perusravintoaineet',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'energy' => __( 'Energia, laskennallinen', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_energy' ),\n\t\t\t$prefix . 'hiilihydraatti' => __( 'Hiilihydraatti', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_hiilihydraatti' ),\n\t\t\t$prefix . 'proteiini' => __( 'Proteiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_proteiini' ),\n\t\t\t$prefix . 'rasva' => __( 'Rasva', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_rasva' ),\n\t\t),\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Hiilihydraattifraktiot',\n\t\t'id' => $prefix . 'hiilihydraattifraktiot',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'sokeri' => __( 'Kuitu', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_sokeri' ),\n\t\t\t$prefix . 'kuitu' => __( 'Sokerit', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_kuitu' ),\n\t\t),\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Vitamiinit',\n\t\t'id' => $prefix . 'vitamiinit',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'folaatti' => __( 'Folaatti', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_folaatti' ),\n\t\t\t$prefix . 'niasiiniekvivalentti' => __( 'Niasiiniekvivalentti NE', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_niasiiniekvivalentti' ),\n\t\t\t$prefix . 'niasiini' => __( 'Niasiini (nikotiinihappo + nikotiiniamidi)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_niasiini' ),\n\t\t\t$prefix . 'b6' => __( 'Pyridoksiini vitameerit (vetykloridi) (B6)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b6' ),\n\t\t\t$prefix . 'b2' => __( 'Riboflaviini (B2)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b2' ),\n\t\t\t$prefix . 'b1' => __( 'Tiamiini (B1)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b1' ),\n\t\t\t$prefix . 'b12' => __( 'B12-vitamiini (kobalamiini)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b12' ),\n\t\t\t$prefix . 'C' => __( 'C-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_C' ),\n\t\t\t$prefix . 'A_RAE' => __( 'A-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_A_RAE' ),\n\t\t\t$prefix . 'karotenoidit' => __( 'Karotenoidit', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_karotenoidit' ),\n\t\t\t$prefix . 'D' => __( 'D-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_D' ),\n\t\t\t$prefix . 'E' => __( 'E-vitamiini alfatokoferoli', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_E' ),\n\t\t\t$prefix . 'K' => __( 'K-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_K' ),\n\t\t),\n\t\t'display_cb' => 'yourprefix_display_text_small_column', // Output the display of the column values through a callback.\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Kivennäis- ja hivenaineet',\n\t\t'id' => $prefix . 'kivennaisaineet',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'kalsium' => __( 'Kalsium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_kalsium' ),\n\t\t\t$prefix . 'rauta' => __( 'Rauta', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_rauta' ),\n\t\t\t$prefix . 'jodidi' => __( 'Jodidi', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_jodidi' ),\n\t\t\t$prefix . 'kalium' => __( 'Kalium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_kalium' ),\n\t\t\t$prefix . 'magnesium' => __( 'Magnesium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_magnesium' ),\n\t\t\t$prefix . 'natrium' => __( 'Natrium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_natrium' ),\n\t\t\t$prefix . 'suola' => __( 'Suola', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_suola' ),\n\t\t\t$prefix . 'fosfori' => __( 'Fosfori', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_fosfori' ),\n\t\t\t$prefix . 'seleeni' => __( 'Seleeni', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_seleeni' ),\n\t\t\t$prefix . 'sinkki' => __( 'Sinkki', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_sinkki' ),\n\t\t),\n\t) );\n}", "function metabox_store($post){\n\t\tglobal $postmec;\n\t\tinclude $postmec->get_postmec_dir() . 'metaboxes/metabox.store.php';\n\t}", "function press_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Press', 'Post Type General Name'),\n\t\t'singular_name' => _x( 'Press', 'Post Type Singular Name'),\n\t\t'menu_name' => __( 'Press'),\n\t\t'all_items' => __( 'All Press'),\n\t\t'view_item' => __( 'View Press'),\n\t\t'add_new_item' => __( 'Add New Press'),\n\t\t'add_new' => __( 'Add New'),\n\t\t'edit_item' => __( 'Edit Press'),\n\t\t'update_item' => __( 'Update Press')\n\n\t\t\n\t);\n\t\n// Set other options for Custom Post Type\n\t\n\t$args = array(\n\t\t'label' => __( 'press'),\n\t\t'labels' => $labels,\n\t\t// Features this CPT supports in Post Editor\n\t\t'supports' => array( 'title', 'editor', 'thumbnail'),\n \n\t\t/* A hierarchical CPT is like Pages and can have\n\t\t* Parent and child items. A non-hierarchical CPT\n\t\t* is like Posts.\n\t\t*/\t\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n 'rewrite' => array(\"slug\" => \"press\"),\n 'register_meta_box_cb' => 'add_press_metaboxes' // function hooking up metaboxes\n\t);\n\t\n\t// Registering your Custom Post Type\n\tregister_post_type( 'press', $args );\n\n}", "function testimonials_post_type() {\n\t$labels = array(\n\t\t'name' => 'Testimonials',\n\t\t'singular_name' => 'Testimonial',\n\t\t'add_new_item' => 'Add New Testimonial',\n\t\t'add_new' => 'Add New Testimonial',\n\t\t'edit_item' => 'Edit Testimonial',\n\t\t'new_item' => 'New Testimonial',\n\t\t'view_item' => 'View Testimonial',\n\t\t'search_items' => 'Search Testimonials',\n\t\t'not_found' => 'No Testimonials found',\n\t\t'not_found_in_trash' => 'No Testimonials found in the trash',\n\t);\n\n/*\n*'dashicons-testimonial' menu icon retrieved from WordPress.org.\n*The register_post_type function registers the labels of the plugin as well as other items such as the location of the plugin and editable sections.\n*The register_meta_box_cb registers the boxes in which the information/data can be viewed for each testimonial on the back-end of WordPress.\n*/\n\tregister_post_type( 'testimonials', array(\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'exclude_from_search' => true,\n\t\t'show_ui' => true,\n\t\t'rewrite' => true,\n\t\t'query_var' => true,\n\t\t'menu_icon' => 'dashicons-testimonial',\n\t\t'capability_type' => 'post',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => 10,\n\t\t'supports' => array( 'editor', 'title' ),\n\t\t'register_meta_box_cb' => 'testimonials_meta_boxes',\n\t) );\n}", "public function setType($type){ }", "public function setPageType($type = 'form'){\n\t\t\t$this->setBodyClass($type == 'form' || $type == 'single' ? 'single' : 'index');\n\t\t}", "public function badge_meta_box( $post_type ) {\r\r\n // Limit meta box to certain post types.\r\r\n //$post_types = array( 'badge', 'page' );\r\r\n $post_types = 'badge';\r\r\n \r\r\n if ( $post_type == $post_types ) {\r\r\n add_meta_box(\r\r\n 'achievement_data',\r\r\n __( 'Achievement Data', 'gamification' ),\r\r\n array( $this, 'badge_meta_box_achievement_data_content' ),\r\r\n $post_type,\r\r\n 'advanced',\r\r\n 'high'\r\r\n );\r\r\n }\r\r\n }", "public function setContentType($content_type) {\r\r\n\t\tif (is_array($content_type))\r\r\n\t\t\t$this->content_type = $content_type;\r\r\n\t\telse\r\r\n\t\t\t$this->content_type = array($content_type);\r\r\n\t}", "function custom_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Engagements', 'Post Type General Name'),\n\t\t'singular_name' => _x( 'Engagement', 'Post Type Singular Name'),\n\t\t'menu_name' => __( 'Engagements'),\n\t\t'all_items' => __( 'All Engagements'),\n\t\t'view_item' => __( 'View Engagement'),\n\t\t'add_new_item' => __( 'Add New Engagement'),\n\t\t'add_new' => __( 'Add New'),\n\t\t'edit_item' => __( 'Edit Engagement'),\n\t\t'update_item' => __( 'Update Engagement')\n\n\t\t\n\t);\n\t\n// Set other options for Custom Post Type\n\t\n\t$args = array(\n\t\t'label' => __( 'engagements'),\n\t\t'labels' => $labels,\n\t\t// Features this CPT supports in Post Editor\n\t\t'supports' => array( 'title', 'editor'),\n \n\t\t/* A hierarchical CPT is like Pages and can have\n\t\t* Parent and child items. A non-hierarchical CPT\n\t\t* is like Posts.\n\t\t*/\t\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n 'rewrite' => array(\"slug\" => \"engagements\"),\n 'register_meta_box_cb' => 'add_engagements_metaboxes' // function hooking up metaboxes\n\t);\n\t\n\t// Registering your Custom Post Type\n\tregister_post_type( 'engagements', $args );\n\n}", "public function setType($type)\n {\n parent::setAttr(\"type\", $type);\n }", "public function setType($type) {\n\t\t$this->data['type'] = $type;\n\t}", "function Hobi_post_type()\n{\n\tregister_post_type('chef', array(\n\t\t'rewrite' => array( 'slug' => 'chef' ),\n\t\t'supports' => array('title','editor', 'excert', 'thumbnail'),\n\t\t'has_archive' => false,\n\t\t'public' => true,\n\t\t'labels' => array(\n\t\t\t'name' => 'Chefs',\n\t\t\t'add_new_item' => 'Add New Chef',\n\t\t\t'edit_item' => 'Edit Chef',\n\t\t\t'all_items' => 'All Chefs',\n\t\t\t'singular_name' => 'Chefs'\n\t\t),\n\t\t'menu_icon' => 'dashicons-groups',\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'capability_type' => 'post',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t));\n\n\n\tregister_post_type('menu', array(\n\t\t'rewrite' => array( 'slug' => 'menu' ),\n\t\t'supports' => array('title','editor', 'excert', 'thumbnail'),\n\t\t'has_archive' => false,\n\t\t'public' => true,\n\t\t'labels' => array(\n\t\t\t'name' => 'Menus',\n\t\t\t'add_new_item' => 'Add New Menu',\n\t\t\t'edit_item' => 'Edit Menu',\n\t\t\t'all_items' => 'All Menus',\n\t\t\t'singular_name' => 'Menus'\n\t\t),\n\t\t'menu_icon' => 'dashicons-food',\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'capability_type' => 'post',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'taxonomies' => array( 'category' ),\n\t));\n\n\tregister_post_type('testimonials', array(\n\t\t'rewrite' => array( 'slug' => 'testimonials' ),\n\t\t'supports' => array('title','editor', 'excert', 'thumbnail'),\n\t\t'has_archive' => false,\n\t\t'public' => true,\n\t\t'labels' => array(\n\t\t\t'name' => 'Testimonials',\n\t\t\t'add_new_item' => 'Add New Testimonial',\n\t\t\t'edit_item' => 'Edit Testimonial',\n\t\t\t'all_items' => 'All Testimonials',\n\t\t\t'singular_name' => 'Testimonials'\n\t\t),\n\t\t'menu_icon' => 'dashicons-editor-quote',\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'capability_type' => 'post',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t));\n}", "function promo_post_type() {\n\t// Promo posts type where users can create promo post types.\n\tregister_post_type(\n\t\t'promos',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Promos' ),\n\t\t\t\t'singular_name' => __( 'Promo' ),\n\t\t\t),\n\t\t\t'public' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'supports' => array( 'title', 'editor', 'custom-fields', 'thumbnail')\n\t\t)\n\t);\n}", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function add_meta_box() {\r\n\r\n\t\tif( ! is_wp_error( $this->tax_obj ) && isset($this->tax_obj->object_type ) ) foreach ( $this->tax_obj->object_type as $post_type ):\r\n\t\t\t$label = $this->tax_obj->labels->name;\r\n\t\t\t$id = ! is_taxonomy_hierarchical( $this->taxonomy ) ? 'radio-tagsdiv-'.$this->taxonomy : 'radio-' .$this->taxonomy .'div' ;\r\n\t\t\tadd_meta_box( $id, $label ,array( $this,'metabox' ), $post_type ,'side','core', array( 'taxonomy'=>$this->taxonomy ) );\r\n\t\tendforeach;\r\n\t}" ]
[ "0.7238226", "0.6588266", "0.65659654", "0.6527148", "0.6500174", "0.64548445", "0.63647264", "0.62824863", "0.6278969", "0.61982906", "0.61687535", "0.61410284", "0.61385393", "0.61242956", "0.61237425", "0.61087465", "0.60822845", "0.6054742", "0.60426044", "0.60401934", "0.6025263", "0.60243094", "0.60213923", "0.60163784", "0.5995084", "0.59892565", "0.5989018", "0.5988295", "0.59841746", "0.59699833", "0.59617484", "0.59517765", "0.5948726", "0.59468156", "0.593285", "0.59293103", "0.59269243", "0.5915499", "0.59143335", "0.59119004", "0.5902515", "0.58863413", "0.5885081", "0.58772826", "0.5876852", "0.5863705", "0.5862542", "0.5853655", "0.5846186", "0.5835258", "0.5829887", "0.5829887", "0.58214414", "0.58114034", "0.5810991", "0.5781496", "0.57725704", "0.57687163", "0.57643545", "0.57642955", "0.57614625", "0.57606936", "0.5745924", "0.57455426", "0.5741436", "0.5741436", "0.5741436", "0.5741436", "0.57407355", "0.57399815", "0.5736919", "0.5730573", "0.57283336", "0.57212657", "0.57084924", "0.5705591", "0.57054377", "0.57032233", "0.56942594", "0.56900394", "0.5687165", "0.5685825", "0.56845397", "0.56799924", "0.56797147", "0.5678154", "0.5669069", "0.5668761", "0.5667076", "0.56666034", "0.5664628", "0.56628996", "0.56628996", "0.56628996", "0.56628996", "0.56628996", "0.56628996", "0.56628996", "0.56628996", "0.5660985" ]
0.6387311
6
Set the metabox priority.
public function setPriority( $priority ) { $this->_priority = $priority; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function metabox_prio() {\n return 'low';\n }", "function rankmath_metaboxes_priority(){\n \n return 'default';\n \n }", "function yoast_metaboxes_priority(){\n \n return 'default';\n \n }", "function wpseo_metabox_prio( $priority )\n {\n return 'low';\n }", "function tac_seo_metabox_priority() {\n\t// Accepts 'high', 'default', 'low'. Default is 'high'.\n\treturn 'low';\n}", "protected function setPriority() {}", "function tc_child_metabox() {\n\n // Start with an underscore to hide fields from custom fields list\n $prefix = '_tcm_';\n\n /**\n * Initiate the metabox\n */\n $cmb = new_cmb2_box( array(\n 'id' => 'tour_priority_set',\n 'title' => __( 'Priority Set', 'tcevents' ),\n 'object_types' => array( 'event', ), // Post type\n 'context' => 'side',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n 'cmb_styles' => false, // false to disable the CMB stylesheet\n //'closed' => true, // Keep the metabox closed by default\n ) );\n\n // Select Post type whether its an event or tour or movie\n $cmb->add_field( [\n 'desc' => __('Check if this goes on top!', 'tcevents'),\n 'id' => $prefix . 'priority_pack',\n 'type' => 'checkbox',\n ] );\n\n}", "public function setPriority($priority);", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "function setPriority($priority=3)\n {\n\n if($priority > 0 && $priority < 6)\n {\n $this->Priority = $priority;\n return true;\n }\n else\n return false;\n }", "public function setPriority($value)\n {\n $this->setItemValue('priority', ['id' => (int)$value]);\n }", "public function setPriority($priority) {\n\t\t$this->priority = $priority;\n\t}", "public function setPriority($priority) {\n\t\t$this->priority = $priority;\n\t}", "public function setPriority($value) {\n$allowed = ['small', 'medium', 'large'];\nif (!in_array($value, $allowed))\n throw new Exception('Priority must be either small, medium, or large');\n$this->priority = $value;\nreturn $this;\n}", "public function setPriority(int $priority) {\n if ($priority >= 0) {\n $this->priority = $priority;\n }\n }", "private function setPriority($delete = false): void\n {\n // Pull prios from database\n $query = 'SELECT category_id, priority FROM '. \\rex::getTablePrefix() .'d2u_machinery_categories '\n .'WHERE category_id <> '. $this->category_id .' ORDER BY priority';\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n // When priority is too small, set at beginning\n if ($this->priority <= 0) {\n $this->priority = 1;\n }\n\n // When prio is too high or was deleted, simply add at end\n if ($this->priority > $result->getRows() || $delete) {\n $this->priority = (int) $result->getRows() + 1;\n }\n\n $categories = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $categories[$result->getValue('priority')] = $result->getValue('category_id');\n $result->next();\n }\n array_splice($categories, $this->priority - 1, 0, [$this->category_id]);\n\n // Save all prios\n foreach ($categories as $prio => $category_id) {\n $query = 'UPDATE '. \\rex::getTablePrefix() .'d2u_machinery_categories '\n .'SET priority = '. ((int) $prio + 1) .' ' // +1 because array_splice recounts at zero\n .'WHERE category_id = '. $category_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n }\n }", "private function setPriority($delete = false): void\n {\n // Pull prios from database\n $query = 'SELECT target_group_id, priority FROM '. rex::getTablePrefix() .'d2u_courses_target_groups '\n .'WHERE target_group_id <> '. $this->target_group_id .' ORDER BY priority';\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n // When priority is too small, set at beginning\n if ($this->priority <= 0) {\n $this->priority = 1;\n }\n\n // When prio is too high or was deleted, simply add at end\n if ($this->priority > $result->getRows() || $delete) {\n $this->priority = (int) $result->getRows() + 1;\n }\n\n $target_groups = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $target_groups[$result->getValue('priority')] = $result->getValue('target_group_id');\n $result->next();\n }\n array_splice($target_groups, $this->priority - 1, 0, [$this->target_group_id]);\n\n // Save all prios\n foreach ($target_groups as $prio => $target_group_id) {\n $query = 'UPDATE '. rex::getTablePrefix() .'d2u_courses_target_groups '\n .'SET priority = '. ((int) $prio + 1) .' ' // +1 because array_splice recounts at zero\n .'WHERE target_group_id = '. $target_group_id;\n $result = rex_sql::factory();\n $result->setQuery($query);\n }\n }", "private function setPriority($delete = false): void\n {\n // Pull prios from database\n $query = 'SELECT usage_area_id, priority FROM '. \\rex::getTablePrefix() .'d2u_machinery_usage_areas '\n .'WHERE usage_area_id <> '. $this->usage_area_id .' ORDER BY priority';\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n // When prio is too small, set at beginning\n if ($this->priority <= 0) {\n $this->priority = 1;\n }\n\n // When prio is too high or was deleted, simply add at end\n if ($this->priority > $result->getRows() || $delete) {\n $this->priority = (int) $result->getRows() + 1;\n }\n\n $usage_areas = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $usage_areas[$result->getValue('priority')] = $result->getValue('usage_area_id');\n $result->next();\n }\n array_splice($usage_areas, $this->priority - 1, 0, [$this->usage_area_id]);\n\n // Save all priorities\n foreach ($usage_areas as $prio => $usage_area_id) {\n $query = 'UPDATE '. \\rex::getTablePrefix() .'d2u_machinery_usage_areas '\n .'SET priority = '. ((int) $prio + 1) .' ' // +1 because array_splice recounts at zero\n .'WHERE usage_area_id = '. $usage_area_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n }\n }", "public function setPriority($priority)\n {\n $this->priority = $priority;\n }", "function ngng_position_wpseo_metabox() {\n\treturn 'low';\n}", "function pt_init_metabox(){\n\t\t add_meta_box('job', 'Byline', array(&$this,'pt_field_job'), 'testimonials', 'side');\n\t\t}", "public function setPriorityAttribute($input)\n {\n $this->attributes['priority'] = $input ? $input : null;\n }", "public function setMsMailPriority($msMailPriority='Normal') {\n\t\t$prio = array('Highest', 'High', 'Normal' , 'Low', 'Lowest');\n\t\tif((!in_array($msMailPriority, $prio)) || (empty($msMailPriority))) {\n\t\t\t$this->_mailMsMailPriority = 'Normal'; \n\t\t}\n\t\telse {\n\t\t\t$this->_mailMsMailPriority = (string)$msMailPriority;\n\t\t}\n\t}", "public function setPriority(?int $value): void {\n $this->getBackingStore()->set('priority', $value);\n }", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "public function addMetaboxes() {}", "function addPostMetaboxes() {\n\t\t$assignment_meta = get_post_meta($_GET['post'], '_lepress-assignment-meta', true);\n\t\tif($this->checkPermissions() && !isSet($_GET['p']) && !$assignment_meta) {\n\t\t\tadd_meta_box('lepress-assignment-metabox', 'Assignment', array(&$this, 'fillAssignmentMetabox'), 'post', 'side', 'high');\n\t\t}\n\t}", "public function customize_pane_settings()\n {\n }", "protected function setToLowestQuality(): void\n {\n $this->getItem()->quality = $this->getLowestQuality();\n }", "abstract public function setMetas();", "function woocommerce_change_actions_priorities() {\n $actions = array(\n array(\n 'tag' => 'woocommerce_after_shop_loop_item_title',\n 'action' => 'woocommerce_template_loop_price',\n 'priority' => 10,\n 'priority_to_set' => 10\n ),\n array(\n 'tag' => 'woocommerce_after_shop_loop_item_title',\n 'action' => 'woocommerce_template_loop_rating',\n 'priority' => 5,\n 'priority_to_set' => 11\n )\n );\n \n foreach($actions as $action) {\n //actions which priorities needs to be changed\n remove_action($action['tag'], $action['action'], $action['priority']);\n \n //new priorities\n add_action($action['tag'], $action['action'], $action['priority_to_set']);\n }\n }", "function addPostMetaboxes() {\n\t\t$assignment_meta = get_post_meta($_GET['post'], '_lepress-assignment-meta', true);\n\t\tif(isSet($_GET['p']) || $assignment_meta) {\n\t\t\tadd_meta_box('lepress-submission-metabox', __('Submission', lepress_textdomain), array(&$this, 'fillAssignmentMetabox'), 'post', 'side', 'high');\n\t\t}\n\t}", "public function setup() {\n\n\t\t$this->set_defaults();\n\n\t\t$this->arguments = array(\n\t\t\t'priority' => 30,\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'title' => esc_html__( 'Month View', 'the-events-calendar' ),\n\t\t\t'description' => esc_html__( 'Options selected here will override what was selected in the \"General Theme\" and \"Global Elements\" sections', 'the-events-calendar' ),\n\t\t);\n\t}", "function pa_add_custom_testi() {\r\r\n add_meta_box( 'pa-testimonial-option', __( 'Testimonial Option', 'my_framework' ), 'pa_custom_testi_option', 'testimonial', 'normal', 'high');\r\r\n}", "function ppes_admin_init(){\r\n\tadd_meta_box(\"et_post_meta\", \"ET Settings\", \"et_post_meta\", \"auctions\", \"normal\", \"high\");\r\n}", "public function setPriority($val)\n {\n $this->_propDict[\"priority\"] = $val;\n return $this;\n }", "public function setPriority($val)\n {\n $this->_propDict[\"priority\"] = $val;\n return $this;\n }", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "public function setPriority($val)\n {\n $this->_propDict[\"priority\"] = intval($val);\n return $this;\n }", "public function setPriority($val)\n {\n $this->_propDict[\"priority\"] = intval($val);\n return $this;\n }", "public function setPriority($CRNRSTN_oGabriel, $priority = 'NORMAL'){\n $oGabriel = $this->oMessenger_ARRAY[$CRNRSTN_oGabriel->messenger_serial];\n\n $oGabriel->setPriority($priority);\n\n $this->oMessenger_ARRAY[$oGabriel->messenger_serial] = $oGabriel;\n\n }", "public function setPriority(int $priority): bool {}", "public function setPriority(int $priority): bool {}", "static function add_r_priority(): void {\r\n\t\tself::add_acf_inner_field(self::roles, self::r_priority, [\r\n\t\t\t'label' => 'Priority',\r\n\t\t\t'type' => 'number',\r\n\t\t\t'instructions' => 'Lower = more important.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '25',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'default_value' => 1,\r\n\t\t\t'min' => 1,\r\n\t\t\t'max' => '99',\r\n\t\t\t'step' => 1,\r\n\t\t]);\r\n\t}", "static function add_d_priority(): void {\r\n\t\tself::add_acf_inner_field(self::divisions, self::d_priority, [\r\n\t\t\t'label' => 'Priority',\r\n\t\t\t'type' => 'number',\r\n\t\t\t'instructions' => 'Lower = more important.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '30',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'default_value' => 1,\r\n\t\t\t'min' => 1,\r\n\t\t\t'max' => '99',\r\n\t\t\t'step' => 1,\r\n\t\t]);\r\n\t}", "function ppc_add_custom_metaboxes(){\n add_meta_box('my_meta_box_id','Post Submission Actions','ppc_post_submission','ppclps','normal','high');\n}", "function testimonials_meta_boxes() {\n\tadd_meta_box( 'testimonials_form', 'testimonials', 'normal', 'high' );\n}", "public function priority() : int;", "function tnz_tooltip_metabox() {\n\tadd_meta_box( 'cpt_tnz_tooltip_box', __( 'Tooltip Shortcode', '' ), 'tnz_tooltip_metabox_content', 'tnz_tooltip', 'side', 'high' );\n}", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "function admin_init() {\n\t\tadd_meta_box(\"1-Round\", \"First Round\", array(&$this, \"meta_options\"), \"Tournaments\" );\n\t}", "function faculty_settings_post_meta() {\n faculty_setting_line(faculty_add_background_color_setting('post_meta_background_color', __('Background', FACULTY_DOMAIN)));\n faculty_setting_line(faculty_add_color_setting('post_meta_font_color', __('Font Color', FACULTY_DOMAIN)));\n faculty_setting_line(faculty_add_size_setting('post_meta_font_size', __('Font Size', FACULTY_DOMAIN)));\n faculty_setting_line(faculty_add_select_setting('post_meta_text_transform', __('Text Transform', FACULTY_DOMAIN), 'transform'));\n do_action('faculty_settings_post_meta');\n}", "public function setMenuItemPosition() {\n\t\t$this->itemPosition = array(\n\t\t\t'slider' => 4,\n\t\t\t'carousel' => 4,\n\t\t\t'testimonial' => 4,\n\t\t\t'portfolio' => 4,\n\t\t\t'options' => 1000\n\t\t);\n\t}", "function eZPriority( $id = -1 )\r\n {\r\n if ( $id != -1 )\r\n {\r\n $this->ID = $id;\r\n $this->get( $this->ID );\r\n }\r\n }", "public function order_meta_boxes() {\r\n global $post;\r\n if ( $post->post_type != 'estate' ) {\r\n return;\r\n }\r\n global $wp_meta_boxes;\r\n if ( isset( $wp_meta_boxes['estate']['normal']['high']['mm_general'] ) ) {\r\n $wp_meta_boxes['estate']['normal']['low']['mm_general'] = $wp_meta_boxes['estate']['normal']['high']['mm_general'];\r\n unset( $wp_meta_boxes['estate']['normal']['high']['mm_general'] );\r\n }\r\n if ( isset( $wp_meta_boxes['estate']['normal']['high']['essb_metabox_optmize'] ) ) {\r\n\t $wp_meta_boxes['estate']['normal']['low']['essb_metabox_optmize'] = $wp_meta_boxes['estate']['normal']['high']['essb_metabox_optmize'];\r\n\t unset( $wp_meta_boxes['estate']['normal']['high']['essb_metabox_optmize'] );\r\n }\r\n }", "public function add_metaboxes() {\n\t\tadd_meta_box(\n\t\t\t'pblw-requirements',\n\t\t\t__( 'Requirements', 'pblw_reqs' ),\n\t\t\tarray( $this, 'render_metabox' ),\n\t\t\t'download',\n\t\t\t'normal',\n\t\t\t'core'\n\t\t);\n\t}", "public function setPriority($id, $priority)\n {\n return false;\n }", "function wpopal_add_megamenu_setting() {\n}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "protected function onParentSet() : void\n {\n $value = $this->oFG->getData()->getValue($this->strName);\n $this->iValue = $value ? intval($value) : $this->iMin;\n }", "public function kiwip_add_meta_box(){\t\t\t\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->title,\n\t\t\tarray(&$this, 'kiwip_metabox_callback'),\n\t\t\t$this->cpt_name,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\t}", "function add_dish_metaboxes()\r\n{\r\n\tadd_meta_box( 'price', __('Price'), 'edit_price_box', 'dish', 'normal');\t\r\n}", "public function set_metabox( \\RWC\\Metabox $metabox ) {\n\n $this->_metabox = $metabox;\n }", "public static function registerMetaBoxes() {\n add_meta_box( 'mail_settings', __('Email Settings', WPXTREME_TEXTDOMAIN ), array( __CLASS__, 'display_mail_settings' ), WPXTREME_MAIL_CPT_KEY, 'normal', 'high');\n }", "public static function menucat_metabox() {\n\t\t\t\n\t\t\t$position = \"side\";\n\t\t\t$priority = \"low\";\n\t\t\t\n\t\t\tadd_meta_box( 'custom-metabox', __( 'Dish Category' ), array( __CLASS__, 'category_box'), self::$post_type, $position, \"low\" );\n\t\t\tadd_meta_box( 'custom-metabox2', __( 'Dish Price' ), array( __CLASS__, 'price_box'), self::$post_type, $position, $priority );\n\t\t\tadd_meta_box( 'custom-metabox3', __( 'Special Information' ), array( __CLASS__, 'info_box'), self::$post_type, \"normal\", \"high\" );\n\t\t\tadd_meta_box( 'custom-metabox4', __( 'Dish Serving' ), array( __CLASS__, 'serve_box'), self::$post_type, \"normal\", \"high\" );\n\t\t\t\t\t\t\n\t\t}", "function setPostIcon(){\n\t\tif( ! current_user_can( 'manage_options' ) ){\n\t\t\twp_die( 'You can\\'t do it. Bye!' );\n\t\t}\n\t\t$post_id = intval( $_POST['selected_post'] );\n\t\t$icon_name = filter_var( $_POST['icon'], FILTER_SANITIZE_STRING );\n\t\t$icon_position = boolval( $_POST['icon_position'] );\n\t\tupdate_post_meta( $post_id, 'post_icon', $icon_name );\n\t\tupdate_post_meta( $post_id, 'post_icon_position', $icon_position );\n\t\twp_die( $icon_name . ' ' . $icon_position );\n\t}", "function do_meta_boxes( $page, $context ) {\n\t\t\treturn;\n\t\t\tif ( ( 'page' === $page || 'post' === $page ) && 'side' === $context )\n\t\t\t\tadd_meta_box( 'draft-publish-notify', __( 'Revision Workflow', $this->text_domain ), array( &$this, 'meta_box' ), $page, 'side', 'high' );\n\t\t}", "function my_metabox_top_right() {\n add_meta_box( 'after-title-help', 'Come pubblicare e salvare le modifiche', 'my_top_right_help_metabox_content', array('antipasti', 'pizze-classiche', 'pizze-speciali', 'dolci'), 'side', 'high' );\n}", "function set_gtpressMenu_options() {\r\n\tadd_option('gtpressMenu_default_menu');\r\n\tadd_option('gtpressMenu_default_submenu');\r\n\tadd_option('gtpressMenu_disabled_menu_items');\r\n\tadd_option('gtpressMenu_disabled_submenu_items');\r\n\tadd_option('gtpressMenu_disabled_metas');\r\n\tadd_option('gtpressMenu_admins_see_everything');\r\n\r\n\tupdate_option('gtpressMenu_disabled_menu_items', array());\r\n\tupdate_option('gtpressMenu_disabled_submenu_items', array());\r\n\tupdate_option('gtpressMenu_disabled_metas', array());\r\n\tupdate_option('gtpressMenu_admins_see_everything', false);\r\n}", "function setPriority($priority)\n {\n return $this->instance->setPriority($priority);\n }", "function construction_realestate_pro_posttype_bn_testimonial_meta_box() {\n\tadd_meta_box( 'construction-realestate-pro-posttype-testimonial-meta', __( 'Enter Designation', 'construction-realestate-pro-posttype' ), 'construction_realestate_pro_posttype_bn_testimonial_meta_callback', 'testimonials', 'normal', 'high' );\n}", "public function setDefaultMetas($activ = false)\n {\n $this->defMetas = $activ;\n }", "public function admin_init()\n \t{\t\t\t\n \t\t// Add metaboxes\n \t\t//add_action('add_meta_boxes', array(&$this, 'add_meta_boxes'));\n \t}", "function careers_metabox() {\n\t\t\tforeach (careers_fields() as $key => $value) {\n\t\t\t\t$id = 'careers_'.$value['slug'];\n\t\t\t\t$title = __( $value['name'], 'careers_textdomain' );\n\t\t\t\tadd_meta_box($id, $title, 'careers_callback', 'Careers', 'normal', 'low',$value);\n\t\t\t}\n\t\t}", "function WidgetMeteoControl() {\n\t\t\n\t\t\t$options = get_option('widget_trebimeteo');\n\t\t\tif ( !is_array($options) )\t{ $options = array('title' => 'Previsioni Meteo', 'trebiregione' => '1', 'trebilocalita' => '6', 'trebicuno' => 'ffffff','trebicdue' => 'ffffff', 'trebictre' => 'ffffff', 'trebibuno' => '93c1db', 'trebibdue' => '3a8ebd', 'trebibtre' => 'ffffff', 'trebilarghezza' => '190', 'trebialtezza' => '240', 'trebitipo' => 'xssmall'); }\n\n\t\t\tif ( $_POST['trebimeteo-submit'] )\n\t\t\t{\n\t\t\t\t// Remember to sanitize and format use input appropriately.\n\t\t\t\t$options['trebimeteotitle'] = strip_tags(stripslashes($_POST['trebimeteotitle']));\n\t\t\t\t$options['trebiregione'] = strip_tags(stripslashes($_POST['trebiregione']));\n\t\t\t\t$options['trebilocalita'] = strip_tags(stripslashes($_POST['trebilocalita']));\n\t\t\t\t$options['trebicuno'] = strip_tags(stripslashes($_POST['trebicuno']));\n\t\t\t\t$options['trebicdue'] = strip_tags(stripslashes($_POST['trebicdue']));\n\t\t\t\t$options['trebictre'] = strip_tags(stripslashes($_POST['trebictre']));\n\t\t\t\t$options['trebibuno'] = strip_tags(stripslashes($_POST['trebibuno']));\n\t\t\t\t$options['trebibdue'] = strip_tags(stripslashes($_POST['trebibdue']));\n\t\t\t\t$options['trebibtre'] = strip_tags(stripslashes($_POST['trebibtre']));\n\t\t\t\t$options['trebialtezza'] = strip_tags(stripslashes($_POST['trebialtezza']));\n\t\t\t\t$options['trebilarghezza'] = strip_tags(stripslashes($_POST['trebilarghezza']));\n\t\t\t\t$options['trebitipo'] = strip_tags(stripslashes($_POST['trebitipo']));\n\n\t\t\t\tupdate_option('widget_trebimeteo', $options);\n\t\t\t}\n\n\t\t\t$trebimeteotitle = htmlspecialchars($options['trebimeteotitle'], ENT_QUOTES);\n\t\t\t$trebiregione = htmlspecialchars($options['trebiregione'], ENT_QUOTES);\n\t\t\t$trebilocalita = htmlspecialchars($options['trebilocalita'], ENT_QUOTES);\n\t\t\t$trebicuno = htmlspecialchars($options['trebicuno'], ENT_QUOTES);\n\t\t\t$trebicdue = htmlspecialchars($options['trebicdue'], ENT_QUOTES);\n\t\t\t$trebictre = htmlspecialchars($options['trebictre'], ENT_QUOTES);\n\t\t\t$trebibuno = htmlspecialchars($options['trebibuno'], ENT_QUOTES);\n\t\t\t$trebibdue = htmlspecialchars($options['trebibdue'], ENT_QUOTES);\n\t\t\t$trebibtre = htmlspecialchars($options['trebibtre'], ENT_QUOTES);\n\t\t\t$trebialtezza = htmlspecialchars($options['trebialtezza'], ENT_QUOTES);\n\t\t\t$trebilarghezza = htmlspecialchars($options['trebilarghezza'], ENT_QUOTES);\n\t\t\t$trebitipo = htmlspecialchars($options['trebitipo'], ENT_QUOTES);\n\n\t\t\t$xpath = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),\"\",plugin_basename(__FILE__));\n\t\t\t\n\t\t\t?>\n \n\t<p style=\"text-align:right;\"><label for=\"trebimeteo-title\">Titolo <input id=\"trebimeteotitle\" name=\"trebimeteotitle\" type=\"text\" value=\"<?php echo $trebimeteotitle;?>\" /></label></p>\n <p style=\"text-align:right;\"><label for=\"trebiregione\">ID Regione (<a target=\"_blank\" href=\"<?php echo home_url().'/wp-admin/options-general.php?page=3bmeteo.php'; ?>\">?</a>) <input id=\"trebiregione\" name=\"trebiregione\" type=\"text\" value=\"<?php echo $trebiregione;?>\"/></label></p>\n\t<p style=\"text-align:right;\"><label for=\"trebilocalita\">ID Localit&agrave; (<a target=\"_blank\" href=\"<?php echo home_url().'/wp-admin/options-general.php?page=3bmeteo.php';?>\">?</a>) <input id=\"trebilocalita\" name=\"trebilocalita\" type=\"text\" value=\"<?php echo $trebilocalita;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebialtezza\">Altezza <input id=\"trebialtezza\" name=\"trebialtezza\" type=\"text\" value=\"<?php echo $trebialtezza;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebilarghezza\">Larghezza <input id=\"trebilarghezza\" name=\"trebilarghezza\" type=\"text\" value=\"<?php echo $trebilarghezza;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibuno\">B1 <input id=\"trebibuno\" name=\"trebibuno\" type=\"text\" value=\"<?php echo $trebibuno;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibdue\">B2 <input id=\"trebibdue\" name=\"trebibdue\" type=\"text\" value=\"<?php echo $trebibdue;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibtre\">B3 <input id=\"trebibtre\" name=\"trebibtre\" type=\"text\" value=\"<?php echo $trebibtre;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebicuno\">C1 <input id=\"trebicuno\" name=\"trebicuno\" type=\"text\" value=\"<?php echo $trebicuno;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebicdue\">C2 <input id=\"trebicdue\" name=\"trebicdue\" type=\"text\" value=\"<?php echo $trebicdue;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebictre\">C3 <input id=\"trebictre\" name=\"trebictre\" type=\"text\" value=\"<?php echo $trebictre;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebitipo\">Tipo\n <select id=\"trebitipo\" name=\"trebitipo\"> \n\t\t<option label=\"Localit&agrave; Compatti 1 giorno\" value=\"xssmall\"<?php if ($trebitipo=='xssmall') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 1 giorno</option> \n\t\t<option label=\"Localit&agrave; Compatti 6 giorni\" value=\"lsmall\"<?php if ($trebitipo=='lsmall') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 6 giorni</option> \n\t\t<option label=\"Localit&agrave; Compatti 7 giorni\" value=\"lbigor\"<?php if ($trebitipo=='lbigor') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 7 giorni</option> \n\t\t<option label=\"Localit&agrave; Dati in Diretta\" value=\"treale\"<?php if ($trebitipo=='treale') echo ' selected=\"selected\"';?>>Localit&agrave; Dati in Diretta</option> \n\t\t<option label=\"Tutte le Localit&agrave;\" value=\"ssmall\"<?php if ($trebitipo=='ssmall') echo ' selected=\"selected\"';?>>Tutte le Localit&agrave;</option> \n\t\t<option label=\"Localit&agrave; estese 7 giorni\" value=\"lbig\"<?php if ($trebitipo=='lbig') echo ' selected=\"selected\"';?>>Localit&agrave; estese 7 giorni</option> \n\t\t<option label=\"Localit&agrave; estese orario\" value=\"oraxora\"<?php if ($trebitipo=='oraxora') echo ' selected=\"selected\"';?>>Localit&agrave; estese orario</option> \n\t\t<option label=\"Regionali compatto\" value=\"msmall\"<?php if ($trebitipo=='msmall') echo ' selected=\"selected\"';?>>Regionali compatto</option> \n\t\t<option label=\"Regionali 7 giorni\" value=\"msmacro\"<?php if ($trebitipo=='msmacro') echo ' selected=\"selected\"';?>>Regionali 7 giorni</option> \n\t\t<option label=\"Localit&agrave; Marine 1 giorno\" value=\"lsmari\"<?php if ($trebitipo=='lsmari') echo ' selected=\"selected\"';?>>Localit&agrave; Marine 1 giorno</option> \n\t\t<option label=\"Localit&agrave; Marine 7 giorno\" value=\"lmari\"<?php if ($trebitipo=='lmari') echo ' selected=\"selected\"';?>>Localit&agrave; Marine 7 giorno</option> \n\t\t<option label=\"Regionali Marine 7 giorni\" value=\"mmari\"<?php if ($trebitipo=='mmari') echo ' selected=\"selected\"';?>>Regionali Marine 7 giorni</option> \n\t\t<option label=\"Neve 1 giorno\" value=\"lsneve\"<?php if ($trebitipo=='lsneve') echo ' selected=\"selected\"';?>>Neve 1 giorno</option> \n\t\t<option label=\"Neve 7 giorni\" value=\"lneve\"<?php if ($trebitipo=='lneve') echo ' selected=\"selected\"';?>>Neve 7 giorni</option>\n\t</select>\n </label>\n\t</p>\n <!--<p style=\"text-align:right;\">\n <select id=\"trebimeteoregione\" name=\"trebimeteoregione\"> \n\t\t<option label=\"Abruzzo (idreg=1)\" value=\"1\">Abruzzo (idreg=1)</option> \n\t\t<option label=\"Basilicata (idreg=2)\" value=\"2\">Basilicata (idreg=2)</option> \n\t\t<option label=\"Calabria (idreg=3)\" value=\"3\">Calabria (idreg=3)</option> \n\t\t<option label=\"Campania (idreg=4)\" value=\"4\">Campania (idreg=4)</option> \n\t\t<option label=\"Emilia (idreg=5)\" value=\"5\">Emilia (idreg=5)</option> \n\t\t<option label=\"Friuli (idreg=6)\" value=\"6\">Friuli (idreg=6)</option> \n\t\t<option label=\"Lazio (idreg=7)\" value=\"7\">Lazio (idreg=7)</option> \n\t\t<option label=\"Liguria (idreg=8)\" value=\"8\">Liguria (idreg=8)</option> \n\t\t<option label=\"Lombardia (idreg=9)\" value=\"9\">Lombardia (idreg=9)</option> \n\t\t<option label=\"Marche (idreg=10)\" value=\"10\">Marche (idreg=10)</option> \n\t\t<option label=\"Molise (idreg=11)\" value=\"11\">Molise (idreg=11)</option> \n\t\t<option label=\"Piemonte (idreg=12)\" value=\"12\">Piemonte (idreg=12)</option> \n\t\t<option label=\"Puglia (idreg=13)\" value=\"13\">Puglia (idreg=13)</option> \n\t\t<option label=\"Sardegna (idreg=14)\" value=\"14\">Sardegna (idreg=14)</option> \n\t\t<option label=\"Sicilia (idreg=15)\" value=\"15\">Sicilia (idreg=15)</option> \n\t\t<option label=\"Toscana (idreg=16)\" value=\"16\">Toscana (idreg=16)</option> \n\t\t<option label=\"Trentino (idreg=17)\" value=\"17\">Trentino (idreg=17)</option> \n\t\t<option label=\"Umbria (idreg=18)\" value=\"18\">Umbria (idreg=18)</option> \n\t\t<option label=\"Valle aosta (idreg=19)\" value=\"19\">Valle d'aosta (idreg=19)</option> \n\t\t<option label=\"Veneto (idreg=20)\" value=\"20\">Veneto (idreg=20)</option> \n\t</select> \n\t</p>-->\n <!-- <p style=\"text-align:right;\"> \n\t<select name=\"trebimeteolocalita\" id=\"trebimeteolocalita\"> \n\t\t<option label=\"Seleziona Localit&agrave;\" value=\"01\">Seleziona Localit&agrave;</option> \n\t</select> \n <p style=\"text-align:right;\"><label for=\"trebiloc\">Localit&agrave; <input style=\"width: 200px;\" id=\"trebiloc\" name=\"trebiloc\" type=\"text\" value=\"<?php //echo $loc;?>\" /></label></p>-->\n <p><input type=\"hidden\" id=\"trebimeteo-submit\" name=\"trebimeteo-submit\" value=\"1\" /></p> \n<?php\n\t\t}", "function kurama_custom_meta() {\n add_meta_box( 'kurama_meta', __( 'Display Options', 'kurama' ), 'kurama_meta_callback', 'page','side','high' );\n}", "public function SetJobPriority(SetJobPriority $parameters)\n {\n return $this->__soapCall('SetJobPriority', array($parameters));\n }", "function team_products_metaboxes() {\n add_meta_box(\n 'team_products',\n 'Choose Products',\n 'team_products_list_html',\n 'team',\n 'normal',\n 'default'\n );\n}", "static function metabox_at_post_edit_page(){\n\t\t \tadd_meta_box('matebox-to-handle-keywords', 'Affiliate Keywords', array(get_class(), 'metabox_to_deal_keywords'), 'product', 'advanced', 'high');\t \t\n\t\t }", "function rng_METANAME_metabox_init() {\n}", "function tm_pf_reset_like(){\n\t$screen = get_current_screen();\n\tif ( $screen->post_type == 'portfolio' && isset($_GET['action']) && $_GET['action']=='edit' && !isset($_GET['taxonomy']) ){\n\t\tglobal $post;\n\t\t$postID = $_GET['post'];\n\t\t$resetVal = get_post_meta($postID, '_thememount_portfolio_like_pflikereset' ,true );\n\t\tif( $resetVal=='on' ){\n\t\t\t// Do reset processs now\n\t\t\tupdate_post_meta($postID, 'thememount_likes' , '0' ); // Setting ZERO\n\t\t\tupdate_post_meta($postID, '_thememount_portfolio_like_pflikereset' ,'' ); // Removing checkbox\n\t\t}\n\t}\n\t\n}", "public function add_metabox() {\r\n\t\tadd_meta_box(\r\n\t\t\t'stats', // ID\r\n\t\t\t'Stats', // Title\r\n\t\t\tarray(\r\n\t\t\t\t$this,\r\n\t\t\t\t'meta_box', // Callback to method to display HTML\r\n\t\t\t),\r\n\t\t\t'spam-stats', // Post type\r\n\t\t\t'normal', // Context, choose between 'normal', 'advanced', or 'side'\r\n\t\t\t'core' // Position, choose between 'high', 'core', 'default' or 'low'\r\n\t\t);\r\n\t}", "function register_metaboxes() {\n\n\t\t$this->metaboxes = array(\n\t\t\t'example-metabox' => array(\n\t\t\t\t'title' => 'Example Post Type Metabox',\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'description',\n\t\t\t\t\t'date'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tparent::register_metaboxes();\n\n\t}", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "public function testPriority(){\n //invalid value should not change its default value\n $this->CI->task->priority = 4;//greater\n $this->assertNull($this->CI->task->priority, 'test >= 4');\n \n //invalid value type should not change its default value\n $this->CI->task->priority = 'text';\n $this->assertNull($this->CI->task->priority, 'test non-integer');\n \n //valid value\n $this->CI->task->priority = 3;\n $this->assertEquals(3, $this->CI->task->priority);\n \n }", "public function add_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t$this->plugin_slug . '-post-metabox',\n\t\t\tesc_html__( 'Review Settings', $this->plugin_slug ),\n\t\t\tarray( $this, 'review_settings_view' ),\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'core'\n \t \t);\n\t}", "function register_metabox( $_genesis_theme_settings_pagehook ) {\n\t\tadd_meta_box( 'be-title-toggle', __( 'Title Toggle', 'genesis-title-toggle' ), array( $this, 'create_sitewide_metabox' ), $_genesis_theme_settings_pagehook, 'main', 'high' );\n\t}", "function wp_high_priority_element_flag($value = \\null)\n {\n }", "public function priority()\n {\n return 5;\n }", "function ua_webtide_add_jobs_meta_boxes( $post_type, $post ) {\n add_meta_box( 'mc-wt-job-notifications', 'MailChimp Notifications', 'ua_webtide_print_jobs_meta_boxes', 'jobs', 'side', 'core' );\n \n}", "public function setMinDamage(){ $this->minDamage = 10; }", "function _action_bt_office_postmeta() {\n\tadd_meta_box( \n\t\t'brightech_page_contacts_meta',\n\t\t__('Office options', 'brightech'),\n\t\t'bt_office_postmeta_callback',\n\t\t'office',\n\t\t'normal',\n\t\t'high'\n\t);\n}", "function opt_post_metaboxes ( array $meta_boxes ) {\n\n\t// Start with an underscore to hide fields from custom fields list\n\t$prefix = '_opt_';\n\n\t/**\n\t * Metaboxes for the 'op_tool_type' post type\n\t */\n\t$meta_boxes['opt_post_metabox'] = array(\n\t\t'id' => 'opt_post_metabox',\n\t\t'title' => __( 'OP Tool Post Options', 'op_tool' ),\n\t\t'pages' => array( 'op_tool_type', ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t// 'cmb_styles' => true, // Enqueue the CMB stylesheet on the frontend\n\t\t'fields' => array(\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Delay', 'op_tool' ),\n\t\t\t\t'desc' => __( 'Enter the number of seconds to delay before allowing user to continue.', 'op_tool' ),\n\t\t\t\t'id' => $prefix . 'read_delay',\n\t\t\t\t'type' => 'text_small',\n\t\t\t\t'default' => '5',\n\t\t\t\t// 'repeatable' => true,\n\t\t\t),\n\t\t),\n\t);\n\n\t// Add other metaboxes as needed\n\n\treturn $meta_boxes;\n}", "public function priority_settings( $listing ) {\n\t\trequire locate_template( 'templates/dashboard/promotions/admin/priority-settings.php' );\n\t}", "function construction_realestate_posttype_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'construction-realestate-posttype' ), 'construction_realestate_posttype_cs_meta_callback' , 'agents');\n}", "function getPresetsOrderedByPriority() ;", "function parse_priority($actual_priority=1)\n\t\t{\n\t\t\t$this->t->set_block('run_activity', 'block_priority_options', 'priority_options');\n\t\t\t$this->t->set_block('run_activity', 'block_priority_zone', 'priority_zone');\n\t\t\tif ((!$this->conf['use_automatic_parsing']) || (count($this->priority_array)==0))\n\t\t\t{\n\t\t\t\t//hide the priority zone\n\t\t\t\t$this->t->set_var(array( 'priority_zone' => ''));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!is_array($this->priority_array))\n\t\t\t\t{\n\t\t\t\t\t$this->priority_array = explode(\" \",$this->priority_array);\n\t\t\t\t}\n\t\t\t\t//handling the select box \n\t\t\t\tforeach ($this->priority_array as $priority_level => $priority_label)\n\t\t\t\t{\n\t\t\t\t\t$this->t->set_var(array(\n\t\t\t\t\t\t'priority_option_name'\t\t=> $priority_level,\n \t\t\t\t\t\t'priority_option_value'\t\t=> $priority_label,\n \t\t\t\t\t\t'selected_priority_options'\t=> ($priority_level == $actual_priority)? 'selected=\"selected\"' :'',\n\t\t\t\t\t));\n\t\t\t\t\t//show the select box\n\t\t\t\t\t$this->t->parse('priority_options','block_priority_options',true);\n\t\t\t\t}\n\t\t\t\t// a little label before the select box\n\t\t\t\t$this->t->set_var(array('Priority_text' => lang('Priority level:')));\n\t\t\t\t//show the priority zone\n\t\t\t\t$this->t->parse('priority_zone', 'block_priority_zone', true);\n\t\t\t}\n\t\t}", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "public function extend_default_metaboxes() {\n\n\t\t\tadd_action( 'edd_save_download', array( $this, 'save_default_fields' ), 10, 2 );;\n\n\t\t\tadd_action( 'edd_stats_meta_box', array( $this, 'add_fake_sales_input' ) );\n\n\t\t}", "public function additional_plugin_setup() {\n\n\t\t$page_main = $this->_admin_pages[ 'vfb-pro' ];\n\n\t\t// If first time editing, disable advanced items by default.\n\t\tif( false === get_user_option( 'manage' . $page_main . 'columnshidden' ) ) {\n\t\t\t$user = wp_get_current_user();\n\t\t\tupdate_user_option( $user->ID, 'manage' . $page_main . 'columnshidden', array( 0 => 'merge-tag' ), true );\n\t\t}\n\n\t\tif ( !get_option( 'vfb_dashboard_widget_options' ) ) {\n\t\t\t$widget_options['vfb_dashboard_recent_entries'] = array(\n\t\t\t\t'items' => 5,\n\t\t\t);\n\t\t\tupdate_option( 'vfb_dashboard_widget_options', $widget_options );\n\t\t}\n\n\t}" ]
[ "0.74527407", "0.71486557", "0.7045037", "0.67425776", "0.6664163", "0.66329664", "0.5983106", "0.5740871", "0.5715311", "0.56244594", "0.55448544", "0.5519691", "0.5519691", "0.54615957", "0.54460514", "0.5439876", "0.5394449", "0.53877395", "0.5383372", "0.53655595", "0.5321091", "0.5313168", "0.5287243", "0.5265294", "0.5194926", "0.5158356", "0.5148231", "0.5134858", "0.5122232", "0.51155895", "0.5112436", "0.50951535", "0.5088043", "0.50861675", "0.50666064", "0.5066308", "0.5066308", "0.50069094", "0.49993742", "0.49993742", "0.49978852", "0.4975367", "0.4975367", "0.495838", "0.4958083", "0.4956837", "0.49360412", "0.49304795", "0.48823997", "0.48814127", "0.48772487", "0.48739734", "0.48580512", "0.48459733", "0.484333", "0.48163778", "0.48135957", "0.48113155", "0.48026752", "0.47990498", "0.4789321", "0.47632614", "0.47502723", "0.4749731", "0.47496474", "0.47454914", "0.47389504", "0.47348246", "0.4732392", "0.47220013", "0.47186413", "0.4713866", "0.4707758", "0.4705118", "0.4688043", "0.46855953", "0.4682705", "0.4675198", "0.46712726", "0.46550095", "0.46456414", "0.4643032", "0.46420512", "0.46394008", "0.46393397", "0.4635771", "0.46346954", "0.4633803", "0.46284783", "0.46268085", "0.46219254", "0.46181273", "0.46122724", "0.46102253", "0.46092603", "0.46076742", "0.46068603", "0.4604763", "0.45933935", "0.45872644" ]
0.5580707
10
Create the event listener.
public function __construct() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRequestCreateListener($listener);", "public function onEvent();", "private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}", "public function listener(Listener $listener);", "protected function setupListeners()\n {\n //\n }", "function eventRegister($eventName, EventListener $listener);", "public function listen($event, $listener);", "private function createStreamCallback()\n {\n $read =& $this->readListeners;\n $write =& $this->writeListeners;\n $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {\n $key = (int) $stream;\n if (\\EV_READ === (\\EV_READ & $flags) && isset($read[$key])) {\n \\call_user_func($read[$key], $stream);\n }\n if (\\EV_WRITE === (\\EV_WRITE & $flags) && isset($write[$key])) {\n \\call_user_func($write[$key], $stream);\n }\n };\n }", "public function addEventListener(string $eventClass, callable $listener, int $priority = 0): EnvironmentBuilderInterface;", "public function setupEventListeners()\r\n\t{\r\n\t\t$blueprints = craft()->courier_blueprints->getAllBlueprints();\r\n\t\t$availableEvents = $this->getAvailableEvents();\r\n\r\n\t\t// Setup event listeners for each blueprint\r\n\t\tforeach ($blueprints as $blueprint) {\r\n\t\t\tif (!$blueprint->eventTriggers) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tforeach ($blueprint->eventTriggers as $event) {\r\n\t\t\t\t// Is event currently enabled?\r\n\t\t\t\tif (!isset($availableEvents[$event])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tcraft()->on($event, function(Event $event) use ($blueprint) {\r\n\t\t\t\t\tcraft()->courier_blueprints->checkEventConditions($event, $blueprint);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// On the event that an email is sent, create a successful delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailSent', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery'\r\n\t\t]);\r\n\r\n\t\t// On the event that an email fails to send, create a failed delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailFailed', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery',\r\n\t\t]);\r\n\t}", "protected function registerListeners()\n {\n }", "public function listen($listener);", "public function listenForEvents()\n {\n Event::listen(DummyEvent::class, DummyListener::class);\n\n event(new DummyEvent);\n }", "public function createEvent()\n {\n return new Event();\n }", "public function attachEvents();", "public function attachEvents();", "public function add_event_handler($event, $callback);", "function addListener(EventListener $listener): void;", "public static function initListeners() {\n\t\t\n\t\tif(GO::modules()->isInstalled('files') && class_exists('\\GO\\Files\\Controller\\FolderController')){\n\t\t\t$folderController = new \\GO\\Files\\Controller\\FolderController();\n\t\t\t$folderController->addListener('checkmodelfolder', \"GO\\Projects2\\Projects2Module\", \"createParentFolders\");\n\t\t}\n\t\t\n\t\t\\GO\\Base\\Model\\User::model()->addListener('delete', \"GO\\Projects2\\Projects2Module\", \"deleteUser\");\n\n\t}", "public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = $this->data('event_filter');\n }", "private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function addEventListener($event, $callable){\r\n $this->events[$event] = $callable;\r\n }", "public function testEventCallBackCreate()\n {\n }", "public function listeners($event);", "public function addListener($event, $listener, $priority = 0);", "public function on($name, $listener, $data = null, $priority = null, $acceptedArgs = null);", "public function createWatcher();", "public function __construct()\n\t{\n\t\t$this->delegate = Delegate_1::fromMethod($this, 'onEvent');\n\t}", "public function init_listeners( $callable ) {\n\t}", "public static function events();", "public static function __events () {\n \n }", "public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function addApplicationBuilderListener( \n MyFusesApplicationBuilderListener $listener );", "public function addListener($eventName, $listener, $priority = 0);", "public function __construct(){\n\n\t\t\t$this->listen();\n\n\t\t}", "protected function registerListeners()\n {\n // Login event listener\n #Event::listen('auth.login', function($user) {\n //\n #});\n\n // Logout event subscriber\n #Event::subscribe('Mrcore\\Parser\\Listeners\\MyEventSubscription');\n }", "public function __construct()\n {\n// global $callback;\n // $this->eventsArr = $eventsArr;\n $this->callback = function () {\n\n // echo \"event: message\\n\"; // for onmessage listener\n echo \"event: ping\\n\";\n $curDate = date(DATE_ISO8601);\n echo 'data: {\"time\": \"' . $curDate . '\"}';\n echo \"\\n\\n\";\n\n while (($event = ServerSentEvents::popEvent()) != null) {\n $m = json_encode($event->contents);\n echo \"event: $event->event\\n\";\n echo \"data: $m\";\n echo \"\\n\\n\";\n }\n // echo \"event: message\\n\";\n // $curDate = date(DATE_ISO8601);\n // echo 'data: {\"message-time\": \"' . $curDate . '\"}';\n // echo \"\\n\\n\";\n // while(true){\n // if ($index != $this->eventsCounter){\n // ServerSentEvents::sendEvent($this->event, $this->eventBody);\n // $index = $this->eventsCounter;\n // }\n\n // sleep(1);\n // }\n };\n\n $this->setupResponse();\n }", "private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }", "public static function creating(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATING, $listener, $priority);\n }", "public function listen();", "public function listen() {\n $this->source->listen($this->id);\n }", "public function addEventListener($event, $callback, $weight = null);", "public function testAddListener()\n {\n // Arrange\n $listenerCalled = false;\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$listenerCalled) {\n $listenerCalled = true;\n });\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertTrue($listenerCalled);\n }", "public function addListener($name, $listener, $priority = 0);", "public static function created(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATED, $listener, $priority);\n }", "public function on($event, $callback){ }", "public function appendListenerForEvent(string $eventType, callable $listener): callable;", "public function initEventLogger()\n {\n $dispatcher = static::getEventDispatcher();\n\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }", "protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }", "public function getListener(/* ... */)\n {\n return $this->_listener;\n }", "protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}", "private function listeners()\n {\n foreach ($this['config']['listeners'] as $eventName => $classService) {\n $this['dispatcher']->addListener($classService::NAME, [new $classService($this), 'dispatch']);\n }\n }", "public function initializeListeners()\n {\n $this->eventsEnabled = false;\n $this->setPreloads();\n $this->setEvents();\n $this->eventsEnabled = true;\n }", "protected function listenForEvents()\n {\n $callback = function ($event) {\n foreach ($this->logWriters as $writer) {\n $writer->log($event);\n }\n };\n\n $this->events->listen(JobProcessing::class, $callback);\n $this->events->listen(JobProcessed::class, $callback);\n $this->events->listen(JobFailed::class, $callback);\n $this->events->listen(JobExceptionOccurred::class, $callback);\n }", "protected function registerListeners()\n {\n $this->container['listener.server'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\ServerListener($c['filesystem'], $c['generator.server']);\n });\n\n $this->container['listener.gateway'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\GatewayListener($c['filesystem'], $c['generator.gateway']);\n });\n }", "public function listeners($eventName);", "public static function create()\n {\n list(\n $message,\n $callbackService,\n $callbackMethod,\n $callbackParams\n ) = array_pad( func_get_args(), 4, null);\n\n static::addToEventQueue( array(\n 'type' => \"alert\",\n 'properties' => array(\n 'message' => $message\n ),\n 'service' => $callbackService,\n 'method' => $callbackMethod,\n 'params' => $callbackParams ?? []\n ));\n }", "public function requestCreateEvent()\n {\n $ch = self::curlIni('event_new', $this->eventParams);\n\n return $ch;\n }", "function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}", "public function __construct()\n {\n Hook::listen(__CLASS__);\n }", "function add_listener($hook, $function_name){\n\t\tglobal $listeners;\n\n\t\t$listeners[$hook][] = $function_name;\n\t}", "public function __construct()\n {\n $this->events = new EventDispatcher();\n }", "protected function initEventLogger(): void\n {\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $this->dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }", "public function listen($events, $listener = null): void;", "public function onCreate($callback)\n {\n $this->listeners[] = $callback;\n return $this;\n }", "public static function listen() {\n $projectId = \"sunday-1601040613995\";\n\n # Instantiates a client\n $pubsub = new PubSubClient([\n 'projectId' => $projectId\n ]);\n\n # The name for the new topic\n $topicName = 'gmail';\n\n # Creates the new topic\n $topic = $pubsub->createTopic($topicName);\n\n echo 'Topic ' . $topic->name() . ' created.';\n }", "protected function registerEventListeners()\n {\n Event::listen(Started::class, function (Started $event) {\n $this->progress = $this->output->createProgressBar($event->objects->count());\n });\n\n Event::listen(Imported::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(ImportFailed::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(DeletedMissing::class, function (DeletedMissing $event) {\n $event->deleted->isEmpty()\n ? $this->info(\"\\n No missing users found. None have been soft-deleted.\")\n : $this->info(\"\\n Successfully soft-deleted [{$event->deleted->count()}] users.\");\n });\n\n Event::listen(Completed::class, function (Completed $event) {\n if ($this->progress) {\n $this->progress->finish();\n }\n });\n }", "public function addBeforeCreateListener(IBeforeCreateListener $listener)\n {\n $this->_lifecyclers[BeanLifecycle::BeforeCreate][] = $listener;\n }", "protected function registerInputEvents() {\n\t\t$this->getEventLoop()->addEventListener('HANG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->offHook = (bool)$event['value'];\n\n\t\t\t// Trigger specific events for receiver up and down states\n\t\t\t$eventName = $this->isOffHook() ? 'RECEIVER_UP' : 'RECEIVER_DOWN';\n\t\t\t$this->fireEvents($eventName, $event);\n\t\t});\n\n\t\t$this->getEventLoop()->addEventListener('TRIG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->dialling = (bool)$event['value'];\n\t\t});\n\n\t\t// Proxy registration for all EventLoop events to pass them back up to our own listeners\n\t\t$this->getEventLoop()->addEventListener(true, function ($event, $type) {\n\t\t\t// Fire event to our own listeners\n\t\t\t$this->fireEvents($type, $event);\n\t\t});\n\t}", "public static function creating($callback)\n {\n self::listenEvent('creating', $callback);\n }", "public function attach(string $event, callable $listener, int $priority = 0): void;", "public function __construct()\n {\n $this->listnerCode = config('settings.listener_code.DeletingVoucherEventListener');\n }", "protected function registerEventListener()\n {\n $subscriber = $this->getConfig()->get('audit-trail.subscriber', AuditTrailEventSubscriber::class);\n $this->getDispatcher()->subscribe($subscriber);\n }", "function listenTo(string $eventName, callable $callback)\n {\n EventManager::register($eventName, $callback);\n }", "public function attach($identifier, $event, callable $listener, $priority = 1)\n {\n }", "public function testRegisiterListenerMethodAddsAListener()\n\t{\n\t\t$instance = new Dispatcher();\n\n\t\t$instance->register_listener('some_event', 'my_function');\n\n\t\t$this->assertSame(array('some_event' => array('my_function')), $instance->listeners);\n\t\t$this->assertAttributeSame(array('some_event' => array('my_function')), 'listeners', $instance);\n\t}", "protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }", "public static function create($className, array &$extraTabs, $selectedTabId)\r\n {\r\n $createClass = XenForo_Application::resolveDynamicClass($className, 'listener_th');\r\n if (!$createClass) {\r\n throw new XenForo_Exception(\"Invalid listener '$className' specified\");\r\n }\r\n \r\n return new $createClass($extraTabs, $selectedTabId);\r\n }", "function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}", "function getEventListeners()\n {\n $listeners = array();\n \n $listener = new Listener($this);\n \n $listeners[] = array(\n 'event' => RoutesCompile::EVENT_NAME,\n 'listener' => array($listener, 'onRoutesCompile')\n );\n\n $listeners[] = array(\n 'event' => GetAuthenticationPlugins::EVENT_NAME,\n 'listener' => array($listener, 'onGetAuthenticationPlugins')\n );\n\n return $listeners;\n }", "protected static function loadListeners() {\n\t\t\n\t\t// default var\n\t\t$configDir = Config::getOption(\"configDir\");\n\t\t\n\t\t// make sure the listener data exists\n\t\tif (file_exists($configDir.\"/listeners.json\")) {\n\t\t\t\n\t\t\t// get listener list data\n\t\t\t$listenerList = json_decode(file_get_contents($configDir.\"/listeners.json\"), true);\n\t\t\t\n\t\t\t// get the listener info\n\t\t\tforeach ($listenerList[\"listeners\"] as $listenerName) {\n\t\t\t\t\n\t\t\t\tif ($listenerName[0] != \"_\") {\n\t\t\t\t\t$listener = new $listenerName();\n\t\t\t\t\t$listeners = $listener->getListeners();\n\t\t\t\t\tforeach ($listeners as $event => $eventProps) {\n\t\t\t\t\t\t$eventPriority = (isset($eventProps[\"priority\"])) ? $eventProps[\"priority\"] : 0;\n\t\t\t\t\t\tself::$instance->addListener($event, array($listener, $eventProps[\"callable\"]), $eventPriority);\n\t\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}\n\t\t\n\t}", "function __construct()\n\t{\n\t\t$this->events[\"BeforeShowList\"]=true;\n\n\t\t$this->events[\"BeforeProcessList\"]=true;\n\n\t\t$this->events[\"BeforeProcessPrint\"]=true;\n\n\t\t$this->events[\"BeforeShowPrint\"]=true;\n\n\t\t$this->events[\"BeforeQueryList\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeProcessEdit\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessView\"]=true;\n\n\t\t$this->events[\"BeforeShowView\"]=true;\n\n\n\n\n\t\t$this->events[\"ProcessValuesView\"]=true;\n\n\t\t$this->events[\"ProcessValuesEdit\"]=true;\n\n\t\t$this->events[\"CustomAdd\"]=true;\n\n\t\t$this->events[\"CustomEdit\"]=true;\n\n\t\t$this->events[\"ProcessValuesAdd\"]=true;\n\n\t\t$this->events[\"BeforeQueryEdit\"]=true;\n\n\t\t$this->events[\"BeforeQueryView\"]=true;\n\n\n\t\t$this->events[\"BeforeProcessAdd\"]=true;\n\n\n//\tonscreen events\n\t\t$this->events[\"calmonthly_snippet2\"] = true;\n\t\t$this->events[\"calmonthly_snippet1\"] = true;\n\t\t$this->events[\"Monthly_Next_Prev\"] = true;\n\n\t}", "function defineHandlers() {\n EventsManager::listen('on_rawtext_to_richtext', 'on_rawtext_to_richtext');\n EventsManager::listen('on_daily', 'on_daily');\n EventsManager::listen('on_wireframe_updates', 'on_wireframe_updates');\n }", "public function createEvents()\n {\n //\n\n return 'something';\n }", "public static function createInstance()\n {\n return new GridPrintEventManager('ISerializable');\n }", "public function setUp()\n {\n if ($this->getOption('listener') === true) \n $this->addListener(new BlameableListener($this->_options));\n }", "public static function created($callback)\n {\n self::listenEvent('created', $callback);\n }", "public function addListener()\n {\n $dispatcher = $this->wrapper->getDispatcher();\n $listener = new TestListener();\n\n $dispatcher->addListener(PsKillEvents::PSKILL_PREPARE, [$listener, 'onPrepare']);\n $dispatcher->addListener(PsKillEvents::PSKILL_SUCCESS, [$listener, 'onSuccess']);\n $dispatcher->addListener(PsKillEvents::PSKILL_ERROR, [$listener, 'onError']);\n $dispatcher->addListener(PsKillEvents::PSKILL_BYPASS, [$listener, 'onBypass']);\n\n return $listener;\n }", "public static function addEventListener($event, $listenerClassName) {\n\t\tif (!is_a($listenerClassName, EventListenerInterface::class, TRUE)) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\tsprintf(\n\t\t\t\t\t'Invalid CMIS Service EventListener: %s must implement %s',\n\t\t\t\t\t$listenerClassName,\n\t\t\t\t\tEventListenerInterface::class\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tstatic::$eventListeners[get_called_class()][$event][] = $listenerClassName;\n\t}", "public function makeListener($listener, $wildcard = false): Closure;", "public function createSubscriber();", "public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}", "public function addEventListener($events, $eventListener)\n {\n $this->eventListeners[] = array('events' => $events, 'listener' => $eventListener);\n }", "function __construct()\r\n\t{\r\n\t\t$this->events[\"BeforeAdd\"]=true;\r\n\r\n\r\n\t}", "function __construct()\n\t{\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\n\t\t$this->events[\"BeforeShowAdd\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"IsRecordEditable\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}", "public function startListening();", "public function addEntryAddedListener(callable $listener): SubscriptionInterface;", "function __construct()\n\t{\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}", "function GetEventListeners() {\n $my_file = '{%IEM_ADDONS_PATH%}/dynamiccontenttags/dynamiccontenttags.php';\n $listeners = array ();\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_SENDSTUDIOFUNCTIONS_GENERATEMENULINKS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'SetMenuItems'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_USERAPI_GETPERMISSIONTYPES',\n 'trigger_details' => array (\n 'Interspire_Addons',\n 'GetAddonPermissions',\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_DCT_HTMLEDITOR_TINYMCEPLUGIN',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'DctTinyMCEPluginHook'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_EDITOR_TAG_BUTTON',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'CreateInsertTagButton'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_GETALLTAGS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'getAllTags'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'replaceTagContent'\n ),\n 'trigger_file' => $my_file\n );\n\n return $listeners;\n }", "function on_creation() {\n $this->init();\n }", "public function addEventListener(ListenerInterface $eventListener)\n {\n $this->eventListeners[] = $eventListener;\n }" ]
[ "0.65685207", "0.62875676", "0.6221792", "0.6197413", "0.61627764", "0.6129312", "0.6096226", "0.6056844", "0.6051069", "0.6041841", "0.596228", "0.596194", "0.5957539", "0.59439605", "0.58821785", "0.58821785", "0.5874665", "0.5864387", "0.5856076", "0.584338", "0.5824244", "0.5820997", "0.5791637", "0.57913053", "0.57893854", "0.57716024", "0.5764599", "0.5744472", "0.57417566", "0.57387024", "0.5721539", "0.57068586", "0.5699624", "0.56838834", "0.5675836", "0.56686187", "0.5661412", "0.56601405", "0.56584114", "0.5649107", "0.5638085", "0.56257224", "0.56172097", "0.56064796", "0.55919635", "0.5579062", "0.55775297", "0.5559927", "0.5546297", "0.5546121", "0.5545537", "0.5539715", "0.55295366", "0.55276597", "0.5527287", "0.551302", "0.5497285", "0.5495119", "0.54845315", "0.54834753", "0.54812366", "0.5478984", "0.5474917", "0.5471286", "0.54693574", "0.54684293", "0.5466594", "0.5465012", "0.5450231", "0.5450062", "0.5450001", "0.544321", "0.54308116", "0.54218924", "0.5389615", "0.53857446", "0.5378957", "0.5378836", "0.53771406", "0.5368413", "0.5360908", "0.5356685", "0.5349897", "0.53419805", "0.5340825", "0.53330225", "0.53323317", "0.5330117", "0.53270465", "0.5326564", "0.5307367", "0.52996707", "0.52980274", "0.52973336", "0.52886003", "0.528163", "0.5276869", "0.5269541", "0.5268173", "0.5265876", "0.52629435" ]
0.0
-1
Parse post link and replace it with meta value.
function chocolife_external_permalink( $link, $post ) { //$meta = get_post_meta( $post->ID, 'syndication_permalink', TRUE ); $meta = get_field("news_link"); $url = esc_url( filter_var( $meta, FILTER_VALIDATE_URL ) ); return $url ? $url : $link; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function fetchLink($link, $post){\n\t\tif(strpos($link, 'youtube.com/watch')){\n\t\t\t$videoId = explode(\"watch?v=\", $link);\n\t\t\tif(count($videoId > 1)){\n\t\t\t\t$videoId = $videoId[count($videoId) -1];\n\n\t\t\t\t$post['assetType'] = 'yt_video';\n\t\t\t\t$post['assetImage'] = 'http://img.youtube.com/vi/'.$videoId.'/hqdefault.jpg';\n\t\t\t\t$post['asset'] = $videoId;\n\t\t\t}\n\t\t}\n\n\t\treturn $post;\n\t}", "function parse_post_link($post_link, $post, $leavename = false, $sample = null)\n {\n global $wp_rewrite;\n\n if ( ! $post instanceof WP_Post ) {\n $post = get_post($post);\n }\n\n $post_type = $post->post_type;\n\n if ( ! post_type_exists( $post_type ) ) {\n throw new PostTypeNotFoundException($post);\n }\n\n $sample = ( null === $sample && isset($post->filter) && ('sample' === $post->filter) );\n\n $post_type_obj = get_post_type_object( $post_type );\n $permastruct = get_option( \"{$post_type}_permalink_structure\" );\n $has_changed = false;\n\n // Prefer custom option over default\n if ( $permastruct && ! empty( $permastruct ) ) {\n $has_changed = true;\n $post_link = $permastruct;\n } elseif ( ! empty( $post_type_obj->rewrite['permastruct'] ) ) {\n $has_changed = true;\n $post_link = $post_type_obj->rewrite['permastruct'];\n }\n\n /** This filter is documented by {@see get_permalink()} in wp-includes/link-template.php */\n $post_link = apply_filters('pre_post_link', $post_link, $post, $leavename);\n\n /**\n * Filter the list of unpublished post statuses by post type.\n *\n * @param array $statuses The statuses for which permalinks don't work.\n * @param WP_Post $post The post in question.\n */\n $unpublished_statuses = apply_filters(\n \"parse_{$post_type}_link/unpublished_statuses\",\n get_unpublished_post_statuses(),\n $post\n );\n\n // If we aren't published, permalinks don't work\n $is_unpublished = ( isset( $post->post_status ) && in_array( $post->post_status, $unpublished_statuses ) );\n\n if ( ! empty( $post_link ) && ( ! $is_unpublished || $sample ) ) {\n $post_link = parse_post_permalink($post_link, $post, $leavename);\n\n if ( $has_changed ) {\n $post_link = home_url( $post_link );\n $post_link = user_trailingslashit( $post_link, 'single' );\n }\n } else {\n $post_link = get_post_querylink($post);\n }\n\n return $post_link;\n }", "function tfnm_parse_link( $text, $url ){\n $start = strpos( $text, 'href=\"\"' );\n return substr_replace( $text, 'href=\"' . esc_url( $url ) . '\"', $start, strlen('href=\"\"') );\n}", "function avia_link_content_filter($current_post)\n\t{\n\t\t$link \t\t= \"\";\n\t\t$newlink = false;\n\t\t$pattern1 \t= '$^\\b(https?|ftp|file)://[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|]$i';\n\t\t$pattern2 \t= \"!^\\<a.+?<\\/a>!\";\n\t\t$pattern3 \t= \"!\\<a.+?<\\/a>!\";\n\n\t\t//if the url is at the begnning of the content extract it\n\t\tpreg_match($pattern1, $current_post['content'] , $link);\n\t\tif(!empty($link[0]))\n\t\t{\n\t\t\t$link = $link[0];\n\t\t\t$markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false));\n\t\t\t$current_post['title'] = \"<a href='$link' rel='bookmark' title='\".__('Link to:','avia_framework').\" \".the_title_attribute('echo=0').\"' $markup>\".get_the_title().\"</a>\";\n\t\t\t$current_post['content'] = preg_replace(\"!\".str_replace(\"?\", \"\\?\", $link).\"!\", \"\", $current_post['content'], 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpreg_match($pattern2, $current_post['content'] , $link);\n\t\t\tif(!empty($link[0]))\n\t\t\t{\n\t\t\t\t$link = $link[0];\n\t\t\t\t$current_post['title'] = $link;\n\t\t\t\t$current_post['content'] = preg_replace(\"!\".str_replace(\"?\", \"\\?\", $link).\"!\", \"\", $current_post['content'], 1);\n\t\t\t\t\n\t\t\t\t$newlink = get_url_in_content( $link );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpreg_match($pattern3, $current_post['content'] , $link);\n\t\t\t\tif(!empty($link[0]))\n\t\t\t\t{\n\t\t\t\t\t$current_post['title'] = $link[0];\n\t\t\t\t\t\n\t\t\t\t\t$newlink = get_url_in_content( $link[0] );\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($link)\n\t\t{\n\t\t\tif(is_array($link)) $link = $link[0];\n\t\t\tif($newlink) $link = $newlink;\n\t\t\t\n\t\t\t$heading = is_singular() ? \"h1\" : \"h2\";\n\n\t\t\t//$current_post['title'] = \"<{$heading} class='post-title entry-title \". avia_offset_class('meta', false). \"'>\".$current_post['title'].\"</{$heading}>\";\n\t\t\t$current_post['title'] = \"<{$heading} class='post-title entry-title' \".avia_markup_helper(array('context' => 'entry_title','echo'=>false)).\">\".$current_post['title'].\"</{$heading}>\";\n\t\t\t\n\t\t\t//needs to be set for masonry\n\t\t\t$current_post['url'] = $link;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$current_post = avia_default_title_filter($current_post);\n\t\t}\n\n\t\treturn $current_post;\n\t}", "function kp_portfolio_link( $post )\n{\n wp_nonce_field( 'kp_save_portfolio_link_data', 'kp_portfolio_link_meta_box_nonce' );\n\n $value = get_post_meta( $post->ID, '_link', true );\n $hint = '<p class=\"howto\">Link to project website</p>';\n echo '<input name=\"kp_portfolio_link_field\" type=\"url\" value=\"' . esc_attr( $value ) . '\" style=\"width:100%\">' . $hint;\n}", "function wprss_update_feed_meta( $meta_id, $post_id, $meta_key, $meta_value ) {\n $post = get_post( $post_id );\n if ( $post !== NULL && $post->post_status === 'publish' && $post->post_type === 'wprss_feed' ) {\n if ( $meta_key === 'wprss_url' )\n wprss_change_fb_url( $post_id, $meta_value );\n }\n }", "function register_post_metas() {\n\tregister_post_meta(\n\t\t'reblogged-post',\n\t\t'rbf_source_url',\n\t\tarray(\n\t\t\t'type' => 'string',\n\t\t\t'single' => true,\n\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t\t'show_in_rest' => true,\n\n\t\t\t'auth_callback' => function( $post ) {\n\t\t\t\treturn current_user_can( 'edit_post', $post );\n\t\t\t}\n\t\t)\n\t);\n}", "function parse_permalink_tags( $post_link, $id = 0, $leavename = false )\n\t{\n return parse_permastruct_tags( $post_link, $id, $leavename );\n\t}", "public function filter_post_type_link( $link, $post ) {\n $post_id = $post->ID;\n if ( 'pedestal_locality' === get_post_type( $post ) ) {\n $terms = wp_get_object_terms( $post_id, 'pedestal_locality_type' );\n if ( ! empty( $terms ) ) {\n return str_replace( '%locality_type%', $terms[0]->slug, $link );\n }\n }\n return $link;\n }", "function _post_format_link($link, $term, $taxonomy)\n {\n }", "function kp_save_portfolio_link_data( $post_id )\n{\n if ( !isset( $_POST[ 'kp_portfolio_link_meta_box_nonce' ] ) ) {\n return;\n }\n // Check is meta box is generated by WP\n if ( !wp_verify_nonce( $_POST[ 'kp_portfolio_link_meta_box_nonce' ], 'kp_save_portfolio_link_data' ) ) {\n return;\n }\n // Disable auto saving by WP\n if ( defined( 'DOING_AUTO_SAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n // User permissions\n if ( !current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n // Check if field is set and have value\n if ( !isset( $_POST[ 'kp_portfolio_link_field' ] ) ) {\n return;\n }\n\n $data = sanitize_text_field( $_POST[ 'kp_portfolio_link_field' ] );\n\n update_post_meta( $post_id, '_link', $data );\n}", "public function modify_permalink( $post_link, $post ) {\n\n\t\tif ( empty( $this->form_data['id'] ) || \\absint( $this->form_data['id'] ) !== $post->ID ) {\n\t\t\treturn $post_link;\n\t\t}\n\n\t\tif ( empty( $this->form_data['settings']['conversational_forms_enable'] ) ) {\n\t\t\treturn $post_link;\n\t\t}\n\n\t\treturn \\home_url( $post->post_name );\n\t}", "function next_post_link($format = '%link &raquo;', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "function press_save_link( $post_id ){\n\tif ( !isset( $_POST['press_link_box_nonce'] ) || !wp_verify_nonce( $_POST['press_link_box_nonce'], basename( __FILE__ ) ) ){\n\treturn;}\n \n // Check the user's permissions.\nif ( ! current_user_can( 'edit_post', $post_id ) ){\n\treturn;\n}\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post_id;\n}\n //save value\n if ( isset( $_REQUEST['press_link'] ) ) {\n\tupdate_post_meta( $post_id, '_press_link', sanitize_text_field( $_POST['press_link'] ) );\n}\n \n}", "function show_metabox_link_externo($post) {\r\n\t\t$link = get_post_meta($post->ID, 'link_externo', true);\r\n\t\twp_nonce_field(__FILE__, 'link_externo_nonce');\r\n\t\techo \"<input type='url' name='link_externo' class='widefat' value='$link'>\";\r\n\t}", "function get_link_img_post(){\n\tglobal $post;\n\tpreg_match_all('/src=\"(.*)\"/Us',get_the_content(),$matches);\n\t$link_img_post = $matches[1];\n\treturn $link_img_post;\n}", "function get_next_post_link($format = '%link &raquo;', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "private function sanitize_post_type_link( &$post_link, $post, $taxonomy ) {\n\t\t$find = \"%{$taxonomy}%\";\n\t\tif ( ! Str::contains( $find, $post_link ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$primary_term = $this->get_primary_term( $taxonomy, $post->ID );\n\t\tif ( false !== $primary_term ) {\n\t\t\t// Get the hierachical terms.\n\t\t\t$parents = $this->get_hierarchical_link( $primary_term );\n\n\t\t\t// Replace the placeholder rewrite tag with hierachical terms.\n\t\t\t$post_link = str_replace( $find, $parents, $post_link );\n\t\t}\n\t}", "protected function prepare_links($post)\n {\n }", "protected function prepare_links($post)\n {\n }", "function custom_post_type_permastruct($link, $post) {\n if ($post->post_type === 'lwa_feature') {\n if ($cats = get_the_terms($post->ID, 'featured_tax'))\n $link = str_replace('%featured_tax%', array_pop($cats)->slug, $link);\n return $link;\n } \n else if ($post->post_type === 'lwa_news') {\n if ($cats = get_the_terms($post->ID, 'news_tax'))\n $link = str_replace('%news_tax%', array_pop($cats)->slug, $link);\n return $link;\n } else {\n return $link;\n }\n}", "function ua_webtide_filter_jobs_permalink( $post_link, $post, $leavename, $sample ) {\n\tif ( ! ( 'jobs' == $post->post_type ) ) {\n\t\treturn $post_link;\n\t}\n\t\t\n\t// Get job posting URL\n\tif ( $job_posting_permalink = get_post_meta( $post->ID, 'job_posting_permalink', true ) ) {\n\t\treturn $job_posting_permalink;\n\t}\n\t\t\n\treturn $post_link;\n\t\n}", "protected function getPostIdFromLink($link) {\n $postId = null;\n preg_match('~\\/([0-9]+)\\/~', $link, $postId);\n return $postId[1];\n }", "public function post_type_link( $post_link, $post ) {\n if ( $post->post_type !== 'portfolio_item' ) {\n return $post_link;\n }\n\n if ( strpos( $post_link, '%portfolio%' ) !== false ) {\n $terms = get_the_terms( $post, 'portfolio' );\n if ( $terms ) {\n usort( $terms, '_usort_terms_by_ID' );\n $post_link = str_replace( '%portfolio%', $terms[0]->slug, $post_link );\n } else {\n $post_link = str_replace( '%portfolio%', 'item', $post_link );\n }\n }\n\n return $post_link;\n }", "function link_target_meta_box($link)\n {\n }", "function replace_links($content) {\r\n\tpreg_match_all(\"/<a\\s*[^>]*>(.*)<\\/a>/siU\", $content, $matches);\r\n\t//preg_match_all(\"/<a\\s[^>]*>(.*?)(</a>)/siU\", $content, $matches);\t\r\n\t$foundLinks = $matches[0];\r\n\t$wpbar_options = get_option(\"wpbar_options\");\r\n\t\r\n\tforeach ($foundLinks as $theLink) {\r\n\t\t$uri = getAttribute('href',$theLink);\r\n\t\tif($wpbar_options[\"validateURL\"]) {\r\n\t\t\tif(!isWhiteListed(get_domain($uri)) && !isSociable($theLink) && isValidURL($uri)) {\r\n\t\t\t\t$uid = isInDB($uri);\r\n\t\t\t\t$nofollow = is_nofollow($uid) ? \"rel='nofollow'\" : \"\";\r\n\t\t\t\t$content=str_replace(\"href=\\\"\".$uri.\"\\\"\",\"title='Original Link: \".$uri.\"' \".$nofollow.\" href=\\\"\".get_option('home').\"/?\".$uid.\"\\\"\",$content);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(!isWhiteListed(get_domain($uri)) && !isSociable($theLink)) {\r\n\t\t\t\t$uid = isInDB($uri);\r\n\t\t\t\t$nofollow = is_nofollow($uid) ? \"rel='nofollow'\" : \"\";\r\n\t\t\t\t$content=str_replace(\"href=\\\"\".$uri.\"\\\"\",\"title='Original Link: \".$uri.\"' \".$nofollow.\" href=\\\"\".get_option('home').\"/?\".$uid.\"\\\"\",$content);\r\n\t\t\t}\r\n\t\t}\r\n\t}\t\r\n\treturn $content;\r\n}", "function post_link_box_content($post){\n // Als er een post wordt aangepast, haal de post_meta op uit de databank, VUL DIE IN\n $Link = get_post_meta( $post->ID, 'Link', true );\n //CONTROLE ALS DE AANVRAAG KOMT VAN DIT SCHERM - SAVE POST KAN VAN EEN ANDERE PAGINA KOMEN\n wp_nonce_field(plugin_basename(__FILE__), 'post_link_box_content_nonce' );\n //WERKELIJKE INHOUD - GEBRUIK ECHO\n echo '<label for=\"Link\">Zin voor verwijzing naar pagina<label><br>';\n echo \"<textarea rows='4' cols='100' id='Link' name='Link'>{$Link}</textarea>\";\n }", "function dvs_change_blog_links($post_link, $id=0){\n\n $post = get_post($id);\n\n if( is_object($post) && $post->post_type == 'post'){\n return home_url('/my-prefix/'. $post->post_name.'/');\n }\n\n return $post_link;\n}", "function cd_post_slug_remove_short( $post_link, $post, $leavename ) { \r\n if ( 'cd-short' != $post->post_type || 'publish' != $post->post_status ) {\r\n return $post_link;\r\n }\r\n \r\n $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );\r\n \r\n return $post_link;\r\n}", "public function updatePostMeta($post_meta_name) {\n $meta = array();\n $meta['image'] = $this->image;\n $meta['sub-images'] = $this->sub_images;\n $meta['link'] = $this->link;\n $meta['price'] = $this->price;\n $meta['product-code'] = $this->product_code;\n\n update_post_meta($this->id, $post_meta_name, $meta);\n }", "function posts_link_attributes() {\n return 'class=\"page-link\"';\n}", "function newsstats_get_rss_url( $post_id ) {\n\n $url = get_post_meta( $post_id, 'nn_pub_rss', true ); // RSS file\n\n return $url;\n\n}", "public function unprettifyPermalink(\n string $postLink,\n \\WP_Post $post\n ): string {\n\n if (!$this->postTypeRepository->isPostTypeQueryBased($post->post_type)) {\n return $postLink;\n }\n\n $postType = get_post_type_object($post->post_type);\n\n $args = ['p' => $post->ID];\n if ($postType->query_var && !$this->isDraftOrPending($post)) {\n $args = [$postType->query_var => $post->post_name];\n }\n\n return (string)home_url(add_query_arg($args, ''));\n }", "public function link() { return site_url().'/'.$this->post->post_name; }", "function update_rebrandly_link( $_link_id, $_link_slug, $_link_url, $post_id ) {\n $options = get_option('sbrb_settings');\n $permalink = get_permalink($post_id);\n $title = get_the_title($post_id);\n $url = 'https://api.rebrandly.com/v1/links/' . $_link_id;\n\n $result = wp_remote_post(\n $url, \n array(\n 'body' => json_encode(array(\n 'id' => $_link_id,\n 'title' => html_entity_decode($title, ENT_COMPAT, 'UTF-8'),\n 'slashtag' => $_link_slug,\n 'destination' => esc_url_raw($permalink),\n 'shortUrl' => $_link_url,\n 'domain' => get_branded_domain_id_option(),\n 'favourite' => false\n )),\n 'headers' => array(\n 'apikey' => $options['sbrb_api_key'],\n 'Content-Type' => 'application/json'\n )\n )\n );\n\n return json_decode($result['body']);\n }", "function post_link($post){\n if(strcasecmp($post->post_type, 'primary_page') == 0){\n return e($post->post_slug);\n }else{\n return strtolower($post->category_name). '/' . e($post->post_slug);\n }\n}", "function set_button_link( $post ) {\n\treturn get_post_meta( $post->ID, '_button_link', true );\n}", "protected function getPostFromLink($link) {\n $data = file_get_contents($link);\n $postPage = new Crawler($data);\n $post = $postPage->filter('div.post_full')->html();\n $time = $this->getPostTime($postPage);\n $tags = $this->getPostTags($postPage);\n return array('full'=>$post,'time'=>$time,'tags'=>$tags);\n }", "function thinkup_extract_urls_filter ( $tu_post ) {\n\n $regex = '/[a-z]+:\\/\\/[a-z0-9-_]+\\.[a-z0-9-_@:~%&\\?\\+#\\/.=]+[^:\\.,\\)\\s*$]/i';\n\n if ( preg_match_all($regex, $tu_post->wp_post->post_content, $matches) ) {\n\n $tu_post->links = array_merge($tu_post->links, $matches[0]);\n\n }\n\n return $tu_post;\n\n}", "function metabox_datacenter_link_save($post_id, $post)\n{\n if (!wp_verify_nonce($_POST['eventmeta_noncename_datacenter_link'], plugin_basename(__FILE__))) {\n return $post->ID;\n }\n// Is the user allowed to edit the post or page?\n if (!current_user_can('edit_post', $post->ID))\n return $post->ID;\n\n $datacenter_link = sanitize_text_field($_POST['_datacenter_link']);\n\n update_post_meta($post->ID, '_datacenter_link', $datacenter_link);\n\n}", "function wp_force_plain_post_permalink($post = \\null, $sample = \\null)\n {\n }", "function the_feed_link($anchor, $feed = '')\n {\n }", "function edit_post_link($text = \\null, $before = '', $after = '', $post = 0, $css_class = 'post-edit-link')\n {\n }", "function owa_post_link($link) {\r\n\r\n\t$owa = owa_getInstance();\r\n\r\n\treturn $owa->add_link_tracking($link);\r\n\t\t\r\n}", "function url_meta() {\n add_meta_box('url_meta', 'URL', 'url_callback', 'external_post', 'normal', 'high');\n add_meta_box('url_meta', 'URL', 'url_callback', 'external_tool', 'normal', 'high');\n}", "function videos_save_link( $post_id ){\n\tif ( !isset( $_POST['yt_link_box_nonce'] ) || !wp_verify_nonce( $_POST['yt_link_box_nonce'], basename( __FILE__ ) ) ){\n\treturn;}\n \n // Check the user's permissions.\nif ( ! current_user_can( 'edit_post', $post_id ) ){\n\treturn;\n}\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post->ID;\n}\n //save value\n if ( isset( $_REQUEST['yt_link'] ) ) {\n\tupdate_post_meta( $post_id, '_yt_link', sanitize_text_field( $_POST['yt_link'] ) );\n}\n \n}", "function replace_long_by_shorten_links($postId, $replacingList) \r\n{\r\n global $wpdb;\r\n\r\n $post = get_post($postId);\r\n $post_content = $post->post_content;\r\n\r\n foreach ($replacingList as $replaceContent) {\r\n $post_content = str_replace($replaceContent['source_link'], $replaceContent['result_link'], $post_content);\r\n } \r\n $wpdb->query( $wpdb->prepare( \"UPDATE $wpdb->posts SET post_content = %s WHERE ID = %d\", $post_content, $postId ) );\r\n}", "function rdf_permalink( $my_post ) {\n $permalink = site_url( ) . \"?ps_articles=\" . $my_post->post_name;\n return( $permalink );\n}", "function permalink_link()\n {\n }", "private static function _prepare_content($post) {\n // Add paragraph tags.\n $post_content = wpautop($post->post_content);\n\n // Best effort. Regex parsing of HTML is a bad idea, generally, but including\n // a full parser just for this case is over the top. This will match things\n // inside, for example, <pre> and <xmp> tags. ¯\\_(ツ)_/¯\n preg_match_all('/<(?:a|img)[^>]+(?:href|src)=\"(?:\\/[^\"]*)\"/', $post_content, $matches);\n if (!$matches[0]) return $post_content;\n\n // Replace relative URLs in links and image sources.\n $site_url = site_url();\n $replacements = array();\n foreach ($matches[0] as $match) {\n $replacement = preg_replace('/href=\"(\\/[^\"]*)\"/', 'href=\"' . $site_url . '$1\"', $match);\n $replacement = preg_replace('/src=\"(\\/[^\"]*)\"/', 'src=\"' . $site_url . '$1\"', $replacement);\n $replacements[] = $replacement;\n }\n return str_replace($matches[0], $replacements, $post_content);\n }", "function audiotheme_archives_post_type_archive_link( $link, $post_type ) {\n\tif ( $archive_id = get_audiotheme_post_type_archive( $post_type ) ) {\n\t\t$link = get_permalink( $archive_id );\n\t}\n\n\treturn $link;\n}", "private function resolvePostMetaReferences()\n {\n $app = Bootstrap::getApplication();\n $resolver = $app['resolver'];\n $settings = $app['settings'];\n\n if (isset($settings['references']['posts']['postmeta'])) {\n $references = $settings['references']['posts']['postmeta'];\n if (is_array($references)) {\n foreach ($references as $value) {\n if (is_string($value)) {\n $this->postPostMetaReferenceNames[] = $value;\n } elseif (is_object($value)) {\n $arr = (array) $value;\n $key = key($arr);\n $this->postPostMetaReferenceNames[$key] = $arr[$key];\n } elseif (is_array($value)) {\n $key = key($value);\n $this->postPostMetaReferenceNames[$key] = $value[$key];\n }\n }\n }\n }\n $resolver->resolvePostMetaReferences($this->postPostMetaReferenceNames, 'post');\n\n if (isset($settings['references']['terms']['postmeta'])) {\n $references = $settings['references']['terms']['postmeta'];\n if (is_array($references)) {\n foreach ($references as $value) {\n if (is_string($value)) {\n $this->termPostMetaReferenceNames[] = $value;\n } elseif (is_object($value)) {\n $arr = (array) $value;\n $key = key($arr);\n $this->termPostMetaReferenceNames[$key] = $arr[$key];\n } elseif (is_array($value)) {\n $key = key($value);\n $this->termPostMetaReferenceNames[$key] = $value[$key];\n }\n }\n }\n }\n $resolver->resolvePostMetaReferences($this->termPostMetaReferenceNames, 'term');\n }", "function linkblog_save_post( $post_id ) {\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n\t\treturn;\n\n\t// verify data came from the linkblog meta box\n\tif ( !wp_verify_nonce( $_POST['linkblog_noncename'], plugin_basename( __FILE__ ) ) )\n\t\treturn; \n\n\t// Check user permissions\n\tif ( 'post' == $_POST['post_type'] ) {\n\t\tif ( !current_user_can( 'edit_page', $post_id ) )\n\t\t\treturn;\n\t} else {\n\t\tif ( !current_user_can( 'edit_post', $post_id ) )\n\t\t\treturn;\n\t}\n\n\t$linkblog_data = $_POST['linkblog_url'];\n\n\tif ($linkblog_data == \"\") {\n\t\treturn;\n\t} else {\n\t\tupdate_post_meta($post_id, 'linkblog_url', $linkblog_data);\n\t}\n\n}", "function postlink($text){\n\t\t\t\n\t\t$listlink=array();\n\t\t//die('a '.count($listlink));\n\t\t$text1=' '.str_replace('<br/>',' <br/> ',str_replace('<br />',' <br /> ',$text)).' ';\n\t\t//die($text1);\n\t\tif (stristr($text1,' http://www.')){$listlink[]=' http://www.';\t\t}\n\t\tif (stristr($text1,' https://www.')){$listlink[]=' https://www.';\t\t}\n\t\tif (stristr($text1,' www.')){$listlink[]=' www.';\t\t}\n\t\tif (stristr($text1,' http://')){$listlink[]=' http://';\t\t}\n\t\tif (stristr($text1,' ftp://')){$listlink[]=' ftp://';\t\t}\n\t\tif (stristr($text1,' https://')){$listlink[]=' https://';\t\t}\t\n\t\t\n\t\tfor($i=0;$i<count($listlink);$i++){\n\t\t$linkstart=$listlink[$i];\n\t\t\n\t\tif (stristr($text1,$linkstart)){$textlinker=stristr($text1,$linkstart);\t\t} else{$textlinker=\"\";\t}\n\t\t\n\t\t\t$postholder=str_replace($textlinker,'',$text1);\t\n\n\t\t\twhile ($textlinker!=\"\"){\n\t\t\t$picklink=' '.strtok($textlinker,' ');\n\t\t\t//die($picklink);\n\t\t\t$postholder=$postholder.' '.'<a title=\"Visit link\" target=\"_blank\" href=\"'.trim(str_replace('ftp://http://','ftp://',str_replace('https://http://','http://',str_replace('http://http://','http://',str_replace('www.','http://',strtolower($picklink)))))).'\"><span style=\"word-break:break-all\">'.trim($picklink).'</span></a>';\n\t\t\t$textlinker=str_replace($picklink,'',$textlinker);\n\t\t\t//die($textlinker);\n\t\t\tif (stristr($textlinker,$linkstart)){$postholder=$postholder.' '.str_replace(stristr($textlinker,$linkstart),'',$textlinker);\t$textlinker=stristr($textlinker,$linkstart); \t\t} else{$postholder=$postholder.' '.$textlinker;\t$textlinker=\"\";\t}\n\n\t\t\t\t\t}\t\t\n\t\t\t\t\t$text1=$postholder;\n\t\t\t\t}\n\t\t\t\t\treturn($text1);\n\t\t\t}", "function get_edit_post_link($post = 0, $context = 'display')\n {\n }", "public function post_type_link( $post_link, $post ) {\n\t\t$taxonomies = Helper::get_object_taxonomies( $post->post_type, 'objects' );\n\t\t$taxonomies = wp_filter_object_list( $taxonomies, [ 'hierarchical' => true ], 'and', 'name' );\n\n\t\tforeach ( $taxonomies as $taxonomy ) {\n\t\t\t$this->sanitize_post_type_link( $post_link, $post, $taxonomy );\n\t\t}\n\n\t\treturn $post_link;\n\t}", "public function setPostLinkText(String $text)\n {\n $this->pre_link_text = $text;\n $this->generateTitle();\n return $this;\n }", "function post_link_box(){\n add_meta_box( 'post_link_box', 'Link', 'post_link_box_content', 'post', 'normal', 'high');\n }", "function parse($post)\r\n\t{\r\n\t $trimmed = array_map('trim', $post);\r\n\t \t\t\r\n\t // save publish post\r\n $this->brand = mysql_real_escape_string($trimmed['brand']);\r\n\t\t$this->series = mysql_real_escape_string($trimmed['series']);\r\n\t\t$this->module = mysql_real_escape_string($trimmed['module']);\r\n\t\t$this->title = mysql_real_escape_string($trimmed['title']);\r\n\t\t\r\n\t\tif (get_magic_quotes_gpc()) {\r\n\t\t\t$this->description = stripslashes($_POST['contents']);\r\n\t\t} else {\r\n\t\t\t$this->description = $_POST['contents'];\r\n\t\t}\t\t\t\t\r\n\t\t$this->getImage($this->description);\r\n\t\treturn true;\r\n\t}", "function post_permalink($post = 0)\n {\n }", "public static function processPostMeta($meta, $obj) {\n if (is_serialized($meta)) {\n $meta = unserialize($meta);\n }\n // loop through meta array and set properties\n if (is_array($meta)) {\n foreach ($meta as $key => $value) {\n $obj->{str_replace('-', '_', $key)} = is_array($value) ? $value[0] : $value;\n }\n }\n\n }", "function link_souce($text){\n\n if(post::isValidURL($text)){\n $text = '<a href=\"'.$text.'\">'.$text.'</a>';\n } \n return $text;\n }", "function tumblrLinkBacks( $content ) {\n\tglobal $wp_query, $post;\n\t$post_id = get_post( $post->ID );\n\t$posttitle = $post_id->post_title;\n\t$permalink = get_permalink( get_post( $post->ID ) );\n\t$tumblr_keys = get_post_custom_keys( $post->ID );\n\tif( get_post_meta( $wp_query->post->ID, 'TumblrURL', true ) ) {\n\t\tif( $tumblr_keys ) {\n\t\t\tforeach( $tumblr_keys as $tumblr_key ) {\n\t\t\t\tif( $tumblr_key == 'TumblrURL' ) {\n\t\t\t\t\t$tumblr_vals = get_post_custom_values( $tumblr_key );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( $tumblr_vals ) {\n\t\t\t\tif( is_feed() ) {\n\t\t\t\t\t$content .= '<p><a href=\"'.$tumblr_vals[0].'\" title=\"Direct link to featured article\">Direct Link to Article</a> &#8212; ';\n\t\t\t\t\t$content .= '<a href=\"'.$permalink.'\">Permalink</a></p>';\n\t\t\t\t\treturn $content;\n\t\t\t\t} else {\n\t\t\t\t\treturn $content;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$content = $content;\n\t\treturn $content;\n\t}\n}", "function gp_remove_cpt_slug( $post_link, $post, $leavename ) {\n\n if ( 'store' != $post->post_type || 'publish' != $post->post_status ) {\n return $post_link;\n }\n\n $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );\n\n return $post_link;\n}", "function _get_page_link($post = \\false, $leavename = \\false, $sample = \\false)\n {\n }", "function get_post_type_archive_feed_link($post_type, $feed = '')\n {\n }", "function get_rebrandly_url( $post_id ) {\n $_post_id = ( $post_id ) ? $post_id : get_permalink( $post->ID );\n $_short_url = get_post_meta( $_post_id, '_rebrandly_link_url', true );\n\n return $_short_url;\n}", "public function feed_link() {\n\t\t$post_title = self::feed_title();\n\t\t$feed_link = LivePress_Updater::instance()->get_current_post_feed_link();\n\n\t\tif ( count( $feed_link ) > 0 ) {\n\t\t\t$tag = '<link rel=\"alternate\" type=\"' . esc_attr( feed_content_type( 'rss2' ) ) . '\" ';\n\t\t\t$tag .= 'title=\"' . esc_attr( get_bloginfo( 'name' ) ) . ' &raquo; ' . esc_attr( $post_title ) . '\" ';\n\t\t\t$tag .= 'href=\"' . esc_url( $feed_link[0] ) . '\" />' . \"\\n\";\n\t\t\techo $tag;\n\t\t}\n\t}", "function populate_single_post($db, $feed_id, $post)\n\t{\n\t\t$post\t\t\t= data_manipulator::create_post_from_rss($post);\n\t\tif(!$post)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t$post['feed_id']\t= $feed_id;\n\n\t\t$post_select_stmt\t= db_utilities::create_select_single($db, 'posts', 'title_url_hash', 'post_url');\n\t\t$post_select_stmt->execute(array($post['post_url']));\n\t\t$post_hash_array\t= $post_select_stmt->fetch();\n\n\t\tif(!empty($post_hash_array))\n\t\t{\n\t\t\t$stored_post_hash\t= $post_hash_array['title_url_hash'];\n\t\t\tif($stored_post_hash !== $post['title_url_hash'])\n\t\t\t{\n\t\t\t\t$truncated_post\t\t= array(\n\t\t\t\t\t\t\t\t'post_title'\t\t=> $post['post_title'],\n\t\t\t\t\t\t\t\t'post_desc'\t\t=> $post['post_desc'],\n\t\t\t\t\t\t\t\t'post_date'\t\t=> $post['post_date'],\n\t\t\t\t\t\t\t\t'title_url_hash'\t=> $post['title_url_hash'],\n\t\t\t\t\t\t\t\t'feed_id'\t\t=> $post['feed_id']\n\t\t\t\t\t\t\t );\n\n\t\t\t\t$post_update_stmt\t\t= db_utilities::create_update($db, 'posts', $truncated_post, 'post_url');\n\t\t\t\t$truncated_post['post_url']\t= $post['post_url'];\n\n\t\t\t\t$post_update_stmt->execute(array_values($truncated_post));\n\t\t\t\techo 'Modified post, updated: ', $post['post_url'], \"\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 'Duplicate post, ignored: ', $post['post_url'], \"\\n\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$post_insert_stmt\t= db_utilities::create_insert_ignore($db, 'posts', $post);\n\t\t\t$post_insert_stmt->execute(array_values($post));\n\t\t\techo 'New post, added: ', $post['post_url'], \"\\n\";\n\t\t}\n\t}", "public function setLink($link);", "function show_metabox_post_source($post) {\r\n\t\t$post_via = get_post_meta($post->ID, 'post_via', true);\r\n\t\t$post_fuente = get_post_meta($post->ID, 'post_fuente', true);\r\n\t\t$link_fuente = get_post_meta($post->ID, 'link_fuente', true);\r\n\t\t$link_via = get_post_meta($post->ID, 'link_via', true);\r\n\t\twp_nonce_field(__FILE__, 'via-meta-nonce');\r\n\t\twp_nonce_field(__FILE__, 'fuente-meta-nonce');\r\n\t\techo <<< HTML\r\n\r\n\t\t\t<label for=\"post_via\">Via</label>\r\n\t\t\t<input type=\"text\" name=\"post_via\" value=\"$post_via\" class=\"widefat\">\r\n\t\t\t<p class=\"howto\" style=\"font-size:11px; margin: 0.2em 0 1.5em 0;\">Articulo posteado via:</p>\r\n\r\n\t\t\t<label for=\"link_via\">Link via</label>\r\n\t\t\t<input type=\"text\" name=\"link_via\" value=\"$link_via\" class=\"widefat\">\r\n\t\t\t<p class=\"howto\" style=\"font-size:11px; margin: 0.2em 0 1.5em 0;\">Link via del articulo</p>\r\n\r\n\t\t\t<label for=\"post_fuente\">Fuente del articulo</label>\r\n\t\t\t<input type=\"text\" name=\"post_fuente\" value=\"$post_fuente\" class=\"widefat\">\r\n\t\t\t<p class=\"howto\" style=\"font-size:11px; margin: 0.2em 0 1.5em 0;\">Fuente original del articulo</p>\r\n\r\n\t\t\t<label for=\"link_fuente\">Link de la fuente</label>\r\n\t\t\t<input type=\"text\" name=\"link_fuente\" value=\"$link_fuente\" class=\"widefat\">\r\n\t\t\t<p class=\"howto\" style=\"font-size:11px; margin: 0.2em 0 1.5em 0;\">Link de la fuente del articulo</p>\r\nHTML;\r\n\t}", "function url_save($post_ID) {\n global $post;\n\n if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) {\n return $post_id;\n }\n \n if (isset($_POST)) {\n update_post_meta( $post_ID, '_url_name', strip_tags( $_POST['url_name'] ) );\n }\n}", "function link_advanced_meta_box($link)\n {\n }", "function boom_post_meta() {\n\tif ( get_post_type() == 'post' ) {\n\t\techo sprintf(\n\t\t\t__( 'Posted %s in %s%s by %s. ', 'boom' ),\n\t\t\tget_the_time( get_option( 'date_format' ) ),\n\t\t\tget_the_category_list( ', ' ),\n\t\t\tget_the_tag_list( __( ', <b>Tags</b>: ', 'boom' ), ', ' ),\n\t\t\tget_the_author_link()\n\t\t);\n\t}\n\tedit_post_link( __( ' (edit)', 'boom' ), '<span class=\"edit-link\">', '</span>' );\n}", "public function onMetaParsed(&$meta)\n {\n $meta['tags'] = PicoTags::parseTags($meta['tags']);\n $meta['filter'] = PicoTags::parseTags($meta['filter']);\n }", "function addTitleHref($postContent, $slug) {\n $firstLinePattern = '/^# (.*)(\\r\\n|\\r|\\n)$/m';\n $replacement = '# [${1}]('. $slug . ')${2}'; // # [title](slug)NEW_LINE\n return preg_replace($firstLinePattern, $replacement, $postContent);\n }", "function _wswwpx_page_get_custom_linktitle ( $page = 0 ) {\n\tglobal $wpdb;\n\t// Make sure there is a page ID to process\n\tif ( $page > 0 ) {\n\t\t$result = $wpdb->get_var(\"\n\t\t\t\t\t\t\t\t\tSELECT meta_value\n\t\t\t\t\t\t\t\t\t\tFROM $wpdb->postmeta\n\t\t\t\t\t\t\t\t\t\tWHERE post_id = $page AND meta_key = 'wswpg_linkttl'\");\n\t} else {\n\t\t// ... or set a zero result.\n\t\t$result = false;\n\t}\n\t//\n\treturn $result;\n}", "function update_post_meta($post_id, $meta_key, $meta_value, $prev_value = '')\n {\n }", "function get_page_link($post = \\false, $leavename = \\false, $sample = \\false)\n {\n }", "public function render_meta_box_content( $post ) {\n // Add an nonce field so we can check for it later.\n wp_nonce_field( 'sbrb_inner_custom_box', 'sbrb_inner_custom_box_nonce' );\n\n if ( false == check_rebrandly_account() ) {\n echo '<p>' . sprintf( __( 'Enter your Rebrandly API Key on the <a href=\"%s\" target=\"_blank\">settings</a> page.', 'stratabeat_rebrandly_urls' ), 'options-general.php?page=sbrb-url-shortener' ) . '</p>';\n } else {\n // Use get_post_meta to retrieve an existing value from the database.\n $_custom_link_slug = get_post_meta( $post->ID, '_rebrandly_link_slug', true );\n \n // $value_link_slug = ($_custom_link_slug) ? $_custom_link_slug : $post->post_name;\n $value_link_slug = get_post_meta( $post->ID, '_rebrandly_link_slug', true );\n $value_link_id = get_post_meta( $post->ID, '_rebrandly_link_id', true );\n $value_link_url = get_post_meta( $post->ID, '_rebrandly_link_url', true );\n\n // Display the form, using the current value.\n if( $value_link_id ) : ?>\n <label for=\"sbrb_rebrandly_slug\"><?php echo substr( $value_link_url, 0, stripos( $value_link_url, '/' ) ) . '/'; ?></label><input type=\"text\" id=\"sbrb_rebrandly_slug\" name=\"sbrb_rebrandly_slug\" value=\"<?php echo esc_attr( $value_link_slug ); ?>\" />\n <?php else : ?>\n <p><?php echo __('Publish or Update the post to create a new Rebrandly short link.', 'stratabeat_rebrandly_urls'); ?></p>\n <input type=\"hidden\" id=\"sbrb_rebrandly_slug\" name=\"sbrb_rebrandly_slug\" value=\"<?php echo esc_attr( $value_link_slug ); ?>\" />\n <?php endif; ?>\n <input type=\"hidden\" id=\"sbrb_rebrandly_url\" name=\"sbrb_rebrandly_url\" value=\"<?php echo esc_attr( $value_link_url ); ?>\" />\n <input type=\"hidden\" id=\"sbrb_rebrandly_id\" name=\"sbrb_rebrandly_id\" value=\"<?php echo esc_attr( $value_link_id ); ?>\" />\n <?php \n }\n }", "function fcc_norad_podcast_single_post_content( $content ) {\n\tif ( is_singular( 'podcasts' ) && ! is_admin() ) {\n\t\t$id = $GLOBALS['post']->ID;\n\t\t$content = '';\n\n\t\t# POST META\n\t\t$segment_1_title = get_post_meta( $id, 'segment_1_title', true );\n\t\t$segment_2_title = get_post_meta( $id, 'segment_2_title', true );\n\t\t$segment_3_title = get_post_meta( $id, 'segment_3_title', true );\n\n\t\t$segment_1_description = get_post_meta( $id, 'segment_1_description', true );\n\t\t$segment_2_description = get_post_meta( $id, 'segment_2_description', true );\n\t\t$segment_3_description = get_post_meta( $id, 'segment_3_description', true );\n\n\t\t$segment_1_link = get_post_meta( $id, 'segment_1_link', true );\n\t\t$segment_2_link = get_post_meta( $id, 'segment_2_link', true );\n\t\t$segment_3_link = get_post_meta( $id, 'segment_3_link', true );\n\n\t\t# Segment 1\n\t\tif ( $segment_1_link ) {\n\t\t\t$segment_1_title_link .= '<a href=\"' .\t$segment_1_link . '\" target=\"_blank\">' . $segment_1_title . '</a> &ndash; ';\n\t\t} else {\n\t\t\t$segment_1_title_link = '';\n\t\t}\n\n\t\t# Segment 2\n\t\tif ( $segment_2_link ) {\n\t\t\t$segment_2_title_link .= '<a href=\"' .\t$segment_2_link . '\" target=\"_blank\">' . $segment_2_title . '</a> &ndash; ';\n\t\t} else {\n\t\t\t$segment_2_title_link = '';\n\t\t}\n\n\t\t# Segment 3\n\t\tif ( $segment_3_link ) {\n\t\t\t$segment_3_title_link .= '<a href=\"' .\t$segment_3_link . '\" target=\"_blank\">' . $segment_3_title . '</a> &ndash; ';\n\t\t} else {\n\t\t\t$segment_3_title_link = '';\n\t\t}\n\n\t\t# The Content *****/\n\t\t$content .= '<ul>';\n\t\t$content .= '<li>' . $segment_1_title_link . $segment_1_description . '</li>';\n\t\t$content .= '<li>' . $segment_2_title_link . $segment_2_description . '</li>';\n\t\t$content .= '<li>' . $segment_3_title_link . $segment_3_description . '</li>';\n\t\t$content .= '</ul>';\n\t}\n\treturn $content;\n}", "public function importPostMeta() {\n\t\t$postsPerAction = 100;\n\t\t$publicPostTypes = implode( \"', '\", aioseo()->helpers->getPublicPostTypes( true ) );\n\t\t$timeStarted = gmdate( 'Y-m-d H:i:s', aioseo()->transients->get( 'import_post_meta_yoast_seo' ) );\n\n\t\t$posts = aioseo()->db\n\t\t\t->start( 'posts' . ' as p' )\n\t\t\t->select( 'p.ID, p.post_type' )\n\t\t\t->join( 'postmeta as pm', '`p`.`ID` = `pm`.`post_id`' )\n\t\t\t->leftJoin( 'aioseo_posts as ap', '`p`.`ID` = `ap`.`post_id`' )\n\t\t\t->whereRaw( \"pm.meta_key LIKE '_yoast_wpseo_%'\" )\n\t\t\t->whereRaw( \"( p.post_type IN ( '$publicPostTypes' ) )\" )\n\t\t\t->whereRaw( \"( ap.post_id IS NULL OR ap.updated < '$timeStarted' )\" )\n\t\t\t->orderBy( 'p.ID DESC' )\n\t\t\t->limit( $postsPerAction )\n\t\t\t->run()\n\t\t\t->result();\n\n\t\tif ( ! $posts || ! count( $posts ) ) {\n\t\t\taioseo()->transients->delete( 'import_post_meta_yoast_seo' );\n\t\t\treturn;\n\t\t}\n\n\t\t$mappedMeta = [\n\t\t\t'_yoast_wpseo_title' => 'title',\n\t\t\t'_yoast_wpseo_metadesc' => 'description',\n\t\t\t'_yoast_wpseo_canonical' => 'canonical_url',\n\t\t\t'_yoast_wpseo_meta-robots-noindex' => 'robots_noindex',\n\t\t\t'_yoast_wpseo_meta-robots-nofollow' => 'robots_nofollow',\n\t\t\t'_yoast_wpseo_meta-robots-adv' => '',\n\t\t\t'_yoast_wpseo_focuskw' => '',\n\t\t\t'_yoast_wpseo_focuskeywords' => '',\n\t\t\t'_yoast_wpseo_opengraph-title' => 'og_title',\n\t\t\t'_yoast_wpseo_opengraph-description' => 'og_description',\n\t\t\t'_yoast_wpseo_opengraph-image' => 'og_image_custom_url',\n\t\t\t'_yoast_wpseo_twitter-title' => 'twitter_title',\n\t\t\t'_yoast_wpseo_twitter-description' => 'twitter_description',\n\t\t\t'_yoast_wpseo_twitter-image' => 'twitter_image_custom_url',\n\t\t\t'_yoast_wpseo_schema_page_type' => '',\n\t\t\t'_yoast_wpseo_schema_article_type' => ''\n\t\t];\n\n\t\tforeach ( $posts as $post ) {\n\t\t\t$postMeta = aioseo()->db\n\t\t\t\t->start( 'postmeta' . ' as pm' )\n\t\t\t\t->select( 'pm.meta_key, pm.meta_value' )\n\t\t\t\t->where( 'pm.post_id', $post->ID )\n\t\t\t\t->whereRaw( \"`pm`.`meta_key` LIKE '_yoast_wpseo_%'\" )\n\t\t\t\t->run()\n\t\t\t\t->result();\n\n\t\t\tif ( ! $postMeta || ! count( $postMeta ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$meta = [\n\t\t\t\t'post_id' => (int) $post->ID,\n\t\t\t];\n\n\t\t\tforeach ( $postMeta as $record ) {\n\t\t\t\t$name = $record->meta_key;\n\t\t\t\t$value = $record->meta_value;\n\n\t\t\t\tif ( ! in_array( $name, array_keys( $mappedMeta ), true ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tswitch ( $name ) {\n\t\t\t\t\tcase '_yoast_wpseo_meta-robots-noindex':\n\t\t\t\t\tcase '_yoast_wpseo_meta-robots-nofollow':\n\t\t\t\t\t\tif ( (bool) $value ) {\n\t\t\t\t\t\t\t$meta[ $mappedMeta[ $name ] ] = ! empty( $value );\n\t\t\t\t\t\t\t$meta['robots_default'] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '_yoast_wpseo_meta-robots-adv':\n\t\t\t\t\t\t$values = explode( ',', $value );\n\t\t\t\t\t\tif ( $values ) {\n\t\t\t\t\t\t\tforeach ( $values as $value ) {\n\t\t\t\t\t\t\t\t$meta[ \"robots_$value\" ] = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '_yoast_wpseo_canonical':\n\t\t\t\t\t\t$meta[ $mappedMeta[ $name ] ] = esc_url( $value );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '_yoast_wpseo_opengraph-image':\n\t\t\t\t\t\t$meta['og_image_type'] = 'custom_image';\n\t\t\t\t\t\t$meta[ $mappedMeta[ $name ] ] = esc_url( $value );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '_yoast_wpseo_twitter-image':\n\t\t\t\t\t\t$meta['twitter_use_og'] = false;\n\t\t\t\t\t\t$meta['twitter_image_type'] = 'custom_image';\n\t\t\t\t\t\t$meta[ $mappedMeta[ $name ] ] = esc_url( $value );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '_yoast_wpseo_schema_page_type':\n\t\t\t\t\t\t$value = aioseo()->helpers->pregReplace( '#\\s#', '', $value );\n\t\t\t\t\t\tif ( in_array( $post->post_type, [ 'post', 'page', 'attachment' ], true ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( in_array( $value, ImportExport\\SearchAppearance::$supportedWebPageGraphs, true ) ) {\n\t\t\t\t\t\t\t$meta[ $mappedMeta[ $name ] ] = 'WebPage';\n\t\t\t\t\t\t\t$options = new \\stdClass();\n\t\t\t\t\t\t\t$options->webPage = [ 'webPageType' => $value ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$meta['schema_type_options'] = wp_json_encode( $options );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '_yoast_wpseo_schema_article_type':\n\t\t\t\t\t\t$value = aioseo()->helpers->pregReplace( '#\\s#', '', $value );\n\t\t\t\t\t\tif ( 'none' === lcfirst( $value ) ) {\n\t\t\t\t\t\t\t$meta[ $mappedMeta[ $name ] ] = 'None';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( in_array( $post->post_type, [ 'page', 'attachment' ], true ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$options = new \\stdClass();\n\t\t\t\t\t\tif ( isset( $meta['schema_type_options'] ) ) {\n\t\t\t\t\t\t\t$options = json_decode( $meta['schema_type_options'] );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$options->article = [ 'articleType' => 'Article' ];\n\t\t\t\t\t\tif ( in_array( $value, ImportExport\\SearchAppearance::$supportedArticleGraphs, true ) ) {\n\t\t\t\t\t\t\t$options->article = [ 'articleType' => $value ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$options->article = [ 'articleType' => 'BlogPosting' ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$meta['schema_type'] = 'Article';\n\t\t\t\t\t\t$meta['schema_type_options'] = wp_json_encode( $options );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '_yoast_wpseo_focuskw':\n\t\t\t\t\t\t$keyphrase = [\n\t\t\t\t\t\t\t'focus' => [ 'keyphrase' => aioseo()->helpers->sanitizeOption( $value ) ],\n\t\t\t\t\t\t\t'additional' => []\n\t\t\t\t\t\t];\n\t\t\t\t\t\t$meta['keyphrases'] = wp_json_encode( $keyphrase );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '_yoast_wpseo_focuskeywords':\n\t\t\t\t\t\t$keyphrases = [];\n\t\t\t\t\t\tif ( ! empty( $meta[ $mappedMeta[ $name ] ] ) ) {\n\t\t\t\t\t\t\t$keyphrases = (array) json_decode( $meta[ $mappedMeta[ $name ] ] );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$yoastKeyphrases = json_decode( $value );\n\t\t\t\t\t\tfor ( $i = 0; $i < count( $yoastKeyphrases ); $i++ ) {\n\t\t\t\t\t\t\t$keyphrase = [ 'keyphrase' => aioseo()->helpers->sanitizeOption( $yoastKeyphrases[ $i ]->keyword ) ];\n\t\t\t\t\t\t\t$keyphrases['additional'][ $i ] = $keyphrase;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( ! empty( $keyphrases ) ) {\n\t\t\t\t\t\t\t$meta['keyphrases'] = wp_json_encode( $keyphrases );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '_yoast_wpseo_title':\n\t\t\t\t\tcase '_yoast_wpseo_metadesc':\n\t\t\t\t\tcase '_yoast_wpseo_opengraph-title':\n\t\t\t\t\tcase '_yoast_wpseo_opengraph-description':\n\t\t\t\t\t\tif ( 'page' === $post->post_type ) {\n\t\t\t\t\t\t\t$value = aioseo()->helpers->pregReplace( '#%%primary_category%%#', '', $value );\n\t\t\t\t\t\t\t$value = aioseo()->helpers->pregReplace( '#%%excerpt%%#', '', $value );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$value = aioseo()->importExport->yoastSeo->helpers->macrosToSmartTags( $value, 'post', $post->post_type );\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$meta[ $mappedMeta[ $name ] ] = esc_html( wp_strip_all_tags( strval( $value ) ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$aioseoPost = Models\\Post::getPost( (int) $post->ID );\n\t\t\t$aioseoPost->set( $meta );\n\t\t\t$aioseoPost->save();\n\t\t}\n\n\t\tif ( count( $posts ) === $postsPerAction ) {\n\t\t\ttry {\n\t\t\t\tas_schedule_single_action( time() + 5, aioseo()->importExport->yoastSeo->postActionName, [], 'aioseo' );\n\t\t\t} catch ( \\Exception $e ) {\n\t\t\t\t// Do nothing.\n\t\t\t}\n\t\t} else {\n\t\t\taioseo()->transients->delete( 'import_post_meta_yoast_seo' );\n\t\t}\n\t}", "function asp_custom_link_meta_results( $results, $id ) {\n //$key = 'profile_type';\n\n // Parse through each result item\n if ($id == '1') {\n\t // Parse through each result item\n\t $new_url = '';\n\t $full_name = '';\n\t $new_desc = '';\n\t foreach ($results as $k=>$v) {\n\t\t if (($v->content_type == \"pagepost\") && (get_post_type($v->id) == \"physicians\")) {\n\t\t \t\t// $new_url = '/directory/physician/' . get_post_field( 'post_name', $v->id ) .'/';\n\t\t \t\t$full_name = rwmb_meta('physician_first_name', '', $v->id) .' ' .(rwmb_meta('physician_middle_name', '', $v->id) ? rwmb_meta('physician_middle_name', '', $v->id) . ' ' : '') . rwmb_meta('physician_last_name', '', $v->id) . (rwmb_meta('physician_degree', '', $v->id) ? ', ' . rwmb_meta('physician_degree', '', $v->id) : '');\n\t\t \t\t$new_desc = rwmb_meta('physician_short_clinical_bio', '', $v->id );\n\t\t }\n\t\t // Change only, if the meta is specified\n\t\t // if ( !empty($new_url) )\n\t // \t\t$results[$k]->link = $new_url;\n\t if ( !empty($full_name) )\n \t\t\t$results[$k]->title = $full_name;\n\t\t if ( !empty($new_desc) )\n\t \t\t$results[$k]->content = $new_desc;\n\n\t //$new_url = ''; //Reset\n\t $full_name = ''; //Reset\n\t $new_desc = ''; //Reset\n\t }\n\t return $results;\n\t}\n}", "function netrics_get_feed_url( $post_id ) {\n $url = get_post_meta( $post_id, 'nn_pub_rss', true ); // RSS file\n\n if ( wp_http_validate_url( $url ) ) {\n return $url;\n } else {\n return new WP_Error( 'url_invalid', __( \"URL does not validate.\" ) );\n }\n}", "function post_comments_feed_link($link_text = '', $post_id = '', $feed = '')\n {\n }", "function link_submit_meta_box($link)\n {\n }", "function absolvution_post_meta() {\n if ( get_post_type() == 'post' ) {\n echo sprintf(\n __( '<div class=\"meta-container date-posted\">Posted %s </div><div class=\"meta-container cat\"><span class=\"sep cat\"></span> %s </div><div class=\"meta-container tag \"><span class=\"sep tag\"></span> %s </div>', 'absolvution' ),\n get_the_time( get_option( 'date_format' ) ),\n get_the_category_list( ', ' ),\n get_the_tag_list( __( '', 'absolvution' ), ', ' )\n );\n }\n edit_post_link( __( ' (edit)', 'absolvution' ), '<span class=\"edit-link\">', '</span>' );\n}", "function wpse_remove_edit_post_link( $link ) {\nreturn '';\n}", "function get_sample_permalink_html($post, $new_title = \\null, $new_slug = \\null)\n {\n }", "public function shorten($link, $customUrl = false);", "function create_rebrandly_link( $_link_slug, $post_id ) {\n $options = get_option('sbrb_settings');\n $permalink = get_permalink($post_id);\n $title = get_the_title($post_id);\n\n $url = 'https://api.rebrandly.com/v1/links';\n\n $result = wp_remote_post(\n $url, \n array(\n 'body' => json_encode(array(\n 'title' => html_entity_decode($title, ENT_COMPAT, 'UTF-8'),\n 'slashtag' => $_link_slug,\n 'destination' => esc_url_raw($permalink),\n 'domain' => get_branded_domain_id_option()\n )),\n 'headers' => array(\n 'apikey' => $options['sbrb_api_key'],\n 'Content-Type' => 'application/json'\n )\n )\n );\n\n if ( is_wp_error($result) ) {\n var_dump( $result->get_error_message() ); die;\n } else {\n return json_decode($result['body']);\n }\n }", "public function filter_post_link( $permalink, $post ) {\n\t\t// Abort early if we aren't on the right CPT\n\t\tif ( 'ctrs-projects' !== $post->post_type )\n\t\t\treturn $permalink;\n\n\t\t// Abort early if the placeholder rewrite tag isn't in the generated URL\n\t\tif ( false === strpos( $permalink, $this->rewrite_tag ) )\n\t\t\treturn $permalink;\n\n\t\t// Get the custom taxonomy terms in use by this post\n\t\t$terms = get_the_terms( $post->ID, $this->tax_name );\n\t\tif ( $terms && ! is_wp_error( $terms ) ) {\n\t\t\t$terms = array_pop( $terms );\n\t\t}\n\n\t\t// If no terms are assigned to this post, use the taxonomy slug instead (can't leave the placeholder there)\n\t\tif ( ! $terms && empty( $terms ) ) {\n\t\t\t$permalink = str_replace( $this->rewrite_tag, $this->tax_name, $permalink );\n\t\t}\n\n\t\t// Replace the placeholder rewrite tag with the first term's slug\n\t\telse {\n\t\t\t$permalink = str_replace( $this->rewrite_tag, $terms->slug, $permalink );\n\t\t}\n\n\t\treturn $permalink;\n\t}", "private function getFormattedTextFromPost(\\stdClass $socialPost)\n {\n $text = $socialPost->message;\n // Add href for links prefixed with ***:// (*** is most likely to be http(s) or ftp\n $text = preg_replace(\"#(^|[\\n ])([\\w]+?://[\\w]+[^ \\\"\\n\\r\\t< ]*)#\", '\\\\1<a href=\"\\\\2\" target=\"_blank\">\\\\2</a>', $text);\n // Add href for links starting with www or ftp\n $text = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[^ \\\"\\t\\n\\r< ]*)#\", '\\\\1<a href=\"http://\\\\2\" target=\"_blank\">\\\\2</a>', $text);\n // Add link to hashtags\n $text = preg_replace(\"/#(\\w+)/\", '<a href=\"https://www.facebook.com/hashtag/\\\\1\" target=\"_blank\">#\\\\1</a>', $text);\n\n return $text;\n }", "function get_post_permalink($post = 0, $leavename = \\false, $sample = \\false)\n {\n }", "public function post_link($post) {\n\n if ($this->template->is_ajax()) {\n\n $post['post_to_groups'] = array($this->profile->id);\n\n $post['title'] = 'from '.get_instance()->config->config['OCU_site_name'];\n\n $this->bitly_load();\n\n\n\n // add http://\n\n if (!empty($post['url']) && !preg_match(\"~^(?:f|ht)tps?://~i\", $post['url'])) {\n\n $post['url'] = \"http://\" . $post['url'];\n\n }\n\n\n\n $post['timezone'] = User_timezone::get_user_timezone($this->c_user->id);\n\n $errors = Social_post::validate_post($post);\n\n\n\n if (empty($errors)) {\n\n\n\n try {\n\n if (!isset($post['post_id'])) {\n\n\n\n if (!empty($post['url'])) {\n\n\n\n if ($this->bitly) {\n\n $bitly_data = $this->bitly->shorten($post['url']);\n\n if (strlen($bitly_data['url']) < strlen($post['url'])) {\n\n $post['url'] = $bitly_data['url'];\n\n //ddd($post['url']);\n\n }\n\n\n\n }\n\n }\n\n\n\n }\n\n\n\n $this->load->library('Socializer/socializer');\n\n Social_post::add_new_post($post, $this->c_user->id, $this->profile->id);\n\n\n\n $result['success'] = true;\n\n $result['message'] = lang('post_was_successfully_added');\n\n } catch(Exception $e) {\n\n $result['success'] = false;\n\n $result['errors']['post_to_groups[]'] = '<span class=\"message-error\">' . $e->getMessage() . '</span>';\n\n }\n\n\n\n } else {\n\n $result['success'] = false;\n\n $result['errors'] = $errors;\n\n }\n\n echo json_encode($result);\n\n }\n\n exit();\n\n }", "function cmp_get_link( $data ) {\n\t\t// Get plugin object\n\t\tglobal $cmp_plugin;\n\t\t// Post link\n\t\tif ( strpos( $data, ':' ) === false && is_numeric( $data ) ) {\n\t\t\t$link = '<a href=\"' . get_permalink( $data ) . '\" data-type=\"person\" data-id=\"' . $data . '\" data-tax=\"\">' . get_the_title( $data ) . '</a>';\n\t\t}\n\t\t// Term link\n\t\telseif ( is_numeric( strpos( $data, ':' ) ) ) {\n\t\t\t$data = explode( ':', $data );\n\t\t\t$term = get_term_by( 'slug', $data[1], $data[0] );\n\t\t\t$link = '<a href=\"' . get_term_link( $term ) . '\" data-type=\"term\" data-id=\"' . $data[1] . '\" data-tax=\"' . $data[0] . '\">' . $term->name . '</a>';\n\t\t}\n\t\t// Not selected label\n\t\telse\n\t\t\t$link = '<strong>' . __( 'Not selected', $cmp_plugin->textdomain ) . '</strong>';\n\t\t// Return link\n\t\treturn $link;\n\t}", "public function parse() {\n $this->getAllPostsLinks();\n for($i = 0; $i < count($this->posts);$i++){\n $this->posts[$i]= array_merge($this->posts[$i], $this->getPostFromLink($this->posts[$i]['postLink']));\n }\n $this->save();\n \n return count($this->posts);\n }", "function meta_html($post)\n {\n $view = new Xby2BaseView(get_post_meta($post->ID));\n $view->addInput('text', 'link-label', 'Label: ', 'label', 'regular-text');\n $view->addInput('text', 'link-link', 'Link: ', 'link', 'large-text');\n $view->addInput('text', 'link-priority', 'Priority: ', 'priority', 'regular-text');\n $view->displayForm();\n }", "public function save_meta($post_id, $post) {\r\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\r\n return;\r\n }\r\n\r\n\r\n // bomb out if the nonce didn't check out\r\n if (! (isset($_POST[self::NONCE_KEY]) && wp_verify_nonce($_POST[self::NONCE_KEY], plugin_basename(__FILE__)) ) ) {\r\n return $post_id;\r\n }\r\n\r\n // check roles/acls\r\n $post_type = get_post_type_object($post->post_type);\r\n if (!current_user_can($post_type->cap->edit_post, $post_id)) {\r\n return $post_id;\r\n }\r\n\r\n // add/update/delete meta\r\n if (isset($_POST[self::URL_META_KEY])) {\r\n $new_url_meta = esc_url_raw($_POST[self::URL_META_KEY]);\r\n $old_meta_value = get_post_meta( $post_id, self::URL_META_KEY, true );\r\n\r\n if ($old_meta_value && strlen($new_url_meta) == 0) {\r\n delete_post_meta($post_id, self::URL_META_KEY);\r\n }\r\n\r\n if ($new_url_meta && strlen($old_meta_value) == 0) {\r\n add_post_meta( $post_id, self::URL_META_KEY, $new_url_meta, true);\r\n }\r\n\r\n if (strlen($new_url_meta) > 0 && strlen($old_meta_value) > 0) {\r\n update_post_meta($post_id, self::URL_META_KEY, $new_url_meta);\r\n }\r\n\r\n }\r\n\r\n }", "public function getUrlEditPost(){\n\t\t\n\t\t$this->validateInited();\n\t\t\n\t\t$urlEdit = get_edit_post_link($this->id);\n\t\t\n\t\treturn($urlEdit);\n\t}" ]
[ "0.6268358", "0.6097411", "0.6038907", "0.5986823", "0.5971848", "0.594337", "0.5766461", "0.56988454", "0.56795526", "0.5647017", "0.5624851", "0.56118274", "0.558848", "0.5580265", "0.5579303", "0.55580777", "0.55434215", "0.5534763", "0.5532499", "0.5532499", "0.55057865", "0.5497382", "0.5473147", "0.546546", "0.5459599", "0.54583114", "0.54565996", "0.54448104", "0.5441287", "0.5416332", "0.53960973", "0.53800625", "0.53724563", "0.537156", "0.5359859", "0.5350026", "0.5336804", "0.53245026", "0.5284992", "0.52791935", "0.5275714", "0.5244902", "0.52435255", "0.5231126", "0.5228439", "0.5222132", "0.5219405", "0.5214044", "0.5205426", "0.5187897", "0.51798093", "0.51763934", "0.5173076", "0.5166175", "0.5153284", "0.5141585", "0.5141215", "0.5133197", "0.5129125", "0.51233035", "0.5113115", "0.50941926", "0.5091502", "0.5088216", "0.5082014", "0.50663894", "0.50643", "0.506401", "0.5060985", "0.5058517", "0.50567293", "0.5042846", "0.5039634", "0.50391597", "0.50367343", "0.50363463", "0.50308335", "0.50271124", "0.50164163", "0.5014634", "0.50101495", "0.50062203", "0.5002418", "0.49962133", "0.49953613", "0.4993788", "0.49924594", "0.49917567", "0.49899086", "0.4983961", "0.49814886", "0.49806073", "0.49792203", "0.49700955", "0.49660173", "0.49659047", "0.49610505", "0.49556106", "0.49535683", "0.49454972" ]
0.6233703
1
WD Modifications: Featured image slider is no longer full screen. More banner like, 300 pixels tall in desktop version. Use H3 in widgets instead of H1 for better SEO results JavaScript file added for more options Green changed to blue Removed "Powered By WordPress" from footer etc.
function remove_business_starter_widgets(){ unregister_sidebar( 'sidebar-1' ); unregister_sidebar( 'sidebar-2' ); unregister_sidebar( 'sidebar-3' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ThemeistsLogoShowcase()\n\t\t\t{\n\t\t\n\t\t\t\t//load_plugin_textdomain( self::locale, false, plugin_dir_path( dirname( dirname( __FILE__ ) ) ) . '/lang/' );\n\n\t\t\n\t\t\t\t$widget_opts = array (\n\n\t\t\t\t\t'classname' => 'ThemeistsLogoShowcase', \n\t\t\t\t\t'description' => __( 'A simple widget to showcase your client\\'s logos', self::locale )\n\n\t\t\t\t);\n\n\t\t\t\t$control_options = array(\n\n\t\t\t\t\t'width' => '400'\n\n\t\t\t\t);\n\n\t\t\t\t//Register the widget\n\t\t\t\t$this->WP_Widget( self::slug, __( self::name, self::locale ), $widget_opts, $control_options );\n\t\t\n\t\t \t// Load JavaScript and stylesheets\n\t\t \t$this->register_scripts_and_styles();\n\t\t\n\t\t\t}", "function portfolio_hl_setup() {\n add_theme_support('title-tag');\n\n\n\n\n /*\n * menu par default wordpress\n */\n register_nav_menus( array(\n 'primary' => esc_html__('Primary','portfolio_hl'),\n ));\n\n\n /*\n * Switch default core markup for search form, comment form, and comments\n * to output valid HTML5.\n */\n add_theme_support( 'html5', array(\n 'search-form',\n 'comment-form',\n 'comment-list',\n 'gallery',\n 'caption',\n ) );\n\n /*\n * Enable support for Post Thumbnails on posts and pages.\n *\n * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/\n */\n add_theme_support( 'post-thumbnails' );\n add_image_size( 'portfolio_hl-home-small', 200);\n add_image_size( 'portfolio_hl-home-large', 280, 280, true );\n add_image_size( 'portfolio_hl-blog-image', 690 );\n add_image_size( 'portfolio_hl-blog-thumb', 470);\n add_image_size( 'portfolio_hl-blog-header', 1920);\n\n /*\n * custum background wordpress function\n */\n add_theme_support('custum-background', apply_filters('portfolio_hl_custum_bakground_arg', array(\n 'default-color' =>'ffffff',\n 'default-image' => '',\n )));\n\n\n\n\n\n /**\n * Register widget area.\n *\n * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar\n */\nfunction portfolio_hl_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => esc_html__( 'Sidebar', 'portfolio_hl' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => esc_html__( 'Add widgets here.', 'portfolio_hl' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\n\n\n}\nadd_action( 'widgets_init', 'portfolio_hl_widgets_init' );\n /*\n * logo custum\n */\n add_theme_support('custom-logo',array(\n 'height' => 55,\n 'width' => 200,\n 'flex-height' => true,\n ));\n\n }", "function swank_homepage_widgets() {\r\n\r\n\tgenesis_widget_area( 'home-slider', array(\r\n\t\t'before' => '<div class=\"home-slider widget-area\"><div class=\"wrap\">',\r\n\t\t'after' => '</div></div>',\r\n\t) );\r\n\r\n\tgenesis_widget_area( 'under-home-slider', array(\r\n\t\t'before' => '<div class=\"under-home-slider widget-area\"><div class=\"wrap\">',\r\n\t\t'after' => '</div></div>',\r\n\t) );\r\n\r\n\tgenesis_widget_area( 'featured-circles', array(\r\n\t\t'before' => '<div class=\"featured-circles widget-area\"><div class=\"wrap\">',\r\n\t\t'after' => '</div></div>',\r\n\t) );\r\n\r\n\tgenesis_widget_area( 'home-featured-area', array(\r\n\t\t'before' => '<div class=\"home-featured-area widget-area\"><div class=\"wrap\">',\r\n\t\t'after' => '</div></div>',\r\n\t) );\r\n\r\n}", "function sb_slideshow_post_admin_head() {\n\tglobal $post, $sb_slideshow_interface, $sb_slideshow_slides;\n\n\t$attachments = array();\n\tforeach ($sb_slideshow_slides as $slide) array_push( $attachments, $slide['attachment'] );\n\n\tif (!sb_verify_post_type('slideshow')) return; // verify post type\n?>\n\t<script type=\"text/javascript\">\n\t\t//<![CDATA[\n\t\t;(function($) {\n\t\t\t$(document).ready(function(){\n\t\t\t\tvar attachments = <?php echo json_encode( $attachments ); ?>\n\t\t\t\t// sortable container resize\n\t\t\t\tfunction container_resize() {\n\t\t\t\t\t$.each(['#sb_slides', '#sb_library'], function( index, obj ) {\n\t\t\t\t\t\t$(obj).removeClass( 'closed' ); // make sure meta box is opened before calculating width\n\t\t\t\t\t\tvar sortable = $('ul.connectedSortable', obj);\n\t\t\t\t\t\tsortable.outerWidth( ($('li.sb_item:visible', sortable).length + 1) * $('li.sb_item:visible:first', sortable).outerWidth() );\n\t\t\t\t\t\t$('div.scrollingHotSpotLeft, div.scrollingHotSpotRight', obj).outerHeight( sortable.outerHeight() );\n\t\t\t\t\t});\n\n\t\t\t\t\tcheckScrollPos();\n\t\t\t\t}\n\t\t\t\tcontainer_resize(); // initial sizing\n\n\t\t\t\t// update hidden sortable inputs\n\t\t\t\tfunction hidden_inputs() {\n\t\t\t\t\t$('#sb_slides ul.connectedSortable li').each(function(index) {\n\t\t\t\t\t\t$('.sb_order', this).val( index );\n\t\t\t\t\t});\n\t\t\t\t\t$('#sb_slides ul.connectedSortable li .sb_box').val( 'slides' );\n\t\t\t\t\t$('#sb_library ul.connectedSortable li .sb_box').val( 'library' );\n\t\t\t\t}\n\n\t\t\t\t// prepend an item to a box\n\t\t\t\tfunction prepend_to( location, sb_item ) {\n\t\t\t\t\tvar sortable = $('#sb_' + location + ' ul.connectedSortable');\n\t\t\t\t\tsortable.parent().stop().animate({ scrollLeft: 0 }, 'slow'); // alternative: sortable.outerWidth() - $(this).scrollLeft()\n\t\t\t\t\tsb_item = $(sb_item); // force object\n\t\t\t\t\tsb_item.fadeOut('fast', function() {\n\t\t\t\t\t\tsb_item.prependTo( sortable ); // alternative: append\n\t\t\t\t\t\tsb_item.fadeIn('slow');\n\t\t\t\t\t\tfilter_library();\n\t\t\t\t\t\tcontainer_resize();\n\t\t\t\t\t\thidden_inputs();\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// move sortable item via add/remove link\n\t\t\t\t$('.move-to-library').live('click', function() {\n\t\t\t\t\tprepend_to( 'library', $(this).parent('div.sb_right').parent('li.sb_item') );\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t\t$('.move-to-slides').live('click', function() {\n\t\t\t\t\tprepend_to( 'slides', $(this).parent('div.sb_right').parent('li.sb_item') );\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t\t// connected sortable lists\n\t\t\t\t$('#sb_slides ul.connectedSortable, #sb_library ul.connectedSortable').sortable({\n\t\t\t\t\tconnectWith: '.connectedSortable',\n\t\t\t\t\thandle: 'img',\n\t\t\t\t\tforceHelperSize: false,\n\t\t\t\t\tforcePlaceholderSize: true,\n\t\t\t\t\thelper: function( ev, el ) { return $('img', el).clone().width(<?php\n\t\t\t\t\t\techo floor( $sb_slideshow_interface['slide_width'] / 3 ); ?>).height(<?php\n\t\t\t\t\t\techo floor( $sb_slideshow_interface['slide_height'] / 3 ); ?>); },\n\t\t\t\t\tplaceholder: 'placeholder',\n\t\t\t\t\trevert: true,\n\t\t\t\t\tcursor: 'move',\n\t\t\t\t\tcursorAt: { top: -1, left: <?php echo floor( $sb_slideshow_interface['slide_height'] / 4.2 ); ?> },\n\t\t\t\t\tcontainment: '#normal-sortables',\n\t\t\t\t\tscrollSensitivity: 0,\n\t\t\t\t\ttolerance: 'pointer'\n\t\t\t\t});\n\t\t\t\t$('#sb_slides ul.connectedSortable, #sb_library ul.connectedSortable').bind('sortreceive', function( ev, ui ) {\n\t\t\t\t\tfilter_library();\n\t\t\t\t\tcontainer_resize();\n\t\t\t\t});\n\t\t\t\t$('#sb_slides ul.connectedSortable').bind('sortupdate', function( ev, ui ) {\n\t\t\t\t\thidden_inputs();\n\t\t\t\t});\n\n\t\t\t\t// sortable list scrolling\n\t\t\t\tvar interval_id = 0;\n\t\t\t\t$('div.scrollingHotSpotLeft, div.scrollingHotSpotRight').mouseenter(function() {\n\t\t\t\t\tvar scrollDiv = $(this).parent();\n\t\t\t\t\tvar scrollAmount = $('li.sb_item:first', scrollDiv).outerWidth() * 2;\n\t\t\t\t\tscrollAmount *= ($(this).attr('class') == 'scrollingHotSpotLeft' ? -1 : 1);\n\n\t\t\t\t\tif( interval_id == 0 ) {\n\t\t\t\t\t\tinterval_id = setInterval(function() {\n\t\t\t\t\t\t\tscrollDiv.stop().animate({ scrollLeft: scrollDiv.scrollLeft() + scrollAmount }, 280);\n\t\t\t\t\t\t}, 400);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$('div.scrollingHotSpotLeft, div.scrollingHotSpotRight').mouseleave(function() {\n\t\t\t\t\tif( interval_id != 0 ) {\n\t\t\t\t\t\tclearInterval(interval_id);\n\t\t\t\t\t\tinterval_id = 0;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$('div.scrollingContainer').scroll(function() {\n\t\t\t\t\tcheckScrollPos();\n\t\t\t\t});\n\t\t\t\tfunction checkScrollPos() {\n\t\t\t\t\t$('div.scrollingContainer').each(function() {\n\t\t\t\t\t\tvar scrollLeft = $(this).scrollLeft();\n\t\t\t\t\t\tvar left = $('div.scrollingHotSpotLeft', this);\n\t\t\t\t\t\tvar right = $('div.scrollingHotSpotRight', this);\n\t\t\t\t\t\tvar sortableW = $('ul.connectedSortable', this).outerWidth();\n\t\t\t\t\t\tvar containerW = $(this).outerWidth();\n\n\t\t\t\t\t\tif( sortableW > containerW ) {\n\t\t\t\t\t\t\tif( scrollLeft == 0 )\n\t\t\t\t\t\t\t\tleft.fadeOut('slow');\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tleft.fadeIn('slow');\n\n\t\t\t\t\t\t\tif( scrollLeft == (sortableW - containerW) )\n\t\t\t\t\t\t\t\tright.fadeOut('slow');\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tright.fadeIn('slow');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tleft.fadeOut('slow');\n\t\t\t\t\t\t\tright.fadeOut('slow');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// library filtering\n\t\t\t\t$('div#libraryFilters input').keypress(function( e ) {\n\t\t\t\t\tif( e.which == 13 ) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$('div#libraryFilters input').keyup(function() {\n\t\t\t\t\tvar oldVal = $(this).val();\n\t\t\t\t\tvar newVal = (!isNaN( parseInt( oldVal, 10 ) ) ? parseInt( oldVal ) : '');\n\t\t\t\t\tnewVal = String( newVal ).replace( /[^0-9]/g, '' );\n\n\t\t\t\t\tif( newVal == '0' )\n\t\t\t\t\t\t$(this).val( 0 );\n\t\t\t\t\telse\n\t\t\t\t\t\t$(this).val( newVal );\n\n\t\t\t\t\tif (oldVal == '' || oldVal.slice( 0, -1 ) != newVal) filter_library();\n\t\t\t\t});\n\t\t\t\t$('div#libraryFilters select').not('select#filter_year').change(function() {\n\t\t\t\t\tfilter_library();\n\t\t\t\t});\n\t\t\t\t// show/hide filter months on year change\n\t\t\t\tfunction filterMonthToggle( monthClass ) {\n\t\t\t\t\tvar monthClass = (monthClass != 'all' ? ', option.y' + monthClass : '');\n\t\t\t\t\t$('select#filter_month option').removeAttr( 'selected' ).removeAttr( 'disabled' ).not('option:first' + monthClass).attr( 'disabled', 'disabled' );\n\t\t\t\t\t$('select#filter_month option:first').attr( 'selected', 'selected' );\n\t\t\t\t}\n\t\t\t\t$('select#filter_year').change(function() {\n\t\t\t\t\tfilterMonthToggle( $(this).val() );\n\t\t\t\t\tfilter_library();\n\t\t\t\t});\n\t\t\t\tfilterMonthToggle( $('select#filter_year').val() ); // initial month input value\n\t\t\t\tvar stopFiltering;\n\t\t\t\tfunction filter_library() {\n\t\t\t\t\tstopFiltering = true;\n\n\t\t\t\t\tvar year = $('#filter_year').val();\n\t\t\t\t\tvar month = $('#filter_month').val();\n\t\t\t\t\tvar type = $('#filter_type').val();\n\t\t\t\t\tvar width_ltgt = $('#filter_width_ltgt').val();\n\t\t\t\t\tvar width = parseInt( $('#filter_width').val() );\n\t\t\t\t\tvar height_ltgt = $('#filter_height_ltgt').val();\n\t\t\t\t\tvar height = parseInt( $('#filter_height').val() );\n\n\t\t\t\t\t$(attachments).each(function( index, attachment ) {\n\t\t\t\t\t\tif( index == 0 ) {\n\t\t\t\t\t\t\tstopFiltering = false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (stopFiltering) return false; // stop if mid-way through when a new is filter initiated\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tslide = $('#sb_library ul.connectedSortable li#attachment_id-' + attachment.id);\n\n\t\t\t\t\t\tif( slide.length != 0 ) { // check if slide exists\n\t\t\t\t\t\t\tvar hide = false;\n\n\t\t\t\t\t\t\tif( year != 'all' && attachment.year != year ) hide = true;\n\n\t\t\t\t\t\t\tif( month != 'all' && attachment.month != month ) hide = true;\n\n\t\t\t\t\t\t\tif( type != 'all' && attachment.type != type ) hide = true;\n\n\t\t\t\t\t\t\tattachment.width = parseInt( attachment.width );\n\t\t\t\t\t\t\tif( typeof width == 'number' && typeof attachment.width == 'number' ) {\n\t\t\t\t\t\t\t\tif (width_ltgt == 'lt' && attachment.width > width) hide = true;\n\t\t\t\t\t\t\t\tif (width_ltgt == 'gt' && attachment.width < width) hide = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tattachment.height = parseInt( attachment.height );\n\t\t\t\t\t\t\tif( typeof height == 'number' && typeof attachment.height == 'number' ) {\n\t\t\t\t\t\t\t\tif (height_ltgt == 'lt' && attachment.height > height) hide = true;\n\t\t\t\t\t\t\t\tif (height_ltgt == 'gt' && attachment.height < height) hide = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (hide) slide.hide(); else slide.show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (index == $(attachments).length-1) container_resize(); // resize container when finished filtering\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfilter_library(); // initial filtering\n\n\t\t\t\t// clear filters\n\t\t\t\t$('#clear-filters').click(function() {\n\t\t\t\t\t$('div#libraryFilters select').each(function( i, v ) {\n\t\t\t\t\t\t$('option:selected', this).removeAttr( 'selected' );\n\t\t\t\t\t\t$('option:first', this).attr( 'selected', 'selected' );\n\t\t\t\t\t});\n\t\t\t\t\t$('div#libraryFilters input#filter_width').val(<?php echo $sb_slideshow_interface['filter_width']; ?>);\n\t\t\t\t\t$('div#libraryFilters input#filter_height').val(<?php echo $sb_slideshow_interface['filter_height']; ?>);\n\n\t\t\t\t\tfilter_library();\n\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t\t// file upload\n\t\t\t\tvar fid = 'userfile';\n\t\t\t\tnew AjaxUpload($('a#uploadlink'), {\n\t\t\t\t\taction: ajaxurl,\n\t\t\t\t\tname: fid,\n\t\t\t\t\tdata: { action: 'sb_action_handle_upload_ajax', file_id: fid },\n\t\t\t\t\tresponseType: 'json',\n\t\t\t\t\tonSubmit: function( file , ext ){\n\t\t\t\t\t\tif( ext && /^(jpg|png|jpeg|gif)$/.test(ext) ) {\n\t\t\t\t\t\t\t$('span#uploadresult').html( 'Uploading ' + file + '...' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// extension is not allowed\n\t\t\t\t\t\t\t$('span#uploadresult').html( 'Error: Only images are allowed.' );\n\t\t\t\t\t\t\treturn false;\t// cancel upload\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonComplete: function( file, response ){\n\t\t\t\t\t\tif( response.error != '' ) {\n\t\t\t\t\t\t\t$('span#uploadresult').html( response.error ); // show user the error\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$('span#uploadresult').html( file + ' has been uploaded!' );\n\n\t\t\t\t\t\t\tvar offset = $(attachments).length;\n\t\t\t\t\t\t\t$.post(ajaxurl, { action: 'sb_slideshow_upload', id: '<?php echo $post->ID; ?>', index_offset: offset }, function(response) {\n\t\t\t\t\t\t\t\tattachments[offset] = $.parseJSON( response.object ); // append to attachments array\n\t\t\t\t\t\t\t\taddToSelect( 'type', attachments[offset]['type'], null ); // add mime type to filter area if not already present\n\n\t\t\t\t\t\t\t\t// add year and month to filter if not already present\n\t\t\t\t\t\t\t\tvar year = attachments[offset]['year'];\n\t\t\t\t\t\t\t\taddToSelect( 'year', year, null );\n\t\t\t\t\t\t\t\taddToSelect( 'month', attachments[offset]['month'], year );\n\n\t\t\t\t\t\t\t\t$('select#filter_month option').sort( sortNum ).appendTo( 'select#filter_month' ); // sort the months to make sure they are in order\n\t\t\t\t\t\t\t\tfilterMonthToggle( $('select#filter_year').val() ); // enable/disable months based on year value\n\t\t\t\t\t\t\t\tprepend_to( 'library', response.html ); // prepend to library\n\t\t\t\t\t\t\t}, 'json');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// this is stupid, but it works for now\n\t\t\t\tfunction addToSelect( key, text, year ) {\n\t\t\t\t\tsel = 'select#filter_' + key;\n\n\t\t\t\t\tvar kill = false;\n\t\t\t\t\t$(sel + ' option').each(function( i, v ) {\n\t\t\t\t\t\tif ($(this).val() == text) {\n\t\t\t\t\t\t\tif (year != null) $(this).addClass('y' + year);\n\n\t\t\t\t\t\t\tkill = true; // not able to add to select, option already exists\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tif (kill) return false;\n\n\t\t\t\t\tif (year != null)\n\t\t\t\t\t\t$('<option>').val( text ).text( text ).addClass('y' + year).appendTo( sel );\n\t\t\t\t\telse\n\t\t\t\t\t\t$('<option>').val( text ).text( text ).appendTo( sel );\n\n\t\t\t\t\treturn true; // option added to select\n\t\t\t\t}\n\n\t\t\t\t// custom number sorting funtion\n\t\t\t\tfunction sortNum( a, b ){\n\t\t\t\t\tif ($(a).val() == 'all') return -1;\n\t\t\t\t\treturn $(a).val() > $(b).val() ? 1 : -1;\n\t\t\t\t};\n\n\t\t\t\t// show/hide custom size\n\t\t\t\t$('#size_radio_buttons input[type=\"radio\"]').change(function() {\n\t\t\t\t\tif( $(this).val() == 'custom' )\n\t\t\t\t\t\t$('#custom_size').show();\n\t\t\t\t\telse\n\t\t\t\t\t\t$('#custom_size').hide();\n\t\t\t\t});\n\t\t\t\tif( $('#size_radio_buttons input[id=\"size_custom\"]').is(':checked') )\n\t\t\t\t\t$('#custom_size').show(); // initial custom size show/hide\n\n\t\t\t\t// slideshow options view\n\t\t\t\t$('#slideshow_radio_buttons input[type=\"radio\"]').change(function() {\n\t\t\t\t\tif($(this).val() == 'slideshow_on')\n\t\t\t\t\t\t$('#slideshow_on_options').show();\n\t\t\t\t\telse\n\t\t\t\t\t\t$('#slideshow_on_options').hide();\n\t\t\t\t});\n\t\t\t\tif( $('#slideshow_radio_buttons input[id=\"ssorri_slideshow_off\"]').is(':checked') )\n\t\t\t\t\t$('#slideshow_on_options').hide();\n\n\t\t\t\t// slideshow title is required\n\t\t\t\t$('input#publish, input#save-post, a#post-preview').mousedown(function(e) {\n\t\t\t\t\tif( $('input#title').val() == '' ) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t$('input#title').focus();\n\t\t\t\t\t\talert( 'You must enter a title for this slideshow!' );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\n\t\t\t\t// clear default link\n\t\t\t\t$('input.slide-link').live('focus', function() {\n\t\t\t\t\tif ($(this).val() == '<?php echo $sb_slideshow_interface['link_text']; ?>') $(this).val( '' );\n\t\t\t\t});\n\t\t\t\t$('input.slide-link').live('blur', function() {\n\t\t\t\t\tif ($(this).val() == '') $(this).val( '<?php echo $sb_slideshow_interface['link_text']; ?>' );\n\t\t\t\t});\n\t\t\t});\n\t\t})(jQuery);\n\t\t//]]>\n\t</script>\n\n\t<style type=\"text/css\">\n\t\t/* slides and library */\n\t\t#sb_slides div.inside,\n\t\t#sb_library div.inside { position:relative; }\n\t\tdiv.scrollingContainer {\n\t\t\toverflow:auto;\n\t\t\twhite-space:nowrap;\n\t\t\tmargin:0;\n\t\t}\n\t\tul.connectedSortable { width:9999px; overflow:auto; }\n\t\tul.connectedSortable li {\n\t\t\tfloat:left;\n\t\t\tdisplay:inline;\n\t\t\tposition:relative;\n\t\t\tmargin:0;\n\t\t}\n\t\tul.connectedSortable img { cursor:move;\t}\n\t\tul.connectedSortable li,\n\t\t.ui-sortable-helper { padding:5px; }\n\t\t.placeholder { background:#257DA6 !important; }\n\t\tdiv.sb_right { position:absolute; top:1px; right:2px; padding:5px 10px; }\n\t\tdiv.sb_right a { text-decoration:none; }\n\n\t\t/* slides */\n\t\t#sb_slides ul.connectedSortable {\n\t\t\tmin-width:<?php echo $sb_slideshow_interface['slide_width'] * 2; ?>px;\n\t\t\tmin-height:<?php echo $sb_slideshow_interface['slide_height'] + 87; ?>px;\n\t\t}\n\t\t#sb_slides.closed ul.connectedSortable { min-height:0; }\n\t\t#sb_slides ul.connectedSortable img {\n\t\t\twidth:<?php echo $sb_slideshow_interface['slide_width']; ?>px;\n\t\t\theight:<?php echo $sb_slideshow_interface['slide_height']; ?>px;\n\t\t}\n\t\t#sb_slides ul.connectedSortable .placeholder {\n\t\t\twidth:<?php echo $sb_slideshow_interface['slide_width'] + 2; ?>px;\n\t\t\theight:<?php echo $sb_slideshow_interface['slide_height'] + 77; ?>px;\n\t\t}\n\t\t#sb_slides ul.connectedSortable textarea {\n\t\t\twidth:<?php echo $sb_slideshow_interface['slide_width']; ?>px;\n\t\t\theight:50px;\n\t\t\tdisplay:block;\n\t\t}\n\t\t#sb_slides ul.connectedSortable label { float:left; line-height:32px; width:55px; }\n\t\t#sb_slides ul.connectedSortable .slide-link {\n\t\t\theight:25px;\n\t\t\tmargin-top:5px;\n\t\t\tdisplay:block; width:<?php echo $sb_slideshow_interface['slide_width'] - 54; ?>px;\n\t\t}\n\t\t#sb_slides ul.connectedSortable .sb_right a.move-to-slides { display:none; }\n\n\t\t/* library */\n\t\t#sb_library ul.connectedSortable {\n\t\t\tmin-width:<?php echo $sb_slideshow_interface['slide_width'] * 2; ?>px;\n\t\t\tmin-height:<?php echo ($sb_slideshow_interface['slide_height'] / 3) + 10; ?>px;\n\t\t}\n\t\t#sb_library ul.connectedSortable img,\n\t\t#sb_library .placeholder {\n\t\t\twidth:<?php echo floor($sb_slideshow_interface['slide_width'] / 3); ?>px;\n\t\t\theight:<?php echo floor($sb_slideshow_interface['slide_height'] / 3); ?>px;\n\t\t}\n\t\t#sb_library ul.connectedSortable textarea,\n\t\t#sb_library ul.connectedSortable label,\n\t\t#sb_library ul.connectedSortable .slide-link,\n\t\t#sb_library ul.connectedSortable .sb_right a.move-to-library { display:none !important; }\n\n\t\t/* scrolling hotspots */\n\t\tdiv.scrollingHotSpotLeft, div.scrollingHotSpotRight {\n\t\t\tdisplay:none;\n\t\t\twidth:50px;\n\t\t\theight:100%;\n\t\t\ttop:0;\n\t\t\tposition:absolute;\n\t\t\tz-index:200;\n\t\t\tbackground-position:center center;\n\t\t\tbackground-repeat:no-repeat;\n\t\t\tbackground-color:#F9F9F9;\n\t\t\topacity:0.35;\n\t\t\t-moz-opacity:0.35;\n\t\t\tfilter:alpha(opacity = 35);\n\t\t\tzoom:1; /* trigger \"hasLayout\" in Internet Explorer 6 or older */\n\t\t}\n\t\tdiv.scrollingHotSpotLeft\t{\n\t\t\tleft: 0;\n\t\t\tbackground-image: url(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/arrow_left.gif'; ?>);\n\t\t\tcursor: url(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/cursors/cursor_arrow_left.cur'; ?>),\n\t\t\t\turl(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/cursors/cursor_arrow_left.cur'; ?>), w-resize;\n\t\t}\n\t\tdiv.scrollingHotSpotRight {\n\t\t\tright: 0;\n\t\t\tbackground-image: url(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/arrow_right.gif'; ?>);\n\t\t\tcursor: url(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/cursors/cursor_arrow_right.cur'; ?>),\n\t\t\t\turl(<?php echo INCLUDES_URL . '/extensions/startbox-slideshows/images/admin/cursors/cursor_arrow_right.cur'; ?>), w-resize;\n\t\t}\n\n\t\t/* interface */\n\t\tdiv.scrollingContainer,\n\t\t.ui-sortable-helper,\n\t\tdiv.sb_right,\n\t\tul.connectedSortable li {\n\t\t\tbackground:<?php echo $sb_slideshow_interface['color']; ?>;\n\t\t}\n\t\tinput.pixelfield { width:44px; }\n\t\tinput.urlfield { width:155px; }\n\t\t#uploaddiv { position:absolute; top:-29px; left:110px; }\n\t\tdiv#libraryFilters { margin-top:8px; text-align:left; overflow:auto; }\n\t\tdiv#libraryFilters div {\n\t\t\tmargin-top:6px;\n\t\t\tline-height:2em;\n\t\t\twhite-space:nowrap;\n\t\t\tfloat:left;\n\t\t\tmargin-left:10px;\n\t\t}\n\t\tdiv#libraryFilters div em { line-height:2em; display:block; }\n\t\tdiv.filterGroup {\n\t\t\tpadding-left:10px;\n\t\t\tborder-left:1px solid #EAEAEA;\n\t\t}\n\t</style>\n<?php\n}", "function wpbm_slider_images(){\n global $wpdb;\n include( 'inc/admin/wpbm-slider-image.php' );\n die();\n }", "function quadro_options_video_banner() {\n\t?>\n\t<aside class=\"qi-aside banner\">\n\t\t<a href=\"https://artisanthemes.io/kb?utm_source=Indigo&utm_medium=theme&utm_content=101videoBanner\">\n\t\t\t<img src=\"<?php echo get_template_directory_uri(); ?>/images/admin/video-training-banner.jpg\"/>\n\t\t</a>\n\t</aside>\n\t<?php\n}", "function ihacklog_pkg_highslide_add_js()\n{\n\tif(is_single()||is_page() )\n\t{\t\n\t$tpl_dir=plugin_dir_url(HACKLOG_PACKAGE_LOADER );\n\techo <<<EOT\n\t<!-- Added By Highslide Plugin. Version 2.0 (C) 2009 荒野无灯 -->\n\t<script type='text/javascript'>\n//\talert('ok');\n\ths.showCredits = true;\n\ths.creditsHref = 'http://ihacklog.com/';\n hs.creditsTarget = '_self';\n\ths.graphicsDir = '{$tpl_dir}js/highslide/graphics/';\n\ths.align = 'center';\n\n hs.transitions = ['expand', 'crossfade'];\n hs.outlineType = 'glossy-dark';\n hs.wrapperClassName = 'glossy-dark';\n hs.fadeInOut = true;\n hs.dimmingOpacity = 0.3;\n //hs.padToMinWidth = true;\n\n if (hs.addSlideshow) hs.addSlideshow({\n interval: 5000,\n repeat: false,\n useControls: true,\n fixedControls: 'fit',\n overlayOptions: {\n opacity: .6,\n position: 'bottom center',\n hideOnMouseOut: true\n }\n });\n\n// Add the slideshow providing the controlbar and the thumbstrip\n/*\nhs.addSlideshow({\n\t//slideshowGroup: 'group1',\n\tinterval: 5000,\n\trepeat: false,\n\tuseControls: true,\n\toverlayOptions: {\n\t\tclassName: 'text-controls',\n\t\tposition: 'bottom center',\n\t\trelativeTo: 'viewport',\n\t\toffsetY: -60\n\t},\n\tthumbstrip: {\n\t\tposition: 'bottom center',\n\t\tmode: 'horizontal',\n\t\trelativeTo: 'viewport'\n\t}\n}); \n*/ \n \nhs.lang={\n loadingText : '图片加载中...',\n loadingTitle : '正在加载图片',\n closeText : '关闭',\n closeTitle : '关闭 (Esc)',\n creditsText : 'Powered by <i>荒野无灯</i>',\n creditsTitle : 'http://ihacklog.com',\n moveTitle : '移动图片',\n moveText : '移动',\n previousText : '后退',\n previousTitle : '上一张图片 (左方向键)',\n nextText : '前进',\n nextTitle : '下一张图片 (右方向键)',\n restoreTitle : '小提示:点击可关闭或拖动. 用左右方向键可查看上一张和下一张-_-',\n fullExpandTitle : '点击查看原图',\n fullExpandText : '查看原图'\n };\n \n</script>\n<!-- Added By Highslide Plugin. Version 2.0 (C) 2009 荒野无灯 -->\nEOT;\n\t} //end if\n }", "function vslider_theme_page() { ?>\r\n\t <div class=\"wrap\"><div id=\"icon-themes\" class=\"icon32\"><br /></div><h2>vSlider Themes Page</h2>\r\n <div id=\"themes\"></div>\r\n\t</div>\r\n<?php }", "function sb_slideshow_wp_head() {\n\tdo_action( 'sb_slideshow_wp_head' ); // allow for a safe place to add to the head\n}", "function bnk_slider() {\r\n\tif (is_page_template('template-home.php') || is_single() ) {\r\n\r\n\t\tglobal $smof_data;\r\n\t\t$animation = $smof_data['bnk_slide_animation'];\r\n\t\t$slideDirection = $smof_data['bnk_slide_direction'];\r\n\t\t$slideshowSpeed = $smof_data['bnk_slide_speed'];\r\n\t\t$animationDuration = $smof_data['bnk_slide_animduration'];\r\n\t\t$directionNav = $smof_data['bnk_slide_dirnav'];\r\n\t\t$controlNav = $smof_data['bnk_slide_control'];\r\n\t\t?>\r\n\t\t<script type=\"text/javascript\">\r\n jQuery(window).load(function() {\r\n\t\t\t\tif (jQuery().flexslider) {\r\n\t\t\t\t\tjQuery('.flexslider').flexslider({\r\n\t\t\t\t\t\t<?php if($animation ) : ?> animation: \"<?php echo $animation; ?>\", <?php endif; ?>\r\n\t\t\t\t\t\t<?php if($slideDirection ) : ?> slideDirection: \"<?php echo $slideDirection; ?>\", <?php endif; ?>\r\n\t\t\t\t\t\t<?php if($slideshowSpeed ) : ?> slideshowSpeed: <?php echo $slideshowSpeed; ?>, <?php endif; ?>\r\n\t\t\t\t\t\t<?php if($animationDuration ) : ?> animationDuration: <?php echo $animationDuration; ?>, <?php endif; ?>\r\n\t\t\t\t\t\t<?php if($directionNav == 0 ) : ?> directionNav: false, <?php endif; ?>\r\n\t\t\t\t\t\t<?php if($controlNav == 0 ) : ?> controlNav: false <?php endif; ?>\r\n\t\t\t\t\t });\r\n\t\t\t\t};\r\n\t\t\t});\r\n\t\t</script>\r\n\t\t<?php\r\n\t}\r\n}", "function tmpl_tevolution_single_slider_script(){\r\n\t$is_edit=(isset($_REQUEST['action']) && $_REQUEST['action']=='edit')?'1':'';\t\r\n\tif(is_single() && $is_edit==''){\r\n\t\tglobal $post;\r\n\t\t$post_id = $post->ID;\r\n\t\tif(get_post_meta($post_id,'_event_id',true)){\r\n\t\t\t$post_id=get_post_meta($post_id,'_event_id',true);\r\n\t\t}\r\n\t\t$slider_more_listing_img = bdw_get_images_plugin($post_id,'tevolution_thumbnail');\r\n\t\t\r\n\t\t/*get the theme setting option*/\r\n\t\t$supreme2_theme_settings = (function_exists('supreme_prefix')) ? get_option(supreme_prefix().'_theme_settings'):'';\r\n\t\t\r\n\t\t/*Slider div id */\r\n\t\t$silde_gallery_id=apply_filters('tmpl_detail_slider_gallery_id','silde_gallery');\r\n\t\t$slider_id=apply_filters('tmpl_detail_slider_id','slider');\r\n\t\t/*tmpl_detail_slider_options filter hook for change any slider option */\r\n\t\t$slider_options = apply_filters('tmpl_detail_slider_options',array('animation'=>'slide','slideshow'=>'false','direction'=>'horizontal','slideshowSpeed'=>7000,'animationLoop'=>'true','startAt'=> 0,'smoothHeight'=> 'true','easing'=> \"swing\",'pauseOnHover'=> 'true','video'=> 'true','controlNav'=> 'true','directionNav'=> 'true','prevText'=> '','nextText'=> '','animationLoop'=>'true','itemWidth'=>'60','itemMargin'=>'20'));\r\n\t\t?>\r\n <script type=\"text/javascript\" async >\r\n\t\t\tjQuery(window).load(function()\r\n\t\t\t{ \r\n\t\t\t\tjQuery('#<?php echo $silde_gallery_id?>').flexslider({\r\n\t\t\t\t\tanimation: '<?php echo $slider_options['animation'];?>',\r\n\t\t\t\t\t<?php if(!empty($slider_more_listing_img) && (count($slider_more_listing_img) < apply_filters('tmpl_slider_image_count',4))):?>\r\n\t\t\t\t\tcontrolNav: false,\r\n\t\t\t\t\tdirectionNav: false,\r\n\t\t\t\t\tprevText: '<?php echo $slider_options['prevText'];?>',\r\n\t\t\t\t\tnextText: '<?php echo $slider_options['nextText'];?>',\r\n\t\t\t\t\t<?php \r\n\t\t\t\t\telse: ?>\r\n\t\t\t\t\tcontrolNav: <?php echo $slider_options['controlNav'];?>,\r\n\t\t\t\t\tdirectionNav: <?php echo $slider_options['directionNav'];?>,\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\tanimationLoop: false,\r\n\t\t\t\t\tslideshow: <?php echo $slider_options['slideshow'];?>,\r\n\t\t\t\t\titemWidth: <?php echo $slider_options['itemWidth'];?>,\r\n\t\t\t\t\titemMargin: <?php echo $slider_options['itemMargin'];?>,\r\n\t\t\t\t\t <?php if($supreme2_theme_settings['rtlcss'] ==1 || is_rtl() || (isset($_SESSION['rtlcss']) && $_SESSION['rtlcss']==1)){ ?>\r\n\t\t\t\t\trtl: true,\r\n\t\t\t\t\t<?php } ?>\r\n\t\t\t\t\ttouch:true,\r\n\t\t\t\t\tasNavFor: '#slider'\r\n\t\t\t\t });\r\n\t\t\t\tjQuery('#<?php echo $slider_id;?>').flexslider(\r\n\t\t\t\t{\r\n\t\t\t\t\tanimation: '<?php echo $slider_options['animation'];?>',\r\n\t\t\t\t\tslideshow: <?php echo $slider_options['slideshow'];?>,\r\n\t\t\t\t\tdirection: '<?php echo $slider_options['direction'];?>',\r\n\t\t\t\t\tslideshowSpeed: 7000,\r\n\t\t\t\t\tanimationLoop: <?php echo $slider_options['animationLoop'];?>,\r\n\t\t\t\t\tstartAt: 0,\r\n\t\t\t\t\tsmoothHeight: <?php echo $slider_options['smoothHeight'];?>,\r\n\t\t\t\t\teasing: '<?php echo $slider_options['easing'];?>',\r\n\t\t\t\t\tpauseOnHover: <?php echo $slider_options['pauseOnHover'];?>,\r\n\t\t\t\t\tvideo: <?php echo $slider_options['video'];?>,\r\n\t\t\t\t\tcontrolNav: <?php echo $slider_options['controlNav'];?>,\r\n\t\t\t\t\tdirectionNav: <?php echo $slider_options['directionNav'];?>,\t\r\n\t\t\t\t\ttouch:true,\t\t\t\t\t\r\n\t\t\t\t\tstart: function(slider)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tjQuery('body').removeClass('loading');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t <?php if($supreme2_theme_settings['rtlcss'] ==1 || is_rtl() || (isset($_SESSION['rtlcss']) && $_SESSION['rtlcss']==1)){ ?>\r\n\t\t\t\t\t,rtl: true,\r\n\t\t\t\t\t<?php } ?>\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t/*FlexSlider: Default Settings*/\r\n\t\t</script>\r\n <?php\r\n\t\t\r\n\t}\r\n}", "function header_container_start() { ?>\n\t<!--#slider-container-->\n\t<div id=\"slider-container\">\n<?php\n}", "function wpzh_load_widget() {\n register_widget( 'sliderHTML2' ); \n}", "function plugin_header_image() {\n\t\t$post_type = get_current_screen()->post_type;\n\n\t\tif ( 'lumo_slide' != $post_type )\n\t\t\treturn;\n?>\n\t\t\t <style type=\"text/css\">\n\t\t\t\t.icon32.icon32-posts-lumo_slide {\n\t\t\t\t background: url(<?php echo plugins_url('/images/projection-screen-32x32.png', __FILE__); ?>) !important;\n\t\t\t\t}\n\t\t\t </style>\n<?php\n\t}", "function custom_shortcode_blogslider() \n {\n require_once(TEMPLATEPATH.'/shortcode/shortcode1.php');\n }", "function adventure_theme_options_do_page() { ?>\r\n \r\n <div class=\"cover\">\r\n\r\n <ul id=\"spacing\"></ul>\r\n\r\n <div class=\"contain\">\r\n \r\n <div id=\"header\">\r\n\t\t\r\n\t\t\t<div class=\"themetitle\">\r\n\t\t\t\t<a href=\"http://schwarttzy.com/shop/adventureplus/\" target=\"_blank\" ><h1><?php $my_theme = wp_get_theme(); echo $my_theme->get( 'Name' ); ?></h1>\r\n\t\t\t\t<span>- v<?php $my_theme = wp_get_theme(); echo $my_theme->get( 'Version' ); ?></span></a>\r\n\t\t\t</div>\r\n \r\n \r\n\t\t\t<div class=\"upgrade\">\r\n <a href=\"http://schwarttzy.com/shop/adventureplus/\" target=\"_blank\" ><h2><?php _e('Upgrade to Adventure+', 'localize_adventure'); ?></h2></a>\r\n </div>\r\n\t\t\r\n \t</div>\r\n \r\n <ul class=\"info_bar\">\r\n\t\t\t<li><a href=\"#description\"><?php _e('Description', 'localize_adventure'); ?></a></li>\r\n\t\t\t<li><a href=\"#customizing\"><?php _e('Customizing', 'localize_adventure'); ?></a></li>\r\n\t\t\t<li><a href=\"#features\"><?php _e('Features', 'localize_adventure'); ?></a></li>\r\n\t\t\t<li><a href=\"#faq\"><?php _e('FAQ', 'localize_adventure'); ?></a></li>\r\n\t\t\t<!-- <li><a href=\"#screenshots\"><?php _e('Screen Shots', 'localize_adventure'); ?></a></li> -->\r\n\t\t\t<li><a href=\"#changelog\"><?php _e('Changelog', 'localize_adventure'); ?></a></li>\r\n\t\t\t<li><a href=\"#support\"><?php _e('Support', 'localize_adventure'); ?></a></li>\r\n\t\t</ul>\r\n \r\n <div id=\"main\">\r\n \r\n <div id=\"customizing\" class=\"information\">\r\n <h3><?php _e('Customizing', 'localize_adventure'); ?></h3>\r\n <p><?php _e('Basically all I have right now is <a href=\"https://www.youtube.com/watch?v=IU__-ipUxxc\" target=\"_blank\">this video</a> on YouTube. I know the video is for a different theme, but this will change soon. Also, I would embed the video, but regrettably people wiser than me have said that it will introduce security issues. In the future I plan to add stuff here, but for now I just need to get the theme approved.', 'localize_adventure'); ?></p>\r\n </div>\r\n \r\n <div id=\"features\" class=\"information\">\r\n <h3><?php _e('Features', 'localize_adventure'); ?></h3>\r\n <ul>\r\n <li><?php _e('100% Responsive WordPress Theme', 'localize_adventure'); ?></li>\r\n <li><?php _e('Clean and Beautiful Stylized HTML, CSS, JavaScript', 'localize_adventure'); ?></li>\r\n <li><?php _e('Change the site Title and Slogan Colors', 'localize_adventure'); ?></li>\r\n <li><?php _e('Upload Your Own Background Image', 'localize_adventure'); ?></li>\r\n <li><?php _e('Adjust the opacity of the Content from 0 to 100% in 5% intervails', 'localize_adventure'); ?></li>\r\n <li><?php _e('Adjust the opacity of the Sidebar from 0 to 100% in 5% intervails', 'localize_adventure'); ?></li>\r\n <li><?php _e('Adjust Color of the Background for Content', 'localize_adventure'); ?></li>\r\n <li><?php _e('Adjust Color of the Background for Sidebar', 'localize_adventure'); ?></li>\r\n <li><?php _e('Multiple Menu Banner Images to Choose From', 'localize_adventure'); ?></li>\r\n <li><?php _e('Control wether or not the \"Previous\" & \"Next\" shows', 'localize_adventure'); ?></li>\r\n <li><?php _e('Adjust the spacing between the top of the page and content', 'localize_adventure'); ?></li>\r\n <li><?php _e('Comments on Pages only, Posts only, Both, or Nones', 'localize_adventure'); ?></li>\r\n <li><?php _e('Featured Background Image unique to a post or page', 'localize_adventure'); ?></li>\r\n <li><?php _e(\"Choose from 100's of Google fonts for the Title and Slogan\", 'localize_adventure'); ?></li>\r\n </ul>\r\n <p><?php _e('Do not see a feature the theme needs? <a href=\"http://schwarttzy.com/contact-me/\" target=\"_blank\">Contact me</a> about it.', 'localize_adventure'); ?></p>\r\n <h3><?php _e('Adventure+ Features', 'localize_adventure'); ?></h3>\r\n <ul>\r\n <li><?php _e('Remove the border or change thickness, color, and more', 'localize_adventure'); ?></li>\r\n <li><?php _e('Put what ever text and links you want in the footer', 'localize_adventure'); ?></li>\r\n <li><?php _e('Easily remove the footer with the link to my website', 'localize_adventure'); ?></li>\r\n <li><?php _e('Favicon on Your Website', 'localize_adventure'); ?></li>\r\n <li><?php _e('Change the Hyper Link Color', 'localize_adventure'); ?></li>\r\n <li><?php _e('Change the Link Colors in the Menu', 'localize_adventure'); ?></li>\r\n <li><?php _e('Change the Font Color in the Content', 'localize_adventure'); ?></li>\r\n <li><?php _e('Upload Your Own Logo in either the Header or above Content', 'localize_adventure'); ?></li>\r\n <li><?php _e('Upload Your Own Custom Banner Image', 'localize_adventure'); ?></li>\r\n <li><?php _e('Upload your own image for the Background', 'localize_adventure'); ?></li>\r\n <li><?php _e('Basic Google Meta for Analytics & Webmaster Verification', 'localize_adventure'); ?></li>\r\n <li><?php _e('Add Text Shadow to links and non-linked text.', 'localize_adventure'); ?></li>\r\n <li><?php _e('More to come!', 'localize_adventure'); ?></li>\r\n </ul>\r\n </div>\r\n \r\n <div id=\"faq\" class=\"information\">\r\n <h3><?php _e('FAQ', 'localize_adventure'); ?></h3>\r\n <p><b><?php _e('How do I remove the \"Good Old Fashioned Hand Written code by Eric J. Schwarz\"', 'localize_adventure'); ?></b></p>\r\n <p><?php _e('According to the WordPress.org I am allowed to include one credit link, which you can read about <a href=\"http://make.wordpress.org/themes/guidelines/guidelines-license-theme-name-credit-links-up-sell-themes/\" target=\"_blank\">here</a>. I use this link to spread the word about my coding skills in the hopes I will get some jobs. Anyway, you can dig through the code and remove it by hand but if you upgrade to the lastest version it will come right back. It is not really a big deal to do it by hand each time I release an update. However if you want to support my theme and get the Adventure+ upgrade, its just a simple \"On or Off\" option in the \"Theme Customizer.\"', 'localize_adventure'); ?></p>\r\n <p><b><?php _e('More FAQs coming soon!', 'localize_adventure'); ?></b></p>\r\n </div>\r\n \r\n <!--- <div id=\"screenshots\" class=\"information\">\r\n <h3><?php _e('I will take some screen shots', 'localize_adventure'); ?></h3>\r\n </div> -->\r\n \r\n <div id=\"changelog\" class=\"information\">\r\n <h3><?php _e('The Changelog Adventure+', 'localize_adventure'); ?></h3>\r\n <table>\r\n <tbody>\r\n <tr>\r\n <th><?php _e('Version', 'localize_adventure'); ?></th>\r\n <th></th>\r\n </tr>\r\n <tr>\r\n <th>26</th>\r\n <td><?php _e('Another bug in the code fixed, sorry guys.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>25</th>\r\n <td><?php _e('Minor error in the code fixed.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>24</th>\r\n <td><?php _e('Fixed the issue with the title being worthless, unless you have an SEO plugin installed. Fixed an issue with the sidebar sliding up on mobile platforms. Also added in instagram as a social icon.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>23</th>\r\n <td><?php _e('Added the ablity to change the date format.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>22</th>\r\n <td><?php _e('Quick update to help out mobile devices with social icons in the menu. Pintrest and few other social icons coming soon too.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>21</th>\r\n <td><?php _e('Quick update to help out mobile devices with the CSS3 class background-size not working on them.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>20</th>\r\n <td><?php _e('Fixed issues with the Feature Background Image. Change the site Title and Slogan to use CSS. Options to control the size of the font for the Title and Slogan in the Theme Customizer. The website font scale depending on the size of the screen viewing the website.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>19</th>\r\n <td><?php _e('Added an option to control the rotation of the tagline in the header. Also added coded to make drop down menus to work with touch screens devices. Single tag drops the menu, select and of the drop down option or an additional tap activates that link.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>16</th>\r\n <td><?php _e('Fixed some activation errors that people were having.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <th>14</th>\r\n <td><?php _e('Changed up the code for Menu Image Header thing so that it would look better and be easier to use. Added text-shadow options so you can choose from more colors. Added options for the border for width, color, and to just remove it. You can upload your own image for the content background now. Added a Font Size adjustment that works in the content and sidebar.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>13</th>\r\n <td><?php _e('Never existed, made a mistake and double jumped the version.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>12</th>\r\n <td><?php _e('I dont rememeber... sorry.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>11</th>\r\n <td><?php _e('Minor update to fix some issues I have found.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>10</th>\r\n <td><?php _e('The theme was completely rewritten from the ground up so that the code would be easier to manage, better written, and enable faster updates.', 'localize_adventure'); ?></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <h3><?php _e('The Changelog Adventure', 'localize_adventure'); ?></h3>\r\n <table>\r\n <tbody>\r\n <tr>\r\n <th><?php _e('Version', 'localize_adventure'); ?></th>\r\n <th></th>\r\n </tr>\r\n <tr>\r\n <th>4.1</th>\r\n <td><?php _e('Added another sidebar location to the theme, Thank tek428 for this option.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.9</th>\r\n <td><?php _e('Another bug in the code fixed, unrelated to the Adenture+ bug.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.8</th>\r\n <td><?php _e('Minor error in the code fixed.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.7</th>\r\n <td><?php _e('Fixed the issue with the title being worthless, unless you have an SEO plugin installed. Fixed an issue with the sidebar sliding up on mobile platforms. Also added in instagram as a social icon.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.6</th>\r\n <td><?php _e('Same as Adventure+ Version ', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.5</th>\r\n <td><?php _e('Quick update to help out mobile devices with social icons in the menu. Pintrest and few other social icons coming soon too.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.4</th>\r\n <td><?php _e('Quick update to help out mobile devices with the CSS3 class background-size not working on them.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.3</th>\r\n <td><?php _e('Fixed issues with the Feature Background Image. Change the site Title and Slogan to use CSS. Options to control the size of the font for the Title and Slogan in the Theme Customizer. The website font scale depending on the size of the screen viewing the website.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.1</th>\r\n <td><?php _e('Added an option to control the rotation of the tagline in the header. Also added coded to make drop down menus to work with touch screens devices. Single tag drops the menu, select and of the drop down option or an additional tap activates that link.', 'localize_adventure'); ?></td>\r\n <tr>\r\n <tr>\r\n <th>3.0</th>\r\n <td><?php _e('Updated Adventure to use the same new code that Adventure Plus has been running. The code is much cleaner and does away with a bunch of poor coding designs the theme had. The chances does away with complex loops that became to difficult do to all the customization options. Added code to fix the issue with the sidebar going to the top on mobile device.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.80</th>\r\n <td><?php _e('Updated the theme information page to a new look. Dropped code I am not allowed to have in the theme like redirecting to the Theme Infomation page upon activating the theme, google analytics code. Also fix some odd error with using the sidebar and a run on title 52+ letters in a row.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.70</th>\r\n <td><?php _e('Created one of the most demanded feature of all time, custom backgrounds. I call it \"Featured Background,\" because you can now upload or select any image to be a background unique to any page or post. Also fixed an issue with comments displaying ordered numbers.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.60</th>\r\n <td><?php _e('Added the new option to have the content on the right and the sidebar on the left.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.4</th>\r\n <td><?php _e('Added the ablitity to put soical icon and/or a search bar into the menu. Fixed the issue with the theme display \"and comments are closed.\" Added Google Analytics and Web Master Tool option because everyone should have it and more control of over the comments display too. The option to choose either display excerpts or the entire content of a post or page. You can choose to display dates on posts.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.3</th>\r\n <td><?php _e('Minor update to add few things to the theme along with fixes. The custom CSS generated from the theme customizer should only show if you have changed something in the features. Static pages now will not show the pagination or comments. Include the option to do anything you want with the comments. Added Google Fonts to the Header for the Title and Slogan.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.2</th>\r\n <td><?php _e('The update this time around was mainly for Adventure+ but in the process I added in a few more features. I included the option to have the menu lock to the top of the screen or the bottom similar to how the theme use to look. A lot of people asked for the ability to remove the “previous” & “next” links that come after content and I you guys one better. You now have the choice to remove the “previous” & “next” from just posts, just page, or both and you still can have it display the same. The slider and the content portion can now change to any color and adjust the opacity from 0% to 100% in 5% intervals. I also spent some time cleaning and organizing the customizer page, which means it is laid out a bit differently now but it works just the same. You now have the option to adjust the the amount of space fromt he top of the page to the where the content begins. I might have missed a thing or two but future updates should come much sooner with this hurdle cleared.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>2.1</th>\r\n <td><?php _e('This is main an update to fix issues that I and others (like you) have found and fixed for the theme. The content no longer shifts to the right after the sidebar and embed video from YouTube and Vimeo are now responsive when embedded, plus some other minor stuff. I have also introduced the ablity change the color of the content of the background of content. In the next update I will include the ablity to change the sidebar.', 'localize_adventure'); ?></td>\r\n </tr>\r\n <tr>\r\n <th>1.8</th>\r\n <td><?php _e('The entire code for the WordPress theme \"Adventure\" has been completely rewritten in Version 1.8 and is a complete re-release of the theme. Not a single shred of code survived, and for good reason. The code was written over 3 years ago, before the HTML5 / CSS3 revolution, and had to be compatible with IE6 back then. Now that its three years later, I am much better at coding and coupled with the progress made with HTML standards, the theme is back. While \"Adventure\" looks for the most part the same, there is a lot more happening in the code.', 'localize_adventure'); ?></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n \r\n <div id=\"support\" class=\"information\">\r\n <h3><?php _e('Support Information', 'localize_adventure'); ?></h3>\r\n <p><?php _e('If you happen to have issues with plugins, writing posts, customizing the theme, and basically anything just shoot me an email on <a href=\"http://schwarttzy.com/contact-me/\" target=\"_blank\">this page</a> I setup for contacting me.', 'localize_adventure'); ?></p>\r\n <p><?php _e('I have a <a href=\"https://twitter.com/Schwarttzy\" target=\"_blank\">Twitter</a> account, but all I really use it for is posting information on updates to my themes. So if you looking for a new feature, you may be in luck. I am not really sure what to do with Twitter, but I know a lot of people use it.', 'localize_adventure'); ?></p>\r\n <p><?php _e('Your always welcome to use the \"<a href=\"http://wordpress.org/support/theme/adventure\" target=\"_blank\">Support</a>\" forums on WordPress.org for any questions or problems, I just do not check it as often because I do not recieve email notifications on new posts or replies.', 'localize_adventure'); ?></p>\r\n </div>\r\n \r\n <div id=\"description\" class=\"information\">\r\n <h3><?php _e('Description', 'localize_adventure'); ?></h3>\r\n <p><?php _e('If you are having trouble with using the WordPress Theme', 'localize_adventure'); $my_theme = wp_get_theme(); echo $my_theme->get( 'Name' ); _e('and need some help, <a href=\"http://schwarttzy.com/contact-me/\" target=\"_blank\">contact me</a> about it. But I recommend taking a look at <a href=\"https://www.youtube.com/watch?v=IU__-ipUxxc\" target=\"_blank\">this video</a> before sending me an email. The video is for a different theme, but it will show everything there is to customizing the theme ', 'localize_adventure'); ?>\"<?php $my_theme = wp_get_theme(); echo $my_theme->get( 'Name' )?>.\"</p>\r\n <p><?php _e('Now that I have covered contacting me and a how to video, I would like to thank you for downloading and installing this theme. I hope that you enjoy it. I also hope that I can continue to create more beautiful themes like this for years to come, but that requires your help. I have created this Theme, and others, free of charge. And while I am not looking to get rich, I really like creating these themes for you guys.', 'localize_adventure'); ?></p>\r\n <p><?php _e('So if you are interested in supporting my work, I can offer you an <a href=\"http://schwarttzy.com/shop/adventureplus/\" target=\"_blank\" >upgrade to Adventure</a>. I have already included a few more features, some of which I am not allowed include in the free version, and I also offer to write additional code to customize the theme for you. Even if the code will be unique to your website.', 'localize_adventure'); ?></p>\r\n <p><?php _e('Eric Schwarz<br><a href=\"http://schwarttzy.com/\" targe=\"_blank\">http://schwarttzy.com/</a>', 'localize_adventure'); ?></p> \r\n </div>\r\n \r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n <ul id=\"finishing\"></ul>\r\n\r\n \r\n </div>\r\n<?php }", "public function WPHead() {\n\t\t// Just tag the page for fun.\n\t\techo \"\\n\\t\" . '<!-- This site uses Good Old Gallery, get it from http://wp.unwi.se/good-old-gallery -->' . \"\\n\\n\";\n\t}", "function swank_home_genesis_meta() {\r\n\r\n\tif ( is_active_sidebar( 'home-slider' ) || is_active_sidebar ( 'under-home-slider' ) || is_active_sidebar( 'featured-circles' ) || is_active_sidebar( 'home-featured-area' )) \r\n\r\n\t\t//* Force full width content layout\r\n\t\tadd_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\r\n\r\n\t\t//* Remove breadcrumbs\r\n\t\tremove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs');\r\n\r\n\t\t//* Remove the default Genesis loop\r\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\r\n\r\n\t\t//* Add homepage widgets\r\n\t\tadd_action( 'genesis_loop', 'swank_homepage_widgets' );\r\n\r\n\t}", "function hocwp_theme_custom_widgets_init() {\r\n\r\n}", "function darksnow_admin_header_image() { ?>\n\t<div id=\"headimg\">\n\t\t<?php\n\t\tif ( 'blank' == get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) || '' == get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) )\n\t\t\t$style = ' style=\"display:none;\"';\n\t\telse\n\t\t\t$style = ' style=\"color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';\"';\n\t\t?>\n\t\t<h1><a id=\"name\"<?php echo $style; ?> onclick=\"return false;\" href=\"<?php echo esc_url( home_url( '/' ) ); ?>\"><?php bloginfo( 'name' ); ?></a></h1>\n\t\t<div id=\"desc\"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>\n\t\t<?php $header_image = get_header_image();\n\t\tif ( ! empty( $header_image ) ) : ?>\n\t\t\t<img src=\"<?php echo esc_url( $header_image ); ?>\" alt=\"\" />\n\t\t<?php endif; ?>\n\t</div>\n<?php }", "function _static6($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n <div class=\"container zn_slideshow\">\n \t<div class=\"static-content productzoom-style\">\n <div class=\"row\">\n <div class=\"span5\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\t\t\tif ( !empty ( $options['sc_title'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<h3>'.do_shortcode( $options['sc_title'] ).'</h3>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// FEATURES LIST\n\t\t\t\t\t\t\t\tif ( !empty ( $options['sc_lp_features'] ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<ul class=\"features\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$textAr = explode(\"\\n\", $options['sc_lp_features']);\n\t\t\t\t\t\t\t\t\t\tforeach ($textAr as $index=>$line) {\n\t\t\t\t\t\t\t\t\t\t\techo '<li><span class=\"icon-ok icon-white\"></span> '.$line.'</li>';\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '</ul>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// First Button\n\t\t\t\t\t\t\t\tif ( !empty ( $options['sc_lp_button1'] ) && isset ( $options['sc_lp_button1_link']['url'] ) && !empty ( $options['sc_lp_button1_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<a target=\"'.$options['sc_lp_button1_link']['target'].'\" href=\"'.$options['sc_lp_button1_link']['url'].'\" class=\"'.$options['sc_lp_button1_style'].' btn-large\"><span class=\"'.$options['sc_lp_button1_icon'].' '.$options['sc_lp_button1_icon_style'].'\"></span> '.$options['sc_lp_button1'].'</a> ';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( !empty ( $options['sc_lp_button1'] ) && !empty ( $options['sc_2p_button1'] ) && !empty ( $options['sc_bt_text'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<span class=\"or\">'.$options['sc_bt_text'].'</span> ';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Second Button\n\t\t\t\t\t\t\t\tif ( !empty ( $options['sc_2p_button1'] ) && isset ( $options['sc_lp_button2_link']['url'] ) && !empty ( $options['sc_lp_button2_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<a target=\"'.$options['sc_lp_button2_link']['target'].'\" href=\"'.$options['sc_lp_button2_link']['url'].'\" class=\"'.$options['sc_lp_button2_style'].' btn-large\"><span class=\"'.$options['sc_lp_button2_icon'].' '.$options['sc_lp_button2_icon_style'].'\"></span> '.$options['sc_2p_button1'].'</a> ';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// IMAGE\n\t\t\t\t\t\t\t\tif ( isset ( $options['sc_lp_image'] ) && !empty ( $options['sc_lp_image'] ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<div class=\"span7\">';\n\t\t\t\t\t\t\t\t\t\techo '<div id=\"screenshot\">';\n\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"image\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$image = vt_resize( '',$options['sc_lp_image'] , '620','390', true );\n\t\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$image['url'].'\" width=\"'.$image['width'].'\" height=\"'.$image['height'].'\" data-full=\"'.$options['sc_lp_image'].'\" />';\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\techo '<div class=\"loupe\"></div>';\t\n\t\t\t\t\t\t\t\t\t\t\techo '</div>';\t\n\t\t\t\t\t\t\t\t\t\techo '</div>';\t\n\t\t\t\t\t\t\t\t\techo '</div>';\t\n\t\t\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\t?>\n\n \t\n\n </div><!-- end row -->\n </div>\n </div>\n\t\t\t\t\n\t\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function dfcg_help_images() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Image Management', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'Quite simply, the Featured Images option is the best and easiest to use. The manual methods (Full and Partial) are primarily there for reasons of backwards compatibility, for those users who have been using the DCG since its earliest versions.', DFCG_DOMAIN ) ;?></p>\n\t\n\t<p><em><?php _e( 'Note: it is quite possible that the manual image management options will be removed in future. Therefore users are encouraged to use the Featured Image option - it is easier and more flexible.', DFCG_DOMAIN ); ?></em></p>\n\t\n\t<p><?php _e( 'If you select the Partial URL option you will be prompted to enter the URL to the root folder for your images. You must enter a URL here otherwise the DCG will not find your images.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "function scratch_custom_header_admin_preview() { ?>\n\n\t\t<div <?php hybrid_attr( 'body' ); // Fake <body> class. ?>>\n\n\t\t\t<header <?php hybrid_attr( 'header' ); ?>>\n\n\t\t\t\t<?php if ( display_header_text() ) : // If user chooses to display header text. ?>\n\n\t\t\t\t\t<div id=\"branding\">\n\t\t\t\t\t\t<?php hybrid_site_title(); ?>\n\t\t\t\t\t\t<?php hybrid_site_description(); ?>\n\t\t\t\t\t</div><!-- #branding -->\n\n\t\t\t\t<?php endif; // End check for header text. ?>\n\n\t\t\t</header><!-- #header -->\n\n\t\t\t<?php if ( get_header_image() && !display_header_text() ) : // If there's a header image but no header text. ?>\n\n\t\t\t\t<a href=\"<?php echo home_url(); ?>\" title=\"<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>\" rel=\"home\"><img class=\"header-image\" src=\"<?php header_image(); ?>\" width=\"<?php echo get_custom_header()->width; ?>\" height=\"<?php echo get_custom_header()->height; ?>\" alt=\"\" /></a>\n\n\t\t\t<?php elseif ( get_header_image() ) : // If there's a header image. ?>\n\n\t\t\t\t<img class=\"header-image\" src=\"<?php header_image(); ?>\" width=\"<?php echo get_custom_header()->width; ?>\" height=\"<?php echo get_custom_header()->height; ?>\" alt=\"\" />\n\n\t\t\t<?php endif; // End check for header image. ?>\n\n\t\t</div><!-- Fake </body> close. -->\n\n<?php }", "function _static11($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n <div class=\"container zn_slideshow\">\n \t<div class=\"static-content default-style with-login\">\n \t\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"span7\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tif (!empty($options['ww_slide_title'])) {\n\t\t\t\t\t\t\t\t\t\techo '<h2>'.do_shortcode( $options['ww_slide_title'] ).'</h2>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (!empty( $options['ww_slide_subtitle'] )) {\n\t\t\t\t\t\t\t\t\t\techo '<h3>'.do_shortcode( $options['ww_slide_subtitle'] ).'</h3>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( !empty( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_l_text'] ) && !empty($options['ww_slide_link']['url']) ) {\n\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"info_pop animated fadeBoxIn left\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['url'].'\" class=\"buyit\">'.$options['ww_slide_l_text'].'</a>';\n\t\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\t\t\t\techo '</div>';\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"span5\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t// Text\n\t\t\t\t\t\t\t\t\tif ( isset ( $options['sc_ec_vid_desc'] ) && !empty ( $options['sc_ec_vid_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h5 style=\"text-align:right;\">'.$options['sc_ec_vid_desc'].'</h5>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// VIDEO\n\t\t\t\t\t\t\t\t\tif ( isset ( $options['sc_ec_vime'] ) && !empty ( $options['sc_ec_vime'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo get_video_from_link ( $options['sc_ec_vime'] ,'black_border full_width' ,'520px','270px');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div><!-- end row -->\n \n </div><!-- end static content -->\n </div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function _static11($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n <div class=\"container zn_slideshow\">\n \t<div class=\"static-content default-style with-login\">\n \t\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"span7\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tif (!empty($options['ww_slide_title'])) {\n\t\t\t\t\t\t\t\t\t\techo '<h2>'.do_shortcode( $options['ww_slide_title'] ).'</h2>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (!empty( $options['ww_slide_subtitle'] )) {\n\t\t\t\t\t\t\t\t\t\techo '<h3>'.do_shortcode( $options['ww_slide_subtitle'] ).'</h3>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( !empty( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_l_text'] ) && !empty($options['ww_slide_link']['url']) ) {\n\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"info_pop animated fadeBoxIn left\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['url'].'\" class=\"buyit\">'.$options['ww_slide_l_text'].'</a>';\n\t\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\t\t\t\techo '</div>';\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"span5\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t// Text\n\t\t\t\t\t\t\t\t\tif ( isset ( $options['sc_ec_vid_desc'] ) && !empty ( $options['sc_ec_vid_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h5 style=\"text-align:right;\">'.$options['sc_ec_vid_desc'].'</h5>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// VIDEO\n\t\t\t\t\t\t\t\t\tif ( isset ( $options['sc_ec_vime'] ) && !empty ( $options['sc_ec_vime'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo get_video_from_link ( $options['sc_ec_vime'] ,'black_border full_width' ,'520px','270px');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div><!-- end row -->\n \n </div><!-- end static content -->\n </div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function _static1($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"zn_slideshow\">\n <div class=\"container\">\n \t<div class=\"static-content default-style\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_title'] ) && !empty ( $options['ww_slide_title'] ) ) {\n\t\t\t\t\t\t\techo '<h2 class=\"centered\">'.do_shortcode($options['ww_slide_title']).'</h2>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// SUBTITLE\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_subtitle'] ) && !empty ( $options['ww_slide_subtitle'] ) ) {\n\t\t\t\t\t\t\techo '<h3 class=\"centered\">'.do_shortcode($options['ww_slide_subtitle']).'</h3>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// BUTTON\n\t\t\t\t\t\tif ( $options['ww_slide_m_button'] || $options['ww_slide_l_text'] ) {\n\t\t\t\t\t\t\techo '<div class=\"info_pop animated fadeBoxIn\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( $options['ww_slide_l_text'] && isset ( $options['ww_slide_link']['url'] ) && !empty ( $options['ww_slide_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<a class=\"buyit\" href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['target'].'\">'.$options['ww_slide_l_text'].'</a>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// BUTTON LEFT TEXT\n\t\t\t\t\t\t\t\tif ( isset ( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_m_button'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\techo '</div>';\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 \n </div>\n </div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function triumph_hero(){\n global $homepage_metabox;\n $id = 'homepage';\n print '<div id=\"hp-top\">';\n print '<div class=\"hp-top-background-block\"></div>';\n $i = 0;\n while($homepage_metabox->have_fields('sliders')):\n $active = $i==0?' active':'';\n $indicators .= '<li data-target=\"#myCarousel_'.$id.'\" data-slide-to=\"'.$i.'\" class=\"'.$active.'\"></li>';\n $items .= '\n <div class=\"item'.$active.'\">\n <div class=\"image_block_wrapper\">\n <div class=\"image_block\" style=\"background: url('.$homepage_metabox->get_the_value('image').') center top no-repeat #000000;background-size: cover;\">\n <div class=\"quote_block\">\n <div class=\"wrap\">\n <div class=\"quote\">'.apply_filters('the_content',$homepage_metabox->get_the_value('quote')).'</div>\n <div class=\"attribution\">'.$homepage_metabox->get_the_value('attribution').'</div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"wrap\">\n <div class=\"content-sidebar-wrap row\">\n <main itemprop=\"mainContentOfPage\" role=\"main\" class=\"content col-md-8 col-sm-12\">\n <article itemtype=\"http://schema.org/CreativeWork\" itemscope=\"itemscope\" class=\"page entry\">\n <header class=\"entry-header\">\n <h1 itemprop=\"headline\" class=\"entry-title\">'.$homepage_metabox->get_the_value('title').'</h1> \n </header>\n <div itemprop=\"text\" class=\"entry-content\">\n '.apply_filters('the_content',$homepage_metabox->get_the_value('content')).'\n </div>\n </article>\n </main>\n <aside itemtype=\"http://schema.org/WPSideBar\" itemscope=\"itemscope\" role=\"complementary\" class=\"sidebar sidebar-primary widget-area col-md-4 hidden-sm hidden-xs\">\n '.apply_filters('the_content',$homepage_metabox->get_the_value('sidebar')).'\n </aside>\n </div>\n </div>\n </div>';\n $i++;\n endwhile;\n print msd_carousel_wrapper($items,array('id' => $id,'indicators' => $indicators));\n print '</div>';\n}", "function cs_get_home_slider(){\n global $cs_theme_option;\n\tif($cs_theme_option['show_slider'] ==\"on\"){\n\t\tif($cs_theme_option['slider_type'] <> \"Revolution Slider\"){?>\n\t\t <div id=\"banner\" class=\"fullwidth\">\n\t\t\t<div class=\"fullwidth\" id=\"bannerwrapp\">\n\t\t\t <?php \n\t\t\t\t if($cs_theme_option['layout_option']== \"wrapper\"){\n\t\t\t\t\t\t $width = 1270;\n\t\t\t\t\t\t $height = 500;\n\t\t\t\t } else {\n\t\t\t\t\t\t $width = 1170;\n\t\t\t\t\t\t $height = 430;\n\t\t\t\t }\n\t\t\t\t $slider_slug = $cs_theme_option['slider_name'];\n\t\t\t\t if($slider_slug <> ''){\n\t\t\t\t\t $args=array(\n\t\t\t\t\t\t'name' => $slider_slug,\n\t\t\t\t\t\t'post_type' => 'cs_slider',\n\t\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t\t'showposts' => 1,\n\t\t\t\t\t );\n\t\t\t\t\t $get_posts = get_posts($args);\n\t\t\t\t\t if($get_posts){\n\t\t\t\t\t\t $slider_id = $get_posts[0]->ID;\n\t\t\t\t\t\t if($cs_theme_option['slider_type'] == 'Flex Slider'){\n\t\t\t\t\t\t\tcs_flex_slider($width,$height,$slider_id);\n\t\t\t\t\t\t }\n\t\t\t\t\t } else {\n\t\t\t\t\t\t $slider_id = '';\n\t\t\t\t\t\t echo '<div class=\"box-small no-results-found heading-color\"> <h5>';\n\t\t\t\t\t\t\t\t _e(\"No results found.\",'Rocky');\n\t\t\t\t\t\t echo ' </h5></div>';\n\t\t\t\t\t }\n\t\t\t\t }\n \t\t\t\t?>\n\t\t\t</div>\n\t\t </div>\n\t\t<?php \n\t\t}else{\n\t\t\techo do_shortcode(htmlspecialchars_decode($cs_theme_option['slider_id']));\t\n\t\t}\n\t}\n}", "function acitpo_custom_header_admin_preview() {\n\t$style = sprintf( ' style=\"color:#%s;\"', get_header_textcolor() );\n\t$header_image = get_header_image();\n?>\n\t<div id=\"headimg\">\n\t\t<?php if ( ! empty( $header_image ) ) : ?>\n\t\t<img src=\"<?php echo esc_url( $header_image ); ?>\" alt=\"\">\n\t\t<?php endif; ?>\n\t\t<h1 class=\"displaying-header-text\"><a id=\"name\"<?php echo $style; ?> onclick=\"return false;\" href=\"<?php echo esc_url( home_url( '/' ) ); ?>\"><?php bloginfo( 'name' ); ?></a></h1>\n\t\t<div class=\"displaying-header-text\" id=\"desc\"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>\n\t</div>\n<?php\n}", "function add_slider_settings() {\n\t\t?>\n\t\t<script type=\"text/html\" id=\"tw-sliders-gallery-settings\">\n\t\t\t<div class=\"tw-sliders-slider-settings\">\n\t\t\t\t<h3><?php _e('Slider Settings','tw-sliders'); ?></h3>\n\t\t\t\t\n\t\t\t\t<label class=\"setting\">\t\t\t\t\t\n\t\t\t\t\t<input type=\"hidden\" class=\"uid\" data-setting=\"uid\" value=\"0\" />\n\t\t\t\t</label>\n\t\t\t\t\n\t\t\t\t<label class=\"setting\">\n\t\t\t\t\t<span><?php _e('Image width','tw-sliders'); ?></span>\n\t\t\t\t\t<input type=\"text\" class=\"width\" data-setting=\"width\" />\n\t\t\t\t\t<p class=\"description\"><?php _e('Leave empty to inherit','tw-sliders'); ?> (<?php echo get_option('tw-sliders-image-width'); ?>)</p>\n\t\t\t\t</label>\n\t\t\t\t\n\t\t\t\t<label class=\"setting\">\n\t\t\t\t\t<span><?php _e('Image height','tw-sliders'); ?></span>\n\t\t\t\t\t<input type=\"text\" class=\"height\" data-setting=\"height\" />\n\t\t\t\t\t<p class=\"description\"><?php _e('Leave empty to inherit','tw-sliders'); ?> (<?php echo get_option('tw-sliders-image-height'); ?>)</p>\n\t\t\t\t</label>\n\t\t\t\t\n\t\t\t\t<?php if($this->transitions) { ?>\n\t\t\t\t\t<label class=\"setting\">\n\n\t\t\t\t\t\t<span><?php _e('Transition','tw-sliders'); ?></span>\n\n\t\t\t\t\t\t<select class=\"transition\" data-setting=\"transition\">\n\t\t\t\t\t\t\t<option value=\"inherit\" selected><?php _e( 'Current setting', 'tw-sliders' ); ?></option>\n\n\t\t\t\t\t\t\t<?php foreach( $this->transitions as $transition => $label ) { ?>\n\t\t\t\t\t\t\t\t<option value=\"<?php echo $transition; ?>\">\n\t\t\t\t\t\t\t\t\t<?php echo $label; ?>\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t\t</select>\n\n\t\t\t\t\t</label>\n\t\t\t\t<?php } ?>\n\t\t\t\t\n\t\t\t\t<label class=\"setting\">\n\t\t\t\t\t<span><?php _e('Speed (ms)','tw-sliders'); ?></span>\n\t\t\t\t\t<input type=\"text\" class=\"speed\" data-setting=\"speed\" />\n\t\t\t\t\t<p class=\"description\"><?php _e('Leave empty to inherit','tw-sliders'); ?> (<?php echo get_option('tw-sliders-speed'); ?>)</p>\n\t\t\t\t</label>\n\t\t\t\t\n\t\t\t\t<label class=\"setting\">\n\t\t\t\t\t<span><?php _e('Timeout (ms)','tw-sliders'); ?></span>\n\t\t\t\t\t<input type=\"text\" class=\"timeout\" data-setting=\"timeout\" />\n\t\t\t\t\t<p class=\"description\"><?php _e('Leave empty to inherit','tw-sliders'); ?> (<?php echo get_option('tw-sliders-timeout'); ?>)</p>\n\t\t\t\t</label>\n\t\t\t\t\n\t\t\t\t<?php if($this->navigation) : ?>\n\t\t\t\t\t<label class=\"setting\">\n\t\t\t\t\t\t<span><?php _e('Navigation','tw-sliders'); ?></span>\n\t\t\t\t\t\t<select class=\"navigation\" data-setting=\"navigation\">\n\t\t\t\t\t\t\t<option value=\"inherit\" selected><?php _e('Current setting','tw-sliders'); ?></option>\n\t\t\t\t\t\t\t<?php foreach($this->navigation as $navigate=>$meta) : ?>\n\t\t\t\t\t\t\t\t<option value=\"<?php echo $navigate; ?>\"><?php echo $meta['name']; ?></option>\n\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</label>\n\t\t\t\t<?php endif; ?>\n\t\t\t</div>\n\t\t</script>\n\t\t<?php\n\t}", "function tb_longwave_header_options_callback() {\n\techo '<p>Settings for things visible in the Head of the theme.</p>';\n}", "function dfcg_help_css() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Gallery CSS', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'The DCG Settings > Gallery CSS tab gives lots of options for customising the gallery\\'s CSS.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The most important options here are those for the gallery height and gallery width. Not only do these settings determine the size of the gallery on the page, they also set the size of the images that the DCG automatically creates during the media upload process. Some points to note:', DFCG_DOMAIN ); ?></p>\n\t<ul>\n\t\t<li><?php _e( 'Once the gallery size settings have been saved, automatically sized images will only be created for new images uploaded from that point on.', DFCG_DOMAIN ); ?></li>\n\t\t\n\t\t<li><?php printf( '%s <a href=\"%s\" target=\"_blank\">%s</a> %s', __( 'To create DCG sized versions of images that are already in the Media Library, use the excellent', DFCG_DOMAIN ), 'http://wordpress.org/extend/plugins/regenerate-thumbnails/', __( 'Regenerate Thumbnails' ), __( 'plugin' ) ); ?>.</li>\n\t\t\n\t\t<li><?php _e( 'You will be prompted to run the Regenerate Thumbnails plugin whenever you change the gallery dimensions in the DCG Settings > Gallery CSS tab.', DFCG_DOMAIN ); ?></li>\n\t</ul>\n\t\n\t<p><?php _e( 'The default settings of the Gallery CSS tab have been designed to be a good starting point. Apart from the gallery height and width mentioned earlier, the other important setting here is the Slide Pane height setting. Note that when using the jQuery script option, the Slide Pane height is set automatically.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "public function handleWpAction_after_setup_theme() {\n add_theme_support('automatic-feed-links');\n add_theme_support('post-thumbnails');\n add_custom_background();\n register_nav_menus( array(\n 'primary' => __( 'Primary Navigation', 'ddrem' ),\n 'footer' => __( 'Footer Navigation', 'ddrem' ),\n ) );\n\n add_option('ddrem_layout_global_width', '900px');\n add_option('ddrem_layout_sidebar_location', 'right');\n add_option('ddrem_layout_sidebar_width', '250px');\n \n add_option('ddrem_layout_header_image_show', false);\n add_option('ddrem_layout_header_image_width', (int)get_option('ddrem_layout_global_width'));\n add_option('ddrem_layout_header_image_height', '100');\n \n add_option('ddrem_layout_css_theme', 'template|css/theme/iaous.css');\n add_option('ddrem_layout_css_navigation', '');\n add_option('ddrem_layout_css_comments', 'template|css/comments/twentyten.css');\n \n add_option('ddrem_site_copyright_name', get_option('blogname'));\n add_option('ddrem_site_copyright_url', home_url('/'));\n add_option('ddrem_site_copyright_date', date('Y'));\n \n //if ( get_option('ddrem_layout_header_image_show') ) {\n // add_custom_image_header( '', '' );\n //}\n \n //define( 'HEADER_IMAGE_WIDTH', apply_filters( 'ddrem_header_image_width', get_option('ddrem_layout_header_image_width') ) );\n //define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'ddrem_header_image_height', get_option('ddrem_layout_header_image_height') ) );\n \n //set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );\n //define( 'NO_HEADER_TEXT', true );\n \n if ( ! is_admin() ) {\n \n wp_enqueue_style('ddrem_core', get_bloginfo('template_directory').'/core.css');\n \n if ( get_option('ddrem_layout_css_navigation') ) {\n list($type, $file) = explode('|', get_option('ddrem_layout_css_navigation'));\n if ( $type == 'template' ) {\n wp_enqueue_style('ddrem_navigation', get_bloginfo('template_directory').'/' . $file);\n } else {\n wp_enqueue_style('ddrem_navigation', get_bloginfo('stylesheet_directory').'/' . $file);\n }\n }\n if ( get_option('ddrem_layout_css_comments') ) {\n list($type, $file) = explode('|', get_option('ddrem_layout_css_comments'));\n if ( $type == 'template' ) {\n wp_enqueue_style('ddrem_navigation', get_bloginfo('template_directory').'/' . $file);\n } else {\n wp_enqueue_style('ddrem_navigation', get_bloginfo('stylesheet_directory').'/' . $file);\n }\n } \n if ( get_option('ddrem_layout_css_theme') ) {\n list($type, $file) = explode('|', get_option('ddrem_layout_css_theme'));\n if ( $type == 'template' ) {\n wp_enqueue_style('ddrem_theme', get_bloginfo('template_directory').'/' . $file);\n } else {\n wp_enqueue_style('ddrem_theme', get_bloginfo('stylesheet_directory').'/' . $file);\n }\n }\n \n wp_enqueue_style('ddrem', get_bloginfo('stylesheet_directory').'/style.css');\n \n }\n\n }", "function mediavuk_scripts() {\n wp_enqueue_script('responsiveslider', get_template_directory_uri() . '/js/responsiveslides.min.js', array(), '', true);\n wp_enqueue_script('accordion-mediavuk', get_template_directory_uri() . '/js/mediavuk-accordion.js', array(), '', true);\n wp_enqueue_style( 'mediavuk-style', get_stylesheet_directory_uri() . '/style.css', array(), filemtime( get_stylesheet_directory() . '/style.css' ) );\n wp_enqueue_style('unslider', get_template_directory_uri() . '/css/unslider.css');\n wp_deregister_script('jQuery');\n wp_enqueue_script('unslider', get_template_directory_uri() . '/js/unslider-min.js', array(), '', true);\n wp_enqueue_script('hamburgers', get_template_directory_uri() . '/js/hamburgers.js', array(), '', true);\n\n // wp_enqueue_script('mediavuk-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true);\n\n if (is_singular() && comments_open() && get_option('thread_comments')) {\n wp_enqueue_script('comment-reply');\n }\n}", "function safed_widgets_init() {\n \n register_sidebar( array(\n 'name' => __( 'Widget Banner 1', 'safed' ),\n 'id' => 'banner_area_1',\n 'description' => __( 'Appears with [banner_one]', 'safed' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s safed__dynamic-module\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n register_sidebar( array(\n 'name' =>__( 'Widget Banner 2', 'safed'),\n 'id' => 'banner_area_2',\n 'description' => __( 'Appears with [banner_two]', 'safed' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s safed__dynamic-module\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n }", "function wpvideocoach_dashboard_slider_content() {\r\n // Content of our Dashboard slider module\r\n\t$adminurl = admin_url('admin.php?page=wpvideocoach');\r\n\techo \"<div id='logo-slider-wrapper'><ul id='logo-slider'>\";\r\n echo wpvideocoach_videos_slider();\r\n\techo \"</ul></div><div id='dashboard-intro'><p>\" . wpvideocoach_dashboard_slider_introduction() . \"</p><p><a class='button' href='\" . $adminurl . \"'>Watch all videos</a></p></div>\";\r\n\techo wpvideocoach_video_link_color_slider();\r\n\techo \"<div class='clear'></div>\";\r\n}", "function lumo_slider(){\n\t\t$slides = new Lumo_Slider_Query();\n\n\t\tif( $slides->have_posts() ) :\n\t\t\t$display = \"\";\n\t\t\techo '<ul id=\"lumo-slider\">';\n\t\t\twhile( $slides->have_posts() ) : $slides->the_post();\n\t\t\t\t$slide_image = get_the_post_thumbnail(get_the_ID(), 'home-slider-image-lowrez');\n\t\t\t\t$slide_image_url = wp_get_attachment_url( get_post_thumbnail_id(get_the_ID(), 'home-slider-image') );\n\n\t\t\t\t$set_width_fullrez = sprintf('width=\"100%%\" data-fullrez=\"%s\"', esc_url($slide_image_url) );\n\n\t\t\t\t$slide_image = preg_replace('/width=\"\\d+\" +height=\"\\d+\"/', $set_width_fullrez, $slide_image);\n\n\t\t\t\techo '<li class=\"lumo-slide\" style=\"'.$display.'\">';\n\t\t\t\t\techo $slide_image;\n\t\t\t\t\techo '<div class=\"hero-placeholder\"></div>';\n\t\t\t\t\techo '<div class=\"hero\">';\n\t\t\t\t\t\t\techo '<h4 class=\"hero\">'.get_the_title().'</h4>';\n\t\t\t\t\t\t\tthe_content();\n\t\t\t\t\techo '</div>';\n\t\t\t\techo '</li>';\n\t\t\t\t$display = \" display:none; \";\n\t\t\tendwhile;\n\t\t\twp_reset_postdata();\n\t\t\techo '</ul>';\n\t\tendif;\n\t}", "function _wppa_page_help() {\r\nglobal $wppa_revno;\r\n\r\n\r\n?>\r\n\t<div class=\"wrap\">\r\n<?php \r\n\t\t$iconurl = \"http://www.gravatar.com/avatar/b421f77aa39db35a5c1787240c77634f?s=32&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&amp;r=G\";\r\n?>\t\t\r\n\t\t<div id=\"icon-album\" class=\"icon32\" style=\"background: transparent url(<?php echo($iconurl); ?>) no-repeat\">\r\n\t\t\t<br />\r\n\t\t</div>\r\n\t\t<h2><?php _e('Help and Information', 'wppa'); ?></h2>\r\n\t\t\r\n\t\t<h3><?php _e('Plugin Description', 'wppa'); ?></h3>\r\n <p><?php _e('This plugin is designed to easily manage and display your photo albums within your WordPress site.', 'wppa'); ?></p>\r\n\t\t\t<?php _e('Features:', 'wppa'); ?><br /><br />\r\n\t\t\t<ul class=\"wppa-help-ul\">\r\n\t\t\t\t<li><?php _e('You can create various albums that contain photos as well as sub albums at the same time.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('There is no limitation to the number of albums and photos.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('There is no limitation to the nesting depth of sub-albums.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('You have full control over the display sizes of the photos.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('You can specify the way the albums are ordered.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('You can specify the way the photos are ordered within the albums, both on a system-wide as well as an per album basis.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('The visitor of your site can run a slideshow from the photos in an album by a single mouseclick.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('The visitor can see an overview of thumbnail images of the photos in album.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('The visitor can browse through the photos in each album you decide to publish.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('You can add a Sidebar Widget that displays a photo which can be changed every hour, day or week.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('You can add a Sidebar Search Widget that enables the visitor to search for albums and photos with certan words in the name or description.', 'wppa'); ?></li>\r\n\t\t\t</ul>\r\n\t\t\r\n\t\t<h3><?php _e('Plugin Admin Features', 'wppa'); ?></h3>\r\n\t\t<p><?php _e('You can find the plugin admin section under Menu Photo Albums on the admin screen.', 'wppa'); ?></p>\r\n\t\t\t<?php _e('The following submenus exist.', 'wppa'); ?><br /><br />\r\n\t\t\t<ul class=\"wppa-help-ul\">\r\n\t\t\t\t<li><?php _e('Photo Albums: Create and manage Albums.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('Upload photos: To upload photos to an album you created.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('Import photos: To bulk import photos that have been uploaded by an ftp program.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('Settings: To control the various settings to customize your needs.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('Sidebar Widget: To specify the behaviour for an optional sidebar widget.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('Help & Info: The screen you are watching now.', 'wppa'); ?></li>\r\n\t\t\t</ul>\r\n\r\n\t\t<h3><?php _e('Installation', 'wppa'); ?></h3>\r\n\t\t<ul>\r\n\t\t\t<li><?php _e('You can install the plugin via the standard WP plugins admin page.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('If you want to do it manually, follow the next steps:', 'wppa'); ?></li>\r\n\t\t</ul>\r\n <ol class=\"wppa-help-ol\">\r\n\t\t\t<li><?php _e('Unzip and upload the wppa plugin folder to', 'wppa'); ?> <tt>wp-content/plugins/</tt></li>\r\n\t\t\t<li><?php _e('Make sure that the folder', 'wppa'); ?> <tt>wp-content/uploads/</tt> <?php _e('exists and is writable by the server (CHMOD 755)', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Activate the plugin in WP Admin -> Plugins.', 'wppa'); ?></li>\r\n\t\t</ol>\r\n\r\n <h3><?php _e('Upgrading WP Photo Album Plus', 'wppa'); ?></h3>\r\n <p><?php _e('When upgrading WP Photo Album Plus be aware of:', 'wppa'); ?></p>\r\n <ul class=\"wppa-help-ul\">\r\n\t\t\t<li><?php _e('The revision number consists of 3 parts, Major, minor and fix revision. The current version is:', 'wppa'); echo(' '.$wppa_revno); ?><br /></li>\r\n\t\t\t<li><?php _e('When an update implies a major or minor version change and you have copied wppa_theme.php or wppa_style.css to your themes directory, you will have to remove them and make new copies and/or alterations if that should still be needed.', 'wppa'); ?><br />\r\n\t\t\t\t<?php _e('You will get a one-time reminder after upgrading, the first time you open a wppa admin page.', 'wppa'); ?></li>\r\n\t\t</ul>\r\n \r\n\t\t<h3><?php _e('How to start', 'wppa'); ?></h3>\r\n <ol class=\"wppa-help-ol\">\r\n\t\t\t<li><?php _e('Install WP Photo ALbum Plus as described above under \"Installation\".', 'wppa'); ?></li>\r\n <li><?php _e('Create at least two albums in the \"Photo Albums\" tab. Just enter the name and a brief description and press \"Create Album\". Leave \"Parent\" at \"--- none ---\".', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('In the uploads tab, you can now upload you photots. Upload at least 2 photos to each album. Make sure the photos you are uploading are of reasonable size (say up to 1024x768 pixels). Do not upload the full 7MP images!', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Create a new WP Page, name it something like \"Photo Gallery\" and put in the content:', 'wppa'); ?> <tt>%%wppa%%</tt></li>\r\n\t\t\t<li><?php _e('Publish the page, and view the page from your WP site.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Now, go playing with the settings in the \"Settings\" panel, discover all the configurable options and watch what is happening when you re-open the \"Photo Gallery\" page.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('If you want a \"Photo of the week\" sidebar widget you can use an album for that purpose. See all the options in the \"Sidebar Widget\" submenu.', 'wppa'); ?></li>\r\n </ol>\r\n\r\n\t\t<h3><?php _e('Creating a Photo Album Page or a Post with photos - Advanced', 'wppa'); ?></h3>\r\n\t\t<p>\r\n\t\t\t<?php _e('Create a page like you normally would in WordPress, using the \"Default Template\". In my example, give it the page title of \"Photo Gallery\". In the Page Content section add the following code:', 'wppa'); ?><br />\r\n\t\t\t<tt>%%wppa%%</tt><br />\r\n\t\t\t<?php _e('This will result in a gallery of all Albums that have their parent set to \"--- none ---\".', 'wppa'); ?><br /><br />\r\n\t\t\t<?php _e('If you want to display a single album - say album number 19 - in a WP page or WP post (they act exactly the same), add a second line like this:', 'wppa'); ?><br />\r\n\t\t\t<tt>%%album=19%%</tt><br />\r\n\t\t\t<?php _e('This will result in the display of the <b>contents</b> of album nr 19.', 'wppa'); ?><br /><br />\r\n\t\t\t<?php _e('If you want to display the <b>cover</b> of the album, i.e. like one of the albums in the \"Photo Gallery\" as used above, add (instead of \"%%album=...\") a second line like this:', 'wppa'); ?><br />\r\n\t\t\t<tt>%%cover=19%%</tt><br /><br />\r\n\t\t\t<?php _e('If you want to display the <b>slideshow</b> directly, use:', 'wppa'); ?><br />\r\n\t\t\t<tt>%%slide=19%%</tt><br /><br />\r\n\t\t\t<?php _e('You can add a third line if you want the photos to be displayed at a different size than normal. You can \"overrule\" the \"Full size\" setting by adding the line (for e.g. 300px):', 'wppa'); ?><br />\r\n\t\t\t<tt>%%size=300%%</tt><br /><br />\r\n\t\t\t<?php _e('Note: all information between the %% tags including newlines will be lost.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('The sequence above may be used more than once in a single page or post.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('The text before the first sequence, the text between 2 sequences, as well as the text after the last sequence will be preserved.', 'wppa'); ?><br />\r\n\t\t\t<br/ ><br />\r\n\t\t\t<?php _e('You can also create a custom page template by dropping the following code into a page template:', 'wppa'); ?><br />\r\n\t\t\t<tt>&lt;?php wppa_albums(); ?&gt;</tt><br /><br />\r\n\t\t\t<?php _e('If you want to display the <b>contents</b> of a single album in the template - say album number 19 - the code would be:', 'wppa'); ?><br />\r\n\t\t\t<tt>&lt;?php wppa_albums(19); ?&gt;</tt> or <tt>&lt;?php wppa_albums(19, 'album'); ?&gt;</tt><br />\r\n\t\t\t<?php _e('If you want the <b>cover</b> to be displayed instead, use the following code:', 'wppa'); ?><br />\r\n\t\t\t<tt>&lt;?php wppa_albums(19, 'cover'); ?&gt;</tt><br />\r\n\t\t\t<?php _e('And to display the <b>slideshow</b> it would be:', 'wppa'); ?><br />\r\n\t\t\t<tt>&lt;?php wppa_albums(19, 'slide'); ?&gt;</tt><br /><br />\r\n\t\t\t<?php _e('If you want to specify a size, add another argument:', 'wppa'); ?><br />\r\n\t\t\t<tt>&lt;?php wppa_albums(19, 'album', 300); ?&gt;</tt><br /><br />\r\n\t\t\t<?php _e('For more information on usable php routines see the <a href=\"http://wppa.opajaap.nl/\">Docs & Demos</a> website.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('In order to work properly, the wppa_albums() tag needs to be within the <a href=\"http://codex.wordpress.org/The_Loop\" target=\"_blank\">WordPress loop</a>.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('For more information on creating custom page templates, click', 'wppa'); ?> <a href=\"http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates\"><?php _e('here', 'wppa'); ?></a>.<br />\r\n\t\t</p>\r\n\t\t\r\n\t\t<h3><?php _e('Adjusting CSS and Template Styling', 'wppa'); ?></h3>\r\n\t\t<p>\r\n\t\t\t<?php _e('WP Photo Album Plus comes with a default layout and theme.', 'wppa'); ?>\r\n\t\t\t<?php _e('To change the style and layout of the photo album, copy <tt>.../wp-content/plugins/wp-photo-album-plus/theme/wppa_theme.php</tt> and <tt>.../wp-content/plugins/wp-photo-album-plus/theme/wppa_style.css</tt> to your active theme\\'s folder, and edit them.', 'wppa'); ?>\r\n\t\t</p>\r\n\t\t\r\n\t\t<h3><?php _e('Facts to remember', 'wppa'); ?></h3>\r\n\t\t<ul class=\"wppa-help-ul\">\r\n\t\t\t<li><?php _e('If the number of photos in an album is less than or equal to the treshold value, they will not display in the album. They will be used for the cover only.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('An album that has it\\'s parent set to \"--- separate ---\" will not be displayed in the \"generic\" gallery. This enables you to have albums for use solely for single posts or pages.', 'wppa'); ?>\r\n\t\t\t<li><?php _e('Specifying <tt>%%album=...</tt> causes the <b>content</b> of the album to be displayed.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Specifying <tt>%%cover=...</tt> causes the <b>cover</b> of the album to be displayed.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Specifying <tt>%%slide=...</tt> causes the <b>slideshow</b> of the album to be displayed.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Keep the sequence intact: 1. <tt>%%wppa%%</tt>, 2. <tt>%%album=</tt> or <tt>%%cover=</tt> or <tt>%%slide=</tt>, 3. <tt>%%size=</tt>. (2. being optional even when using 3.).', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Use the default page template, or create one yourself.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('You can remove the plugin and re-install the latest version always. This will not affect your photos or albums.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('You may combine %% items on one line like: <tt>%%wppa%% %%cover=13%% %%size=250%%</tt>', 'wppa'); ?></li>\r\n\t\t\t</ul>\r\n\t\r\n\t\t<h3><?php _e('Plugin Support And Feature Request', 'wppa'); ?></h3>\r\n\t\t<p>\r\n\t\t\t<?php _e('If you\\'ve read over this readme carefully and are still having issues, if you\\'ve discovered a bug,', 'wppa'); ?>\r\n\t\t\t<?php _e('or have a feature request, please check the <a href=\"http://wordpress.org/tags/wp-photo-album-plus\">forum</a> for this plugin and/or leave a question there.', 'wppa'); ?>\r\n\t\t\t<br />\r\n\t\t\t<?php _e('For hot fixes check the <a href=\"http://plugins.trac.wordpress.org/log/wp-photo-album-plus/\">development log</a> for this plugin.', 'wppa'); ?>\r\n\t\t\t<br />\r\n\t\t\t<?php _e('You may also visit the <a href=\"http://wppa.opajaap.nl/\" target=\"_blank\">WPPA+ Docs & Demos site</a> that also contains the <a href=\"http://wppa.opajaap.nl/?page_id=39\" target=\"_blank\">WPPA+ Tutorial</a>.', 'wppa'); ?>\r\n\t\t</p>\r\n <p>\r\n\t\t\t<?php _e('If you love this plugin, I would appreciate a donation, either in <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US\">USD</a> or in <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=EUR&lc=US\">EURO</a>.', 'wppa'); ?>\r\n\t\t</p>\r\n\r\n\t\t<h3><?php _e('About and credits', 'wppa'); ?></h3>\r\n\t\t<p>\r\n\t\t\t<?php _e('WP Photo Album Plus is extended with many new features and is maintained by J.N. Breetvelt, a.k.a. (<a href=\"http://www.opajaap.nl/\">OpaJaap</a>)', 'wppa'); ?><br />\r\n\t\t\t<?php _e('Thanx to R.J. Kaplan for WP Photo Album 1.5.1.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('Thanx to E.S. Rosenberg for programming tips on security issues.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('Thanx to Pavel &#352;orejs for the Numbar code.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('Thanx to the users who reported bugs and asked for enhancements. Without them WPPA should not have been what it is now!', 'wppa'); ?>\r\n\t\t</p>\r\n\t\t\r\n\t\t<h3><?php _e('Licence', 'wppa'); ?></h3>\r\n\t\t<p>\r\n\t\t\t<?php _e('WP Photo Album is released under the', 'wppa'); ?> <a href=\"http://www.gnu.org/copyleft/gpl.html\">GNU GPL</a> <?php _e('licence.', 'wppa'); ?>\r\n\t\t</p>\r\n\t\t\r\n\t</div>\r\n<?php\r\n}", "function _static2($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"zn_slideshow\">\n <div class=\"container\">\n \t<div class=\"static-content boxes-style\">\n <?php\n\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_title'] ) && !empty ( $options['ww_slide_title'] ) ) {\n\t\t\t\t\t\t\techo '<h3 class=\"centered\">'.do_shortcode($options['ww_slide_title']).'</h3>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<div class=\"boxes row\">';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) || !empty ( $options['ww_box1_image'] ) || !empty ( $options['ww_box1_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) || !empty ( $options['ww_box1_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box1_image'].'\" alt=\"'.$options['ww_box1_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box1_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box1_desc'].'</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\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\tif ( !empty ( $options['ww_box2_title'] ) || !empty ( $options['ww_box2_image'] ) || !empty ( $options['ww_box2_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_title'] ) || !empty ( $options['ww_box2_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box2_image'].'\" alt=\"'.$options['ww_box2_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box2_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box2_desc'].'</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\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\tif ( !empty ( $options['ww_box3_title'] ) || !empty ( $options['ww_box3_image'] ) || !empty ( $options['ww_box3_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_title'] ) || !empty ( $options['ww_box3_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box3_image'].'\" alt=\"'.$options['ww_box3_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box3_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box3_desc'].'</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\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\techo '</div>';\n\t\t\t\t\t\t\n\t\t\t\t\t?>\n\n <script type=\"text/javascript\">\n\t\t\t\t\t\t(function($){\n \tvar boxes = $('.static-content .boxes');\n\t\t\t\t\t\t\tboxes.children().hover(function () {\n\t\t\t\t\t\t\t\tvar _t = $(this);\n\t\t\t\t\t\t\t\t_t.animate({'margin-top':-10}, {duration:500, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t\t_t.siblings().animate({opacity:0.4}, {duration:500, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\tvar _t = $(this);\n\t\t\t\t\t\t\t\t_t.animate({'margin-top':0}, {duration:400, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t\t_t.siblings().animate({opacity:1}, {duration:400, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})(jQuery);\n </script>\n </div>\n </div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function _static2($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"zn_slideshow\">\n <div class=\"container\">\n \t<div class=\"static-content boxes-style\">\n <?php\n\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_title'] ) && !empty ( $options['ww_slide_title'] ) ) {\n\t\t\t\t\t\t\techo '<h3 class=\"centered\">'.do_shortcode($options['ww_slide_title']).'</h3>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<div class=\"boxes row\">';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) || !empty ( $options['ww_box1_image'] ) || !empty ( $options['ww_box1_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) || !empty ( $options['ww_box1_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box1_image'].'\" alt=\"'.$options['ww_box1_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box1_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box1_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box1_desc'].'</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\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\tif ( !empty ( $options['ww_box2_title'] ) || !empty ( $options['ww_box2_image'] ) || !empty ( $options['ww_box2_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_title'] ) || !empty ( $options['ww_box2_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box2_image'].'\" alt=\"'.$options['ww_box2_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box2_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box2_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box2_desc'].'</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\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\tif ( !empty ( $options['ww_box3_title'] ) || !empty ( $options['ww_box3_image'] ) || !empty ( $options['ww_box3_desc'] ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"span4\">';\n\t\t\t\t\t\t\t\techo '<div class=\"info_pop\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_title'] ) || !empty ( $options['ww_box3_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<h4 class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_image'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo '<img src=\"'.$options['ww_box3_image'].'\" alt=\"'.$options['ww_box3_title'].'\"/>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_title'] ) ) {\n\t\t\t\t\t\t\t\t\t\t\techo $options['ww_box3_title'];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '</h4>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( !empty ( $options['ww_box3_desc'] ) ) {\n\t\t\t\t\t\t\t\t\t\techo '<p>'.$options['ww_box3_desc'].'</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\techo '</div>';\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\techo '</div>';\n\t\t\t\t\t\t\n\t\t\t\t\t?>\n\n <script type=\"text/javascript\">\n\t\t\t\t\t\t(function($){\n \tvar boxes = $('.static-content .boxes');\n\t\t\t\t\t\t\tboxes.children().hover(function () {\n\t\t\t\t\t\t\t\tvar _t = $(this);\n\t\t\t\t\t\t\t\t_t.animate({'margin-top':-10}, {duration:500, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t\t_t.siblings().animate({opacity:0.4}, {duration:500, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\tvar _t = $(this);\n\t\t\t\t\t\t\t\t_t.animate({'margin-top':0}, {duration:400, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t\t_t.siblings().animate({opacity:1}, {duration:400, queue:false, easing:'easeOutExpo'});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})(jQuery);\n </script>\n </div>\n </div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function widget($args, $inst)\n {\n// $title = apply_filters( 'widget_title', $instance['title'] );\n// $title_color = apply_filters( 'widget_title', $instance['title_color'] );\n $image_about = $this->getVal( $inst, 'image_about' );\n $title_color = $this->getVal( $inst, 'title_color' );\n $title = $this->getVal( $inst, 'title' );\n $desc = $this->getVal( $inst, 'desc' );\n ?>\n <section class=\"ftco-section services-section\" id=\"about\">\n <div class=\"container\">\n <div class=\"row no-gutters\">\n <div class=\"col-md-6 p-md-5 img img-2 d-flex justify-content-center align-items-center\" style=\"background-image: url(<?php echo $image_about; ?>);\">\n </div>\n <div class=\"col-md-6 wrap-about py-md-5 ftco-animate\">\n <div class=\"heading-section mb-5 pl-md-5\">\n <span class=\"subheading\"><?php echo $title_color; ?></span>\n <h2 class=\"mb-4\"><?php echo $title; ?></h2>\n <p><?php echo $desc; ?></p>\n </div>\n </div>\n </div>\n </div>\n </section>\n<?php\n }", "function tierone_delta_settings(){\n\n\t\tload_theme_textdomain('tierone', get_template_directory() . '/languages');\n\n\t\t// Custom Image Crop\n\t\tadd_image_size('tier-featured-slider', 801, 423, true);\n\t\tadd_image_size('tier-featured-lights', 321, 161, true);\n\t\tadd_image_size('tier-featured-large', 870, 600, true);\n\t\tadd_image_size('tier-featured-medium', 473, 213, true);\n\t\tadd_image_size('tier-featured', 360, 218, true);\n\t\tadd_image_size('tier-featured-d', 380, 170, true);\n\t\tadd_image_size('tier-featured-post-ba', 311, 204, true);\n\t\tadd_image_size('tier-featured-post-bc', 177, 108, true);\n\t\tadd_image_size('tier-featured-small', 230, 118, true);\n\t\tadd_image_size('tier-featured-xs', 76, 76, true);\n\n /*\n * Let WordPress manage the document title.\n * By adding theme support, we declare that this theme does not use a\n * hard-coded <title> tag in the document head, and expect WordPress to\n * provide it for us.\n */\n add_theme_support('title-tag');\n\n\t\t/**\n\t\t * Add Custom Logo Support\n\t\t */\n\t\tadd_theme_support( 'custom-logo' );\n\n\t\t\n\t\tadd_theme_support('post-thumbnails');\n\n\n\t\t// This theme uses wp_nav_menu() in one location.\n\t\tregister_nav_menus(array(\n\t\t\t'primary-menu' => esc_html__( 'Primary Menu', 'tierone-delta' ),\n\t\t\t'footer-menu' => esc_html__( 'Footer Menu', 'tierone-delta' )\n\t\t));\n\n\n\t\t/*\n\t\t * Switch default core markup for search form, comment form, and comments\n\t\t * to output valid HTML5.\n\t\t */\n\t\tadd_theme_support('html5',array('search-form','comment-form','comment-list','gallery','caption'));\n\n\n\t\t/*\n\t\t * Enable support for Post Formats.\n\t\t * See https://developer.wordpress.org/themes/functionality/post-formats/\n\t\t */\n\t\tadd_theme_support('post-formats', array(\n\t\t\t'aside',\n\t\t\t'image',\n\t\t\t'video',\n\t\t\t'quote',\n\t\t\t'link'\n\t\t));\n\n // Setup the WordPress core custom background feature.\n add_theme_support( 'custom-background' , apply_filters( 'tier_custom_background_cb', array(\n 'default-color' => 'ffffff',\n 'default-image' => '',\n )));\n \n\t}", "function cm_widget_welcome($args, $number = 1) {\n\textract($args);\n\t$options = get_option('widget_welcome');\n\t$title = $options[$number]['title'];\n\t$image = $options[$number]['image'];\n\t$text = apply_filters( 'widget_welcome', $options[$number]['text'] );\n\t\n\t$classic = get_option('cm_use_classic');\n\tif ($classic == 'true') {\n\t \tif (is_home()) {\n\t\t\techo '<div class=\"widget widget_welcome_classic clearfix\">';\n\t\t\t\tif ( !empty( $title ) ) { echo \"<h2>\" . $title . \"</h2>\"; } ?>\n\t\t\t<p><?php if ( !empty( $image ) ) { echo '<img src=\"' . $image . '\" //>'; } \n\t\t\t\techo $text; ?></p>\n\t\t\t<?php echo $after_widget; \n\t \t} \n\t} else {\n\t\tif (is_home()) {\n\t\t\techo $before_widget;\n\t\t\t\tif ( !empty( $title ) ) { echo \"<h2>\" . $title . \"</h2>\"; } ?>\n\t\t\t\t<?php if ( !empty( $image ) ) { echo '<img src=\"' . $image . '\" //>'; } ?>\n\t\t\t<p>\n\t\t\t\t<?php echo $text; ?></p>\n\t\t\t<?php echo $after_widget; \n\t \t}\n\t}\n\t\t\n}", "public function admin_footer() {\r\n // JS skeleton for adding a slide\r\n if(get_post_type()=='cycloneslider'){\r\n // Empty Slide\r\n $vars = array();\r\n $vars['box_title'] = __('Slide *', 'cyclone-slider-2');\r\n $vars['image_url'] = '';\r\n $vars['i'] = '{id}';\r\n $vars['slide'] = $this->data->get_slide_defaults();\r\n foreach($vars['slide'] as $key=>$value){\r\n $vars['slide'][$key] = '';\r\n }\r\n $vars['slide']['type'] = 'image';\r\n $vars['effects'] = $this->data->get_slide_effects();\r\n $vars['debug'] = ($this->debug) ? cyclone_slider_debug($vars['slide']) : '';\r\n \r\n $empty_slide = $this->view->get_render('slide-edit.php', $vars);\r\n \r\n // Main skeleton container\r\n $vars = array();\r\n $vars['empty_slide'] = $empty_slide;\r\n \r\n $this->view->render('slides-skeleton.php', $vars);\r\n }\r\n }", "function cm_widget_ads() {\n?>\n<?php\n\t$ads = get_option('cm_show_ads'); // Gets the option from theme options page\n\t\tif($ads == 'No') { }\n\t\tif($ads == 'Yes') { \n\t\t\t$ad1_image = get_option('cm_ad_image_one');\n\t\t\t$ad1_url = get_option('cm_ad_url_one'); \n\t\t\t$ad2_image = get_option('cm_ad_image_two');\n\t\t\t$ad2_url = get_option('cm_ad_url_two');\n\t\t\t$ad3_image = get_option('cm_ad_image_three');\n\t\t\t$ad3_url = get_option('cm_ad_url_three');\n\t\t\t?>\n\t\t\n\t\t\t<div class=\"ads clearfix\">\n\t\t\t\t<a href=\"<?php echo $ad1_url; ?>\"><img src=\"<?php echo $ad1_image; ?>\" /></a>\n\t\t\t\t<a href=\"<?php echo $ad2_url; ?>\"><img src=\"<?php echo $ad2_image; ?>\" /></a>\n\t\t\t\t<a href=\"<?php echo $ad3_url; ?>\"><img src=\"<?php echo $ad3_image; ?>\" /></a>\n\t\t\t</div>\n\t\t<?php } ?>\n<?php\n}", "function santo_flickr_gallery_shortcode_exist() {\r\n\t\tadd_action( 'wp_footer', 'santo_flickr_js',100 );\r\n\t\tadd_action( 'wp_enqueue_scripts', 'santo_flickr_scripting' );\r\n}", "function gs_theme_setup() {\r\n\r\n\t/**\r\n\t * Load the theme functions library\r\n\t */\r\n\trequire_once('inc/library.php');\r\n\r\n\t/**\r\n\t * Load custom post types\r\n\t */\r\n\trequire_once('inc/cpt.slides.php'); \r\n\r\n\t/**\r\n\t * Load custom widgets\r\n\t */\r\n\trequire_once('inc/widget.feature-box/widget.feature-box.php'); \r\n\trequire_once('inc/widget.gs-recent-posts/widget.gs-recent-posts.php'); \r\n\r\n\t/**\r\n\t * Load custom admin features\r\n\t */\r\n\trequire_once('inc/admin/admin-branding.php'); \r\n\trequire_once('inc/admin/admin-menu.php'); \r\n\trequire_once('inc/admin/dashboard.recent-drafts.php'); \r\n\trequire_once('inc/admin/remove-dashboard-widgets.php'); \r\n\trequire_once('inc/admin/remove-default-widgets.php'); \r\n\trequire_once('inc/admin/tinymce-editor.php'); \r\n\trequire_once('inc/admin/user-capabilities.php'); \r\n\r\n \t/**\r\n * Removes WordPress version number from the document head (for security).\r\n\t *\r\n */\t\r\n\tremove_action('wp_head', 'wp_generator');\r\n\r\n \t/**\r\n * Registers theme menus.\r\n */\t\r\n\tregister_nav_menu('main', 'Main Navigation Menu');\r\n\t//register_nav_menu('Your Menu Name', 'Your Menu Description');\r\n\r\n \t/**\r\n * Registers thumbnail and featured image sizes.\r\n */\t\r\n\tadd_theme_support( 'post-thumbnails' );\r\n\tset_post_thumbnail_size( 150, 150, true ); // Normal post thumbnails\r\n\tadd_image_size( 'slide', 960, 300, true );\r\n\t//add_image_size( 'custom-thumb-name', 150, 150, true ); \r\n\r\n}", "function deployment_update_3() {\n\n\trequire_once ABSPATH . '/wp-admin/includes/plugin.php';\n\tactivate_plugins( WP_PLUGIN_DIR . '/lightbox-plus/lightboxplus.php' );\n\n\tupdate_option( 'lightboxplus_options', array(\n\t\t\"lightboxplus_multi\" => \"0\",\n\t\t\"use_inline\" => \"0\",\n\t\t\"inline_num\" => \"5\",\n\t\t\"lightboxplus_style\" => \"dark\",\n\t\t\"use_custom_style\" => \"1\",\n\t\t\"disable_css\" => \"0\",\n\t\t\"hide_about\" => \"1\",\n\t\t\"output_htmlv\" => \"0\",\n\t\t\"data_name\" => \"lightboxplus\",\n\t\t\"load_location\" => \"wp_footer\",\n\t\t\"load_priority\" => \"10\",\n\t\t\"use_perpage\" => \"1\",\n\t\t\"use_forpage\" => \"0\",\n\t\t\"use_forpost\" => \"1\",\n\t\t\"transition\" => \"elastic\",\n\t\t\"speed\" => \"300\",\n\t\t\"width\" => \"false\",\n\t\t\"height\" => \"false\",\n\t\t\"inner_width\" => \"false\",\n\t\t\"inner_height\" => \"false\",\n\t\t\"initial_width\" => \"30%\",\n\t\t\"initial_height\" => \"30%\",\n\t\t\"max_width\" => \"90%\",\n\t\t\"max_height\" => \"90%\",\n\t\t\"resize\" => \"1\",\n\t\t\"opacity\" => \"0.8\",\n\t\t\"preloading\" => \"1\",\n\t\t\"label_image\" => \"Image\",\n\t\t\"label_of\" => \"of\",\n\t\t\"previous\" => \"previous\",\n\t\t\"next\" => \"next\",\n\t\t\"close\" => \"close\",\n\t\t\"overlay_close\" => \"1\",\n\t\t\"slideshow\" => \"1\",\n\t\t\"slideshow_auto\" => \"0\",\n\t\t\"slideshow_speed\" => \"2500\",\n\t\t\"slideshow_start\" => \"start\",\n\t\t\"slideshow_stop\" => \"stop\",\n\t\t\"use_caption_title\" => \"1\",\n\t\t\"gallery_lightboxplus\" => \"0\",\n\t\t\"multiple_galleries\" => \"0\",\n\t\t\"use_class_method\" => \"0\",\n\t\t\"class_name\" => \"lbp_primary\",\n\t\t\"no_auto_lightbox\" => \"0\",\n\t\t\"text_links\" => \"0\",\n\t\t\"no_display_title\" => \"0\",\n\t\t\"scrolling\" => \"1\",\n\t\t\"photo\" => \"0\",\n\t\t\"rel\" => \"0\",\n\t\t\"loop\" => \"1\",\n\t\t\"esc_key\" => \"1\",\n\t\t\"arrow_key\" => \"1\",\n\t\t\"top\" => \"false\",\n\t\t\"bottom\" => \"false\",\n\t\t\"left\" => \"false\",\n\t\t\"right\" => \"false\",\n\t\t\"fixed\" => \"0\",\n\t) );\n}", "function dfcg_help_gallery() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Gallery Method', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'For many users the best option is One Category. It is great as a \"set and forget\" option, because it will always pull in the latest posts from your chosen category. The Custom Post option works in a similar way to the One Category method and is, obviously, the best option for pulling in posts from one Custom Post type. In server performance terms, these two methods are probably the most efficient ones to use.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The Multi-Option method is perfect for when you want to mix posts from different categories, for example if you want to feature the latest post from a number of different categories.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The ID Method is the most flexible because you can pull in any type of post (normal of Custom) and Pages, and mix them in any order you wish using the Sort Order field in the DCG metabox.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "function custom_shortcode_slider() \n {\n require_once(TEMPLATEPATH.'/shortcode/shortcode.php');\n }", "function _static5($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"zn_slideshow\">\n <div class=\"container\">\n \t<div class=\"static-content textpop-style\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\n\t\t\t\t\t\techo '<div class=\"texts\">';\n\t\t\t\t\t\t// Line 1\n\t\t\t\t\t\tif ( !empty ( $options['sc_pop_line1'] ) ) {\n\t\t\t\t\t\t\techo '<span class=\"line1\">'.$options['sc_pop_line1'].'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Line 2\n\t\t\t\t\t\tif ( !empty ( $options['sc_pop_line2'] ) ) {\n\t\t\t\t\t\t\techo '<span class=\"line2\">'.$options['sc_pop_line2'].'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Line 3\n\t\t\t\t\t\tif ( !empty ( $options['sc_pop_line3'] ) ) {\n\t\t\t\t\t\t\techo '<span class=\"line3\">'.$options['sc_pop_line3'].'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Line 4\n\t\t\t\t\t\tif ( !empty ( $options['sc_pop_line4'] ) ) {\n\t\t\t\t\t\t\techo '<span class=\"line4\">'.$options['sc_pop_line4'].'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '</div>';\n\n\t\t\t\t\t\t// BUTTON\n\t\t\t\t\t\tif ( $options['ww_slide_m_button'] || $options['ww_slide_l_text'] ) {\n\t\t\t\t\t\t\techo '<div class=\"info_pop animated fadeBoxIn\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( $options['ww_slide_l_text'] && isset ( $options['ww_slide_link']['url'] ) && !empty ( $options['ww_slide_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<a class=\"buyit\" href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['target'].'\">'.$options['ww_slide_l_text'].'</a>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// BUTTON LEFT TEXT\n\t\t\t\t\t\t\t\tif ( isset ( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_m_button'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t?>\n </div><!-- end static-content -->\n </div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function custom_template_single_trio_slogans()\n {\n global $product;\n ?>\n\t\t\t\t<div class=\"secondary-slider hidden-xs hidden-sm panel-row-style panel-row-style-for-1133-1\">\n\t\t\t\t\t<div class=\"widget_text secondary-slider-div panel-widget-style panel-widget-style-for-1133-1-0-0\">\n\t\t\t\t\t\t<div class=\"textwidget custom-html-widget\">\n\t\t\t\t\t\t\t<img src=\"https://www.travelerwishlist.com/wp-content/uploads/2017/08/Delivery.png\">\n\t\t\t\t\t\t\t<h4 class=\"secondary-slider-title\">Free shipping worldwide</h4>\n\t\t\t\t\t\t\t<span class=\"secondary-slider-text\">Our store operates worldwide and you can enjoy free delivery of all orders</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"widget_text secondary-slider-div panel-widget-style panel-widget-style-for-1133-1-0-0\">\n\t\t\t\t\t\t<div class=\"textwidget custom-html-widget\">\n\t\t\t\t\t\t\t<img src=\"https://www.travelerwishlist.com/wp-content/uploads/2017/08/100-Guarantee.png\">\n\t\t\t\t\t\t\t<h4 class=\"secondary-slider-title\">Money back guarantee</h4>\n\t\t\t\t\t\t\t<span class=\"secondary-slider-text\">We give your money back if ordered item(s) do not arrive within 1 month after order</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"widget_text secondary-slider-div panel-widget-style panel-widget-style-for-1133-1-0-0\">\n\t\t\t\t\t\t<div class=\"textwidget custom-html-widget\">\n\t\t\t\t\t\t\t<img src=\"https://www.travelerwishlist.com/wp-content/uploads/2017/08/SSL-Paypal.png\">\n\t\t\t\t\t\t\t<h4 class=\"secondary-slider-title\">100% secure payment</h4>\n\t\t\t\t\t\t\t<span class=\"secondary-slider-text\">Buy with confidence using the world's most popular and secure payment methods</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n <?php\n }", "function dfcg_help_scripts() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Javascript and Load Scripts', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'Go to the DCG Settings > Javascript Options tab to set the choice of mootools (default) or jQuery scripts. Note that after changing this settings, click Save, then return to the Javascript Options tab to configure the other options in this tab. You have to do this because the javascript options are not identical for both scripts.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The DCG Settings > Load Scripts tab allows you to specify in which pages the javascript and gallery CSS are loaded. These settings ensure that the javascript and CSS are only loaded where needed, and therefore will not slow down the page load on all the other pages on your site.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'In 99.9% of cases users will display the DCG on their home page. Therefore, if this is the case you for, select the Home page option in the DCG Settings > Load Scripts tab.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "public static function admin_head() {\n echo <<<EOD\n<style>\n .media-icon {\n background: #eee;\n box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.05);\n }\n\n .media-icon img[src$=\".svg\"],\n img[src$=\".svg\"].attachment-post-thumbnail {\n width: 100% !important;\n height: auto !important;\n }\n</style>\nEOD;\n }", "function dfcg_help_theme() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Theme Integration', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'Before doing anything else you need to integrate the DCG in your theme using either the DCG Widget or the DCG Template Tag.', DFCG_DOMAIN ); ?></p>\n\t\n\t<h4>DCG Widget</h4>\n\t\n\t<p><?php _e( 'Assuming your theme has widget areas on your home page, using the DCG Widget is the simplest method to use as no coding is required. Go to Dashboard > Appearance > Widgets and drag the DCG Widget to an appropriate widget area. You can then add a title (optional) and even some \"after\" text which will display below the DCG.', DFCG_DOMAIN ); ?> <em><?php _e( 'Note that even if using the DCG Widget, you must set up the various options on the DCG Settings page.', DFCG_DOMAIN ); ?></em></p>\n\t\n\t<h4><?php _e( 'DCG Template Tag', DFCG_DOMAIN ); ?></h4>\n\t\n\t<p><?php _e( 'Alternatively, you can use the template tag in a theme template, like this:', DFCG_DOMAIN ); ?></p>\n\t\n\t<code>&lt;php dynamic_content_gallery(); ?&gt;</code><br /><br />\n\t\n\t<p><?php _e( 'Check out this tutorial:', DFCG_DOMAIN ); ?> <a class=\"off-site\" target=\"_blank\" href=\"<?php echo DFCG_HOME; ?>configuration-guide/#template-code\"><?php _e( 'How to choose the correct theme template when using the DCG Template Tag', DFCG_DOMAIN ); ?></a></p>\n\n<?php\n}", "function dfcg_help_general() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'This Quick Help provides basic tips, accessed via the menu on the left, to help you understand how the plugin works and how to set up the Settings page. Additionally, detailed guides to Documentation, Configuration and other resources can be found via the DCG Resources links in the sidebar ---->', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><strong><?php _e( \"Inline Help: \", DFCG_DOMAIN ); ?></strong><?php _e( \"Many options in the Settings page have a helpful 'Tip' pop-up wherever you see this symbol:\", DFCG_DOMAIN ); ?> <img class=\"inline\" src=\"<?php echo DFCG_LIB_URL . '/admin-css-js/cluetip/images/help.png'; ?>\" alt=\"\" /></p>\n\t\n\n\t<h4><?php _e( 'Understanding the basics', DFCG_DOMAIN ); ?></h4>\n\t\n\t<p><?php _e( 'Each image in the DCG gallery is associated with a Post or a Page. The selection of posts/Pages is made in the Gallery Method tab. The Image Management options determine how the plugin selects the image for each Post/Page, either using the Featured Image or a manually chosen image URL entered in the in-post DCG Metabox.', DFCG_DOMAIN ); ?></p>\n\t\n\t<h4><?php _e( 'Please support future development!', DFCG_DOMAIN ); ?></h4>\n\t\n\t<p><?php _e( 'If you have found this plugin useful and wish to help support its future development, please consider making a donation via the link in the righthand sidebar. Thank you.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "function hmg_admin_styles() {\n\n\t?>\n\t<style type=\"text/css\">\n\t\t#hmg_gallery_images_container { clear: both; }\n \t\t#additional-images .inside { padding-top: 35px !important; }\n \t\t#additional-images p.hmg_gallery_images_submit { margin-top: -28px !important; float: left !important; }\n\t</style>\n\t<?php\n\n\tif( get_option( 'hmg_manage_featured', true ) ) :\n\n\t?>\n\t<style type=\"text/css\">\n \t\t#additional-images .sortable .image-wrapper.first { background-color: #FFFFE0; border-color: #E6DB55; }\n\t/*\t#additional-images .sortable .image-wrapper.first:after { content: 'Featured Image'; font-weight: bold; display: block; position: absolute; width: 162px; text-align: center; top: -25px; left: 0; }*/\n </style>\n\t<?php\n\tendif;\n\t\n}", "function cbp_display_front_page() {\n\t?>\n\t\t<h2>Chibipaint Integration</h2>\n\t\t<h3>Introduction</h3>\n\t\t<p>This plugin's purpose is to integrate the Chibipaint applet with Wordpress. The code was largely rewritten from the previous version back in 2010. Some of the notable differences are:</p>\n\t\t<ul class=\"ul-disc\">\n\t\t<li>Visibility &amp; Accessibility: Where you had to access the applet via the upload media section, it is now placed in a &quot;metabox&quot; above the WYSIWYG editor of any post type of your choosing</li>\n\t\t<li>Choice of location: You can choose where to place the files you save, but you are restricted to within the upload folder.</li>\n\t\t</ul>\n\t\t<p>If you feel I've missed any, feel free to let me know. The applet itself can be found at http://www.chibipaint.com/.</p>\n\t\t<h3>Known Limitations</h3>\n\t\t<ul class=\"ul-disc\">\n\t\t<li>Currently, you can only change the default dimensions. There are plans to allow users to add dimensions they commonly use and to pick them from a drop down list at the editor.</li>\n\t\t<li>There is currently no implementation of templates. The closest thing to it now is to upload an image to the post, select it in the list of images and click on Edit. There are also plans to implement a template feature for the plugin.</li>\n\t\t<li>The plugin cannot do a recursive search for wp-config.php.</li>\n\t\t<li>This plugin has not been tested with a multiuser wordpress install. It's certain it will not work since there are no filtering based on author, nor is the author of the image saved with the attachment.</li>\n\t\t<li>If the user saves the source file, all edits will be based on the source file. This is particularly troublesome for those who decide to save image only later on.</li>\n\t\t</ul>\n\t<?php\n}", "function spreadshop_designer()\n{\ninclude(plugin_dir_path(__FILE__).'/spreaddesigner.php');\nadd_filter('wp_head', 'sources');\n}", "function honeycomb_page_header() {\n\t\tglobal $post;\n\n\t\t$post_id = $post->ID;\n\t\tif ( is_post_type_archive('property') )\n\t\t{\n\t\t\t$post_id = ph_get_page_id( 'search_results' );\n\t\t}\n\n\t\t$banner_type = get_post_meta( $post_id, '_banner_type', TRUE );\n\n\t\t$show_post_thumbnail = true;\n\t\tif ( $banner_type == 'featured' ) { $show_post_thumbnail = false; } // don't show post thumbnail if it's already been used as the page banner\n\t\t?>\n\t\t<header class=\"entry-header\">\n\t\t\t<?php\n\t\t\tif ( $show_post_thumbnail ) honeycomb_post_thumbnail( 'full' );\n\t\t\tthe_title( '<h1 class=\"entry-title\">', '</h1>' );\n\t\t\t?>\n\t\t</header><!-- .entry-header -->\n\t\t<?php\n\t}", "function glide_setup_function() {\n\t\tload_theme_textdomain( 'basetheme_td' );\n\n\t\t// Let WordPress manage the document title.\n\t\tadd_theme_support( 'title-tag' );\n\n\t\t// Enable support for RSS Feed.\n\t\tadd_theme_support( 'automatic-feed-links' );\n\n\t\t// Enable support for Post Thumbnails on posts and pages.\n\t\tadd_theme_support( 'post-thumbnails' );\n\n\t\t// Set post thumbnail sizes\n\t\tset_post_thumbnail_size( 150, 150, true );\n\n\t\t// Add custom thumbnail sizes for backend admin\n\t\tadd_image_size( 'admin-square', 90, 90, false );\n\t\tadd_image_size( 'admin-landscape', 150, 90, false );\n\t\tadd_image_size( 'admin-portrait', 90, 130, false );\n\t\t// Add custom thumbnail sizes for frontend theme\n\t\tadd_image_size( 'thumb_2000', 2000 , 9999, false );\n\t\tadd_image_size( 'thumb_1600', 1600, 9999, false );\n\t\tadd_image_size( 'thumb_1400', 1400 , 9999, false );\n\t\tadd_image_size( 'thumb_1200', 1200 , 9999, false );\n\t\tadd_image_size( 'thumb_1000', 1000, 9999, false );\n\t\tadd_image_size( 'thumb_900', 900, 9999, false );\n\t\tadd_image_size( 'thumb_800', 800, 9999, false );\n\t\tadd_image_size( 'thumb_700', 700, 9999, false );\n\t\tadd_image_size( 'thumb_600', 600, 9999, false );\n\t\tadd_image_size( 'thumb_500', 500, 9999, false );\n\t\tadd_image_size( 'thumb_400', 400, 9999, false );\n\t\tadd_image_size( 'thumb_300', 300, 9999, false );\n\t\tadd_image_size( 'thumb_200', 200, 9999, false );\n\t\tadd_image_size( 'thumb_100', 100, 9999, false );\n\n\t\t// Register wp_nav_menu() menus\n\t\tregister_nav_menus(\n\t\t\tarray(\n\t\t\t\t'main' => __( 'Main Navigation', 'basetheme_td' ),\n\t\t\t\t'footer' => __( 'Footer Menu', 'basetheme_td' ),\n\t\t\t)\n\t\t);\n\n\t\t// Fallback function for menus\n\t\tfunction menu_fallback(){ ?>\n\t\t\t<div id=\"menu\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li> <?php _e( 'Go to Admin > Appearance > Menus, to create your menu.', 'basetheme_td' ); ?></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t<?php\n\t\t}\n\n\t\t// Add HTML5 theme support for required functionalities\n\t\tadd_theme_support(\n\t\t\t'html5',\n\t\t\tarray(\n\t\t\t\t'search-form',\n\t\t\t\t'comment-form',\n\t\t\t\t'comment-list',\n\t\t\t\t'gallery',\n\t\t\t\t'caption',\n\t\t\t\t'style',\n\t\t\t\t'script',\n\t\t\t\t'navigation-widgets',\n\t\t\t)\n\t\t);\n\n\t\t// Align support for Gutenberg - Enabling theme support for align full and align wide option for the block editor.\n\t\tadd_theme_support( 'align-wide' );\n\n\t\t// Set JPEG quality to 100%\n\t\tadd_filter(\n\t\t\t'jpeg_quality',\n\t\t\tfunction() {\n\t\t\t\treturn 100;\n\t\t\t}\n\t\t);\n\n\t}", "function positive_panels_init(){\n\t/*$display_settings = get_option('siteorigin_panels_display', array());\n\tif( isset($display_settings['bundled-widgets'] ) && !$display_settings['bundled-widgets'] ) return;*/\n\n\tinclude 'widgets/widgets.php';\n}", "function db099_lifterlms_admin_head() { \r\n\tglobal $post;\r\n\t$s = get_current_screen();\r\n\tif(!empty($s->post_type) and $s->post_type=='course') { \r\n?>\r\n<script>\r\njQuery(function($){\r\n\t$('.et_pb_toggle_builder_wrapper').insertBefore($('#wp-content-wrap')).show();\r\n\t$('#et_pb_layout').insertAfter($('#wp-content-wrap'));\r\n\t\r\n\t$(document).on('mouseup', '#et_pb_toggle_builder:not(.et_pb_builder_is_used)', function() {\r\n\t\t$('#wp-content-wrap').hide();\r\n\t});\t\r\n\t$(document).on('click', '[data-action=\"deactivate_builder\"] .et_pb_prompt_proceed', function() {\r\n\t\t$('#wp-content-wrap').show();\r\n\t});\r\n\t<?php if (dbdb_is_pagebuilder_used($post->ID)) { ?>\r\n\t\t$('#wp-content-wrap').hide();\r\n\t<?php } else { ?>\r\n\t\t$('#wp-content-wrap').show();\r\n\t<?php } ?>\r\n});\r\n</script>\r\n<style>\r\n#et_pb_layout { margin-top:20px; margin-bottom:0px }\r\n.et_pb_toggle_builder_wrapper { display:none; }\r\n</style>\r\n<?php\r\n\t}\r\n}", "function skudo_admin_head_add(){\n\n\tif(isset($_GET['page']) && $_GET['page']==SKUDO_OPTIONS_PAGE){\n\t\t//init the options js functionality\n\t\t$skudo_admin_inline_script = (isset($skudo_admin_inline_script)) ? $skudo_admin_inline_script : \"\";\n\t\t$skudo_admin_inline_script .= '\n\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\"use strict\";\n\t\t\t\tjQuery(\".slider\").each(function(){\n\t\t\t\t\tvar value = parseInt(jQuery(this).siblings(\".slider-input\").val());\n\t\t\t\t\tjQuery(this).empty().slider({\n\t\t\t\t\t\trange: \"min\",\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tmin: 0,\n\t\t\t\t\t\tmax: 100,\n\t\t\t\t\t\tslide: function( event, ui ) {\n\t\t\t\t\t\t\tjQuery( \"#\"+jQuery(this).attr(\"title\") ).val( ui.value + \" px\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tskudoOptions.init({cookie:true});\n\t\t\t});\n\t\t';\n\t\twp_add_inline_script('skudo-admin', $skudo_admin_inline_script, 'after');\n\t}\n\t\n\tif(isset($_GET['page']) && $_GET['page']==SKUDO_STYLE_OPTIONS_PAGE){\n\t\t//init the options js functionality\n\t\t\n\t\t$skudo_admin_inline_script = (isset($skudo_admin_inline_script)) ? $skudo_admin_inline_script : \"\";\n\t\t$skudo_admin_inline_script .= '\n\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\"use strict\";\n\t\t\t\tjQuery(\".slider\").each(function(){\n\t\t\t\t\tvar value = parseInt(jQuery(this).siblings(\".slider-input\").val());\n\t\t\t\t\tjQuery(this).empty().slider({\n\t\t\t\t\t\trange: \"min\",\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tmin: 0,\n\t\t\t\t\t\tmax: 100,\n\t\t\t\t\t\tslide: function( event, ui ) {\n\t\t\t\t\t\t\tif (jQuery(this).hasClass(\"opacity-slider\")){\n\t\t\t\t\t\t\t\tjQuery( \"#\"+jQuery(this).attr(\"title\") ).val( ui.value + \"%\" );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery( \"#\"+jQuery(this).attr(\"title\") ).val( ui.value + \" px\" );\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tskudo_StyleOptionsManager.init({cookie:true});\n\t\t\t});\n\t\t';\n\t\tif (isset($_GET['dgtt'])){\n\t\t\t$skudo_admin_inline_script .= '\n\t\t\t\tjQuery(window).load(function(){\n\t\t\t\t\tjQuery(\"a[href=\\'#tab_navigation-1-'.esc_js(esc_html($_GET['dgtt'])).'\\']\").trigger(\"click\");\n\t\t\t\t});\n\t\t\t';\n\t\t}\n\t\twp_add_inline_script('skudo-admin', $skudo_admin_inline_script, 'after');\n\t}\n}", "function bones_ahoy() {\n\n\t// let's get language support going, if you need it\n\tload_theme_textdomain( 'bonestheme', get_template_directory() . '/library/translation' );\n\n\t// launching operation cleanup\n\tadd_action( 'init', 'bones_head_cleanup' );\n\t// remove WP version from RSS\n\tadd_filter( 'the_generator', 'bones_rss_version' );\n\t// remove pesky injected css for recent comments widget\n\tadd_filter( 'wp_head', 'bones_remove_wp_widget_recent_comments_style', 1 );\n\t// clean up comment styles in the head\n\tadd_action( 'wp_head', 'bones_remove_recent_comments_style', 1 );\n\t// clean up gallery output in wp\n\tadd_filter( 'gallery_style', 'bones_gallery_style' );\n\n\t// enqueue base scripts and styles\n\tadd_action( 'wp_enqueue_scripts', 'bones_scripts_and_styles', 999 );\n\t// ie conditional wrapper\n\n\t// launching this stuff after theme setup\n\tbones_theme_support();\n\n\t// adding sidebars to Wordpress (these are created in functions.php)\n\tadd_action( 'widgets_init', 'bones_register_sidebars' );\n\n\t// cleaning up random code around images\n\tadd_filter( 'the_content', 'bones_filter_ptags_on_images' );\n\t// cleaning up excerpt\n\tadd_filter( 'excerpt_more', 'bones_excerpt_more' );\n\n}", "public function my_front_end_stuff()\n {\n add_action('wp_enqueue_scripts', array($this, 'myScripts'));\n\n // Don't load the filters if the display option is toggled to NONE!\n if(get_option('grimage_display_options') != \"none\") {\n //add_filter('the_content', array($this, 'replaceImagesWithGrimages'));\n add_filter('the_content', array($this, 'replaceImagesWithGrimagesTwo'));\n add_action('wp_head', array($this, 'hook_js'));\n add_action('wp_head', array($this, 'hook_css'));\n add_action('wp_footer', array($this, 'grimage_modal'));\n }\n }", "function thirdtheme_blog_slider()\n {\n add_theme_support('post-thumbnails');\n add_image_size('small',102,102);\n $args = array(\n 'labels' => array('name' =>__('blog slider'),\n 'add_new' =>__('add new blog')),\n \n 'public' => true,\n 'menu_icon' =>'dashicons-buddicons-buddypress-logo',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor','thumbnail',)); \n register_post_type('blogslider',$args);\n }", "public function wordpress_default_header(){\n\t\tif(is_home() && $this->_template_builder->get_specific_option('carousel_global')){\r\n\t\t\tif(!$this->_template_builder->get_specific_option('jumbotron')){\r\n\t\t\t\t$this->_build_header();\r\n\t\t\t}else{\r\n\t\t\t\t$this->_template_builder->render_view('jumbotron');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($this->_template_builder->get_specific_option('socialbar')){\r\n\t\t\t\t$this->_template_builder->render_view('socialbar');\t\r\n\t\t\t}\r\n\t\t}\n\t}", "function honeycomb_page_banner() {\n\t\tglobal $post;\n\n\t\tif ( !isset($post->ID) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$post_id = $post->ID;\n\t\tif ( is_post_type_archive('property') )\n\t\t{\n\t\t\t$post_id = ph_get_page_id( 'search_results' );\n\t\t}\n\n\t\t$banner_type = get_post_meta( $post_id, '_banner_type', TRUE );\n\n\t\tswitch ( $banner_type )\n\t\t{\n\t\t\tcase \"map\":\n\t\t\t{\n\t\t\t\tif ( class_exists( 'PH_Map_Search' ) )\n\t\t\t\t{\n\t\t\t\t\t$query = '';\n\n\t\t\t\t\tif ( is_post_type_archive('property') )\n\t\t\t\t\t{\n\t\t\t\t\t\tglobal $wp_query;\n\n\t\t\t\t $query = $wp_query->request;\n\n\t\t\t\t // Remove limit\n\t\t\t\t $last_limit_pos = strrpos(strtolower($query), \"limit\");\n\t\t\t\t if ($last_limit_pos !== FALSE)\n\t\t\t\t {\n\t\t\t\t // We found a limit\n\t\t\t\t $query = substr($query, 0, $last_limit_pos - 1); // -1 because strrpos return starts at zero\n\t\t\t\t }\n\n\t\t\t\t $query = base64_encode($query);\n\t\t\t\t\t}\n\n\t\t\t\t\techo do_shortcode('[propertyhive_map_search scrollwheel=\"false\" query=\"' . $query . '\"]');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo __( 'The Property Hive Map Search add on does not exist or is not activated', 'honeycomb' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"revslider\":\n\t\t\t{\n\t\t\t\tif ( class_exists( 'RevSlider' ) ) \n\t\t\t\t{\n\t\t\t\t\t$rev_slider = esc_html( get_post_meta( $post_id, '_banner_rev_slider', TRUE ) ); \n\t\t\t\t\tputRevSlider($rev_slider);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo __( 'Revolution Slider does not exist or is not activated', 'honeycomb' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"featured\":\n\t\t\t{\n\t\t\t\tif ( has_post_thumbnail($post_id) ) \n\t\t\t\t{\n\t\t\t\t\t$url = get_the_post_thumbnail_url($post_id, 'full');\n\t\t\t\t\techo '<div class=\"featured-image-page-banner\" style=\"background-image:url(\\'' . $url . '\\');\"></div>';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "function launchpad_add_head_modifications() {\n\tglobal $site_options, $wp_query, $post;\n\t\n\t$add_this_id = $site_options['add_this_id'];\n\t\n\t$ajax = '';\n\tif(isset($site_options['ajax_page_loads']) && $site_options['ajax_page_loads'] === true) {\n\t\t$ajax = 'true';\n\t}\n\t\n\tif(is_singular()) {\n\t\t$use_id = $post ? $post->ID : 0;\n\t} else {\n\t\t$page_by_path = get_page_by_path(trim($_SERVER['REQUEST_URI'], '/'));\n\t\tif($page_by_path) {\n\t\t\t$use_id = $page_by_path->ID;\n\t\t} else {\n\t\t\t$use_id = $post ? $post->ID : 0;\n\t\t}\n\t}\n\t\n\t$excerpt = launchpad_seo_excerpt(32, false, $use_id);\n\n\t?>\n\t\n\t\t<!--[if lt IE 9]><script src=\"//cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.min.js\"></script><![endif]-->\n\t\t\n\t\t<link rel=\"icon\" href=\"/images/icons/favicon.png\">\n\t\t<link rel=\"icon\" href=\"/images/icons/favicon_2x.png\" media=\"(-webkit-min-device-pixel-ratio: 2)\">\n\t\t\n\t\t<link rel=\"alternate\" type=\"application/rss+xml\" title=\"<?php bloginfo('name') ?> RSS Feed\" href=\"/feed/\">\n\t\t<?php if(is_single() || is_page()) { ?>\n\t\t\n\t\t<link rel=\"canonical\" href=\"<?= get_permalink($use_id); ?>\">\n\t\t<?php } ?>\n\t\t\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t\t\n\t\t<meta name=\"description\" content=\"<?php echo $excerpt; ?>\">\n\t\t<?php\n\t\t\n\t\tif(!get_option('blog_public')) {\n\t\t\techo '<meta name=\"robots\" content=\"noindex, nofollow\">';\t\t\t\n\t\t} else if(!$wp_query->is_single && !$wp_query->is_singular && !is_front_page()) {\n\t\t\techo '<meta name=\"robots\" content=\"noindex, follow\">';\n\t\t}\n\t\t\n\t\t?>\n\t\t<?php if(isset($site_options['fb_app_id']) && $site_options['fb_app_id']) { ?>\n\t\t\t<meta property=\"fb:app_id\" content=\"<?php echo $site_options['fb_app_id'] ?>\">\n\t\t<?php } ?>\n\t\t<?php if(isset($site_options['fb_admin_id']) && $site_options['fb_admin_id']) { ?>\n\t\t\t<?php foreach(explode(',', $site_options['fb_admin_id']) as $fb_admin_id) { ?>\n\t\t\t\t<meta property=\"fb:admins\" content=\"<?php echo trim($fb_admin_id) ?>\">\n\t\t\t<?php } ?>\n\t\t<?php } ?>\n\t\t<?php\n\t\t\t// Setting up Card names for Twitter & Facebook along with OG Meta\n\t\t\t$f_card_type = 'website';\n\t\t\t$t_card_type = 'summary';\n\t\t\tif(is_single() || is_singular()) {\n\t\t\t\t$f_card_type = 'article';\n\t\t\t}\n\t\t\tif((is_single() || is_singular()) && has_post_thumbnail()) {\n\t\t\t\t$t_card_type = 'summary_with_large_image';\n\t\t\t}\n\t\t?>\n\t\t\t<meta name=\"twitter:card\" content=\"<?= $t_card_type ?>\">\n\t\t\t<meta property=\"og:type\" content=\"<?= $f_card_type ?>\">\n\t\t\t<?php if(isset($site_options['twitter_card_username']) && $site_options['twitter_card_username']) { ?>\n\t\t\t\t<meta name=\"twitter:site\" content=\"@<?= $site_options['twitter_card_username'] ?>\">\n\t\t\t\t<meta name=\"twitter:creator\" content=\"@<?= $site_options['twitter_card_username'] ?>\">\n\t\t\t<?php } ?>\n\t\t\t<meta property=\"og:site_name\" content=\"<?php bloginfo('name') ?>\">\n\t\t\t<meta name=\"twitter:title\" property=\"og:title\" content=\"<?php launchpad_title(true); ?>\">\n\t\t\t<meta name=\"twitter:description\" property=\"og:description\" content=\"<?= $excerpt; ?>\">\n\t\t\t<meta name=\"twitter:url\" property=\"og:url\" content=\"<?= get_permalink($use_id); ?>\">\n\t\t<?php\n\t\t\tif(has_post_thumbnail()) {\n\t\t\t\t$thumbnail = get_post_thumbnail_id();\n\t\t\t\tif(!$thumbnail){\n\t\t\t\t\t// Default OG Image Fallback\n\t\t\t\t\t$thumbnail = $site_options['default_og_image'];\n\t\t\t\t}\n\t\t\t\t$thumbnail = wp_get_attachment_image_src($thumbnail, 'opengraph');\n\t\t\t\tif($thumbnail) {\n\t\t\t\t\t?>\n\t\t\t\t\t<meta property=\"og:image\" content=\"http://<?= $_SERVER['HTTP_HOST'] ?><?= $thumbnail[0] ?>\">\n\t\t\t\t\t<meta property=\"og:image:width\" content=\"<?= $thumbnail[1] ?>\">\n\t\t\t\t\t<meta property=\"og:image:height\" content=\"<?= $thumbnail[2] ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t?>\n\t\t<?php if(defined('GA_ID') && GA_ID != '') { ?>\n\t\t\t<script id=\"google-analytics\">\n\t\t\t\t(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\t\t\t\t(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\t\t\t\tm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n\t\t\t\t})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\t\t\t\t\n\t\t\t\tga('create', '<?php echo GA_ID ?>', 'auto');\n\t\t\t\tga('send', 'pageview');\n\t\t\t</script>\n\t\t<?php \n\t\t\n\t\t}\n\t\n\t\tif(stristr($_SERVER['HTTP_HOST'], '.dev') !== false || stristr($_SERVER['HTTP_HOST'], '.git') !== false) {\n\t\t\techo \"<script>window.dev = true;</script>\\n\";\n\t\t}\n}", "function cardealer_init_theme() {\r\n\tadd_action( 'init', 'cardealer_head_cleanup' ); // launching operation cleanup\r\n\tadd_filter( 'the_generator', 'cardealer_rss_version' ); // remove WP version from RSS\r\n\tadd_action( 'wp_enqueue_scripts', 'cardealer_load_style_script', 9 ); // enqueue base scripts and styles\r\n\tcardealer_theme_support(); // launching this stuff after theme setup\r\n\tcardealer_add_image_sizes(); // add additional image sizes\r\n\tadd_action( 'widgets_init', 'cardealer_register_sidebars' ); // adding sidebars to Wordpress (these are created in functions.php)\r\n\tadd_filter( 'get_search_form', 'cardealer_wpsearch' ); // adding the search form\r\n\tadd_filter( 'the_content', 'cardealer_filter_ptags_on_images' ); // cleaning up random code around images\t\r\n\t\r\n\t// Hide Revolution Slider notice\r\n\tupdate_option('revslider-valid-notice', 'false');\r\n\t\r\n\t// Set transient for welcome loader.\r\n\tset_transient( '_cardealer_welcome_screen_activation_redirect', true, 30 );\r\n}", "function dfcg_help_quick() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Getting Started', DFCG_DOMAIN ); ?></h3>\n\t\n\t<h4><?php _e( '90 second configuration', DFCG_DOMAIN ); ?></h4>\n\t\n\t<p><?php printf( '%s <a href=\"%s\">%s</a> %s', __( 'The following assumes that you have followed the', DFCG_DOMAIN ), '#tab-panel-dfcg-help-theme', __( 'Theme Integration', DFCG_DOMAIN ), __( 'instructions.', DFCG_DOMAIN ) ); ?></p>\n\t\n\t<p><?php _e( 'When first installed, the plugin is pre-configured with default settings designed to get you up and running very quickly. For simplicity, the Gallery Method is set to \"One category\" with 5 posts, and Image Management is set to \"Featured Images\".', DFCG_DOMAIN ); ?></p>\n\t<p><?php _e( 'Therefore, to quickly see if the DCG is properly installed and integrated with your theme, go to the <span class=\"bold-italic\">Gallery Method</span> tab and select a category which has 5 posts with Featured images, click Save, and then check the front end of your site to confirm that the DCG is displaying properly.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'Now you have the DCG up and running, feel free to configure the options to suit your needs. In case of problems, refer to the Troubleshooting section of this Quick Help Guide.', DFCG_DOMAIN ); ?></p>\n\t<p>Still a little lost? Check out the <a class=\"off-site\" target=\"_blank\" href=\"<?php echo DFCG_HOME; ?>quick-start-guide/\"><?php _e('Quick Start', DFCG_DOMAIN); ?></a> guide.</p>\n\n<?php\n}", "function darksnow_widgets_init() {\n\n\t\n\t\n\t\n}", "function _static10($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n <div class=\"container zn_slideshow\">\n \t<div class=\"static-content default-style with-login\">\n \t\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"span7\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tif (!empty($options['ww_slide_title'])) {\n\t\t\t\t\t\t\t\t\t\techo '<h2>'.do_shortcode( $options['ww_slide_title'] ).'</h2>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (!empty( $options['ww_slide_subtitle'] )) {\n\t\t\t\t\t\t\t\t\t\techo '<h3>'.do_shortcode( $options['ww_slide_subtitle'] ).'</h3>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( !empty( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_l_text'] ) && !empty($options['ww_slide_link']['url']) ) {\n\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"info_pop animated fadeBoxIn left\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\t\techo '<a href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['url'].'\" class=\"buyit\">'.$options['ww_slide_l_text'].'</a>';\n\t\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\t\t\t\techo '</div>';\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"span5\">\n\t\t\t\t\t\t\t\t<div class=\"fancy_register_form\">\n \t<h4 style=\"text-align:center\"><?php _e(\"Create <strong>your account</strong> now\",THEMENAME);?></h4>\n\t\t\t\t\t\t\t\t\t\t<form id=\"register_form_static\" name=\"login_form\" method=\"post\" class=\"zn_form_login\" action=\"<?php echo site_url('wp-login.php?action=register', 'login_post') ?>\">\n\t \t<div>\n\t \t<label for=\"reg-username\"><?php _e(\"Username\",THEMENAME);?></label>\n\t <input type=\"text\" id=\"reg-username\" name=\"user_login\" class=\"inputbox\" required placeholder=\"<?php _e(\"Username\",THEMENAME);?>\">\n\t </div>\n\t <div>\n\t \t<label for=\"reg-email\"><?php _e(\"Email\",THEMENAME);?></label>\n\t <input type=\"email\" id=\"reg-email\" name=\"user_email\" class=\"inputbox required\" placeholder=\"<?php _e(\"Your email\",THEMENAME);?>\">\n\t </div>\n\t <div>\n\t \t<label for=\"reg-pass\"><?php _e(\"Your password\",THEMENAME);?></label>\n\t <input type=\"password\" id=\"reg-pass\" name=\"user_password\" class=\"inputbox\" required placeholder=\"<?php _e(\"Your password\",THEMENAME);?>\">\n\t </div>\n\t <div>\n\t \t<label for=\"reg-pass2\"><?php _e(\"Verify password\",THEMENAME);?></label>\n\t <input type=\"text\" id=\"reg-pass2\" name=\"user_password2\" class=\"inputbox\" required placeholder=\"<?php _e(\"Verify password\",THEMENAME);?>\">\n\t </div>\n\t\t\t\t\t\t\t\t\t\t\t<div style=\"margin-bottom:0;\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"submit\" id=\"signup\" name=\"submit\" class=\"zn_sub_button btn btn-danger\" value=\"<?php _e(\"REGISTER\",THEMENAME);?>\">\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"register\" class=\"\" name=\"zn_form_action\">\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"zn_do_login\" class=\"\" name=\"action\">\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\"<?php echo $_SERVER['PHP_SELF'] ?>\" class=\"zn_login_redirect\" name=\"submit\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"links\"></div>\n\t\t\t\t\t\t\t\t\t\t</form>\n </div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div><!-- end row -->\n \n </div><!-- end static content -->\n </div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function ex_divi_child_theme_setup() {\n\n if ( class_exists('ET_Builder_Module')) {\n\n class ET_Builder_Module_Image2 extends ET_Builder_Module {\n function init() {\n $this->name = __( 'Banner Image', 'et_builder' );\n $this->slug = 'et_pb_image2';\n // a whole bunch of php code that defines how the class functions\n \n \n }\n }\n $et_builder_module_image2 = new ET_Builder_Module_Image2();\n add_shortcode( 'et_pb_image2', array($et_builder_module_image2, '_shortcode_callback') );\n\n }\n\n}", "function load_featured_widget() {\n\tregister_widget( 'Widget_Featured_Post_Images' );\n}", "function subtlewarmth_setup() {\n add_theme_support( 'title-tag' );\n add_theme_support( 'post-thumbnails' );\n\n\t\t//image sizes\n\t add_image_size( 'blog-image', 1024, 9999 );\n }", "function basedigital_scripts() {\r\r\n\r\r\n\t//JS\r\r\n\twp_enqueue_script( 'jquery', '//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.min.js', array(), '1.11.1', true );\r\r\n\twp_enqueue_script( 'slick-slider', '//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js', array(), '1.8.1', true );\r\r\n\twp_enqueue_script( 'jquery-fullpage', '//cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.5/jquery.fullpage.min.js', array(), '2.9.5', true );\r\r\n\twp_enqueue_script( 'scrolloverflow', '//cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.5/vendors/scrolloverflow.js', array(), '2.9.5', true );\r\r\n\twp_enqueue_script( 'mask', '//cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.12/jquery.mask.min.js', array(), '1.0.0', true );\r\r\n\twp_enqueue_script( 'imageload', '//unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js', array(), '1', true);\r\r\n\twp_enqueue_script( 'isotop', '//unpkg.com/isotope-layout@3/dist/isotope.pkgd.js', array(), '1', true );\r\r\n\twp_enqueue_script( 'main-js', '/wp-content/themes/basedigital/dist/js/main.min.js?ver=1.0.0', array(), '1.0.0', true );\r\r\n\r\r\n\t//CSS\r\r\n\twp_enqueue_style( 'fullpage-css', '//cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.5/jquery.fullpage.min.css', array(), '1.8.1' );\r\r\n\twp_enqueue_style( 'slick-css', '//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.css', array(), '1.8.1' );\r\r\n\twp_enqueue_style( 'main-css', '/wp-content/themes/basedigital/dist/css/main.min.css?ver=1.0', array(), '1.0' );\r\r\n\r\r\n}", "function customisetheme_admin_header_style() {\n ?>\n <style type=\"text/css\">\n #wpbody-content #headimg {\n height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;\n width: <?php echo HEADER_IMAGE_WIDTH; ?>px;\n border: 1px solid #333;\n }\n </style>\n <?php\n }", "function tb_longwave_theme_initialize_header_options() {\n\n\tif( false == get_option( 'tb_longwave_theme_header_options' ) ) {\t\n\t\tadd_option( 'tb_longwave_theme_header_options' );\n\t} // end if\n\n\tadd_settings_section(\n\t\t'tb_longwave_header_options_section',\n\t\t'Header Options',\n\t\t'tb_longwave_header_options_callback',\n\t\t'tb_longwave_theme_header_options'\n\t);\n\t\n\tadd_settings_field(\t\n\t\t'tb_longwave_header_logo',\t\t\t\t\t\t\n\t\t'Logo',\n\t\t'tb_longwave_image_callback',\t\n\t\t'tb_longwave_theme_header_options',\t\n\t\t'tb_longwave_header_options_section',\n\t\tarray(\n\t\t\t'tb_longwave_header_logo','tb_longwave_theme_header_options','The site logo used in the header area.'\n\t\t)\t\t\t\n\t);\n\t\n\tadd_settings_field(\t\n\t\t'tb_longwave_header_logo_responsive',\t\t\t\t\t\t\n\t\t'Retina Logo @2x',\n\t\t'tb_longwave_image_callback',\t\n\t\t'tb_longwave_theme_header_options',\t\n\t\t'tb_longwave_header_options_section',\n\t\tarray(\n\t\t\t'tb_longwave_header_logo_responsive','tb_longwave_theme_header_options','The site logo used in the header area(please name exactly like the logo but with an \"@2x\" in the base name, example logo.png -> [email protected] , and size it exactly twice as big as the normal logo).'\n\t\t)\t\t\t\n\t);\n\t\t\n\tregister_setting(\n\t\t'tb_longwave_theme_header_options',\n\t\t'tb_longwave_theme_header_options',\n\t\t'tb_longwave_theme_validate_header_options'\n\t);\n\n}", "function _static4($options)\n\t{\n\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\n\t?>\n <div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n\t \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\n <div class=\"static-content maps-style\">\n\t\t\t\t<div id=\"google_map\" style=\"width:100%; height:<?php echo $options['sc_map_height'];?>px;\"></div><!-- map container -->\n\t\t\t\t<ul id=\"map_controls\">\n\t\t\t\t\t<li><a id=\"zoom_in\"><span class=\"icon-plus icon-white\"></span></a></li>\n\t\t\t\t\t<li><a id=\"zoom_out\"><span class=\"icon-minus icon-white\"></span></a></li>\n\t\t\t\t\t<li><a id=\"reset\"><span class=\"icon-refresh icon-white\"></span></a></li>\n\t </ul>\n\t\t\t\t<?php\n\t\t\t\t\t\t// BUTTON\n\t\t\t\t\t\tif ( $options['ww_slide_m_button'] || $options['ww_slide_l_text'] ) {\n\t\t\t\t\t\t\techo '<div class=\"info_pop\" data-arrow=\"top\">';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( $options['ww_slide_l_text'] && isset ( $options['ww_slide_link']['url'] ) && !empty ( $options['ww_slide_link']['url'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<a class=\"buyit\" href=\"'.$options['ww_slide_link']['url'].'\" target=\"'.$options['ww_slide_link']['target'].'\">'.$options['ww_slide_l_text'].'</a>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// BUTTON LEFT TEXT\n\t\t\t\t\t\t\t\tif ( isset ( $options['ww_slide_m_button'] ) && !empty ( $options['ww_slide_m_button'] ) ) {\n\t\t\t\t\t\t\t\t\techo '<h5 class=\"text\">'.$options['ww_slide_m_button'].'</h5>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t}\n\t\t\t\t?>\n \n\t\t\t</div>\n \n\t\t\t\n <script type=\"text/javascript\">\n\t(function($){\n\t\t$(document).ready(function() {\n\t\t<?php if ( !empty ( $options['sc_map_icon'] ) ) { ?>\n\t\t\tvar myMarkers = {\n\t\t\t\t\"markers\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"latitude\": \"<?php echo $options['sc_map_latitude'];?>\",\t\t// latitude\n\t\t\t\t\t\t\"longitude\":\"<?php echo $options['sc_map_longitude'];?>\",\t\t// longitude\n\t\t\t\t\t\t\"icon\": \"<?php echo $options['sc_map_icon'];?>\"\t// Pin icon\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t};\n\t\t<?php } ?>\n\n\t\t\t\n\t\t\t\n\t\t\t$(\"#google_map\").mapmarker({\n\t\t\t\tzoom : <?php echo $options['sc_map_zoom'];?>,\t\t\t\t\t\t\t// Zoom\n\t\t\t\tcenter: \"<?php echo $options['sc_map_latitude'];?>,<?php echo $options['sc_map_longitude'];?>\",\t\t// Center of map\n\t\t\t\ttype: \"<?php echo $options['sc_map_type'];?>\",\t\t\t\t\t// Map Type\n\t\t\t\tcontrols: \"HORIZONTAL_BAR\",\t\t\t// Controls style\n\t\t\t\tdragging:<?php if ( !empty($options['sc_map_dragg']) ) { echo $options['sc_map_dragg']; } else { echo '0';}?>,\t\t\t\t\t\t\t// Allow dragging?\n\t\t\t\tmousewheel:<?php if ( !empty($options['sc_map_zooming_mousewheel']) ) { echo $options['sc_map_zooming_mousewheel']; } else { echo '0';}?>,\t// Allow zooming with mousewheel\n\t\t\t\t<?php if ( !empty ( $options['sc_map_icon'] ) ) { echo 'markers: myMarkers,';} ?>\t\t\n\t\t\t\tstyling: 0,\t\t\t\t\t\t\t// Bool - do you want to style the map?\n\t\t\t\tfeatureType:\"all\",\n\t\t\t\tvisibility: \"on\",\n\t\t\t\telementType:\"geometry\",\n\t\t\t\thue:\"#00AAFF\",\n\t\t\t\tsaturation:-100,\n\t\t\t\tlightness:0,\n\t\t\t\tgamma:1,\n\t\t\t\tnavigation_control:0\n\t\t\t\t/*\n\t\t\t\tTo play with the map colors and styles you can try this tool right here http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html\n\t\t\t\t*/\n\t\t\t});\n\t\t});\n\t})(jQuery);\n\t</script>\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function simple_dashboard_widget()\n{\n ?>\n <h2> simple dashboard widget </h2>\n <h3> Im learning wordpress development </h3>\n<?php\n\n}", "public static function widget() {\n //require_once( 'widget.php' );\n require_once get_stylesheet_directory() . '/inc/templates/statistics_widget.php';\n }", "function widget_kpg_srtw_admin() {\r\n\t// this is the admin page\r\n\t// use for default options and advertising\r\n\t?>\r\n<div class=\"wrap\">\r\n<h2>Simple Rich Text Widget</h2>\r\n<h4>The Simple Rich Text Widget is installed and working correctly.</h4><div style=\"position:relative;float:right;width:35%;background-color:ivory;border:#333333 medium groove;padding:4px;margin-left:4px;\">\r\n <p>This plugin is free and I expect nothing in return. If you would like to support my programming, you can buy my book of short stories.</p>\r\n <p>Some plugin authors ask for a donation. I ask you to spend a very small amount for something that you will enjoy. eBook versions for the Kindle and other book readers start at 99&cent;. The book is much better than you might think, and it has some very good science fiction writers saying some very nice things. <br/>\r\n <a target=\"_blank\" href=\"http://www.blogseye.com/buy-the-book/\">Error Message Eyes: A Programmer's Guide to the Digital Soul</a></p>\r\n <p>A link on your blog to one of my personal sites would also be appreciated.</p>\r\n <p><a target=\"_blank\" href=\"http://www.WestNyackHoney.com\">West Nyack Honey</a> (I keep bees and sell the honey)<br />\r\n <a target=\"_blank\" href=\"http://www.cthreepo.com/blog\">Wandering Blog</a> (My personal Blog) <br />\r\n <a target=\"_blank\" href=\"http://www.cthreepo.com\">Resources for Science Fiction</a> (Writing Science Fiction) <br />\r\n <a target=\"_blank\" href=\"http://www.jt30.com\">The JT30 Page</a> (Amplified Blues Harmonica) <br />\r\n <a target=\"_blank\" href=\"http://www.harpamps.com\">Harp Amps</a> (Vacuum Tube Amplifiers for Blues) <br />\r\n <a target=\"_blank\" href=\"http://www.blogseye.com\">Blog&apos;s Eye</a> (PHP coding) <br />\r\n <a target=\"_blank\" href=\"http://www.cthreepo.com/bees\">Bee Progress Beekeeping Blog</a> (My adventures as a new beekeeper) </p>\r\n </div>\r\n\r\n<p>I needed a very simple way to add formatted text to the sidebar on my blog. I used this simple plugin along with an old rich text javascript file that I wrote and wound up with this. It works on my blogs, but the javascript may not work if oyu are using anything but the default admin pages in WordPress.\r\n</p>\r\n<p>\r\nI have been testing with FireFox 10 and IE8. I hope that other browsers work. In any case, the widget display should be well formed and standard HTML and display pretty much the same in all browsers. This is the first release and I have been chasing down bugs. Please let me know immediately it it doesn't work for you.\r\n</p>\r\n</div>\r\n<?php\r\n\r\n}", "function _cute_slider($options)\n\t{\n\t\tglobal $meta_fields;\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\n\t?>\n\t\t<div id=\"slideshow\" class=\"<?php echo $style; ?>\">\n\t\t\t<div class=\"bgback\"></div>\n\t\t\t\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\t\t<div class=\"container zn_slideshow\">\n\t\t\t\t\t<?php echo do_shortcode('[cuteslider id=\"'.$options['cuteslider_id'].'\"]'); ?>\n\t\t\t\t</div>\n\t\t\t<div class=\"zn_header_bottom_style\"></div>\n\t\t</div><!-- end page_header -->\n\t<?php\t\n\t}", "function learningWordpress_setup() {\n// // Add featured image supprt\n add_theme_support(\"post-thumbnails\");\n add_image_size('small-thumbnail', 180, 120, true );\n add_image_size('banner-image', 920, 210, array(\"left\", \"top\"));\n\n // Add post format support\n add_theme_support('post-formats', array('aside', 'gallery', 'link'));\n\n // Navigation menus\n register_nav_menus(array(\n \"primaryyy\" => __( \"Primary Menuu\"),\n 'footer' => __('Footer Menu')\n ));\n\n}", "function _static3($options)\n\t{\n\t\n\t\tif ( isset ( $options['ww_header_style'] ) && !empty ( $options['ww_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['ww_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\n\t\tif ( !empty($options['ww_height'])) {\n\t\t\t$height = 'style=\"height:'.$options['ww_height'].'px;\"';\n\t\t}\n\t\n\t?>\n <div id=\"slideshow\" <?php echo $height;?> class=\"<?php echo $style; ?>\">\n \n\t\t\t<div class=\"bgback\"></div>\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\n\t\t\t<div class=\"zn_slideshow\">\n <div class=\"container\">\n \t<div class=\"static-content video-style\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t// TITLE\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_title'] ) && !empty ( $options['ww_slide_title'] ) ) {\n\t\t\t\t\t\t\techo '<h3 class=\"centered\">'.do_shortcode($options['ww_slide_title']).'</h3>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// VIDEO\n\t\t\t\t\t\tif ( isset ( $options['ww_slide_video'] ) && !empty ( $options['ww_slide_video'] ) ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<div class=\"video_trigger_container\">';\n\t\t\t\t\t\t\t\techo '<a class=\"playVideo\" data-rel=\"prettyPhoto\" href=\"'.$options['ww_slide_video'].'\"></a>';\n\t\t\t\t\t\t\t\techo $options['ww_slide_video_text'];\n\t\t\t\t\t\t\techo '</div>';\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 </div><!-- end static-content -->\n </div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div><!-- header bottom style -->\n\t\t\t\n </div><!-- end slideshow -->\n\t<?php\n\t}", "function theme_nt_landium_section_aboutone( $atts, $content = null ) {\r\n extract( shortcode_atts(array(\r\n\t\"section_id\"\t\t=> '',\r\n\t\"section_heading\"\t=> '',\r\n\t\"section_subtitle\"\t=> '',\r\n\t\"section_desc\"\t\t=> '',\r\n\t\"btnlink\"\t\t\t=> '',\r\n\t\"sec_img\"\t\t\t=> '',\r\n\t\"imganimation\"\t\t=> '',\r\n\t//custom style\r\n\t\"customstyle\"\t\t=> '',\r\n\t\"currentitem\"\t\t=> '',\r\n\t\"animation\"\t\t\t=> '',\r\n\t\"size\"\t\t\t\t=> '',\r\n\t\"lineh\"\t\t\t\t=> '',\r\n\t\"weight\"\t\t\t=> '',\r\n\t\"color\"\t\t\t\t=> '',\r\n\t\"position\"\t\t\t=> '',\r\n\t\"bgcolor\"\t\t\t=> '',\r\n\t\"padtop\"\t\t\t=> '',\r\n\t\"padright\"\t\t\t=> '',\r\n\t\"padbottom\"\t\t\t=> '',\r\n\t\"padleft\"\t\t\t=> '',\r\n\t\"brdtop\"\t\t\t=> '',\r\n\t\"brdright\"\t\t\t=> '',\r\n\t\"brdbottom\"\t\t\t=> '',\r\n\t\"brdleft\"\t\t\t=> '',\r\n\t\"borderstyl\"\t\t=> '',\r\n\t\"bordercolor\"\t\t=> '',\r\n\t\"borderradius\"\t\t=> '',\r\n\t), $atts) );\r\n\r\n\t$id = ($section_id != '') ? 'id=\"'. esc_attr($section_id) . '\"' : '';\r\n\r\n\t$btnlink \t\t= ( $btnlink == '||' ) ? '' : $btnlink;\r\n\t$btnlink \t\t= vc_build_link( $btnlink );\r\n\t$btn_href \t\t= $btnlink['url'];\r\n\t$btn_title \t\t= $btnlink['title'];\r\n\t$btn_target \t= $btnlink['target'];\r\n\r\n\t$custom_style = (array) vc_param_group_parse_atts($customstyle);\r\n\tforeach ( $custom_style as $styl ) {\r\n\t\tif ( !empty( $styl ) ){\r\n\t\t\t$currentitem= ( !empty( $styl['currentitem'] ) ) ? $styl['currentitem'] : '';\r\n\t\t\t$size \t\t= ( !empty( $styl['size'] ) ) ? $styl['size'] : '';\r\n\t\t\t$weight \t= ( !empty( $styl['weight'] ) ) ? $styl['weight'] : '';\r\n\t\t\t$lineh \t\t= ( !empty( $styl['lineh'] ) ) ? $styl['lineh'] : '';\r\n\t\t\t$color \t\t= ( !empty( $styl['color'] ) ) ? $styl['color'] : '';\r\n\t\t\t$position \t= ( !empty( $styl['position'] ) ) ? $styl['position'] : '';\r\n\t\t\t$fstyle \t= ( !empty( $styl['fstyle'] ) ) ? $styl['fstyle'] : '';\r\n\t\t\t$bgcolor \t= ( !empty( $styl['bgcolor'] ) ) ? $styl['bgcolor'] : '';\r\n\t\t\t$padtop \t= ( !empty( $styl['padtop'] ) ) ? ' padding-top:'.$styl['padtop'].';' : '';\r\n\t\t\t$padright \t= ( !empty( $styl['padright'] ) ) ? ' padding-right:'.$styl['padright'].';' : '';\r\n\t\t\t$padbottom \t= ( !empty( $styl['padbottom'] ) ) ? ' padding-bottom:'.$styl['padbottom'].';' : '';\r\n\t\t\t$padleft \t= ( !empty( $styl['padleft'] ) ) ? ' padding-left:'.$styl['padleft'].';' : '';\r\n\t\t\t$padding \t= ( $padtop || $padright || $padbottom || $padleft ) ? $padtop.$padright.$padbottom.$padleft : '';\r\n\t\t\t$brdtop \t= ( !empty( $styl['brdtop'] ) ) ? ' border-top:'.$styl['brdtop'].';' : '';\r\n\t\t\t$brdright \t= ( !empty( $styl['brdright'] ) ) ? ' border-right:'.$styl['brdright'].';' : '';\r\n\t\t\t$brdbottom \t= ( !empty( $styl['brdbottom'] ) ) ? ' border-bottom:'.$styl['brdbottom'].';' : '';\r\n\t\t\t$brdleft \t= ( !empty( $styl['brdleft'] ) ) ? ' border-left:'.$styl['brdleft'].';' : '';\r\n\t\t\t$border \t= ( $brdtop || $brdright || $brdbottom || $brdleft ) ? $brdtop.$brdright.$brdbottom.$brdleft : '';\r\n\t\t\t$borderstyl = ( !empty( $styl['borderstyl'] ) ) ? $styl['borderstyl'] : '';\r\n\t\t\t$bordercolor= ( !empty( $styl['bordercolor'] ) ) ? $styl['bordercolor'] : '';\r\n\t\t\t$borderradius= ( !empty( $styl['borderradius'] ) ) ? $styl['borderradius'] : '';\r\n\r\n\t\t\tif ( $currentitem == '1' ){\r\n\t\t\t\t$current1 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation1 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '2' ){\r\n\t\t\t\t$current2 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation2 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '3' ){\r\n\t\t\t\t$current3 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation3 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '4' ){\r\n\t\t\t\t$current4 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation4 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}else{\r\n\t\t\t\t$current1 = $current2 = $current3 = $current4 = $animation1 = $animation2 = $animation3 = $animation4 = '';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t$out = '';\r\n\r\n\t\t$out .= '<!-- start section -->';\r\n\t\t$out .= '<a '.$id.' class=\"ancor\"></a>';\r\n\t\t$out .= '<section class=\"section section-about section-about--style-1 section--background-base\">';\r\n\t\t\t$out .= '<div class=\"container-fluid\">';\r\n\t\t\t\t$out .= '<div class=\"section-heading section-heading--center section-heading--white hidden-md hidden-lg\">';\r\n\t\t\t\t\tif ( $section_heading !='' ) { $out .= '<h2 class=\"title h1'.$animation1.'\"'.$current1.'>'.landium_sanitize_data( $section_heading ).'</h2>'; }\r\n\r\n\t\t\t\t\tif ( $section_subtitle !='' ) { $out .= '<p class=\"sec-desc'.$animation2.'\"><strong'.$current2.'>'.landium_sanitize_data( $section_subtitle ).'</strong></p>'; }\r\n\t\t\t\t$out .= '</div>';\r\n\r\n\t\t\tif ( $sec_img !='' ){\r\n\t\t\t\t$out .= '<div class=\"row\">';\r\n\t\t\t\t\t$out .= '<div class=\"col-xs-12 col-md-6\">';\r\n\t\t\t\t\t\t$out .= '<div class=\"img-place'.nt_landium_animation( $imganimation ).'\">';\r\n\t\t\t\t\t\t\t$sectionimg = wp_get_attachment_url( $sec_img,'full' );\r\n\t\t\t\t\t\t\t$out .= '<img class=\"center-block\" src=\"'.esc_url( $sectionimg ).'\" alt=\"demo\" />';\r\n\t\t\t\t\t\t$out .= '</div>';\r\n\r\n\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t$out .= '</div>';\r\n\t\t\t}\r\n\r\n\t\t\t$out .= '</div>';\r\n\r\n\t\t\t$out .= '<div class=\"container\">';\r\n\t\t\t\t$out .= '<div class=\"row\">';\r\n\t\t\t\t\t$out .= '<div class=\"col-xs-12 col-md-6 col-md-offset-6\">';\r\n\t\t\t\t\t\t$out .= '<div class=\"col-md-MB-30\">';\r\n\t\t\t\t\t\t\t$out .= '<div class=\"section-heading section-heading--left section-heading--white visible-md visible-lg\">';\r\n\t\t\t\t\t\t\t\tif ( $section_heading !='' ) { $out .= '<h2 class=\"title h1'.$animation1.'\"'.$current1.'>'.landium_sanitize_data( $section_heading ).'</h2>'; }\r\n\r\n\t\t\t\t\t\t\t\tif ( $section_subtitle !='' ) { $out .= '<p class=\"sec-desc'.$animation2.'\"><strong'.$current2.'>'.landium_sanitize_data( $section_subtitle ).'</strong></p>'; }\r\n\t\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t\t$out .= '</div>';\r\n\r\n\t\t\t\t\t\tif ( $section_desc !='' ) { $out .= '<p class=\"'.$animation3.'\"'.$current3.'>'.landium_sanitize_data( $section_desc ).'</p>'; }\r\n\t\t\t\t\tif ( $btn_title !='' ) {\r\n\t\t\t\t\t\t$out .= '<p class=\"sec-btn'.$animation4.'\"><a href=\"'.esc_attr( $btn_href ).'\" '; if ( $btn_target != '' ) { $out .= ' target=\"'.$btn_target.'\"';}$out .= 'class=\"custom-btn light inverted\"'.$current4.'>'.esc_html( $btn_title ).'</a></p>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t$out .= '</div>';\r\n\t\t\t$out .= '</div>';\r\n\t\t$out .= '</section>';\r\n\t\t$out .= '<!-- end section -->';\r\n\r\n\treturn $out;\r\n}", "function bones_ahoy()\n{\n\n //Allow editor style.\n add_editor_style(get_stylesheet_directory_uri() . '/library/css/editor-style.css');\n\n // let's get language support going, if you need it\n load_theme_textdomain('bonestheme', get_template_directory() . '/library/translation');\n\n // launching operation cleanup\n add_action('init', 'bones_head_cleanup');\n // A better title\n add_filter('wp_title', 'rw_title', 10, 3);\n // remove WP version from RSS\n add_filter('the_generator', 'bones_rss_version');\n // remove pesky injected css for recent comments widget\n add_filter('wp_head', 'bones_remove_wp_widget_recent_comments_style', 1);\n // clean up comment styles in the head\n add_action('wp_head', 'bones_remove_recent_comments_style', 1);\n // clean up gallery output in wp\n add_filter('gallery_style', 'bones_gallery_style');\n\n // enqueue base scripts and styles\n add_action('wp_enqueue_scripts', 'bones_scripts_and_styles', 999);\n // ie conditional wrapper\n\n // launching this stuff after theme setup\n bones_theme_support();\n\n // cleaning up random code around images\n add_filter('the_content', 'bones_filter_ptags_on_images');\n // cleaning up excerpt\n add_filter('excerpt_more', 'bones_excerpt_more');\n}", "function widget_my_widgets_init() {\r\n\tif ( !function_exists('register_sidebar_widget') )\r\n\t\treturn;\r\n\r\n\tfunction widget_my_widget_get_html( $pname, $loop_counter ) {\r\n\t\t$options = get_option('widget_my_widgets');\r\n\t\t$display_description = $options['widget_my_widgets_display_description'];\r\n\t\t$display_version = $options['widget_my_widgets_display_version'];\r\n\t\t$display_update = $options['widget_my_widgets_display_update'];\r\n\r\n\t\t$filedata = false;\r\n\t\t$workstr = 'http://wordpress.org/extend/plugins/profile/' . $pname . '/page/' . $loop_counter;\r\n\t\t$filedata = @file_get_contents( $workstr );\r\n\t\t$_output = '';\r\n\t\t$_ismore = false;\r\n\r\n\t\tif( $filedata ) {\r\n\t\t\t$w_datas = array();\r\n\t\t\t$spos = strpos( $filedata, '<div class=\"plugin-block\">' );\r\n\t\t\tdo {\r\n\t\t\t\tif( $spos !== false ) {\r\n\t\t\t\t\t$one_widget = array();\r\n\t\t\t\t\t$filedata = substr( $filedata, $spos );\r\n\r\n\t\t\t\t\t$spos = strpos( $filedata, '</h3>' );\r\n\t\t\t\t\t$workstr = substr( $filedata, 0, $spos );\r\n\t\t\t\t\t$retv = strip_tags( $workstr );\r\n\t\t\t\t\t$one_widget[ 'title' ] = $retv;\r\n\t\t\t\t\t$workstr = substr( $workstr, strpos( $workstr, '<h3>' ) );\r\n\t\t\t\t\t$workstr = substr( $workstr, strpos( $workstr, '\"' ) + 1 );\r\n\t\t\t\t\t$workstr = substr( $workstr, 0, strpos( $workstr, '\"' ) );\r\n\t\t\t\t\t$one_widget[ 'pgurl' ] = $workstr;\r\n\t\t\t\t\t$filedata = substr( $filedata, $spos );\r\n\r\n\t\t\t\t\t$spos = strpos( $filedata, '<ul class=\"plugin-meta\">' );\r\n\t\t\t\t\t$retv = strip_tags( substr( $filedata, 0, $spos ) );\r\n\t\t\t\t\t$one_widget[ 'desc' ] = $retv;\r\n\t\t\t\t\t$filedata = substr( $filedata, $spos );\r\n\r\n\t\t\t\t\t$spos = strpos( $filedata, '</li>' );\r\n\t\t\t\t\t$retv = strip_tags( substr( $filedata, 0, $spos ) );\r\n\t\t\t\t\t$retv = str_replace( \"Version \", \"\", $retv );\r\n\t\t\t\t\t$one_widget[ 'ver' ] = $retv;\r\n\t\t\t\t\t$filedata = substr( $filedata, $spos );\r\n\r\n\t\t\t\t\t$spos = strpos( $filedata, '</li>', 5 );\r\n\t\t\t\t\t$retv = strip_tags( substr( $filedata, 0, $spos ) );\r\n\t\t\t\t\t$retv = str_replace( \"Updated \", \"\", $retv ) ;\r\n\t\t\t\t\t$one_widget[ 'update' ] = $retv;\r\n\t\t\t\t\t$filedata = substr( $filedata, $spos );\r\n\r\n\t\t\t\t\t$spos = strpos( $filedata, '</li>', 5 );\r\n\t\t\t\t\t$retv = strip_tags( substr( $filedata, 0, $spos ) );\r\n\t\t\t\t\t$retv = str_replace( \"Downloads \", \"\", $retv ) ;\r\n\t\t\t\t\t$one_widget[ 'down' ] = $retv;\r\n\t\t\t\t\t$filedata = substr( $filedata, $spos );\r\n\r\n\t\t\t\t\t$w_datas[] = $one_widget;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} /* if else */\r\n\t\t\t\t$spos = strpos( $filedata, '<div class=\"plugin-block\">' );\r\n\t\t\t} while( $spos !== false );\r\n\r\n\t\t\t$_ismore = strpos( $filedata, \"<a class='next page-numbers'\" );\r\n\r\n\t\t\tfor( $i=0; $i<count($w_datas); $i++) {\r\n\t\t\t\t$workstr = $w_datas[$i][pgurl];\r\n\t\t\t\tif( $workstr && strlen( $workstr ) > 0 ) {\r\n\t\t\t\t\t$filedata = @file_get_contents( $workstr );\r\n\t\t\t\t\tif( $filedata ) {\r\n\t\t\t\t\t\t$spos = strpos( $filedata, '<div id=\"fyi\" class=\"block\">' );\r\n\t\t\t\t\t\t$filedata = substr( $filedata, $spos );\r\n\t\t\t\t\t\t$spos = strpos( $filedata, 'Author Homepage' );\r\n\t\t\t\t\t\t$filedata = substr( $filedata, $spos );\r\n\t\t\t\t\t\t$spos = strpos( $filedata, '<a href=' );\r\n\t\t\t\t\t\t$filedata = substr( $filedata, $spos );\r\n\t\t\t\t\t\t$filedata = substr( $filedata, 0, strpos( $filedata, '>' ) + 1 );\r\n\t\t\t\t\t\t$w_datas[$i]['plginpage_atag'] = $filedata;\r\n\t\t\t\t\t} /* if */\r\n\t\t\t\t} /* if */\r\n\t\t\t} /* for */\r\n\r\n\t\t\tforeach( $w_datas as $wdata ) {\r\n\t\t\t\t$_output .= '<li class=\"my_widget_title\" >' . $wdata[ 'plginpage_atag' ] . $wdata[ 'title' ] . '</a></li>';\r\n\r\n\t\t\t\tif( $display_description ) {\r\n\t\t\t\t\t$_output .= '<div class=\"my_widget_description\" style=\"margin-left: 10px; margin-right: 10px; text-align:left; text-align: justify; text-justify: auto; margin-bottom: 0.4em; font-size:7pt; color:#888;\">';\r\n\t\t\t\t\t$_output .= $wdata[ 'desc' ];\r\n\t\t\t\t\t$_output .= '</div>';\r\n\t\t\t\t} /* if */\r\n\r\n\t\t\t\tif( $display_version || $display_update ) {\r\n\t\t\t\t\t$_output .= '<div class=\"my_widget_version_date\" style=\"margin-left: 10px; margin-right: 10px; text-align:right; margin-bottom: 0.4em; font-size:7pt; color:#888;\">';\r\n\t\t\t\t\tif( $display_version ) { $_output .= 'ver' . $wdata[ 'ver' ] ; }\r\n\t\t\t\t\tif( $display_update ) { $_output .= ' ' . $wdata[ 'update' ]; }\r\n\t\t\t\t\t$_output .= '</div>';\r\n\t\t\t\t} /* if */\r\n\t\t\t} /* foreach */\r\n\t\t} /* if */\r\n\r\n\t\t$retv = array( 'the_html' => $_output, 'is_more_page' => $_ismore );\r\n\r\n\t\treturn( $retv );\r\n\t} /* widget_my_widget_get_html */\r\n\r\n\tfunction widget_my_widgets( $args ) {\r\n\t\textract($args);\r\n\r\n\t\t$options = get_option('widget_my_widgets');\r\n\t\t$title = $options['widget_my_widgets_title'];\r\n\t\t$wp_repository_pageid = $options['widget_my_widgets_repository_pageid'];\r\n\t\t$thecache = $options[ 'widget_my_widgets_cache' ];\r\n\t\t$cached_time = $options['widget_my_widgets_cached_time'];\r\n\r\n\t\t$output = '<div id=\"widget_my_widgets\"><ul>';\r\n\r\n\t\t// section main logic from here \r\n\t\t$wp_org_profile_name = $wp_repository_pageid;\r\n\t\t$page_loop_counter = 1;\r\n\t\t$cache_timeout = 60 * 60;\t// 60 sec x 60 min = 1 hour\r\n\r\n\t\tif( $cached_time + $cache_timeout < time() ) {\r\n\t\t\t$retv = '<div class= \"my_widget_section_title\" style=\"font-size:7pt; color:#888;text-align:center;\" >- released to repository -</div>';\r\n\r\n\t\t\tdo {\r\n\t\t\t\t$retData = widget_my_widget_get_html( $wp_org_profile_name, $page_loop_counter++ );\r\n\t\t\t\t$retv .= $retData[ 'the_html' ];\r\n\t\t\t} while( $retData[ 'is_more_page' ] );\r\n\r\n\t\t\t$options['widget_my_widgets_cached_time'] = time();\r\n\t\t\t$options[ 'widget_my_widgets_cache' ] = $retv . '<!-- cached -->';\r\n\t\t\tupdate_option('widget_my_widgets', $options);\r\n\t\t}else{\r\n\t\t\t$retv = $thecache;\r\n\t\t} /* if else */\r\n\r\n\t\t$output .= $retv;\r\n// --\r\n\r\n\r\n// if you want to add fixed entry, add here\r\n// section title looks like this\r\n// $output .= '<div class=\"my_widget_section_title\" style=\"margin-top:1em; font-size:7pt; color:#888;text-align:center;\" >- not on repository but released -</div>';\r\n//\r\n// first, put widget name\r\n// $output .= '<li class=\"my_widget_title\" ><a href=\"http://www.yourdomain.com/yourpage.html\">' . \"Your widget title here\" . '</a></li>';\r\n//\r\n// then description and version-date with optionable switch\r\n//\tif( $display_description ) {\r\n//\t\t$output .= '<div class=\"my_widget_description\" style=\"margin-left: 10px; margin-right: 10px; text-align:left; text-align: justify; text-justify: auto; margin-bottom: 0.4em; font-size:7pt; color:#888;\">';\r\n//\t\t$output .= 'description text here';\r\n//\t\t$output .= '</div>';\r\n//\t}\r\n//\r\n//\tif( $display_version || $display_update ) {\r\n//\t\t$output .= '<div class=\"my_widget_version_date\" style=\"margin-left: 10px; margin-right: 10px; text-align:right; margin-bottom: 0.4em; font-size:7pt; color:#888;\">';\r\n//\t\tif( $display_version ) { $output .= 'ver' . '0.0.0'; }\r\n//\t\tif( $display_update ) { $output .= ' ' . '2009-12-25'; }\r\n//\t\t$output .= '</div>';\r\n//\t}\r\n//\r\n// and so on.\r\n\r\n// --\r\n\t\t$output .= '<div style=\"text-align:left;\"></div>'; // this is dummy for IE\r\n\t\t// These lines generate the output\r\n\t\t$output .= '</ul></div>';\r\n\r\n\t\techo $before_widget . $before_title . $title . $after_title;\r\n\t\techo $output;\r\n\t\techo $after_widget;\r\n\t} /* widget_my_widgets() */\r\n\r\n\tfunction widget_my_widgets_control() {\r\n\t\t$options = $newoptions = get_option('widget_my_widgets');\r\n\t\tif ( $_POST[\"widget_my_widgets_submit\"] ) {\r\n\t\t\t$newoptions['widget_my_widgets_title'] = strip_tags(stripslashes($_POST[\"widget_my_widgets_title\"]));\r\n\t\t\t$newoptions['widget_my_widgets_repository_pageid'] = strip_tags(stripslashes($_POST[\"widget_my_widgets_repository_pageid\"]));\r\n\r\n\t\t\t$newoptions['widget_my_widgets_display_description'] = (boolean)$_POST[\"widget_my_widgets_display_description\"];\r\n\t\t\t$newoptions['widget_my_widgets_display_version'] = (boolean)$_POST[\"widget_my_widgets_display_version\"];\r\n\t\t\t$newoptions['widget_my_widgets_display_update'] = (boolean)$_POST[\"widget_my_widgets_display_update\"];\r\n\r\n\t\t\t$newoptions['widget_my_widgets_cached_time'] = 0;\r\n\t\t\t$newoptions['widget_my_widgets_cache'] = \"\";\r\n\t\t}\r\n\t\tif ( $options != $newoptions ) {\r\n\t\t\t$options = $newoptions;\r\n\t\t\tupdate_option('widget_my_widgets', $options);\r\n\t\t}\r\n\r\n\t\t// those are default value\r\n\r\n\t\t$title = htmlspecialchars($options['widget_my_widgets_title'], ENT_QUOTES);\r\n\t\t$wp_repository_pageid = $options['widget_my_widgets_repository_pageid'];\r\n\t\t$display_description = $options['widget_my_widgets_display_description'];\r\n\t\t$display_version = $options['widget_my_widgets_display_version'];\r\n\t\t$display_update = $options['widget_my_widgets_display_update'];\r\n\r\n?>\r\n\t <?php _e('Title:'); ?> <input style=\"width: 170px;\" id=\"widget_my_widgets_title\" name=\"widget_my_widgets_title\" type=\"text\" value=\"<?php echo $title; ?>\" /><br />\r\n\r\n\t <?php _e('PageID:'); ?> <input style=\"width: 170px;\" id=\"widget_my_widgets_repository_pageid\" name=\"widget_my_widgets_repository_pageid\" type=\"text\" value=\"<?php echo $wp_repository_pageid; ?>\" /><br /><div style=\"font-size:7pt; color: #888;text-align:center;\" >copy pageid from wordpress.org</div>\r\n\r\n <input id=\"widget_my_widgets_display_description\" name=\"widget_my_widgets_display_description\" type=\"checkbox\" value=\"1\" <?php if( $display_description ) echo 'checked';?>/> <?php _e('Description'); ?><br />\r\n <input id=\"widget_my_widgets_display_version\" name=\"widget_my_widgets_display_version\" type=\"checkbox\" value=\"1\" <?php if( $display_version ) echo 'checked';?>/> <?php _e('Version'); ?><br />\r\n <input id=\"widget_my_widgets_display_update\" name=\"widget_my_widgets_display_update\" type=\"checkbox\" value=\"1\" <?php if( $display_update ) echo 'checked';?>/> <?php _e('Date'); ?><br />\r\n\r\n \t <input type=\"hidden\" id=\"template_src_submit\" name=\"widget_my_widgets_submit\" value=\"1\" />\r\n<?php\r\n\t} /* widget_my_widgets_control() */\r\n\r\n\tregister_sidebar_widget('My Widgets', 'widget_my_widgets');\r\n\tregister_widget_control('My Widgets', 'widget_my_widgets_control' );\r\n}", "function rp_widget($args)\r\n{\r\n extract($args);\r\n global $rp_settings;\r\n //Get the options\r\n $rp_settings = get_option(\"rp_widget_option\");\r\n \r\n // Add Thickbox if enabled\r\n if ($rp_settings['rp_thickbox'] == 'on') {\r\n //add_action('init', wp_enqueue_script('scriptaculous') );\r\n add_thickbox();\r\n add_action('wp_footer', 'rp_inline_script');\r\n \r\n }\r\n \r\n //If number of attachments to be displayed is less than 1 make it default to 6\r\n if ($rp_settings['rp_number'] < 1) $rp_settings['rp_number'] = 6;\r\n \r\n if ($rp_settings['rp_custom_css'] == 'on') {\r\n if (!$rp_settings['rp_css'] == \"\") {\r\n echo \"<style type='text/css'>\";\r\n echo $rp_settings['rp_css'];\r\n echo \"</style>\";\r\n }\r\n } else { //inline default css\r\n?>\r\n <style>\r\n #recent_photos_envelope{margin:0 0 20px 0;}\r\n .recent_photo_image a {float:left;display:inline;margin:0 16px 15px 0;border:1px dashed #888;padding:5px}\r\n .recent_photo_image a:hover {border:1px dashed #000}\r\n #browsephotos{margin: 0 25px 10px 12px; float:right;}\r\n </style>\r\n<?php\r\n }\r\n echo $before_widget;\r\n\techo $before_title . $rp_settings['rp_widget_title'] . $after_title; \r\n?>\r\n <div id=\"recent_photos_envelope\">\t\r\n<?php\r\n global $wpdb;\t\r\n $posts = get_posts(array(\r\n\t\t\t //\"showposts\"=>-1,\r\n\t\t\t //\"what_to_show\"=>\"posts\",\r\n\t\t\t \"post_status\"=>\"inherit\",\r\n\t\t\t \"numberposts\"=>$rp_settings['rp_number'],\r\n\t\t\t \"post_type\"=>\"attachment\",\r\n\t\t\t \"post_mime_type\"=>\"image/jpeg,image/gif,image/jpg,image/png\",\r\n\t\t\t \"orderby\"=>\"menu_order ASC, ID ASC\"\t\t\t ));\r\n\t//Rev 0.0.2 - Adding Random feature \r\n\t//Random feature if it is selected\r\n if ($rp_settings['rp_randomize'] == 'on') shuffle($posts);\r\n\r\n\tfor($i = 0; $i < $rp_settings['rp_number'] ; $i++)\r\n\t {\r\n $attachmentpost = $posts[$i];\r\n if($src = wp_get_attachment_thumb_url($attachmentpost->ID))\r\n {\r\n $attachment_title = get_the_title($attachmentpost->ID);\r\n $attachment_url = wp_get_attachment_url($attachmentpost->ID); \r\n $id = $attachmentpost->ID;\r\n ?>\r\n <div class=\"recent_photo_image\">\r\n <a class='thickbox' rel=\"recent_photos\" href=\"<?php echo $attachment_url; ?>\" title=\"<?php echo $attachment_title; ?>\">\r\n <img src=\"<?php echo $src; ?>\" alt=\"<?php echo $attachment_title; ?>\" title=\"<?php echo $attachment_title; ?>\" height=\"75\" width=\"75\" />\r\n </a>\r\n </div>\r\n \r\n <?php \r\n\t\t\t\t}\r\n\t }\r\n\t ?>\r\n\t <br />\r\n\t <?php \r\n if (!$rp_settings['rp_browse_link'] == \"\") { ?>\r\n <a id=\"browsephotos\" href=\"<?php echo $rp_settings['rp_browse_link'];?>\"><span class=\"replace\">Browse Photos</span></a>\r\n <?php }\r\n ?>\r\n\t </div>\r\n\t <?php\r\n\t echo $after_widget;\r\n}", "function vslider_tutorials_page() { ?>\r\n\t<div class=\"wrap\"><div id=\"icon-users\" class=\"icon32\"><br /></div><h2>vSlider Tutorials &amp; FAQ's&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class=\"button\" href=\"#\">Expand All</a></h2>\r\n <div id=\"tutorials\"></div>\r\n\t</div>\r\n<?php }", "function emc_slider_html( $content, $args, $post ) {\r\n\r\n\t$image = get_the_post_thumbnail( get_the_ID(), $args['size'] );\r\n\r\n\t// Determine our More link\r\n\t$link = get_field( 'slider_link' );\r\n\t$text = ( get_field( 'slider_link_text' ) ) ? get_field( 'slider_link_text' ) : __( 'More&nbsp;&rarr;', 'emc' );\r\n\t$external = ( get_field( 'slider_external' ) ) ? ' target=\"_blank\"' : false;\r\n\t$more = ( $link ) ? sprintf( '&nbsp;&nbsp;<a class=\"emc-slider-more\" href=\"%1$s\"%2$s>%3$s</a>',\r\n\t\t\tesc_url( $link ),\r\n\t\t\t$external,\r\n\t\t\tesc_html( $text )\r\n\t\t) : false;\r\n\r\n\t$excerpt = '';\r\n\tif ( ( $args['display_excerpt'] == 'true' || $args['display_excerpt'] == 1 ) && has_excerpt( get_the_ID() ) ) {\r\n\t\t$excerpt = get_the_excerpt();\r\n\t\tif ( $more ) $excerpt .= $more;\r\n\t\t$excerpt = wpautop( $excerpt );\r\n\t}\r\n\r\n\t$title = get_the_title( get_the_ID() );\r\n\tif ( $args['link_title'] == 'true' || $args['link_title'] == 1 ) {\r\n\t\t$title = '<a href=\"' . get_permalink( $post ) . '\">' . $title . '</a>';\r\n\t\t$image = '<a href=\"' . get_permalink( $post ) . '\">' . $image . '</a>';\r\n\t}\r\n\r\n\t$content = $image . '<div class=\"slide-excerpt\"><h2 class=\"slide-title\">' . $title . '</h2>' . $excerpt . '</div>';\r\n\tif ( $args['layout'] == 'text-top' ) {\r\n\t\t$content = '<div class=\"slide-excerpt\"><h2 class=\"slide-title\">' . $title . '</h2>' . $excerpt . '</div>' . $image;\r\n\t}\r\n\r\n\treturn $content;\r\n\r\n}", "function kstHelpWordpressBlogPosts_postThumbnails() {\n ?>\n <p>\n Each post can use an image as a \"featured image\" aka \"post thumbnail\" on the blog index and in archives.\n </p>\n <p>\n When reading a post (permalink) a larger version of the \"featured image\" appears at the top of the post.\n </p>\n <p>\n <strong>How to use a \"featured image\" on a post:</strong>\n </p>\n <p>\n Option 1: (you are uploading multiple pictures anyway)<br />\n Above the buttons above the editor you will see \"Upload/Insert\" and four icons representing the different media you can upload.\n Click the first button that looks like a photo. In the popup that appears on the first \"tab\" labeled \"From your computer\"\n Upload all the images for that post.\n Click the link labeled \"Show\" next to the image you would like to use. A form will appear.\n At the bottom of the form, click the link labeled \"Use as featured image\".\n </p>\n <p>\n Option 2: (you only need to upload the \"featured image\")<br />\n In the right sidebar of the post edit screen at the bottom click the link labeled \"Set featured image\".<br />\n A form will appear. Upload the image you would like to use.<br />\n Once the image is uploaded a form will appear where you can edit the image and meta data.<br />\n At the bottom of the form, click the link labeled \"Use as featured image\".\n </p>\n <p><em>\n NOTE: If you just want to show the thumbnail but not the fullsize image when reading\n the post add the custom field \"hide_featured_image\" with a value of \"1\". See\n <a href=\"#custom_fields\">custom fields below</a> for more info.\n </em></p>\n <?php\n}", "function pro_slider_display()\n{\n\t$pro = get_option('up_themes_betty_commerce_wordpress_theme');\n\t\n\tif( !empty( $pro['homepage_slider'] ) )\n\t{\n\t\treturn $pro['homepage_slider'];\n\t}\n\treturn false;\n}", "function smoothwriter_after_theme_setup() {\n\t\t\tload_theme_textdomain('smoothwriter', get_template_directory() . '/languages');\n\t\t\t\n\t\t\t/* widget shortcode support*/\n\t\t\tadd_filter('widget_text', 'do_shortcode');\n\t\t\t\n\t\t\t/* theme supports */\n\t\t\tadd_theme_support('post-thumbnails', array('post','Dj_slider'));\n\t\t\tadd_theme_support('automatic-feed-links');\t\t\t\n\n\t\t\tadd_theme_support('post-thumbnails');\n\n\t\t\tadd_image_size('smoothwriterslider1290x560', 1290, 560, true);\n\t\t\tadd_image_size('recentpostwidget150x150', 150, 150, true);\n\t\t\tadd_image_size('portfilio230x172', 230, 172, true);\n\t\t\tadd_image_size('teammember500x500', 500, 500, true);\n\t\t\tadd_image_size('teammember230x172', 220, 165, true);\n\t\t\tadd_image_size('fontpageblog275x185', 275, 185, true);\n\n\t\t\t\n\t\t\t\n\t\t\t/* register nav left*/\n\t\t\tregister_nav_menus(array(\n\t\t\t\t'primarymenu' => __('Primary Menu', 'smoothwriter')\n\t\t\t));\n\t\t\t\n\n\t\t\t/* register sidebar */\n\t\t\tfunction smoothwriter_widgets_register_func()\n\t\t\t\t{\t\n\t\t\t\t\t\n\t\t\t\tregister_sidebar( array(\n\t\t\t 'name' => __( 'Footer Sidebar', 'smoothwriter' ),\n\t\t\t 'id' => 'footer-sidebar',\n\t\t\t 'description' => __( 'Widgets in this area will be shown Footer.', 'smoothwriter' ),\n\t\t\t 'before_widget' => '<div class=\"col-md-3 col-sm-12 col-xs-12\"><div class=\"widget\">',\n\t\t\t\t\t'after_widget' => '</div></div>',\n\t\t\t\t\t'before_title' => '<header class=\"cs-heading-title\">\n\t\t\t\t\t\t\t<h2 class=\"cs-section-title\">',\n\t\t\t\t\t'after_title' => '</h2>\n\t\t\t\t\t\t</header>',\n\t\t\t\t ) );\n\t\t\t\tregister_sidebar( array(\n\t\t\t 'name' => __( 'Right Sidebar', 'smoothwriter' ),\n\t\t\t 'id' => 'right-sidebar',\n\t\t\t 'description' => __( 'Widgets in this area will be shown Right sidebar.', 'smoothwriter' ),\n\t\t\t 'before_widget' => ' <div class=\"widget\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<header class=\"cs-heading-title\"><h2 class=\"cs-section-title\">',\n\t\t\t\t\t'after_title' => '</h2>\n\t\t\t\t\t\t</header>',\n\t\t\t\t ) );\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\tadd_action('widgets_init', 'smoothwriter_widgets_register_func');\n\n\t\t\t\n\t\t\t}", "function msdlab_homepage_widgets(){\n\tprint '<div id=\"homepage-widgets\" class=\"widget-area\">';\n\tprint '<div class=\"wrap\"><div class=\"row\">';\n dynamic_sidebar('homepage-widgets');\n \tprint '</div></div>';\n\tprint '</div>';\n}", "public function widget_scripts() {\n\t\t\n\t\twp_enqueue_style( 'elementor-main-style', plugins_url( '/assets/style.css', __FILE__ ) ); // Main Slider Main\n\t\twp_register_script( 'core-functions', plugins_url( '/assets/js/main-functions.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\t\n\t\twp_register_script( 'bx-main-slider', plugins_url( '/assets/bxslider/jquery.bxslider.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_enqueue_style( 'bx-main-slider', plugins_url( '/assets/bxslider/bxslider.css', __FILE__ ) ); // BxSlider\n\t\t\n\t\twp_register_script( 'flex-main-slider-js', plugins_url( '/assets/flexslider/jquery_flexslider.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_enqueue_style( 'flex-main-slider-css', plugins_url( '/assets/flexslider/flexslider.css', __FILE__ ) ); // Flexslider\n\t\t\n\t\twp_register_script( 'sliderresponsive-slider-js', plugins_url( '/assets/slider-responsive/sliderresponsive.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_enqueue_style( 'sliderresponsive-slider-js', plugins_url( '/assets/slider-responsive/sliderresponsive.css', __FILE__ ) ); // sliderresponsive\n\t\t\n\t\t\n\t\twp_register_script( 'progressbar-script-js', plugins_url( '/assets/progress-bar/jQuery-plugin-progressbar.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_enqueue_style( 'progressbar-script-css', plugins_url( '/assets/progress-bar/jQuery-plugin-progressbar.css', __FILE__ ) ); // sliderresponsive\n\t\t\n\t\twp_register_script( 'slick-slider-js', plugins_url( '/assets/slick/slick.min.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_enqueue_style( 'slick-slider-css', plugins_url( '/assets/slick/slick.css', __FILE__ ) ); // Slick\n\t\twp_enqueue_style( 'slick-slider-theme', plugins_url( '/assets/slick/slick-theme.css', __FILE__ ) ); // Slick Theme\n\t\t\n\t\twp_register_script( 'owl-slider-js', plugins_url( '/assets/owl_carousel/owl_carousel.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_enqueue_style( 'owl-slider-css', plugins_url( '/assets/owl_carousel/owl_carousel.css', __FILE__ ) ); // OWL\n\t\t\n\t\twp_register_script( 'prettyphoto-main', plugins_url( '/assets/prettyphoto/prettyphoto-main.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_register_script( 'prettyphoto-theme', plugins_url( '/assets/prettyphoto/prettyphoto.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_enqueue_style( 'prettyphoto-theme', plugins_url( '/assets/prettyphoto/prettyphoto.css', __FILE__ ) ); // PrettyPhoto Theme\n\t\t\n\t\twp_enqueue_style('chosen', plugins_url( '/assets/chosen/chosen.min.css', __FILE__ ) );\n\t\twp_enqueue_style('nice-select', plugins_url( '/assets/chosen/selectric.css', __FILE__ ) );\n\t\twp_register_script('chosen', plugins_url( '/assets/chosen/chosen-jquery-min.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_register_script('nice-select', plugins_url( '/assets/chosen/jquery.nice-select.min.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\t\n\n\t\twp_register_script('jplayer-jukebox', plugins_url( '/assets/jplayer/js/jplayer-jukebox.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_register_script('jplayer-playlist', plugins_url( '/assets/jplayer/js/jplayer-playlist-min.js', __FILE__ ), [ 'jquery' ], false, true );\t\t\n\t\twp_register_script('jplayer-core', plugins_url( '/assets/jplayer/js/jquery-jplayer-min.js', __FILE__ ), [ 'jquery' ], false, true );\t\t\n\t\t\n\t\twp_enqueue_style('jplayer-uno', plugins_url( '/assets/jplayer/css/jplayer-uno.css', __FILE__ ) );\n\t\twp_enqueue_style('jplayer-core', plugins_url( '/assets/jplayer/css/jplayer-core.css', __FILE__ ) );\n\t\t\n\t\t\n\t\t\n\t}", "function universityFeatures() {\n add_theme_support('title-tag');\n}", "function thmplt_carousel_slide_meta(){\r\n\tadd_meta_box(\"thmplt_carousel_meta_box1\", \"Slide Settings\", \"thmplt_carousel_slide_settings_html\", \"thmplt_carousel\", \"normal\", \"high\");\r\n\tadd_meta_box(\"thmplt_carousel_meta_box2\", \"Slide Images\", \"thmplt_carousel_slide_settings_html2\", \"thmplt_carousel\", \"normal\", \"high\");\r\n}", "function ws24h_widgets_init() \n{\n \n \n require_once 'widget-popular.php';\n require_once 'widget-video.php';\n \n\tregister_sidebar( array(\n\t\t'name' => __( 'Primary Widget Area', WS24H_THEME_NAME),\n\t\t'id' => 'primary-sidebar',\n\t\t'description' => __( 'Drag widgets here to appear in your sidebar.',WS24H_THEME_NAME),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"ms-block-item widgets sidebar-widgets %2$s\">',\n\t\t'after_widget' => '</div><div class=\"clear-line-5\"></div>',\n \n\t\t'before_title' => '<div class=\"ms-box-title\">\n <h3><span></span>',\n\t\t'after_title' => '</h3></div> <div class=\"clear-line-3\"></div>',\n\t) );\n \n register_sidebar( array(\n\t\t'name' => __( 'Second Widget Area', WS24H_THEME_NAME),\n\t\t'id' => 'second-sidebar',\n\t\t'description' => __( 'Drag widgets here to appear in your second sidebar.',WS24H_THEME_NAME),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"ms-block-item widgets second-widgets %2$s\">',\n\t\t'after_widget' => '</div>',\n \n\t\t'before_title' => '<div class=\"ms-box-title\">\n <h3><span></span>',\n\t\t'after_title' => '</h3></div> <div class=\"clear-line-3\"></div>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => __( 'Left Slider Widget Area', WS24H_THEME_NAME),\n\t\t'id' => 'left-slider',\n\t\t'description' => __( 'Drag widgets here to appear in your Left Slider.',WS24H_THEME_NAME),\n\t\t'before_widget' => '<div id=\"divAdLeft\" style=\"display: block; position: fixed; top: 0px;\">',\n\t\t'after_widget' => '</div>',\n \n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\t\n register_sidebar( array(\n\t\t'name' => __( 'Right Slider Widget Area', WS24H_THEME_NAME),\n\t\t'id' => 'right-slider',\n\t\t'description' => __( 'Drag widgets here to appear in your Right Slider.',WS24H_THEME_NAME),\n\t\t'before_widget' => '<div id=\"divAdRight\" style=\"display: block; position: fixed; top: 0px;\">',\n\t\t'after_widget' => '</div>',\n \n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n}" ]
[ "0.66408235", "0.6628934", "0.65764725", "0.65531725", "0.655191", "0.65310925", "0.65065163", "0.6494426", "0.64939094", "0.64803886", "0.64501935", "0.64413685", "0.6438569", "0.6432856", "0.6399492", "0.63970006", "0.63775915", "0.63505995", "0.6336879", "0.63362604", "0.6326562", "0.63183284", "0.6312656", "0.6311251", "0.6311251", "0.6301298", "0.6296469", "0.62904596", "0.62846756", "0.62589943", "0.6257919", "0.6245069", "0.62405556", "0.62394774", "0.621475", "0.62147075", "0.6203517", "0.61790425", "0.616979", "0.616979", "0.6161342", "0.6158168", "0.6151003", "0.61355895", "0.61301136", "0.6128496", "0.61194915", "0.6115121", "0.6110476", "0.6105914", "0.6103614", "0.60992265", "0.6098828", "0.6096459", "0.6094542", "0.60912704", "0.60891557", "0.60885775", "0.60826254", "0.60802233", "0.6080025", "0.6079759", "0.60795426", "0.6074295", "0.60734683", "0.60650647", "0.60641795", "0.6063009", "0.60616946", "0.60588217", "0.6056122", "0.6047649", "0.6037794", "0.60334814", "0.60304695", "0.6021147", "0.6020843", "0.6018213", "0.6011488", "0.6002045", "0.599552", "0.5994187", "0.59935755", "0.5989137", "0.5986553", "0.5981424", "0.5979146", "0.5976335", "0.5975239", "0.5973848", "0.5969282", "0.59647816", "0.59559834", "0.59556156", "0.5953962", "0.5953422", "0.5945295", "0.5940269", "0.59358656", "0.5935386", "0.59344774" ]
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'title' => 'required|min:5|max:199', 'body' => 'required', 'thumbnail' => 'image|mimes:png,jpg,svg,jpeg|max:2048', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342797", "0.8013068", "0.79357624", "0.79257727", "0.7922943", "0.7903906", "0.7859204", "0.7789624", "0.7783409", "0.77624106", "0.773673", "0.7732383", "0.77094924", "0.7691624", "0.7684878", "0.7682184", "0.7682184", "0.7682184", "0.7682184", "0.7682184", "0.7682184", "0.76753145", "0.76747704", "0.76653886", "0.7656984", "0.7641385", "0.7629662", "0.7629557", "0.7617277", "0.76092637", "0.7607173", "0.7602176", "0.7598716", "0.7597812", "0.7591812", "0.75902253", "0.7587347", "0.7579866", "0.75553906", "0.7555079", "0.75503534", "0.75459445", "0.7540463", "0.7536189", "0.75356364", "0.75300074", "0.75181943", "0.7514811", "0.75078565", "0.7506201", "0.75052506", "0.7498871", "0.7495198", "0.7494957", "0.7493081", "0.74902064", "0.7489407", "0.74890095", "0.7485984", "0.74858546", "0.7478957", "0.74781555", "0.74693084", "0.74632835", "0.7461654", "0.746117", "0.745908", "0.74546385", "0.7453331", "0.7452256", "0.7449815", "0.74481654", "0.7441297", "0.74408644", "0.7435215", "0.743476", "0.7432712", "0.74296844", "0.74289936", "0.7423239", "0.7418971", "0.74155754", "0.7413715", "0.7413531", "0.7412177", "0.7409704", "0.740534", "0.74039155", "0.7403364", "0.740084", "0.73900056", "0.73831314", "0.73729247", "0.7370593", "0.73688376", "0.73608065", "0.7355452", "0.7346383", "0.73441696", "0.73426807", "0.73349255" ]
0.0
-1
Creates an empty export instance
public function createExport();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function export();", "public function export();", "public function export();", "public function export();", "public function export();", "public function export()\n {\n }", "public function __construct(Export $export)\n {\n $this->export = $export;\n }", "public function export()\n {\n \n }", "public function export()\n {\n //\n }", "protected function constructExportObject()\n\t{\n\t\t//default export is \"all public fields\"\n\t\treturn (object) Arrays::getPublicPropertiesOfObject($this);\n\t}", "public function getNoExport();", "public function getNoExport() {}", "public function getNoExport() {}", "public static function export()\n {\n return null;\n }", "public function export (){\n\n }", "public function setNoExport($noExport = true);", "public function exportOnly(): self\n {\n $this->hidden = true;\n $this->exportOnly = true;\n\n return $this;\n }", "public function setNoExport($noExport = true) {}", "public function setNoExport($noExport = true) {}", "protected function _CreateExportSession()\n\t{\n\t\t$query = \"create table [|PREFIX|]export_session (\n\t\t\ttype varchar(20) not null default '',\n\t\t\tmodule varchar(30) not null default '',\n\t\t\tlog varchar(30) not null default '',\n\t\t\tdata text not null\n\t\t)\";\n\t\t$GLOBALS['ISC_CLASS_DB']->Query($query);\n\n\t\t$query = \"insert into [|PREFIX|]export_session (type,data) values ('primary', '')\";\n\t\t$GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t$this->_exportSession = array();\n\t}", "public function exportData() {\n\t\treturn $this->constructExportObject();\n\t}", "public function export(): mixed;", "public function createExportFromScheduleData()\n {\n \t// create the export based on the schedule data\n //include_once( 'extension/ezstaticexport/classes/ezstaticexportexport.php' );\n \n // Total number of nodes to export\n $total = $this->attribute('total');\n \n \t$row = array( 'type' => $this->attribute( 'type' ),\n 'path_string' => $this->attribute( 'path_string' ),\n 'target' => $this->attribute( 'target' ),\n 'schedule_type' => 'scheduled',\n 'status' => eZStaticExport::STATUS_PENDING,\n 'total' => $total,\n \t\t\t\t 'static_resources' => $this->attribute('static_resources'));\n\n $this->export = new eZStaticExportExport( $row );\n $this->export->store();\n }", "public function ExportObject() {\n // Init object\n $plugin = new stdClass();\n // Set values\n $plugin->Name = $this->Name;\n $plugin->Version = $this->Version;\n $plugin->Author = $this->Author;\n $plugin->About = $this->About;\n $plugin->Root = $this->Root;\n $plugin->Identifier = $this->Identifier;\n \n // Return result\n return $plugin;\n }", "public function __construct(){\n parent::__construct(new ExporterItemInfo());\n }", "function __construct($exportID = 0){\n\t\tparent::__construct(EXPORT_TABLE);\n\t\t$this->setDefaults();\n\t\tif($exportID){\n\t\t\t$this->ID = $exportID;\n\t\t\t$this->load($exportID);\n\t\t}\n\t\t// clear expiered stuff\n\t\t$this->selDocs = $this->clearExpired($this->selDocs, FILE_TABLE);\n\t\t$this->selTempl = $this->clearExpired($this->selTempl, TEMPLATES_TABLE);\n\t\tif(defined('OBJECT_TABLE')){\n\t\t\t$this->selObjs = $this->clearExpired($this->selObjs, OBJECT_FILES_TABLE);\n\t\t\t$this->selClasses = $this->clearExpired($this->selClasses, OBJECT_TABLE);\n\t\t} else {\n\t\t\t$this->selObjs = '';\n\t\t\t$this->selClasses = '';\n\t\t}\n\t}", "abstract function exportData();", "function ctools_export_new_object($table, $set_defaults = TRUE) {\r\n $schema = ctools_export_get_schema($table);\r\n $export = $schema['export'];\r\n\r\n $object = new $export['object'];\r\n foreach ($schema['fields'] as $field => $info) {\r\n if (isset($info['object default'])) {\r\n $object->$field = $info['object default'];\r\n }\r\n else if (isset($info['default'])) {\r\n $object->$field = $info['default'];\r\n }\r\n else {\r\n $object->$field = NULL;\r\n }\r\n }\r\n\r\n if ($set_defaults) {\r\n // Set some defaults so this data always exists.\r\n // We don't set the export_type property here, as this object is not saved\r\n // yet. We do give it NULL so we don't generate notices trying to read it.\r\n $object->export_type = NULL;\r\n $object->{$export['export type string']} = t('Local');\r\n }\r\n return $object;\r\n}", "public function testExport()\n {\n $api = $this->createPartialMock('ForecastManagerWorksheetsExportApi', array('doExport'));\n $api->expects($this->once())\n ->method('doExport')\n ->with(\n $this->equalTo($this->service),\n $this->logicalNot($this->isEmpty()),\n $this->logicalNot($this->isEmpty())\n );\n $api->export($this->service, array());\n }", "function export()\n\t{\n\t\t$zip = $this->buildExportFile();\n\t\t\n\t ilUtil::deliverFile($zip, $this->object->getTitle().\".zip\", '', false, true);\n\t}", "function _instantiateExportDeployment($context) {\n\t\t$exportDeploymentClassName = $this->getExportDeploymentClassName();\n\t\t$this->import($exportDeploymentClassName);\n\t\t$exportDeployment = new $exportDeploymentClassName($context, $this);\n\t\treturn $exportDeployment;\n\t}", "public static function factory($exporterType, $options = false) {\n switch ($exporterType) {\n case 'csv' : $factory = new EfrontExportCsv($options); break;\n }\n return $factory;\n }", "private function export() {\n\t\t// export is in PipelineExportContoller\n\t}", "public function export() {\n $folder = $this->config->get('oxygen.mod-import-export.path');\n if(!file_exists($folder)) {\n mkdir($folder);\n }\n $path = $folder . $this->environment;\n if(!file_exists($path)) {\n mkdir($path);\n }\n\n $this->exportStrategy->create($path);\n\n foreach($this->workers as $worker) {\n $files = $worker->export($this->output);\n foreach($files as $localPath => $path) {\n $this->output->writeln('Adding file: ' . $path);\n $this->exportStrategy->addFile($path, $localPath);\n }\n }\n\n $this->exportStrategy->commit();\n\n foreach($this->workers as $worker) {\n $worker->postExport($this->output);\n }\n }", "public function excludeFromExport(): self\n {\n $this->includeInExport = false;\n\n return $this;\n }", "public function exportButton ()\n\t{\n\t}", "public static function start(WithId $object) : ExporterInterface {\n\t\treturn new self($object);\n\t}", "public function createExportFile()\n {\n $this->csvFile = self::tempFile('export.csv');\n $this->photoZip = self::tempFile('photos.zip');\n $this->exportFile = sys_get_temp_dir() . '/' . $this->datestamp . '-marcato.zip';\n\n $this->createCSV();\n $this->createPhotoZipfile();\n\n $zip = new ZipArchive();\n $result = $zip->open($this->exportFile, ZipArchive::CREATE | ZipArchive::OVERWRITE);\n if ($result !== true) {\n throw new RuntimeException(\"Failed to create zip archive result=[$result]\");\n }\n $zip->addFile($this->csvFile, $this->datestamp . '.csv');\n $zip->addFile($this->photoZip, $this->datestamp . '_ranger_photos.zip');\n $zip->close();\n }", "private function export() {\r\n $this->app->setTemplateData(array(\"content\" => $this->content, \"content-title\" => \"Oudermisbehandeling\", \"content-sub-title\" => $this->title, \"title\" => \"Ecareplan ~ Oudermisbehandeling - \" . $this->title, \"headscript\" => $this->script));\r\n }", "public function ExportObject() {\n // Init object\n $col = new stdClass();\n \n // Set values\n $col->id = $this->Id;\n $col->type = $this->Type;\n $col->label = $this->Label;\n $col->p = $this->P;\n \n // Return values\n return $col;\n }", "public static function createEmpty(): self\n {\n return new self(null);\n }", "public function disableExports()\n {\n /** @var Connection $dbal */\n $dbal = Shopware()->Container()->get('dbal_connection');\n $dbal->exec('DELETE FROM s_export WHERE id in (4711, 4712, 4713, 4714)');\n }", "public abstract function export($type);", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function isExportOnly(): bool\n {\n return $this->exportOnly === true;\n }", "public function exportAction() {\n\t\tInvoices::Export();\n\t}", "public function export() {\n\t\tif ( ! $this->can_export() ) {\n\t\t\twp_die(\n\t\t\t\t__( 'You do not have permission to export data.', 'affiliate-wp' ),\n\t\t\t\t__( 'Error', 'affiliate-wp' ),\n\t\t\t\tarray( 'response' => 403 )\n\t\t\t);\n\t\t}\n\n\t\t// Set headers.\n\t\t$this->headers();\n\n\t\t$file = $this->get_file();\n\n\t\t@unlink( $this->file );\n\n\t\techo $file;\n\n\t\tdie();\n\t}", "public static function exportGiudeReport()\n {\n /**\n * TODO\n */\n }", "function init__user_export()\n{\n define('USER_EXPORT_ENABLED', false);\n define('USER_EXPORT_MINUTES', 60 * 24);\n\n define('USER_EXPORT_DELIM', ',');\n\n define('USER_EXPORT_PATH', 'data_custom/modules/user_export/out.csv');\n\n define('USER_EXPORT_IPC_AUTO_REEXPORT', false);\n define('USER_EXPORT_IPC_URL_EDIT', null); // add or edit\n define('USER_EXPORT_IPC_URL_DELETE', null);\n define('USER_EXPORT_EMAIL', null);\n\n global $USER_EXPORT_WANTED;\n $USER_EXPORT_WANTED = array(\n // LOCAL => REMOTE\n 'id' => 'Composr member ID',\n 'm_username' => 'Username',\n 'm_email_address' => 'E-mail address',\n );\n}", "public function export()\n {\n if (! is_dir($this->_outputDir)) {\n mkdir($this->_outputDir, 0775, true);\n }\n\n foreach ($this->_metadata as $metadata) {\n // In case output is returned, write it to a file, skip otherwise\n $output = $this->exportClassMetadata($metadata);\n if ($output) {\n $path = $this->_generateOutputPath($metadata);\n $dir = dirname($path);\n if (! is_dir($dir)) {\n mkdir($dir, 0775, true);\n }\n\n if (file_exists($path) && ! $this->_overwriteExistingFiles) {\n throw ExportException::attemptOverwriteExistingFile($path);\n }\n\n file_put_contents($path, $output);\n chmod($path, 0664);\n }\n }\n }", "public function __construct() {\n\n\t\t// Add custom schedule, e.g. every 10 minutes\n\t\tadd_filter( 'cron_schedules', array( $this, 'add_auto_export_schedule' ) );\n\n\t\t// Schedule auto-update events if they don't exist, run in both frontend and backend so events are still scheduled when an admin reactivates the plugin\n\t\tadd_action( 'init', array( $this, 'add_scheduled_export' ) );\n\n\t\t// Trigger export + upload of non-exported orders, wp-cron fires this action on the given recurring schedule\n\t\tadd_action( 'wc_customer_order_csv_export_auto_export_orders', array( $this, 'auto_export_orders' ) );\n\n\t\t$this->exports_enabled = ( 'disabled' != get_option( 'wc_customer_order_csv_export_auto_export_method' ) );\n\t}", "public function export(){\r\n $specified = $this->__isExportFieldSpecified();\r\n if($specified){\r\n $csv = $this->Student->export($specified);\r\n $this->Response->csv($csv);\r\n }else{\r\n $schemas = $this->Student->export();\r\n $this->set(compact('specified', 'schemas'));\r\n }\r\n }", "protected function makeEmptyLoaderInstance(): Loader\n {\n return new Loader('testCase', 'test');\n }", "public function run()\n {\n $customerPermission = [\n 'name' => 'Export Customers',\n 'slug' => 'export_customers',\n ];\n\n $this->permission->create($customerPermission, false);\n $godownsPermission = [\n 'name' => 'Export Godowns',\n 'slug' => 'export_godowns',\n ];\n\n $this->permission->create($godownsPermission, false);\n $weightsPermission = [\n 'name' => 'Export Weights',\n 'slug' => 'export_weights',\n ];\n\n $this->permission->create($weightsPermission, false);\n\n $unitsPermission = [\n 'name' => 'Export Units',\n 'slug' => 'export_units',\n ];\n\n $this->permission->create($unitsPermission, false);\n $technicalsPermission = [\n 'name' => 'Export Technicals',\n 'slug' => 'export_technicals',\n ];\n\n $this->permission->create($technicalsPermission, false);\n\n $productsPermission = [\n 'name' => 'export Products',\n 'slug' => 'export_products',\n ];\n $this->permission->create($productsPermission, false);\n $sectionsPermission = [\n 'name' => 'Export Sections',\n 'slug' => 'export_sections',\n ];\n\n $this->permission->create($sectionsPermission, false);\n $categoriesPermission = [\n 'name' => 'Export Categories',\n 'slug' => 'export_categories',\n ];\n\n $this->permission->create($categoriesPermission, false);\n }", "public function dataexportAction()\n {\n $dumpDirectory = $this->dataImport->dumpDirectory;\n $executeDumpExportFile = $dumpDirectory . self::executeExportDump;\n if (!file_exists($executeDumpExportFile) && $fileHandle = fopen($executeDumpExportFile, \"w\")) {\n $txt = '';\n if ($this->securityContext->canBeInitialized()) {\n if ($account = $this->securityContext->getAccount()) {\n $jobOwner = $this->bearbeiterRepository->findOneByAccount($account);\n $txt = 'Dieser Export wurde angelegt von ' . $jobOwner;\n }\n }\n fwrite($fileHandle, $txt);\n fclose($fileHandle);\n $currentTimeMinutes = date('i');\n $minutesFraction = substr($currentTimeMinutes, 1, 1);\n $nextImportDumpExecution = 10 - $minutesFraction;\n echo 'Die nächste Veröffentlichung wird in ' . $nextImportDumpExecution . ' Minuten durchgeführt.' . '<br>';\n echo 'Sie dauert ca. 5 Minuten.' . '<br>';\n }\n elseif (file_exists($executeDumpExportFile)) {\n echo \"Die Veröffentlichung ist bereits vorgemerkt.\";\n }\n else {\n echo \"Der Veröffentlichung-Job konnte leider nicht angelegt werden.\";\n }\n exit;\n }", "public static function createExporter($format)\n {\n $instance = self::findByNamedId($format);\n if( ! $instance ){\n throw new InvalidArgumentException(\"Format '$format' does not exist.\");\n }\n $class = $instance->class;\n if( ! class_exists($class) /* todo: check interface */ ){\n throw new InvalidArgumentException(\"Exporter class '$class' of format '$format' is invalid.\");\n }\n return new $class();\n }", "public static function createEmpty(): self\n {\n return new static([]);\n }", "function createExportDirectory()\n\t{\n\t\tif (!@is_dir($this->getExportDirectory()))\n\t\t{\n\t\t\t$usrf_data_dir = ilUtil::getDataDir().\"/usrf_data\";\n\t\t\tilUtil::makeDir($usrf_data_dir);\n\t\t\tif(!is_writable($usrf_data_dir))\n\t\t\t{\n\t\t\t\t$this->ilias->raiseError(\"Userfolder data directory (\".$usrf_data_dir\n\t\t\t\t\t.\") not writeable.\",$this->ilias->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\t// create Export subdirectory (data_dir/lm_data/lm_<id>/Export)\n\t\t\t$export_dir = $usrf_data_dir.\"/export\";\n\t\t\tilUtil::makeDir($export_dir);\n\t\t\tif(!@is_dir($export_dir))\n\t\t\t{\n\t\t\t\t$this->ilias->raiseError(\"Creation of Userfolder Export Directory failed.\",$this->ilias->error_obj->MESSAGE);\n\t\t\t}\n\t\t}\n\t}", "static function export_default_instance($shortname, $format, $filename, $parameter_data, $userid = NULL, $execution_mode = php_report::EXECUTION_MODE_INTERACTIVE) {\n //allocate some extra resources\n php_report::allocate_extra_resources();\n\n //get a default instance\n $report_instance = php_report::get_default_instance($shortname, $userid, $execution_mode);\n\n if ($report_instance == false) {\n //user no longer has access, so signal failure\n return false;\n }\n\n $allowable_formats = $report_instance->get_export_formats();\n if (!in_array($format, $allowable_formats)) {\n //specified format is not allowed\n return;\n }\n\n //make sure all dependencies are loaded\n $report_instance->require_dependencies();\n //initialize all necessary data\n $report_instance->init_all($shortname, $parameter_data);\n //run the export\n $report_instance->download($format, $report_instance->get_complete_sql_query(FALSE), $filename);\n\n return true;\n }", "public function actionCreate()\n\t{\n\t\t$model=new ExportInventory;\n \n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['ExportInventory']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ExportInventory'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function __construct(VariableExportInterface $variableExport)\n {\n $this->serialized = $variableExport->toSerialize();\n }", "public function ExportObject() {\n // Init object\n $overviewChart = new stdClass();\n \n // Set values\n $overviewChart->Types = $this->Types;\n $overviewChart->Chart = $this->Chart->ExportObject();\n \n //return result\n return $overviewChart;\n }", "public function testAircraftExporter(): void\n {\n $aircraft = factory(Aircraft::class)->create();\n\n $exporter = new AircraftExporter();\n $exported = $exporter->export($aircraft);\n\n $this->assertEquals($aircraft->iata, $exported['iata']);\n $this->assertEquals($aircraft->icao, $exported['icao']);\n $this->assertEquals($aircraft->name, $exported['name']);\n $this->assertEquals($aircraft->zfw, $exported['zfw']);\n $this->assertEquals($aircraft->subfleet->type, $exported['subfleet']);\n\n $importer = app(ImportService::class);\n $exporter = app(ExportService::class);\n $file = $exporter->exportAircraft(collect([$aircraft]));\n $status = $importer->importAircraft($file);\n $this->assertCount(1, $status['success']);\n $this->assertCount(0, $status['errors']);\n }", "function createExportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\tilUtil::makeDir($svy_data_dir);\n\t\tif(!is_writable($svy_data_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Survey Data Directory (\".$svy_data_dir\n\t\t\t\t.\") not writeable.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t\t\n\t\t// create learning module directory (data_dir/lm_data/lm_<id>)\n\t\t$svy_dir = $svy_data_dir.\"/svy_\".$this->getId();\n\t\tilUtil::makeDir($svy_dir);\n\t\tif(!@is_dir($svy_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Survey Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t\t// create Export subdirectory (data_dir/lm_data/lm_<id>/Export)\n\t\t$export_dir = $svy_dir.\"/export\";\n\t\tilUtil::makeDir($export_dir);\n\t\tif(!@is_dir($export_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Export Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t}", "function export()\n {\n $form = new Apeform(0, 0, false);\n $form->hidden(\"export\", \"method\");\n $table = $form->hidden($this->table->tablename(), \"table\");\n $options = array(\n 'csv' => '<acronym title=\"Comma Separated Values\"><u>C</u>SV</acronym>/TXT',\n 'sql' => '<acronym title=\"Structured Query Language\"><u>S</u>QL</acronym> dump',\n 'xml' => '<acronym title=\"Extensible Markup Language\"><u>X</u>ML</acronym> <span style=\"font-size:smaller\">(<a href=\"http://www.google.de/search?q=FlatXmlDataSet\">FlatXmlDataSet</a>)</span>'\n );\n $type = $form->radio(\"Export as\", \"\", $options, \"csv\");\n $options = array(\n \",\" => \"Comma (,)\",\n \";\" => \"Semikolon (;)\",\n \"\\t\" => \"Tabulator\",\n \"\\\\0\" => \"Nul\",\n \"|\" => \"Pipe (|)\",\n \"&\" => \"Ampersand (&amp;)\",\n \":\" => \"Colon (:)\",\n \" \" => \"Space\"\n );\n $delimiter = $form->select(\"CSV/TXT <u>d</u>elimiter\", \"\", $options, \",\");\n if ($delimiter == \"\\\\0\")\n $delimiter = chr(0);\n $sections = $form->checkbox(\"SQL sections\", \"\", \"Structure|Data\", \"Structure|Data\");\n $save = $form->checkbox(\"Save as <u>f</u>ile\");\n if (function_exists(\"gzencode\"))\n $compress = $form->checkbox(\"Save <u>g</u>zip compressed\");\n $form->submit(\"Export\");\n\n $tablename = preg_replace('/\\W+/', '_', basename($this->table->tablename()));\n\n if ($form->isValid() && $type == \"csv\") {\n $this->table->delimiter = $delimiter;\n $export = $this->table->export();\n } elseif ($form->isValid() && $type == \"sql\") {\n $export = \"CREATE TABLE `\" . $tablename . \"` (\\n\";\n foreach ($this->table->fields as $field) {\n $export .= \" `\" . preg_replace('/\\W+/', '_', $field) . \"` \";\n if ($this->types[$field] == \"varchar\" || $this->types[$field] == \"null\")\n $export .= \"VARCHAR(255)\";\n elseif ($this->types[$field] == \"bool\")\n $export .= \"TINYINT\";\n else\n $export .= strtoupper($this->types[$field]);\n $export .= \" NOT NULL\";\n if ($field == \"id\")\n $export .= \" AUTO_INCREMENT\";\n $export .= \",\\n\";\n }\n $export .= \" PRIMARY KEY (`id`)\\n);\\n\\n\";\n if (! in_array(\"Structure\", $sections))\n $export = \"\";\n if (! in_array(\"Data\", $sections))\n $this->table->delete();\n while ($row = $this->table->each()) {\n foreach ($row as $field => $value) {\n $sqlRow[preg_replace('/\\W+/', '_', $field)] = \"'\" . addslashes($value) . \"'\";\n }\n $export .= \"INSERT INTO `\" . $tablename;\n $export .= \"` (`\" . implode(\"`, `\", array_keys($sqlRow)) . \"`) VALUES (\" . implode(\", \", $sqlRow) . \");\\n\";\n }\n } elseif ($form->isValid() && $type == \"xml\") {\n $export = '<?xml version=\"1.0\" encoding=\"' . $this->charset . \"\\\"?>\\n\";\n $export .= \"<dataset>\\n\";\n while ($row = $this->table->each()) {\n $export .= ' <' . $tablename . ' id=\"' . $row['id'] . '\"';\n unset($row['id']);\n foreach ($row as $field => $value) {\n $field = preg_replace('/[^a-z0-9-]+/i', '_', $field);\n if (! preg_match('/^[a-z]/i', $field))\n $field = \"field\" . $field;\n $export .= ' ' . $field . '=\"' . htmlspecialchars($value) . '\"';\n }\n $export .= \" />\\n\";\n }\n $export .= \"</dataset>\\n\";\n }\n\n if ($save) {\n $mimeType = 'text/comma-separated-values';\n $extension = \".\" . $type;\n if ($type == \"csv\" && $delimiter == \"\\t\") {\n $mimeType = 'text/tab-separated-values';\n $extension = \".txt\";\n } elseif ($type == \"sql\")\n $mimeType = 'application/octet-stream';\n elseif ($type == \"xml\")\n $mimeType = 'text/xml';\n if (isset($compress) && $compress) {\n $export = gzencode($export);\n $mimeType = 'application/x-gzip';\n $extension .= \".gz\";\n }\n $filename = basename($this->table->tablename()) . $extension;\n header('Content-Type: ' . $mimeType);\n header('Content-Length: ' . strlen($export));\n header('Content-Disposition: attachement; filename=\"' . $filename . '\";');\n echo $export;\n return;\n }\n\n $this->displayHead();\n\n $form->display();\n\n echo \"<pre>\";\n if (isset($export))\n echo htmlentities($export, ENT_NOQUOTES, $this->charset);\n }", "abstract public function getExporterClass(): string;", "public static function export(array $input, ExporterFactoryInterface $exporter)\n {\n $v = new static($input);\n\n // exporter\n $v->rule('required', 'exporter');\n $class_name = get_class($exporter->get('Order'));\n $v->rule(\n 'exists',\n 'exporter',\n Export::getTable(),\n 'id',\n 'status',\n '=',\n '1',\n 'exporter',\n '=',\n $class_name\n );\n\n // quantity\n $v->rule('required', 'quantity');\n $v->rule('in', 'quantity', array('all', 'current'));\n\n // status\n $all_statuses = array_merge(array_keys(Order::getOrderStatusList()), array(Order::STATUS_ALL));\n $v->rule('required', 'status');\n $v->rule(\n 'in',\n 'status',\n $all_statuses\n );\n\n // page\n $v->rule('required', 'page');\n $v->rule('numeric', 'page');\n\n return $v;\n }", "public function exportById($id)\n {\n }", "public function export()\n {\n $this->getRequest()->allowMethod('POST');\n\n $table = $this->loadModel();\n Assert::isInstanceOf($table, Table::class);\n\n $export = Export::fromIds(\n (array)$this->getRequest()->getData('ids'),\n $table,\n (array)$this->getRequest()->getData('headers'),\n (bool)$this->getRequest()->getData('formatted', false)\n );\n\n $this->set('url', $export->url());\n $this->set('_serialize', 'url');\n }", "abstract function generate(Query $query): BaseExportable;", "public function __construct() {\n\n\t\tif ( isset( $_GET['download_exported_csv_file'] ) && isset( $_GET['export_id'] ) ) {\n\t\t\tadd_action( 'init', array( $this, 'download_exported_file' ) );\n\t\t}\n\t}", "public static function createWithNoNames()\n {\n return new self();\n }", "public function export()\n { \n $this->title = 'Export Data'; \n return view('mitra::Product.BOF.export')->with([\n 'page' => $this\n ]);\n }", "public function formExportData($exportType = \"pdf\") {\r\n $this->formExport = $exportType;\r\n return $this;\r\n }", "public function runPredefinedExport($membershipExport){\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\t$objMembershipExport = new Membership_Model_MembershipExport(null,true);\r\n\t\t\t$objMembershipExport->setFromArray(Zend_Json::decode($membershipExport));\r\n\t\t\t$expProcessor = Membership_Custom_Export_Processor::create($objMembershipExport);\r\n\t\t\t$expProcessor->export();\r\n\t\t\t\r\n\t\t}catch(Exception $e){\r\n\t\t\techo $e->__toString();\r\n\t\t}\r\n\t}", "public function empty() : Instance\n {\n return new Instance(0);\n }", "function get_export_formats() {\n //default to no export (override in report class)\n return array();\n }", "function Page_Exporting() {\r\n\r\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\r\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\r\n\r\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\r\n\t}", "public function export() {\n\t\t\t// Check if export is allowed.\n\t\t\t$wp_nonce = isset( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '?'; // input var okay.\n\t\t\tif ( ! wp_verify_nonce( $wp_nonce, 'wpda-export-*' ) ) {\n\t\t\t\twp_die();\n\t\t\t}\n\n\t\t\t// Get arguments.\n\t\t\t$this->mysql_set = isset( $_REQUEST['mysql_set'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['mysql_set'] ) ) : 'on'; // input var okay.\n\t\t\t$this->show_comments = isset( $_REQUEST['show_comments'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['show_comments'] ) ) : 'on'; // input var okay.\n\t\t\t$this->show_create = isset( $_REQUEST['show_create'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['show_create'] ) ) : 'on'; // input var okay.\n\t\t\t$this->include_table_settings = isset( $_REQUEST['include_table_settings'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['include_table_settings'] ) ) : 'off'; // input var okay.\n\n\t\t\tif ( isset( $_REQUEST['schema_name'] ) ) {\n\t\t\t\t$this->schema_name = sanitize_text_field( wp_unslash( $_REQUEST['schema_name'] ) ); // input var okay.\n\t\t\t\tif ( '' !== $this->schema_name ) {\n\t\t\t\t\t$wpdadb = WPDADB::get_db_connection( $this->schema_name );\n\t\t\t\t\t$this->schema_name_prefix = \"`{$wpdadb->dbname}`.\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isset( $_REQUEST['type'] ) && isset( $_REQUEST['table_names'] ) ) { // input var okay.\n\t\t\t\t// Get table_name(s) from URL. Type is string for single table export and array for multi table export.\n\t\t\t\t// Row export implies single table export.\n\t\t\t\t$this->table_list = $_REQUEST['table_names'];\n\n\t\t\t\tif ( 'table' === sanitize_text_field( wp_unslash( $_REQUEST['type'] ) ) ) { // input var okay.\n\t\t\t\t\t// Table export.\n\t\t\t\t\t$this->export_tables();\n\t\t\t\t} else {\n\t\t\t\t\t// Row export.\n\t\t\t\t\tif ( is_array( $this->table_list ) ) {\n\t\t\t\t\t\t// For row exports a single table name must be supplied as a string.\n\t\t\t\t\t\t$this->wrong_arguments();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->export_rows();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->wrong_arguments();\n\t\t\t}\n\t\t}", "public function testAirportExporter(): void\n {\n $airport_name = 'Adolfo Suárez Madrid–Barajas Airport';\n\n $airport = factory(Airport::class)->create([\n 'name' => $airport_name,\n ]);\n\n $exporter = new AirportExporter();\n $exported = $exporter->export($airport);\n\n $this->assertEquals($airport->iata, $exported['iata']);\n $this->assertEquals($airport->icao, $exported['icao']);\n $this->assertEquals($airport->name, $exported['name']);\n\n $importer = app(ImportService::class);\n $exporter = app(ExportService::class);\n $file = $exporter->exportAirports(collect([$airport]));\n $status = $importer->importAirports($file);\n\n $this->assertCount(1, $status['success']);\n $this->assertCount(0, $status['errors']);\n }", "public function enableExports()\n {\n /** @var Connection $dbal */\n $dbal = Shopware()->Container()->get('dbal_connection');\n $dump = <<<'SQL'\nINSERT INTO s_export VALUES (4711,'csv','2000-01-01 00:00:00',1,'4ebfa063359a73c356913df45b3fbe7f',1,0,'2017-02-27 14:10:18',0,1,'2017-02-27 14:10:18','export.csv',2,NULL,1,1,'',NULL,0,0,0,0,0,'','{strip}id{#S#}title{#S#}url{#S#}image{#S#}price{#S#}versand{#S#}währung {/strip}{#L#}','{strip}\\n{$sArticle.ordernumber|escape}{#S#}\\n{$sArticle.name|strip_tags|strip|truncate:80:\\\"...\\\":true|escape|htmlentities}{#S#}\\n{$sArticle.articleID|link:$sArticle.name|escape}{#S#}\\n{$sArticle.image|image:2}{#S#}\\n{$sArticle.price|escape:\\\"number\\\"}{#S#}\\nDE::DHL:{$sArticle|@shippingcost:\\\"prepayment\\\":\\\"de\\\"}{#S#}\\n{$sCurrency.currency}\\n{/strip}{#L#}','',0,1,1,'2000-01-01 00:00:00',0),(4712,'txt tab','2000-01-01 00:00:00',1,'4ebfa063359a73c356913df45b3fbe7f',1,0,'2017-02-27 14:10:18',0,2,'2017-02-27 14:10:18','export.txt',2,NULL,1,1,'',NULL,0,0,0,0,0,'','{strip}id{#S#}title{#S#}url{#S#}image{#S#}price{#S#}versand{#S#}währung{/strip}{#L#}','{strip}\\n{$sArticle.ordernumber|escape}{#S#}\\n{$sArticle.name|strip_tags|strip|truncate:80:\"...\":true|escape|htmlentities}{#S#}\\n{$sArticle.articleID|link:$sArticle.name|escape}{#S#}\\n{$sArticle.image|image:2}{#S#}\\n{$sArticle.price|escape:\"number\"}{#S#}\\nDE::DHL:{$sArticle|@shippingcost:\"prepayment\":\"de\"}{#S#}\\n{$sCurrency.currency}\\n{/strip}{#L#}','',0,1,1,'2000-01-01 00:00:00',0),(4713,'xml','2000-01-01 00:00:00',1,'4ebfa063359a73c356913df45b3fbe7f',1,0,'2000-01-01 00:00:00',0,3,'0000-00-00 00:00:00','export.xml',2,NULL,1,1,'',NULL,0,0,0,0,0,'','<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\\n<channel>\\n <atom:link href=\"http://{$sConfig.sBASEPATH}/engine/connectors/export/{$sSettings.id}/{$sSettings.hash}/{$sSettings.filename}\" rel=\"self\" type=\"application/rss+xml\" />\\n <title>{$sConfig.sSHOPNAME}</title>\\n<link>http://{$sConfig.sBASEPATH}</link>\\n <language>{$sLanguage.isocode}-{$sLanguage.isocode}</language>\\n <image>\\n <url>http://{$sConfig.sBASEPATH}/templates/0/de/media/img/default/store/logo.gif</url>\\n <title>{$sConfig.sSHOPNAME}</title>\\n <link>http://{$sConfig.sBASEPATH}</link>\\n </image>{#L#}','<item> \\n <title>{$sArticle.name|strip_tags|htmlspecialchars_decode|strip|escape}</title>\\n <id>{$sArticle.ordernumber|escape}</id>\\n <url>{$sArticle.articleID|link:$sArticle.name}</url>\\n <description>{if $sArticle.image}\\n <a href=\"{$sArticle.articleID|link:$sArticle.name}\" style=\"border:0 none;\">\\n <img src=\"{$sArticle.image|image:0}\" align=\"right\" style=\"padding: 0pt 0pt 12px 12px; float: right;\" />\\n </a>\\n{/if}\\n {$sArticle.description_long|strip_tags|regex_replace:\"/[^\\\\wöäüÖÄÜß .?!,&:%;\\\\-\\\\\"\\']/i\":\"\"|trim|truncate:900:\"...\"|escape}\\n </description>\\n <image>{$sArticle.image|image:2}</image>\\n <price>{$sArticle.price|escape:\"number\"}</price><category>{$sArticle.articleID|category:\">\"|htmlspecialchars_decode|escape}</category>\\n{if $sArticle.changed} {assign var=\"sArticleChanged\" value=$sArticle.changed|strtotime}<pubDate>{\"r\"|date:$sArticleChanged}</pubDate>{\"rn\"}{/if}\\n</item>{#L#}','</channel>\\n</rss>',0,1,1,'2000-01-01 00:00:00',0),(4714,'txt pipe','2000-01-01 00:00:00',1,'4ebfa063359a73c356913df45b3fbe7f',1,0,'2017-02-27 14:10:18',0,4,'2017-02-27 14:10:18','export.txt',2,NULL,1,1,'',NULL,0,0,0,0,0,'','{strip}id{#S#}title{#S#}url{#S#}image{#S#}price{#S#}versand{#S#}währung{/strip}{#L#}','{strip}\\n{$sArticle.ordernumber|escape}{#S#}\\n{$sArticle.name|strip_tags|strip|truncate:80:\"...\":true|escape|htmlentities}{#S#}\\n{$sArticle.articleID|link:$sArticle.name|escape}{#S#}\\n{$sArticle.image|image:2}{#S#}\\n{$sArticle.price|escape:\"number\"}{#S#}\\nDE::DHL:{$sArticle|@shippingcost:\"prepayment\":\"de\"}{#S#}\\n{$sCurrency.currency}\\n{/strip}{#L#}','',0,1,1,'2000-01-01 00:00:00',0)\nSQL;\n\n $dbal->exec($dump);\n }", "protected function InitializeExporter()\n\t{\n\n\t\t// Check is the export session table exists - if it does, we're currently in the middle of a session\n\t\t$query = \"show tables like '[|PREFIX|]export_session'\";\n\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t$row = $GLOBALS['ISC_CLASS_DB']->FetchOne($result);\n\n\t\tif($row) {\n\t\t\t$this->_LoadExportSession();\n\t\t}\n\n\t\tif(isset($this->_exportSession['FinishedAll'])) {\n\t\t\t$this->ShowExportSummary();\n\t\t\treturn;\n\t\t}\n\n\t\t// Currently in an export session, we skip straight to the continue page\n\t\tif($row && @array_key_exists('Configuration', $this->_exportSession) && @array_key_exists('Warned', $this->_exportSession)) {\n\t\t\t$className = \"ISC_ADMIN_EXPORTER_\".isc_strtoupper($this->_exportSession['CurrentExporter']);\n\t\t\trequire_once APP_ROOT.\"/includes/converter/exporters/\".$this->_exportSession['CurrentExporter'].\".php\";\n\t\t\t$exporter = new $className;\n\n\t\t\t$exporter->_exportSession = $this->_exportSession;\n\n\t\t\tif ($MsgDesc != \"\") {\n\t\t\t\t$GLOBALS['Message'] = MessageBox($MsgDesc, $MsgStatus);\n\t\t\t}\n\n\t\t\t$this->ParseTemplate(\"exporters.run\");\n\t\t}\n\n\t\tif(isset($_REQUEST['WarningAccept'])) {\n\t\t\t$this->_exportSession['Warned'] = 1;\n\t\t}\n\n\t\t// Just selected an exporter\n\t\telse if(isset($_REQUEST['exporter']) || $row) {\n\t\t\tif(isset($_REQUEST['exporter'])) {\n\t\t\t\t$_REQUEST['exporter'] = str_replace(array(\".\", \"/\"), \"\", $_REQUEST['exporter']); // Sanitize\n\t\t\t\tif(!file_exists(APP_ROOT.\"/includes/converter/exporters/\".$_REQUEST['exporter'].\".php\")) {\n\t\t\t\t\t$this->ShowExporters(\"Invalid exporter\", MSG_ERROR);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\trequire_once APP_ROOT.\"/includes/converter/exporters/\".$_REQUEST['exporter'].\".php\";\n\t\t\t\t$className = \"ISC_ADMIN_EXPORTER_\".isc_strtoupper($_REQUEST['exporter']);\n\t\t\t\t$exporter = new $className;\n\n\t\t\t\t$configuration = 1;\n\t\t\t\tif(method_exists($exporter, 'SaveConfiguration')) {\n\t\t\t\t\t$err = '';\n\t\t\t\t\t$configuration = $exporter->SaveConfiguration($err);\n\t\t\t\t\tif(!is_array($configuration)) {\n\t\t\t\t\t\t$this->ShowExporters($err, MSG_ERROR);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->_CreateExportSession();\n\t\t\t\t$this->_exportSession['CurrentExporter'] = $_REQUEST['exporter'];\n\t\t\t\t$this->_exportSession['modules'] = array();\n\t\t\t\t$this->_exportSession['Configuration'] = $configuration;\n\t\t\t\t$exporter->_exportSession = $this->_exportSession;\n\t\t\t}\n\t\t\telse if($row) {\n\t\t\t\t$className = \"ISC_ADMIN_EXPORTER_\".isc_strtoupper($this->_exportSession['CurrentExporter']);\n\t\t\t\trequire_once APP_ROOT.\"/includes/converter/exporters/\".$this->_exportSession['CurrentExporter'].\".php\";\n\t\t\t\t$exporter = new $className;\n\t\t\t}\n\n\t\t\tif(!array_key_exists('Warned', $this->_exportSession)) {\n\t\t\t\t// No warnings for this exporter\n\t\t\t\tif(method_exists($exporter, 'ExportWarning')) {\n\t\t\t\t\t$exporter->ExportWarning();\n\t\t\t\t\t$this->_UpdateExportSession();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$this->_exportSession['Warned'] = 1;\n\t\t\t}\n\n\t\t\tif ($MsgDesc != \"\") {\n\t\t\t\t$GLOBALS['Message'] = MessageBox($MsgDesc, $MsgStatus);\n\t\t\t}\n\n\t\t\t$this->ParseTemplate(\"exporters.run.tpl\");\n\n\t\t\t$this->_UpdateExportSession();\n\t\t}\n\t\t// Not doing anything, show a list of exporters\n\t\telse {\n\t\t\t$this->ShowExporters();\n\t\t}\n\t}", "protected function createBlankDto()\n {\n return new OpenCases();\n }", "public static function createInstance()\n {\n return new GridOxmlExporterEventManager('ISerializable');\n }", "public function getExport(){\n\n $Model = new \\EmailNewsletter\\model\\Email;\n\n $result = $Model\n ->select('email')\n ->order('created_on DESC')\n ->data();\n\n $csv = '';\n\n while($row = $result->fetch()){\n $csv .= \"{$row['email']}\\n\";\n }//while\n\n $path = ENACT_STORAGE . 'email-newsletter-dump.csv';\n\n file_put_contents(ENACT_STORAGE . 'email-newsletter-dump.csv', $csv);\n\n if(!is_file($path)){\n $back = enact_cpSlug('email-newsletter/');\n $this->html(\"<h1>Sorry, the email newsletter export doesn't exist</h1><a href='{$back}'>Go back</a>\");\n }//if\n\n $this->download($path);\n\n }", "public function exportData(): void\n\t{\n\t\t$entries = [];\n\t\tif (!$this->exportColumns && $this->quickExport && $this->queryOptions['viewname']) {\n\t\t\t[$headers, $entries] = $this->getEntriesForQuickExport();\n\t\t} else {\n\t\t\t[$headers, $entries] = $this->getEntriesExport();\n\t\t}\n\t\t$this->output($headers, $entries);\n\t}", "public static function createEmpty(): ResponseItem\n {\n return new static(new \\stdClass());\n }", "public function createEmptyMetadata();", "function Page_Exporting() {\n\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\n\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\n\t}", "function Page_Exporting() {\n\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\n\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\n\t}", "function Page_Exporting() {\n\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\n\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\n\t}", "function Page_Exporting() {\n\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\n\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\n\t}", "function Page_Exporting() {\n\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\n\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\n\t}", "function Page_Exporting() {\n\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\n\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\n\t}", "function Page_Exporting() {\n\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\n\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\n\t}", "function Page_Exporting() {\n\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\n\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\n\t}", "function Page_Exporting() {\n\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\n\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\n\t}", "public function ExportItem() {\n // Init object\n $submission = new stdClass();\n \n // Set values\n $submission->Id = $this->Id;\n $submission->DateTime = $this->DateTime;\n $submission->ImportDateTime = $this->ImportDateTime;\n $submission->User = $this->User;\n $submission->Good = $this->Good;\n $submission->Bad = $this->Bad;\n $submission->Strange = $this->Strange;\n $submission->GitHash = $this->GitHash;\n $submission->SequenceNumber = $this->SequenceNumber;\n \n // Return result\n return $submission;\n }" ]
[ "0.67919564", "0.67919564", "0.67919564", "0.67919564", "0.67919564", "0.6760279", "0.665389", "0.6554787", "0.6552386", "0.6454768", "0.64488727", "0.6442755", "0.6442109", "0.63983023", "0.62716216", "0.6259408", "0.6228091", "0.6222511", "0.62208074", "0.6213134", "0.6206103", "0.6109623", "0.6008785", "0.58187056", "0.5756809", "0.5753085", "0.5647631", "0.56344974", "0.56160367", "0.5602042", "0.559998", "0.5594908", "0.5552801", "0.5532631", "0.5510512", "0.5484347", "0.54815185", "0.54749244", "0.54440683", "0.54267496", "0.5424719", "0.5416874", "0.5416777", "0.5399029", "0.5399029", "0.5399029", "0.5391617", "0.53616333", "0.5350787", "0.535046", "0.53482944", "0.53441244", "0.53430325", "0.5337244", "0.5331241", "0.5330671", "0.52940804", "0.52923536", "0.52886176", "0.5266503", "0.52362424", "0.5232783", "0.52125597", "0.5206356", "0.51856273", "0.5180715", "0.5177089", "0.5170042", "0.5169023", "0.5155473", "0.5155003", "0.5143761", "0.5129325", "0.5121456", "0.5120564", "0.51140785", "0.5106341", "0.51050675", "0.5102499", "0.5089913", "0.5087344", "0.5080528", "0.50694144", "0.5068366", "0.5068276", "0.50682706", "0.5054173", "0.5052846", "0.50453883", "0.50443304", "0.50335264", "0.50335264", "0.50335264", "0.50335264", "0.50335264", "0.50335264", "0.50335264", "0.50335264", "0.50335264", "0.50320125" ]
0.79454106
0
Find an export by id
public function findExport($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exportById($id)\n {\n }", "public function findById(int $id)\n {\n return $this->entityManager->getRepository(Download::class)->find($id);\n }", "public function findAction($id);", "public function packingFind($id);", "public static function find($id);", "public static function findById($id);", "public function findByID($id){\n return $this->Find(self::TABLE,$id);\n }", "public function get($id)\n {\n return JournalEntry::currentReport()->findOrFail($id);\n }", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find( $id );", "public function download($id);", "public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }", "public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }", "public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }", "public function find($id)\n {\n $query=\"SELECT id,\".\n \"link,\".\n \"entity0,\".\n \"entity1,\".\n \"edits_pending,\".\n \"last_updated,\".\n \"link_order,\".\n \"entity0_credit,\".\n \"entity1_credit \". \t\t \n\t \"FROM l_release_group_series \".\n\t \"WHERE id=\".$id;\n\n return($this->selectDB($query, \"L_release_group_series\"));\n }", "public static function find(int $id)\n {\n return self::findIn(File::class, $id);\n }", "public function planFind($id);", "public function find($id = null)\n {\n $id = isset($id) ? $id : $this->getModuleID();\n $module = $this->makeRequest('get', $this->getModuleRequestURI() . \"/$id\");\n return $module;\n }", "public function find($id)\n\t{\n\t\treturn $this->fetchRow(array(\n\t\t\t$this->getAdapter()->quoteIdentifier($this->getPrimaryName()) . ' = ?' => $id\n\t\t));\n\t}", "public function find($id)\n {\n return $this->medicalComposite->assemble($id);\n \n }", "public function find($id) {\n\t\t$sql = \"select * from t_archive where archive_id=?\";\n\t\t$row = $this->getDb()->fetchAssoc($sql, array($id));\n\n\t\tif ($row)\n\t\t\treturn $this->buildDomainObject($row);\n\t\t\telse\n\t\t\t\tthrow new \\Exception(\"No Archive matching id \" . $id);\n\t}", "public function returnDetailFindByPK($id);", "public function find(int $id) ;", "public static function findById($id)\n\t{\n\t\n\t}", "function get_detail_files_download_by_id($params) {\n $sql = \"SELECT * FROM fa_files WHERE file_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->row_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function find($id)\n {\n return $this->driver->find($this->model, $id);\n }", "abstract public function find($id);", "function find($id);", "public function find($id)\n {\n return $this->findOneBy(['id' => $id]);\n }", "static public function find($id) {\n return static::getMapper()->find($id);\n }", "public function find($id)\n {\n return $this->api->find($this->getTypeName(), $id);\n }", "public static function find($id) {\n return parent::find(__CLASS__, $id);\n }", "function getByGuid($id);", "public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }", "public static function find($id) {\n\t\treturn self::find_by('id', $id);\n\t}", "public function export_retrieve($export_id)\n {\n $this->method = '/' . (int) $export_id . '/export_retrieve';\n $this->request_type = 'GET';\n $this->body = '';\n $this->query = array();\n return $this;\n }", "public static function findById($id)\n {\n }", "public function getObjectFromUniqueId( $id )\n { \n $fromRemote = eZContentObject::fetchByRemoteID( $id );\n if ( $fromRemote instanceof eZContentObject )\n {\n return $fromRemote;\n }\n $parts = explode( self::SEPARATOR, $id ); \n if ( $parts[0] == self::installationID() )\n {\n $object = eZContentObject::fetch( $parts[1] ); \n if ( $object instanceof eZContentObject )\n {\n if ( $object->attribute( 'class_identifier' ) == $this->openDataIni->variable( 'GeneralSettings', 'DatasetClassIdentifier' ) )\n {\n return $object;\n }\n }\n }\n return false;\n }", "public function findById ( $id )\n\t{\n\t\treturn $this->abstractFindById(self::RETURNTYPE,$id);\n\t}", "function findById($id);", "public static function find($id, $key = 'id');", "function fetchModuleFile($id)\n{\n if (!empty($id)) {\n $sql = \"SELECT file FROM modules WHERE id = \";\n $sql .= sql_escape($id);\n $sql .= \" LIMIT 1 \";\n $row = fetchOne($sql);\n }\n return !empty($row) ? $row['file'] : null;\n}", "public function find($id)\n {\n return $this->service->find($id);\n }", "static function find($id) {\n return self::findBy(\"id\", $id);\n }", "public function actionExport($id)\n {\n $model = DailyReport::model()->findByPk($id);\n\n // Only in case the model exists\n if (!$model instanceof DailyReport)\n {\n echo \"Daily report #$id does not exist.\";\n return;\n }\n\n $path = CDailyReport::getS3FileUrl($id, $model->name);\n\n // Delete previously generated report (if present)\n if (S3Subtitle::asset_exists($path))\n S3Subtitle::deleteAsset($path);\n\n try {\n CDailyReport::export($model->id, true);\n } catch(Exception $e) {\n echo \"Error #{$e->getCode()}: \".$e->getMessage();\n }\n }", "public static function find($id)\n {\n return self::findOneBy(['id' => $id]);\n }", "public function returnFindByPK($id);", "public function findOneBy($id)\n {\n // TODO: Implement findOneBy() method.\n }", "public function find(int $id = null) {\n $this->method = \"GET\";\n if(null == $id) {\n $this->path = $this->objectName;\n } else {\n $this->path = $this->objectName . '/' . $id;\n $this->currentId = $id;\n }\n $output = $this->get();\n return $output;\n }", "public function findById($id)\n {\n $sql = $this->getSelectStatement() . ' WHERE ' . $this->getPrimaryKeyName() . '=:id';\n \n $statement = DatabaseHelper::runQuery($this->connection, $sql, array(':key'=> $key));\n return $statement->fetch();\n }", "public function find($id)\n\t{\n\t\t// TODO: Implement find() method.\n\t}", "public function findById ($id);", "function findById($id)\n {\n }", "function export_fm($id) {\n $this->Utilisateur->recursive = 0;\n $options = array('conditions' => array('Utilisateur.' . $this->Utilisateur->primaryKey => $id)); \n $data = $this->Utilisateur->find('first', $options); \n $this->set('rows',$data);\n $this->render('export_fm','export_xls');\n }", "public function findById($id)\n {\n return $this->findOneBy(['id' => $id]);\n }", "public function find($id)\n {\n return $this->repo->find($id);\n }", "public function find($id)\n {\n return $this->repo->find($id);\n }", "public function find($id)\r\n {\r\n return $this->repository->find($id);\r\n }", "public function find($id) {\n return $this->model->find($id);\n }", "public function loadId($id) {\n $sql = \"SELECT * FROM attachments WHERE id = {$id}\";\n $stmt = $this->conn->query($sql);\n\n if($dados = $stmt->fetch_array()){\n\n $attachment = new Attachment(\n $dados[\"id\"],\n $dados[\"directory\"],\n $dados[\"filename\"],\n $dados[\"extension\"]\n );\n\n return $attachment;\n \t}\n\n return FALSE;\n }", "public static function data($id)\n {\n $filesTable = static::_setupFilesTable();\n $file = $filesTable->get($id);\n if (!empty($file) && is_object($file)) {\n return $file;\n }\n throw new NotFoundException('The Panda was unable to retrieve the requested file.');\n }", "public function find( $id )\n {\n return $this->getMapper()\n ->find( $id );\n }", "public function find( $id )\n {\n return $this->getMapper()\n ->find( $id );\n }", "public function find( $id )\n {\n return $this->getMapper()\n ->find( $id );\n }", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public function byId($id);", "function find($id) {\n global $conn;\n\n $stmt = $conn->prepare(\"SELECT Addressln1, Addressln2, Del_id, Customer_id, Name, Postcode\n FROM Del_Adr WHERE Del_id = ?\");\n $stmt->execute([$id]);\n $stmt->setFetchMode(PDO::FETCH_CLASS, 'Del_Adr');\n return $stmt->fetch();\n }", "public function find($id)\n {\n }", "public function find($id)\n {\n }", "public function find($id)\n {\n }", "public function export($baseId);", "public static function find_by_id($id){\n static::setConnection();\n $table = static::$table;\n $keyColumn = static::$keyColumn;\n $sql = \"SELECT * FROM \".$table.\" WHERE \".$keyColumn.\" = \".$id;\n $res = mysqli_query(static::$conn,$sql);\n $row = mysqli_fetch_object($res,get_called_class());\n return $row;\n }", "public static function find($id){\n global $wpdb;\n \n $pk = static::getPk();\n $table_name = $wpdb->prefix.static::$_table;\n $sql = $wpdb->prepare('SELECT * FROM '.$table_name.' WHERE `'.$pk.'` =%d LIMIT 1;', $id);\n $results = $wpdb->get_results($sql);\n if(is_array($results) && isset($results[0])){\n return static::fromWp($results[0]);\n }\n \n return false;\n }", "public function find($id)\n {\n return $this->model->find($id);\n }", "public function find($id)\n {\n $params = [\n 'index' => $this->model->_index,\n 'type' => $this->model->_type\n ];\n if ($id) {\n $params['id'] = $id;\n return $this->generateModel($this->client->get($params));\n }\n return null;\n }", "public function find($id)\n\t{\n\t\treturn $this->model->where(\"id\", \"=\", $id)->first();\n\t}" ]
[ "0.68567014", "0.65635383", "0.646961", "0.64337754", "0.6315502", "0.61182976", "0.60242724", "0.6020756", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6016203", "0.6010942", "0.5997308", "0.5987433", "0.5987433", "0.5987433", "0.5976004", "0.5964155", "0.59490865", "0.59469986", "0.5930004", "0.59293085", "0.5928153", "0.59028184", "0.5899497", "0.589344", "0.5888193", "0.58864105", "0.58499056", "0.5840172", "0.5839577", "0.58377576", "0.5831031", "0.5826917", "0.58193004", "0.5811718", "0.5809602", "0.5807399", "0.5806734", "0.57955074", "0.5794607", "0.57932687", "0.57923955", "0.575624", "0.5737082", "0.5729076", "0.5713329", "0.5708224", "0.5707981", "0.56991434", "0.56931853", "0.5691374", "0.5682427", "0.5682133", "0.56570864", "0.56495714", "0.56457186", "0.5643426", "0.5643426", "0.5635442", "0.56314975", "0.56277597", "0.5626933", "0.56254864", "0.56254864", "0.56254864", "0.56122243", "0.56122243", "0.56122243", "0.56122243", "0.5610729", "0.55971736", "0.55971736", "0.55971736", "0.5591931", "0.5588519", "0.55879396", "0.5581336", "0.5571255", "0.5561715" ]
0.88124096
0
Find a user by the given criteria
public function findExportBy(array $criteria);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findUserBy(array $criteria);", "public function findUserBy(array $criteria);", "public function findUser($condition)\n {\n return $this->createUserQuery()->where($condition);\n }", "public function getByCriteria($criteria){\n $sql = \"SELECT * FROM user WHERE {$criteria}\";\n\n return $this->query($sql);\n }", "public function findUsers();", "public function findUsers();", "public function findForUser($userId);", "public function findForUser($userId);", "function getUser($criteria, $method = U_DNAME) {\n\tglobal $pdo;\n\t$mthd = null;\n\t\n\tswitch($method) {\n\t\tcase U_DNAME:\n\t\t\t$mthd = \"display\";\n\t\tbreak;\n\t\tcase U_UNAME:\n\t\t\t$mthd = \"uname\";\n\t\tbreak;\n\t\tcase U_ID:\n\t\t\t$mthd = \"id\";\n\t\tbreak;\n\t\tdefault: return false;\n\t}\n\t$stmt = $pdo->prepare(\"SELECT * FROM `users` WHERE `$mthd` = :crit\");\n\t$stmt->bindParam(\":crit\", $criteria);\n\t$stmt->execute();\n\tif($stmt->rowCount()) return $stmt->fetch();\n\treturn false;\n}", "public function Search($criteria, $userId);", "static function find($args) {\n\t\t// Por ejemplo la siguiente consulta SQL:\n\t\t// SELECT usuario FROM usuarios WHERE $args['campo'] = $args['valor']\n\t}", "public function findUser($userId);", "public abstract function find_users($search);", "private function findUser ($where) {\n return $this->db->extended->autoExecute(\n 'users',\n null, // SELECT queries do not need manipulation values\n MDB2_AUTOQUERY_SELECT,\n $where,\n null, true, true\n );\n }", "public function findOneBy(array $criteria): ?User\n {\n return $this->model->where($criteria)->first();\n }", "public function findUsers($args)\n {\n // Need read access to call this function\n if (!SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_READ)) {\n return false;\n }\n\n $profileModule = System::getVar('profilemodule', '');\n $useProfileMod = (!empty($profileModule) && ModUtil::available($profileModule));\n\n $dbtable = DBUtil::getTables();\n $userstable = $dbtable['users'];\n $userscolumn = $dbtable['users_column'];\n\n // Set query conditions (unless some one else sends a hardcoded one)\n $where = array();\n if (!isset($args['condition']) || !$args['condition']) {\n // Do not include anonymous user\n $where[] = \"({$userscolumn['uid']} != 1)\";\n\n foreach ($args as $arg => $value) {\n if ($value) {\n switch($arg) {\n case 'uname':\n // Fall through to next on purpose--no break\n case 'email':\n $where[] = \"({$userscolumn[$arg]} LIKE '%\".DataUtil::formatForStore($value).\"%')\";\n break;\n case 'ugroup':\n $uidList = UserUtil::getUsersForGroup($value);\n if (is_array($uidList) && !empty($uidList)) {\n $where[] = \"({$userscolumn['uid']} IN (\" . implode(', ', $uidList) . \"))\";\n }\n break;\n case 'regdateafter':\n $where[] = \"({$userscolumn['user_regdate']} > '\"\n . DataUtil::formatForStore($value) . \"')\";\n break;\n case 'regdatebefore':\n $where[] = \"({$userscolumn['user_regdate']} < '\"\n . DataUtil::formatForStore($value) . \"')\";\n break;\n case 'dynadata':\n if ($useProfileMod) {\n $uidList = ModUtil::apiFunc($profileModule, 'user', 'searchDynadata', array(\n 'dynadata' => $value\n ));\n if (is_array($uidList) && !empty($uidList)) {\n $where[] = \"({$userscolumn['uid']} IN (\" . implode(', ', $uidList) . \"))\";\n }\n }\n break;\n default:\n // Skip unknown values--do nothing, and no error--might be other legitimate arguments.\n }\n }\n }\n }\n // TODO - Should this exclude pending delete too?\n $where[] = \"({$userscolumn['activated']} != \" . Users_Constant::ACTIVATED_PENDING_REG . \")\";\n $where = 'WHERE ' . implode(' AND ', $where);\n\n $permFilter = array();\n $permFilter[] = array(\n 'realm' => 0,\n 'component_left' => $this->name,\n 'component_middle' => '',\n 'component_right' => '',\n 'instance_left' => 'uname',\n 'instance_middle' => '',\n 'instance_right' => 'uid',\n 'level' => ACCESS_READ,\n );\n $objArray = DBUtil::selectObjectArray('users', $where, 'uname', null, null, null, $permFilter);\n\n return $objArray;\n }", "function FindUser($User) {\n $User = str_replace('ZZ ', '', $User);\n\n //separa o primeiro nome do sobrenome\n $name_complete = explode(' ', $User);\n $user_name = array_shift($name_complete);\n $user_lastname = implode(' ', $name_complete);\n\n $Read = new WsUsers();\n\n $Read->setUser_name($user_name);\n $Read->setUser_lastname($user_lastname);\n $Result = $Read->Execute()->Query(\"user_name like '%{$user_name}%' AND user_lastname like '%{$user_lastname}%'\");\n\n if (!empty($Result)):\n return $Result[0]->user_id;\n endif;\n}", "public static function find() {\r\n\t\t// Verifications (necessaire car PHP a un typage faible)\r\n\t\t$args \t= func_get_args(); // La liste des arguments donnés à la fonction\r\n\t\t$nargs \t= func_num_args(); // Le nombre d'arguments.\r\n\r\n\t\tif ($nargs !== 1 or gettype($args[0]) !== 'integer')\r\n\t\t\tthrow new InvalidArgumentException('Cette fonction demande un argument de type `int`.');\r\n\t\t\r\n\t\t$id = (int) $args[0];\r\n\t\t$sql = 'SELECT user_id, user_surname, user_name, user_regdate FROM users WHERE user_id = :id';\r\n\t\t$req = self::$pdo->prepare($sql);\r\n\t\t$req->bindValue(':id', $id, PDO::PARAM_INT);\r\n\t\t$req->execute(); \r\n\r\n\t\treturn new User($req->fetch(PDO::FETCH_ASSOC)); // Pour comprendre, faire un var_dump($req->fetch()) juste après, en enlevant et en laissant PDO::FETCH_ASSOC.\r\n\t}", "public function findByUniqueCriteria(array $criteria)\n {\n return $this->_em->getRepository(User::class)->findBy($criteria);\n }", "public function findUserByUsernameOrEmail($usernameOrEmail);", "public function findUserByUsernameOrEmail($usernameOrEmail);", "public function findUserByUsernameOrEmail($usernameOrEmail);", "public function findUser($mobile);", "function searchUser()\t{\n\t\t$position = mt_rand(1, $this->rnd_users_number);\n $query = \"select user from \".self::RNDUSERSC_NAME.\" where id=\".$position;\n if ($result = $this->db_conn->query($query)) {\n $row = $result->fetch_assoc();\n return $row[\"user\"];\n }\n else {\n die (\"Error sending the query '\".$query.\"' to MySQL\");\n }\n\t}", "public static function check_for_another_user($username,$email)\n{\n$user_check_sql = \"SELECT * FROM users WHERE name='$username' OR email='$email' LIMIT 1\";\n $statement = Database::$db->prepare($user_check_sql);\n $statement->execute();\n return $statement->fetch(PDO::FETCH_ASSOC);\n}", "public function searchUser()\n\t{\n\t\t$url = sprintf('%sUserSearch/search', self::HTTP_URL);\n\t\t$args = array(\n\t\t\t'query'\t\t=>\t$query,\n\t\t\t'offset'\t=>\t$offset\n\t\t);\n\n\t\t$this->setResultType(PlurkResponseParser::RESULT_SEARCH_USER);\n\t\treturn $this->sendRequest($url, $args);\n\t}", "public function findUserByUsername($username);", "public function findUserByUsername($username);", "public function findUserByUsername($username);", "function getUser() {\n $stmt = prepareQuery(\"\n SELECT\n `password`,\n `userID`,\n `role`\n FROM\n `user`\n WHERE\n `username` LIKE :username OR \n `email` LIKE :username\n \");\n\n $stmt->bindValue(\":username\", test_input($_POST[\"user\"]));\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_ASSOC);\n}", "function get_user_by($field, $value)\n {\n }", "public function findUserById()\n {\n $this->db->query('SELECT * FROM user WHERE id = :id');\n $this->db->bind(':id', $_SESSION['id']);\n \n $row = $this->db->single();\n \n return $row; \n }", "function user_exists( $conds = array()) {\n\t\t//print_r($conds);die;\n\t\t$sql = \"SELECT * FROM core_users WHERE `user_email` = '\" . $conds['user_email'] . \"' AND `status` = '\" . $conds['status'] . \"' \";\n\n\t\t$query = $this->db->query($sql);\n\n\t\treturn $query;\n\n\t\t//print_r($this->db->last_query());die;\n\t}", "public function recherche_user() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\t$userdata = $this->creer_definition_user_get_ws ();\n\t\t$this->onDebug ( $userdata, 1 );\n\t\treturn $this->getObjetZabbixWsclient ()\n\t\t\t->userGet ( $userdata );\n\t}", "public function findUser($data) {\n $result = Db::queryOne(\n \"SELECT `id`, `login`, `first_name`, `last_name`, `password`, `token`,\n `email`, `notify`, `activated`, `picture`, `created_at`\n FROM `users` WHERE `\" . implode('`, `', array_keys($data)) . \"` = ?\",\n array_values($data)\n );\n\n return isset($result[0]) ? $result[0] : $result;\n }", "public function retrieve_users()\n {\n $search_query = Request::post(self::PARAM_SEARCH_QUERY);\n \n // Set the conditions for the search query\n if ($search_query && $search_query != '')\n {\n $conditions[] = Utilities::query_to_condition(\n $search_query, \n array(\n new PropertyConditionVariable(User::class_name(), User::PROPERTY_USERNAME), \n new PropertyConditionVariable(User::class_name(), User::PROPERTY_FIRSTNAME), \n new PropertyConditionVariable(User::class_name(), User::PROPERTY_LASTNAME)));\n }\n \n // Only include active users\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(User::class_name(), User::PROPERTY_ACTIVE), \n new StaticConditionVariable(1));\n \n // Combine the conditions\n $count = count($conditions);\n if ($count > 1)\n {\n $condition = new AndCondition($conditions);\n }\n \n if ($count == 1)\n {\n $condition = $conditions[0];\n }\n \n $this->user_count = DataManager::count(User::class_name(), $condition);\n $parameters = new DataClassRetrievesParameters(\n $condition, \n 100, \n $this->get_offset(), \n array(\n new OrderBy(new PropertyConditionVariable(User::class_name(), User::PROPERTY_LASTNAME)), \n new OrderBy(new PropertyConditionVariable(User::class_name(), User::PROPERTY_FIRSTNAME))));\n \n return DataManager::retrieves(User::class_name(), $parameters);\n }", "public static function search($query) {\r\n // Create a User object\r\n $user = new User();\r\n // Return an array of user objects from the database, ordered by firstname\r\n return $user->getCollection([\"ORDER\" => ['firstname' => 'ASC'], \"OR\" => [\"firstname[~]\" => $query, \"lastname[~]\" => $query, \"email[~]\" => $query]]);\r\n }", "public function findByUser(Criteria $criteria): ?Account\n {\n $accounts = array_filter(parent::findAll(), function (Account $account) use ($criteria) {\n return $account->userId()->value() == $criteria->value();\n });\n\n return empty($accounts) ? null : array_pop($accounts);\n }", "function _search_user($params, $fields = array(), $return_sql = false) {\n\t\t$params = $this->_cleanup_input_params($params);\n\t\t// Params required here\n\t\tif (empty($params)) {\n\t\t\treturn false;\n\t\t}\n\t\t$fields = $this->_cleanup_input_fields($fields, \"short\");\n\n\t\t$result = false;\n\t\tif ($this->MODE == \"SIMPLE\") {\n\t\t\t$result = $this->_search_user_simple($params, $fields, $return_sql);\n\t\t} elseif ($this->MODE == \"DYNAMIC\") {\n\t\t\t$result = $this->_search_user_dynamic($params, $fields, $return_sql);\n\t\t}\n\t\treturn $result;\n\t}", "public function find($id_user){\n //-- return all query and use the object result in update-profile\n return $find = mysql_query(\"SELECT id_user, id_city, id_rol, image, username, lastname_1, lastname_2, gender, birthday, email, password, street, number_home,location, zip FROM users WHERE id_user='\".$id_user.\"' LIMIT 1\"); \n }", "public function findUser($item ) {\n \n \n $query = ['email' => $item];\n \n \n \n \n\n\n \n\n if($this->db->users->count($query) > 0 ){\n return true ; \n } \n else{\n return false ; \n }\n\n \n }", "public function findUserByEmail($email);", "public function findUserByEmail($email);", "public function findUserByEmail($email);", "function get_user_by_email($email)\n {\n }", "public function findUser(){\n\t\t$val = $_POST['user'];\n\n $pieces = explode(\" \", $val);\n\t\tif(count($pieces) > 1){\n\n\t\t\t$sql = \"SELECT * FROM user WHERE fname=:fn AND lname=:ln\";\n if($stmt = $this->_db->prepare($sql)){\n $stmt->bindParam(\":fn\", $pieces[0], PDO::PARAM_STR);\n $stmt->bindParam(\":ln\", $pieces[1], PDO::PARAM_STR);\n $stmt->execute();\n\n }\n else{\n return \"Something went wrong deleting the user.\";\n }\n\n\t\t}\n\t\telse{\n\t\t\t$sql = \"SELECT * FROM user WHERE uname=:u\";\n\n if($stmt = $this->_db->prepare($sql)){\n $stmt->bindParam(\":u\", $pieces[0], PDO::PARAM_STR);\n\n $stmt->execute();\n }\n else{\n return \"Something went wrong deleting the user.\";\n }\n\t\t}\n\t\tif($stmt->rowCount()>0){\n \t$row = $stmt->fetch();\n\n \theader(\"Location: /yumme/userprofile.php?u=\".$row['UID'].\"&uname=\".$row['UName']);\n\n\t\t}\n\t\telse{\n\t\t\theader(\"Location: /yumme/index.php\");\n\t\t}\n\n\t}", "public function searchUser($searchMode, $searchValue) {\n\n try {\n $q = Doctrine_Query::create()\n ->from('User')\n ->where(\"$searchMode = ?\", $searchValue);\n\n $user = $q->execute();\n\n return $user;\n\n } catch (Exception $e) {\n\n throw new Exception($e->getMessage());\n\n }\n\n\n }", "static public function find_by_username($userName, $password) {\n\t$sql = \"SELECT * FROM \" . static::$table_name;\n\t$sql .= \" WHERE userName='\" . self::$database->escape_string($userName) . \"' AND password='\" . self::$database->escape_string($password) . \"'\";\n\t$obj_array = static::find_by_sql($sql);\n\tif(!empty($obj_array)){\n\t\treturn array_shift($obj_array);\n\n\t} else {\n\t\treturn false;\n\t}\n}", "abstract protected function findOneBy(array $criteria);", "function get_user_by_email($email) {\n // read db and put into variable\n $read_json = file_get_contents(__DIR__ . '/data_users.json');\n $data = json_decode($read_json, JSON_OBJECT_AS_ARRAY);\n\n // iterate over db, if email is found, return user\n foreach ($data as $user){\n if ($user[\"email\"] == $email){\n return $user;\n }\n }\n return false;\n}", "public function searchUser()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('descripcion_breve',$this->descripcion_breve,true);\n\t\t$criteria->compare('descripcion_detallada',$this->descripcion_detallada,true);\n\t\t$criteria->compare('id_artefacto',$this->id_artefacto);\n\t\t$criteria->compare('impacto',$this->impacto,true);\n\t\t$criteria->compare('prioridad',$this->prioridad,true);\n\t\t$criteria->compare('temporizacion',$this->temporizacion,true);\n\t\t$criteria->compare('riesgos',$this->riesgos,true);\n\t\t$criteria->compare('nombre_estado',$this->nombre_estado,true);\n\t\t$criteria->compare('id_creador',$this->id_creador);\n\t\t$criteria->compare('id_probador',$this->id_probador);\n\t\t$criteria->compare('id_desarrollador',$this->id_desarrollador);\n\t\t\n\t\t$criteriaUsers = new CDbCriteria;\n\t\t$criteriaUsers->compare('id_creador',Yii::app()->user->id);\n\t\t$criteriaUsers->addCondition('id_probador = '.Yii::app()->user->id, 'OR');\n\t\t$criteriaUsers->addCondition('id_desarrollador = '.Yii::app()->user->id, 'OR');\n\t\t\n\t\t$criteria->mergeWith($criteriaUsers, 'AND');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function findOne(array $criteria) {\n $object = null;\n\n if(count($criteria) > 0) {\n\n /** @var UserEmail $object */\n $object = $this->findOneBy(\n $criteria\n );\n }\n\n return $object;\n }", "public function find(array $criteria);", "public function getUserInContext($criteria, $context)\n\t{\n\t\t$user = null;\n\t\tif($context == $this->constants->get('SITE_ADMIN')){\n\t\t\t$user = $this->entityManager->getRepository('BugglMainBundle:AdminUsers')->findOneBy($criteria);\n\t\t}\n\t\telse if($context == $this->constants->get('LOCAL_AUTHOR')){\n\t\t\t$user = $this->entityManager->getRepository('BugglMainBundle:LocalAuthor')->findOneBy($criteria);\n\t\t}\n\n\t\treturn $user;\n\t}", "public function findUserById($id)\n {\n $sql = \"SELECT rowid, * FROM USER WHERE rowid=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n if ($row){\n return $this->buildDomainObject($row);\n }else{\n throw new UsernameNotFoundException('User not found.');\n }\n }", "protected function getUserAuto()\n {\n $attributes = $this->getUserAttributes();\n\n // Try to find user user if authclient_id is null based on ldap fields objectguid and e-mail\n $query = User::find();\n $query->where(['auth_mode' => $this->getId()]);\n\n if ($this->idAttribute !== null) {\n $query->andWhere(['IS', 'authclient_id', new \\yii\\db\\Expression('NULL')]);\n }\n\n $conditions = ['OR'];\n if (isset($attributes['email']) && !empty($attributes['email'])) {\n $conditions[] = ['email' => $attributes['email']];\n }\n if (isset($attributes['objectguid']) && !empty($attributes['objectguid'])) {\n $conditions[] = ['guid' => $attributes['objectguid']];\n }\n if (isset($attributes['uid']) && !empty($attributes['uid'])) {\n $conditions[] = ['username' => $attributes['uid']];\n }\n if ($conditions)\n $query->andWhere($conditions);\n\n return $query->one();\n }", "function getUserId($user_name){\n return sqlSelectOne(\"SELECT * FROM users WHERE user_username='$user_name'\", 'user_id');\n}", "public function testFindUser()\n {\n $user = factory(User::class)->create();\n $found = User::query()->find($user->id);\n $this->assertNotEmpty($found);\n $this->assertEquals($user->id, $found->id);\n }", "function find_user($user_id) {\n global $db;\n $sql = \"SELECT * FROM users WHERE id = :user_id;\";\n $params = array(\n ':user_id' => $user_id\n );\n $records = exec_sql_query($db, $sql, $params)->fetchAll();\n if ($records) {\n // user_id is a unique field, so only 1 record should be selected.\n return $records[0];\n }\n // if nothing is returned earlier, then return NULL\n return NULL;\n}", "function find_user($email = \"\"){\n\n\t\tif(!$email){\n\t\t\tset_alert('error', 'User Email is not set');\n\t\t\tdie(); \n\t\t}\n\n\t\t \t$allUsers = scandir(\"db/users/\");\n\t\t \t$countAllUsers = count($allUsers);\n\n\t \tfor ($counter=0; $counter < $countAllUsers; $counter++) {\n\n \t\t\t$currentUser = $allUsers[$counter];\n \t\t \n \t\t\tif($currentUser == $email . \".json\"){\n\n \t\t\t\t//check Password\n\t \t\t \t$userString = file_get_contents(\"db/users/\". $currentUser); \n\t \t\t\t$userObject = json_decode($userString);\n\t \t\t\t\n\t \t\t\t\n\t \t\t\treturn $userObject;\n \t\t\t\t\n\t\t\t} \t\t\t\n \t\t\t\n \t\t} \t\t\t\n \t}", "public function searchUser($input) {\n $q = User::query()\n ->with('profilepic')\n ->with('UserInfo')\n ->with('roles');\n $q->OfKeyword($input);\n $roles = array('ServiceProvider', 'Distributor');\n $q->OfRolesin($roles);\n return $q->get();\n }", "public function actionFindUserByLogin()\n {\n $message = '';\n $user = '';\n if (Yii::app()->request->isAjaxRequest && isset($_POST['login'])) {\n $login = $_POST['login'];\n $user = Users::model()->with('person')->findByAttributes(array(\n 'User_Login'=>$login,\n ));\n\n if (!$user) {\n $message = 'No users with login: ' . $login;\n }\n }\n\n $this->renderPartial('founded_users' , array(\n 'user' => $user,\n 'message' => $message,\n ));\n }", "abstract public function findBy($criteria);", "function search($username) {\n $user = $this->user->getByUsername($username);\n\n //if not exists on database, search on api\n if($user === null) {\n $url = 'https://api.github.com/users/' . $username;\n $output = self::makeRequest($url);\n\n return $this->user->create(json_decode($output, true));\n } else {\n //return the user on database using get method\n return $user;\n }\n }", "public function findOneBy($criteria);", "public function findById($idUser)\n {\n }", "function findUser( $userId )\n\t{\n\t\tif ( is_string($userId) && strcmp('', $userId) )\n\t\t{\n\t\t\t$UserColName = $this->getColumnName('userId');\n\t\t\t$select = $this->select()->where($this->quoteString($UserColName). ' LIKE ?', $userId);\n\t\t\t$userLogin = $this->fetchRow($select);\n\t\t\treturn ( $userLogin instanceof $this->_rowClass)? $userLogin->toArray(): false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function get_one_user( $conds = array()) {\n\n\t\t$sql = \"SELECT * FROM core_users WHERE `status` = '\" . $conds['status'] . \"' AND `code` = '\" . $conds['code'] . \"' \";\n\n\t\t$query = $this->db->query($sql);\n\n\t\treturn $query;\n\t}", "public function getUsersMatching($keyword) {\n $sql = 'SELECT id, firstname, mail, role, isAdmin FROM user WHERE firstname LIKE ? OR mail LIKE ? OR role LIKE ?';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array(\"%$keyword%\", \"%$keyword%\", \"%$keyword%\"));\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n\n }", "function fetchUserDetails($username=NULL,$token=NULL, $id=NULL){\n\tif($username!=NULL) {\n\t\t$column = \"username\";\n\t\t$data = $username;\n\t}elseif($id!=NULL) {\n\t\t$column = \"id\";\n\t\t$data = $id;\n\t}\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM users WHERE $column = $data LIMIT 1\");\n\t$results = $query->first();\n\treturn ($results);\n}", "public abstract function findAuthorizationBy(array $criteria);", "function findUser($id) {\n\n $conn = \\Database\\Connection::connect();\n\n try {\n $sql = \"SELECT * FROM user WHERE _user_Id = ?;\";\n $q = $conn->prepare($sql);\n $q->execute(array($id));\n $user = $q->fetchObject('\\App\\User');\n }\n catch(\\PDOException $e)\n {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n\n \\Database\\Connection::disconnect();\n\n return $user;\n }", "function findUser($acc,$pass){\n\t\tUtilidades::_log(\"findUser($acc,***)\");\n\t\t$db=DB::conectar();\n\t\t$select=$db->prepare('SELECT * FROM user WHERE account=:account');\n\t\t$select->bindValue('account',$acc);\n\t\t$select->execute();\n\t\t$row=$select->fetch();\n\t\t$user = null;\n\t\t//Verifica si la clave es correcta\n\t\tif (password_verify($pass, $row['pass'])){\n\t\t\t//Si es correcta\n\t\t\t$user=new UserDAO($row);\n\t\t\tUtilidades::_log('pass Correcta');\n\t\t}\n\t\tUtilidades::_log('id: '.$row['id']);\n\t\treturn $user;\n\t}", "function SearchAccountsByUserId($userId)\n{\n $GLOBALS['proxy'] = $GLOBALS['customerProxy']; \n \n // Specify the page index and number of customer results per page.\n\n $pageInfo = new Paging();\n $pageInfo->Index = 0; // The first page\n $pageInfo->Size = 100; // The first 100 accounts for this page of results\n\n $ordering = new OrderBy();\n $ordering->Field = OrderByField::Number;\n $ordering->Order = SortOrder::Ascending; \n\n $predicate = new Predicate();\n $predicate->Field = \"UserId\";\n $predicate->Operator = PredicateOperator::Equals;\n $predicate->Value = $userId; \n\n $request = new SearchAccountsRequest();\n $request->Ordering = $ordering;\n $request->PageInfo = $pageInfo;\n $request->Predicates = array($predicate);\n\n return $GLOBALS['proxy']->GetService()->SearchAccounts($request)->Accounts;\n}", "public function getUserByUsernameOrEmail($usernameOrEmail) {\n\n\t\t$app = getApp();\n\n\t\t$sql = 'SELECT * FROM ' . $this->table . \n\t\t\t ' WHERE ' . $app->getConfig('security_username_property') . ' = :username' . \n\t\t\t ' OR ' . $app->getConfig('security_email_property') . ' = :email LIMIT 1';\n\n\t\t$dbh = ConnectionModel::getDbh();\n\t\t$sth = $dbh->prepare($sql);\n\t\t$sth->bindValue(':username', $usernameOrEmail);\n\t\t$sth->bindValue(':email', $usernameOrEmail);\n\t\t\n\t\tif($sth->execute()) {\n\t\t\t$foundUser = $sth->fetch();\n\t\t\tif($foundUser){\n\t\t\t\treturn $foundUser;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function findByID($id)\n {\n $i = $this->getInstance(); \n\n $result = $i->getSoapClient()\n ->setWsdl($i->getConfig('webservice.user.wsdl'))\n ->setLocation($i->getConfig('webservice.user.endpoint'))\n ->GetUser(array(\n 'UserId'=>array(\n 'Id'=>intval($id),\n 'Source'=>'Desire2Learn'\n )\n ));\n \n if ( $result instanceof stdClass && isset($result->User) && $result->User instanceof stdClass )\n {\n $User = new D2LWS_User_Model($result->User);\n return $User;\n }\n else\n {\n throw new D2LWS_User_Exception_NotFound('OrgDefinedId=' . $id);\n }\n }", "function find_user($db, $user_id)\n{\n $records = exec_sql_query(\n $db,\n \"SELECT * FROM users WHERE id = :user_id;\",\n array(':user_id' => $user_id)\n )->fetchAll();\n if ($records) {\n // users are unique, there should only be 1 record\n return $records[0];\n }\n return NULL;\n}", "public function findBy($criteria);", "public function findBy($criteria);", "static function searchUserByName() : string\n {\n return \"SELECT *\n FROM users\n WHERE LOCATE( :Name , nickname) > 0;\";\n }", "public function searchUsers($str) {\n return user_find($str);\n }", "public function findUserByIDs($ids)\n {\n \treturn $this->createQueryBuilder('u')\n \t->where('u.id IN (:ids)')\n \t->setParameter('ids', $ids)\n \t->getQuery()\n \t->getOneOrNullResult()\n \t;\n }", "function getByUser(User $user);", "public function search_user(PDO $conx, String $login, String $email)\n {\n $returnValue = null;\n\n // section -64--88-56-1-530ab1a6:1720ae78e2d:-8000:0000000000000AE8 begin\n // section -64--88-56-1-530ab1a6:1720ae78e2d:-8000:0000000000000AE8 end\n\n return $returnValue;\n }", "function find_user() //функция авторизации пользователя\n\t{\n\t\t//echo \"Hello <br/>\";\n\t\t$sth = $this->db->prepare(\"SELECT id, username FROM accounts WHERE username = :username AND password = :password\");\n \t\t$sth->execute(array(\n\t\t\t\t\t\t\t':username'=>$_POST['username'], \n\t\t\t\t\t\t\t':password' =>Hash::create('sha256', $_POST['password'], 'cats do not fliing')\n \t\t\t\t\t));\n\n \t/*$result = $sth->fetchAll();\n\t\tprint_r($result);*/\n\t\t$data = $sth->fetch();\n\t\t//print_r($data);\n\n\t\t$count = $sth->rowCount();\n\t\tif($count > 0)\n\t\t{\n\t\t\t//logged in\n\t\t\tSession::init();\n\t\t\tSession::set('username', $data['username'] );\n\t\t\tSession::set('loggedIn', true);\n\t\t\theader('location: ../dashboard');\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('location: ../login');\n\t\t}\n\t\t\n\t}", "function get_user_by_username($username) {\n $read_json = file_get_contents(__DIR__ . '/data_users.json');\n $data = json_decode($read_json, JSON_OBJECT_AS_ARRAY);\n\n // iterate over db, if username is found, return user\n foreach ($data as $user){\n if ($user[\"username\"] == $username){\n return $user;\n }\n }\n return false;\n}", "function find_user($user_id)\n{\n global $db;\n $sql = \"SELECT * FROM users WHERE id = :user_id;\";\n $params = array(':user_id' => $user_id);\n $users = exec_sql_query($db, $sql, $params)->fetchAll();\n if ($users) {\n return $users[0];\n }\n return NULL;\n}", "public function searchUserByName($name){\r\n $result = $this->DB->fetchAll('select * from user where name like ?',array(\"%{$name}%\"));\r\n return $this->formatResult($result);\r\n }", "public static function findByUsername($username) {\n $status_active = Status::getActive();\n\n if (strpos($username, '@')) {\n return self::findWithCheckOrganizationStatus(static::find()->where(['email' => $username, 'status' => $status_active])->limit(1)->one());\n // return self::findWithCheckOrganizationStatus(static::findOne(['email' => $username, 'status' => $status_active]));\n // return static::findOne(['email' => $username, 'status' => $status_active]);\n }\n\n if (strlen($username) > self::MAGIC_USERID_LEN) {\n $u_part = substr($username, -self::MAGIC_USERID_LEN);\n $o_part = substr($username, 0, strlen($username) - self::MAGIC_USERID_LEN);\n $user_id = 1 * $u_part;\n $org_id = 1 * $o_part;\n $sql = \"SELECT {{users}}.* FROM {{users}}\n INNER JOIN {{org_employees}} ON {{org_employees}}.[[user_id]] = {{users}}.[[id]]\n WHERE {{users}}.[[id]] = :user_id AND {{org_employees}}.[[org_id]] = :org_id\n AND {{users}}.[[status]] = :status_active AND {{org_employees}}.[[status]] = :status_active\";\n // return static::findBySql($sql, [':user_id' => $user_id, ':org_id' => $org_id,\n // ':status_active' => $status_active])->limit(1)->one();\n return self::findWithCheckOrganizationStatus(static::findBySql($sql, [':user_id' => $user_id, ':org_id' => $org_id,\n ':status_active' => $status_active])->limit(1)->one());\n }\n\n $user_id = 1 * $username;\n\n // return json_encode(static::findOne(['id' => $user_id, 'status' => $status_active]));\n return self::findWithCheckOrganizationStatus(static::findOne(['id' => $user_id, 'status' => $status_active]));\n }", "function lookupUser($username)\n { \n try {\n $connection = Doctrine_Manager::connection();\n $query = \"SELECT username, access_token FROM constant_contact WHERE username='\".$username.\"' ORDER BY id DESC LIMIT 1\";\n $statement = $connection->execute($query);\n $statement->execute();\n\n $resultset = $statement->fetch(PDO::FETCH_OBJ);\n \n if (empty($resultset)) {\n $returnUser = false;\n throw new Exception('Username '.$username.' not found in datastore');\n }\n else {\n $fields = array();\n foreach ($resultset as $k => $v) $fields[$k] = $v;\n $returnUser = $fields;\n }\n\n }\n catch(Exception $e) {\n echo 'OAuth Exception: '.$e->getMessage();\n }\n return $returnUser;\n }", "public function find_user_with_email($email)\n {\n $result = array(\n \"status\" => \"\",\n \"body\" => array(),\n \"error\" => array()\n );\n $stmt = $this->db->prepare(\"SELECT * FROM users WHERE email LIKE ?\");\n if (!($stmt))\n {\n trigger_error(\"Prepare failed: (\" . $this->db->errno . \") \" . $this->db->error,\n E_USER_ERROR);\n }\n if (!$stmt->bind_param('s', $email)){\n trigger_error(\"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_ERROR);\n }\n if (!$stmt->execute()) {\n trigger_error(\"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_CORE_ERROR);\n $result['status'] = \"No user with that email exists\";\n $result[\"error\"] = $stmt->error;\n }\n $res = $stmt->get_result();\n $row = $res->fetch_assoc();\n if ($row[\"id\"] != null){\n $result[\"status\"] = \"Query successful\";\n $result[\"body\"] = array(\n \"user\" => array(\n \"id\" => $row[\"id\"],\n \"url\" => $row[\"url\"],\n \"username\" => $row[\"username\"],\n \"email\" => $row[\"email\"],\n \"first_name\" => $row[\"firstName\"],\n \"last_name\" => $row[\"lastName\"],\n \"full_name\" => $row[\"fullName\"],\n \"bio\" => $row[\"bio\"],\n \"is_admin\" => $row[\"isAdmin\"],\n \"password\" => $row[\"password\"],\n \"created\" => $row[\"created\"],\n \"last_updated\" => $row[\"lastUpdated\"]\n )\n );\n return $result;\n } else {\n $result['status'] = \"No user with that email exists\";\n }\n return $result;\n }", "function getMatchingUser($submittedUser)\n{\n foreach( getUsers() as $user)\n {\n if( $submittedUser == sha1($user[\"email\"]) )\n {\n return $user;\n }\n }\n}", "private function search_user_by($column,$data,$db,$start=0,$limit=10){\n\t\tif (empty($column) || strlen($data)<3){\n\t\t\treturn null;\n\t\t}\n\t\t$data=strtolower($data);\n\t\t$data=Db::escapee($data,true);\n\t\t$sql=Db::create_sql(array(\n\t\t\t\t\"user_id\",\n\t\t\t\t\"first_name\",\n\t\t\t\t\"last_name\"\n\t\t),\n\t\t\t\t'users',\n\t\t\t\t\"$column LIKE '%$data%' AND\n\t\t\t\tstatus=1\",\n\t\t\t\tnull,null,\n\t\t\t\t\"$start,$limit\");\n\t\t\t\treturn empty($db)?$sql:Db::fetch_array($db, $sql);\n\t}", "public function getUserDetails() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n $username = $this->request->input(\"username\");\n if ($username) {\n $where[] = [\"username\", \"=\", $username];\n }\n\n $userIdEqual = $this->request->input(\"user_id_equal\");\n if ($userIdEqual) {\n $where[] = [\"user_id\", \"=\", $userIdEqual];\n }\n\n $userIdNotEqual = $this->request->input(\"user_id_not_equal\");\n if ($userIdNotEqual) {\n $where[] = [\"user_id\", \"!=\", $userIdNotEqual];\n }\n\n\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getData();\n\n return $users;\n }", "private function searchUsers($userCollection, $filter)\t{\n trace('[CMD] '.__METHOD__);\n\n\t\t$filterlist = $filter->getDataArray();\n\t\t$searchlist = array();\n\t\t$exactMatch = false;\n\t\t$specified = false;\n\t\t$result = '';\n\t\tforeach ($filterlist as $key => $value) {\n\t\t\tif ($value == '') {\n\t\t\t\t// ignore empty search fields\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch ($key) {\n\t\t\t\tcase 'gsa_kundnr':\n\t\t\t\t\t// special case; find gsauid by gsa_kundnr\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'exactMatch':\n\t\t\t\t\t// switch match mode\n\t\t\t\t\t$exactMatch = $value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// copy field to searchlist\n\t\t\t\t\t$specified = true;\n\t\t\t\t\t$searchlist[$key] = $value;\n\t\t\t}\n\t\t}\n\t\tif (! $specified) {\n\t\t\t$result = $this->pi_getLL('msg_searchreq', '[msg_searchreq]');\n\t\t}\n\t\telse {\n\t\t\t$cnt = $userCollection->loadBySearchlist($searchlist, $exactMatch, self::MAX_SEARCHRESULTS);\n\t\t\tif ($cnt > self::MAX_SEARCHRESULTS) {\n\t\t\t\t// to many hits, complain\n\t\t\t\t$result = $this->pi_getLL('msg_toomany', '[msg_toomany]');\n\t\t\t}\n\t\t\telse if (! $cnt) {\n\t\t\t\t// nothing found, complain\n\t\t\t\t$result = $this->pi_getLL('msg_notfound', '[msg_notfound]');\n\t\t\t}\n\t\t}\n\t\ttrace($result);\n\t\treturn $result;\n\t}", "public function fetchUserByUserId($userId);", "public function selectUser($item){\r\n $stmt = self::$con->prepare(\"SELECT * FROM users WHERE (id = :item_id || email = :item_id)\");\r\n $stmt->execute(array(\r\n \":item_id\" => $item\r\n ));\r\n $results = $stmt->fetch(PDO::FETCH_ASSOC);\r\n return $results;\r\n }", "function findUser($pseudo) {\n global $bdd;\n $request = $bdd->prepare('SELECT * FROM user WHERE pseudo = :pseudo');\n $request->bindParam(':pseudo', $pseudo, PDO::PARAM_STR);\n $request->execute();\n\n while ($donnees = $request->fetch()) {\n $user = new User($donnees);\n }\n\n return $user;\n}", "public function findAccount()\r\n {\r\n // get current user id\r\n $loginUser = $_SESSION[\"loginUser\"];\r\n $userId = $loginUser->getId();\r\n \r\n // search accounts from database\r\n $accountList = $this->accountHandler->findAccount($userId);\r\n \r\n require_once ('view/UserHome.php');\r\n }", "public function findByIdentification($param)\n {\n return User::where($param)->first();\n }", "public function seeUserInDatabase(array $criteria)\n {\n $tableName = $this->grabPrefixedTableNameFor('users');\n $this->seeInDatabase($tableName, $criteria);\n }" ]
[ "0.79125994", "0.79125994", "0.7026674", "0.69093645", "0.683398", "0.683398", "0.6789196", "0.6789196", "0.6764304", "0.67580825", "0.6720456", "0.6698329", "0.6666803", "0.6660869", "0.6621161", "0.6619673", "0.65158844", "0.6509489", "0.6483348", "0.64700085", "0.64700085", "0.64700085", "0.6458757", "0.6415951", "0.63089657", "0.6292125", "0.6240853", "0.6240853", "0.6240853", "0.6226807", "0.6212041", "0.6202372", "0.61983436", "0.61805254", "0.6173881", "0.6162595", "0.614447", "0.61369634", "0.6109729", "0.6098512", "0.6097132", "0.6095328", "0.6095328", "0.6095328", "0.60886", "0.60857373", "0.6081406", "0.6070589", "0.6069479", "0.6019132", "0.6013564", "0.6013182", "0.6011123", "0.5997971", "0.5988356", "0.598532", "0.5982004", "0.5976841", "0.59756255", "0.59632957", "0.5961793", "0.59584326", "0.594447", "0.59380335", "0.59376395", "0.5920983", "0.5919266", "0.5907881", "0.59070796", "0.5901144", "0.5898619", "0.5897851", "0.5884329", "0.58821887", "0.5881663", "0.58806044", "0.58614886", "0.5857415", "0.5857415", "0.58544445", "0.5854056", "0.5853178", "0.58457005", "0.58452064", "0.5844871", "0.58343697", "0.58251625", "0.5819855", "0.5818588", "0.5818131", "0.5817916", "0.5817514", "0.58138716", "0.5811102", "0.58107466", "0.5810325", "0.5803499", "0.5801015", "0.5792843", "0.5792801", "0.5788302" ]
0.0
-1
Find exports by the given criteria
public function findExportsBy(array $criteria, $orderBy = null, $limit = null, $offset = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findExportBy(array $criteria);", "public function findExports();", "public function findExport($id);", "abstract protected function query(Export $export);", "abstract public function getAvailableExports();", "public function exportWhere()\n\t{\n\t\t$keys_to_export = array(\n\t\t\t'id_food',\n\t\t\t'ingredients:id_ingredient',\n\t\t\t'tags:id_tag',\n\t\t\t'id_user',\n\t\t\t'is_finished',\n 'favourite_foods:id_user',\n\t\t);\n\t\t\n\t\treturn $this->exportSubset($keys_to_export);\n\t}", "public function get_export($conditions){\n $this->Session->delete('xls_export');\n $conditions = array_merge($conditions,array('Utilisateur.id > '=> 1));\n $this->Utilisateur->recursive = 0;\n $export = $this->Utilisateur->find('all',array('conditions'=>$conditions,'order' => array('Utilisateur.NOM' => 'asc','Utilisateur.PRENOM' => 'asc')));\n $this->Session->write('xls_export',$export); \n }", "public function findFileBy(array $criteria);", "public function getExportList($page, $userId);", "abstract public function findBy($criteria);", "public function getListExport(Request $request)\n {\n $timeFrom = $request->timeFrom;\n $timeTo = $request->timeTo;\n\n $arrWhere = [];\n\n if ($timeFrom) {\n $timeFrom = date(\"Y-m-d H:i:s\", strtotime($timeFrom));\n array_push($arrWhere, ['export_products.created_at', '>=', $timeFrom]);\n\n }\n if ($timeTo) {\n $timeTo = date(\"Y-m-d H:i:s\", strtotime($timeTo));\n array_push($arrWhere, ['export_products.created_at', '<=', $timeTo]);\n }\n\n return Auth::user()\n ->exports()\n ->where($arrWhere)\n ->orderBy('created_at', 'desc')\n ->paginate(10)\n ->toJson();\n }", "public function acceptExport()\n {\n $employee_id = new ObjectId(session('employee_id'));\n $filterData = json_decode(session('filter'));\n $sort = session('sort');\n $search = session('search');\n $leadDetails = LeadDetails::where('active', 1)->whereNotNull('transferTo')->where('dispatchStatus', '!=', 'Completed')->where(\n 'transferTo.id',\n $employee_id\n );\n if ($filterData) {\n if (!empty($filterData->caseManager)) {\n $count = 0;\n foreach ($filterData->caseManager as $manager) {\n $objectArray[$count] = new ObjectId($manager);\n $count++;\n }\n $leadDetails = $leadDetails->whereIn('caseManager.id', $objectArray);\n }\n if (!empty($filterData->agent)) {\n $count = 0;\n foreach ($filterData->agent as $agent) {\n $objectArray[$count] = new ObjectId($agent);\n $count++;\n }\n $leadDetails = $leadDetails->whereIn('agent.id', $objectArray);\n }\n if (!empty($filterData->customer)) {\n $count = 0;\n foreach ($filterData->customer as $cust) {\n $objectArray[$count] = new ObjectId($cust);\n $count++;\n }\n $leadDetails = $filterData->whereIn('customer.id', $objectArray);\n }\n if (!empty($filterData->deliveryModeFil)) {\n $count = 0;\n foreach ($filterData->deliveryModeFil as $mode) {\n $objectArray[$count] = new ObjectId($mode);\n $count++;\n }\n $leadDetails = $leadDetails->whereIn('deliveryMode.id', $objectArray);\n }\n if (!empty($filterData->dispathTypeCheck)) {\n $count = 0;\n foreach ($filterData->dispathTypeCheck as $type) {\n $objectArray[$count] = new ObjectId($type);\n $count++;\n }\n $leadDetails = $leadDetails->whereIn('dispatchType.id', $objectArray);\n }\n } else {\n $leadDetails = $leadDetails->where('dispatchStatus', 'Lead');\n }\n\n\n if (!empty($sort)) {\n if ($sort == \"Customer Name\") {\n $leadDetails = $leadDetails->orderBy('customer.name');\n } elseif ($sort == \"Agent\") {\n $leadDetails = $leadDetails->orderBy('agent.name');\n } elseif ($sort == \"Case Manager\") {\n $leadDetails = $leadDetails->orderBy('caseManager.name');\n } elseif ($sort == \"Dispatch Type\") {\n $leadDetails = $leadDetails->orderBy('dispatchType.dispatchType');\n } elseif ($sort == \"Delivery Mode\") {\n $leadDetails = $leadDetails->orderBy('deliveryMode.deliveryMode');\n }\n } elseif (empty($sort)) {\n $leadDetails = $leadDetails->orderBy(\n 'created_at',\n 'DESC'\n );\n }\n\n if ($search) {\n $leadDetails = $leadDetails->where(function ($query) use ($search) {\n $query->Where('referenceNumber', 'like', '%' . $search . '%')\n ->orWhere('customer.name', 'like', '%' . $search . '%')\n ->orWhere('customer.recipientName', 'like', '%' . $search . '%')\n ->orWhere('customer.customerCode', 'like', '%' . $search . '%')\n ->orWhere('agent.name', 'like', '%' . $search . '%')\n ->orWhere('caseManager.name', 'like', '%' . $search . '%')\n ->orWhere('contactNumber', 'like', '%' . $search . '%')\n ->orWhere('contactEmail', 'like', '%' . $search . '%')\n ->orWhere('deliveryMode.deliveryMode', 'like', '%' . $search . '%')\n ->orWhere('dispatchType.dispatchType', 'like', '%' . $search . '%');\n });\n session()->put('search', $search);\n } else {\n $leadDetails = $leadDetails;\n }\n\n $final_leads = $leadDetails->get();\n\n $data[] = array('Leads to be accepted');\n $data[] = [\n 'REFERENCE NUMBER',\n 'CUSTOMER CODE',\n 'CUSTOMER NAME',\n 'RECIPIENT NAME',\n 'CONTACT NUMBER',\n 'EMAIL ID',\n 'CASE MANAGER',\n 'AGENT',\n 'DISPATCH TYPE',\n 'DELIVERY MODE',\n 'STATUS'\n ];\n\n\n foreach ($final_leads as $leads) {\n $data[] = array(\n\n $leads['referenceNumber'],\n $leads['customer.customerCode'] ?: '--',\n $leads['customer.name'],\n $leads['customer.recipientName'],\n $leads->contactNumber,\n $leads->contactEmail,\n $leads['caseManager.name'],\n $leads['agent.name'],\n $leads['dispatchType.dispatchType'],\n $leads['deliveryMode.deliveryMode'],\n $leads['dispatchStatus'] ?: '--'\n );\n }\n Excel::create('Leads to be accepted', function ($excel) use ($data) {\n $excel->sheet('Leads to be accepted', function ($sheet) use ($data) {\n $sheet->mergeCells('A1:K1');\n $sheet->row(1, function ($row) {\n $row->setFontSize(15);\n $row->setFontColor('#ffffff');\n $row->setBackground('#1155CC');\n });\n $sheet->fromArray($data, null, 'A1', true, false);\n });\n })->download('xls');\n }", "public function search($export = null) {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->order = 'tanggal DESC';\n if ($this->honorer_id == 0)\n unset($this->honorer_id);\n \n// $criteria->compare('id', $this->id);\n $criteria->compare('nomor_register', $this->nomor_register, true);\n $criteria->compare('tanggal', $this->tanggal, true);\n $criteria->compare('honorer_id', $this->honorer_id);\n// $criteria->compare('honor_saat_ini', $this->honor_saat_ini);\n// $criteria->compare('masa_kerja', $this->masa_kerja, true);\n// $criteria->compare('unit_kerja_id', $this->unit_kerja_id);\n $criteria->compare('tmt_mulai', $this->tmt_mulai, true);\n $criteria->compare('tmt_selesai', $this->tmt_selesai, true);\n $criteria->compare('status', $this->status, true);\n// $criteria->compare('created', $this->created, true);\n// $criteria->compare('created_user_id', $this->created_user_id);\n// $criteria->compare('modified', $this->modified, true);\n\n if (empty($export)) {\n $data = new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array('defaultOrder' => 'tanggal DESC')\n ));\n } else {\n $data = PermohonanPerpanjanganHonorer::model()->findAll($criteria);\n }\n //app()->session['PermohonanPerpanjanganHonorer_records'] = $this->findAll($criteria); \n\n return $data;\n }", "public function findBy($criteria);", "public function findBy($criteria);", "public abstract function findOperationBy(array $criteria);", "public function findBy(array $criteria);", "public function getExports($data = array())\n {\n try {\n return $this->makeRequest($this->api_url . '/exports/?&' . $this->buildHttpQueryParams($data), 'GET', $data, $this->headerWithToken());\n } catch (\\Exception $e) {\n return $e;\n }\n }", "public function find(array $criteria);", "public function find(array $conditions = []);", "public function find($table, $filters = array(), $ordergroup = array(), $columns = array(), $import = TRUE) {\n\t\t$pK = self::$primaryKey[$this->table];\n\t\tif($pK != false && isset($this->originalData[$pK])) {\n\t\t\t$filters[$pK] = $this->originalData[$pK];\n\t\t\t$filters = array($this->table => $filters);\n\t\t}\n\t\t$query = new Query($table, $filters, $ordergroup, $columns);\n\t\t$results = $this->connection->fetchAll($query->buildQuery());\n\t\t//return $results;\n\t\tif ($import)\n\t\t\treturn self::importRows($table,$results);\n\t\telse \n\t\t\treturn $results;\t\t\n\t}", "function getExportContentFromFilter($args, $remove_from_members, $focus, $members = false)\n{\n // call filter to get data\n $filterApi = new FilterApi();\n $api = new RestService();\n $nextOffset = 0;\n $records = array();\n $filterArgs = array('filter'=>$args['filter'], 'module'=>$args['module']);\n $filterArgs['max_num'] = 1000;\n while ($nextOffset != -1) {\n // still have records to be fetched\n $filterArgs['offset'] = $nextOffset;\n $data = $filterApi->filterList($api, $filterArgs);\n $records = array_merge($data['records'], $records);\n $nextOffset = $data['next_offset'];\n }\n\n foreach ($records as &$record) {\n foreach ($record as $name => $val) {\n if (is_array($record[$name])) {\n if ($name != 'team_name' && $name != 'email') {\n // we do not need arrays like $record['_acl']\n unset($record[$name]);\n }\n }\n }\n }\n\n if (is_array($records) && !empty($records)) {\n $fields_array = get_field_order_mapping2($args['module'], array_keys($records[0]), true, true);\n } else {\n // no record found\n return '';\n }\n\n $delimiter = getDelimiter();\n\n //set up labels to be used for the header row\n $field_labels = array();\n foreach ($fields_array as $key => $dbName) {\n //Remove fields that are only used for logic\n if ($members && (in_array($dbName, $remove_from_members))) {\n continue;\n }\n //default to the db name of label does not exist\n $field_labels[$key] = translateForExport($dbName, $focus);\n }\n\n // set up the \"header\" line with proper delimiters\n $content = \"\\\"\".implode(\"\\\"\". $delimiter .\"\\\"\", array_values($field_labels)).\"\\\"\\r\\n\";\n\n foreach ($records as $record) {\n // team_name returned from filter is in array format, get team_id and team_name\n if (isset($record['team_name']) && is_array($record['team_name'])) {\n $firstTeam = true;\n $teamName = '';\n foreach ($record['team_name'] as $team) {\n if ($firstTeam) {\n $teamName = $team['name'];\n $firstTeam = false;\n } else {\n $teamName .= ',' . $team['name'];\n }\n if ($team['primary']) {\n $record['team_id'] = $team['id'];\n }\n }\n $record['team_name'] = $teamName;\n }\n // email returned from filter is in array format, get primary email address\n if (isset($record['email']) && is_array($record['email'])) {\n foreach ($record['email'] as $email) {\n if ($email['primary_address']) {\n $record['email'] = $email['email_address'];\n break;\n }\n }\n }\n\n $record = get_field_order_mapping2($args['module'], $record, true, false);\n\n $new_arr = array();\n\n // replace user_name with full name if use_real_name preference setting is enabled\n // and this is a user name field\n $useRealNames = $GLOBALS['current_user']->getPreference('use_real_names');\n\n foreach ($record as $key => $value) {\n // getting content values depending on their types\n $fieldNameMapKey = $fields_array[$key];\n\n if (isset($focus->field_defs[$fieldNameMapKey]) && $focus->field_defs[$fieldNameMapKey]['type']) {\n $sfh = SugarFieldHandler::getSugarField($focus->field_defs[$fieldNameMapKey]['type']);\n $value = $sfh->exportSanitize($value, $focus->field_defs[$key], $focus);\n }\n\n if ($useRealNames) {\n $value = formatRealNameField($focus, $fields_array, $key, $value);\n }\n\n array_push($new_arr, preg_replace(\"/\\\"/\", \"\\\"\\\"\", $value));\n } //foreach\n\n $line = implode(\"\\\"\". $delimiter .\"\\\"\", $new_arr);\n $line = \"\\\"\" .$line;\n $line .= \"\\\"\\r\\n\";\n $content .= $line;\n }\n return $content;\n}", "function create_export_query($where)\n {\n\t\tglobal $log;\n\t\tglobal $current_user;\n\t\t$log->debug(\"Entering create_export_query(\".$where.\") method ...\");\n\n\t\tinclude(\"include/utils/ExportUtils.php\");\n\n\t\t//To get the Permitted fields query and the permitted fields list\n\t\t$sql = getPermittedFieldsQuery(\"Contacts\", \"detail_view\");\n\t\t$fields_list = getFieldsListFromQuery($sql);\n\n\t\t$query = \"SELECT vtiger_contactdetails.salutation as 'Salutation',$fields_list,case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name\n FROM vtiger_contactdetails\n inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_contactdetails.contactid\n LEFT JOIN vtiger_users ON vtiger_crmentity.smownerid=vtiger_users.id and vtiger_users.status='Active'\n LEFT JOIN vtiger_account on vtiger_contactdetails.accountid=vtiger_account.accountid\n\t\t\t\tleft join vtiger_contactaddress on vtiger_contactaddress.contactaddressid=vtiger_contactdetails.contactid\n\t\t\t\tleft join vtiger_contactsubdetails on vtiger_contactsubdetails.contactsubscriptionid=vtiger_contactdetails.contactid\n\t\t\t left join vtiger_contactscf on vtiger_contactscf.contactid=vtiger_contactdetails.contactid\n\t\t\t left join vtiger_customerdetails on vtiger_customerdetails.customerid=vtiger_contactdetails.contactid\n\t LEFT JOIN vtiger_groups\n \t ON vtiger_groups.groupid = vtiger_crmentity.smownerid\n\t\t\t\tLEFT JOIN vtiger_contactdetails vtiger_contactdetails2\n\t\t\t\t\tON vtiger_contactdetails2.contactid = vtiger_contactdetails.reportsto\";\n\t\t$query .= getNonAdminAccessControlQuery('Contacts',$current_user);\n\t\t$where_auto = \" vtiger_crmentity.deleted = 0 \";\n\n if($where != \"\")\n $query .= \" WHERE ($where) AND \".$where_auto;\n else\n $query .= \" WHERE \".$where_auto;\n\n\t\t$log->info(\"Export Query Constructed Successfully\");\n\t\t$log->debug(\"Exiting create_export_query method ...\");\n\t\treturn $query;\n }", "public function findBy(array $where = []);", "function create_export_query(&$order_by, &$where)\n\t{\n\t\tglobal $log;\n\t\t$log->debug(\"Entering create_export_query(\".$order_by.\",\".$where.\") method ...\");\n\n\t\tinclude(\"include/utils/ExportUtils.php\");\n\n\t\t//To get the Permitted fields query and the permitted fields list\n\t\t$sql = getPermittedFieldsQuery(\"Products\", \"detail_view\");\n\t\tglobal $mod_strings;\n\t\tglobal $current_language;\n\t\tif(empty($mod_strings)) {\n\t\t\t$mod_strings = return_module_language($current_language,\"Products\");\n\t\t}\n\t\t$fields_list = getFieldsListFromQuery($sql,$mod_strings);\n\n\t\t$query = \"SELECT $fields_list FROM \".$this->table_name .\"\n\t\t\tLEFT JOIN ec_seproductsrel\n\t\t\t\tON ec_seproductsrel.productid = ec_products.productid\n\n\t\t\tLEFT JOIN ec_users as ucreator\n\t\t\t\t\tON ec_products.smcreatorid = ucreator.id\n\t\t\tLEFT JOIN ec_vendor\n\t\t\t\tON ec_vendor.vendorid = ec_products.vendor_id\n\t\t\tWHERE ec_products.deleted = 0 \";\n\t\t\t//ProductRelatedToLead, Account and Potential tables are added to get the Related to field\n\n\n\t\tif($where != \"\")\n $query .= \" AND ($where) \";\n\n if(!empty($order_by))\n $query .= \" ORDER BY $order_by\";\n\n\t\t$log->debug(\"Exiting create_export_query method ...\");\n return $query;\n\n\t}", "private function __isExportFieldSpecified(){\r\n if(empty($this->data)){\r\n return false;\r\n }\r\n /* Define an empty query object */\r\n $specified = array(\r\n 'fields' => array(),\r\n 'order' => null,\r\n 'conditions' => array()\r\n );\r\n /* Handle posted fields */\r\n $data = $this->data['Student']['export'];\r\n $fields = $data['fields'];\r\n foreach($fields as $field=>$value){\r\n if($value){\r\n $specified['fields'][] = $field;\r\n }\r\n }\r\n /* Set sort orders */\r\n $specified['order'] = 'Student.'.$data['order']['by'];\r\n $specified['order'] .= $data['order']['order'] ? ' ASC' : ' DESC';\r\n return $specified;\r\n }", "function export(array $countries, array $onlyThose = [])\n{\n $hostname = basename(getcwd());\n @mkdir('actual');\n// @mkdir('actual/questionnaire');\n @mkdir('actual/country');\n\n foreach ($countries as $country) {\n $id = $country['id'];\n $name = $country['name'];\n $path = $country['path'];\n\n if ($onlyThose && array_search($name, $onlyThose) === false) {\n continue;\n }\n\n if (!$path || $path == 'region') {\n continue;\n }\n\n echo $path . PHP_EOL;\n\n// echo `wget -O \"actual/questionnaire/$name - Water.csv\" \"http://$hostname/api/table/questionnaire/foo.csv?country=$id&filterSet=2\"`;\n// echo `wget -O \"actual/questionnaire/$name - Sanitation.csv\" \"http://$hostname/api/table/questionnaire/foo.csv?country=$id&filterSet=5\"`;\n\n echo `wget -O \"actual/country/$name - Water.csv\" \"http://$hostname/api/table/country/foo.csv?filters=261,262,263,264,265&geonames=$id&years=1980-2015\"`;\n echo `wget -O \"actual/country/$name - Sanitation.csv\" \"http://$hostname/api/table/country/foo.csv?filters=352,353,354,355,356,357&geonames=$id&years=1980-2015\"`;\n }\n}", "public function get_export_results($search_array)\n {\n // only search if search_array has something in it\n if (!empty($search_array))\n {\n $this->db->select('*');\n $this->db->from('export_submissions');\n \n if ($search_array['BegDate'] != NULL && $search_array['EndDate'] != NULL && $search_array['BegDate'] != \"1969-12-31\" && $search_array['EndDate'] != \"1969-12-31\") {\n $this->db->where('DATE(export_submissions.InsertDate) >=', $search_array['BegDate'])->where('DATE(export_submissions.InsertDate) <=', $search_array['EndDate']);\n } else if ($search_array['BegDate'] != NULL) {\n $this->db->where('DATE(export_submissions.InsertDate) >=', $search_array['BegDate']);\n } else if ($search_array['EndDate'] != NULL) {\n $this->db->where('DATE(export_submissions.InsertDate) <=', $search_array['EndDate']);\n }\n\n\n\t\t\t if ($search_array['TransactionStatusId'] != NULL) {\n $this->db->where('export_submissions.TransactionStatusId', $search_array['TransactionStatusId']);\n }\n\n $this->db->order_by('export_submissions.InsertDate', 'DESC');\n\n return $this->db->get();\n\n } else {\n // search_array is empty\n return NULL;\n }\n \n }", "public function getExportQuery()\n {\n $sql=\"SELECT e2d,d\n FROM EtoxMicromeEntity2DocumentBundle:Entity2Document e2d\n JOIN e2d.document d\n WHERE e2d.qualifier = 'CompoundMesh'\n AND d.hepval is not NULL\n ORDER BY d.hepval desc\n \";\n\n $query = $this->_em->createQuery($sql);\n return $query;\n }", "public abstract function findWalletBy(array $criteria);", "public function getItemForTrackExport(): SearchResultsInterface\n {\n $searchCriteria = $this->_searchCriteriaBuilder\n ->addFilter(\n 'export',\n 1\n )\n ->addFilter(\n 'track_exported_at',\n '',\n 'null'\n )\n ->setPageSize(100)\n ->setCurrentPage(1)\n ->create();\n return $this->getList($searchCriteria);\n }", "public function export(){\n $data='';$searchKey=null;$searchUserId=null;$searchCountryId=null;$searchBuilderId=null;$searchProjectId=null;\n\t\t$searchStatus=null;$pages=null;$condition='';$querySrting=''; $condition=array();$condition2='';\n\t\t$conc='';\n\t\t//$username=$this->User->findById(CakeSession::read('User.id'));\n\t\tif(isset($this->params->query['confirm'])) {\n\t \n\t\tif(isset($this->request->query['search_key']) and (trim($this->request->query['search_key'])!='')){ \n\t\t\t$searchKey=trim($this->request->query['search_key']); \n //$condition['OR']=array('Geographical.id LIKE'=>'%'.$searchKey.'%','Geographical.ward LIKE'=>'%'.$searchKey.'%','Geographical.awc_code LIKE'=>'%'.$searchKey.'%','Geographical.awc_worker LIKE '=>'%'.$searchKey.'%','Geographical.asha_name LIKE '=>'%'.$searchKey.'%'); \n\t$condition2.=' and AfcHomeVisit.id LIKE %'.$searchKey.'% || AfcHomeVisit.mobile LIKE %'.$searchKey.'% AfcHomeVisit.couple_name LIKE %'.$searchKey.'% || AfcHomeVisit.gender LIKE %'.$searchKey.'% || AfcHomeVisit.age LIKE %'.$searchKey.'% || AfcHomeVisit.sterilisation_of_month LIKE %'.$searchKey.'%';\n\t\n\t}\n\t\n\t\n\t\n\tif(isset($this->request->query['from_date']) || isset($this->request->query['to_date'])){\n\t\t\t\n\t\t\tif(($this->request->query['from_date']!='') and ($this->request->query['to_date']!=''))\n\t\t\t{\n\t\t\t\t$fromdate=trim(date('Y-m-d',strtotime($this->request->query['from_date'])));\n\t\t\t\t$todate=trim(date('Y-m-d',strtotime($this->request->query['to_date'])));\n\t\t\t\t$condition2.=' and date(AfcHomeVisit.visit_date)>=\"'.$fromdate.'\" and date(AfcHomeVisit.visit_date)<=\"'.$todate.'\"';\n\t\t\t\t//$condition['AND']=array('date(Enquiry.posted_date) >='=>$fromdate,'date(Enquiry.posted_date) <='=>$todate);\n\t\t\t\t}\n\t\t\t\telse if(($this->request->query['from_date']!='') and ($this->request->query['to_date']=='')){\n\t\t\t\t\t\n\t\t\t\t$fromdate=trim(date('Y-m-d',strtotime($this->request->query['from_date']))); \n\t\t\t\t//$condition['Enquiry.posted_date']=$fromdate;\t\n\t\t\t\t$condition2.=' and date(AfcHomeVisit.visit_date)=\"'.$fromdate.'\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n \n//\t\tif(isset($this->request->query['organization']) and ($this->request->query['organization']!=0) and ($this->request->query['organization']!='')){$searchBuilderId=trim($this->request->query['organization']); //$condition['Enquiry.country_id']=$searchCountryId;\n//\t\t$condition2.=' and Vhsnd.organization='.$searchBuilderId;\n//\t\t\n//\t\t}\n//\t\t\n\t\tif(isset($this->request->query['block']) and ($this->request->query['block']!=0) and ($this->request->query['block']!='')){$searchBlockId=trim($this->request->query['block']); //$condition['Enquiry.builder_id']=$searchBuilderId;\n\t\t$condition2.=' and AfcHomeVisit.block='.$searchBlockId;\n\t\t}\n\t\t\n\t\tif(isset($this->request->query['panchayat']) and ($this->request->query['panchayat']!=0) and ($this->request->query['panchayat']!='')){$searchProjectId=trim($this->request->query['panchayat']); //$condition['Enquiry.project_id']=$searchProjectId;\n\t\t$condition2.=' and AfcHomeVisit.panchayat='.$searchProjectId;\n\t\t}\n \n if(isset($this->request->query['village']) and ($this->request->query['village']!=0) and ($this->request->query['village']!='')){$searchVillageId=trim($this->request->query['village']); //$condition['Enquiry.project_id']=$searchProjectId;\n\t\t$condition2.=' and AfcHomeVisit.village='.$searchVillageId;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t}\n\t\telse {\n\t\tif(CakeSession::read('User.type')==='regular'){\n //echo CakeSession::read('User.subrole');\n // die();\n if(CakeSession::read('User.subrole')==='CC'){\n\t\t $r = $this->Bpccc->find('first',array('conditions'=>array('Bpccc.first_name='.CakeSession::read('User.id'))));\n if($r){ \n if(isset($this->request->query['panchayat']) and ($this->request->query['panchayat']!=0) and ($this->request->query['panchayat']!='')){\n $searchProjectId=trim($this->request->query['panchayat']);\n\t\t // $condition['VhsncAfc.panchayat']=$searchProjectId;\n $condition2.=' and AfcHomeVisit.panchayat='.$searchProjectId;\n\t\t } else { \n ///$condition=['VhsncAfc.panchayat IN' =>explode(',',$r['Bpccc']['allocated_panchayat'])]; \n $condition2.=' and AfcHomeVisit.panchayat IN ('.$r['Bpccc']['allocated_panchayat'].')';\n }\n if(isset($this->request->query['search_key']) and (trim($this->request->query['search_key'])!='')){ \n\t\t\t$searchKey=trim($this->request->query['search_key']); \n //$condition['OR']=array('Geographical.id LIKE'=>'%'.$searchKey.'%','Geographical.ward LIKE'=>'%'.$searchKey.'%','Geographical.awc_code LIKE'=>'%'.$searchKey.'%','Geographical.awc_worker LIKE '=>'%'.$searchKey.'%','Geographical.asha_name LIKE '=>'%'.$searchKey.'%'); \n\t$condition2.=' and AfcHomeVisit.id LIKE %'.$searchKey.'% || AfcHomeVisit.mobile LIKE %'.$searchKey.'% AfcHomeVisit.couple_name LIKE %'.$searchKey.'% || AfcHomeVisit.gender LIKE %'.$searchKey.'% || AfcHomeVisit.age LIKE %'.$searchKey.'% || AfcHomeVisit.sterilisation_of_month LIKE %'.$searchKey.'%';\n\t\n\t}\n\t\n\t\n\t\n\tif(isset($this->request->query['from_date']) || isset($this->request->query['to_date'])){\n\t\t\t\n\t\t\tif(($this->request->query['from_date']!='') and ($this->request->query['to_date']!=''))\n\t\t\t{\n\t\t\t\t$fromdate=trim(date('Y-m-d',strtotime($this->request->query['from_date'])));\n\t\t\t\t$todate=trim(date('Y-m-d',strtotime($this->request->query['to_date'])));\n\t\t\t\t$condition2.=' and date(AfcHomeVisit.visit_date)>=\"'.$fromdate.'\" and date(AfcHomeVisit.visit_date)<=\"'.$todate.'\"';\n\t\t\t\t//$condition['AND']=array('date(Enquiry.posted_date) >='=>$fromdate,'date(Enquiry.posted_date) <='=>$todate);\n\t\t\t\t}\n\t\t\t\telse if(($this->request->query['from_date']!='') and ($this->request->query['to_date']=='')){\n\t\t\t\t\t\n\t\t\t\t$fromdate=trim(date('Y-m-d',strtotime($this->request->query['from_date']))); \n\t\t\t\t//$condition['Enquiry.posted_date']=$fromdate;\t\n\t\t\t\t$condition2.=' and date(AfcHomeVisit.visit_date)=\"'.$fromdate.'\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n }\n else {\n $this->Session->setFlash(__('You Have Not Allocated Village yet'));\n\t\t\t\treturn $this->redirect(array('controller'=>'users','action' => 'welcome'));\n }\n\t //$blocks=$this->Block->find('list',array('conditions'=>array('Block.id'=>$r['Bpccc']['allocated_block'])));\n $panchayats=$this->Panchayat->find('list',array('order' => array('name' => 'asc'),'conditions'=>['Panchayat.id IN'=>explode(',',$r['Bpccc']['allocated_panchayat'])]));\n \t\n\t\t}\n \n elseif(CakeSession::read('User.subrole')==='BPC'){\n\t\t $r = $this->Bpc->find('first',array('conditions'=>array('Bpc.first_name='.CakeSession::read('User.id'))));\n if($r){ \n if(isset($this->request->query['block']) and ($this->request->query['block']!=0) and ($this->request->query['block']!='')){\n $searchBlockId=trim($this->request->query['block']);\n\t\t $condition2.=' and AfcHomeVisit.block='.$searchBlockId;\n\t\t }else {\n \n $condition2.=' and AfcHomeVisit.block IN ('.$r['Bpc']['allocated_block'].')';\n \n }\n if(isset($this->request->query['search_key']) and (trim($this->request->query['search_key'])!='')){ \n\t\t\t$searchKey=trim($this->request->query['search_key']); \n //$condition['OR']=array('Geographical.id LIKE'=>'%'.$searchKey.'%','Geographical.ward LIKE'=>'%'.$searchKey.'%','Geographical.awc_code LIKE'=>'%'.$searchKey.'%','Geographical.awc_worker LIKE '=>'%'.$searchKey.'%','Geographical.asha_name LIKE '=>'%'.$searchKey.'%'); \n\t$condition2.=' and AfcHomeVisit.id LIKE %'.$searchKey.'% || AfcHomeVisit.mobile LIKE %'.$searchKey.'% AfcHomeVisit.couple_name LIKE %'.$searchKey.'% || AfcHomeVisit.gender LIKE %'.$searchKey.'% || AfcHomeVisit.age LIKE %'.$searchKey.'% || AfcHomeVisit.sterilisation_of_month LIKE %'.$searchKey.'%';\n\t\n\t}\n\t\n\t\n\t\n\tif(isset($this->request->query['from_date']) || isset($this->request->query['to_date'])){\n\t\t\t\n\t\t\tif(($this->request->query['from_date']!='') and ($this->request->query['to_date']!=''))\n\t\t\t{\n\t\t\t\t$fromdate=trim(date('Y-m-d',strtotime($this->request->query['from_date'])));\n\t\t\t\t$todate=trim(date('Y-m-d',strtotime($this->request->query['to_date'])));\n\t\t\t\t$condition2.=' and date(AfcHomeVisit.visit_date)>=\"'.$fromdate.'\" and date(AfcHomeVisit.visit_date)<=\"'.$todate.'\"';\n\t\t\t\t//$condition['AND']=array('date(Enquiry.posted_date) >='=>$fromdate,'date(Enquiry.posted_date) <='=>$todate);\n\t\t\t\t}\n\t\t\t\telse if(($this->request->query['from_date']!='') and ($this->request->query['to_date']=='')){\n\t\t\t\t\t\n\t\t\t\t$fromdate=trim(date('Y-m-d',strtotime($this->request->query['from_date']))); \n\t\t\t\t//$condition['Enquiry.posted_date']=$fromdate;\t\n\t\t\t\t$condition2.=' and date(AfcHomeVisit.visit_date)=\"'.$fromdate.'\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n }\n else {\n $this->Session->setFlash(__('You Have Not Allocated Block yet'));\n\t\t\t\treturn $this->redirect(array('controller'=>'users','action' => 'welcome'));\n }\n\t\t //$blocks=$this->Block->find('list',array('order' => array('name' => 'asc'),'conditions'=>array('Block.id IN'=>explode(',',$r['Bpc']['allocated_block']))));\n //$villages=$this->Village->find('list');\n //$panchayats=$this->Panchayat->find('list');\n //$condition2['OR']=array('Ngo.allocated_block_one'=>explode(',',$r['Bpc']['allocated_block']),'Ngo.allocated_block_two'=>explode(',',$r['Bpc']['allocated_block'])); \n //$ngos=$this->Ngo->find('list',array('conditions'=>$condition2));\n \n\t\t}\n \n \n else {\n\t\t $r = $this->Dpo->find('first',array('conditions'=>array('Dpo.first_name='.CakeSession::read('User.id'))));\n if($r){ \n \n if(isset($this->request->query['block']) and ($this->request->query['block']!=0) and ($this->request->query['block']!='')){\n $searchBlockId=trim($this->request->query['block']);\n $condition2.=' and AfcHomeVisit.block='.$searchBlockId;\n\t\t // $condition['VhsncAfc.block']=$searchBlockId;\n\t\t }else {\n //$condition='VhsncAfc.district='.$r['Dpo']['district'];\n $condition2.=' and AfcHomeVisit.district IN ('.$r['Dpo']['district'].')';\n }\n if(isset($this->request->query['search_key']) and (trim($this->request->query['search_key'])!='')){ \n\t\t\t$searchKey=trim($this->request->query['search_key']); \n //$condition['OR']=array('Geographical.id LIKE'=>'%'.$searchKey.'%','Geographical.ward LIKE'=>'%'.$searchKey.'%','Geographical.awc_code LIKE'=>'%'.$searchKey.'%','Geographical.awc_worker LIKE '=>'%'.$searchKey.'%','Geographical.asha_name LIKE '=>'%'.$searchKey.'%'); \n\t$condition2.=' and AfcHomeVisit.id LIKE %'.$searchKey.'% || AfcHomeVisit.mobile LIKE %'.$searchKey.'% AfcHomeVisit.couple_name LIKE %'.$searchKey.'% || AfcHomeVisit.gender LIKE %'.$searchKey.'% || AfcHomeVisit.age LIKE %'.$searchKey.'% || AfcHomeVisit.sterilisation_of_month LIKE %'.$searchKey.'%';\n\t\n\t}\n\t\n\t\n\t\n\tif(isset($this->request->query['from_date']) || isset($this->request->query['to_date'])){\n\t\t\t\n\t\t\tif(($this->request->query['from_date']!='') and ($this->request->query['to_date']!=''))\n\t\t\t{\n\t\t\t\t$fromdate=trim(date('Y-m-d',strtotime($this->request->query['from_date'])));\n\t\t\t\t$todate=trim(date('Y-m-d',strtotime($this->request->query['to_date'])));\n\t\t\t\t$condition2.=' and date(AfcHomeVisit.visit_date)>=\"'.$fromdate.'\" and date(AfcHomeVisit.visit_date)<=\"'.$todate.'\"';\n\t\t\t\t//$condition['AND']=array('date(Enquiry.posted_date) >='=>$fromdate,'date(Enquiry.posted_date) <='=>$todate);\n\t\t\t\t}\n\t\t\t\telse if(($this->request->query['from_date']!='') and ($this->request->query['to_date']=='')){\n\t\t\t\t\t\n\t\t\t\t$fromdate=trim(date('Y-m-d',strtotime($this->request->query['from_date']))); \n\t\t\t\t//$condition['Enquiry.posted_date']=$fromdate;\t\n\t\t\t\t$condition2.=' and date(AfcHomeVisit.visit_date)=\"'.$fromdate.'\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n } \n else {\n $this->Session->setFlash(__('You Have Not Allocated Village yet'));\n\t\t\t\treturn $this->redirect(array('controller'=>'users','action' => 'welcome'));\n }\n\t\t\t//$blocks=$this->Block->find('list',array('order' => array('name' => 'asc'),'conditions'=>array('Block.city_id IN'=>explode(',',$r['Dpo']['district']))));\n //$ngos=$this->Ngo->find('list',array('conditions'=>array('Ngo.allocated_district IN'=>explode(',',$r['Dpo']['district']))));\n \n\t\t}\n }\n\t\telse {\n\t\t\n\t\t}\n\t\t}\n\t\t//$condition['NOT']=array('Enquiry.status'=>\"trash\");\n\t\t$condition2.=' and AfcHomeVisit.status=\"active\"';\n\t\t$this->response->download(\"AfcHomeVisit.csv\");\n\t\t//print_r($condition); exit;\n\t $data=$this->AfcHomeVisit->query('select AfcHomeVisit.id,AfcHomeVisit.visit_date,AfcHomeVisit.asha_accompanied,AfcHomeVisit.aww_accompanied,AfcHomeVisit.pri_accompanied,AfcHomeVisit.shg_accompanied,AfcHomeVisit.couple_name,AfcHomeVisit.age,AfcHomeVisit.gender,AfcHomeVisit.mobile,r1.name as name1,r2.name as name2,r3.name as name3,r4.name as name4,r5.name as name8,c1.name as name5,c2.name as name6,c3.name as name7,AfcHomeVisit.no_of_child,AfcHomeVisit.yonger_child_age,AfcHomeVisit.commodities_regular_supply,AfcHomeVisit.contraceptives_delivery_date,AfcHomeVisit.sterilisation_of_month,AfcHomeVisit.follow_visit_date,City.name,Block.name,Panchayat.name,Village.name,Ward.name,AfcHomeVisit.status from afc_home_visits as AfcHomeVisit left join cities as City on AfcHomeVisit.district=City.id left join blocks as Block on AfcHomeVisit.block=Block.id left join villages as Village on AfcHomeVisit.village=Village.id left join panchayats as Panchayat on AfcHomeVisit.panchayat=Panchayat.id left join wards as Ward on AfcHomeVisit.ward=Ward.id left join reasons r1 on AfcHomeVisit.asha_reason=r1.id left join reasons r2 on AfcHomeVisit.aww_reason=r2.id left join reasons r3 on AfcHomeVisit.pri_reason=r3.id left join reasons r4 on AfcHomeVisit.shg_reason=r4.id left join reasons r5 on AfcHomeVisit.commodities_reason=r5.id left join contraceptives c1 on AfcHomeVisit.current_contraceptives=c1.id left join contraceptives c2 on AfcHomeVisit.beneficiary_couselled=c2.id left join contraceptives c3 on AfcHomeVisit.convinced=c3.id where 1 '.$condition2 );\n\t\t\n\t\t\n\t\t//$data = $this->Geographical->find('all', array('conditions'=>$condition2));\n\t\t\n\t\t//$log = $this->Enquiry->getDataSource()->getLog(false, false);\n //debug($log);\n\t\t//exit;\n\t\t\n $headers = array('AfcHomeVisit'=>array( 'Id' => 'Id','District' => 'District', 'Block' => 'Block','Panchayat' => 'Panchayat','Village'=>'Village','Ward'=>'Ward','Visit Date'=>'Visit Date','Is ASHA Accompanied'=>'Is ASHA Accompanied','ASHA Reason'=>'ASHA Reason','Is AWW Accompanied'=>'Is AWW Accompanied','AWW Reason'=>'AWW Reason ','Is PRI Accompanied'=>'Is PRI Accompanied','PRI Reason'=>'PRI Reason','Is SHG Accompanied'=>'Is SHG Accompanied','SHG Reason'=>'SHG Reason','Name'=>'Name','Age'=>'Age','Gender'=>'Gender','Mobile'=>'Mobile','No of child'=>'No of child','Age of younger child'=>'Age of younger child','Currently using Contraceptives'=>'Currently using Contraceptives','If spacing methods Commodities regular supplied'=>'If spacing methods Commodities regular supplied','Commodities Reason'=>'Commodities Reason','Counselled by AFC to beneficiary'=>'Counselled by AFC to beneficiary','Convinced to Opt'=>'Convinced to Opt','Date for delivery of contraceptives'=>'Date for delivery of contraceptives','Month of Sterilisation'=>'Month of Sterilisation','Follow Visit Date'=>'Follow Visit Date','Status'=>'Status')); \n\t $this->set(compact('data','headers'));\n\t\t$this->layout = 'ajax';\n\t\treturn;\n\t\t\n\t\t}", "public function find();", "public function Search($criteria);", "function create_export_query(&$order_by, &$where)\n\t{\n\t\tglobal $log;\n\t\t$log->debug(\"Entering create_export_query(\".$order_by.\",\". $where.\") method ...\");\n\n\t\tinclude(\"include/utils/ExportUtils.php\");\n\n\t\t//To get the Permitted fields query and the permitted fields list\n\t\t$sql = getPermittedFieldsQuery(\"Notes\", \"detail_view\");\n\t\tglobal $mod_strings;\n\t\tglobal $current_language;\n\t\tif(empty($mod_strings)) {\n\t\t\t$mod_strings = return_module_language($current_language,\"Notes\");\n\t\t}\n\t\t$fields_list = getFieldsListFromQuery($sql,$mod_strings);\n\n\t\t$query = \"SELECT $fields_list FROM ec_notes\n\t\t\t\tLEFT JOIN ec_contactdetails\n\t\t\t\t\tON ec_notes.contact_id=ec_contactdetails.contactid\n\t\t\t\tLEFT JOIN ec_account\n\t\t\t\t\tON ec_notes.accountid=ec_account.accountid\n\t\t\t\tLEFT JOIN ec_users\n\t\t\t\t\tON ec_notes.smownerid = ec_users.id\n\t\t\t\tLEFT JOIN ec_users as ucreator\n\t\t\t\t\tON ec_notes.smcreatorid = ucreator.id\n\t\t\t\tWHERE ec_notes.deleted=0 \".$where;\n\n\t\t$log->debug(\"Exiting create_export_query method ...\");\n return $query;\n }", "public abstract function findAuthorizationBy(array $criteria);", "public function getBy(array $criteria);", "public abstract function find();", "public function run()\n {\n //\n /*\n $newExport = Export::firstOrCreate([\n 'id' => ucwords('E0001'),\n 'is_visible' => true,\n 'is_active' => true,\n 'code' => ucwords('E0001'),\n 'name' => ucwords('E0001'),\n 'display_name' => ucwords('E0001')\n ]);\n */\n /*\n $newExport = Export::firstOrCreate([\n 'id' => ucwords('E0002'),\n 'is_visible' => true,\n 'is_active' => true,\n 'code' => ucwords('E0002'),\n 'name' => ucwords('E0002'),\n 'display_name' => ucwords('E0002')\n ]);\n \n $newExport = Export::firstOrCreate([\n 'id' => ucwords('E0003'),\n 'is_visible' => true,\n 'is_active' => true,\n 'code' => ucwords('E0003'),\n 'name' => ucwords('E0003'),\n 'display_name' => ucwords('E0003')\n ]);\n */\n $newExport = Export::firstOrCreate([\n 'id' => ucwords('0015105663'),\n 'is_visible' => true,\n 'is_active' => true,\n 'code' => ucwords('0015105663'),\n 'name' => ucwords('0015105663'),\n 'display_name' => ucwords('0015105663')\n ]);\n \n $newExport = Export::firstOrCreate([\n 'id' => ucwords('0015105895'),\n 'is_visible' => true,\n 'is_active' => true,\n 'code' => ucwords('0015105895'),\n 'name' => ucwords('0015105895'),\n 'display_name' => ucwords('0015105895')\n ]);\n }", "public function process_portfolio_export() {\n global $CFG;\n\n // Proces export requests.\n $export = optional_param('export', '', PARAM_TAGLIST); // Comma delimited entry ids or -1 for all entries in view\n if ($export and confirm_sesskey()) {\n if (!empty($CFG->enableportfolios)) {\n require_once(\"$CFG->libdir/portfoliolib.php\");\n $exportparams = array(\n 'ca_id' => $this->df->cm->id,\n 'ca_vid' => $this->id,\n 'ca_fid' => $this->filter->id,\n 'ca_eids' => null,\n 'sesskey' => sesskey(),\n 'callbackfile' => '/mod/dataform/locallib.php',\n 'callbackclass' => 'dataform_portfolio_caller',\n 'callerformats' => optional_param('format', 'spreadsheet,richhtml', PARAM_TAGLIST),\n );\n\n redirect(new \\moodle_url('/portfolio/add.php', $exportparams));\n }\n }\n }", "function getExportSQL($params){\n\t// Rule 1: If Team has Trading Region 1,2,3,4 then take the Retail Area value and filter by that\n\t// Rule 2: If Section is Volunteer Fundraising then take the Team and get everybody that matches the team\n\t// Rule 3: If not in Rule 1 and 2 then get Get Section. If Section Blank then get Department\n\t// Rule 4: If manager level 1,2,3 then get Section. If Section blank pull department. If manager Greater than 4 then get department and then carry on.\n\t// Rule 5: If Super User then pull everything\n\t\n\t// OK So we do this.\n\t// Base SQL\n\t// Filter SQL\n\t// Date SQL\n\t\n\t// Base SQL\n\t$baseSQL = \"SELECT * FROM tblnominations\";\n\t\n\t// Test and APPLY Rules\n\t$LoggedIn = getUser($params[\"EmpNum\"]);\n\t$UserTeam = $LoggedIn->Team;\n\t$UserRetailArea = $LoggedIn->RetailArea;\n\t$UserSection = $LoggedIn->Section;\n\t$UserDepartment = $LoggedIn->Department;\n\t$UserGrade = $LoggedIn->Grade;\n\t$UserIsSuper = $LoggedIn->SuperUser;\n\t//Rule 1\n\tif(strtoupper($UserIsSuper) == \"Y\"){\n\t\t$filterSQL = \"SELECT * FROM (\" . $baseSQL . \") AS Temp\";\n\t} else if((strtoupper($UserTeam) == \"TRADING REGION 1\") || (strtoupper($UserTeam) == \"TRADING REGION 2\") ||\n\t\t\t(strtoupper($UserTeam) == \"TRADING REGION 3\") || (strtoupper($UserTeam) == \"TRADING REGION 4\")){\n\t\t\t\t$filterSQL = \"SELECT * FROM (\" . $baseSQL . \") AS Temp WHERE RetailArea = '\" . $UserRetailArea . \"'\";\n\t} else if(strtoupper($UserSection) == \"VOLUNTEER FUNDRAISING\"){\n\t\t$filterSQL = \"SELECT * FROM (\" . $baseSQL . \") AS Temp WHERE Team = '\" . $UserTeam . \"'\";\n\t} else if(Trim($UserSection) != \"\"){\n\t\t$filterSQL = \"SELECT * FROM (\" . $baseSQL . \") AS Temp WHERE Section = '\" . $UserSection . \"'\";\n\t} else if(Trim($UserDepartment) != \"\"){\n\t\t$filterSQL = \"SELECT * FROM (\" . $baseSQL . \") AS Temp WHERE Department = '\" . $UserDepartment . \"'\";\n\t} else if((strtoupper($UserGrade) == \"MANAGER 1\") || (strtoupper($UserGrade) == \"MANAGER 2\") ||\n\t\t\t (strtoupper($UserGrade) == \"MANAGER 3\")){\n\t\tif(Trim($UserSection) != \"\"){\n\t\t\t$filterSQL = \"SELECT * FROM (\" . $baseSQL . \") AS Temp WHERE Section = '\" . $UserSection . \"'\";\n\t\t} else {\n\t\t\t$filterSQL = \"SELECT * FROM (\" . $baseSQL . \") AS Temp WHERE Department = '\" . $UserDepartment . \"'\";\n\t\t}\n\t} else {\n\t\t$filterSQL = \"SELECT * FROM (\" . $baseSQL . \") AS Temp WHERE Department = '\" . $UserDepartment . \"'\";\n\t}\n\t\n\tif(Trim($params[\"FromDate\"]) != \"\"){\n\t\t$NewFromDate = getSQLDate($params[\"FromDate\"]) . ' 00:00:00';\n\t\t$dateSQL = \"SELECT * FROM (\" . $filterSQL . \") AS TDates WHERE NomDate >= '\" . $NewFromDate . \"' \";\n\t\tif(Trim($params[\"ToDate\"]) != \"\"){\n\t\t\t$NewEndDate = getSQLDate($params[\"ToDate\"]) . ' 23:59:59';\n\t\t\t$dateSQL . \" AND NomDate <= '\" . $NewEndDate . \"' \";\n\t\t}\n\t} else {\n\t\t$dateSQL = \"SELECT * FROM (\" . $filterSQL . \") AS TDates WHERE awardType = 1\";\n\t}\n\treturn $dateSQL;\n}", "public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }", "function drush_drushutils_find_callback() {\n $matches = array();\n $match_type = drush_get_option('match');\n\n $args = drush_get_arguments();\n $path_to_find = $args[1];\n\n foreach (module_implements('menu') as $module) {\n $menu_callbacks = module_invoke($module, 'menu');\n if (!empty($menu_callbacks)) {\n foreach ($menu_callbacks as $path => $callback) {\n switch ($match_type) {\n case 'partial':\n if (FALSE !== strpos($path, $path_to_find)) {\n $matches[] = array($module, $path);\n }\n break;\n\n case 'full':\n default:\n if ($path == $path_to_find) {\n $matches[] = array($module, $path);\n continue 2;\n }\n break;\n }\n }\n }\n }\n _drushutils_output_results($matches, $match_type);\n}", "private function internal_filter($results, $desired) {\n global $CFG;\n $required = array();\n $accepted = array();\n $count = 0;\n $return = new StdClass;\n $return->dbnext = 0;\n foreach ($results as $result) {\n $return->dbnext++;\n if (substr($result->plugin, 0, 4) === 'mod_') {\n // Module plugins.\n $module = substr($result->plugin, 4);\n $function = $module . '_ousearch_get_document';\n if (!array_key_exists($module, $required)) {\n require_once($CFG->dirroot . '/mod/' . $module . '/lib.php');\n $required[$module] = true;\n if (!function_exists($function)) {\n throw new coding_exception(\n 'Missing module search support ' . $function,\n 'Module is not searchable. Needs function ' .\n $function .\n '. See local/ousearch/doc/usage.html.');\n }\n }\n } else if (substr($result->plugin, 0, 5) === 'test_') {\n // Testing code, assumed to already be included.\n $function = substr($result->plugin, 5) .\n '_ousearch_get_document';\n } else {\n // Nothing else supported yet.\n throw new coding_exception(\n 'Unsupported search plugin type ' . $result->plugin,\n 'OU search only currently works for modules');\n }\n\n // Let's request the document. Note that the 'document' fields of\n // $result are those used by this function to find the right one.\n $page = $function($result);\n // Ignore if we can't find the document.\n if (!$page) {\n // Output debug warning.\n debugging('Module ' . $result->plugin .\n ' can\\'t find search document, removing from results');\n $searchdoc = new local_ousearch_document();\n $searchdoc->wipe_document($result->id);\n continue;\n }\n\n // Page option can request that this result is not included.\n if (!empty($page->hide)) {\n continue;\n }\n\n // Strip XHTML from content (need this before phrase scan).\n $textcontent = local_ousearch_document::strip_xhtml($page->content);\n\n // Add extra strings to the content after a special don't-show-this\n // marker and with another special marker between each (to prevent\n // phrases).\n if (isset($page->extrastrings) && count($page->extrastrings) > 0) {\n $evilmarker = rand(); // This means people can't do it on purpose.\n $textcontent .= ' xxrealcontentends' . $evilmarker;\n foreach ($page->extrastrings as $string) {\n $textcontent .= ' ' . $string . ' xxsplit' . $evilmarker;\n }\n }\n\n // Do quick phrase scan that doesn't deal with Unicode,\n // or word-splitting but just discards results that\n // don't have the phrase words next to each other without\n // ASCII letters in between. This is intended to discard\n // results that (fairly) definitely don't have the phrase.\n // The further check below will make sure they really do\n // have it according to our standard (slow) word-splitting.\n $quickcheckcontent = $page->title . ' ' . $textcontent;\n $ok = true;\n foreach ($this->terms as $term) {\n if (count($term->words) < 2) {\n continue;\n }\n $gap = '[^A-Za-z0-9]+';\n $pattern = '/(^|' . $gap . ')';\n $first = true;\n foreach ($term->words as $word) {\n if ($first) {\n $first = false;\n } else {\n $pattern .= $gap;\n }\n $pattern .= $word;\n }\n $pattern .= '($|' . $gap . ')/i';\n if (!preg_match($pattern, $quickcheckcontent)) {\n $ok = false;\n break;\n }\n }\n if (!$ok) {\n continue;\n }\n\n // OK, obtain document as linear text.\n list($contentwords, $contentpositions) =\n local_ousearch_document::split_words(\n $textcontent, false, true);\n list($titlewords, $titlepositions) =\n local_ousearch_document::split_words(\n $page->title, false, true);\n\n $allwords = array_merge($titlewords, $contentwords);\n\n // Check it for phrases.\n $positivewords = array();\n $ok = true;\n $dnifound = -1;\n foreach ($this->terms as $term) {\n foreach ($term->words as $word) {\n $positivewords[$word] = true;\n }\n if (count($term->words) < 2) {\n continue;\n }\n $pos = 0;\n $found = false;\n foreach ($allwords as $word) {\n if ($word === $term->words[$pos]) {\n $pos++;\n if ($pos === count($term->words)) {\n $found = true;\n break;\n }\n } else {\n $pos = 0;\n }\n }\n if (!$found) {\n $ok = false;\n break;\n }\n }\n foreach ($this->negativeterms as $term) {\n if (count($term->words) < 2) {\n continue;\n }\n $pos = 0;\n $found = false;\n foreach ($allwords as $word) {\n if ($word === $term->words[$pos]) {\n $pos++;\n if ($pos === count($term->words)) {\n $found = true;\n break;\n }\n } else {\n $pos = 0;\n }\n }\n if ($found) {\n $ok = false;\n break;\n }\n }\n if (!$ok) {\n continue;\n }\n\n // Result passes! Make structure holding it...\n\n // We now have list of all positive words, let's mark these\n // in title and summary.\n $result->title = self::internal_highlight_words(\n $page->title, $titlewords, $titlepositions, $positivewords);\n\n // Strip searchable-but-not-displayable content for summary.\n if (isset($evilmarker)) {\n $strippedwords = array();\n foreach ($contentwords as $word) {\n // Do not include extra strings in summary.\n if ($word === 'xxrealcontentends' . $evilmarker) {\n break;\n }\n $strippedwords[] = $word;\n }\n $contentwords = $strippedwords;\n }\n\n // Pick a section to include in the summary. This algorithm works as follows:\n // * Compute the 'score' (number of highlight words in the previous 20 words\n // up to and including this one) at each position in the text\n // * Observe where the maximum score is reached and where it is lost.\n // * A nice range that contains the most highlight words in the middle of the\n // range will end at ($maxstart + $maxlength/2).\n $highlights = array();\n $pos = 0;\n $currentscore = 0;\n $maxscore = -1;\n $maxstart = 0;\n $maxlength = 0;\n $run = true;\n foreach ($contentwords as $word) {\n if (array_key_exists($pos - self::SUMMARY_LENGTH, $highlights)) {\n unset($highlights[$pos - self::SUMMARY_LENGTH]);\n $currentscore--;\n }\n if (array_key_exists($word, $positivewords)) {\n $highlights[$pos] = true;\n $currentscore++;\n }\n if ($currentscore > $maxscore) {\n $maxscore = $currentscore;\n $maxstart = $pos;\n $maxlength = 1;\n $run = true;\n } else if ($currentscore === $maxscore && $run) {\n $maxlength++;\n } else {\n $run = false;\n }\n $pos++;\n }\n $start = $maxstart + $maxlength / 2 - self::SUMMARY_LENGTH;\n if ($start < 0) {\n $start = 0;\n }\n $end = $start + self::SUMMARY_LENGTH;\n if ($end > count($contentwords)) {\n $end = count($contentwords);\n }\n\n // The $contentpositions is in characters.\n $result->summary = core_text::substr($textcontent,\n $contentpositions[$start],\n $contentpositions[$end] - $contentpositions[$start]) .\n ($end < count($contentwords) ? '...' : '');\n\n $offset = -$contentpositions[$start];\n\n $result->summary = self::internal_highlight_words(\n $result->summary, $contentwords, $contentpositions,\n $positivewords, $offset, $start, $end);\n\n if ($start !== 0) {\n $result->summary = '...' . $result->summary;\n }\n\n $result->summary = trim($result->summary);\n\n $result->activityname = $page->activityname;\n $result->activityurl = $page->activityurl;\n $result->url = $page->url;\n if (isset($page->data)) {\n $result->data = $page->data;\n }\n\n // Do user-specified filter if set.\n if ($this->filter) {\n $filter = $this->filter;\n if (!$filter($result)) {\n continue;\n }\n }\n\n $accepted[] = $result;\n\n $count++;\n if ($count == $desired) {\n break;\n }\n }\n $return->results = $accepted;\n return $return;\n }", "public function createExport();", "public function findContactsBy(array $criteria);", "public function getExportItems($nExportDefId, $nFullDump, $nWithdrawn)\n {\n $aExportItems = array();\n \n $bDrawn = 'f';\n if ($nWithdrawn == 1) {\n $bDrawn = 't';\n }\n \n $query = \"SELECT DISTINCT i.item_id, h.handle\n FROM \n item i,\n dspace2omega d2o,\n ubuaux_exportdef e,\n ubuaux_exportdef2coll e2coll,\n collection col,\n collection2item col2i,\n handle h\n WHERE\n i.withdrawn='$bDrawn'\";\n if ($nWithdrawn != 1) {\n $query .= \" AND i.in_archive='t'\";\n }\n if ($nFullDump != 1) {\n $query .= \" AND i.last_modified >= d2o.last_run \";\n }\n $query .= \" AND i.item_id=h.resource_id \n AND h.resource_type_id=2\n AND i.item_id=col2i.item_id\n AND col2i.collection_id=col.collection_id \n AND col2i.collection_id=e2coll.collection_id \n AND e.exportdef_id=e2coll.exportdef_id \";\n if ($nExportDefId != 0) {\n $query .= \" AND e.exportdef_id=$nExportDefId \";\n }\n $query .= \" ORDER BY i.item_id\";\n \n \n $result = pg_query($this->dbconn, $query);\n \n while ($row = pg_fetch_assoc($result)) {\n $aExportItems[] = $row;\n }\n \n \n pg_free_result($result);\n \n \n return $aExportItems;\n }", "public function assignOrders(Aitoc_Aitexporter_Model_Export $export)\n {\n $deleteSql = ' DELETE FROM `'.$this->getMainTable().'` '.\n ' WHERE export_id = '.$this->_getWriteAdapter()->quote($export->getId()).' ';\n $this->_getWriteAdapter()->query($deleteSql);\n\n $filter = $export->getConfig()->getFilter();\n $auto = $export->getConfig()->getAuto();\n $mainTableAlias = Mage::helper('aitexporter/version')->collectionMainTableAlias();\n\n $exportOrderCollection = Mage::getModel('sales/order')->getCollection();\n /* @var $exportOrderCollection Mage_Sales_Model_Mysql4_Order_Collection */\n $selectSql = $exportOrderCollection->getSelect();\n /* @var $selectSql Varien_Db_Select */\n\n if (!empty($filter['product_id_from']) || !empty($filter['product_id_to']))\n {\n $selectSql->join(array('order_item_table' => $this->getTable('sales/order_item')), \n $mainTableAlias.'.entity_id=order_item_table.order_id', \n array());\n }\n\n if (!empty($filter['product_id_from']))\n {\n $selectSql->where('order_item_table.product_id >= ?', $filter['product_id_from']);\n }\n\n if (!empty($filter['product_id_to']))\n {\n $selectSql->where('order_item_table.product_id <= ?', $filter['product_id_to']);\n }\n\n if ($export->getStoreId())\n {\n $exportOrderCollection->addAttributeToFilter('store_id', $export->getStoreId());\n }\n\n if (!empty($filter['orderstatus']))\n {\n $exportOrderCollection->addAttributeToFilter('status', $filter['orderstatus']);\n }\n \n if (!empty($filter['date_from']))\n {\n $date = new Zend_Date($filter['date_from'], null, Mage::app()->getLocale()->getLocale());\n $exportOrderCollection->addAttributeToFilter('created_at', \n array('gteq' => $date->toString('yyyy-MM-dd HH:mm:ss')));\n }\n\n if (!empty($filter['date_to']))\n {\n $date = new Zend_Date($filter['date_to'], null, Mage::app()->getLocale()->getLocale());\n $exportOrderCollection->addAttributeToFilter('created_at', \n array('lteq' => $date->toString('yyyy-MM-dd HH:mm:ss')));\n }\n\n if (!empty($filter['order_id']))\n {\n $exportOrderCollection->addAttributeToFilter('entity_id', $filter['order_id']);\n }\n\n if (!empty($filter['order_id_from']))\n {\n $orderFrom = Mage::getModel('sales/order')->loadByIncrementId($filter['order_id_from']);\n if ($orderFrom->getId())\n {\n $exportOrderCollection->addAttributeToFilter('entity_id', array('gteq' => $orderFrom->getId()));\n }\n }\n\n if (!empty($filter['order_id_to']))\n {\n $orderTo = Mage::getModel('sales/order')->loadByIncrementId($filter['order_id_to']);\n if ($orderTo->getId())\n {\n $exportOrderCollection->addAttributeToFilter('entity_id', array('lteq' => $orderTo->getId()));\n }\n }\n\n if (!empty($auto['bind_order_id']) && $export->getProfileId()!=0)\n {\n $selectSql->joinLeft(array('aeo' => $this->getTable('aitexporter/export_order')), \n 'aeo.profile_id = '.(int)$export->getProfileId().' AND '.$mainTableAlias.'.entity_id=aeo.order_id', \n array());\n $selectSql->where('aeo.order_id is NULL');\n }\n\n if (!empty($filter['customer_id_from']))\n {\n $exportOrderCollection->addAttributeToFilter('customer_id', array('gteq' => $filter['customer_id_from']));\n }\n\n if (!empty($filter['customer_id_to']))\n {\n $exportOrderCollection->addAttributeToFilter('customer_id', array('lteq' => $filter['customer_id_to']));\n }\n\n $selectSql->setPart(Zend_Db_Select::COLUMNS, array())->columns(array('order_id' => ' DISTINCT('.$mainTableAlias.'.entity_id)', 'export_id' => '('.$export->getId().')', 'profile_id' => '('.(int)$export->getProfileId().')'));\n\n $insertSql = ' INSERT INTO `'.$this->getTable('aitexporter/export_order').'` (order_id, export_id, profile_id) '.$selectSql->assemble().' ';\n\n $this->_getWriteAdapter()->query($insertSql);\n\n return $this;\n }", "public function downloadExcel(Request $request)\n {\n $response = [];\n if (!Gate::allows('project-read') && !Auth::user()->administrator){\n $response['status'] = 'error';\n $response['msg'] = 'No estas autorizado';\n return response()->json($response, 403);\n }\n $offset = $request->input('offset');\n $limit = $request->input('limit');\n $funnel = json_decode($request->input('funnel'), true);\n $records = Project::where($funnel[\"filters\"]);\n $params = [];\n $params['search'] = $funnel[\"search\"];\n if($funnel['search']['value'] != '') {\n if($funnel[\"search\"][\"column\"] == \"all\") {\n $records->where('id', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n $records->orWhere('date', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n $records->orWhere('name', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n $records->orWhere('description', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n $records->orWhere('observations', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n $records->orWhere('liaison_full_name', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n $records->orWhere('liaison_phone', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n $records->orWhere('liaison_email', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n $records->orWhere('amount_budgeted', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n $records->orWhere('advance', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n $records->orWhere('balance', 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n } else {\n $records->where($params[\"search\"][\"column\"], 'LIKE', \"%\".$params[\"search\"][\"value\"].\"%\");\n }\n }\n if($limit != 0) {\n $records = $records->offset($offset)\n ->limit($limit);\n }\n if($funnel[\"sort\"] == '') {\n $records = $records->orderBy('updated_at', 'desc');\n } else {\n $sort = explode('.', $funnel[\"sort\"]);\n $records = $records->orderBy($sort[0], $sort[1]);\n }\n $records = $records->get()\n ->map(function ($record) {\n $states = [];\n if($record->blocked) $states = 'Bloqueado';\n if($record->cancelled) $states = 'Cancelado';\n if($record->done) $states = 'Hecho';\n else $states = '';\n $fields = array\n (\n $record->date,\n $record->name,\n $record->description,\n $record->observations,\n $record->liaison_full_name,\n $record->liaison_phone,\n $record->liaison_email,\n $record->amount_budgeted,\n $record->advance,\n $record->balance,\n $record->created_at,\n $record->updated_at,\n $states\n );\n return $fields;\n });\n #lee el json setting con los datos de configuracion de form\n $path = storage_path() . \"/settings.json\"; // storage/json/setting_form.json\n $json = json_decode(file_get_contents($path), true);\n $forms=array_get($json, 'forms');\n $labels=[];\n foreach($forms as $form){\n if($form['name']==$this->form_name){\n $form_code=$form['code'];\n $form_title=$form['title'];\n foreach($form['fields'] as $field){\n if(isset($field['settings']['visible']) && $field['settings']['visible'] == false ) $visible=false;\n else $visible=true;\n if($visible != false)\n $labels[$field['label']]= $field['label'];\n }\n }\n }\n $labels['created_at']='Creado';\n $labels['update_at']='Actualizado';\n $data = $records->toArray();\n Excel::create(Auth::user()->id, function($excel) use ($data,$labels,$form_title) {\n $excel->sheet(mb_substr($form_title, 0, 30,'utf-8'), function($sheet) use ($data,$labels)\n {\n //$sheet->row(1, $labels);\n $sheet->fromArray($data, null, 'A1', false, false);\n $sheet->prependRow($labels);\n });\n })->store(\"xls\", storage_path('xls_files_tmp'));\n $response = [];\n $response['records'] = $records;\n $b64Doc = base64_encode(file_get_contents(storage_path('/xls_files_tmp/'.Auth::user()->id.'.xls')));\n $response['form']=$this->form_name;\n $response['route']=$b64Doc;\n $response['success'] = true;\n $response['request'] = true;\n return response()->json($response, 200);\n }", "public function get_h5p_exports_list($ids = NULL) {\n global $wpdb;\n\n // Determine where part of SQL\n $where = ($ids ? \"WHERE id IN (\" . implode(',', $ids) . \")\" : '');\n\n // Look up H5P IDs\n $results = $wpdb->get_results(\n \"SELECT hc.id,\n hc.slug\n FROM {$wpdb->prefix}h5p_contents hc\n {$where}\"\n );\n\n // Format output\n $data = array();\n $baseurl = $this->get_h5p_url(true);\n foreach ($results as $h5p) {\n $slug = ($h5p->slug ? $h5p->slug . '-' : '');\n $data[] = array(\n 'id' => $h5p->id,\n 'url' => \"{$baseurl}/exports/{$slug}{$h5p->id}.h5p\"\n );\n }\n return $data;\n }", "public function getCriteria();", "function search() {}", "public function getExportStatsCount($filterBy = []);", "function getExportFiles()\n\t{\n\t\t$dir = $this->getExportDirectory();\n\n\t\t// quit if export dir not available\n\t\tif (!@is_dir($dir) or\n\t\t\t!is_writeable($dir))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// open directory\n\t\t$dir = dir($dir);\n\n\t\t// initialize array\n\t\t$file = array();\n\n\t\t// get files and save the in the array\n\t\twhile ($entry = $dir->read())\n\t\t{\n\t\t\tif ($entry != \".\" and\n\t\t\t\t$entry != \"..\" and\n\t\t\t\tpreg_match(\"/^[0-9]{10}_{2}[0-9]+_{2}([a-z0-9]{3})_usrf\\.[a-z]{1,3}\\$/\", $entry, $matches))\n\t\t\t{\n\t\t\t\t$filearray[\"filename\"] = $entry;\n\t\t\t\t$filearray[\"filesize\"] = filesize($this->getExportDirectory().\"/\".$entry);\n\t\t\t\tarray_push($file, $filearray);\n\t\t\t}\n\t\t}\n\n\t\t// close import directory\n\t\t$dir->close();\n\n\t\t// sort files\n\t\tsort ($file);\n\t\treset ($file);\n\n\t\treturn $file;\n\t}", "public function export(Request $request)\n {\n $type = $request->input('type');\n $search = $request->input('searchvalue');\n \n\n if (empty($search)) {\n $logs = UserLog::join('session', 'userlog.sessionid', '=', 'session.id')\n ->join('action', 'userlog.action', '=', 'action.id')\n ->join('user', 'session.userid', '=', 'user.id')\n ->select('userlog.*', 'session.start', 'session.end', 'action.action_type', 'user.firstname', 'user.lastname', 'user.email')\n ->orderBy('userlog.timestamp', 'desc')\n ->get();\n } else {\n $logs = UserLog::join('session', 'userlog.sessionid', '=', 'session.id')\n ->join('action', 'userlog.action', '=', 'action.id')\n ->join('user', 'session.userid', '=', 'user.id')\n ->select('userlog.*', 'session.start', 'session.end', 'action.action_type', 'user.firstname', 'user.lastname', 'user.email')\n ->where('userlog.id', 'LIKE', \"%{$search}%\")\n ->orWhere('action.action_type', 'LIKE', \"%{$search}%\")\n ->orWhere('user.firstname', 'LIKE', \"%{$search}%\")\n ->orWhere('user.lastname', 'LIKE', \"%{$search}%\")\n ->orWhere('user.email', 'LIKE', \"%{$search}%\")\n ->orderBy('userlog.timestamp', 'desc')\n ->get();\n }\n\n if ($type == 'pdf') {\n \n $pdf = PDF::loadView('admin.logs.pdf', compact('logs'));\n return $pdf->download('userlog.pdf');\n } else { \n\n $headers = array(\n \"Content-type\" => \"text/csv\",\n \"Content-Disposition\" => \"attachment; filename=userlog.csv\",\n \"Pragma\" => \"no-cache\",\n \"Cache-Control\" => \"must-revalidate, post-check=0, pre-check=0\",\n \"Expires\" => \"0\"\n );\n\n $columns = array('Name', 'Email', 'Action', 'Date', 'Time');\n\n $callback = function () use ($logs, $columns) {\n $file = fopen('php://output', 'w');\n fputcsv($file, $columns);\n\n foreach ($logs as $log) {\n fputcsv($file, array($log->firstname.' '.$log->lastname, $log->email, $log->action_type, date('Y-m-d', strtotime($log->timestamp)), date('h:i:s A', strtotime($log->timestamp))));\n }\n fclose($file);\n };\n return Response::stream($callback, 200, $headers);\n }\n }", "function search($db,$page,$per,$status='',$year=0,$month=0,$userid=0)\r\n\t{\r\n//if($condition=='name'){\r\n//$sql.=\" and b.name like '%\".$keys.\"%'\";\r\n//}\r\n\t\t$sql = \"select * from \".AGENT_TOTAL_TABLE.\" where id>0\";\r\n\t\t\tif($status>-1){\r\n\t\t\t\t$sql.=\" and status ='\".$status.\"'\";\r\n\t\t\t}\r\n\t\t\tif($year>0){\r\n\t\t\t\t$sql.=\" and year ='\".$year.\"'\";\r\n\t\t\t}\r\n\t\t\tif($month>0){\r\n\t\t\t\t$sql.=\" and month ='\".$month.\"'\";\r\n\t\t\t}\r\n\t\t\tif($userid>0){\r\n\t\t\t\t$sql.=\" and agent_userid ='\".$userid.\"'\";\r\n\t\t\t}\r\n\t\t$sql.=\" order by id desc\";\r\n//\t\techo $sql;\r\n\t\t$pager = get_pager_data($db, $sql, $page,$per);\r\n\t\treturn $pager;\r\n\t}", "public function findBy(string $collection, array $criteria = [], array $options = []): NoSQLDataSourceResultSet\n {\n $result_set = new NoSQLDataSourceResultSet();\n $this->_getClient($collection);\n\n // Build query string\n $query_string = '';\n foreach($criteria as $key => $value)\n {\n // General search among all fields\n if($key == '*all*')\n $key = '_text_';\n\n if(is_array($value))\n {\n if(strtolower(key($value)) == 'between')\n {\n $query_value = '[' . trim($value['between'][0]) . ' TO ' . trim($value['between'][1]) . ']';\n }\n elseif(strtolower(key($value)) == 'not')\n {\n if(is_array(current($value)))\n {\n $params = current($value);\n $query_value = $params[0] . ' TO ' . $params[1] . ' NOT ' . $params[2];\n }\n else\n {\n $query_value = '* TO * NOT ' . current($value);\n }\n }\n else\n {\n $query_value = '(';\n foreach($value as $value_part)\n {\n $query_value .= $value_part . ' OR ';\n }\n\n $query_value = rtrim($query_value, ' OR ');\n $query_value .= ')';\n }\n }\n else\n {\n $query_value = trim($value);\n }\n\n $query_string .= $key . ':' . $query_value . ' AND ';\n }\n\n $query_string = rtrim($query_string, ' AND ');\n\n $query = $this->client->createSelect()->setQuery($query_string);\n\n // Add sort\n if(!empty($options['sort_by']))\n {\n $query->addSort($options['sort_by'][0], $options['sort_by'][1]);\n }\n\n // Add start and max results\n if(!empty($options['start']))\n {\n $query->setStart($options['start']);\n }\n\n if(!empty($options['max_results']))\n {\n $query->setRows($options['max_results']);\n }\n\n // Get facets\n if(!empty($options['facets']))\n {\n foreach($options['facets'] as $facet)\n {\n $query->getFacetSet()->createFacetField($facet)->setField($facet);\n }\n }\n\n $docs = $this->client->execute($query);\n $result_set->setTotalResultsCount($docs->getNumFound());\n\n if($docs->getNumFound() > 0)\n {\n foreach($docs as $doc)\n {\n $fields = $doc->getFields();\n $formatted_fields = [];\n foreach($fields as $key => $value)\n {\n if($key == '_version_' || $key == 'score')\n continue;\n\n $value = str_replace(',USD', '', $value);\n $formatted_fields[$key] = $value;\n }\n\n $result_set->addResult(new NoSQLDataSourceResult($formatted_fields));\n }\n }\n\n // Get facets\n if(!empty($options['facets']))\n {\n foreach($options['facets'] as $facet)\n {\n $facet_values = $docs->getFacetSet()->getFacet($facet);\n foreach($facet_values as $facet_value => $count)\n {\n if($count < 1)\n {\n continue;\n }\n\n $result_set->addFacet([$facet_value => $count]);\n }\n }\n }\n\n return $result_set;\n }", "function hpp_export_excel($produk_id ,$produk_nama ,$satuan_id ,$satuan_nama ,$stok_saldo ,$option,$filter){\r\n\t\t\t//full query\r\n\t\t\t$sql=\"select * from hpp\";\r\n\t\t\tif($option=='LIST'){\r\n\t\t\t\t$sql .=eregi(\"WHERE\",$sql)? \" AND \":\" WHERE \";\r\n\t\t\t\t$sql .= \" (produk_id LIKE '%\".addslashes($filter).\"%' OR produk_nama LIKE '%\".addslashes($filter).\"%' OR satuan_id LIKE '%\".addslashes($filter).\"%' OR satuan_nama LIKE '%\".addslashes($filter).\"%' OR stok_saldo LIKE '%\".addslashes($filter).\"%' )\";\r\n\t\t\t\t$query = $this->db->query($sql);\r\n\t\t\t} else if($option=='SEARCH'){\r\n\t\t\t\tif($produk_id!=''){\r\n\t\t\t\t\t$sql.=eregi(\"WHERE\",$sql)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$sql.= \" produk_id LIKE '%\".$produk_id.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($produk_nama!=''){\r\n\t\t\t\t\t$sql.=eregi(\"WHERE\",$sql)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$sql.= \" produk_nama LIKE '%\".$produk_nama.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($satuan_id!=''){\r\n\t\t\t\t\t$sql.=eregi(\"WHERE\",$sql)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$sql.= \" satuan_id LIKE '%\".$satuan_id.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($satuan_nama!=''){\r\n\t\t\t\t\t$sql.=eregi(\"WHERE\",$sql)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$sql.= \" satuan_nama LIKE '%\".$satuan_nama.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($stok_saldo!=''){\r\n\t\t\t\t\t$sql.=eregi(\"WHERE\",$sql)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$sql.= \" stok_saldo LIKE '%\".$stok_saldo.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\t$query = $this->db->query($sql);\r\n\t\t\t}\r\n\t\t\treturn $query;\r\n\t\t}", "public function export()\n {\n if (isAdmin()) {\n return (new ContactsExport)->download('contacts_' . now()->toIso8601String() . '.csv');\n }\n abort(404);\n }", "public abstract function findHolderBy(array $criteria);", "public function export()\n {\n set_time_limit(0);\n if (!isset($this->_parameters['behavior_data']['deps'])) {\n $this->addLogWriteln(__('You have not selected items'), $this->output);\n return false;\n }\n $deps = $this->_parameters['behavior_data']['deps'];\n $collections = [];\n $this->addLogWriteln(__('Begin Export'), $this->output);\n $this->addLogWriteln(__('Scope Data'), $this->output);\n foreach ($this->children as $typeName => $type) {\n foreach ($type['fields'] as $name => $values) {\n if (in_array($name, $deps)) {\n $model = $this->createFactory->create($values['collection']);\n $object = [\n 'model' => $model,\n 'main_field' => $values['main_field'],\n 'parent' => $values['parent'],\n 'parent_field' => $values['parent_field'],\n 'children' => []\n ];\n if (!$values['parent'] || empty($deps)) {\n $collections[$name] = $object;\n } else {\n $this->searchChildren($values['parent'], $name, $collections, $object);\n }\n }\n }\n }\n\n if ($this->_parameters['behavior_data']['file_format'] == 'xml') {\n $this->joined = false;\n }\n $writer = $this->getWriter();\n\n foreach ($collections as $key => $collection) {\n $this->runCollection($key, $collection, $writer);\n }\n\n return $writer->getContents();\n }", "public function export( $request, BaseFilter $filter = null ) {\n $search = $request->search;\n $sort = $request->sort;\n $descending = $request->descending;\n\n return $this->crudRepository->export( $this->model, $filter, $search, $sort, $descending );\n }", "public function findWhere(array $conditions);", "private function getExportData()\n {\n $dtoData = $this->getFilters();\n $dtoData['id'] = $this->getIdentifier();\n\n $dtoClass = self::$exportDataMap[$this->lva];\n\n $response = $this->handleQuery($dtoClass::create($dtoData));\n\n return [\n 'licenceVehicles' => $response->getResult(),\n ];\n }", "public function getObjectReaderExportItems($nSelectionLimit)\n {\n $aDebug = array();\n $aExportItems = array();\n \n $aFieldIds = array(\n 'source_alephid' => 127,\n 'id_digitization' => 271,\n 'partofalephid' => 265,\n 'date_issued' => 27,\n 'title' => 143,\n 'partofvolume' => 162,\n 'startpage' => 164,\n 'accessrights' => 161,\n );\n \n $query = 'SELECT DISTINCT \n i.item_id, \n h.handle, \n m1.text_value as aleph, \n r.element, r.qualifier, \n m2.text_value as dateissued, \n m3.text_value as title, \n m4.text_value as volume, \n m5.text_value as startpage,\n m6.text_value as accessrights,\n m7.text_value as digi_id,\n i.withdrawn\n FROM item i\n INNER JOIN dspace2omega_collection d2oc ON i.owning_collection=d2oc.collection_id \n AND d2oc.derivatives=\\'t\\'\n INNER JOIN handle h ON i.item_id=h.resource_id AND h.resource_type_id=2\n INNER JOIN (metadatavalue m1\n INNER JOIN metadatafieldregistry r ON m1.metadata_field_id=r.metadata_field_id)\n ON i.item_id=m1.resource_id AND m1.resource_type_id=2 AND m1.metadata_field_id IN (' .\n $aFieldIds['source_alephid'] . ', ' . $aFieldIds['partofalephid'] . ')';\n $query .= ' LEFT JOIN metadatavalue m2 ON i.item_id=m2.resource_id AND m2.resource_type_id=2 AND m2.metadata_field_id=' . $aFieldIds['date_issued']; \n $query .= ' LEFT JOIN metadatavalue m3 ON i.item_id=m3.resource_id AND m3.resource_type_id=2 AND m3.metadata_field_id=' . $aFieldIds['title'];\n $query .= ' LEFT JOIN metadatavalue m4 ON i.item_id=m4.resource_id AND m4.resource_type_id=2 AND m4.metadata_field_id=' . $aFieldIds['partofvolume'];\n $query .= ' LEFT JOIN metadatavalue m5 ON i.item_id=m5.resource_id AND m5.resource_type_id=2 AND m5.metadata_field_id=' . $aFieldIds['startpage'];\n $query .= ' LEFT JOIN metadatavalue m6 ON i.item_id=m6.resource_id AND m6.resource_type_id=2 AND m6.metadata_field_id=' . $aFieldIds['accessrights'];\n $query .= ' LEFT JOIN metadatavalue m7 ON i.item_id=m7.resource_id AND m7.resource_type_id=2 AND m7.metadata_field_id=' . $aFieldIds['id_digitization'];\n \n $query .= ' WHERE i.in_archive=\\'t\\'';\n \n //if we don't want a result with 20.000 items\n if ($nSelectionLimit != 0) {\n $query .= ' LIMIT ' . $nSelectionLimit;\n }\n \n try {\n $result = pg_query($this->dbconn, $query);\n while ($row = pg_fetch_assoc($result)) {\n $aExportItems[] = $row;\n }\n pg_free_result($result);\n }\n catch (Exception $e) {\n $aDebug['error'] = 'could not get items for the object reader: ' . $e->getMessage();\n return $aDebug;\n }\n \n return $aExportItems;\n }", "public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null);", "function export($type, $records = null, $members = false, $sample = false)\n{\n global $locale;\n global $beanList;\n global $beanFiles;\n global $current_user;\n global $app_strings;\n global $app_list_strings;\n global $timedate;\n global $mod_strings;\n global $current_language;\n $sampleRecordNum = 5;\n\n // Array of fields that should not be exported and are only used for logic\n $remove_from_members = array(\"ea_deleted\", \"ear_deleted\", \"primary_address\");\n\n $focus = BeanFactory::newBean($type);\n $db = DBManagerFactory::getInstance();\n\n if ($records) {\n $where = sprintf(\n \"{$focus->table_name}.id IN (%s)\",\n implode(',', array_map(\n function ($id) use ($db): string {\n return $db->quoted($id);\n },\n $records\n ))\n );\n } elseif (isset($_REQUEST['all'])) {\n $where = '';\n } else {\n $current_post = InputValidation::getService()->getValidInputRequest(\n 'current_post',\n array('Assert\\PhpSerialized' => array('base64Encoded' => true))\n );\n\n if(!empty($current_post)) {\n $ret_array = generateSearchWhere($type, $current_post);\n $where = $ret_array['where'];\n } else {\n $where = '';\n }\n }\n\n if ($focus->bean_implements('ACL')) {\n if (!ACLController::checkAccess($focus->module_dir, 'export', true)) {\n ACLController::displayNoAccess();\n sugar_die('');\n }\n $tba = new TeamBasedACLConfigurator();\n $access = ACLAction::getUserAccessLevel($current_user->id, $focus->module_dir, 'export');\n if (ACLController::requireOwner($focus->module_dir, 'export')) {\n if (!empty($where)) {\n $where .= ' AND ';\n }\n $where .= $focus->getOwnerWhere($current_user->id);\n } elseif ($tba->isValidAccess($access)) {\n $focus->addVisibilityStrategy('TeamBasedACLVisibility');\n }\n }\n\n if ($focus->bean_implements('ACL')) {\n if (!ACLController::checkAccess($focus->module_dir, 'export', true)) {\n ACLController::displayNoAccess();\n sugar_die('');\n }\n $focus->addVisibilityWhere($where, array(\n 'action' => 'list',\n ));\n }\n\n // Export entire list was broken because the where clause already has \"where\" in it\n // and when the query is built, it has a \"where\" as well, so the query was ill-formed.\n // Eliminating the \"where\" here so that the query can be constructed correctly.\n if ($members == true) {\n if (is_array($records)) {\n assert(count($records) === 1);\n $prospectListId = $records[0];\n } else {\n $prospectListId = $records;\n }\n /**\n * @var ProspectList $focus\n */\n $query = $focus->create_export_members_query($prospectListId);\n } else {\n $beginWhere = substr(trim($where), 0, 5);\n if ($beginWhere == \"where\") {\n $where = substr(trim($where), 5, strlen($where));\n }\n\n // get the export query. Note that $focus->fields_to_exclude is a temporary variable and is modified within\n // create_export_query(). $focus->fields_to_exclude will be used later by getExportContentFromResult() to\n // exclude fields from export.\n $focus->fields_to_exclude = array();\n $query = $focus->create_export_query('', $where);\n }\n\n $result = null;\n if ($sample) {\n $result = $db->limitQuery(\n $query,\n 0,\n $sampleRecordNum,\n true,\n $app_strings['ERR_EXPORT_TYPE'] . $type . \": <BR>.\" . $query\n );\n $sample = $focus->_get_num_rows_in_query($query) < 1;\n } else {\n $result = $db->query($query, true, $app_strings['ERR_EXPORT_TYPE'] . $type . \": <BR>.\" . $query);\n }\n\n return getExportContentFromResult($focus, $result, $members, $remove_from_members, $sample);\n}", "public function findBy(array $filters);", "private function filter() {\r\n $globalSearch = array();\r\n $columnSearch = array();\r\n\r\n $columns = $this->resource->setDatatableFields(TRUE);\r\n\r\n $dtColumns = $this->pluck($columns, 'dt');\r\n\r\n if (isset($this->resource->requestData['search']) && $this->resource->requestData['search']['value'] != '') {\r\n\r\n $str = $this->resource->requestData['search']['value'];\r\n\r\n for ($i = 0, $ien = count($this->resource->requestData['columns']); $i < $ien; $i++) {\r\n $requestColumn = $this->resource->requestData['columns'][$i];\r\n $columnIdx = array_search($requestColumn['data'], $dtColumns);\r\n $column = $columns[$columnIdx];\r\n if ($requestColumn['searchable'] == 'true') {\r\n\r\n $binding = '%' . $str . '%';\r\n\r\n if (strpos($column['db'], \".\") !== FALSE) {\r\n\r\n $fld = explode('.', $column['db']);\r\n $globalSearch[] = $this->adapter->platform->quoteIdentifierChain([$fld[0], $fld[1]]) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n } else {\r\n $globalSearch[] = $this->adapter->platform->quoteIdentifier($column['db']) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n }\r\n }\r\n }\r\n }\r\n // Individual column filtering\r\n if (isset($this->resource->requestData['columns'])) {\r\n for ($i = 0, $ien = count($this->resource->requestData['columns']); $i < $ien; $i++) {\r\n $requestColumn = $this->resource->requestData['columns'][$i];\r\n $columnIdx = array_search($requestColumn['data'], $dtColumns);\r\n $column = $columns[$columnIdx];\r\n $str = $requestColumn['search']['value'];\r\n if ($requestColumn['searchable'] == 'true' &&\r\n $str != '') {\r\n\r\n $binding = '%' . $str . '%';\r\n\r\n if (strpos($column['db'], \".\") !== FALSE) {\r\n\r\n $fld = explode('.', $column['db']);\r\n $columnSearch[] = $this->adapter->platform->quoteIdentifierChain([$fld[0], $fld[1]]) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n } else {\r\n $columnSearch[] = $this->adapter->platform->quoteIdentifier($column['db']) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n }\r\n }\r\n }\r\n }\r\n // Combine the filters into a single string\r\n $where = '';\r\n if (count($globalSearch)) {\r\n $where = '(' . implode(' OR ', $globalSearch) . ')';\r\n }\r\n if (count($columnSearch)) {\r\n $where = $where === '' ?\r\n implode(' AND ', $columnSearch) :\r\n $where . ' AND ' . implode(' AND ', $columnSearch);\r\n }\r\n\r\n return $where;\r\n }", "public function getModifiedExportItems($nExportDefId, $sStartDate, $sEndDate = NULL)\n\t{\n\t $aExportItems = array();\n \n $query = \"SELECT DISTINCT i.item_id\n FROM \n item i,\n ubuaux_exportdef e,\n ubuaux_exportdef2coll e2coll,\n collection col,\n collection2item col2i\n WHERE\n i.withdrawn='f'\n\t AND i.item_id=col2i.item_id\n AND col2i.collection_id=col.collection_id \n AND col2i.collection_id=e2coll.collection_id \n AND e.exportdef_id=e2coll.exportdef_id \n\t\t\t\t\tAND e.exportdef_id=$nExportDefId \n\t\t\t\t\tAND i.last_modified > to_timestamp('$sStartDate', 'YYYY-MM-DD')\";\n\t\t\t\tif ($sEndDate != NULL) {\n\t\t\t\t\t$query .= \" AND i.last_modified < to_timestamp('$sEndDate', 'YYYY-MM-DD')\";\n\t\t\t\t}\n \n //echo $query; \n $result = pg_query($this->dbconn, $query);\n \n while ($row = pg_fetch_assoc($result)) {\n $aExportItems[] = $row;\n }\n return $aExportItems;\t\n\t}", "function opdsSearchDescriptor()\n{\n global $app;\n\n $gen = mkOpdsGenerator($app);\n $cat = $gen->searchDescriptor(null, '/opds/searchlist/0/');\n mkOpdsResponse($app, $cat, OpdsGenerator::OPENSEARCH_MIME);\n}", "public function findPostcardsBy(array $criteria)\n\t{\n\t\treturn $this->repository->findBy($criteria);\n\t}", "public function findModules(Expression $expr);", "public function export() {\n\t\t$options['conditions'] = $this->_buildQueryString();\n\t\t$options['fields'] = [\n\t\t\t'Business.id',\n\t\t\t'Business.firm',\n\t\t\t'Business.business',\n\t\t\t'Business.phone_one',\n\t\t\t'Business.phone_two',\n\t\t\t'State.name',\n\t\t\t'City.name',\n\t\t\t'Business.address',\n\t\t\t'Taxoffice.name',\n\t\t\t'Business.afm',\n\t\t];\n\t\t$this->Business->recursive = 0;\n\t\t$data = $this->Business->find('all', $options);\n\t\t$this->Csv->export($data);\n\t}", "function findAuthSpaceBy(array $criteria);", "public function index(Request $request, $page = 1)\n {\n // Array to compose the where statement to export to csv\n $csv_export_where_statement = [];\n\n // Get filters\n $partNumber = $request->input('part_num', '');\n $startDate = $request->input('start_date', '');\n $endDate = $request->input('end_date', '');\n $dateType = $request->input('date_type', 'None');\n $manufacturers = $request->input('manufacturer', '');\n $manufacturerFilterType = $request->input('manufacturer_filter_type', 1);\n\n $isComplete = $request->input('is_complete', '');\n $origin = $request->input('origin', '');\n $isExportRequest = $request->input('export', '');\n\n // Assign default where statement\n $where_statement = [];\n\n // Add part number\n if ($partNumber != \"\") {\n $where_statement[] = \" part_number LIKE \\\"%$partNumber%\\\" \";\n }\n\n // Add 'created_at' date filters, if passed\n if ($dateType != 'None') {\n $date_field = ($dateType == \"Date Created\") ? \"created_at\":\"updated_at\";\n\n // where statement to filter the export to CSV\n // improve this, only created_at or updated_at can be passed to the sql query not both\n $where_statement[] = \" ($date_field BETWEEN '$startDate' AND '$endDate') \";\n }\n\n // Add 'is_complete' filter, if passed\n if ($isComplete != '') {\n $where_statement[] = \" is_complete = $isComplete \";\n }\n\n // Add 'is_complete' filter, if passed\n if ($origin != '') {\n $where_statement[] = \" origin = $origin \";\n }\n\n // Add manufacturer\n if ($manufacturers != '') {\n // If more than one manufacturer were passed format the string\n if (is_array($manufacturers)) {\n $manufacturers_string = \"'\" . implode(\"','\", $manufacturers) . \"'\";\n } else {\n $manufacturers_string = \"'$manufacturers'\";\n }\n\n // Check if (1) exclude these or (2) only these\n $in_string = ($manufacturerFilterType == 1) ? \" NOT IN \" : \" IN \";\n $where_statement[] = \" manufacturer $in_string ($manufacturers_string) \";\n }\n\n // Export query to CSV file, if prompted\n if ($isExportRequest) {\n $csvEporter = new MysqlCSVExporter();\n $path_to_download_file = $csvEporter->getParts($where_statement);\n\n return response()->download($path_to_download_file);\n }\n\n\n // Fetch parts for view\n $string_where = implode(\" AND \", $where_statement);\n error_log(\"DEBUG WHERE : $string_where\");\n\n // Get total\n $total = Part::count();\n\n // Get results if any\n if(count($where_statement) > 0 ) {\n $parts = Part::whereRaw($string_where)->orderBy('id')->paginate(10);\n $result = $parts->appends($request->except('page'));\n } else {\n $result = Part::whereRaw(\"id = 0\")->paginate(10);\n }\n\n // Get metadata for origin\n $origin_metadata = MetadataOrigin::all();\n\n // Render view\n return view('admin.parts', [\n 'result' => $result,\n 'origin_metadata' => $origin_metadata,\n 'total' => $total\n ]);\n }", "public function enableExports()\n {\n /** @var Connection $dbal */\n $dbal = Shopware()->Container()->get('dbal_connection');\n $dump = <<<'SQL'\nINSERT INTO s_export VALUES (4711,'csv','2000-01-01 00:00:00',1,'4ebfa063359a73c356913df45b3fbe7f',1,0,'2017-02-27 14:10:18',0,1,'2017-02-27 14:10:18','export.csv',2,NULL,1,1,'',NULL,0,0,0,0,0,'','{strip}id{#S#}title{#S#}url{#S#}image{#S#}price{#S#}versand{#S#}währung {/strip}{#L#}','{strip}\\n{$sArticle.ordernumber|escape}{#S#}\\n{$sArticle.name|strip_tags|strip|truncate:80:\\\"...\\\":true|escape|htmlentities}{#S#}\\n{$sArticle.articleID|link:$sArticle.name|escape}{#S#}\\n{$sArticle.image|image:2}{#S#}\\n{$sArticle.price|escape:\\\"number\\\"}{#S#}\\nDE::DHL:{$sArticle|@shippingcost:\\\"prepayment\\\":\\\"de\\\"}{#S#}\\n{$sCurrency.currency}\\n{/strip}{#L#}','',0,1,1,'2000-01-01 00:00:00',0),(4712,'txt tab','2000-01-01 00:00:00',1,'4ebfa063359a73c356913df45b3fbe7f',1,0,'2017-02-27 14:10:18',0,2,'2017-02-27 14:10:18','export.txt',2,NULL,1,1,'',NULL,0,0,0,0,0,'','{strip}id{#S#}title{#S#}url{#S#}image{#S#}price{#S#}versand{#S#}währung{/strip}{#L#}','{strip}\\n{$sArticle.ordernumber|escape}{#S#}\\n{$sArticle.name|strip_tags|strip|truncate:80:\"...\":true|escape|htmlentities}{#S#}\\n{$sArticle.articleID|link:$sArticle.name|escape}{#S#}\\n{$sArticle.image|image:2}{#S#}\\n{$sArticle.price|escape:\"number\"}{#S#}\\nDE::DHL:{$sArticle|@shippingcost:\"prepayment\":\"de\"}{#S#}\\n{$sCurrency.currency}\\n{/strip}{#L#}','',0,1,1,'2000-01-01 00:00:00',0),(4713,'xml','2000-01-01 00:00:00',1,'4ebfa063359a73c356913df45b3fbe7f',1,0,'2000-01-01 00:00:00',0,3,'0000-00-00 00:00:00','export.xml',2,NULL,1,1,'',NULL,0,0,0,0,0,'','<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\\n<channel>\\n <atom:link href=\"http://{$sConfig.sBASEPATH}/engine/connectors/export/{$sSettings.id}/{$sSettings.hash}/{$sSettings.filename}\" rel=\"self\" type=\"application/rss+xml\" />\\n <title>{$sConfig.sSHOPNAME}</title>\\n<link>http://{$sConfig.sBASEPATH}</link>\\n <language>{$sLanguage.isocode}-{$sLanguage.isocode}</language>\\n <image>\\n <url>http://{$sConfig.sBASEPATH}/templates/0/de/media/img/default/store/logo.gif</url>\\n <title>{$sConfig.sSHOPNAME}</title>\\n <link>http://{$sConfig.sBASEPATH}</link>\\n </image>{#L#}','<item> \\n <title>{$sArticle.name|strip_tags|htmlspecialchars_decode|strip|escape}</title>\\n <id>{$sArticle.ordernumber|escape}</id>\\n <url>{$sArticle.articleID|link:$sArticle.name}</url>\\n <description>{if $sArticle.image}\\n <a href=\"{$sArticle.articleID|link:$sArticle.name}\" style=\"border:0 none;\">\\n <img src=\"{$sArticle.image|image:0}\" align=\"right\" style=\"padding: 0pt 0pt 12px 12px; float: right;\" />\\n </a>\\n{/if}\\n {$sArticle.description_long|strip_tags|regex_replace:\"/[^\\\\wöäüÖÄÜß .?!,&:%;\\\\-\\\\\"\\']/i\":\"\"|trim|truncate:900:\"...\"|escape}\\n </description>\\n <image>{$sArticle.image|image:2}</image>\\n <price>{$sArticle.price|escape:\"number\"}</price><category>{$sArticle.articleID|category:\">\"|htmlspecialchars_decode|escape}</category>\\n{if $sArticle.changed} {assign var=\"sArticleChanged\" value=$sArticle.changed|strtotime}<pubDate>{\"r\"|date:$sArticleChanged}</pubDate>{\"rn\"}{/if}\\n</item>{#L#}','</channel>\\n</rss>',0,1,1,'2000-01-01 00:00:00',0),(4714,'txt pipe','2000-01-01 00:00:00',1,'4ebfa063359a73c356913df45b3fbe7f',1,0,'2017-02-27 14:10:18',0,4,'2017-02-27 14:10:18','export.txt',2,NULL,1,1,'',NULL,0,0,0,0,0,'','{strip}id{#S#}title{#S#}url{#S#}image{#S#}price{#S#}versand{#S#}währung{/strip}{#L#}','{strip}\\n{$sArticle.ordernumber|escape}{#S#}\\n{$sArticle.name|strip_tags|strip|truncate:80:\"...\":true|escape|htmlentities}{#S#}\\n{$sArticle.articleID|link:$sArticle.name|escape}{#S#}\\n{$sArticle.image|image:2}{#S#}\\n{$sArticle.price|escape:\"number\"}{#S#}\\nDE::DHL:{$sArticle|@shippingcost:\"prepayment\":\"de\"}{#S#}\\n{$sCurrency.currency}\\n{/strip}{#L#}','',0,1,1,'2000-01-01 00:00:00',0)\nSQL;\n\n $dbal->exec($dump);\n }", "function exportFromApi($args, $sample = false)\n{\n global $current_user;\n global $app_strings;\n $sampleRecordNum = 5;\n\n $type = clean_string($args['module']);\n\n $recordList = RecordListFactory::getRecordList($args['record_list_id']);\n if (empty($recordList)) {\n throw new SugarApiExceptionNotFound();\n }\n $records = $recordList['records'];\n\n $members = isset($args['members']) ? $args['members'] : false;\n\n //Array of fields that should not be exported, and are only used for logic\n $remove_from_members = array(\"ea_deleted\", \"ear_deleted\", \"primary_address\");\n\n $focus = BeanFactory::newBean($type);\n $db = DBManagerFactory::getInstance();\n\n if ($records) {\n $where = sprintf(\n \"{$focus->table_name}.id IN (%s)\",\n implode(',', array_map([$db, 'quoted'], is_array($records) ? $records : [$records]))\n );\n } elseif (isset($args['all'])) {\n $where = '';\n } else {\n // use filter to get data instead of building a sql\n if (!empty($args['filter'])) {\n $content = getExportContentFromFilter($args, $remove_from_members, $focus, $members);\n return $content;\n } else {\n $where = '';\n }\n }\n\n if ($focus->bean_implements('ACL')) {\n $tba = new TeamBasedACLConfigurator();\n $access = ACLAction::getUserAccessLevel($current_user->id, $focus->module_dir, 'export');\n if (ACLController::requireOwner($focus->module_dir, 'export')) {\n if (!empty($where)) {\n $where .= ' AND ';\n }\n $where .= $focus->getOwnerWhere($current_user->id);\n } elseif ($tba->isValidAccess($access)) {\n $focus->addVisibilityStrategy('TeamBasedACLVisibility');\n }\n }\n\n\n if ($focus->bean_implements('ACL')) {\n $focus->addVisibilityWhere($where, array(\n 'action' => 'list',\n ));\n }\n\n // Export entire list was broken because the where clause already has \"where\" in it\n // and when the query is built, it has a \"where\" as well, so the query was ill-formed.\n // Eliminating the \"where\" here so that the query can be constructed correctly.\n if ($members == true) {\n if (is_array($records)) {\n assert(count($records) === 1);\n $prospectListId = $records[0];\n } else {\n $prospectListId = $records;\n }\n /**\n * @var ProspectList $focus\n */\n $query = $focus->create_export_members_query($prospectListId);\n } else {\n $beginWhere = substr(trim($where), 0, 5);\n if ($beginWhere == \"where\") {\n $where = substr(trim($where), 5, strlen($where));\n }\n\n $query = $focus->create_export_query(\"\", $where);\n }\n\n $result = null;\n if ($sample) {\n $result = $db->limitQuery(\n $query,\n 0,\n $sampleRecordNum,\n true,\n $app_strings['ERR_EXPORT_TYPE'] . $type . \": <BR>.\" . $query\n );\n $sample = $focus->_get_num_rows_in_query($query) < 1;\n } else {\n $result = $db->query($query, true, $app_strings['ERR_EXPORT_TYPE'].$type.\": <BR>.\".$query);\n }\n\n $tagBean = BeanFactory::newBean(\"Tags\");\n $relTags = $tagBean->getRelatedModuleRecords($focus, $records);\n if (isset($relTags)) {\n $options['relTags'] = $relTags;\n }\n\n $content = getExportContentFromResult($focus, $result, $members, $remove_from_members, $sample, $options);\n return $content;\n}", "public function export() { \n\t\t$type = $this->uri->segment ( 4 );\n\n\t\t$uri_array = $this->uri->uri_to_assoc ( 3, array (\n\t\t\t\t'export' \n\t\t) );\n\n\t\t// Export selected data\n\t\tif (($uri_array ['export'] == 'csv') || ($uri_array ['export'] == 'xls') && $type == \"user\") {\n\t\t\t$this->export_user ( $uri_array, $uri_array ['export'] );\n\t\t}\n\t\t\n\t}", "function bank_export_excel($bank_id ,$bank_kode ,$bank_nama ,$bank_norek ,$bank_atasnama ,$bank_saldo ,$bank_keterangan ,$bank_aktif ,$bank_creator ,$bank_date_create ,$bank_update ,$bank_date_update ,$bank_revised ,$option,$filter){\r\n\t\t\t//full query\r\n\t\t\t$query=\"select bank_master.mbank_nama AS nama_bank,\r\n\t\t\t\t\t\t\tbank.bank_norek AS no_rekening,\r\n\t\t\t\t\t\t\tbank.bank_atasnama AS atas_nama,\r\n\t\t\t\t\t\t\tbank.bank_saldo AS 'Saldo_(Rp)',\r\n\t\t\t\t\t\t\tbank.bank_aktif AS aktif\r\n\t\t\t\t\t\tFROM bank\r\n\t\t\t\t\t\tInner Join bank_master ON bank.bank_nama = bank_master.mbank_id\";\r\n\t\t\tif($option=='LIST'){\r\n\t\t\t\t$query .=eregi(\"WHERE\",$query)? \" AND \":\" WHERE \";\r\n\t\t\t\t$query .= \" (bank_id LIKE '%\".addslashes($filter).\"%' OR bank_kode LIKE '%\".addslashes($filter).\"%' OR bank_nama LIKE '%\".addslashes($filter).\"%' OR bank_norek LIKE '%\".addslashes($filter).\"%' OR bank_atasnama LIKE '%\".addslashes($filter).\"%' OR bank_saldo LIKE '%\".addslashes($filter).\"%' OR bank_keterangan LIKE '%\".addslashes($filter).\"%' OR bank_aktif LIKE '%\".addslashes($filter).\"%' OR bank_creator LIKE '%\".addslashes($filter).\"%' OR bank_date_create LIKE '%\".addslashes($filter).\"%' OR bank_update LIKE '%\".addslashes($filter).\"%' OR bank_date_update LIKE '%\".addslashes($filter).\"%' OR bank_revised LIKE '%\".addslashes($filter).\"%' )\";\r\n\t\t\t\t$result = $this->db->query($query);\r\n\t\t\t} else if($option=='SEARCH'){\r\n\t\t\t\tif($bank_id!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_id LIKE '%\".$bank_id.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_kode!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_kode LIKE '%\".$bank_kode.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_nama!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_nama LIKE '%\".$bank_nama.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_norek!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_norek LIKE '%\".$bank_norek.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_atasnama!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_atasnama LIKE '%\".$bank_atasnama.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_saldo!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_saldo LIKE '%\".$bank_saldo.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_keterangan!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_keterangan LIKE '%\".$bank_keterangan.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_aktif!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_aktif LIKE '%\".$bank_aktif.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_creator!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_creator LIKE '%\".$bank_creator.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_date_create!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_date_create LIKE '%\".$bank_date_create.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_update!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_update LIKE '%\".$bank_update.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_date_update!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_date_update LIKE '%\".$bank_date_update.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\tif($bank_revised!=''){\r\n\t\t\t\t\t$query.=eregi(\"WHERE\",$query)?\" AND \":\" WHERE \";\r\n\t\t\t\t\t$query.= \" bank_revised LIKE '%\".$bank_revised.\"%'\";\r\n\t\t\t\t};\r\n\t\t\t\t$result = $this->db->query($query);\r\n\t\t\t}\r\n\t\t\treturn $result;\r\n\t\t}", "public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND', $showAlreadyExportMovements = 1)\n {\n\t\tglobal $conf;\n\n\t\tdol_syslog(__METHOD__, LOG_DEBUG);\n\n\t\t$sql = 'SELECT';\n\t\t$sql .= ' t.rowid,';\n\t\t$sql .= \" t.doc_date,\";\n\t\t$sql .= \" t.doc_type,\";\n\t\t$sql .= \" t.doc_ref,\";\n\t\t$sql .= \" t.fk_doc,\";\n\t\t$sql .= \" t.fk_docdet,\";\n\t\t$sql .= \" t.thirdparty_code,\";\n\t\t$sql .= \" t.subledger_account,\";\n\t\t$sql .= \" t.subledger_label,\";\n\t\t$sql .= \" t.numero_compte,\";\n\t\t$sql .= \" t.label_compte,\";\n\t\t$sql .= \" t.label_operation,\";\n\t\t$sql .= \" t.debit,\";\n\t\t$sql .= \" t.credit,\";\n\t\t$sql .= \" t.lettering_code,\";\n\t\t$sql .= \" t.montant,\";\n\t\t$sql .= \" t.sens,\";\n\t\t$sql .= \" t.fk_user_author,\";\n\t\t$sql .= \" t.import_key,\";\n\t\t$sql .= \" t.code_journal,\";\n\t\t$sql .= \" t.journal_label,\";\n\t\t$sql .= \" t.piece_num,\";\n\t\t$sql .= \" t.date_creation,\";\n\t\t$sql .= \" t.tms as date_modification,\";\n $sql .= \" t.date_export\";\n\t\t$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';\n\t\t// Manage filter\n\t\t$sqlwhere = array ();\n\t\tif (count($filter) > 0) {\n\t\t\tforeach ($filter as $key => $value) {\n\t\t\t\tif ($key == 't.doc_date') {\n\t\t\t\t\t$sqlwhere[] = $key . '=\\'' . $this->db->idate($value) . '\\'';\n\t\t\t\t} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {\n\t\t\t\t\t$sqlwhere[] = $key . '\\'' . $this->db->idate($value) . '\\'';\n\t\t\t\t} elseif ($key == 't.numero_compte>=' || $key == 't.numero_compte<=' || $key == 't.subledger_account>=' || $key == 't.subledger_account<=') {\n\t\t\t\t\t$sqlwhere[] = $key . '\\'' . $this->db->escape($value) . '\\'';\n\t\t\t\t} elseif ($key == 't.fk_doc' || $key == 't.fk_docdet' || $key == 't.piece_num') {\n\t\t\t\t\t$sqlwhere[] = $key . '=' . $value;\n\t\t\t\t} elseif ($key == 't.subledger_account' || $key == 't.numero_compte') {\n\t\t\t\t\t$sqlwhere[] = $key . ' LIKE \\'' . $this->db->escape($value) . '%\\'';\n\t\t\t\t} elseif ($key == 't.date_creation>=' || $key == 't.date_creation<=') {\n\t\t\t\t\t$sqlwhere[] = $key . '\\'' . $this->db->idate($value) . '\\'';\n\t\t\t\t} elseif ($key == 't.tms>=' || $key == 't.tms<=') {\n\t\t\t\t\t$sqlwhere[] = $key . '\\'' . $this->db->idate($value) . '\\'';\n } elseif ($key == 't.date_export>=' || $key == 't.date_export<=') {\n $sqlwhere[] = $key . '\\'' . $this->db->idate($value) . '\\'';\n\t\t\t\t} elseif ($key == 't.credit' || $key == 't.debit') {\n\t\t\t\t\t$sqlwhere[] = natural_search($key, $value, 1, 1);\n\t\t\t\t} else {\n\t\t\t\t\t$sqlwhere[] = natural_search($key, $value, 0, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$sql.= ' WHERE t.entity IN (' . getEntity('accountancy') . ')';\n if ($showAlreadyExportMovements == 0) {\n $sql .= \" AND t.date_export IS NULL\";\n }\n\t\tif (count($sqlwhere) > 0) {\n\t\t\t$sql .= ' AND ' . implode(' ' . $filtermode . ' ', $sqlwhere);\n\t\t}\n\t\tif (! empty($sortfield)) {\n\t\t\t$sql .= $this->db->order($sortfield, $sortorder);\n\t\t}\n\t\tif (! empty($limit)) {\n\t\t\t$sql .= ' ' . $this->db->plimit($limit + 1, $offset);\n\t\t}\n\t\t$this->lines = array();\n\n\t\t$resql = $this->db->query($sql);\n\t\tif ($resql) {\n\t\t\t$num = $this->db->num_rows($resql);\n\n\t\t\t$i = 0;\n\t\t\twhile (($obj = $this->db->fetch_object($resql)) && (empty($limit) || $i < min($limit, $num)))\n\t\t\t{\n\t\t\t\t$line = new BookKeepingLine();\n\n\t\t\t\t$line->id = $obj->rowid;\n\n\t\t\t\t$line->doc_date = $this->db->jdate($obj->doc_date);\n\t\t\t\t$line->doc_type = $obj->doc_type;\n\t\t\t\t$line->doc_ref = $obj->doc_ref;\n\t\t\t\t$line->fk_doc = $obj->fk_doc;\n\t\t\t\t$line->fk_docdet = $obj->fk_docdet;\n\t\t\t\t$line->thirdparty_code = $obj->thirdparty_code;\n\t\t\t\t$line->subledger_account = $obj->subledger_account;\n\t\t\t\t$line->subledger_label = $obj->subledger_label;\n\t\t\t\t$line->numero_compte = $obj->numero_compte;\n\t\t\t\t$line->label_compte = $obj->label_compte;\n\t\t\t\t$line->label_operation = $obj->label_operation;\n\t\t\t\t$line->debit = $obj->debit;\n\t\t\t\t$line->credit = $obj->credit;\n\t\t\t\t$line->montant = $obj->montant;\n\t\t\t\t$line->sens = $obj->sens;\n\t\t\t\t$line->lettering_code = $obj->lettering_code;\n\t\t\t\t$line->fk_user_author = $obj->fk_user_author;\n\t\t\t\t$line->import_key = $obj->import_key;\n\t\t\t\t$line->code_journal = $obj->code_journal;\n\t\t\t\t$line->journal_label = $obj->journal_label;\n\t\t\t\t$line->piece_num = $obj->piece_num;\n\t\t\t\t$line->date_creation = $this->db->jdate($obj->date_creation);\n\t\t\t\t$line->date_modification = $this->db->jdate($obj->date_modification);\n $line->date_export = $this->db->jdate($obj->date_export);\n\n\t\t\t\t$this->lines[] = $line;\n\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$this->db->free($resql);\n\n\t\t\treturn $num;\n\t\t} else {\n\t\t\t$this->errors[] = 'Error ' . $this->db->lasterror();\n\t\t\tdol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);\n\t\t\treturn -1;\n\t\t}\n\t}", "public function search();", "public function search();", "public function export_entries()\n {\n }", "public function filter_orders_by_export_status_query( $vars ) {\n\t\tglobal $typenow;\n\n\t\tif ( 'shop_order' === $typenow && isset( $_GET['_shop_order_csv_export_status'] ) && is_numeric( $_GET['_shop_order_csv_export_status'] ) ) {\n\n\t\t\t$vars['meta_key'] = '_wc_customer_order_csv_export_is_exported';\n\t\t\t$vars['meta_value'] = (int) $_GET['_shop_order_csv_export_status'];\n\t\t}\n\n\t\treturn $vars;\n\t}", "public function matching(Criteria $criteria);", "public function listRepositoriesWithCriteria($criteria){\n\n }", "public function export();", "public function export();", "public function export();", "public function export();", "public function export();", "public function disableExports()\n {\n /** @var Connection $dbal */\n $dbal = Shopware()->Container()->get('dbal_connection');\n $dbal->exec('DELETE FROM s_export WHERE id in (4711, 4712, 4713, 4714)');\n }", "public function getArticlesByCriteria($criteria,$value)\n {\n if($criteria==\"date\")\n {\n $year=$value ;\n $query = $this->getEntityManager()\n ->createQuery(\n 'SELECT a,i,v, p, k FROM IJVRPublishBundle:Article a\n JOIN a.issue i \n JOIN i.volume v\n JOIN a.pdf p\n LEFT JOIN a.keywords k\n WHERE a.'.$criteria.' BETWEEN \\''.$year.'/01/01\\' AND \\''.$year.'/12/31\\' ');\n $result=$query->getArrayResult();;\n return $result ;\n } \n else if($criteria==\"issueTitle\")\n {\n $query = $this->getEntityManager()\n ->createQuery(\n 'SELECT a,i,v, p, k FROM IJVRPublishBundle:Article a\n JOIN a.issue i \n JOIN i.volume v\n JOIN a.pdf p\n LEFT JOIN a.keywords k\n WHERE i.title like :value' \n )->setParameter('value', '%'.$value.'%');\n $result= $query->getArrayResult();; \n return $result ;\n }\n else\n {\n $query = $this->getEntityManager()\n ->createQuery(\n 'SELECT a,i,v, p, k FROM IJVRPublishBundle:Article a\n JOIN a.issue i \n JOIN i.volume v\n JOIN a.pdf p\n LEFT JOIN a.keywords k\n WHERE a.'.$criteria.' like :value' \n )->setParameter('value', '%'.$value.'%');\n $result= $query->getArrayResult();;\n return $result ;\n }\n }", "function exportUsers()\n {\n //get all users in the given range, return array of user data.\n geoAdmin::m('Fake export run, all users exported from local to bridge.', geoAdmin::NOTICE);\n return true;\n }", "public function find(array $where);", "function searchAllByCriteria($db,$criteria,$search)\n{\n $request = \"SELECT game.name game_name,game.year game_year,game.note game_note,categorie.content categorie_name,editor.name editor_name FROM game,categorie,game_editor,editor WHERE game.id_categorie = categorie.id AND game.id = game_editor.id_game AND editor.id = game_editor.id_editor AND $criteria = $search ORDER BY game.name ASC\";\n return mysqli_query($db,$request);\n}", "public function findFiles();", "public function export(Request $request){\n $request->query->add('export', 'csv');\n $books = $this->bookService->filters($request);\n\n return $this->bookService->export($books);\n }", "function export_all_ris ($risfilename, $issn = '')\n{\n\tglobal $db;\n\t\n\t$risfile = @fopen($risfilename, \"w+\") or die(\"could't open file --\\\"$risfilename\\\"\");\n\t\n\t// For now we work on exact matches, could improve this\t\n\t$sql = 'SELECT id FROM article_cache\n\t\tWHERE (created <= NOW())\n\t\tAND (modified > NOW())';\t\n\t\n\tif ($issn != '')\n\t{\n\t\t$sql .= ' AND (issn=' . $db->qstr($issn) . ')';\n\t}\n\t\n\t$result = $db->Execute($sql);\n\tif ($result == false) die(\"failed [\" . __LINE__ . \"]: \" . $sql);\n\t\n\twhile (!$result->EOF) \n\t{\n\t\t@fwrite($risfile, export_ris($result->fields['id']) );\t\n\t\t$result->MoveNext();\t\t\t\t\n\t}\n\n\tfclose($risfile);\n\t\n}" ]
[ "0.7646258", "0.7147872", "0.65679437", "0.5858146", "0.57543933", "0.56303215", "0.5605202", "0.5394735", "0.5341211", "0.5279045", "0.52526855", "0.5186721", "0.5128331", "0.50866055", "0.50866055", "0.5031576", "0.49931377", "0.4989581", "0.49732548", "0.49572775", "0.49492434", "0.48888704", "0.48810965", "0.48810863", "0.48352045", "0.4815237", "0.48136622", "0.48090243", "0.48045638", "0.47845936", "0.47416943", "0.47222015", "0.4716683", "0.46965978", "0.46917048", "0.46803254", "0.467184", "0.46611854", "0.46545315", "0.46508098", "0.46500117", "0.46499577", "0.4645938", "0.4640179", "0.46191767", "0.46184796", "0.46155557", "0.46146223", "0.4602494", "0.46020976", "0.45999417", "0.45965987", "0.4590332", "0.45870534", "0.4574261", "0.45610154", "0.45602003", "0.4559698", "0.45470464", "0.45440722", "0.45416006", "0.45357174", "0.45327985", "0.4523439", "0.45224696", "0.45154878", "0.45152736", "0.45140788", "0.45010954", "0.44991964", "0.44935456", "0.44859573", "0.44783205", "0.44775715", "0.44753295", "0.4471573", "0.44658273", "0.44653806", "0.44573817", "0.4455231", "0.44437635", "0.44348726", "0.44348726", "0.44338337", "0.44330215", "0.44305137", "0.44297615", "0.44270644", "0.44270644", "0.44270644", "0.44270644", "0.44270644", "0.44265622", "0.4421629", "0.44193095", "0.44181237", "0.44174752", "0.44155443", "0.44153923", "0.44151053" ]
0.74367046
1
Returns a collection with all exports
public function findExports();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getExportCollection()\n {\n // crea connessione mongodb\n $connectionString = 'mongodb://' . \n $this->mongoParam['username'] . ':' . $this->mongoParam['password'] . '@' .\n $this->mongoParam['server'] . '/' . $this->mongoParam['db'];\n $connection = new MongoClient($connectionString);\n // apre la collection\n $collection = $connection->selectCollection($this->mongoParam['db'], ChunkExportHandler::EXPORT_COLLECTION);\n \n return $collection;\n }", "public function export_all()\n\t{\n\t\tforeach ($this->collection as $image)\n\t\t{\n\t\t\t$image->export();\n\t\t}\t\n\t}", "abstract public function getAvailableExports();", "public function export();", "public function export();", "public function export();", "public function export();", "public function export();", "protected function FetchExporterList()\n\t{\n\t\t$exporterRoot = APP_ROOT.\"/includes/converter/exporters/\";\n\t\t$files = scandir($exporterRoot);\n\n\t\tforeach($files as $file) {\n\t\t\tif(!is_file($exporterRoot.$file) || isc_substr($file, -3) != \"php\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trequire_once $exporterRoot.$file;\n\t\t\t$file = isc_substr($file, 0, isc_strlen($file)-4);\n\t\t\t$className = \"ISC_ADMIN_EXPORTER_\".isc_strtoupper($file);\n\t\t\tif(!class_exists($className)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$exporter = new $className;\n\t\t\t$exporters[$file] = array(\n\t\t\t\t\"title\" => $exporter->title,\n\t\t\t\t\"configuration\" => \"\"\n\t\t\t);\n\t\t\tif(method_exists($exporter, \"Configure\")) {\n\t\t\t\t$exporters[$file]['configuration'] = $exporter->Configure();\n\t\t\t}\n\t\t}\n\t\treturn $exporters;\n\t}", "public function listAll()\n {\n $collectionClassName = $this->getInstanceCollectionClassName();\n return $collectionClassName::create($this, $this->getTable());\n }", "public function export() {\n $data = array();\n foreach ($this->elements as $element) {\n $data[$element->getName()] = $element->export();\n }\n return $data;\n }", "public function all()\n {\n $objects = SevDeskApi::getFromSevDesk($this->objectName);\n $this->collection = collect();\n\n foreach($objects as $object)\n $this->collection->push($this->newInstance($object));\n\n return $this->collection;\n }", "public function downloads(): Collection;", "public function getAll() : Collection;", "public function get_all(){ \n\t\treturn $this->call('GET', '/admin/collects.json', array()); \n\t}", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection;", "public function all(): Collection\n {\n }", "public function rest_api_all(WP_REST_Request $request) {\n // Check export\n if (!get_option('h5p_export', TRUE)) {\n return array(); // Export not enabled.\n }\n\n return rest_ensure_response($this->get_h5p_exports_list());\n }", "public function testExportToArray()\n {\n $this->collection->get('first', '/first', 'action');\n $this->collection->get('second', '/second', function() {});\n $this->collection->get('third', '/third', 'action');\n\n $this->collection->compile();\n\n $exported = $this->collection->exportToArray();\n\n $this->assertCount(2, $exported);\n\n $this->assertArrayHasKey('0', $exported);\n $this->assertArrayHasKey('1', $exported);\n\n $this->assertEquals('first', $exported[0]['name']);\n $this->assertEquals('/first', $exported[0]['sourceRoute']);\n\n $this->assertEquals('third', $exported[1]['name']);\n $this->assertEquals('/third', $exported[1]['sourceRoute']);\n }", "public function exportData() {\n\t\treturn $this->constructExportObject();\n\t}", "public function getListExport(Request $request)\n {\n $timeFrom = $request->timeFrom;\n $timeTo = $request->timeTo;\n\n $arrWhere = [];\n\n if ($timeFrom) {\n $timeFrom = date(\"Y-m-d H:i:s\", strtotime($timeFrom));\n array_push($arrWhere, ['export_products.created_at', '>=', $timeFrom]);\n\n }\n if ($timeTo) {\n $timeTo = date(\"Y-m-d H:i:s\", strtotime($timeTo));\n array_push($arrWhere, ['export_products.created_at', '<=', $timeTo]);\n }\n\n return Auth::user()\n ->exports()\n ->where($arrWhere)\n ->orderBy('created_at', 'desc')\n ->paginate(10)\n ->toJson();\n }", "public function all()\n {\n return $this->resource::collection(\n $this->repository->all()\n );\n }", "public function getAll()\n\t{\n\t\treturn new Collection($this->items);\n\t}", "public function collection()\n {\n return collect($this->all());\n }", "public function export() {\n return json_encode(\n $this->manager->all()->toArray()\n );\n }", "private function exportAll()\n {\n $files = Mage::getModel('factfinder/export_type_product')->saveAll();\n echo \"Successfully generated the following files:\\n\";\n foreach ($files as $file) {\n echo $file . \"\\n\";\n }\n }", "public function all() : Collection;", "public function all() : Collection\n {\n return Order::all();\n }", "public function index()\n {\n return AnioResource::collection(Anio::All());\n }", "function ctools_export_crud_load_all($table, $reset = FALSE) {\r\n $schema = ctools_export_get_schema($table);\r\n if (empty($schema['export'])) {\r\n return array();\r\n }\r\n\r\n $export = $schema['export'];\r\n\r\n if ($reset) {\r\n ctools_export_load_object_reset($table);\r\n }\r\n\r\n if (!empty($export['load all callback']) && function_exists($export['load all callback'])) {\r\n return $export['load all callback']($reset);\r\n }\r\n else {\r\n return ctools_export_load_object($table, 'all');\r\n }\r\n}", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public function asCollection();", "function exportsSchema(){\n\t\t\treturn $this->exportsSchema;\n\t\t}", "public function all()\n {\n return $this->actionCollections;\n }", "public function index()\n {\n return new AccesorioCollection(Accesorio::all()->load(['images', 'pdfs']));\n }", "public function index(): Collection\n {\n return $this->repository->findAll();\n }", "public function actionExport(): ?ResponseInterface\n {\n $collection = $this->getCollection();\n if (!$collection) {\n throw new RuntimeException('Not Found', 404);\n }\n\n // Check authorization.\n $directory = $collection->getFlexDirectory();\n $authorized = is_callable([$collection, 'isAuthorized'])\n ? $collection->isAuthorized('read', 'admin', $this->user)\n : $directory->isAuthorized('read', 'admin', $this->user);\n\n if (!$authorized) {\n throw new RuntimeException($this->admin::translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK') . ' read.', 403);\n }\n\n $config = $collection->getFlexDirectory()->getConfig('admin.views.export') ?? $collection->getFlexDirectory()->getConfig('admin.export') ?? false;\n if (!$config || empty($config['enabled'])) {\n throw new RuntimeException($this->admin::translate('Not Found'), 404);\n }\n\n $queryParams = $this->getRequest()->getQueryParams();\n $type = $queryParams['type'] ?? null;\n if ($type) {\n $config = $config['options'][$type] ?? null;\n if (!$config) {\n throw new RuntimeException($this->admin::translate('Not Found'), 404);\n }\n }\n\n $defaultFormatter = CsvFormatter::class;\n $class = trim($config['formatter']['class'] ?? $defaultFormatter, '\\\\');\n $method = $config['method'] ?? ($class === $defaultFormatter ? 'csvSerialize' : 'jsonSerialize');\n if (!class_exists($class)) {\n throw new RuntimeException($this->admin::translate('Formatter Not Found'), 404);\n }\n /** @var FileFormatterInterface $formatter */\n $formatter = new $class($config['formatter']['options'] ?? []);\n $filename = ($config['filename'] ?? 'export') . $formatter->getDefaultFileExtension();\n\n if (method_exists($collection, $method)) {\n $list = $type ? $collection->{$method}($type) : $collection->{$method}();\n } else {\n $list = [];\n\n /** @var ObjectInterface $object */\n foreach ($collection as $object) {\n if (method_exists($object, $method)) {\n $data = $object->{$method}();\n if ($data) {\n $list[] = $data;\n }\n } else {\n $list[] = $object->jsonSerialize();\n }\n }\n }\n\n $response = new Response(\n 200,\n [\n 'Content-Type' => $formatter->getMimeType(),\n 'Content-Disposition' => 'inline; filename=\"' . $filename . '\"',\n 'Expires' => 'Mon, 26 Jul 1997 05:00:00 GMT',\n 'Last-Modified' => gmdate('D, d M Y H:i:s') . ' GMT',\n 'Cache-Control' => 'no-store, no-cache, must-revalidate',\n 'Pragma' => 'no-cache',\n ],\n $formatter->encode($list)\n );\n\n return $response;\n }", "public function export_entries()\n {\n }", "public function getImports();", "public function index()\n {\n return new RecordCollection(Record::all());\n }", "public function getAll()\n {\n $this->authorizeUserAction('viewAll');\n\n $model = new static::$model;\n\n // If we are caching the endpont, do a simple get all resources\n if (static::$cacheAll) {\n return $this->response->collection(Cache::remember(static::getCacheKey(), static::$cacheExpiresIn, function () use ($model) {\n return $model::with($model::getCollectionWith())->get();\n }), $this->getTransformer());\n }\n\n $query = $model::with($model::getCollectionWith());\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n $perPage = $model->getPerPage();\n if ($perPage) {\n // If specified, use per_page of the request\n if (request()->has('per_page')) {\n $perPage = intval(request()->input('per_page'));\n }\n\n $paginator = $query->paginate($perPage);\n\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }", "public function getAll(): Collection\n {\n return $this->model->newQuery()->orderBy('disporder')->all();\n }", "public function all(): Collection\n {\n return $this->model->all();\n }", "public function getExportMappings()\n {\n }", "public function index()\n {\n return new PurchaseCollection(\n PurchaseResource::collection(\n Purchase::all()\n )\n );\n }", "public function collection()\n {\n $list = Expenditure::all();\n\n// dd($list);\n\n return $list;\n }", "public function getCollection() ;", "public function index()\n {\n $criteria = Destination::paginate(10);\n return new DestinationResourceCollection($criteria);\n }", "public function get_export_data()\n {\n\n $l_sql = \"SELECT isys_obj_type__id, isys_obj_type__title, isys_verinice_types__title, isys_verinice_types__const \" . \"FROM isys_obj_type \" . \"INNER JOIN isys_verinice_types ON isys_obj_type__isys_verinice_types__id = isys_verinice_types__id \";\n\n return $this->retrieve($l_sql);\n\n }", "public function index()\n {\n return ServiceResource::collection(Service::all());\n }", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function export()\n {\n //\n }", "public function getAll(): Collection\n {\n return $this->model->all();\n }", "public function getExportFields(): array;", "public function export()\n\t{\n\t\treturn $this->props->export();\n\t}", "public static function getImports()\n\t{\n\t\t$db = get_db();\n\t\t$it = $db->getTable('CsvImport_Import');\n\t\t$s = $it->getSelect()->where('1')->order('added DESC');\n\t\t$imports = $it->fetchObjects($s, array());\n return $imports;\n\t}", "public function getAllCollection() \n\n\t{\n\n\t\treturn $this->db->get('tb_collection')->result_array();\n\t}", "public static function getCollection()\n\t{\n\t\treturn static::getDb()->getFileCollection(static::collectionName());\n\t}", "private static function collections()\n {\n $files = ['JSON', 'Collection'];\n $folder = static::$root.'Collections'.'/';\n\n self::call($files, $folder);\n }", "public function index(): AnonymousResourceCollection\n {\n return CommerceResource::collection(Commerce::latest()->paginate());\n }", "public function index()\n {\n return new GroupCollection(Group::all());\n }", "public function export() {\n\t\t$data = array();\n\t\tforeach ($this->store as $key => $value) {\n\t\t\tif ($value instanceof ELSWAK_Object) {\n\t\t\t\t$data[$key] = $value->_export();\n\t\t\t} elseif ($value instanceof ELSWAK_Array) {\n\t\t\t\t$data[$key] = $value->export();\n\t\t\t} else {\n\t\t\t\t$data[$key] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "public function index()\n {\n $sales = Sales::with('itemSales.item')->get();\n\n return new SalesCollection($sales);\n }", "public function export()\n {\n }", "public function getAll()\n {\n $model = new static::$model;\n\n $per_page = request('per_page');\n $query = $model::with($model::$localWith);\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n if( $per_page ) $model->setPerPage($per_page);\n\n $perPage = $model->getPerPage();\n if ($perPage) {\n $paginator = $query->paginate($perPage);\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }", "public function index()\n {\n $invpisums = InvPiSum::getAllInvPiSum();\n return InvPiSumResource::collection($invpisums);\n }", "public function getCollection() {\n return $this->gateway->find(\n $this->getFilter(),\n $this->order,\n $this->relations,\n $this->pager,\n !$this->excludeRepo\n );\n }", "public function getImports($page=null, $per_page=null){\n return Import::all($page, $per_page);\n\t\t\n }", "public function collection()\n {\n $name = \"$this->db.$this->name.$this->gridFS\";\n if( ! isset(self::$collections[$name]))\n {\n $selectMethod = ($this->gridFS ? 'getGridFS' : 'selectCollection');\n self::$collections[$name] = $this->db()->db()->$selectMethod($this->name);\n }\n return self::$collections[$name];\n }", "public function exportProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//output\n\t\t\t\t'{\"Export\":{\"created_timestamp\":1414143865,\"created\":\"2014-10-24 12:44:25\"},\"Languages\":[],\"Messages\":[],\"References\":[],\"Translations\":[]}',\n\t\t\t\t//headers\n\t\t\t\tarray(\n\t\t\t\t\t'Content-Disposition' => 'attachment; filename=\"localization_export_2014-10-24 12:44:25.json\"'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public function export()\n {\n set_time_limit(0);\n if (!isset($this->_parameters['behavior_data']['deps'])) {\n $this->addLogWriteln(__('You have not selected items'), $this->output);\n return false;\n }\n $deps = $this->_parameters['behavior_data']['deps'];\n $collections = [];\n $this->addLogWriteln(__('Begin Export'), $this->output);\n $this->addLogWriteln(__('Scope Data'), $this->output);\n foreach ($this->children as $typeName => $type) {\n foreach ($type['fields'] as $name => $values) {\n if (in_array($name, $deps)) {\n $model = $this->createFactory->create($values['collection']);\n $object = [\n 'model' => $model,\n 'main_field' => $values['main_field'],\n 'parent' => $values['parent'],\n 'parent_field' => $values['parent_field'],\n 'children' => []\n ];\n if (!$values['parent'] || empty($deps)) {\n $collections[$name] = $object;\n } else {\n $this->searchChildren($values['parent'], $name, $collections, $object);\n }\n }\n }\n }\n\n if ($this->_parameters['behavior_data']['file_format'] == 'xml') {\n $this->joined = false;\n }\n $writer = $this->getWriter();\n\n foreach ($collections as $key => $collection) {\n $this->runCollection($key, $collection, $writer);\n }\n\n return $writer->getContents();\n }", "public function export()\n {\n return $this->_session->export();\n }", "public function showAll()\n {\n $products = Producer::all();\n return ProducerResource::collection($products);\n }", "public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}", "function getExportFiles()\n\t{\n\t\t$dir = $this->getExportDirectory();\n\n\t\t// quit if export dir not available\n\t\tif (!@is_dir($dir) or\n\t\t\t!is_writeable($dir))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// open directory\n\t\t$dir = dir($dir);\n\n\t\t// initialize array\n\t\t$file = array();\n\n\t\t// get files and save the in the array\n\t\twhile ($entry = $dir->read())\n\t\t{\n\t\t\tif ($entry != \".\" and\n\t\t\t\t$entry != \"..\" and\n\t\t\t\tpreg_match(\"/^[0-9]{10}_{2}[0-9]+_{2}([a-z0-9]{3})_usrf\\.[a-z]{1,3}\\$/\", $entry, $matches))\n\t\t\t{\n\t\t\t\t$filearray[\"filename\"] = $entry;\n\t\t\t\t$filearray[\"filesize\"] = filesize($this->getExportDirectory().\"/\".$entry);\n\t\t\t\tarray_push($file, $filearray);\n\t\t\t}\n\t\t}\n\n\t\t// close import directory\n\t\t$dir->close();\n\n\t\t// sort files\n\t\tsort ($file);\n\t\treset ($file);\n\n\t\treturn $file;\n\t}", "public function toArray(ExportInterface $export);", "public function index()\n {\n $orderItems = OrderItems::all();\n return new OrderItemCollection($orderItems);\n }", "public function index(): Collection\n {\n return Project::all();\n }", "public function export(){\n\t\treturn $this->data;\n\t}", "public function createExport();", "public function export()\n {\n return $this->data;\n }", "public function export()\n {\n return $this->data;\n }", "public function collection()\n {\n return Product::all();\n }", "public function get_h5p_exports_list($ids = NULL) {\n global $wpdb;\n\n // Determine where part of SQL\n $where = ($ids ? \"WHERE id IN (\" . implode(',', $ids) . \")\" : '');\n\n // Look up H5P IDs\n $results = $wpdb->get_results(\n \"SELECT hc.id,\n hc.slug\n FROM {$wpdb->prefix}h5p_contents hc\n {$where}\"\n );\n\n // Format output\n $data = array();\n $baseurl = $this->get_h5p_url(true);\n foreach ($results as $h5p) {\n $slug = ($h5p->slug ? $h5p->slug . '-' : '');\n $data[] = array(\n 'id' => $h5p->id,\n 'url' => \"{$baseurl}/exports/{$slug}{$h5p->id}.h5p\"\n );\n }\n return $data;\n }", "public function export()\n {\n if (isAdmin()) {\n return (new ContactsExport)->download('contacts_' . now()->toIso8601String() . '.csv');\n }\n abort(404);\n }", "public function index()\n {\n $provider=Provider::all();\n return ProviderResource::collection($provider);\n }", "public function getNfsExports()\n {\n return $this->nfs_exports;\n }", "public function export()\n {\n \n }", "public function index()\n {\n return new BookedescortCollection(Bookedescort::with('tour')->get());\n }", "public function export()\n {\n $exportFields = [\n 'id', 'title', 'slashtag', 'destination', 'shortUrl', \n 'status', 'createdAt', 'updatedAt', 'clicks', 'lastClickAt',\n 'favourite', 'forwardParameters'\n ];\n\n $linkArray= [];\n foreach ($exportFields as $fieldName) {\n $value = $this->$fieldName;\n if ($value) {\n $linkArray[$fieldName] = $value;\n }\n }\n\n if ($this->domain) {\n $linkArray['domain'] = $this->domain->export();\n }\n\n return $linkArray;\n }", "public function ExportItems($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "public function index()\n {\n return new DatatableCollection(Datatable::latest()->paginate(10));\n }", "public function getExportList($page, $userId);", "function ctools_export_get_schemas($for_export = FALSE) {\r\n $export_tables = &drupal_static(__FUNCTION__);\r\n if (is_null($export_tables)) {\r\n $export_tables = array();\r\n $schemas = drupal_get_schema();\r\n foreach ($schemas as $table => $schema) {\r\n if (!isset($schema['export'])) {\r\n unset($schemas[$table]);\r\n continue;\r\n }\r\n $export_tables[$table] = ctools_export_get_schema($table);\r\n }\r\n }\r\n return $for_export ? array_filter($export_tables, '_ctools_export_filter_export_tables') : $export_tables;\r\n}" ]
[ "0.78198963", "0.71626174", "0.64607227", "0.64435536", "0.64435536", "0.64435536", "0.64435536", "0.64435536", "0.64433295", "0.64100355", "0.6389295", "0.63684916", "0.63220185", "0.6318598", "0.6307601", "0.6305427", "0.6305427", "0.6305427", "0.6305427", "0.6302348", "0.62545794", "0.6252606", "0.6233533", "0.620578", "0.61996305", "0.61963814", "0.6164076", "0.616387", "0.6150979", "0.61286324", "0.60961753", "0.6087966", "0.60861117", "0.60757124", "0.60757124", "0.60757124", "0.60757124", "0.6055091", "0.6043743", "0.6035054", "0.6027836", "0.60220003", "0.60216594", "0.6019788", "0.60161215", "0.60093224", "0.5988459", "0.5978506", "0.5954346", "0.59457713", "0.5942016", "0.59319866", "0.59302664", "0.591535", "0.5911591", "0.5906704", "0.5902611", "0.5902549", "0.5901712", "0.58969843", "0.5895259", "0.5893495", "0.5881942", "0.58792895", "0.5873303", "0.58645916", "0.58581495", "0.58564204", "0.5853612", "0.5852339", "0.5842116", "0.5836834", "0.58347505", "0.582332", "0.58186984", "0.58088267", "0.5806732", "0.5798797", "0.5793753", "0.5791153", "0.57820946", "0.5776332", "0.5775251", "0.57664365", "0.5765634", "0.5758305", "0.5751094", "0.5751094", "0.5738219", "0.5735733", "0.57267267", "0.57209474", "0.5712241", "0.5706034", "0.56960744", "0.56894946", "0.5685565", "0.5683089", "0.56710714", "0.5669913" ]
0.63279456
12
Returns the export's fully qualified class name
public function getClass();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getFullyQualifiedClassName() {\n $reflector = new \\ReflectionClass(get_called_class());\n return $reflector->getName();\n }", "protected function fullyQualifiedClassName(): string\n {\n return $this->fullNamespace() . '\\\\' . $this->name();\n }", "public function get_just_class_name() {\n\n\t\t$full_path = $this->get_called_class();\n\n\t\treturn substr( strrchr( $full_path, '\\\\' ), 1 );\n\n\t}", "public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}", "public function getName(): string\n {\n return __CLASS__;\n }", "public function get_usable_full_class_path() {\n\n\t\t$full_path = $this->get_called_class();\n\n\t\treturn strtolower( str_replace( '\\\\', '_', str_replace( '\\\\\\\\', '_', $full_path ) ) );\n\n\t}", "public function getClassName()\n {\n return __CLASS__;;\n }", "public function getClassName()\n {\n $fullClass = get_called_class();\n $exploded = explode('\\\\', $fullClass);\n\n return end($exploded);\n }", "public function getName()\n {\n return __CLASS__;\n }", "public function getFullQualifiedClassname() : string\n {\n return $this->fqcn;\n \n }", "public function getClassName() { return __CLASS__; }", "public static function getClassName(){\n $parts = explode('\\\\', static::class);\n return end($parts);\n }", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function name()\n {\n $name = get_class($this);\n\n return substr($name, strrpos($name, '\\\\') + 1);\n }", "public static function get_class_name() {\r\n\t\treturn __CLASS__;\r\n\t}", "public function getClassName();", "public function getClassName();", "public function getFullClassName()\n {\n $name = $this->getName();\n $namespace = $this->getNamespace();\n if (!$namespace && $this->getDatabase()) {\n $namespace = $this->getDatabase()->getNamespace();\n }\n\n if ($namespace) {\n return trim($namespace, '\\\\') . '\\\\' . $name;\n } else {\n return $name;\n }\n }", "public static function className() : string {\n return get_called_class();\n }", "public function className()\n {\n $full_path = explode('\\\\', get_called_class());\n return end($full_path);\n }", "public function getNamespacedName()\n {\n return get_class();\n }", "public function getClassName(): string\n {\n return $this->makeClassFromFilename($this->filename);\n }", "private function getClassName() {\n return (new \\ReflectionClass(static::class))->getShortName();\n }", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getClassName() ;", "public function getClassName(): string;", "public function getClassName() : string;", "public static function getClassName()\n {\n $classNameArray = explode('\\\\', get_called_class());\n\n return array_pop($classNameArray);\n }", "public static function getClassName() {\n\t\treturn get_called_class();\n\t}", "public static function getClassName()\n {\n return get_called_class();\n }", "public static function staticGetClassName()\n {\n return __CLASS__;\n }", "public static function getClassName() {\n return get_called_class();\n }", "protected static function getConverterDisplayName()\n {\n // https://stackoverflow.com/questions/19901850/how-do-i-get-an-objects-unqualified-short-class-name/25308464\n return substr(strrchr('\\\\' . static::class, '\\\\'), 1);\n }", "abstract function getExportDeploymentClassName();", "public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }", "public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }", "public static function path()\n {\n return class_basename(get_called_class());\n }", "public static function getClassName()\n\t{\n\t\treturn get_called_class();\n\t}", "public function getClassNm()\r\n {\r\n\t\t$tabInfo = $this->getPathInfo();\r\n\t\treturn $tabInfo[1];\r\n }", "public function qualifiedName()\n {\n return sprintf('%s::%s', $this->className(), $this->name());\n }", "public function toClassName(): string\n {\n return ClassName::full($this->name);\n }", "public function getClassName() : string {\n if ($this->getType() != Router::CLOSURE_ROUTE) {\n $path = $this->getRouteTo();\n $pathExplode = explode(DS, $path);\n\n if (count($pathExplode) >= 1) {\n $fileNameExplode = explode('.', $pathExplode[count($pathExplode) - 1]);\n\n if (count($fileNameExplode) == 2 && $fileNameExplode[1] == 'php') {\n return $fileNameExplode[0];\n }\n }\n }\n\n return '';\n }", "public function getUserClassFileName()\n {\n }", "public function getShortName(): string\n {\n return class_basename($this);\n }", "abstract public function getExporterClass(): string;", "public function getter_qualified_name()\n\t{\n\t\treturn $this->qualified_name = (new \\ReflectionClass($this))->getShortName();\n\t}", "private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}", "public function class()\n {\n // @codingStandardsIgnoreLine\n return $this->class ?? \"\";\n }", "public function getClassName ()\n {\n $className = explode('\\\\', get_class($this));\n\n return array_pop($className);\n }", "public function getClassName()\n {\n return $this->_sClass;\n }", "public function class_name() {\n\t\treturn strtolower(get_class($this));\n\t}", "private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }", "public function getImportClass()\n {\n $importClass = '';\n\n $modelSNG = singleton($this->modelClass);\n $importClass = $modelSNG->i18n_singular_name();\n\n return $importClass;\n }", "public function getFullyQualifiedClassName(): string\n {\n return \"{$this->namespace}\\\\MockDelegateFunction\";\n }", "public function getClassName() {\r\n\t\treturn($this->class_name);\r\n\t}", "public function getName() {\n\t\t\n\t\t// cut last part of class name\n\t\treturn substr( get_class( $this ), 0, -11 );\n\t\t\n\t}", "public function getClassName()\n {\n return $this->class;\n }", "public function getClassName()\n {\n return $this->class;\n }", "function getClassName(){\n echo __CLASS__ . \"<br><br>\"; \n }", "protected function getClassName(): string\n {\n return $this->className;\n }", "public static function getClassName() {\n return self::$className;\n }", "public function getQualifiedName(): string\n {\n return $this->namespace.'.'.$this->name;\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->class_name;\n }", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClassBasename()\n {\n return class_basename($this->getClass());\n }", "public function getClassName() {\t\t\n\t\treturn MemberHelper::getClassName($this->classNumber);\n\t}", "public function toString()\n {\n return __CLASS__;\n }", "public function className(): string\n {\n return $this->taskClass->name();\n }", "public static function name()\n {\n return lcfirst(self::getClassShortName());\n }", "public function name() : string\n {\n return call_user_func([get_called_class(), 'resolveName']);\n }", "public function getName()\n {\n return static::CLASS;\n }", "function __toString()\n {\n return __CLASS__;\n }", "public function getClassName() : string\n {\n return $this->className;\n }", "public function getClassName() : string\n {\n\n return $this->className;\n }", "function get_class_name($realName)\n{\n $file_components = explode(\"\\\\\", $realName);\n $to_search = end($file_components);\n return $to_search;\n}", "public function getClass(): string\n {\n return $this->class;\n }", "public static function name()\n {\n return isset(static::$name) ? static::$name : self::getClassShortName();\n }", "public function getClassname(){\n\t\treturn $this->classname;\n\t}", "public function getClassname()\n\t{\n\t\treturn $this->classname;\n\t}", "public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}", "protected function name() {\n\t\treturn strtolower(str_replace('\\\\', '_', get_class($this)));\n\t}", "public function __toString()\n {\n return __CLASS__;\n }", "public function __toString()\n {\n return __CLASS__;\n }", "public function __toString()\n {\n return __CLASS__;\n }", "public function __toString()\n {\n return __CLASS__;\n }", "public function __toString()\n {\n return __CLASS__;\n }", "public function __toString()\n {\n return __CLASS__;\n }", "public function __toString()\n {\n return __CLASS__;\n }", "public function __toString()\n {\n return __CLASS__;\n }", "public function __toString()\n {\n return __CLASS__;\n }" ]
[ "0.7893394", "0.7794205", "0.75552136", "0.7455469", "0.7282085", "0.7243222", "0.7239233", "0.72322255", "0.72206765", "0.72049886", "0.7200637", "0.71524", "0.7150337", "0.7150337", "0.7150337", "0.7150337", "0.7127986", "0.71146125", "0.7101391", "0.7101391", "0.70939606", "0.70936626", "0.70524", "0.7047941", "0.7036618", "0.7031901", "0.7013362", "0.7013362", "0.7004032", "0.698784", "0.6971471", "0.6963598", "0.6949918", "0.69421154", "0.69338495", "0.6933236", "0.6907388", "0.6900714", "0.69004583", "0.68961483", "0.6894688", "0.6876997", "0.686642", "0.68608946", "0.6854628", "0.6814607", "0.67830133", "0.6754434", "0.6727553", "0.67243093", "0.6723533", "0.66955996", "0.6691657", "0.66883075", "0.6682074", "0.6680783", "0.66714084", "0.6664891", "0.6656932", "0.66558886", "0.6655573", "0.6655573", "0.66502094", "0.6646047", "0.66418743", "0.66234225", "0.66183144", "0.66183144", "0.6607582", "0.65990114", "0.65990114", "0.65990114", "0.65990114", "0.65990114", "0.65990114", "0.6593269", "0.65828496", "0.65816694", "0.65800107", "0.6575063", "0.654534", "0.6545307", "0.65244937", "0.6517307", "0.6514463", "0.64811844", "0.6479241", "0.64553195", "0.6454034", "0.6428189", "0.6427752", "0.64160246", "0.6408273", "0.6408273", "0.6408273", "0.6408273", "0.6408273", "0.6408273", "0.6408273", "0.6408273", "0.6408273" ]
0.0
-1
Load fixture data user
public function load(ObjectManager $manager) { // Array of data for the fixture $usersData = array( array( 'username' => 'superman', 'email' => '[email protected]', 'password' => 'sup', 'roles' => array('ROLE_ADMIN'), ), array( 'username' => 'batman', 'email' => '[email protected]', 'password' => 'bat', 'roles' => array('ROLE_ADMIN'), ), array( 'username' => 'spiderman', 'email' => '[email protected]', 'password' => 'spi', // 'roles' => array(), 'roles' => array('ROLE_USER'), ), array( 'username' => 'Martine', 'email' => '[email protected]', 'password' => 'mar', 'roles' => array(), ), array( 'username' => 'Jean', 'email' => '[email protected]', 'password' => 'jea', 'roles' => array(), ), array( 'username' => 'Marc', 'email' => '[email protected]', 'password' => 'mar', 'roles' => array(), ), array( 'username' => 'David', 'email' => '[email protected]', 'password' => 'dav', 'roles' => array(), ), ); // Accessing the user manager service $userManager = $this->container->get('fos_user.user_manager'); foreach ($usersData as $i => $userData) { $user = $userManager->createUser(); $user->setUsername($userData['username']); $user->setEmail($userData['email']); $user->setPlainPassword($userData['password']); $user->setEnabled(true); $user->setRoles($userData['roles']); $manager->persist($user); $this->addReference(sprintf('user-%s', $i), $user); } $manager->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function loadUserFixtures()\n {\n include __DIR__ . '/../../../_files/adminUserFixtures.php';\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => UserFixture::className(),\n 'dataFile' => codecept_data_dir() . 'login_data.php',\n ],\n ];\n }", "protected static function getDataFixtures()\n {\n return array(\n new LoadTestUser(),\n new LoadSuperUser(),\n );\n }", "public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }", "public function load()\n {\n $this\n ->objectManager\n ->createQuery('DELETE FROM ' . Member::class)\n ->execute()\n ;\n Fixtures::load(\n __DIR__ . '/../../fixtures/members.yml',\n $this->objectManager\n );\n }", "public function testLoadFixturesFilesWithCustomProvider(): void\n {\n // Load default Data Fixtures.\n $fixtures = $this->databaseTool->loadAliceFixture([\n '@AcmeBundle/DataFixtures/ORM/user.yml',\n ]);\n\n $this->assertIsArray($fixtures);\n\n // 10 users are loaded\n $this->assertCount(\n 10,\n $fixtures\n );\n\n /** @var User $user */\n $user = $fixtures['id1'];\n\n // The custom provider has not been used successfully.\n $this->assertStringStartsNotWith(\n 'foo',\n $user->getName()\n );\n\n // Load Data Fixtures with custom loader defined in configuration.\n $fixtures = $this->databaseTool->loadAliceFixture([\n '@AcmeBundle/DataFixtures/ORM/user_with_custom_provider.yml',\n ]);\n\n /** @var User $user */\n $user = $fixtures['id1'];\n\n // The custom provider \"foo\" has been loaded and used successfully.\n $this->assertSame(\n 'fooa string',\n $user->getName()\n );\n }", "protected function loadUserData()\n {\n $this->userData = ($this->session->userData?:[]) + $this->userDataTemplate;\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => BookFixture::class,\n 'dataFile' => codecept_data_dir() . 'book.php'\n ],\n ];\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => TicketsFixture::className(),\n 'dataFile' => codecept_data_dir() . 'tickets.php'\n ]\n ];\n }", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "public static function setUpBeforeClass(): void\n {\n parent::setUpBeforeClass();\n\n self::$reader = [\n 'username' => self::$faker->userName,\n 'email' => self::$faker->email,\n 'password' => self::$faker->password,\n ];\n\n // load user admin fixtures\n parent::$writer['id'] = Utils::loadUserData(\n parent::$writer['username'],\n parent::$writer['email'],\n parent::$writer['password'],\n true\n );\n\n // load user reader fixtures\n self::$reader['id'] = Utils::loadUserData(\n self::$reader['username'],\n self::$reader['email'],\n self::$reader['password'],\n false\n );\n }", "public function setup()\n {\n parent::setup();\n \n // Build some fuxture values\n $this->userName = 'fixture';\n $this->firstName = 'Test';\n $this->lastName = 'User';\n $this->email = '[email protected]';\n $this->password = '123123';\n $this->roleName = 'Fixture';\n // Generate the fixture\n $this->createAdminUserFixture(); \n }", "protected function createAdminUserFixture()\n {\n //create new user\n try {\n $user = Mage::getModel('admin/user')\n ->setData(array(\n 'username' => $this->userName,\n 'firstname' => $this->firstName,\n 'lastname' => $this->lastName,\n 'email' => $this->email,\n 'password' => $this->password,\n 'is_active' => 1\n ))->save();\n\n //create new role\n $role = Mage::getModel(\"admin/roles\")\n ->setName($this->roleName)\n ->setRoleType('G')\n ->save();\n\n //give \"all\" privileges to role\n Mage::getModel(\"admin/rules\")\n ->setRoleId($role->getId())\n ->setResources(array(\"all\"))\n ->saveRel();\n\n $user->setRoleIds(array($role->getId()))\n ->setRoleUserId($user->getUserId())\n ->saveRelations();\n } catch (Exception $e) {\n echo \"Unable to create fixture :: {$e->getMessage()}\";\n }\n \n }", "private function myLoadFixtures()\n {\n $em = $this->getDatabaseManager();\n\n // load fixtures\n $client = static::createClient();\n $classes = array(\n // classes implementing Doctrine\\Common\\DataFixtures\\FixtureInterface\n 'Demofony2\\AppBundle\\DataFixtures\\ORM\\FixturesLoader',\n );\n\n $this->loadFixtures($classes);\n }", "protected function _loadFixture($fixture)\n {\n $this->db->query(file_get_contents(\n NL_TEST_DIR.\"/tests/migration/fixtures/$fixture.sql\"\n ));\n }", "public function _loadData()\n\t{\n\t\t$this->username = $this->_admin->username;\n\t\t$this->oldPassword = '';\n\t\t$this->last_name = $this->_admin->last_name;\n\t\t$this->first_name = $this->_admin->first_name;\n\t}", "public function _fixtures()\n\t{\n\t\treturn [\n\t\t\t'user' => [\n\t\t\t\t'class' => UserFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'login_data.php'\n\t\t\t],\n\t\t\t'models' => [\n\t\t\t\t'class' => ModelsFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'models.php'\n\t\t\t],\n\t\t\t'files' => [\n\t\t\t\t'class' => FilesFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'files.php'\n\t\t\t]\n\n\t\t];\n\t}", "protected function setUp()\n {\n self::bootKernel();\n\n $this->em = static::$kernel->getContainer()\n ->get('doctrine')\n ->getManager();\n $schemaTool = new SchemaTool($this->em);\n $metadata = $this->em->getMetadataFactory()->getAllMetadata();\n\n // Drop and recreate tables for all entities\n $schemaTool->dropSchema($metadata);\n $schemaTool->createSchema($metadata);\n $users = new LoadUserData();\n $users->setContainer(static::$kernel->getContainer());\n $users->load($this->em);\n }", "function load(ObjectManager $manager)\n {\n\n $data = $this->getData();\n\n foreach ($data as $userData) {\n $user = new User();\n\n $user->setUsername($userData['username']);\n $user->setEmail($userData['email']);\n $user->setPlainPassword($userData['plainPassword']);\n $user->setEnabled($userData['enabled']);\n $user->setSuperAdmin($userData['superAdmin']);\n $manager->persist($user);\n $manager->flush();\n $this->setReference($userData['reference'], $user);\n }\n\n// $manager->flush();\n//\n// $admin = new User();\n// $admin->setUsername('admin');\n// $admin->setEmail('[email protected]');\n// $admin->setPlainPassword('admin');\n// $admin->setEnabled(true);\n// $admin->setSuperAdmin(true);\n// $manager->persist($admin);\n//\n// $user1 = new User();\n// $user1->setUsername('user1');\n// $user1->setEmail('[email protected]');\n// $user1->setPlainPassword('user1');\n// $user1->setEnabled(true);\n// $user1->setSuperAdmin(false);\n// $manager->persist($user1);\n//\n// $manager->flush();\n//\n// $this->setReference('user_admin', $admin);\n// $this->setReference('user_user1', $user1);\n }", "public static function loadUserFixturesRollback()\n {\n include __DIR__ . '/../../../_files/adminUserFixtures_rollback.php';\n }", "public function test_if_users_list_loads_with_data()\n {\n factory(User::class)->create([\n 'name'=>'Joel' \n ]);\n $this->get('/usuarios')\n ->assertStatus(200)\n ->assertSee('Joel'); \n }", "public function load($userId = 0)\n{\n $userId=7;\n $username='tarun';\n $password='abcdefg';\n\t\n //Load the user factory\n $this->load->library(\"UserFactory\");\n //Create a data array so we can pass information to the view\n \n $this->userfactory->setUser($username, $password);\n \n\n\n}", "protected function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n usermoodle::TABLE => elispm::file('tests/fixtures/user_moodle.csv')\n ));\n $this->loadDataSet($dataset);\n }", "public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }", "public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }", "function getUserFixtures() {\n\t\t$proceed = $this->in(__('Bake could not detect fixtures, would you like to add some?', true), array('y','n'), 'n');\n\t\t$fixtures = array();\n\t\tif (strtolower($proceed) == 'y') {\n\t\t\t$fixtureList = $this->in(__(\"Please provide a comma separated list of the fixtures names you'd like to use.\\nExample: 'app.comment, app.post, plugin.forums.post'\", true));\n\t\t\t$fixtureListTrimmed = str_replace(' ', '', $fixtureList);\n\t\t\t$fixtures = explode(',', $fixtureListTrimmed);\n\t\t}\n\t\t$this->_fixtures = array_merge($this->_fixtures, $fixtures);\n\t\treturn $fixtures;\n\t}", "public function testLoadBasic()\r\n\t\t{\r\n\t\t\tORM::init('mysql:host=localhost;dbname=rocket_orm', 'orm_username', 'orm_password');\r\n\t\t\t\r\n\t\t\t$user = User::load(1);\r\n\t\t\t\r\n\t\t\t$this->assertEquals($user->get('user_id'), '1');\r\n\t\t}", "public static function loadWebsiteFixtures(): void\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }", "public static function loadWebsiteFixtures(): void\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }", "protected function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n 'user' => elis::component_file('program', 'tests/fixtures/mdluser.csv'),\n 'user_info_field' => elis::component_file('program', 'tests/fixtures/user_info_field.csv'),\n 'user_info_data' => elis::component_file('program', 'tests/fixtures/user_info_data.csv'),\n user::TABLE => elis::component_file('program', 'tests/fixtures/pmuser.csv'),\n usermoodle::TABLE => elis::component_file('program', 'tests/fixtures/usermoodle.csv'),\n field::TABLE => elis::component_file('program', 'tests/fixtures/user_field.csv'),\n field_owner::TABLE => elis::component_file('program', 'tests/fixtures/user_field_owner.csv'),\n userset::TABLE => elis::component_file('program', 'tests/fixtures/userset.csv')\n ));\n $dataset = new PHPUnit_Extensions_Database_DataSet_ReplacementDataSet($dataset);\n $dataset->addSubStrReplacement('\\n', \"\\n\");\n $this->loadDataSet($dataset);\n }", "public function load(ObjectManager $manager)\n {\n\n $faker = Faker\\Factory::create('en_US');\n\n // Creating admin user\n $admin = new User();\n $admin->setEmail('[email protected]');\n $admin->setRoles(['ROLE_ADMIN']);\n $admin->setPassword($this->passwordEncoder->encodePassword(\n $admin,\n 'adminpassword'\n ));\n\n $manager->persist($admin);\n\n // Creating cluber user : run team\n $cluber = new User();\n $cluber->setEmail('[email protected]');\n $cluber->setRoles(['ROLE_CLUBER']);\n $cluber->setPassword($this->passwordEncoder->encodePassword(\n $cluber,\n 'clubpassword'\n ));\n $manager->persist($cluber);\n\n // Creating cluber user : swim team\n $cluber2 = new User();\n $cluber2->setEmail('[email protected]');\n $cluber2->setRoles(['ROLE_CLUBER']);\n $cluber2->setPassword($this->passwordEncoder->encodePassword(\n $cluber2,\n 'clubpassword'\n ));\n $manager->persist($cluber2);\n\n // Fixtures for profil -(//\n $profilClub = new ProfilClub();\n $profilClub->setNameClub('Run Team');\n $profilClub->setCityClub('Lille');\n $profilClub->setLogoClub('avatar2.jpg');\n $profilClub->setDescriptionClub('Petite equipe Lilloise');\n $profilClub->addUser($cluber);\n $manager->persist($profilClub);\n\n $profilClub2 = new ProfilClub();\n $profilClub2->setNameClub('Swim Team');\n $profilClub2->setCityClub('Douai');\n $profilClub2->setLogoClub(\n 'https://image.shutterstock.com/image-vector/swimming-club-logo-design-swimmer-600w-255149764.jpg'\n );\n $profilClub2->setDescriptionClub('Club de natation');\n $profilClub2->addUser($cluber2);\n $manager->persist($profilClub2);\n\n // Fixtures for profil Solo//\n $profilSolo = new ProfilSolo();\n $profilSolo->setLastname('Doe');\n $profilSolo->setFirstname('Jonh');\n $profilSolo->setBirthdate(new DateTime(141220));\n $profilSolo->setDescription('J\\'ai perdu la mémoire ! Mais j\\'aime nager en crawl.');\n $profilSolo->setGender(0);\n $profilSolo->setAvatar('https://randomuser.me/api/portraits/men/97.jpg');\n $profilSolo->setEmergencyContactName('Pascale Dino');\n $profilSolo->setLevel(1);\n $profilSolo->setSportFrequency(2);\n $profilSolo->setPhone('0000000000');\n $profilSolo->setEmergencyPhone('0000000000');\n $profilSolo->setProfilClub($profilClub2);\n $manager->persist($profilSolo);\n\n // Fixtures for profil Solo2//\n $profilSolo2= new ProfilSolo();\n $profilSolo2->setLastname('Franz');\n $profilSolo2->setFirstname('Albert');\n $profilSolo2->setBirthdate(new DateTime(141220));\n $profilSolo2->setDescription('Je suis Albert');\n $profilSolo2->setGender(0);\n $profilSolo2->setAvatar('https://randomuser.me/api/portraits/men/97.jpg');\n $profilSolo2->setEmergencyContactName('Pascale Dino');\n $profilSolo2->setLevel(1);\n $profilSolo2->setSportFrequency(2);\n $profilSolo2->setPhone('0000000000');\n $profilSolo2->setEmergencyPhone('0000000000');\n $profilSolo2->setProfilClub($profilClub2);\n $manager->persist($profilSolo2);\n\n\n // Creating lambda user\n $user = new User();\n $user->setProfilSolo($profilSolo);\n $user->setEmail('[email protected]');\n $user->setRoles(['ROLE_USER']);\n $user->setPassword($this->passwordEncoder->encodePassword(\n $user,\n 'userpassword'\n ));\n\n \n $manager->persist($user);\n\n /* $users[] = $user;*/\n \n // Creating lambda user2\n $user2 = new User();\n $user2->setProfilSolo($profilSolo2);\n $user2->setEmail('[email protected]');\n $user2->setRoles(['ROLE_USER']);\n $user2->setPassword($this->passwordEncoder->encodePassword(\n $user2,\n 'userpassword'\n ));\n $manager->persist($user2);\n\n // Fixtures for sportCategory//\n $sportCategory = new SportCategory();\n $sportCategory->setNameCategory('Running');\n $manager->persist($sportCategory);\n\n // Fixtures for sport//\n $sport= new Sport();\n $sport->setSportName('Course à pied');\n $sport->setSportCategory($sportCategory);\n $manager->persist($sport);\n\n // Fixtures for event page//\n $event = new Event();\n $event->setNameEvent('Entrainement de course ');\n $event->setLevelEvent(1);\n $event->setDateEvent($faker->dateTimeThisMonth);\n $event->setTimeEvent($faker->dateTimeThisMonth);\n $event->setDescription('Courses dans la nature');\n $event->setParticipantLimit('10');\n $event->setPlaceEvent('23 place des ecoliers 59000 Lille');\n $event->setSport($sport);\n $event->setCreatorClub($profilClub);\n $manager->persist($event);\n\n // Fixtures for GeneralChatClub\n $messageClub = new GeneralChatClub();\n $messageClub->setProfilClub($profilClub2);\n $messageClub->setDateMessage(new DateTime('now'));\n $messageClub->setContentMessage('Bonjour, je suis un club de natation');\n $manager->persist($messageClub);\n\n \n //participation\n /*for ($j = 0; $j < mt_rand(0, 10); $j++) {\n $participationLike = new ParticipationLike();\n\n $participationLike->setEvent($event)\n ->setUser($faker->randomElement($users));\n $manager->persist($participationLike);\n\n\n $manager->flush();\n }*/\n\n $messageClub2 = new GeneralChatClub();\n $messageClub2->setProfilClub($profilClub);\n $messageClub2->setDateMessage(new DateTime('now'));\n $messageClub2->setContentMessage('Bonjour, je suis un club de run');\n $manager->persist($messageClub2);\n\n $messageSolo = new GeneralChatClub();\n $messageSolo->setProfilClub($profilClub2);\n $messageSolo->setProfilSolo($profilSolo);\n $messageSolo->setDateMessage(new DateTime('now'));\n $messageSolo->setContentMessage('Bonjour, je suis John.');\n $manager->persist($messageSolo);\n\n $manager->flush();\n }", "public function setUp()\n {\n $folder = dirname(__DIR__) . '/fixtures';\n\n $this->keyVal(true);\n $this->_mutableLoader = new Loader($folder);\n $this->_immutableLoader = new Loader($folder, true);\n }", "public function setupFixtures()\n {\n if ($this->_fixtures === null) {\n $loadedFixtures = [];\n foreach ($this->fixtures() as $fixtureClass) {\n $loadedFixtures[$fixtureClass] = Yii::createObject($fixtureClass);\n }\n\n $this->_fixtures = $loadedFixtures;\n }\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => AdminUserFixture::class,\n 'dataFile' => codecept_data_dir() . 'admin_user.php',\n ],\n 'auth' => [\n 'class' => AuthItemFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_data.php',\n ],\n 'auth_child' => [\n 'class' => AuthItemChildFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_child_data.php',\n ],\n 'authAssignment' => [\n 'class' => AuthAssignmentFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_assigment_data.php',\n ],\n 'category' => [\n 'class' => CategoryFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_data.php',\n ],\n 'category_company_type' => [\n 'class' => CategoryCompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_company_type_data.php',\n ],\n 'company_type' => [\n 'class' => CompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'company_type_data.php',\n ],\n\n ];\n }", "protected function loadUsers() {\r\n $this->users = new \\App\\Table\\UserTable(App::getInstance()->getDb());\r\n }", "public function testLoad()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests');\n $this->assertEquals('0', $this->_countRecords());\n\n $fixture->load();\n $this->assertEquals('6', $this->_countRecords());\n }", "public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$base_path = \\Bundle::path('orchestra').'tests'.DS.'fixtures'.DS;\n\t\t\n\t\tset_path('app', $base_path.'application'.DS);\n\t\tset_path('orchestra.extension', $base_path.'bundles'.DS);\n\n\t\t$this->user = \\Orchestra\\Model\\User::find(1);\n\t}", "function loadUsers($filename)\n{\n if(!$filename) return;\n $data = readCsvTableFile($filename, false, true);\n return $data;\n}", "abstract public function loadData();", "abstract protected function getFixtures();", "protected function reloadDataFixtures()\n {\n $em = $this->getEntityManager();\n $loader = new Loader;\n foreach ($this->dataFixturePaths as $path) {\n $loader->loadFromDirectory($path);\n }\n $purger = new ORMPurger($em);\n $executor = new ORMExecutor($em, $purger);\n $executor->execute($loader->getFixtures());\n $this->fixturesReloaded = true;\n }", "public static function get_user_data()\n {\n }", "public function loadData(){\r\n $this->host = Team::find($this->host);\r\n $this->guest = Team::find($this->guest);\r\n $this->winner = Team::find($this->winner);\r\n $this->tournament = Tournament::find($this->tournamentID); \r\n }", "public function testdefaultUserDataAvailable()\n {\n $logger = new Logger('error-log');\n $logger->pushHandler(new SentryMonologHandler());\n \n // Setup the \"fixture data\" for this test\n $this->logInWithPermission('admin');\n\n $userDataThatWasSet = $logger->getClient()->getData()['user'];\n\n // Cannot get Member data at by default at initialisation time\n $this->assertEquals('Unavailable', $userDataThatWasSet['ID']);\n $this->assertEquals('Unavailable', $userDataThatWasSet['Email']);\n }", "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "public static function loadStockFixtures(): void\n {\n include __DIR__ . '/../../../_files/stockFixtures.php';\n }", "public static function loadProductFixtures(): void\n {\n include __DIR__ . '/../../../_files/productFixtures.php';\n }", "function loadCreateUser()\n {\n $this->get('/usuarios/nuevo')\n ->assertStatus(200)\n ->assertSee('Crear nuevo usuario');\n }", "public static function setUpBeforeClass(): void\n {\n self::$user = new User();\n self::$faker = Factory::create('es_ES');\n }", "private function setUpData($use_redis = 0) {\n $builder_owner = FixtureBuilder::build('owners', array('email' => '[email protected]', 'user_activated' => 1) );\n $builder_plugin = FixtureBuilder::build('plugins', array('folder_name' => 'twitterrealtime', 'is_active' => 1));\n $plugin_id = $builder_plugin->columns['last_insert_id'];\n $namespace = OptionDAO::PLUGIN_OPTIONS . '-' .$plugin_id;\n $builder_plugin_options =\n FixtureBuilder::build('options',\n array('namespace' => $namespace, 'option_name' => 'use_redis', 'option_value' => $use_redis) );\n $this->simulateLogin('[email protected]');\n $owner_dao = DAOFactory::getDAO('OwnerDAO');\n $owner = $owner_dao->getByEmail(Session::getLoggedInUser());\n return array($builder_owner, $builder_plugin, $builder_plugin_options);\n }", "public function loadStorage($file){\n\t\tif (file_exists($file)) {\n\t\t\t$this->user = unserialize(file_get_contents($file));\n\t\t}\n\t}", "protected function add_sample_users(){\n // a non-admin user\n factory(User::class,1)->create();\n\n $this->non_admin = User::where('superuser',0)->first();\n $this->admin = User::where('superuser',1)->first();\n }", "protected function getFixtures()\n {\n return array(\n __DIR__ . '/card.yml',\n );\n }", "public function __prepare(FixtureFactory $fixtureFactory)\n {\n $user = $fixtureFactory->createByCode(\n 'user',\n ['dataset' => 'custom_admin_with_default_role']\n );\n $user->persist();\n\n return [\n 'user' => $user\n ];\n }", "public function load(ObjectManager $manager)\n {\n $adminUser = $manager->getRepository('APICoreBundle:User')->findOneBy([\n 'username' => 'admin'\n ]);\n\n if ($adminUser instanceof User) {\n $userData = new UserData();\n $userData->setName('Admin');\n $userData->setSurname('Adminovic');\n $userData->setCity('Bratislava');\n $userData->setFunction('Admin of project');\n $userData->setSignature('Admin Adminovic, Lan Systems s.r.o.');\n $userData->setFacebook('facebook.sk');\n $userData->setTwitter('twitter.sk');\n $userData->setLinkdin('linkdin.sk');\n $userData->setGoogle('google.sk');\n $userData->setUser($adminUser);\n\n $manager->persist($userData);\n $manager->persist($adminUser);\n\n $manager->flush();\n }\n }", "public function __construct() \n {\n \t$this->userData = collect(json_decode(file_get_contents('https://jsonplaceholder.typicode.com/users')));\n }", "public function __loadUser()\n {\n\t$facebook = $this->fb;\n\t$this->user = $facebook->api(\"/me\", \"GET\");\n\t$this->userid = $facebook->getUser();\n\treturn;\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->load();\n }", "protected function setUp()\r\n {\r\n self::bootKernel();\r\n\r\n //Apply the primer\r\n DatabasePrimer::prime(self::$kernel);\r\n\r\n //Set entity manager\r\n $this->em = DatabasePrimer::$entityManager;\r\n\r\n $fixture = new ProfileFixtures();\r\n $fixture->load($this->em);\r\n }", "public static function loadInventoryFixtures(): void\n {\n include __DIR__ . '/../../../_files/source_items_on_default_source.php';\n }", "protected function getFixtures()\n {\n return array(\n // __DIR__ . '/../../Resources/fixtures/majora_entitys.yml',\n );\n }", "public function load(ObjectManager $manager)\n {\n //FOR LOAD METHOD WITHOUT DROP TABLE \"symfony console doctrine:fixtures:load --append\"\n $contenu_fichier_json = file_get_contents(__DIR__.'/datas.json');\n $datas = json_decode($contenu_fichier_json, true);\n\n foreach($datas['tools'] as $tools ){\n $user = new User();\n $user->setUsername($this->faker->userName)\n ->setEmail($this->faker->email)\n ->setRoles(User::ROLE_USER)\n ->setPassword($this->encoder->encodePassword($user, \"Hub3E2021!\"));\n $manager->persist($user);\n\n $newTools = new Tools();\n $newTools->setName($tools[\"name\"])\n ->setDescription($tools[\"description\"])\n ->setRelation($user);\n $manager->persist($newTools);\n }\n $simpleUser = new User();\n $simpleUser->setUsername(\"user\")\n ->setEmail(\"[email protected]\")\n ->setRoles(User::ROLE_USER)\n ->setPassword($this->encoder->encodePassword($simpleUser, \"Hub3E2021!\"));\n $manager->persist($simpleUser);\n\n $user = new User();\n $user->setUsername(\"admin\")\n ->setEmail(\"[email protected]\")\n ->setRoles(User::ROLE_ADMIN)\n ->setPassword($this->encoder->encodePassword($user, \"Hub3E2021!\"));\n $manager->persist($user);\n\n $manager->flush();\n }", "public function testGetExistingWithConfigData()\n {\n $users = CollectionRegistry::get('Users');\n CollectionRegistry::get('Users', ['name' => 'my_users']);\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testGetExistingWithConfigData()\n {\n $users = TableRegistry::get('Users');\n TableRegistry::get('Users', ['table' => 'my_users']);\n }", "public function setUp()\n\t{\n\t\tparent::setUp();\n if(is_array($this->fixtures)){\n foreach($this->fixtures as $fixtureName=>$modelClass)\n {\n $tableName=WF_Table::model($modelClass)->tableName();\n $this->resetTable($tableName);\n $rows=$this->loadFixtures($modelClass, $tableName);\n if(is_array($rows) && is_string($fixtureName))\n {\n $this->_rows[$fixtureName]=$rows;\n if(isset($modelClass))\n {\n foreach(array_keys($rows) as $alias)\n $this->_records[$fixtureName][$alias]=$modelClass;\n }\n }\n }\n }\n }", "protected function getFixtures()\n {\n return array(\n __DIR__ . '/../../Resources/fixtures/BlogArticle.yml',\n );\n }", "public function getUserData()\n {\n return $this->file->get(self::SETTING_USER_DATA);\n }", "public function run(Faker\\Generator $faker)\n {\n $userJSON = File::get(storage_path('data/users.json'));\n $datas = json_decode($userJSON);\n\n foreach ($datas as $user)\n {\n App\\User::create([\n 'username' => $user->username,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n 'role' => $user->role,\n 'level' => ($user->level) ?: null,\n ]);\n }\n }", "public function load() { }", "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}", "public function testGetFixture()\n {\n $this->assertNull(SeederTask::getFixtureFile());\n }", "protected function setUp(): void\n {\n \tparent::setUp();\n\n \t$this->authorize();\n\n \t$this->loadFixtures([\n \t\t'product'=>ProductFixture::class\n \t]);\n }", "public function load($data);", "private function setupUsers()\n {\n $users = [\n [\n 'username' => '[email protected]',\n 'email' => '[email protected]',\n 'password' => 'test123',\n 'password-encoder' => $this->passwordEncoder\n ],\n [\n 'username' => '[email protected]',\n 'email' => '[email protected]',\n 'password' => 'test123',\n 'password-encoder' => $this->passwordEncoder\n ],\n [\n 'username' => '[email protected]',\n 'email' => '[email protected]',\n 'password' => 'test123',\n 'password-encoder' => $this->passwordEncoder\n ],\n ];\n\n $container = $this->setupData($users, User::class);\n\n $this->users = $container;\n }", "private function loadData() {\n // If the file does not yet exists we cancel immediately\n if (!file_exists(DATA_FILE)) return;\n\n // Grab all the contents from the file\n $data = file_get_contents(DATA_FILE);\n // And convert it to a json object\n $data = json_decode($data);\n\n // If something went wrong with decoding we cancel\n if ($data == false) return;\n\n // Store our information in our object\n $this->accessToken = $data->accessToken;\n $this->expirationDate = $data->expirationDate;\n $this->refreshToken = $data->refreshToken;\n }", "public function load() {\n\t\tglobal $config;\n\t\n\t\tif($this->exists()){ // User exists\n\t\t\tif(!empty($this->data['id']))\n\t\t\t\t$where = 'id = '.$this->data['id'];\n\t\t\telseif(!empty($this->data['fbid']))\n\t\t\t\t$where = 'fbid = '.$this->data['fbid'];\n\t\t\t\t\n\t\t\t$result = $config['database']->query(\"\n\t\t\t\tSELECT *\n\t\t\t\tFROM nuusers\n\t\t\t\tWHERE $where\n\t\t\t\tLIMIT 1\n\t\t\t\");\n\t\t\t$row = $result->fetch_assoc();\n\t\t\t\n\t\t\tforeach($row as $key => $val){\n\t\t\t\tif($key == 'options'){\n\t\t\t\t\t$this->data['options'] = json_decode($val, true);\n\t\t\t\t}else if(is_string($val)){\n\t\t\t\t\tif(!get_magic_quotes_gpc())\n\t\t\t\t\t\t$this->data[$key] = stripslashes($val);\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->data[$key] = $val;\n\t\t\t\t}else{\n\t\t\t\t\t$this->data[$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(empty($this->data['photo'])){\n\t\t\t\tglobal $config;\n\t\t\t\t\n\t\t\t\tif($this->data['faculty'])\n\t\t\t\t\t$this->data['photo'] = $config['imagesurl'].'/faculty.jpg';\n\t\t\t\telse\n\t\t\t\t\t$this->data['photo'] = $config['imagesurl'].'/anonymous.gif';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->data['level'] = $this->loadLevel();\n\t\t\t$this->data['levelProgress'] = $this->loadLevelProgress();\n\t\t\t$this->data['rank'] = $this->loadRank();\n\t\t\t$this->data['achievements'] = $this->loadAchievements();\n\t\t\t$this->data['post_counts'] = $this->loadPostCounts();\n\t\t\t\n\t\t\treturn $result;\n\t\t}else{ // User does not exists\n\t\t\tif($this->data['fbid']){ // New user from facebook\n\t\t\t\tglobal $fbme;\n\t\t\t\t\n\t\t\t\t$y = substr($fbme['birthday'],6);\n\t\t\t\t$m = substr($fbme['birthday'],0,2);\n\t\t\t\t$d = substr($fbme['birthday'],3,2);\n\t\t\t\t$bday = $y.'-'.$m.'-'.$d;\n\t\t\t\t\n\t\t\t\t$create = $this->create(array(\n\t\t\t\t\t'first_name' => $fbme['first_name'],\n\t\t\t\t\t'last_name' => $fbme['last_name'],\n\t\t\t\t\t'email' => $fbme['email'],\n\t\t\t\t\t'birthday' => $bday,\n\t\t\t\t\t'gender' => $fbme['gender']\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\treturn $create;\n\t\t\t}else{ // Invalid user id\n\t\t\t\t$this->data['id'] = null;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "function loadFixture($fixtureFile) {\n\t\t$parser = new Spyc();\n\t\t$fixtureContent = $parser->load(Director::baseFolder().'/'.$fixtureFile);\n\t\t\n\t\t$this->fixture = new YamlFixture($fixtureFile);\n\t\t$this->fixture->saveIntoDatabase();\n\t}", "public function registerFixturesUser(array $userData)\n {\n $user = new FrontendUser();\n $user->setEmail($userData['email']);\n $user->setUsername($userData['username']);\n $user->setPlainPassword($userData['password']);\n $user->setEnabled($userData['enabled']);\n $user->setLocked($userData['locked']);\n $user->setLastLogin(new \\DateTime(date('Y-m-d H:i:s')));\n $user->setPhone($userData['phone']);\n $user->setWebsite($userData['website']);\n $user->setFacebook($userData['facebook']);\n $user->setTwitter($userData['twitter']);\n $user->setAbout($userData['about']);\n\n $this->dm->persist($user);\n $this->dm->flush();\n\n return $user;\n }", "public function _fixtures()\n {\n return [\n\n 'base_date' => [\n 'class' => BaseDataFixture::class,\n 'dataFile' => codecept_data_dir() . 'base_data_data.php',\n ],\n\n ];\n }", "function getUser()\r\n {\r\n $users = file_get_contents('storage/users.json');\r\n return json_decode($users);\r\n }", "public function testLoadWithCollection() {\n\t\t$options = $this->_loadOptions;\n\t\t$posts = Fixture::load('models/Posts', $options);\n\t\t$this->_testLoad($posts);\n\t}", "public function edit_load_user_data($user) {\n if ($this->data !== null) {\n $this->data = clean_text($this->data, $this->dataformat);\n $user->{$this->inputname} = array('text' => $this->data, 'format' => $this->dataformat);\n }\n }", "public function seedUser()\n\t{\n\t\t// User ID or screen name\n\t\treturn array(\n\t\t\tarray(234654235457),\n\t\t\tarray('testUser'),\n\t\t\tarray(null)\n\t\t\t);\n\t}", "private function determineFixturesPath() {}", "public function load(ObjectManager $manager)\n {\n $userManager = $this->container->get('fos_user.user_manager');\n\n $user = $userManager->createUser();\n $user->setEmail('[email protected]');\n $user->setUsername('admin');\n $user->setname('admin');\n $user->setPlainPassword('admin');\n $user->setEnabled(true);\n $user->addRole('ROLE_ADMIN');\n $this->addReference('user-admin', $user);\n $userManager->updateUser($user);\n\n // Fixture article !\n for ($i = 0; $i < 8; $i++) {\n $Article = new Article();\n $Article->setTitle('Titre' . $i);\n $Article->setContent('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.');\n $Article->setPrice('1399');\n $Article->setMainPicture('fixture0.jpeg');\n $Article->setGalleryPicture(['fixture1.jpeg','fixture2.jpeg','fixture3.jpeg','fixture4.jpeg','fixture5.jpeg','fixture6.jpeg']);\n $manager->persist($Article);\n }\n $manager->flush();\n }", "public function an_user_makes_a_successfull_data_creation()\n {\n $data = factory(Data::class)->create();\n $this->assertDatabaseHas('data', $data->toArray());\n }", "protected function setUp()\n {\n $this->setUpFilesystem();\n $this->object = Config::table('users');\n }", "protected function postFixtureSetup()\n {\n }", "public function run()\n {\n User::truncate();\n factory(User::class, 1)->create(); //create user with random data\n }", "function readInputData() {\n\t\t$this->readUserVars(\n\t\t\tarray(\n\t\t\t\t'username', 'password', 'password2',\n\t\t\t\t'firstName', 'middleName', 'lastName', 'initials',\n\t\t\t\t'affiliation', 'email', 'userUrl', 'phone', 'fax',\n\t\t\t\t'mailingAddress', 'biography', 'interests', 'userLocales',\n\t\t\t\t'registerAsReader', 'openAccessNotification', 'registerAsAuthor',\n\t\t\t\t'registerAsReviewer', 'existingUser'\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ($this->getData('userLocales') == null || !is_array($this->getData('userLocales'))) {\n\t\t\t$this->setData('userLocales', array());\n\t\t}\n\t\t\n\t\tif ($this->getData('username') != null) {\n\t\t\t// Usernames must be lowercase\n\t\t\t$this->setData('username', strtolower($this->getData('username')));\n\t\t}\n\t}", "public function setUp() {\n $this->user = new \\App\\Models\\User;\n }", "public function load()\n {\n $input = $this->getCleanInput();\n $this->populate($input);\n }", "public function load(ObjectManager $em){\n $userManager = $this->container->get('fos_user.user_manager');\n $mail = $this->container->getParameter('mail_business');\n\n\n $users = [\n [\n 'username' => 'user',\n 'email' => $mail,\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'pw' => 'aze',\n 'roles' => ['ROLE_SUPER_ADMIN','ROLE_ADMIN'],\n 'img' => 'superadmin.png'\n ],\n [\n 'username' => 'simpleuser',\n 'email' => '[email protected]',\n 'firstname' => 'Bilbon',\n 'lastname' => 'Sacquet',\n 'pw' => 'aze',\n 'roles' => ['ROLE_USER'],\n 'img' => 'user.png'\n ]\n ];\n\n foreach ($users as $key => $userData) {\n extract($userData);\n\n // Create our user and set details\n $user = $userManager->createUser();\n\n $user->setUsername($username);\n $user->setFirstName($firstname);\n $user->setLastname($lastname);\n $user->setEmail($email);\n $user->setPlainPassword($pw);\n $user->setDateCrea(new \\DateTime());\n $user->setDateUpd(new \\DateTime());\n\n //$user->setPassword('3NCRYPT3D-V3R51ON');\n $user->setEnabled(true);\n $user->setRoles($roles);\n $user->setImg($img);\n \n // Update the user\n $userManager->updateUser($user, true);\n }\n\n\n }", "public function setUp()\n {\n $this->reloadSchema();\n $this->reloadDataFixtures();\n }", "public function loadData(){\r\n\t\t\t $pseudo = addslashes($this -> getPseudo()) ;\r\n\r\n\t\t if(! empty($pseudo)){\r\n\t\t\t$q = \"select * from UserTab where User_pseudo='\".$pseudo.\"'\";\r\n\t\t\t$r = execute($q);\r\n\t\t\twhile( $l = mysql_fetch_assoc($r) ){\r\n\t\t\t\t$this -> setFields($l);//Affectation aux champs de l'objet UserTab \r\n\t\t\t}\r\n\t\t }\r\n\r\n\t }", "public function load(ObjectManager $manager)\n {\n // Fixtures are split into separate files\n }", "public function loadData($context)\n\t{\n\t\t$this->first_name = $context->employee->firstname;\n\t\t$this->last_name = $context->employee->lastname;\n\t\t$this->email = $context->employee->email;\n\t}" ]
[ "0.75053596", "0.7176572", "0.7013669", "0.69031966", "0.6614586", "0.6614528", "0.65941393", "0.6524029", "0.64610875", "0.6450042", "0.64295334", "0.62986416", "0.6252047", "0.62311286", "0.61843115", "0.61728495", "0.6158179", "0.61407155", "0.6034951", "0.6029332", "0.6018837", "0.60123885", "0.5983109", "0.5964255", "0.5964255", "0.59400946", "0.59336746", "0.5904939", "0.5904939", "0.5850354", "0.58373433", "0.58141315", "0.58141285", "0.58007747", "0.57951975", "0.5794962", "0.5771516", "0.5738602", "0.5732778", "0.573074", "0.5728773", "0.5726269", "0.57252675", "0.57237357", "0.5703055", "0.5674213", "0.5665101", "0.56626177", "0.5639083", "0.5628059", "0.5617893", "0.5616816", "0.5616052", "0.5604263", "0.56018025", "0.55976725", "0.5591962", "0.5588108", "0.5583147", "0.5574627", "0.55694777", "0.55677706", "0.556219", "0.5561097", "0.5561097", "0.5561097", "0.5555572", "0.55396444", "0.55334735", "0.5527075", "0.5519882", "0.5519712", "0.5499977", "0.5496392", "0.5490548", "0.5487969", "0.54850316", "0.54831314", "0.54798", "0.5479779", "0.54784393", "0.54733896", "0.5472351", "0.54640675", "0.5462155", "0.5449861", "0.54495096", "0.5449505", "0.54491454", "0.54429424", "0.54387987", "0.5437708", "0.543689", "0.5434933", "0.54324925", "0.542982", "0.5429683", "0.5429544", "0.541714", "0.54147613" ]
0.6666704
4
Run the database seeds.
public function run() { // $items = [ [ 'name' => 'Imperial Salon', 'location_id' => 1, 'category_id' => 1, 'description' => 'We are making your hair awesome', 'service' => 'Haircut (man)', 'price' => 180 ], [ 'name' => 'Incognito Studio', 'location_id' => 1, 'category_id' => 1, 'description' => 'We\'ll cut you - incognito', 'service' => 'Haircut (woman)', 'price' => 280 ], [ 'name' => 'Frisør Kruse', 'location_id' => 1, 'category_id' => 1, 'description' => 'Vi er beder nu!', 'service' => 'Beardcut', 'price' => 100 ], [ 'name' => 'Classique Nails & Beauty', 'location_id' => 1, 'category_id' => 2, 'description' => 'Nails, nails, nails', 'service' => 'Manicure', 'price' => 300 ], [ 'name' => 'Beauty Boxen', 'location_id' => 1, 'category_id' => 2, 'description' => 'Beauty salon - just for your beauty', 'service' => 'Pedicure', 'price' => 250 ], [ 'name' => 'Nyah-Beauty', 'location_id' => 1, 'category_id' => 2, 'description' => 'Nyah - yeah!', 'service' => 'Yeah service!', 'price' => 240 ], [ 'name' => 'Urban Living', 'location_id' => 1, 'category_id' => 3, 'description' => 'Wanna make all Copenhageners envy? Come visit us!', 'service' => 'Envy dealer', 'price' => 300 ], [ 'name' => 'Niedzeiella & Friends', 'location_id' => 1, 'category_id' => 3, 'description' => 'Make your home hyggelig again', 'service' => 'Hyggelig painting combo', 'price' => 240 ], [ 'name' => 'Festbutikken', 'location_id' => 1, 'category_id' => 3, 'description' => 'Sparkle your festival with us', 'service' => 'A viking helmet', 'price' => 50 ], [ 'name' => 'Graffiti / Street Art', 'location_id' => 1, 'category_id' => 4, 'description' => 'Come and see the street art - alone, when it ends', 'service' => 'Quarantine tour', 'price' => 50 ], [ 'name' => 'Galleri Tom Christoffersen', 'location_id' => 1, 'category_id' => 4, 'description' => 'We are awesome at art', 'service' => 'Posters', 'price' => 20 ], [ 'name' => 'Soul Craft Sisters', 'location_id' => 1, 'category_id' => 4, 'description' => 'We are sisters, and we are artsy', 'service' => 'Your portrait', 'price' => 150 ], [ 'name' => 'Crossfit Copenhagen', 'location_id' => 1, 'category_id' => 5, 'description' => 'Crossfit yourself', 'service' => 'Online course', 'price' => 120 ], [ 'name' => 'White Sport', 'location_id' => 1, 'category_id' => 5, 'description' => 'Learn how to play tennis with us', 'service' => 'Home online course', 'price' => 100 ], [ 'name' => 'Rumble Sports', 'location_id' => 1, 'category_id' => 5, 'description' => 'Boxing is in our hears', 'service' => 'Boxing gloves', 'price' => 100 ], [ 'name' => 'CPH Bowling & Lounge', 'location_id' => 1, 'category_id' => 6, 'description' => 'Bowl bowl bowl', 'service' => 'A 2-hour round of bowling', 'price' => 200 ], [ 'name' => 'Bastard Cafe', 'location_id' => 1, 'category_id' => 6, 'description' => 'Everybody knows us', 'service' => 'Yearly membership', 'price' => 100 ], [ 'name' => 'Creative Space', 'location_id' => 1, 'category_id' => 6, 'description' => 'Unleash your creativity', 'service' => 'Paint', 'price' => 150 ], [ 'name' => 'Joe - the coach', 'location_id' => 1, 'category_id' => 7, 'description' => 'I can make you fit - from home', 'service' => 'Fitness program', 'price' => 200 ], [ 'name' => 'Nutrinize', 'location_id' => 1, 'category_id' => 7, 'description' => 'Nutrition is important, so are you,', 'service' => '4-week nutrition program', 'price' => 250 ], [ 'name' => 'Coachingbydane', 'location_id' => 1, 'category_id' => 7, 'description' => 'Life coaching', 'service' => 'Life-long value coaching program', 'price' => 400 ], [ 'name' => 'Luxury Beauty Salon ', 'location_id' => 2, 'category_id' => 1, 'description' => 'Luxury hairstyling services ', 'service' => 'Hairstyling, coloring', 'price' => 750 ], [ 'name' => 'P.E.R.', 'location_id' => 2, 'category_id' => 1, 'description' => 'Luxury hairstyling services ', 'service' => 'Hairstyling, coloring', 'price' => 750 ], [ 'name' => 'Freqenz', 'location_id' => 2, 'category_id' => 1, 'description' => 'GØR KLIPNING HOS DIN FRISØR TIL EN OPLEVELSE', 'service' => 'Hairstyling, coloring', 'price' => 500 ], [ 'name' => 'NYCE', 'location_id' => 2, 'category_id' => 1, 'description' => 'New York Cosmetic Experience', 'service' => 'Hairstyling, coloring', 'price' => 700 ], [ 'name' => 'Birthe-gleerup', 'location_id' => 2, 'category_id' => 1, 'description' => 'Miljø venlig frisør', 'service' => 'Hairstyling, coloring', 'price' => 800 ], [ 'name' => 'Aviva Clinique', 'location_id' => 2, 'category_id' => 2, 'description' => 'We make you beautiful.', 'service' => 'Facial masagge ', 'price' => 350 ], [ 'name' => 'Victoria Beauty ', 'location_id' => 2, 'category_id' => 2, 'description' => 'I care for your face', 'service' => 'Cleansing treatment ', 'price' => 300 ], [ 'name' => 'ML Beauty Salon', 'location_id' => 2, 'category_id' => 2, 'description' => 'The brows make the difference', 'service' => 'Microblending ', 'price' => 750 ], [ 'name' => 'Cucu Lashes ', 'location_id' => 2, 'category_id' => 2, 'description' => 'Your lashes, my power.', 'service' => 'Lash extenstion ', 'price' => 600 ], [ 'name' => 'Maria Nails', 'location_id' => 2, 'category_id' => 2, 'description' => 'Nails to a next level.', 'service' => 'Manicure', 'price' => 300 ], [ 'name' => 'City Stoffer & Garn', 'location_id' => 2, 'category_id' => 3, 'description' => 'Find your new material.', 'service' => 'Materials ', 'price' => 20 ], [ 'name' => 'Garn og Design ', 'location_id' => 2, 'category_id' => 3, 'description' => 'We know where your red thread is.', 'service' => 'Knitting thread', 'price' => 50 ], [ 'name' => 'Formuleret Keramik', 'location_id' => 2, 'category_id' => 3, 'description' => 'Skandinavisk ceramic design', 'service' => 'Online course', 'price' => 100 ], [ 'name' => 'Aros', 'location_id' => 2, 'category_id' => 4, 'description' => 'Museum', 'service' => 'Virtual tour', 'price' => 50 ], [ 'name' => 'Mosgård', 'location_id' => 2, 'category_id' => 4, 'description' => 'Museum', 'service' => 'Virtual tour', 'price' => 51 ], [ 'name' => 'Aarhus Klatreblub', 'location_id' => 2, 'category_id' => 5, 'description' => 'Climb your way. ', 'service' => 'Climbing personal training', 'price' => 150 ], [ 'name' => '1900tennis', 'location_id' => 2, 'category_id' => 5, 'description' => 'Hit the ball. ', 'service' => 'Tennis personal training', 'price' => 150 ], [ 'name' => 'Spanien', 'location_id' => 2, 'category_id' => 5, 'description' => 'swimming pool', 'service' => '1 month mebership', 'price' => 150 ], [ 'name' => 'Brætspil', 'location_id' => 2, 'category_id' => 6, 'description' => 'Board games', 'service' => 'Drinks gift card', 'price' => 200 ], [ 'name' => 'Acting for Fun', 'location_id' => 2, 'category_id' => 6, 'description' => 'Acting ', 'service' => '1 month membership ', 'price' => 500 ], [ 'name' => 'Fitness institute ', 'location_id' => 2, 'category_id' => 7, 'description' => 'Nutrition and personal training', 'service' => '20 sessions', 'price' => 1500 ], ]; foreach ($items as $item) { Business::updateOrCreate($item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8014072", "0.7980389", "0.7977261", "0.79545176", "0.7951285", "0.7949779", "0.79447794", "0.79427236", "0.7938544", "0.7937133", "0.7933888", "0.7892658", "0.78813094", "0.7879304", "0.78790134", "0.7875582", "0.78718805", "0.7870327", "0.7851507", "0.78506047", "0.7841656", "0.7834773", "0.782799", "0.7819246", "0.7809116", "0.7803176", "0.7802559", "0.7800953", "0.7799208", "0.77958846", "0.77905864", "0.7788729", "0.7786444", "0.7778857", "0.7777666", "0.7765372", "0.77626014", "0.7762562", "0.77622634", "0.77615577", "0.7760895", "0.77596897", "0.7757152", "0.7753893", "0.77497184", "0.77495176", "0.77468747", "0.77301675", "0.77291715", "0.772798", "0.7716827", "0.77145964", "0.7714208", "0.7713344", "0.77125347", "0.771253", "0.7711237", "0.77112275", "0.77108705", "0.7710304", "0.7705747", "0.77048707", "0.770442", "0.77041996", "0.77028614", "0.77021116", "0.77008957", "0.7698864", "0.76987725", "0.7697583", "0.76966494", "0.76945114", "0.7692977", "0.7691408", "0.76907796", "0.7688464", "0.7687695", "0.7686974", "0.7686826", "0.76851374", "0.7684132", "0.7679417", "0.7678492", "0.76778567", "0.76769906", "0.76728696", "0.7671034", "0.76692134", "0.7668971", "0.7668952", "0.7666531", "0.7662757", "0.7662455", "0.76616526", "0.765996", "0.7656754", "0.765413", "0.76537156", "0.76526105", "0.76523715", "0.7652133" ]
0.0
-1
Create or get user from social account
public function createOrGetUser($provider) { $providerUser = \Socialite::driver($provider)->user(); $account = SocialAccount::whereProvider($provider) ->whereProviderUserId($providerUser->getId()) ->first(); if ($account) { return $account->user; } else { $account = new SocialAccount([ 'provider_user_id' => $providerUser->getId(), 'provider' => $provider ]); $user = User::whereEmail($providerUser->getEmail())->first(); if (!$user) { DB::beginTransaction(); try { $user = User::create([ 'role_id' => 2, ]); Profile::create([ 'user_id' => $user->id, 'name' => $providerUser->name, 'avatar' => $providerUser->avatar, ]); DB::commit(); } catch (Exception $e) { Log::error($e); DB::rollback(); } } $account->user()->associate($user); $account->save(); return $user; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createUserFromSocialite($user);", "public function createOrGetUser(Request $request)\n {\n $portal = $this->getUserInfo($request);\n\n // retrive account\n $account = SocialAccount::whereProvider('portal')\n ->whereProviderUserId($portal->{'id'})\n ->first();\n // if exist\n if ($account) {\n return $account->user;\n } else {\n // no exist, create user\n $account = new SocialAccount([\n 'provider_user_id' => $portal->{'id'},\n 'provider' => 'portal'\n ]);\n $user = User::create([\n 'email' => $portal->{'id'} . '@cc.ncu.edu.tw',\n 'name' => $portal->{'name'},\n // 'real_name' => $portal->{'name'},\n 'id' => $portal->{'id'},\n 'phone' => '無資料',\n 'level' => '一般使用者'\n // 'unit' => $portal->{'unit'},\n // 'type' => $portal->{'type'}\n ]);\n\n // social_accounts associate to user\n $account->user()->associate($user);\n $account->save();\n\n return $user;\n }\n }", "public function createOrGetUser(ProviderUser $providerUser)\n {\n \n\n $account = SocialLoginAccount::where('provider', 'google')\n ->where('provider_user_id', $providerUser->getId())\n ->first();\n\n if ($account) {\n\n return $account->user; //relationship to user table\n \n\n } else {\n\n $account = new SocialLoginAccount([\n 'provider_user_id' => $providerUser->getId(),\n 'provider' => 'google'\n ]);\n\n $user = User::where('email', $providerUser->getEmail())->first();\n\n if (!$user) {\n \n \n $user = User::create([\n 'fk_usertype'=> 1008, //Normal User. Default User Access\n 'uname'=> $providerUser->getEmail(),\n 'fname'=> $providerUser->user['given_name'],\n 'lname'=> $providerUser->user['family_name'],\n 'fullname'=> $providerUser->getName(),\n 'email' => $providerUser->getEmail(),\n 'password'=> 'test', //default password\n 'fk_country'=> 229, //USA default,\n 'state'=> 'Alabama', //default state from db,\n 'city'=> 'Alabama',\n 'shippingcountry'=> 229, //USA default,\n 'shippingstate'=> 'Alabama', //default state from db,\n 'activation_token'=> null, //email automatically activated\n 'fk_referredby'=> session('yeslife_referrer_id'), //initialize @App/Providers/AppServiceProvider.php\n 'issubscribed'=> 1,\n 'istext'=> 1,\n 'stat'=> 1\n ]);\n \n $token = MyHelperClass::generateRandomString(10).''.$user->id;\n $user->update([\n 'affiliate_token'=> $token,\n 'password'=> bcrypt($token), //default password\n ]);\n \n }elseif( !$user->fname ){\n\n //check for empty info then update details base on social media.\n //empty for \"Special Offers for Subscription\" user\n\n $user->update([\n 'fname'=> $providerUser->user['given_name'],\n 'lname'=> $providerUser->user['family_name'],\n 'fullname'=> $providerUser->getName(),\n 'activation_token'=> null, //email automatically activated\n 'issubscribed'=> 1,\n 'istext'=> 1,\n 'stat'=> 1\n ]);\n\n\n }//END if !$user\n \n \n //setup relationship to SocialLoginAccount\n $account->user()->associate($user);\n $account->save();\n\n return $user;\n \n }//END else $account\n \n }", "function connectUser($facebook, $facebookProfil){\n $facebookId= $facebookProfil['id'];\n \n // try to find if user exist in database\n $user = User::findUserByFacebookId($facebookId);\n\n // create a user in database if not\n if ($user == null) {\n $username = $facebookProfil[\"username\"];\n $last_name = $facebookProfil[\"last_name\"];\n $first_name = $facebookProfil[\"first_name\"];\n $email = $facebookProfil[\"email\"];\n $token = $facebook->getAccessToken();\n $score = 0;\n\n $newUser = new User($facebookId, $username, $first_name, $last_name, $email, $token, $score);\n User::add($newUser);\n\n Session::getInstance()->setUserSession($newUser);\n } else {\n Session::getInstance()->setUserSession($user[0]);\n }\n}", "public function facebookAccountCallback()\n {\n try {\n $social_user = Socialite::driver($this->facebookProvider)->fields(['name', 'first_name', 'last_name', 'email'])->stateless()->user();\n if (!$social_user) {\n return redirect('/login')->with('error', trans('messages.something_wrong'));\n }\n\n $email = $social_user->email;\n if ($email == null) {\n $email = $social_user->id . '@facebook.com';\n }\n $name = $social_user->name;\n\n $user = User::where('facebook_id', $social_user->id)->orWhere('email', $email)->first();\n if ($user) {\n if ($user->facebook_id == null) {\n $user->facebook_id = $social_user->id;\n $user->save();\n }\n } else {\n $first_name = $name;\n if (isset($social_user->user['first_name']) && $social_user->user['first_name']) {\n $first_name = $social_user->user['first_name'];\n }\n $last_name = null;\n if (isset($social_user->user['last_name']) && $social_user->user['last_name']) {\n $last_name = $social_user->user['last_name'];\n }\n\n $request = [\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email,\n 'facebook_id' => $social_user->id,\n ];\n $user = $this->create($request);\n }\n Auth::login($user);\n return redirect()->route($this->redirectTo);\n\n } catch (Exception $e) {\n return redirect('/login')->with('error', trans('messages.something_wrong'));\n }\n }", "public function socialFindOrCreateUser($user, $provider) {\n $socialProfile = SocialProfile::where('email', $user['email'])\n ->where('provider', $provider)\n ->first();\n if (!$socialProfile) {\n // Create Social Profile\n $email = $user['email'];\n if (!$email) {\n $email = $user['nickname'];\n }\n $socialProfile = SocialProfile::create([\n 'provider' => $provider, \n 'provider_id' => $user['id'], \n 'email' => $email, \n 'token' => $user['token']\n ]);\n }\n\n $authUser = $socialProfile->user;\n if ($authUser) {\n if ($authUser->status == config('sc.user_status.pending')) {\n // Not need to verify in social login\n $authUser->status = config('sc.user_status.active');\n $authUser->save();\n }\n return $authUser;\n }\n\n // Create New User\n $authUser = User::create([\n 'name' => $user['name'],\n 'email' => $user['email'],\n 'type' => config('sc.user_type.app_user'), \n 'status' => config('sc.user_status.active') // Not need to verify in social login\n ]);\n\n // User Role (APP_USER)\n $authUser->detachRoles();\n $role = Role::where('name', config('sc.user_role.app_user'))->first();\n $authUser->attachRole($role);\n\n // Not need to send verification mail\n return $authUser;\n }", "public function FacebookserFindOrCreate($facebook_user){\n $user = User::where('facebook_id',$facebook_user->id)->first();\n\n if ($user){\n $user = new User;\n $user->name = $facebook_user->getName();\n $user->email = $facebook_user->getEmail();\n $user->github_id = $facebook_user->getid();\n }\n return $user;\n }", "function ggouv_twitter_api_create_user($twitter) {\n\t// check new registration allowed\n\tif (!twitter_api_allow_new_users_with_twitter()) {\n\t\tregister_error(elgg_echo('registerdisabled'));\n\t\tforward();\n\t}\n\n\t// Elgg-ify Twitter credentials\n\t$username = $twitter->screen_name;\n\twhile (get_user_by_username($username)) {\n\t\t// @todo I guess we just hope this is good enough\n\t\t$username = $twitter->screen_name . '_' . rand(1000, 9999);\n\t}\n\n\t$password = generate_random_cleartext_password();\n\t$name = $twitter->name;\n\n\t$user = new ElggUser();\n\t$user->username = $username;\n\t$user->name = $username;\n\t$user->realname = $name;\n\t$user->twitter = $twitter->screen_name;\n\t$user->access_id = ACCESS_PUBLIC;\n\t$user->salt = generate_random_cleartext_password();\n\t$user->password = generate_user_password($user, $password);\n\t$user->owner_guid = 0;\n\t$user->container_guid = 0;\n\n\tif (!$user->save()) {\n\t\tregister_error(elgg_echo('registerbad'));\n\t\tforward();\n\t}\n\n\treturn $user;\n}", "private function findOrCreateUser($facebookUser)\n {\n $authUser = User::where('facebook', $facebookUser->id)->first();\n \t\t\n if ($authUser){\n return $authUser;\n }\n \n return User::create([\n 'name' => $facebookUser->name,\n 'email' => $facebookUser->email,\n 'facebook' => $facebookUser->id,\n 'avatar' => $facebookUser->avatar\n ]);\n }", "private function findOrCreateUser($socialUser,$provider)\n {\n $authUser = User::where('email', $socialUser->email)->first();\n if ($authUser){\n $providerExist = UserProvider::where('provider_id', $socialUser->id)->first();\n if(!$providerExist){\n UserProvider::create([\n 'user_id'=>$authUser->id,\n 'provider'=>$provider,\n 'provider_id'=>!empty($socialUser->id)?$socialUser->id:'',\n 'provider_token'=>!empty($socialUser->token)?$socialUser->token:'',\n 'avatar' => !empty($socialUser->avatar)?$socialUser->avatar:'',\n ]);\n } \n return $authUser;\n }\n $authUser = User::create([\n 'firstname' => !empty($socialUser->user->first_name)?$socialUser->user->first_name:$socialUser->name,\n 'name' => !empty($socialUser->name)?$socialUser->name:'',\n 'email' => !empty($socialUser->email)?$socialUser->email:'',\n ]);\n $userProvider = [\n 'user_id'=>$authUser->id,\n 'provider'=>$provider,\n 'provider_id'=>!empty($socialUser->id)?$socialUser->id:'',\n 'provider_token'=>!empty($socialUser->token)?$socialUser->token:'',\n 'avatar' => !empty($socialUser->avatar)?$socialUser->avatar:'',\n ]; \n UserProvider::firstOrCreate($userProvider);\n \n return $authUser;\n }", "private function findOrCreateUser($providerUser, $service)\n {\n\n $account = SocialAuth::whereProvider($service)\n ->whereProviderId($providerUser->getId())\n ->first();\n\n if ($account) {\n return $account->user;\n } else {\n $account = new SocialAuth([\n 'provider_id' => $providerUser->getId(),\n 'provider' => $service\n ]);\n\n $user = User::whereEmail($providerUser->getEmail())->first();\n\n if (!$user) {\n $user = User::create([\n 'email' => $providerUser->getEmail(),\n 'avatar' => $providerUser->getAvatar(),\n 'name' => $providerUser->getName(),\n 'password' => bcrypt(rand(1,10000)),\n ]);\n }\n\n $account->user()->associate($user);\n $account->save();\n\n return $user;\n }\n }", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "private function facebookCreateOrLoginUser($userData)\n {\n $user = User::where('email', $userData->email)->first();\n\n if (!$user) {\n $user = new User();\n $user->fill([\n 'name' => $userData->name,\n 'email' => $userData->email,\n 'active' => 1,\n ]);\n $user->setLocation('56.002490 13.293257');\n $user->save();\n\n \\App\\Helpers\\SlackHelper::message('notification', $userData->name . ' (' . $userData->email . ')' . ' signed up as a user through Facebook.');\n }\n\n return $user;\n }", "public static function user() {\n // $userInfo = $oauth2->userinfo->get();\n $userInfo = json_decode(json_encode(['email' => '@', 'gender' => null, 'name' => 'test', 'picture' => 'f']));\n return User::fromGoogleUser($userInfo);\n \n }", "public function googleAccountCallback()\n {\n \ttry {\n $social_user = Socialite::driver($this->googleProvider)->stateless()->user();\n if (!$social_user) {\n return redirect('/login')->with('error', trans('messages.something_wrong'));\n }\n\n $email = $social_user->email;\n $name = $social_user->name;\n\n $user = User::where('google_id', $social_user->id)->orWhere('email', $email)->first();\n if ($user) {\n if ($user->google_id == null) {\n $user->google_id = $social_user->id;\n $user->save();\n }\n } else {\n $first_name = $name;\n if (isset($social_user->user['given_name']) && $social_user->user['given_name']) {\n $first_name = $social_user->user['given_name'];\n }\n $last_name = null;\n if (isset($social_user->user['family_name']) && $social_user->user['family_name']) {\n $last_name = $social_user->user['family_name'];\n }\n\n $request = [\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email,\n 'google_id' => $social_user->id,\n ];\n $user = $this->create($request);\n }\n Auth::login($user);\n return redirect()->route($this->redirectTo);\n\n \t} catch (Exception $e) {\n \t\treturn redirect('/login')->with('error', trans('messages.something_wrong'));\n \t}\n }", "public function loadUserBySocialId($socialId);", "private function findOrCreateUser($driver,$socialUser)\n {\n if($driver == 'instagram'){\n\n $authUser = instagram::where('instagram_id', $socialUser->id)->first();\n $id = Auth::id();\n if ($authUser){\n return $authUser;\n }\n \n return instagram::create([\n 'name' => $socialUser->name,\n 'handle' => $socialUser->nickname,\n 'instagram_id' => $socialUser->id,\n 'avatar' => $socialUser->avatar,\n 'user_id' => $id,\n ]);\n }\n\n \n }", "public function getLogin($social){\n\t\ttry{\n\t\t\tswitch($social){\n\t\t\t\tcase 'facebook':\n\t\t\t\t\t$su = \\Social::facebook('user');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'google':\n\t\t\t\t\t$su = \\Social::google('user');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$su = null;\n\t\t\t}\n\n\t\t\tif ($su===null)\n\t\t\t\treturn \\Redirect::route('frontend.index');\n\n\t\t\t$m = \\Member::where('uid', '=', $su->id)->where('social', '=', $social)->first();\n\n\t\t\tif ($m==null){\n\t\t\t\t$m = new \\Member;\n\t\t\t\t$m->uid = $su->id;\n\t\t\t\t$m->social = $social;\n\t\t\t\t$m->name = $su->name;\n\t\t\t\t$m->email = $su->email;\n\n\t\t\t\tif ($social=='facebook'){\n\t\t\t\t\tif (isset($su->birthday))\n\t\t\t\t\t\t$m->birthday = date('Y-m-d', strtotime($su->birthday));\n\t\t\t\t\tif (isset($su->gender))\n\t\t\t\t\t\t$m->gender = substr($su->gender, 0, 1);\n\t\t\t\t}\n\t\t\t\t$m->save();\n\t\t\t}\n\n\t\t\t// register user into Auth that is a global variable\n\t\t\t\\Auth::login($m);\n\t\t\treturn \\Redirect::route('frontend.index');\n\t\t}catch(Exception $e){\n\t\t\techo $e->getMessage();\n\t\t\texit;\n\t\t}\n\t}", "private function findOrCreateUser($facebookUser) {\n\n $user = User::where('facebook_id', $facebookUser->getId())->first();\n\n if ($user) {\n return $user;\n }\n\n return User::create([\n 'facebook_id' => $facebookUser->getId(),\n 'username' => $facebookUser->getName(),\n 'email' => $facebookUser->getEmail(),\n 'avatar' => $facebookUser->getAvatar(),\n 'users_status_id' => 1,\n 'users_role_id' => 3\n ]);\n }", "public function facebookProvider($attr)\n {\n $em = $this->getEntityManager();\n \n $facebook = $this->getEntityManager()->getRepository('NavisUserBundle:Facebook')->findOneBy(array('idClient' => $attr['clientId']));\n\n if(empty($facebook))\n {\n //si esta vacio creo un objeto, lo relaciono y hago flush\n\n $user = new User();\n $facebook = new Facebook();\n \n $facebook->setIdClient($attr['clientId']);\n $facebook->setAccesToken($attr['access_token']);\n $facebook->setExpiresAt($attr['expiresAt']);\n\n $json = $attr['json'];\n $em->persist($facebook);\n $user->setFacebook($facebook);\n $user->setUsername($json->name);//aqui la idea es pedir el mail\n $user->setExpiresAt(0);\n $user->setAccessToken(0);\n $em->persist($user);\n\n \n $facebook->setUser($user);\n $em->persist($facebook);\n\n $em->flush();\n\n //user creado\n\n return $user;\n }else{\n //ya esta creado el user\n return $facebook->getUser();\n }\n }", "private function getOrCreateUser()\n {\n $user = User::firstOrCreate([\n 'email' => $this->user->email\n ]);\n $user->name = $this->user->fullname;\n $user->save();\n\n return $user;\n }", "public function createUserFromFacebook($fbUserInfo = array())\n\t{\n\t\tYii::import('greennet.helpers.Sluggable');\n\n\t\t$password = uniqid();\n\t\tif(!isset($fbUserInfo['birthday'])){\n\t\t\t$bithday = time();\n\t\t} elseif (preg_match('/\\/\\d{4}$/', $fbUserInfo['birthday'])) {\n\t\t\t$pieces = array_reverse(explode('/', $fbUserInfo['birthday']));\n\t\t\t$bithday = strtotime(implode('-', $pieces));\n\t\t} else {\n\t\t\t$bithday = strtotime(str_replace('/', '-', $fbUserInfo['birthday']));\n\t\t}\n\t\t$gender = null;\n\t\tswitch (@$fbUserInfo['gender']) {\n\t\t\tcase 'male':\n\t\t\t\t$gender = 0;\n\t\t\t\tbreak;\n\t\t\tcase 'female':\n\t\t\t\t$gender = 1;\n\t\t\t\tbreak;\n\t\t}\n\t\t$attributes = array(\n\t\t\t'firstname' => Sluggable::convertToLatin($fbUserInfo['first_name']),\n\t\t\t'lastname' => Sluggable::convertToLatin($fbUserInfo['last_name']),\n\t\t\t'email' => $fbUserInfo['email'],\n\t\t\t'password' => $password,\n\t\t\t'confirmPassword' => $password,\n\t\t\t'daybirth' => date('d', $bithday),\n\t\t\t'monthbirth' => date('m', $bithday),\n\t\t\t'yearbirth' => date('Y', $bithday),\n\t\t);\n\t\t$user = $this->createUser($attributes);\n\t\t$profile = array(\n\t\t\t'gender' => $gender,\n\t\t\t'birth' => date('d-m-Y', $bithday),\n\t\t\t'location' => @$result['location']['name']\n\t\t);\n\t\t$image = $this->_migrateFacebookAvatar($user->hexID, $fbUserInfo['id']);\n\t\tif (!empty($image)) {\n\t\t\t$profile['image'] = $image;\n\t\t}\n\n\t\t// Create user profile\n\t\t$modelProfile = new GNUserProfile;\n\t\t$modelProfile->createProfile($user->id, $profile);\n\n\t\t// Assign Permissions\n\t\tRights::assign(Yii::app()->params['roles']['MEMBER'], $user->id);\n\n\t\t// Saved network linked\n\t\t$network = GNNetwork::model()->find('alias=:alias', array(\n\t\t\t':alias' => 'facebook'\n\t\t));\n\t\t$linkedAccount = GNLinkedAccount::model()->find('user_id=:user_id and network_id=:network_id', array(\n\t\t\t':user_id' => $user->id,\n\t\t\t':network_id' => $network->id\n\t\t));\n\t\tif (empty($linkedAccount)) {\n\t\t\t$linkedAccount = new GNLinkedAccount();\n\t\t\t$linkedAccount->user_id = $user->id;\n\t\t\t$linkedAccount->network_id = $network->id;\n\t\t}\n\t\t$linkedAccount->network_account_id = $fbUserInfo['id'];\n\t\t$linkedAccount->network_account_data = serialize($fbUserInfo);\n\t\t$linkedAccount->save();\n\n\t\treturn $user;\n\t}", "public function user()\n {\n $this->checkTimeouts();\n\n if (! $this->session->has('socialite_token')) return null;\n if ($this->session->has('google_guard_user')) return $this->session->get('google_guard_user');\n\n try {\n $user = Socialite::driver('google')->userFromToken($this->session->get('socialite_token'));\n } catch (\\Exception $e) {\n }\n\n if (! isset($user) || ! $user) return $this->flushSession();\n\n $userModel = $this->hydrateUserModel($user);\n $this->session->put('google_guard_user', $userModel);\n\n return $userModel;\n }", "public function findOrCreateUser($name)\n {\n $name = $this->convertToSamaccountname($name);\n $user = $this->em\n ->getRepository('AppBundle:FOSUser')\n ->findOneBy(array('username' => $name));\n\n if ($user) {\n return $user;\n } else {\n $user = $this->createUser($name);\n return $user;\n }\n }", "public function GithubuserFindOrCreate($github_user){\n $user = User::where('github_id',$github_user->id)->first();\n\n if ($user){\n $user = new User;\n $user->name = $github_user->getName();\n $user->email = $github_user->getEmail();\n $user->github_id = $github_user->getid();\n }\n return $user;\n }", "public function GoogleuserFindOrCreate($google_user){\n $user = User::where('google_id',$google_user->id)->first();\n\n if ($user){\n $user = new User;\n $user->name = $google_user->getName();\n $user->email = $google_user->getEmail();\n $user->github_id = $google_user->getid();\n }\n return $user;\n }", "function messenger_find_user_or_create($uid)\n{\n $user = user_load($uid);\n\n $error = new stdClass();\n $error->message = \"User not found\";\n $error->error = True;\n\n if (!isset($user->uid)) {\n return drupal_json_output($error);\n }\n\n $result = messenger_find_or_create_user($user);\n\n\n if ($result) {\n $success = new stdClass();\n $success->data = $result;\n\n\n return drupal_json_output($success);\n } else {\n $error->message = \"An error\";\n return drupal_json_output($error);\n }\n}", "public function fb_signin()\r\n\t{\r\n\t\t// get the facebook user id and then get the user data via curl\r\n\t\t$fb_user_id = $this->input->post('user_id');\r\n\t\t$this->curl->ssl(false);\r\n\t\t$fb_user = json_decode($this->curl->simple_get('https://graph.facebook.com/' . $fb_user_id));\r\n\t\t\r\n\t\t// check if the user is in the DB already\r\n\t\tif( !($user = $this->member_model->get_user_by_sm(array('facebook_id' => $fb_user->id), 'facebook_id'))) \r\n\t\t{\r\n\t\t\t// create the user\r\n\t\t\t$password = generate_password(9, 8);\r\n\t\t\t$this->tank_auth->create_user($fb_user->username . $fb_user->id, $fb_user->username . $fb_user->id, $password, false);\r\n\t\t\t$user = $this->generic_model->get_where_single_row('users', array('username' => $fb_user->username . $fb_user->id));\r\n\t\t\t$this->generic_model->update('user_profiles', \r\n\t\t\t\t\t\t\t\t\t \t array('facebook_id' => $fb_user->id, \r\n\t\t\t\t\t\t\t\t\t \t \t 'display_name' => $fb_user->username,\r\n\t\t\t\t\t\t\t\t\t \t 'profile_image' => 'http://graph.facebook.com/' . $fb_user->id . '/picture'), \r\n\t\t\t\t\t\t\t\t\t \t array('user_id' => $user->id));\r\n\t\t\t// let's also configure a newsletter profile for this user\r\n\t\t\t$this->generic_model->insert('newsletter', array('user_id' => $user->id, 'frequency' => 'never'));\t\t\t\t\t\t\t\t\t \t \r\n\t\t}\r\n\t\t$user = $this->member_model->get_user_by_sm(array('facebook_id' => $fb_user->id), 'facebook_id');\r\n\t\techo $user->id;\r\n\t}", "public function registerSocialUser($userDetails, $type)\n {\n $result['error'] = false;\n $result['message'] = '';\n if (! filter_var($userDetails ['email'], FILTER_VALIDATE_EMAIL)) {\n return 0;\n }\n $softDeletedCustomers = $this->findSoftDeletedUser()->where('email', $userDetails ['email'])->where($type . '_user_id', $userDetails ['social_user_id'])->first();\n if (is_object($softDeletedCustomers) && $softDeletedCustomers->email === $userDetails ['email']) {\n $user = $softDeletedCustomers;\n $user->access_token = $this->randomCharGen(30);\n $user->restore();\n } else {\n $user = $this->_customer->where($type . '_user_id', $userDetails ['social_user_id'])->first();\n }\n if (! $user) {\n $normalUser = $this->_customer->where('email', $userDetails ['email'])->first();\n if ($normalUser) {\n if ($type == 'google') {\n $normalUser->google_user_id = $userDetails ['social_user_id'];\n $normalUser->google_auth_id = $userDetails ['token'];\n }\n if ($type == 'facebook') {\n $normalUser->facebook_user_id = $userDetails ['social_user_id'];\n $normalUser->facebook_auth_id = $userDetails ['token'];\n }\n $normalUser->access_token = $this->randomCharGen(30);\n $normalUser->save();\n $user = $normalUser;\n } else {\n $user = $this->_customer;\n if ($type == 'google') {\n $user->google_user_id = $userDetails ['social_user_id'];\n $user->google_auth_id = $userDetails ['token'];\n }\n if ($type == 'facebook') {\n $user->facebook_user_id = $userDetails ['social_user_id'];\n $user->facebook_auth_id = $userDetails ['token'];\n }\n\n $user->name = (!empty($user->name)) ? $user->name : $userDetails ['name'];\n $user->email = $userDetails ['email'];\n $user->access_token = $this->randomCharGen(30);\n $user->login_type = $userDetails ['login_type'];\n $user->is_active = 1;\n if (isset($userDetails ['password'])) {\n $user->password = Hash::make($userDetails ['password']);\n }\n $user->profile_picture = (!empty($user->profile_picture)) ? $user->profile_picture : isset($userDetails ['profile_picture']) ? $userDetails ['profile_picture'] : '';\n\n if (isset($userDetails ['device_type'])) {\n $user->device_type = $userDetails ['device_type'];\n }\n if (isset($userDetails ['device_token'])) {\n $user->device_token = $userDetails ['device_token'];\n }\n\n $user->save();\n // array_combine_function\n $preference = new PlaylistRepository(new Playlist(), new MypreferencesVideo());\n $category = Category::where('level', 1)->whereNotNull('preference_order')->where('is_active', 1)->orderBy('preference_order')->pluck('id')->toArray();\n $catType = [ ];\n foreach ($category as $k => $v) {\n $catType [$k] = 'sub-categories';\n }\n $preference->array_combine_function($category, $catType, $user->id);\n }\n } else {\n $user = $this->loginSocialRegisteredUsers($user, $userDetails);\n }\n\n // BEGIN : Block to generate JWT token\n $token = JWTAuth::fromUser($user);\n $user->access_token = $token;\n $user->save();\n // END : Block to generate JWT token\n $userId = $user->makeVisible('id');\n $userInfo = $user->toArray();\n $userInfo = Customer::SelectRaw('*, id as is_subscribed')->where('id', $user->id)->first();\n $planInfo = $userInfo->activeSubscriber()->first();\n $userInfo = $userInfo->toArray();\n $userInfo['subscribed_plan'] = $planInfo;\n $userInfo['access_token'] = $token;\n $userInfo['notification_count'] = $this->notificationRepository->getNotificationCount($userId->id);\n $userInfo['login_type'] = $type;\n $result['data'] = $userInfo;\n return $result;\n }", "function create_user ( $ID, $first_name, $last_name, $email ) {\n\tglobal $access_token, $canvas_base_url;\n\t\n\t$pass=md5(uniqid($first_name.$last_name, true));\n\t$url=$canvas_base_url.\"/api/v1/accounts/1/users.json\";\n\tsystem(\"curl $url -F 'user[name]=$first_name $last_name' -F 'user[short_name]=$first_name' -F 'pseudonym[unique_id]=$email' -F 'pseudonym[password]=$pass' -F 'pseudonym[sis_user_id]=$ID' -H 'Authorization: Bearer $access_token'\");\n\t\n}", "public function SocialSignup($provider)\n {\n $user = Socialite::driver($provider)->stateless()->user();\n $checkAccount = User::whereEmail($user->email)->first();\n if($user){\n if($checkAccount){\n $dataUser = $checkAccount;\n }else{\n $input['username'] = str_replace(' ','',$user->name);\n $input['email'] = $user->email;\n $input['password'] = Hash::make($user->id);\n $input['role'] = 'user';\n $input['displayName'] = $input['username'];\n if(!empty($user->avatar)){\n $input['photo'] = $user->avatar;\n }\n $input['providerid'] = 'password';\n $input['emailVerified'] = 1;\n $input['account_status'] = 'active';\n $input['registered_via'] = 'gmail';\n $additional_data['social_id']= $user->id;\n $input['additional_data']=json_encode($additional_data);\n $user = User::create($input);\n $input['id'] =$user->id;\n $dataUser = User::whereEmail($user->email)->first();\n }\n return $this->success($dataUser,'Success Registration with google');\n }else{\n return $this->error('Registration failed, please try again');\n }\n }", "private function findOrCreateUser($facebookUser)\n {\n $authUser = User::where('facebook_id', $facebookUser->id)->first();\n\n if ($authUser){\n return $authUser;\n }\n\n $input = [\n 'name' => $facebookUser->name,\n 'email' => $facebookUser->email,\n 'facebook_id' => $facebookUser->id,\n 'avatar' => $facebookUser->avatar\n ];\n\n $validator = $this->validator($input, true);\n\n if ($validator->fails()) {\n throw new \\Exception($validator->errors(), 422);\n }\n\n $user = User::create($input);\n\n // Attach role to user\n $user->attachRole(config('entrust.member_role_id'));\n\n // Send autoresponder\n $email = new LogEmail;\n\n $email->sendNewUser($user);\n\n return $user;\n\n }", "protected function objectUserEnCours(){\n $fbUid = $this->getRequest()->getSession()->get('_fos_facebook_fb_482361481839052_user_id');\n $user = $this->getDoctrine()->getManager()->getRepository('MetinetFacebookBundle:User')->findOneByfbUid($fbUid);\n return $user ;\n }", "function tumblr_users_register_user($userinfo, $access_token){\n\t\t\n\t\t$password = random_string(32);\n\n\t\t$email = \"{$userinfo->response->user->name}@donotsend-tumblr.com\";\n\n\t\t$user = users_create_user(array(\n\t\t\t\"username\" => $userinfo->response->user->name,\n\t\t\t\"email\" => $email,\n\t\t\t\"password\" => $password,\n\t\t));\n\n\t\tif (! $user){\n\t\t\treturn not_okay(\"dberr_user\");\n\t\t}\n\n\t\t$tumblr_user = tumblr_users_create_user(array(\n\t\t\t'user_id' => $user['user']['id'],\n\t\t\t'oauth_token' => $access_token['oauth_token'],\n\t\t\t'oauth_secret' => $access_token['oauth_token_secret'],\n\t\t\t'tumblr_username' => $userinfo->response->user->name,\n\t\t\t'following' => $userinfo->response->user->following,\n\t\t\t'likes' => $userinfo->response->user->likes,\n\t\t\t'default_post_format' => $userinfo->response->user->default_post_format\n\t\t));\n\n\t\tif (! $tumblr_user){\n\t\t\treturn not_okay(\"dberr_tumblruser\");\n\t\t}\n\n\t\treturn okay(array(\n\t\t\t'user' => $user,\n\t\t\t'tumblr_user' => $tumblr_user,\n\t\t));\n\t}", "public function callBack($provider)\n\t{\n\t\ttry {\n\n\t\t\t// $userSocial\t= Socialite::driver($provider)->stateless()->user();\n\t\t\t$userSocial\t= Socialite::driver($provider)->user();\n\n\t\t\t$user\t\t= User::where(['email' => $userSocial->getEmail()])->first();\n\n\t\t\tif($user){\n\n\t\t\t\tif ($user->is_active == 1) {\n\n\t\t\t\t\t// If User is active redirect to home page.\n\t\t\t\t\tAuth::guard('web')->login($user);\n\t\t\t\t\tUserInfo::where('user_id',$user->id)->update([\n\t\t\t\t\t\t$provider.'_id'\t=> $userSocial->getId(),\n\t\t\t\t\t]);\n\n\t\t\t\t\t$user->update([\n\t\t\t\t\t\t'last_login'\t\t=> Carbon::now()->toDateTimeString(),\n\t\t\t\t\t\t'last_login_type'\t=> ucfirst($provider)\n\t\t\t\t\t]);\n\t\t\t\t\treturn redirect()->route('home');\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t// If User is inactive\n\t\t\t\t\treturn redirect()->route('login')\n\t\t\t\t\t->with('incorrect' , 'Your account is inactive');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\n\t\t\t\t$user = User::create([\n\t\t\t\t\t'first_name' \t=> $userSocial->getName(),\n\t\t\t\t\t'email' \t=> $userSocial->getEmail(),\n\t\t\t\t\t'password'\t\t\t=> '',\n\t\t\t\t\t'last_login'\t\t=> Carbon::now()->toDateTimeString(),\n\t\t\t\t\t'last_login_type'\t=> ucfirst($provider)\n\t\t\t\t]);\n\n\t\t\t\t$userInfo = [\n\t\t\t\t\t'user_id'\t\t=>\t$user->id,\n\t\t\t\t\t$provider.'_id'\t=>\t$userSocial->getId(),\n\t\t\t\t];\n\t\t\t\tUserInfo::storeUserInfo($userInfo);\n\n\t\t\t\tAuth::guard('web')->login($user);\n\t\t\t\treturn redirect()->route('home');\n\t\t\t}\n\n\t\t} catch (Exception $exception) {\n\n\t\t\t\\Log::debug($exception);\n\n\t\t\treturn redirect()->route('login')\n\t\t\t->with('incorrect' , 'Something went wrong! Please contact administrator.');\n\t\t}\n\t}", "function execute() {\n\t\tif ($this->existingUser) {\n\t\t\t// Existing user in the system\n\t\t\t$userDao = &DAORegistry::getDAO('UserDAO');\n\t\t\t$user = &$userDao->getUserByUsername($this->getData('username'));\n\t\t\tif ($user == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$userId = $user->getUserId();\n\t\t\t\n\t\t} else {\n\t\t\t// New user\n\t\t\t$user = &new User();\n\t\t\t\n\t\t\t$user->setUsername($this->getData('username'));\n\t\t\t$user->setFirstName($this->getData('firstName'));\n\t\t\t$user->setMiddleName($this->getData('middleName'));\n\t\t\t$user->setInitials($this->getData('initials'));\n\t\t\t$user->setLastName($this->getData('lastName'));\n\t\t\t$user->setAffiliation($this->getData('affiliation'));\n\t\t\t$user->setEmail($this->getData('email'));\n\t\t\t$user->setUrl($this->getData('userUrl'));\n\t\t\t$user->setPhone($this->getData('phone'));\n\t\t\t$user->setFax($this->getData('fax'));\n\t\t\t$user->setMailingAddress($this->getData('mailingAddress'));\n\t\t\t$user->setBiography($this->getData('biography'));\n\t\t\t$user->setInterests($this->getData('interests'));\n\t\t\t$user->setDateRegistered(Core::getCurrentDate());\n\t\t\n\t\t\tif ($this->profileLocalesEnabled) {\n\t\t\t\t$site = &Request::getSite();\n\t\t\t\t$availableLocales = $site->getSupportedLocales();\n\t\t\t\t\n\t\t\t\t$locales = array();\n\t\t\t\tforeach ($this->getData('userLocales') as $locale) {\n\t\t\t\t\tif (Locale::isLocaleValid($locale) && in_array($locale, $availableLocales)) {\n\t\t\t\t\t\tarray_push($locales, $locale);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$user->setLocales($locales);\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($this->defaultAuth)) {\n\t\t\t\t$user->setPassword($this->getData('password'));\n\t\t\t\t// FIXME Check result and handle failures\n\t\t\t\t$this->defaultAuth->doCreateUser($user);\n\t\t\t\t$user->setAuthId($this->defaultAuth->authId);\n\t\t\t\t$user->setPassword(Validation::encryptCredentials($user->getUserId(), Validation::generatePassword())); // Used for PW reset hash only\n\t\t\t} else {\n\t\t\t\t$user->setPassword(Validation::encryptCredentials($this->getData('username'), $this->getData('password')));\n\t\t\t}\n\t\t\t\n\t\t\t$userDao = &DAORegistry::getDAO('UserDAO');\n\t\t\t$userDao->insertUser($user);\n\t\t\t$userId = $user->getUserId();\n\t\t\tif (!$userId) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$sessionManager = &SessionManager::getManager();\n\t\t\t$session = &$sessionManager->getUserSession();\n\t\t\t$session->setSessionVar('username', $user->getUsername());\n\t\t}\n\n\t\t$journal = &Request::getJournal();\n\t\t$roleDao = &DAORegistry::getDAO('RoleDAO');\n\t\t\n\t\t// Roles users are allowed to register themselves in\n\t\t$allowedRoles = array('reader' => 'registerAsReader', 'author' => 'registerAsAuthor', 'reviewer' => 'registerAsReviewer');\n\n\t\t$journalSettingsDao = &DAORegistry::getDAO('JournalSettingsDAO');\n\t\tif (!$journalSettingsDao->getSetting($journal->getJournalId(), 'allowRegReader')) {\n\t\t\tunset($allowedRoles['reader']);\n\t\t}\n\t\tif (!$journalSettingsDao->getSetting($journal->getJournalId(), 'allowRegAuthor')) {\n\t\t\tunset($allowedRoles['author']);\n\t\t}\n\t\tif (!$journalSettingsDao->getSetting($journal->getJournalId(), 'allowRegReviewer')) {\n\t\t\tunset($allowedRoles['reviewer']);\n\t\t}\n\t\t\n\t\tforeach ($allowedRoles as $k => $v) {\n\t\t\t$roleId = $roleDao->getRoleIdFromPath($k);\n\t\t\tif ($this->getData($v) && !$roleDao->roleExists($journal->getJournalId(), $userId, $roleId)) {\n\t\t\t\t$role = &new Role();\n\t\t\t\t$role->setJournalId($journal->getJournalId());\n\t\t\t\t$role->setUserId($userId);\n\t\t\t\t$role->setRoleId($roleId);\n\t\t\t\t$roleDao->insertRole($role);\n\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!$this->existingUser) {\n\t\t\t// Send welcome email to user\n\t\t\timport('mail.MailTemplate');\n\t\t\t$mail = &new MailTemplate('USER_REGISTER');\n\t\t\t$mail->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));\n\t\t\t$mail->assignParams(array('username' => $this->getData('username'), 'password' => $this->getData('password')));\n\t\t\t$mail->addRecipient($user->getEmail(), $user->getFullName());\n\t\t\t$mail->send();\n\t\t}\n\n\t\t// By default, self-registering readers will receive\n\t\t// journal updates. (The double set is here to prevent a\n\t\t// duplicate insert error msg if there was a notification entry\n\t\t// left over from a previous role.)\n\t\tif (isset($allowedRoles['reader']) && $this->getData($allowedRoles['reader'])) {\n\t\t\t$notificationStatusDao = &DAORegistry::getDAO('NotificationStatusDAO');\n\t\t\t$notificationStatusDao->setJournalNotifications($journal->getJournalId(), $userId, false);\n\t\t\t$notificationStatusDao->setJournalNotifications($journal->getJournalId(), $userId, true);\n\t\t}\n\n\t\tif (isset($allowedRoles['reader']) && $this->getData('openAccessNotification')) {\n\t\t\t$userSettingsDao = &DAORegistry::getDAO('UserSettingsDAO');\n\t\t\t$userSettingsDao->updateSetting($userId, 'openAccessNotification', true, 'bool', $journal->getJournalId());\n\t\t}\n\t}", "public function user() {\n $connection = new HTTPConnector($this);\n $url = $this->credential->getRequestUrl(BitcasaConstants::METHOD_USER . BitcasaConstants::METHOD_PROFILE);\n if (!BitcasaUtils::isSuccess($connection->get($url))) {\n return null;\n }\n\n $response = $connection->getResponse(true);\n\n $user = User::getInstance($response);\n return $user;\n }", "public function handleProviderCallback($social)\n {\n $userInfo = Socialite::driver($social)->stateless()->user();\n\n\n //check if user exists and log user in\n $user = User::where('email',$userInfo->email)->first();\n if ($user){\n if (Auth::loginUsingId($user->id)){\n return redirect()->route('profiles.profile.create');\n }\n }\n //else sign the user up\n $userSignUp = User::create([\n 'name'=>$userInfo->name,\n 'email'=>$userInfo->email,\n 'avatar'=>$userInfo->avatar,\n 'provider'=>$social,\n 'is_status'=>'3',\n 'verified'=>1,\n 'provider_id'=>$userInfo->id,\n ]);\n //finally log the user in\n if ($userSignUp){\n if (Auth::loginUsingId($userSignUp->id)){\n return redirect()->route('profiles.profile.create');\n }\n }\n }", "public function user_createorlogin($user) {\n $existed_user = db_select('user', 'u')\n ->fields('u')\n ->condition('email', $user->getEmail())\n ->execute()\n ->fetchObject();\n\n if($existed_user){\n db_update('user')\n ->fields(array(\n 'accessed' => time(),\n ))\n ->condition('uid', $existed_user->uid)\n ->execute();\n session()->set('curuser', $existed_user);\n }else{\n $uid = db_insert('user')\n ->fields(array(\n 'username' => $user->getName() ? $user->getName() : $user->getEmail(),\n 'password' => hunter_password_hash('password'),\n 'nickname' => $user->getNickname() ? $user->getNickname() : $user->getName(),\n 'email' => $user->getEmail(),\n 'provider' => $user->getProviderName(),\n 'avatar' => $user->getAvatar() ? $user->getAvatar() : '/theme/hunter/assets/avatar/'.rand(0,38).'.jpg',\n 'status' => 1,\n 'created' => time(),\n 'updated' => time(),\n 'accessed' => time()\n ))\n ->execute();\n\n $new_user = db_select('user', 'u')\n ->fields('u')\n ->condition('uid', $uid)\n ->execute()\n ->fetchObject();\n\n session()->set('curuser', $new_user);\n }\n }", "public function callback($provider)\n {\n if (!request('code') && !request('access_token')) {\n return response()->json([\n 'message' => 'Access token or code is required'\n ], 422);\n }\n try {\n if (request('access_token')) {\n $userSocial = Socialite::driver($provider)->userFromToken(request('access_token'));\n } elseif (request('code')) {\n $userSocial = Socialite::driver($provider)->stateless()->user();\n }\n } catch (\\Exception $e) {\n return response()->json([\n 'message' => $e->getMessage()\n ], 401);\n }\n $user = User::where([\n ['email', '!=', null],\n ['email', '=', $userSocial->getEmail()]\n ])\n ->orWhere([\n ['provider_id', '=', $userSocial->getId()],\n ['provider', '=', $provider]\n ])\n ->first();\n if ($user) {\n if ($user->hasRole('STUDENT')) {\n $user = $user->getOrCreateParent();\n }\n $tokenResult = $user->createToken('Personal Access Token');\n $token = $tokenResult->token;\n $token->save();\n\n return response()->json([\n 'access_token' => $tokenResult->accessToken,\n 'token_type' => 'Bearer',\n 'expires_at' => Carbon::parse($tokenResult->token->expires_at)->toDateTimeString(),\n 'user' => new UserResource($user)\n ]);\n } else {\n $user = User::create([\n 'name' => $userSocial->getName(),\n 'email' => $userSocial->getEmail(),\n 'image' => $userSocial->getAvatar(),\n 'provider_id' => $userSocial->getId(),\n 'provider' => $provider,\n ]);\n $user\n ->roles()\n ->attach(Role::where('name', 'PARENT')->first());\n $tokenResult = $user->createToken('Personal Access Token');\n $token = $tokenResult->token;\n $token->save();\n\n return response()->json([\n 'access_token' => $tokenResult->accessToken,\n 'token_type' => 'Bearer',\n 'expires_at' => Carbon::parse($tokenResult->token->expires_at)->toDateTimeString(),\n 'user' => new UserResource($user)\n ]);\n }\n }", "protected function findOrCreateSocialUser($socialUser, $provider, $roleId = null, $invitationCode = null)\n {\n $userData = [\n 'name' => $socialUser->name,\n 'email' => $socialUser->email,\n 'provider' => $provider,\n 'provider_id' => $socialUser->id,\n 'confirmed' => true,\n ];\n\n //get the birthday if provided\n if( ! empty($socialUser->user['birthday'])) {\n if($provider=='google' && Carbon::createFromFormat('Y-m-d',$socialUser->user['birthday'])->year != 0) {\n $userData['birthday'] = Carbon::createFromFormat('Y-m-d',$socialUser->user['birthday']);\n } else if($provider=='facebook') {\n $userData['birthday'] = Carbon::createFromFormat('m/d/Y',$socialUser->user['birthday']);\n }\n }\n\n //check if user already registered via provider\n $user = User::firstOrNew(['provider_id' => $userData['provider_id']]);\n\n if($user->exists) {\n return [ 'user' => $user, 'status' => 'userExists' ];\n }\n\n //if not check if there's already a user with this email address\n $user = User::firstOrNew(['email' => $userData['email']]);\n\n if($user->exists) {\n $user->forceFill($userData)->save();\n return [ 'user' => $user, 'status' => 'userExists' ];\n }\n\n //new registration - check role and validate invitation code\n if($roleId == null){\n return [ 'user' => null, 'status' => 'error' ];\n }\n $userData = $userData + [ 'role_id' => $roleId ];\n\n if(config('auth.options.invitation_codes')){\n if(empty($invitationCode) || !$this->validateCode($invitationCode, true)){\n return [ 'user' => null, 'status' => 'error' ];\n }\n\n $userData = $userData + ['invitation_code' => $invitationCode];\n }\n\n //create a new user\n if($imagePath = $this->storeProfileImage($socialUser->avatar)){\n $userData = $userData + ['photo_url' => $imagePath];\n }\n\n $user->forceFill($userData)->save();\n return [ 'user' => $user, 'status' => 'newUser' ];\n }", "public function handleProviderCallback()\n{\n $user = Socialite::driver('facebook')->user();\n\n dd( $user);\n\n // $user->token;\n // code for facebook sign up and login\n}", "function getOrCreateUserByEmail(EmailValue $email);", "public function action_fb() {\n\t\n\t$fb = Facebook::instance();\n\n\n\tif ($fb->check_login() == false) {\n\t //user has not yet authenticated via facebook\n\t $fbl_params = array(\"scope\" => \"email\");\n\t $loginurl = $fb->getLoginUrl($fbl_params);\n\t Response::redirect($loginurl) and die();\n\t} else {\n\t //facebook authentication successful.\n\t $user_profile = $fb->api('/me');\n\t //and we know the user's email\n\t $fb_mail = $user_profile[\"email\"];\n\n\t //and the user's facebook ID\n\t $fb_id = $user_profile[\"id\"];\n\n\t $auth = Auth::instance();\n\n\t //simpleauth does not have a method for \n\t //checking if username is taken\n\t //hence we do a direct DB select.\n\t $fb_sql_user = DB::select(\"id\")\n\t\t ->from(\"users\")\n\t\t ->where(\"username\", \"=\", \"FB@\" . $fb_mail)\n\t\t ->execute()\n\t\t ->as_array();\n\n\t if (count($fb_sql_user) == 0) {\n\t\t//we don't have the user in the local DB yet\n\t\t//let us create a local user\n\t\t//coining a specific username,\n\t\t//assigning a random password\t\t\n\t\t$user_id = $auth->create_user(\"FB@\" . $fb_mail, hash(\"sha256\", mt_rand(0, mt_getrandmax())), $fb_mail, 1, array(\n\t\t \"facebook_id\" => $fb_id,\n\t\t \"verified\" => true)\n\t\t);\n\t } else {\n\t\t//we have the user. Let's log the user in\n\t\t$user_id = $fb_sql_user[0][\"id\"];\n\t }\n\n\t $auth->force_login($user_id);\n\t Response::redirect(\"/\");\n\t}\n }", "private function createUser($type='') {\n return $this->ec->createUser($type);\n }", "public function getFacebookUser()\n {\n if (!$this->facebookUser && $uuid = $this->getAttribute('uuid', null))\n {\n $this->facebookUser = Doctrine_Core::getTable('sfGuardFacebookUser')->findOneBy('uuid',$uuid);\n\n if (!$this->facebookUser)\n {\n // the user does not exist anymore in the database\n $this->signOut();\n\n throw new sfException('The user does not exist anymore in the database.');\n }\n }\n\n \n return $this->facebookUser;\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "private function createNewUser():User\n {\n $entityManager = $this->getDoctrine()->getManager();\n\n //create user\n $user = new User();\n $user->setEmail($this->request->request->get('email'));\n $user->setPassword('');\n $entityManager->persist($user);\n $entityManager->flush();\n //create user\n\n //encode user password\n $user->setPassword($user->encodePassword($this->request->request->get('password')));\n $entityManager->persist($user);\n $entityManager->flush();\n //encode user password\n return $user;\n }", "public function createUser($name, $pass, $profile, array $extra = []);", "public function createUser()\n {\n $c = $this->getConnectionWithConfig('default');\n\n // First we create the record that we need to update\n $create = 'CREATE (u:User {name: $name, email: $email, username: $username})';\n // The bindings structure is a little weird, I know\n // but this is how they are collected internally\n // so bare with it =)\n $createCypher = $c->getCypherQuery($create, array(\n 'name' => $this->user['name'],\n 'email' => $this->user['email'],\n 'username' => $this->user['username'],\n ));\n\n return $this->client->run($createCypher['statement'], $createCypher['parameters']);\n }", "private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }", "abstract protected function getUser();", "public function SocialSignup($provider)\n {\n // Socialite will pick response data automatic\n $user = Socialite::driver($provider)->stateless()->user();\n\n return response()->json($user);\n }", "public static function getUser();", "public function findOrCreateUser($user, $provider)\n {\n\n $userCreated = User::with('user')->where('email', $user->email)->first();\n $fileContents = file_get_contents($user->getAvatar());\n\n $uploadedFolder = public_path() . '/profile_image';\n\n File::put($uploadedFolder . '/profile_image' . $user->getId() . \".jpg\", $fileContents);\n\n $picture ='/profile_image' . $user->getId() . \".jpg\";\n\n if($userCreated)\n {\n if($userCreated->activated != 2)\n {\n $userCreated->provider = $provider;\n $userCreated->provider_id = $user->id;\n\n $userCreated->image=$picture;\n\n if($userCreated->type === 1)\n {\n $userCreated->activation_code = '';\n $userCreated->activated = 1;\n }\n \n if(is_null($userCreated->name))\n {\n $userCreated->name = $user->name;\n }\n\n $appUser = AppUser::where('email' , $user->email)->first();\n\n if($appUser->account_activated === 0 && $appUser->account_type === 1)\n {\n $freePosts = FreePostModel::where('id', 1)->first();\n $appUser->free_post = is_null($freePosts)?0:$freePosts->free_post_no;\n }\n\n if(is_null($appUser->first_name) && is_null($appUser->last_name))\n {\n\n $splitName = explode(' ', $userCreated->name, 2); // Restricts it to only 2 values, for names like Billy Bob Jones\n $first_name = $splitName[0];\n $last_name = !empty($splitName[1]) ? $splitName[1] : '';\n \n $appUser->first_name = $first_name;\n $appUser->last_name = $last_name;\n }\n $appUser->facebook_id = $userCreated->provider_id;\n $appUser->user_status = 1;\n\n $userCreated->save();\n $appUser->save();\n\n if($userCreated->type !== 1 && $userCreated->activated === 0)\n {\n return 0;\n }\n }\n else\n {\n return -1;\n }\n }\n else\n {\n $userCreated = User::create([\n 'name' => $user->name,\n 'email' => $user->email,\n 'provider' => $provider,\n 'provider_id' => $user->id,\n 'activated' => 1,\n 'activation_code' => '',\n 'type' => 1,\n 'image'=>$picture,\n ]);\n \n $splitName = explode(' ', $userCreated->name, 2); // Restricts it to only 2 values, for names like Billy Bob Jones\n $first_name = $splitName[0];\n $last_name = !empty($splitName[1]) ? $splitName[1] : '';\n\n $freePosts = FreePostModel::where('id', 1)->first();\n\n AppUser::create([\n 'user_id' => $userCreated->id,\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $user->email,\n 'user_status' => 1,\n 'email_activated' => 1,\n 'facebook_id' => $userCreated->provider_id,\n 'free_post' => is_null($freePosts)?0:$freePosts->free_post_no,\n 'account_type' => 1,\n 'account_activated' => 1,\n ]);\n }\n\n return $userCreated;\n }", "public function getUser(): User;", "public function socialLogin(Request $request)\n {\n if($request->has('role') && $request->get('role') == 'client'){\n\n $clientSocialProvider = ClientSocialProvider::where('provider_id', $request->get('id'))->first();\n\n if(!$clientSocialProvider)\n {\n //Handle user already logged and want log with facebook too\n if($request->has('user_email')){\n\n $user = Client::whereEmail($request->get('user_email'))->first();\n\n if($user){\n $user->socialProviders()->create([\n 'provider' => 'facebook',\n 'provider_id' => $request->get('id'),\n 'access_token' => $request->get('access_token'),\n 'photo_url' => $request->get('photo_url')\n ]);\n }\n }\n\n if(!$request->has('user_email')){\n\n //Create client\n $user = Client::firstOrCreate([\n 'name' => $request->get('first_name'),\n 'last_name' => $request->get('last_name'),\n 'email' => $request->get('email')\n ]);\n\n $user->socialProviders()->create([\n 'provider' => 'facebook',\n 'provider_id' => $request->get('id'),\n 'access_token' =>$request->get('access_token'),\n 'photo_url' => $request->get('photo_url')\n ]);\n }\n\n }else{\n $user = $clientSocialProvider->client;\n }\n }\n\n /*\n * Handling with a admin user\n */\n if($request->has('role') && $request->get('role') == 'admin'){\n\n $userSocialProvider = UserSocialProvider::where('provider_id', $request->get('id'))->first();\n\n if(!$userSocialProvider)\n {\n if($request->has('user_email')){\n\n $user = User::whereEmail($request->get('user_email'))->first();\n\n if($user){\n $user->socialProviders()->create([\n 'provider' => 'facebook',\n 'provider_id' => $request->get('id'),\n 'access_token' =>$request->get('access_token'),\n 'photo_url' => $request->get('photo_url')\n ]);\n }\n }\n\n if(!$request->has('user_email')){\n\n //Create user\n $user = User::firstOrCreate([\n 'name' => $request->get('first_name'),\n 'last_name' => $request->get('last_name'),\n 'email' => $request->get('email')\n ]);\n\n $user->socialProviders()->create([\n 'provider' => 'facebook',\n 'provider_id' => $request->get('id'),\n 'access_token' =>$request->get('access_token'),\n 'photo_url' => $request->get('photo_url')\n ]);\n }\n\n }else{\n $user = $userSocialProvider->user;\n }\n }\n\n /*\n * Handling with a oracle user\n */\n if($request->has('role') && $request->get('role') == 'oracle'){\n\n $userSocialProvider = OracleSocialProvider::where('provider_id', $request->get('id'))->first();\n\n if(!$userSocialProvider)\n {\n $user = OracleUser::whereEmail($request->get('email'))->first();\n\n if($user){\n $user->socialProviders()->create([\n 'provider' => 'facebook',\n 'provider_id' => $request->get('id'),\n 'access_token' =>$request->get('access_token'),\n 'photo_url' => $request->get('photo_url')\n ]);\n }\n\n }else{\n $user = $userSocialProvider->user;\n }\n }\n\n /*\n * Handling with a advertiser user\n */\n if($request->has('role') && $request->get('role') == 'advertiser'){\n\n $userSocialProvider = AdvertiserSocialProvider::where('provider_id', $request->get('id'))->first();\n\n if(!$userSocialProvider)\n {\n $user = Advertiser::whereEmail($request->get('email'))->first();\n\n if($user){\n $user->socialProviders()->create([\n 'provider' => 'facebook',\n 'provider_id' => $request->get('id'),\n 'access_token' =>$request->get('access_token'),\n 'photo_url' => $request->get('photo_url')\n ]);\n }\n\n }else{\n $user = $userSocialProvider->user;\n }\n }\n\n if($user){\n //Verifies if the account belongs to the authenticated user.\n if($request->has('user_id') && $user->id != $request->get('user_id')){\n return response([\n 'status' => 'error',\n 'code' => 'ErrorGettingSocialUser',\n 'msg' => 'Facebook account already in use.'\n ], 400);\n }\n\n if ( ! $token = $this->JWTAuth->fromUser($user)) {\n throw new AuthorizationException;\n }\n\n return response([\n 'status' => 'success',\n 'msg' => 'Successfully logged in via Facebook.',\n 'access_token' => $token,\n 'user' => $user->load('socialProviders')\n ])->header('Authorization','Bearer '. $token);;\n }\n\n\n return response([\n 'status' => 'error',\n 'code' => 'ErrorGettingSocialUser',\n 'msg' => 'Unable to authenticate with Facebook.'\n ], 403);\n }", "protected function createUserAccount() {\n\t\treturn new UserAccount();\n\t}", "public function createUser()\n {\n return User::factory()->create();\n }", "public function findOrCreateUser( $user, $provider ) {\n\t\tif ( $provider == 'staffconnect' ) {\n\n $authUser = User::where( 'provider_id',$user->provider_id )->first();\n \n\t\t\tif ( $authUser ) {\n\t\t\t\treturn $authUser;\n\t\t\t}\n\n\t\t\t$newUser = User::create( [\n\t\t\t\t'first_name' => $user->first_name,\n\t\t\t\t'last_name' => $user->last_name,\n\t\t\t\t'email' => $user->email,\n\t\t\t\t'provider_name' => 'staffconnect',\n 'provider_id' => $user->provider_id,\n 'provider_company' => 'sc_demo',\n\t\t\t\t'password' => str_random( 8 ),\n\t\t\t\t'role' => 'staff',\n\t\t\t\t'active' => 'active',\n ] );\n \n return $newUser;\n \n\t\t} else if ( $provider == 'twitter' ) {\n\t\t\t// Empty for now\n\t\t}\n\n\t}", "protected function createUser ()\n {\n /* Method of the UserFactory class */\n $this->_objUser = UserFactory::createUser(ucfirst($_SESSION[\"userType\"])); \n $this->_objUser->setFirstName($_SESSION[\"emailID\"]);\n }", "public function registerUser()\n\t\t{\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\t$client = OrientDb::connection();\n\t\t\t\t$insert = $client->command('SELECT createUser({username: \"' . $this->email . '\", email : \"' . $this->email . '\", password: \"' . $this->password . '\", nameFirst:\"' . $this->name . '\", nameLast: \"' . $this->lastname . '\", authData : null, phone: \"' . $this->phone . '\"})');\n\t\t\t\t$response = $insert->getOData();\n\t\t\t\treturn $response;\n\n\t\t\t}catch(PhpOrientException $e){\n\t\t\t\t\n\t\t\t\treturn $e;\n\n\t\t\t}\n\t\t}", "static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}", "private function getUser()\n {\n if ($this->userData['id']) {\n $user = gateway('northstar')->asClient()->getUser($this->userData['id']);\n\n if ($user && $user->id) {\n info('Found user by id', ['user' => $user->id]);\n\n return $user;\n }\n }\n\n if ($this->userData['email']) {\n $user = gateway('northstar')->asClient()->getUserByEmail($this->userData['email']);\n\n if ($user && $user->id) {\n info('Found user by email', ['user' => $user->id]);\n\n return $user;\n }\n }\n\n if (! isset($this->userData['mobile'])) {\n return null;\n }\n\n $user = gateway('northstar')->asClient()->getUserByMobile($this->userData['mobile']);\n\n if ($user && $user->id) {\n info('Found user by mobile', ['user' => $user->id]);\n\n return $user;\n }\n\n return null;\n }", "function getUserProfile()\n\t{\n\t\t$data = $this->api->api( \"v1/market/private/user/account.json\" );\n\t\tif ( ! isset( $data->account ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->account->surname;\n\t\t$this->user->profile->displayName = @ $data->account->firstname . ' ' . $data->account->surname;\n\t\t$this->user->profile->photoURL = @ $data->account->image;\n\t\t$this->user->profile->profileURL = @ $data->account->image;\n\n\t\t// request user emails from envato api\n\t\ttry{\n\t\t\t$email = $this->api->api(\"v1/market/private/user/email.json\");\n\t\t\t$this->user->profile->email = @ $email->email;\n\t\t}\n\t\tcatch( Exception $e ){\n\t\t\tthrow new Exception( \"User email request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}", "public function callback()\n {\n $user=Socialite::driver('facebook')->user();\n \n $check=FacebookProvider::where('facebook_id',$user->getId())->first();\n \n if(!$check){\n \n $newUser=new User();\n $newUser->name=$user->getName();\n $newUser->email=$user->getEmail();\n $newUser->image=$user->getAvatar();\n $newUser->password=Hash::make(str_random(8));\n $newUser->password_confirm=Hash::make(str_random(8));\n $newUser->save();\n \n $newprovider=new FacebookProvider();\n $newprovider->facebook_id=$user->getId();\n $newprovider->user_id=$check->id;\n $newprovider->save();\n \n }else{\n \n $newUser=User::find($check->user_id)->first();\n \n }\n\n auth()->user()->login($newUser);\n return response(['status'=>true,'message'=>'congrats you have logged in successfully !']);\n \n }", "function create_user()\n{\n\t// Check to see if the account is admin\n\t$account_type = account_type();\n\t\n\tif ( $account_type == 0 )\n\t{\n\t\t// Connect to the database\n\t\t$link = dbConnect();\n\t\t\n\t\t$query = mysql_query( \"SELECT first_name, last_name FROM BCD_User WHERE username = '\" . $_SESSION[ 'username' ] . \"'\" );\n\t\t\n\t\t// Close the database\n\t\tdbClose( $link );\n\t}\n}", "private function login_or_register( $provider, $user, $user_meta ) {\n\t\t// Define how the social ID meta key looks like in the WP database\n\t\t$social_id_meta_key = '_' . $provider .'_id';\n\n\t\t// Check if this user already exists in the database based on the social_id (meta field)\n\t\t$existing_user = get_users( array( 'meta_key' => $social_id_meta_key, 'meta_value' => $user_meta[$social_id_meta_key] ) );\n\n\t\tif ( $existing_user ) {\n\t\t\t// User already exists, log him in\n\t\t\treturn $this->login( $user_obj->ID, $user_meta );\n\t\t} else {\n\t\t\t// Create a new user\n\t\t\treturn $this->register( $user, $user_meta );\n\t\t}\n\t}", "function get_user_by_service($service, $credential){\n\tglobal $wpdb;\n\tswitch($service){\n\t\tcase 'facebook':\n\t\t\t$user_id = $wpdb->get_var($wpdb->prepare(\"SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = 'wpg_facebook_id' AND meta_value = %s\", $credential));\n\t\t\tif($user_id){\n\t\t\t\treturn new WP_User($user_id);\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn null;\n\t\t\tbreak;\n\t}\n}", "private function _createNewUser($params)\n {\n $table = new User();\n $user = $table->fetchNew();\n\n $user->lang = Globals::getTranslate()->getLocale();\n $user->activationKey = $this->_generateActivationKey();\n\n $user->{User::COLUMN_USERNAME} = $params[User::COLUMN_USERNAME];\n $user->{User::COLUMN_EMAIL} = $params[User::COLUMN_EMAIL];\n $user->{User::COLUMN_STATUS} = User::STATUS_PENDING;\n\n //if($params[User::INPUT_AUTH_METHOD] == User::LOGIN_AUTHMETHOD_PASSWORD){\n $user->{User::COLUMN_PASSWORD} = md5($params[User::COLUMN_PASSWORD]);\n //} else {\n //$user->{User::COLUMN_OPENID_IDENTITY} = $params[User::INPUT_OPENID_IDENTITY];\n //}\n\n $user->save();\n return $user;\n }", "private function createUser()\n {\n $sl = $this->getServiceManager();\n $userService = $sl->get(\"zfcuser_user_service\");\n $randomness = \"mockuser_\".mt_rand();\n $data = array(\n \"username\" => \"{$randomness}\",\n \"password\" => \"password\",\n \"passwordVerify\" => \"password\",\n \"display_name\" => \"MOCKUSER\",\n \"email\" => \"{$randomness}@google.com\"\n );\n $user = $userService->register($data);\n\n return $user;\n }", "public function githubCallback(){\n //$user = Socialite::driver('github')->user();\n //print_r($user);\n $github_user = Socialite::driver('github')->user();\n $user = $this->GithubuserFindOrCreate($github_user);\n //print_r($user);\n Auth::login($user , true);\n return redirect()->route('home')->with('user',$user);\n\n }", "public function getUser()\n {\n $user = User::find()->byPhone($this->phone)->one();\n\n if ($user == null) {\n $user = new User();\n $user->phone = $this->phone;\n $user->name = $this->name;\n $user->role = User::ROLE_USER;\n\n }\n\n $user->regenerateApiToken();\n $user->code = $this->generateRandomString();\n\n return $user;\n }", "public function handleFacebookCallback(SocialFacebookAccountService $service)//inject dependency\n {\n //use created $service variable to call createorgetuser function\n //socialite driver returns an object from facebook\n $user = $service->createOrGetUser(Socialite::driver('facebook')->user());\n\n auth()->login($user);//log the user in\n\n return redirect()->to('home');\n }", "public function registerWithSocialLogin($receivedData = '')\n {\n $user = new User();\n $password = str_random(8);\n $user->password = bcrypt($password);\n $slug = $user->makeSlug($receivedData->name);\n $user->username = $slug;\n $user->slug = $slug;\n\n $role_id = getRoleData('student');\n \n $user->name = $receivedData->name;\n $user->email = $receivedData->email;\n $user->role_id = $role_id;\n $user->login_enabled = 1;\n if(!env('DEMO_MODE')) {\n $user->save();\n $user->roles()->attach($user->role_id);\n sendEmail('registration', array('user_name'=>$user->name, 'username'=>$user->slug, 'to_email' => $user->email, 'password'=>$password));\n }\n return $user;\n }", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}", "protected function getBackendUser() {}" ]
[ "0.76717234", "0.7068087", "0.7058115", "0.69822615", "0.67769223", "0.67634785", "0.67629206", "0.6654273", "0.6605464", "0.6601245", "0.6568657", "0.6567644", "0.6567644", "0.6567644", "0.6567644", "0.65487254", "0.6525146", "0.64971346", "0.6485395", "0.64805853", "0.64784175", "0.6447698", "0.63405883", "0.6302901", "0.6302548", "0.6302439", "0.6299412", "0.62798905", "0.6277727", "0.62673455", "0.62658393", "0.6265266", "0.6248282", "0.624607", "0.623615", "0.6224073", "0.61986125", "0.618151", "0.61767095", "0.61757034", "0.6174822", "0.6171053", "0.6165762", "0.6117883", "0.6117672", "0.61038125", "0.6098623", "0.6095365", "0.6091543", "0.60889333", "0.60889333", "0.60889333", "0.60889333", "0.60889333", "0.60889333", "0.60889333", "0.60879016", "0.60859036", "0.6082837", "0.60783935", "0.60764074", "0.6064939", "0.6063314", "0.6058477", "0.60520995", "0.60497516", "0.6049008", "0.60407543", "0.6032283", "0.60216063", "0.6019238", "0.6008156", "0.60067964", "0.59963435", "0.59924966", "0.599129", "0.5990608", "0.59896064", "0.59877306", "0.5983047", "0.5982836", "0.5981901", "0.597829", "0.59761494", "0.59648824", "0.59648824", "0.59648824", "0.59648824", "0.59648824", "0.59648824", "0.59642285", "0.5963975", "0.5963975", "0.5963975", "0.5963975", "0.5963975", "0.5963975", "0.5963975", "0.5963975", "0.5963975" ]
0.70348406
3
Run the database seeds.
public function run() { // if (articles::count() == 0){ articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_1', 'img' => 'article_1', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_2', 'img' => 'article_2', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_3', 'img' => 'article_3', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_4', 'img' => 'article_4', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_5', 'img' => 'article_5', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_6', 'img' => 'article_6', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_7', 'img' => 'article_1', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_8', 'img' => 'article_2', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_9', 'img' => 'article_3', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_10', 'img' => 'article_4', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_11', 'img' => 'article_5', ]); articles::create([ 'title' => 'Duis vehicula nunc dictum risus faucibus, ut dictum tellus adipiscing', 'text' => 'Vivamus ipsum eros, sollicitudin non neque nec, varius ultricies sem. Quisque leo justo, tincidunt quis consequat interdum, posuere nec dolor. Praesent interdum, augue et hendrerit tincidunt, dolor purus lobortis urna, ac sagittis turpis magna eu sem. Proin pretium, metus eu dictum fermentum, turpis magna hendrerit lacus, sed lacinia tellus eros sed nibh. Aliquam erat volutpat. Nullam eu tempor velit, sed imperdiet nibh. Etiam nibh libero, tempor ac mi sit amet, maximus rutrum ipsum. Duis facilisis tellus justo, sed venenatis ligula porta a. Integer id enim urna. Aenean id tortor convallis, elementum magna non, faucibus nulla. Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. Mauris in aliquam velit, sed fringilla dui. Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat. 1.Fusce sapien quam, ultrices eget bibendum at, laoreet eu justo. 2.Mauris in aliquam velit, sed fringilla dui. 3.Proin imperdiet rhoncus cursus. Mauris diam enim, dictum non lacus at, faucibus vestibulum neque. Mauris tempus sem ac blandit molestie. Ut fermentum, diam scelerisque blandit vestibulum, est dolor fermentum odio, in ullamcorper nunc ante id velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean a odio neque. Vestibulum ac pulvinar nulla. Nulla aliquam porttitor est, condimentum finibus libero eleifend volutpat.', 'desc' => 'Sed porta, nulla nec tincidunt viverra, est dui lobortis erat, ut euismod dui massa eget ipsum. Integer a lobortis mauris. In quis lectus sem. Nullam sagittis pellentesque ligula, eget elementum nibh consectetur in. Maecenas convallis accumsan hendrerit. Donec a augue velit.', 'alias' => 'article_12', 'img' => 'article_6', ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
DO NOT CONSIDER MULTIPLE OR RELATIONSHIP!!!! $sql = "SELECT FROM `test` WHERE name = 'WIFI_1' Order by time DESC limit 1 ";//for $result = $conn>query($sql); $row = $result>fetch_assoc(); 1
function process_allof_str($normal_pre_req) { // echo "Example function.\n"; $normal_pre_req = str_replace(';', '', $normal_pre_req); $oneof_flag = strstr($normal_pre_req, 'ONE OF'); $allof_flag = strstr($normal_pre_req, 'ALL OF'); $allof_array = []; $oneof_array=[]; $count_one_of = 0; if (strlen($oneof_flag) == 0 && strlen($allof_flag) == 0){ // $normal_pre_req_courses = str_replace(' ', '', $normal_pre_req);; // $domain = strpos($normal_pre_req, 'are') == false; // echo '===='.strpos($normal_pre_req, 'ALL OF') == false.'==='; $includeall = str_replace(' ', '', $normal_pre_req); if (sizeof($includeall)>0){# to debug $includeall_temps = explode("~", $includeall); $allof_array = array_merge($allof_array, $includeall_temps); } echo 'NO ONE OF AND ALL OF!!!'; } else{ $oneofs = explode("ONE OF", $normal_pre_req); foreach ($oneofs as $key => $value) { $allofs = explode("ALL OF", $value); # 0 index must be a one of relationship $only_oneof_temp = str_replace(' ', '', $allofs[0]); if (strlen($only_oneof_temp)>0){ # in case that there is a all of relationship in the beginning $only_oneof_temps = explode("~", $only_oneof_temp); // print_r($only_oneof_temps); $oneof_array[$count_one_of][] = $only_oneof_temps; } if (sizeof($allofs)>1){ # to debug foreach ($allofs as $key_all => $value_all) { if ($key_all ==0){ continue; } $allof_tempstring = str_replace(' ', '', $value_all); $allof_tempstrings = explode("~", $allof_tempstring); // print_r($allof_tempstrings); $allof_array = array_merge($allof_array, $allof_tempstrings); } } } echo 'YES!!'; } // print_r($oneof_array); $pre_req_all['oneof'] = $oneof_array; $pre_req_all['allof'] = $allof_array; return $pre_req_all; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TinMoiNhat_BonTin() {\n // sap theo khoa chinh idTin\n //DESC de id giam dan\n //lay tin dau tien (tin thu 0), lay 1 tin\n $qr = \"\n SELECT * FROM tin\n ORDER BY idTin DESC\n LIMIT 1,4\n \";\n $connection = mysqli_connect('localhost','root','','khoaphamtraining');\n return mysqli_query($connection,$qr);\n \n}", "function query_time_function($user_key,$search_query,$mysqli)\n{\n\t//$mysqli->query($query)or die($mysqli->error.__LINE__);;//_LINE current code row numbers\n\t$query=\"SELECT * FROM query_record \n\t\t\tWHERE user_id ='$user_key' AND query='$search_query' \n\t\t\tORDER BY `query_record`.`time` DESC \n\t\t\tLIMIT 0 , 1\";\n\t$result = $mysqli->query($query);\n\t$row1=$result->fetch_array();\n\t//echo $row1['time'].\"使用者時間\\n\";\n\treturn $row1['time'];\n}", "function TinMoiNhat_TheoLoaiTin_BonTin($idLT) {\n // sap theo khoa chinh idTin\n //DESC de id giam dan\n //lay tin dau tien (tin thu 0), lay 1 tin\n $qr = \"\n SELECT * FROM tin\n WHERE idLT = $idLT\n ORDER BY idTin DESC\n LIMIT 1,4\n \";\n $connection = mysqli_connect('localhost','root','','khoaphamtraining');\n return mysqli_query($connection,$qr);\n \n}", "function TinMoiNhat_MotTin() {\n // sap theo khoa chinh idTin\n //DESC de id giam dan\n //lay tin dau tien (tin thu 0), lay 1 tin\n $qr = \"\n SELECT * FROM tin\n ORDER BY idTin DESC\n LIMIT 0,1\n \";\n $connection = mysqli_connect('localhost','root','','khoaphamtraining');\n return mysqli_query($connection,$qr);\n \n}", "function TinMoiNhat_TheoLoaiTin_MotTin($idLT) {\n // sap theo khoa chinh idTin\n //DESC de id giam dan\n //lay tin dau tien (tin thu 0), lay 1 tin\n $qr = \"\n SELECT * FROM tin\n WHERE idLT = $idLT\n ORDER BY idTin DESC\n LIMIT 0,1\n \";\n $connection = mysqli_connect('localhost','root','','khoaphamtraining');\n return mysqli_query($connection,$qr);\n \n}", "function zhSql($w_id){\n $condition['id>?'] = $w_id;\n $rs = Data_Mysql_Table_Winchance_New::select('id,active_name,online_status,space_id', $condition, '', 50);\n if(!empty($rs)){\n import($rs);\n $w_info = end($rs);\n $w_id = (int)$w_info['id'];\n zhSql($w_id);\n }else{\n Q(\"数据关联完成'\");\n }\n}", "function getlatest($select,$table,$order ,$limit=5){\n global $con;\n $statement2 = $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\n $statement2->execute();\n $row = $statement2->fetchAll();\n return $row;\n }", "function sviRezultati() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM tabela t join korisnik k on t.korisnikID = k.korisnikID order by t.brojPoena desc';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}", "function getMyUserData() {\n\n $conn = new PDO(\"mysql:host=localhost;dbname=Ajibola;\",\n \"root\",\"root\");\n\n\n\n//$conn = mysql_connect(\"mysql:host=localhost;dbname=Ajibola\", \"root\", \"root\");//\n\n$result = $conn->query(\"select * from Plan_details\");\n\n//$result2 = $conn->query(\"SELECT * FROM sc_users WHERE username = '$uname'\");//\n\n$row = $result->fetch();\n\n//$row1 = $result2->fetch();//\n\n\n\nwhile($row) {\n\n\necho \"<p>\";\necho \"Location: $row[Name] </br>\";\necho \"</p>\";\n\n\n\n\n\n$row = $result->fetch();\n\n}\n\n\necho $name2 = $row[Name];\n\n}", "function read(){\n //select all data\n $query = \"SELECT\n id, name, status\n FROM\n \" . $this->table_name . \"\n ORDER BY\n id DESC\"; \n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "function newsItem_BacaDataListing_Terkini_All( $tbl_news ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "public function query(){\n\n $rows = $this\n ->db\n ->where(\"id >\", 1)\n ->like(\"title\", \"etti\")\n ->order_by(\"id\", \"desc\")\n ->limit(1)\n ->get(\"personel\")\n ->result();\n\n echo $this->db->last_query();\n echo \"<br>\";\n print_r($rows);\n\n\n\n }", "function fetch_single($res)\n {\n $row=mysqli_fetch_row($res);\n if(!$row)\n {\n die(\"database error:\".mysqli_error($res));\n }\n return $row[0];\n }", "function fetch_first_row() {\n $args = func_get_args();\n $args_count = func_num_args();\n if ($args_count == 1) {\n $sql = $args[0];\n }\n else {\n $sql = $args[0];\n }\n\n global $db_host, $db_user, $db_pass, $db_name;\n $conn = new mysqli($db_host, $db_user, $db_pass, $db_name);\n if ($conn->connect_errno) {\n echo T_(\"<h1>데이터베이스에 연결하던 도중 오류가 발생했습니다.</h1>\");\n exit;\n }\n $conn->query(\"SET time_zone = '+9:00'\");\n $stmt = $conn->prepare($sql);\n if ($args_count != 1) {\n $sliced = array_slice($args, 1);\n call_user_func_array(array($stmt, \"bind_param\"), make_values_referenced($sliced));\n }\n $stmt->execute();\n $stmt->store_result();\n\n if ($stmt->num_rows > 0) {\n bind_array($stmt, $row);\n $stmt->fetch();\n $stmt->close();\n $conn->close();\n return $row;\n }\n else {\n $stmt->close();\n $conn->close();\n return false;\n }\n}", "function latest($column,$table,$order,$limit=4){\n\n global $con;\n $stmt =$con->prepare(\"SELECT $column FROM $table ORDER BY($order) DESC LIMIT $limit \");\n $stmt->execute();\n $row = $stmt->fetchall();\n return $row;\n}", "function getTitle($network, $time){\n global $con;\n try {\n $sql = \"SELECT * FROM `titles` WHERE network = :network AND time = :time\";\n $sql = $con->prepare($sql);\n $time = convertTime($time);\n $time = $time . \":00\";\n $sql->bindParam(\":time\", $time);\n $sql->bindParam(\":network\", $network);\n $sql->execute();\n return $sql->fetchAll();\n } catch (PDOException $e) {\n echo $e;\n }\n}", "function query_select_last_user() {\n global $connection;\n\n $query = \"SELECT * FROM user ORDER BY userId DESC LIMIT 1;\";\n //execute query\n $result_set = mysqli_query($connection, $query);\n\n return mysqli_fetch_assoc($result_set);\n}", "function select_one($sql){\n\t\t\t$conexion = new ConexionOther();\n\t\t\t$stmt = $conexion->prepare($sql);\n $stmt->execute(); \n $datos = $stmt->fetch();\n\t\t\t$stmt = null;\n\t\t\treturn $datos;\n}", "function getOne($query)\r\n\t{\r\n\t\t$this->sql_connectsub();\r\n\t\t$result = mysqli_query($this->connect_id,$query);\r\n\t\t$dbresult=\"\";\r\n\t\tif ($result!=false) { \r\n\t\t\twhile($row = mysqli_fetch_array($result, MYSQLI_NUM)){$dbresult= $row['0'];}\r\n\t\t\treturn $dbresult;\t\r\n\t\t}\r\n\t}", "public function db_single($sql)\n {\n $result = mysqli_query($this->link , $sql);\n $single = mysqli_fetch_assoc($result);\n return $single;\n }", "function bug_get_go_id($pro_id,$go_time){\r\n\tglobal $db;\r\n\r\n\t$sql=\"SELECT go_id\r\n\tfrom go\r\n\twhere pro_id = '$pro_id'\r\n\tand go_time= '$go_time' \";\r\n\t$result = $db->query($sql);\r\n\t$row = $result->fetch_array(MYSQLI_ASSOC);\r\n\treturn $row['go_id'];\r\n}", "function readdata($conn,$User_Input)\r\n {\r\n\r\n $sql = \"SELECT wert FROM $User_Input ORDER BY id DESC LIMIT 1;\"; //Wert wird aus Tabelle abgelesen \r\n \r\n $result = mysqli_query($conn,$sql);\r\n\r\n if ($result) //Wenn Wert erfolgreich gespeichert erfolgt Ausgabe \r\n { \r\n $Data = $result->fetch_assoc();\r\n echo $Data[\"wert\"];\r\n } \r\n else \r\n {\r\n echo \"Error: \" . $sql . \" => \" . $conn->error; //Ausgabe des Fehlercodes \r\n }\r\n }", "public function fetch_one($sql){\r\n\t\t\tglobal $link;\r\n\t\t\t$result = mysqli_query($link,$sql);\r\n\t\t\t$arr = mysqli_fetch_object($result);\r\n\t\t\treturn $arr;\r\n\t\t}", "function query(String $sql)\n\t{\n\t\t$dbc = mysqli_connect(\"localhost\", \"root\", \"\", \"week7\") or die(\"Error connecting to MYSQL server\");\n\t\t\n\t\t//3. Execute the Queries\n\t\t$result = mysqli_query($dbc, $sql) or die(\"<br><br>Error querying the database\");\n\t\twhile($row = mysqli_fetch_assoc($result))\n\t\t\treturn $row;\n\n\t\t// 4. Close the connection\n\t\tmysqli_close($dbc);\t\n\t}", "function getTopTrending($connection){\n $query = \"SELECT ft.*,fs.student_name AS trendingName,fs.student_profile AS trendingProfile FROM forum_trending ft LEFT JOIN forum_student fs on ft.user_id=fs.id ORDER BY coins DESC LIMIT 10\";\n //echo $query;\n $result = $connection->query($query);\n return $result;\n }", "function getLatest($select ,$table ,$order ,$limit = 5){\n global $con ;\n $stmt = $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\n $stmt->execute();\n $rows = $stmt->fetchAll();\n return $rows;\n}", "function getLatest($select, $tblName , $order , $limit = 5)\n{\n global $conn;\n $latestStmt = $conn->prepare(\"SELECT $select FROM $tblName ORDER BY $order DESC LIMIT $limit\");\n $latestStmt->execute();\n $rows = $latestStmt->fetchAll();\n return $rows;\n}", "function afficherachats(){\n\t\t$sql=\"SElECT * From achat order by ref\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n\t catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "function triprix(){\r\n $sql=\"SELECT * FROM livraison ORDER BY prix ASC\";\r\n $db = config::getConnexion();\r\n try{\r\n $liste=$db->query($sql);\r\n return $liste;\r\n }\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n } \r\n}", "function fnGetNotification($connect)\r\n{\r\n\t$strqry = \"select payment_status from parking_info where parking_id = (select max(parking_id) from parking_info)\";\r\n\t//order by\r\n\r\n\t$result = mysqli_query($connect, $strqry);\r\n\r\n\t$temp_array = array();\r\n\r\n\twhile($row = mysqli_fetch_object($result))\r\n\t{\r\n\t\t$temp_array[] = $row;\r\n\r\n\t}\r\n\r\n\techo json_encode($temp_array);\r\n}", "function readName(){\n $query = \"SELECT id, name, status FROM \" . $this->table_name . \" WHERE id = ? limit 0,1\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $this->id);\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $this->name = $row['name'];\n $this->status = $row['status'];\n $this->id = $row['id'];\n }", "function select_default($db,$table) { \n\n\t$conn = new mysqli('localhost','id6847947_tadas','322559',$db);\n\n\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t} \n\n\t$selection= \"SELECT * FROM \" . $table . \" ORDER BY id ASC\";\n\treturn $result = $conn->query($selection);\n}", "function getLatest($select,$table,$order,$limit=5){\n global $con;\n $getStmt= $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\n $getStmt->execute();\n $rows= $getStmt->fetchAll();\n return $rows;\n}", "public function read_single(){\n $query='SELECT * FROM '.$this->table.' WHERE id=?';\n\n $stmt = $this->conn->prepare($query);\n\n $stmt->bindparam(1,$this->id);\n\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->name=$row['name'];\n $this->email=$row['email'];\n $this->status=$row['status'];\n \n }", "function fetch_assoc($sql,$type){\n\t\tif ($this->conn) {\n\t\t\t$query = mysqli_query($this->conn,$sql);\n\t\t\tif($type==0){\n\t\t\t\twhile($row = mysqli_fetch_assoc($query)){\n\t\t\t\t\t$data[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\telse if ($type==1) {\n\t\t\t\t$data = mysqli_fetch_assoc($query);\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t}\n\t}", "function feedback_view_sql()\n {\n \t$feedback_view=mysqli_query($this->con,\"SELECT * FROM `feedback` where status=1 order by id desc\");\n \treturn $feedback_view;\n }", "public function get_recent($userid , $type)\n{\n$query = mysql_query(\"SELECT `recent_act` FROM `recent_search` WHERE `userid` = '$userid' AND `module` = '$type'\");\nif(mysql_num_rows($query)>0){\n\nwhile($data = mysql_fetch_assoc($query)){\n\n$row = $data;\n\n}\nreturn $row;\n}\nelse\n{\n\n return 0;\n}\n\n\n}", "function getDetailAllStationNext($common_id1,$DbConnection)\n {\n $query=\"SELECT station_id,station_name from station USE INDEX(stn_uaid_status) where user_account_id='$common_id1' AND status='1'\";\n //echo \"query=\".$query.\"<br>\";\n $result=mysql_query($query,$DbConnection);\t\t\n while($row=mysql_fetch_object($result))\n {\t\t\t\t\t\t\t\t\t\n /*$geo_id=$row->station_id;\n $geo_name=$row->station_name;*/\n\t\t\t\n $data[]=array('geo_id'=>$row->station_id,'geo_name'=>$row->station_name);\t\n }\n return $data;\t\t\t\t\t\t\n }", "function trainer_view_sql()\n\t{\n\t\t$view_trainer=mysqli_query($this->con,\"SELECT trainer.*,categories.c_name FROM trainer,categories where trainer.c_id=categories.c_id and trainer.status=1 order by trainer.t_id desc\");\n\t\treturn $view_trainer\t;\n\t}", "function LastRow(){\n\t\t\t\t\t$this->db->select('id_servicio');\n\t\t\t\t\t$this->db->order_by('id_servicio','DESC');\n\t\t\t\t\t$this->db->limit(1);\n\t\t\t\t\t$query = $this->db->get('t_dat_servicios')->row()->id_servicio;\n\n\t\t\t\t\tif ($query != null) {\n\t\t\t\t\t\treturn $query;\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}", "function readOne() {\n\t\t\t$query = \"SELECT * FROM `\".$this->table_name.\"` WHERE id ='\".$this->id.\"'\";\n\t\t \n\t\t\t// prepare query statement\n\t\t\t$hasil = mysqli_query($this->conn, $query);\n\t\t\t \n\t\t\t$row = mysqli_fetch_array($hasil);\n\t\t\t\n\t\t\treturn $row;\n\t\t}", "function readOne(){\n \n // query to read single record\n $query = \"SELECT\n c.name as category_name, p.id, p.name, p.description, p.price, p.category_id, p.created\n FROM\n \" . $this->table_name . \" p\n LEFT JOIN\n categories c\n ON p.category_id = c.id\n WHERE\n p.id = ?\n LIMIT\n 0,1\";\n}", "function news_view_sql()\n {\n \t$news_view=mysqli_query($this->con,\"SELECT * FROM `news` order by id desc\");\n \treturn $news_view;\n }", "function fetch_user_last_activity($user_id, $link) {\n\t$sql = \"SELECT * FROM login_details WHERE user_id = '$user_id' ORDER BY last_activity DESC LIMIT 1\";\n\n\tif($stmt = mysqli_prepare($link, $sql)) {\n\t\t// Attempt to execute the prepared statement\n if(mysqli_stmt_execute($stmt)) {\n \tmysqli_stmt_store_result($stmt);\n \n // Bind result variables\n mysqli_stmt_bind_result($stmt, $login_details_id, $user_id, $last_activity, $is_type);\n while(mysqli_stmt_fetch($stmt)) {\n\n \treturn $last_activity;\n }\n } \n } \n\n}", "public function getArticle(){\r\n\t\t$sql=\"select * from article where time_at > '\" . date(\"Y-m-d\", time() - 3600 * 24 *21) .\"'order by reply_number desc limit 0,10\";\r\n\t\t$this->article15=$this->query($sql);\r\n\t\t//echo $sql;\r\n\t\t$time = $this->year.\"-\".$this->month.\"-\".$this->day;\r\n\t\t$timeNext = date(\"Y-m-d\", strtotime($time) + 24 * 3600);\r\n\t\t$sql=\"select * from article where city_id=\" . $this->city. \" and time_at between '\" . $time . \"' and '\" . $timeNext . \"' order by read_number desc limit 0,10\";\r\n\t\t$this->article=$this->query($sql);\r\n\t}", "function getAll($tName, $order){\r\n\tglobal $con;\r\n\t$getAll = $con->prepare(\"SELECT * FROM $tName ORDER BY $order DESC\");\r\n\t$getAll->execute();\t\r\n\t$all = $getAll->fetchAll();\r\n\treturn $all;\r\n}", "public function compare($name){\n\n $sql = \"SELECT a.nombre FROM area a WHERE a.nombre='$name' AND a.status=1\";\n \n return DB::singleRecord($sql);\n }", "function getDetailAllRoute($common_id1,$DbConnection)\n{\n $query=\"select * FROM route USE INDEX(route_uaid_status) WHERE user_account_id='$common_id1' and status='1'\";\n $result=mysql_query($query,$DbConnection); \t\t\t\t\t\t\t\n while($row=mysql_fetch_object($result))\n {\n /*$route_id=$row->route_id; \n $route_name=$row->route_name;*/ \t\t\t\t\t\t\t\t \n $data[]=array('route_id'=>$row->route_id,'route_name'=>$row->route_name);\n }\n return $data;\n}", "function fetchData($sql){\n\n $mysqli = new mysqli(\"localhost\",\"root\",\"root\",\"php_test\",\"3306\");\n\n if($mysqli->connect_errno){\n echo $mysqli->connect_errno;\n die($mysqli->connect_error);\n }else{\n\n echo \"数据库连接成功->\";\n $result = $mysqli->query($sql);\n\n\n if ($result->num_rows){\n\n #第一种方法\n #依次调用 mysql_fetch_row() 将返回结果集中的下一行,如果没有更多行则返回 FALSE。\n// while ($row = $result->fetch_row()){\n// print_r($row);\n// }\n\n #第2种方法\n while ($row = $result->fetch_array(MYSQLI_ASSOC)){\n print_r($row);\n echo \"<hr>\";\n }\n\n\n #第3种方法\n $row =$result->fetch_all(MYSQLI_ASSOC);\n// print_r($row);\n echo json_encode($row);\n\n }\n\n if($result){\n echo \"更新成功->\";\n }else{\n echo \"更新失败->\";\n }\n\n $mysqli->close();\n\n }\n\n\n}", "function latestitems($select, $table, $order, $limit){\r\n\tglobal $con;\r\n\t$ndstatement = $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\r\n\t$ndstatement->execute();\t\r\n\t$rows = $ndstatement->fetchAll();\r\n\treturn $rows;\r\n\r\n}", "function get_price($name)\r\n{\r\n //Read data from DB table\r\n\r\n $servername = \"localhost\";\r\n $dbname = \"webservices\";\r\n $username = \"root\";\r\n $password = \"\";\r\n\r\n\r\n // Create connection\r\n $conn = new mysqli($servername, $username, $password, $dbname);\r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n } \r\n\t\r\n\r\n \r\n $sql = \"SELECT price, make, model, year FROM vehicles_pinefalls where make ='$name' order by price asc limit 1\";\r\n $result = $conn->query($sql);\r\n\r\n $info=mysqli_fetch_array($result,MYSQLI_ASSOC);\r\n\r\n return $info;\r\n}", "function get_fresh_orderId(){\n \t$conn=new_db_connect();\n \t$query=\"select top 1 orderId from orderinfo ORDER BY orderId DESC\";\n \t$result=$conn->query($query);\n \tif($result){\n \t\t$result=$result->fetch_assoc();\n \t\t$conn->close();\n \t\treturn $result['orderId'];\n \t} else{\n \t\t$conn->close();\n \t\treturn 0;\n \t}\n }", "public function fetch_one($sql) {\n\t\t\tglobal $db;\n\t\t\t$result = mysqli_query($db,$sql);\n\t\t\treturn mysqli_fetch_object($result);\n\t\t}", "function trier(){\r\n \r\n $db = config::getConnexion();\r\n $sql=\"SElECT * From livreur ORDER BY nom\";\r\n\r\n try{\r\n $req=$db->prepare($sql);\r\n $req->execute();\r\n $livreur= $req->fetchALL(PDO::FETCH_OBJ);\r\n return $livreur;\r\n }\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n } \r\n}", "function getActWindSpeed() {\n $sql = \"SELECT name, node_id, wind_speed FROM nodes WHERE wind_speed = '1'\";\n try {\n $db = getConnection();\n $stmt = $db->query($sql);\n $nodes = $stmt->fetchAll(PDO::FETCH_OBJ);\n $db = null;\n echo '{\"Nodes\": ' . json_encode($nodes) . '}';\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":\"'. $e->getMessage() .'\"}}';\n }\n}", "function feedback_view_sql()\n {\n \t$feedback_view=mysqli_query($this->con,\"SELECT * FROM `feedback` order by id desc\");\n \treturn $feedback_view;\n }", "function my_one($query)\n{\nglobal $dbserver,$dbuser,$dbpassword,$dbname;\n$connection_id=mysqli_connect($dbserver,$dbuser,$dbpassword,$dbname) or die(\"connection failed\");\n//mysqli_select_db($dbname,$connection_id);\n$recieve=mysqli_query($connection_id,$query);\n$row=mysqli_fetch_array($recieve);\nmysqli_close($connection_id);\nreturn $row;\n}", "public function getByName($name) {\n $select_sql = \"SELECT * FROM works WHERE `name`='$name' LIMIT 1\";\n $query = mysqli_query($this->database, $select_sql);\n\n return mysqli_fetch_assoc($query);\n }", "function tampil_jadwal(){\n\t\t\tglobal $con;\n\n\t\t\t$query=mysqli_query($con, \"select * from tb_jadwal\");\n\t\t\twhile($row=mysqli_fetch_array($query))\n\t\t\t\t$data[] = $row;\n\n\t\t\t\treturn $data;\n\t\t}", "private function getHN($type = 1, $uid) {\r\n $this->db->from('wen_weibo');\r\n $this->db->where('wen_weibo.type != ', 4);\r\n $this->db->where('wen_weibo.isdel', 0);\r\n $this->db->where('wen_weibo.chosen', 1);\r\n $this->db->where('wen_weibo.ctime <', time());\r\n $this->db->where('wen_weibo.wsource', 'IOS');\r\n $this->db->or_where('wen_weibo.wsource', 'android');\r\n\r\n $offset = ($this->input->get('page') - 1) * 8;\r\n $this->db->limit(8, $offset);\r\n $this->db->join('users', 'users.id = wen_weibo.uid');\r\n //\t$this->db->join('wen_comment', 'wen_comment.contentid = wen_weibo.weibo_id');\r\n $this->db->select('users.city, users.age,wen_weibo.weibo_id,wen_weibo.pageview,wen_weibo.top,wen_weibo.top_start,wen_weibo.top_end,wen_weibo.newtime,wen_weibo.chosen,wen_weibo.chosen_start,wen_weibo.chosen_end,wen_weibo.hot,wen_weibo.hot_start,wen_weibo.hot_end,users.alias as uname,users.jifen, wen_weibo.views,wen_weibo.tags,wen_weibo.comments,wen_weibo.uid,wen_weibo.uid,wen_ewibo.imgfile,wen_weibo.content,wen_weibo.ctime, wen_weibo.type_data');\r\n\r\n if ($type == 1) {\r\n $this->db->order_by('wen_weibo.newtime desc');\r\n } else {\r\n //$this->db->select('users.alias as uname,users.phone,wen_weibo.weibo_id,wen_weibo.views,wen_weibo.comments,wen_weibo.uid,wen_weibo.uid,wen_weibo.content,wen_weibo.ctime, wen_weibo.type_data');\r\n\r\n $this->db->order_by(\"wen_weibo.hots\", \"desc\");\r\n $this->db->order_by(\"wen_weibo.comments\", \"desc\");\r\n }\r\n\r\n $tmp = $this->db->get()->result_array();\r\n $res = array ();\r\n\r\n foreach ($tmp as $r) {\r\n if($uid) {\r\n if ($this->getstate($r['uid'],$uid)) {\r\n $r['follow'] = 1;\r\n } else {\r\n $r['follow'] = 0;\r\n }\r\n\r\n }else{\r\n $item['follow'] = 0;\r\n }\r\n if($r['top_start'] <= time() && $r['top_end'] >= time()){\r\n $r['top'] = 1;\r\n }else{\r\n $r['top'] = 0;\r\n }\r\n\r\n if($r['chosen_start'] <= time() && $r['chosen_end'] >= time()){\r\n $r['chosen'] = 1;\r\n }else{\r\n $r['chosen'] = 0;\r\n }\r\n $age = $this->getAge($r['uid']);\r\n $r['age'] = isset($age)?$this->getAge($r['uid']):'';\r\n $r['sex'] = 1;\r\n if($r['hot_start'] <= time() && $r['hot_end'] >= time()){\r\n $r['hot'] = 1;\r\n }else{\r\n $r['hot'] = 0;\r\n }\r\n $r['level'] = $this->getLevel($r['jifen']);\r\n $r['pageview'] = intval($r['views']);\r\n $r['uname'] == '' && $r['uname'] = substr($r['phone'], 0, 4) . '***';\r\n if (preg_match('/^\\\\d+$/', $r['uname'])) {\r\n $r['uname'] = substr($r['uname'], 0, 4) . '***';\r\n }\r\n $r['zanNum'] = ($this->getZan($r['weibo_id'])>0)?$this->getZan($r['weibo_id']):0;\r\n if(intval($uid) > 0) {\r\n $iszan = $this->isAtZan($uid, $r['weibo_id']);\r\n if ($iszan) {\r\n $r['isZan'] = 1;\r\n } else {\r\n $r['isZan'] = 0;\r\n }\r\n }else{\r\n $r['isZan'] = 0;\r\n }\r\n if(!empty($r['tags'])){\r\n $r['tag'] = explode(',',$r['tags']);\r\n\r\n foreach($r['tag'] as $item){\r\n if($item && !is_null($item)){\r\n if($item == '' || is_null($item))\r\n continue;\r\n $arr = array();\r\n $arr['tag'] = str_replace('null','',$item);\r\n $itemid = $this->getItemId($item);\r\n $arr['other'] = $this->isItemLevel($itemid,1);\r\n if(!empty($arr['tag']))\r\n $r['tagss'][] = $arr;\r\n }\r\n }\r\n }\r\n\r\n if(empty($r['tagss'])){\r\n $r['tagss'] = array();\r\n }\r\n $rs = $this->Diary_model->get_user_by_username($r['uid']);\r\n $item ['basicinfo'] = $this->getBasicInfo($rs[0]);\r\n $r['ishot'] = 0;\r\n $r['ctime'] = date('Y-m-d', $r['ctime']);\r\n $r['newtime'] = date('Y-m-d', $r['newtime']);\r\n $dtypd = unserialize($r['type_data']);\r\n isset ($dtypd['title']) && $r['content'] = $dtypd['title'];\r\n $r['haspic'] = 0;\r\n if (!empty ($dtypd) and isset ($dtypd['pic'])) {\r\n $r['haspic'] = 1;\r\n }\r\n if ($this->input->get('thumbsize')) {\r\n $r['thumb'] = $this->remote->thumb($r['uid'], intval($this->input->get('thumbsize')));\r\n } else {\r\n $r['thumb'] = $this->profilepic($r['uid'], 2);\r\n }\r\n if($this->input->get('width')){\r\n $r['images'] = $this->Plist($r['weibo_id']);\r\n }\r\n unset ($r['type_data']);\r\n $res[] = $r;\r\n }\r\n return $res;\r\n }", "function newsItem_BacaDataListing_ByKategori_Pilihan_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND pilihan != '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_Pilihan_All( $tbl_news , $offset , $dataPerPage ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE pilihan != '0' ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "function custom_query($sql){\n\t \t$dbconnection = $this->db_connect();\n\t\tif($dbconnection !=1)\n\t\t{\n\t\t\t$result=\"MySql Connection Error\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//echo('<br>----------------------------------------------------'.$this->HOST.$this->USERNAME.$this->PASSWORD);\n\t\t\t// echo($sql);\n\t\t\t $res = mysql_query($sql);\n\t\t\t //echo($res); \n\t\t\t \n\t\t\t \t \n\t\t\t \twhile ($row = mysql_fetch_assoc($res)) \n\t\t\t \t{\n\t\t\t \t$a_data[]=$row ;\n\t\t\t \t}\n\t\t \t\t$result= $a_data;\t\n\t\t\t\t \n\t\t}\n\t\treturn $result;\n\t }", "function tridate(){\r\n $sql=\"SELECT * FROM livraison ORDER BY date ASC\";\r\n$db = config::getConnexion();\r\n try{\r\n $liste=$db->query($sql);\r\n return $liste;\r\n }\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n } \r\n}", "function select ($sql ,$conn) {\n\t\t$result = mysql_query($sql , $conn) ;\n\t\treturn $result ;\n\n\t}", "protected function execute_single_query(){\n\t\t$this -> open_connection();\n\t\t$this -> conn -> query($this -> query);\n\t\t$this -> close_connection();\n\t}", "function getDetailAllScheduleUpl($account_id_local,$DbConnection)\n{\n $query=\"select location_id,location_name FROM schedule_location_upl USE INDEX(schlupl_schluplaid_status) WHERE account_id='$account_id_local' and status='1'\";\t\t\n $result=mysql_query($query,$DbConnection); \t\t\t\t\t\t\t\n while($row=mysql_fetch_object($result))\n {\n /*$location_id=$row->location_id;\n $location_name=$row->location_name;*/\t\t\t\t\n $data[]=array('location_id'=>$row->location_id,'location_name'=>$row->location_name);\n }\n return $data;\n\t\n}", "private function get_back(){\n global $database; \n if(!empty($database)){\n \n $name = \"Wear Back\";\n $sql = \"SELECT value FROM settings WHERE name=:name LIMIT 1\"; \n $new = $database->query($sql,array(\"name\"=>$name),PDO::FETCH_OBJ);\n if(!empty($new)){\n\n $dress = array_shift($new);\n\n return $dress->value;\n \n \n }else{\n \n return \"SunPlus\";\n\n }\n\n }else{\n return \"SunPlus\";\n }\n }", "function readReal(){ \n\t\t$query = \"SELECT * FROM \" . $this->table_name . \" WHERE id=1 LIMIT 0,1\";\n\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $this->id);\n\t\t$stmt->execute();\n\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t$this->id = $row['id'];\n\t\t$this->nmp = $row['nama_pondok'];\n\t\t$this->almt = $row['alamat_pondok'];\n\t\t$this->komp = $row['komputer_pondok'];\n\t\t$this->sms = $row['no_sms_gateway'];\n\t}", "function fetchAssoc($table,$col,$condition=\"non\") {\n global $db, $dbname;\n $socket = $db;\n $select_db = $dbname;\n\n $query = \"SELECT \".$col.\" FROM `$select_db`.`$table`\"; //echo \"$query <br/>\";\n if($condition != \"non\") $query .= \" WHERE \".$condition;\n $stm = $socket->prepare($query);\n $stm->execute();\n $stm = $stm->fetchAll(PDO::FETCH_ASSOC); //echo \"query = $query \".count($stm);\n if(!isset($stm) || count($stm) == 0) return -1;\n\n\t\t//return data\n return $stm;\n}", "public static function queryOne($sql)\n\t{\n\t\t$sql = $sql . ' LIMIT 0,1'; //TODO check not already in $sql!\n\t\t\n\t\t$result = self::$link->query($sql);\n\t\t\n\t\tif(!$result)\n\t\t{\n\t\t\tself::handleError($sql);\n //TODO should probably return here\n\t\t}\n\t\t\n\t\t$row = $result->fetch_row();\n\t\t\n\t\t$result->close();\n\t\t\n\t\treturn $row[0];\n\t}", "function nvp_GetLastid($tablename) {\r\n $tablename=loginDB_real_escape_string($tablename);\r\n $query=\"SELECT `id` from `\".$tablename.\"` ORDER BY `id` DESC LIMIT 1\";\r\n $result=simple_query($query);\r\n return ($result['id']);\r\n}", "function db_selectData($query)\n\t{\n\t$this->OpenLink();\n\t$this->SelectDB();\n\t$this->query=$query;\n\t$this->result= mysqli_query($this->link,$this->query);\n\treturn $this->result;\n\t\n\t}", "function get_user_by_user_name($user_name)\n{\n global $conn;\n $q['query'] = \"SELECT * FROM `user_master` WHERE `user_name`='$user_name'\";\n $q['run'] = $conn->query($q['query']);\n $q['result'] = $q['run']->fetch_assoc();\n\n return $q['result'];\n}", "public function findByName($name, $table){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM $table WHERE name ='$name' ORDER BY id DESC\"); \n \t\t$query->execute();\n \t\treturn $query->fetch();\n\t\t}", "function fetchSingleRow($query) \t{\n\t\tif($query != '') \t\t{\n\t $res = $this->execute($query);\n\t $data = $this->fetchAll($res);\n\t if($data) return $data[0]; \n\t\t}\n\t}", "function fetchAssoc($table,$col,$condition=\"non\") {\n global $db, $dbname;\n $socket = $db;\n $select_db = $dbname;\n\n $query = \"SELECT \".$col.\" FROM `$select_db`.`$table`\"; //echo \"$query <br/>\";\n if($condition != \"non\") $query .= \" WHERE \".$condition;\n $stm = $socket->prepare($query);\n\n $stm->execute();\n $stm = $stm->fetchAll(PDO::FETCH_ASSOC); //echo \"query = $query \".count($stm);\n if(!isset($stm) || count($stm) == 0) return -1;\n\t\t//return data\n return $stm;\n}", "function oneQuery($sql){\n\t\treturn $this->fetch($this->query($sql))[0];\n\t}", "protected function get_query($sql) {\n $this->open_link();\n $result = $this->conx->query($sql);\n while ($this->rows[] = $result->fetch_assoc());\n $result->free();\n $this->close_link();\n array_pop($this->rows);\n \n return $this->rows[0];\n }", "function get_water_pumped_history($order_id){\r\n $configs = include('config/config.php');\r\n $query = \"SELECT * FROM \" . $vogomo_pump_water_history_table . \" WHERE oid='\" . $order_id . \"' AND action='water_pumped'\";\r\n //echo $query;\r\n $result = $configs->query($query);\r\n return $result;\r\n}", "function getLatest($select, $table, $order, $limit=5){\n global $con;\n $getstmt = $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\n $getstmt->execute();\n $rows = $getstmt->fetchAll();\n return $rows;\n}", "private function retrieveData(){\n\t\t\n\t\t$dbo=new DB();\n\t\t$db=$dbo->db;\n\t\t$stmt = $db->prepare(\t'SELECT `description`, '.\n\t\t\t\t\t\t\t\t\t\t'`duration` '.\n\t\t\t\t\t\t\t\t'FROM `status` '.\t\t\n\t\t\t\t\t\t\t\t'WHERE `status` = ? '.\n\t\t\t\t\t\t\t\t'LIMIT 1'\n\t\t\t\t\t\t\t\t);\n\t $stmt->bind_param(\"s\", $this->id);\n\t $stmt->bind_result($this->description,$this->duration);\n\t $stmt->execute();\n\t $stmt->fetch();\n \t\t$stmt->close();\n \t\t\n\t}", "function readOne(){\n\n\t\t$query = \"SELECT * FROM \" . $this->table_name . \" WHERE id=? LIMIT 0,1\";\n\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $this->id);\n\t\t$stmt->execute();\n\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t$this->id = $row['id'];\n\t\t$this->nmp = $row['nama_pondok'];\n\t\t$this->almt = $row['alamat_pondok'];\n\t\t$this->komp = $row['komputer_pondok'];\n\t\t$this->sms = $row['no_sms_gateway'];\n\t}", "function newsItem_BacaDataListing_ByKategori_Terkini_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function fetchStatement($account, $mysql_meta, $timeakhir) {\n\tglobal $DB;\n\t$statement = array();\n// Get reminding Account Status Details\n\t$query = \"SELECT \" . $mysql_meta . \".mt4_users.*\n\tFROM \" . $mysql_meta . \".mt4_users\n\tWHERE login ='$account' \";\n//tradeLog(\"227;query:\".$query);\n\t$result = $DB->execresultset($query);\n\tforeach($result as $row) {\n\t\t$status = $row;\n\t\t$status['user_decimal'] = '2';\n\t}\n\t$query = \"SELECT mt4_trades.*\n\tFROM \" . $mysql_meta . \".mt4_trades\n\tWHERE login ='$account'\n\tAND CMD IN ('0','1') and CLOSE_TIME ='1970-01-01 00:00:00'\n\torder by mt4_trades.TICKET desc\n\t\";\n//tradelog(\"tempstatement-181=\" . $query);\n\t$result = $DB->execresultset($query);\n\tforeach($result as $row) {\n\t\t$row['ACCNO'] = $row['LOGIN'];\n//tradelog(\"Temp_Statement-185-ACCNO:\" . $row[ACCNO]);\n\t\t$positions[] = $row;\n\t}\n\t$query = \"SELECT mt4_trades.*\n\tFROM \" . $mysql_meta . \".mt4_trades\n\tWHERE login ='$account'\n\tAND CMD IN ('0','1') and CLOSE_TIME > '$timeakhir'\n\torder by mt4_trades.TICKET desc\n\t\";\n//tradelog(\"tempstatement-211=\" . $query);\n\t$result = $DB->execresultset($query);\n\tforeach($result as $row) {\n\t\t$row['ACCNO'] = $row['LOGIN'];\n//tradelog(\"Temp_Statement-185-ACCNO:\" . $row[ACCNO]);\n\t\t$positions[] = $row;\n\t}\n\tif (count($positions) > 0) {\n//$positions = array_reverse($positions);\n\t\t$status['PL'] = 0;\n\t\t$statement['settled'] = array();\n\t\tforeach ($positions AS $row) {\n\t\t\twhile (list($key, $val) = each($row)) {\n\t\t\t\t$row[$key] = trim($val);\n\t\t\t}\n\t\t\t$counter_decimal = $row['DIGITS'] + 1;\n\t\t\t$row['Commission'] = number_format($row['COMMISSION'], 2, \".\", \"\");\n\t\t\t$row['FLCOMM'] = number_format($row['COMMISSION'], 2, \".\", \"\");\n\t\t\t$row['PL'] = number_format($row['PROFIT'], 2, \".\", \"\");\n//tradeLog(\"B_Open_position_report2-345=\" . $row[TICKET]);\n\t\t\t$row['Unit'] = $row['VOLUME'] / 100;\n\t\t\t$TotalFloating = 0;\n\t\t\tif ($row['CMD'] == '0') {\n\t\t\t\t$row['BuyPrice'] = number_format($row['OPEN_PRICE'], $counter_decimal, \".\", \"\");\n\t\t\t\t$row['BuyDisplayDate'] = substr($row['OPEN_TIME'], 6, 2) . \"/\" . substr($row['OPEN_TIME'], 4, 2) . \"/\" . substr($row['OPEN_TIME'], 0, 4);\n\t\t\t\t$row['CurrentPrice'] = $row['CLOSE_PRICE'];\n\t\t\t\t$row['Floating'] = $row['PROFIT'];\n\t\t\t\t$TotalFloating += $row['Floating'] + $row['FLCOMM'];\n\t\t\t} else {\n\t\t\t\t$row['SellPrice'] = number_format($row['OPEN_PRICE'], $counter_decimal, \".\", \"\");\n\t\t\t\t$row['SellDisplayDate'] = substr($row['OPEN_TIME'], 6, 2) . \"/\" . substr($row['OPEN_TIME'], 4, 2) . \"/\" . substr($row['OPEN_TIME'], 0, 4);\n\t\t\t\t$row['CurrentPrice'] = $row['CLOSE_PRICE'];\n\t\t\t\t$row['Floating'] = $row['PROFIT'];\n\t\t\t\t$TotalFloating += $row['Floating'] + $row['FLCOMM'];\n\t\t\t}\n\t\t\tif ($row['CLOSE_TIME'] == '1970-01-01 00:00:00') {\n\t\t\t\t$statement['open'][] = $row;\n\t\t\t} else {\n\t\t\t\t$status['PL'] = $status['PL'] + $row['PROFIT'];\n\t\t\t\t$statement['settled'][] = $row;\n\t\t\t}\n\t\t}\n\t}\n\n\t$query = \"SELECT mt4_trades.*\n\tFROM \" . $mysql_meta . \".mt4_trades\n\tWHERE login ='$account'\n\tAND CMD IN ('6','7')\n\tand OPEN_TIME > '$timeakhir'\n\torder by mt4_trades.TICKET desc\n\t\";\n//tradelog(\"tempstatement-246=\" . $query);\n\t$result = $DB->execresultset($query);\n\t$status['MARGININ'] = 0;\n\t$status['MARGINOUT'] = 0;\n\tforeach($result as $row) {\n//tradelog(\"tempstatement-249=\" . $row[CMD]);\n\t\tif ($row['CMD'] == '6') {\n\t\t\t$status['MARGININ'] = $status['MARGININ'] + $row['PROFIT'];\n\t\t}\n\t\tif ($row[CMD] == '7') {\n\t\t\t$status['MARGINOUT'] = $status['MARGINOUT'] + $row['PROFIT'];\n\t\t}\n//tradelog(\"tempstatement-249=MarginIn:\" . $status[MARGININ]);\n\t}\n\t$status['floatingsemua'] = $status['EQUITY'] - $status['PREVBALANCE'] - $status['MARGININ'] - $status['MARGINOUT'] - $status['PL'];\n\tif ($status['MARGIN'] == '0' || $status['MARGIN'] == '') {\n\t\t$status['eqratio'] = \"~%\";\n\t} else {\n\t\t$status['eqratio'] = number_format($status['EQUITY'] * 100 / $status['MARGIN'], 2, \".\", \"\") . \"%\";\n\t}\n\t$statement['status'] = $status;\n\treturn $statement;\n}", "function all(){\n try{\n $link= connecter_db();\n $rp=$link->prepare(\"select * from etudiant order by id desc\");\n $rp->execute();\n $resultat= $rp->fetchAll(); \n\n return $resultat;\n }catch(PDOException $e ){\n die (\"erreur de recuperation des etudiants dans la base de donnees \".$e->getMessage());\n }\n\n}", "function getDetailAllDevice($account_id_local,$DbConnection)\n{\n $query=\"SELECT device_manufacturing_info.device_imei_no FROM device_manufacturing_info INNER JOIN device_assignment USE INDEX(dass_aid_status) ON device_manufacturing_info.device_imei_no=\".\n \"device_assignment.device_imei_no AND device_assignment.account_id='$account_id_local' AND device_assignment.status=1\";\n $result=mysql_query($query,$DbConnection);\n while($row=mysql_fetch_object($result))\n {\n //$device_imei_no=$row->device_imei_no;\t\t\n $data[]=array('device_imei_no'=>$row->device_imei_no);\t\n }\n return $data;\n}", "public function giveOrGet(){\n //$pass = $this->db->query($result);\n \n }", "function getUserLog($user_id){\n $res=sqlQuery(\"SELECT * FROM weight_log WHERE user_id='$user_id' ORDER BY date_added ASC \");\n return $res;\n }", "function career_view_sql()\n\t{\n\t\t$view_career=mysqli_query($this->con,\"SELECT * FROM career order by career_id desc\");\n\t\treturn $view_career;\n\t}", "function career_view_sql()\n\t{\n\t\t$view_career=mysqli_query($this->con,\"SELECT * FROM career order by career_id desc\");\n\t\treturn $view_career;\n\t}", "function newsItem_BacaDataListing_ByKategori_TidakTampil_All( $tbl_news , $idkategori ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE idkategori = '$idkategori' AND statustampil == '0' ORDER BY urutan DESC, timeunix DESC \");\n\treturn $sql;\n}", "function newsItem_BacaDataListing_Tampil_All( $tbl_news , $offset , $dataPerPage ){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE statustampil = '0' ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "function AddTopDB2($strSQL, $n)\n{\t\n\treturn $strSQL.\" fetch first \".$n.\" rows only\";\n}", "function newsItem_BacaDataListing_All( $tbl_news , $offset , $dataPerPage){\n\t$sql = mysql_query(\"SELECT * FROM $tbl_news ORDER BY urutan DESC, timeunix DESC LIMIT $offset, $dataPerPage\");\n\treturn $sql;\n}", "function fetchOne($sql)\n\t{\n\t\t$this->sql =& $sql;\n\t\t$queryresult = $this->execute_query(true, $this->connection_master);\n\t\t$returnresult = $this->result($queryresult);\n\t\t$this->free_result($queryresult);\n\t\treturn $returnresult;\n\t}", "public function SelectUser($con,$name){\n $command = \"SELECT * from user_ WHERE user_name = '$name' or Email = '$name'\";\n $result = mysqli_query($con,$command);\n $row = mysqli_fetch_row($result);\n return $row;\n }", "public function fetchOne($where=\"2>1\",$order=\"idUser asc\")\n\t{\n\t\t\n\t\t$sql = \"SELECT * FROM {$this->table} WHERE {$where} order by {$order}\";\n\t\t//return une ligne de donnees\n\t\treturn $this->pdo->fetchOne($sql);\n\t}", "function db_fetch_assoc($qid) {\nif (($qid)&&($qid!=\"aaa\")){\n\treturn mysqli_fetch_assoc($qid);\n}\nreturn $row=array();\n}", "function fetch_query($condition, $limit = 0, $offset = 0)\n\t{\n\t\t$query = \"SELECT * FROM \" . TABLE_PREFIX . \"threadrate AS threadrate\";\n\t\tif ($condition)\n\t\t{\n\t\t\t$query .= \" WHERE $condition\";\n\t\t}\n\n\t\t$limit = intval($limit);\n\t\t$offset = intval($offset);\n\t\tif ($limit)\n\t\t{\n\t\t\t$query .= \" LIMIT $offset, $limit\";\n\t\t}\n\n\t\treturn $query;\n\t}", "function separation_rech($req,$id,$champord,$long){\r\n\t if(@($_GET[$id])==\"\"){\r\n\t$compt=0;\r\n\t}\r\n\telse{\r\n\t$compt=$_GET[$id] ;\r\n\t}\r\n\tif($compt==0){\r\n\t $sql= $req.\" order by $champord DESC limit $compt,\".($long);\r\n\t }\r\n\telse{\r\n\t $sql=$req.\" order by $champord DESC limit \".($long+$long*($compt-1)).\",\".($long);\r\n\t }\r\n\t //echo\"<br>\".$sql;\r\n return $sql;\r\n}" ]
[ "0.6454344", "0.64187783", "0.63956124", "0.63847333", "0.6336385", "0.60244286", "0.5798758", "0.5773929", "0.5758101", "0.5754156", "0.57442296", "0.57296526", "0.5672207", "0.56698644", "0.5669518", "0.5657249", "0.5601141", "0.55496943", "0.5548972", "0.5548443", "0.5537929", "0.5531831", "0.55298334", "0.5529395", "0.5514673", "0.55094784", "0.54879767", "0.54848474", "0.547327", "0.5454582", "0.5446642", "0.54348576", "0.54338855", "0.54312414", "0.54267925", "0.5405287", "0.54026335", "0.53947294", "0.5391286", "0.53907967", "0.5384074", "0.5372977", "0.53724855", "0.5358594", "0.53576195", "0.5352126", "0.5344612", "0.53404206", "0.5337302", "0.53356326", "0.5334924", "0.53326225", "0.533245", "0.5326417", "0.5326028", "0.53194684", "0.5317482", "0.5315872", "0.5314555", "0.53004867", "0.52950007", "0.52941895", "0.5293241", "0.5291538", "0.5286744", "0.52838904", "0.52782077", "0.52757937", "0.5275317", "0.527233", "0.527021", "0.5262445", "0.5256175", "0.5250688", "0.5245515", "0.52434236", "0.5241021", "0.52368414", "0.5234558", "0.52243", "0.5219887", "0.5218866", "0.5217108", "0.5216407", "0.5214201", "0.5213519", "0.5212404", "0.52118516", "0.5209502", "0.5206574", "0.5206574", "0.5204457", "0.5204312", "0.5204265", "0.5203773", "0.52028716", "0.51980513", "0.51947916", "0.5194512", "0.51937455", "0.5182919" ]
0.0
-1
Renvoie le nom de la plateforme
protected function getPlateformeName() { return $this->plateforme; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getName() {\n // Comprobamos si contiene algo la caja de texto\n if (isset($_POST['txtNewName'])) {\n // Con trim elemininamos cualquier espacio metido a más.\n $nombre = trim($_POST['txtNewName']);\n // función para pasar el nombre a minúsculas\n $nombre = strtolower($nombre);\n // función para pasar la primera letra de la palabra a mayúsculas \n $nombre = ucfirst($nombre);\n return $nombre;\n }\n}", "public function getNom();", "function _create_proper_name_field() {\r\n global $locale;\r\n $full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name, $this->salutation);\r\n $this->name = $full_name;\r\n $this->full_name = $full_name; \r\n\r\n\t}", "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "public function get_name();", "public function get_name();", "public function get_name();", "abstract public function get_name();", "abstract public function get_name();", "abstract public function get_name();", "public function getNomeMedico() {\n return ucwords($this->_nome); // imposta la lettera maiuscola a tutte le parole\n }", "public static function get_name() : string ;", "public static function get_name() : string ;", "public function getRealName() {}", "protected function getNameInput()\n {\n return Str::singular(parent::getNameInput());\n }", "public function get_name() {\r\n\t\treturn '';\r\n\t}", "function city_name(){\n\tif(isset($_GET[\"expansion\"])){\n\t\treturn ucwords(str_replace(\"-\", \" \", $_GET[\"expansion\"]));\n\t}else{\n\t\treturn \"\";\n\t}\n}", "function concatNom( $prenom, $nom){\n // Corps de la fonction\n $fullName = ucfirst($prenom) . \" \" . ucfirst($nom);\n \n return $fullName;\n}", "function getNombreGenericoPrestacion($nombre) {\r\n switch ($nombre) {\r\n case 'INMU':\r\n $descr = \"INMUNIZACION\";\r\n break;\r\n case 'NINO':\r\n case 'NINO_PESO':\r\n $descr = \"CONTROL PEDIATRICO\";\r\n break;\r\n case 'ADOLESCENTE':\r\n $descr = \"CONTROL ADOLESCENTE\";\r\n break;\r\n case 'PARTO':\r\n $descr = \"CONTROL DEL PARTO\";\r\n break;\r\n case 'EMB':\r\n $descr = \"CONTROL DE EMBARAZO\";\r\n break;\r\n case 'ADULTO':\r\n $descr = \"CONTROL DE ADULTO\";\r\n break;\r\n case 'SEGUIMIENTO':\r\n $descr = \"SEGUIMIENTO\";\r\n break;\r\n case 'TAL':\r\n $descr = \"TAL\";\r\n break;\r\n }\r\n return $descr;\r\n}", "public function getNome();", "public function getNome();", "abstract function normalizedName();", "public function getOrgaName();", "public function get_name()\n {\n // TODO: Implement get_name() method.\n }", "function getNameHelper(){\n\treturn 'Ejercicio de aprendizaje';\n}", "protected function getNameInput()\n {\n if ($this->option('r')) {\n $name = trim($this->argument('name'));\n } else {\n $explode = explode('.', trim($this->argument('name')));\n $name = $explode[count($explode) - 1];\n }\n return Str::slug($name);\n }", "public function getNomAlternatif()\n {\n $this->logDebug(\" [\".__FUNCTION__.\"] /Ligne: \".__LINE__.\"/ DEBUT; \");\n\n $strNomAlter = \"\";\n \n if ($this->getId() == Budget_typeTable::RESTITUE)\n {\n $strNomAlter = libelle('msg_libelle_restitution');\n } else\n {\n $strNomAlter = libelle('msg_libelle_allocation');\n }\n\n $this->logDebug(\" [\".__FUNCTION__.\"] /Ligne: \".__LINE__.\"/ FIN; \");\n\n return $strNomAlter;\n }", "public function getFullName()\n {\n return \"Brand Citozi\";\n }", "public function getNomeOriginal()\n {\n return $this->nome_original;\n }", "function Char_Name() {\r\n\t\tglobal $sr;\r\n\t\t$sr->assign(\"location_name\", \"Character Creation\");\r\n\t\t$sr->display(\"character_name.tpl.html\");\r\n\t\texit();\r\n\t}", "public function get_name()\n {\n }", "public function get_name()\n {\n }", "function seoname($name) {\n\tglobal $language_char_conversions, $originals, $replacements;\n\tif ((isset($language_char_conversions)) && ($language_char_conversions == 1)) {\n\t\t$search = explode(\",\", $originals);\n\t\t$replace = explode(\",\", $replacements);\n\t\t$name = str_replace($search, $replace, $name);\n\t}\n\t$name = stripslashes($name);\n\t$name = strtolower($name);\n\t$name = str_replace(\"&\", \"and\", $name);\n\t$name = str_replace(\" \", \"-\", $name);\n\t$name = str_replace(\"---\", \"-\", $name);\n\t$name = str_replace(\"/\", \"-\", $name);\n\t$name = str_replace(\"?\", \"\", $name);\n\t$name = preg_replace( \"/[\\.,\\\";'\\:]/\", \"\", $name );\n\t//$name = urlencode($name);\n\treturn $name;\n}", "function name_prin(){\n\n\n\techo \"_Last wxample of Sensitivity using function_\";\n}", "function nombrecampo($numcampo){return mysqli_field_name($this->Consulta_ID, $numcampo);}", "public function getNom() {\n return strval($this->nom);\n }", "private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}", "private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}", "function getName() ;", "function getName() ;", "function getName() ;", "function getName() ;", "public function getRealname()\n {\n return $this->realname;\n }", "public function forName();", "private function make_full_name() {\n return $this->firstname . \" \" . $this->infix . \" \" . $this->lastname;\n }", "protected function prepareName($name) {\n\t$name = strip_tags(trim($name));\n\t$name = preg_replace('/[^\\w\\s\\-А-Яа-я]/u', '', $name);\n\t$name = mb_strtolower($name, Yii()->charset);\n\t//$name = mb_ucfirst($name);\n\t$name = mb_ucwords($name);\n\treturn $name;\n }", "function valider_name($name){\n\t\t//on sauvegarde les données du champ, dans une session, si il y a une erreur et si 'il faut revenir en arriére\n\t\t$_SESSION['form_name'] = $name;\n\n\t\t//nom avec 2 à 20 caractères et pas d'espace [0-57A-Za-z.-]\n\t\tif(!preg_match(\"/^[^ -][a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð\\s '-]{2,20}$/\", $name)){\n\t\t\t$_SESSION['erreurform'] = true;\n\t\t\t$_SESSION ['erreurform_name'] = '<red>Veuillez entrer un nom valide!</red>'; \n\t\t}else{\n\t\t\t$_SESSION['erreurform_name'] = '';\n\t\t}\n\t}", "public function getFullName2()\n {\n return \"Silvi Lila\";\n }", "function pureName($text) {\n $text = preg_replace('~[^\\\\pL\\d]+~u', ' ', $text);\n // trim\n $text = trim($text, '-');\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n // lowercase\n // $text = strtolower($text);\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', ' ', $text);\n if (empty($text)) {\n return 'n-a';\n } else {\n\t return trim($text);\n }\n}", "public function getRealName()\n {\n\treturn $this->name;\n }", "abstract protected function generateName();", "public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }", "public function getNom() : string{\n return $this->nom;\n }", "public function getFullName()\n {\n return \"Enrisa Hasanaj\";\n }", "public function getPrenom() : string{\n return $this->prenom;\n }", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function name();", "public function getNom(): string\r\n {\r\n return $this->nom;\r\n }", "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "public function getName() {\r\n return \\models\\Database::validateData($this->_name, 'string|specialchars|strip_tags');\r\n }", "function name() {\n if (empty($this->fullname)) {\n if ($this->page[\"Name\"] == \"\") $this->openpage (\"Name\",\"person\");\n if (preg_match(\"/<title>(.*?)<\\/title>/i\",$this->page[\"Name\"],$match)) {\n $this->fullname = trim($match[1]);\n }\n }\n return $this->fullname;\n }", "public function getName()\r\n {\r\n return $this->vest() ? $this->vest()->prefix.$this->is_name.'『'.$this->vest()->tuan.$this->vest()->suffix.'』'.$this->vest()->remark : '';\r\n }", "public function getNom():string{\r\n\r\n\r\n\r\n return $this->nom;\r\n\r\n\r\n\r\n\r\n \t\t\t}", "public function getNomComplet()\n {\n return $this->getPrenomContact() . ' ' . $this->getNomContact();\n }", "function get_name_sanitized():string{\n $sanitize_name = $this->name ;\n foreach (self::SANITIZED_WORDS as $old => $new) {\n $sanitize_name = str_replace($old, $new, $sanitize_name);\n }\n return $sanitize_name;\n }", "public function getNameLukasBodnariuc(): string{\r\n return $this->nameLukasBodnariuc . \" \" . $this->surnameLukasBodnariuc;\r\n }", "public function corrigeNome($nome)\r\n {\r\n\r\n $nomeLimpo = str_replace('/', '-', $nome);\r\n $nomeLimpo = str_replace('&', 'e', $nomeLimpo);\r\n $nomeLimpo = str_replace('+', '-', $nomeLimpo);\r\n $nomeLimpo = str_replace('.', '', $nomeLimpo);\r\n $nomeLimpo = str_replace('(', '', $nomeLimpo);\r\n $nomeLimpo = str_replace(')', '', $nomeLimpo);\r\n $nomeLimpo = strtolower($nomeLimpo);\r\n $nomeLimpo = preg_replace(array(\"/(á|à|ã|â|ä)/\", \"/(Á|À|Ã|Â|Ä)/\", \"/(é|è|ê|ë)/\", \"/(É|È|Ê|Ë)/\", \"/(í|ì|î|ï)/\", \"/(Í|Ì|Î|Ï)/\", \"/(ó|ò|õ|ô|ö)/\", \"/(Ó|Ò|Õ|Ô|Ö)/\", \"/(ú|ù|û|ü)/\", \"/(Ú|Ù|Û|Ü)/\", \"/(ñ)/\", \"/(Ñ)/\"), explode(\" \", \"a A e E i I o O u U n N\"), $nomeLimpo);\r\n return ucwords($nomeLimpo);\r\n }", "public function automaticName($data)\n\t{\n\t\t$name = (isset($data['name']) && $data['name'] ? $data['name'] : $data['label']);\n\t\t$name = strip_tags($name);\n\t\t$name = trim($name);\n\n\t\treturn preg_replace(\"/[^a-zA-Z0-9_]/\", '', strtolower($name));\n\t}", "public function getFullName()\n\t{\n\t\treturn \"{$this->nombre} {$this->ape_p} {$this->ape_m}\";\n\t}", "protected function getNameInput()\n {\n return trim($this->option('name'));\n }", "function ermittle_Pokalrundenname($rundennr, $pokaltyp)\n{\n // $pokaltyp = 2 --> WM\n // Rückgabewerte\n // ermittle Namen der Pokalrunde\n $pokalrundenname = 'unbekannt';\n if ($pokaltyp === 1) {\n switch ($rundennr) {\n case 1:\n $pokalrundenname = '1. Runde';\n break;\n case 2:\n $pokalrundenname = '2. Runde';\n break;\n case 3:\n $pokalrundenname = '3. Runde';\n break;\n case 4:\n $pokalrundenname = '4. Runde';\n break;\n case 5:\n $pokalrundenname = 'Achtelfinale';\n break;\n case 6:\n $pokalrundenname = 'Viertelfinale';\n break;\n case 7:\n $pokalrundenname = 'Halbfinale';\n break;\n case 8:\n $pokalrundenname = 'Endspiel';\n break;\n default:\n $pokalrundenname = 'unbekannt';\n }\n }\n if ($pokaltyp === 2) {\n switch ($rundennr) {\n case 1:\n $pokalrundenname = 'Achtelfinale';\n break;\n case 2:\n $pokalrundenname = 'Viertelfinale';\n break;\n case 3:\n $pokalrundenname = 'Halbfinale';\n break;\n case 4:\n $pokalrundenname = 'WM-Endspiel';\n break;\n default:\n $pokalrundenname = '1. Runde';\n }\n }\n //\n return $pokalrundenname;\n}", "function nombrecampo($numcampo) {\r\n\r\n return mysql_field_name($this->Consulta_ID, $numcampo);\r\n\r\n}", "public function setNom($param)\n\t\t{\n\t\t\t$this->autnom = $param;\n\t\t}", "public function getFullName()\n\t{\n\t\treturn $this->nombre.' ['.$this->ini_formula.']';\n\t}", "function getPuzzleName($name)\n {\n return str_replace(\"-\", \" \", ucwords($name));\n }", "public function getName(){ return $this->getField('name'); }", "public function getFriendlyName();", "public function getNome() {\n return $this->oCgm->getNome();\n }", "protected function getNameInput(): string\n {\n return trim($this->argument('name')) . $this->type;\n }", "function rectifyName($name){\r\n return getNameForId(getIdForName($name));\r\n}", "function getName();", "function getName();", "function getName();", "function getName();" ]
[ "0.64185756", "0.6396761", "0.6347638", "0.6305113", "0.6300505", "0.6300505", "0.6300505", "0.6298424", "0.6298424", "0.6298424", "0.6267314", "0.6213049", "0.6213049", "0.6205563", "0.61630064", "0.61332643", "0.611526", "0.6102963", "0.60669065", "0.60215706", "0.60215706", "0.60134256", "0.6008949", "0.6001389", "0.60012984", "0.59752476", "0.5957067", "0.59461784", "0.5945729", "0.59405947", "0.59312826", "0.59303945", "0.5930036", "0.5930012", "0.59048337", "0.5894497", "0.5890514", "0.5890514", "0.5884532", "0.5884532", "0.5884532", "0.5884532", "0.5883926", "0.587418", "0.5873791", "0.5866092", "0.58651024", "0.58612764", "0.5853019", "0.5841235", "0.58274126", "0.58221036", "0.5814993", "0.5811475", "0.58037263", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792617", "0.5792113", "0.5790384", "0.5790384", "0.5790384", "0.5789851", "0.5789378", "0.578541", "0.5784773", "0.5784579", "0.5783858", "0.57824594", "0.5782311", "0.5778037", "0.5756077", "0.5750707", "0.57491904", "0.574653", "0.57463336", "0.57450247", "0.5745021", "0.57436925", "0.57389444", "0.57381725", "0.5737235", "0.5734084", "0.57235545", "0.57235545", "0.57235545", "0.57235545" ]
0.74945843
0
Renvoie la configuration de la plateforme
protected function getPlateformeConfig() { return $this->config; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadConfig(){\n\t\t\n\t\t$opt[] = [\n\t\t\t'method' => 'setFormParams',\n\t\t\t'value'=>$this->paramsLoad(3, \\sevian\\s::getReq('command_idx'), \\sevian\\s::getReq('unit_idx'))\n\t\t\t\n\t\t];\n\t\t$this->info = $opt;//$form->getInfo();\n\t}", "public function run()\n {\n $cfg = array(\n array('name' => 'pagina principal titulo','content' => '¿DÓNDE QUIERES TRABAJAR?','is_active' => 1),\n array('name' => 'pagina principal seccion oferta titulo','content' => 'Oferta Académica','is_active' => 1),\n array('name' => 'pagina principal seccion oferta texto1','content' => 'Llevamos más de 25 años formando a los mejores profesionales del sector, en el Centro de Formación San Juan lo tenemos todo preparado para que solo tengas que decidir la carrera de tu vida profesional.\nTú decides.','is_active' => 1),\n array('name' => 'pagina principal seccion oferta texto2','content' => 'Impartimos cursos de formación con preferencia a desempleados de la Comunidad de Madrid orientados a la obtención de la certificación de los principales fabricantes del sector TIC, además de certificados de profesionalidad y cursos de idiomas.','is_active' => 1),\n array('name' => 'pagina principal seccion oferta texto3','content' => 'a calidad se mide en confianza. Por ello nos sentimos más que orgullosos de contar con más de 731 empresas en nuestra bolsa de trabajo, profesionales que confían en la preparación con que nuestros alumnos comienzan sus carreras.','is_active' => 1),\n array('name' => 'pagina principal seccion informacion titulo','content' => 'Información del Centro Académico','is_active' => 1),\n array('name' => 'pagina principal seccion informacion texto','content' => 'Desde que en 1950 ocuparon sus aulas el primer centenar de alumnos, ha ido creciendo hasta su configuración actual, con el paso del tiempo se ha ido reconstruyendo y ampliando sus instalaciones, reabriendo sus puertas a la actividad docente. Desde entonces ha sido un centro educativo que ha pretendido dar respuesta a las diversas necesidades de los jovenes que buscan obtener una formación, la cual será base y clave para poder labrarse un camino en un futuro laboral.','is_active' => 1),\n array('name' => 'pagina principal seccion noticias titulo','content' => 'Ultimas Noticias','is_active' => 1),\n array('name' => 'pagina principal seccion colaboradores titulo','content' => 'Colaboradores','is_active' => 1),\n array('name' => 'footer texto','content' => 'Pide mas información a través del formulario','is_active' => 1),\n array('name' => 'footer boton','content' => 'Contacta','is_active' => 1),\n array('name' => 'footer direccion','content' => 'ContactaDirección: C/San Juan de la Cruz S/N, 28223 Pozuelo de Alarcón, Madrid ','is_active' => 1),\n array('name' => 'footer telefono','content' => 'Tfno: +(34)91 342 23 89 Fax: +(34)91 322 11 23 ','is_active' => 1),\n array('name' => 'rrss email','content' => 'mailto:centrodeformacion.com','is_active' => 1),\n array('name' => 'rrss twitter','content' => 'http://www.twitter.com','is_active' => 1),\n array('name' => 'rrss facebook','content' => 'http://www.facebook.com','is_active' => 1),\n array('name' => 'pagina nuestro centro titulo','content' => 'Nuestro Centro','is_active' => 1),\n array('name' => 'pagina nuestro centro texto1','content' => 'Desde que en 1950 ocuparon sus aulas el primer centenar de alumnos, ha ido creciendo hasta su configuración actual, con el paso del tiempo se ha ido reconstruyendo y ampliando sus instalaciones, reabriendo sus puertas a la actividad docente.','is_active' => 1),\n array('name' => 'pagina nuestro centro texto2','content' => 'Desde entonces ha sido un centro educativo que ha pretendido dar respuesta a las diversas necesidades de los jovenes que buscan obtener una formación, la cual será base y clave para poder labrarse un camino en un futuro laboral.','is_active' => 1),\n array('name' => 'pagina nuestro centro texto3','content' => 'Contamos con diversas instalaciones las cuales cubren las diferentes necesidades de la formación correspondiente, renovadas año tras año para poder ofrecer el mayor servicio junto al personal cuailificado.','is_active' => 1),\n array('name' => 'pagina secretaria titulo','content' => 'Secretaría','is_active' => 1),\n array('name' => 'pagina secretaria subtitulo','content' => 'Información General','is_active' => 1),\n array('name' => 'pagina secretaria texto1','content' => 'Horario de Secretaría: de octubre a junio en días lectivos. Únicamente en horario de mañana','is_active' => 1),\n array('name' => 'pagina secretaria texto2','content' => 'de Lunes a Viernes de 10:00 a 13:00','is_active' => 1),\n array('name' => 'pagina secretaria texto3','content' => 'Los certificados de estudios se solicitarán en Secretaría y se entregarán en un plazo de 72 horas lectivas.','is_active' => 1),\n array('name' => 'pagina noticias titulo','content' => 'Noticias','is_active' => 1),\n array('name' => 'pagina contacto titulo','content' => 'Contacto','is_active' => 1),\n array('name' => 'pagina formacion informatica titulo','content' => 'Formación en Informática','is_active' => 1),\n array('name' => 'pagina formacion sanidad titulo','content' => 'Formación en Sanidad','is_active' => 1),\n array('name' => 'pagina formacion administracion titulo','content' => 'Formación en Administración','is_active' => 1),\n array('name' => 'pagina grado medio informatica titulo','content' => 'Grado Medio de Informática','is_active' => 1),\n array('name' => 'pagina grado medio informatica texto1','content' => 'En esta formación aprenderás a instalar, configurar y mantener sistemas microinformáticos, aislados o en red, así como redes locales en pequeños entornos. Además, estos estudios incluyen los conocimientos necesarios para llevar a cabo las actividades de nivel básico de prevención de riesgos laborales.','is_active' => 1),\n array('name' => 'pagina grado medio informatica texto2','content' => 'Por eso, al finalizar estos estudios, se puede trabajar en empresas del sector servicios que se dediquen a la comercialización, montaje y reparación de equipos, redes y servicios microinformáticos en general, como parte del soporte informático de la organización o en entidades de cualquier tamaño y sector productivo que utilizan sistemas microinformáticos y redes de datos para su gestión o seguir estudiando','is_active' => 1),\n array('name' => 'pagina grado medio informatica texto3','content' => 'Cabe señalar que este Ciclo Formativo Grado Medio en Sistemas Microinformáticos y Redes es uno de los perfiles profesionales más demandados por las empresas: según los datos del Observatorio de las Ocupaciones del Servicio Público de Empleo Estatal (SEPE), esta rama de FP fue una de las tres que registró un mayor número de contrataciones en el 2014, con un total de 25.955 contratos.','is_active' => 1),\n array('name' => 'galeria titulo general','content' => 'Galería de imágenes','is_active' => 1),\n array('name' => 'pagina grado superior informatica titulo','content' => 'Grado Superior de Informática','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto1','content' => 'El mundo del desarrollo web está viviendo su mejor momento. Con una inserción laboral como ningún otro sector profesional, con una oferta de empleo incesante, cada vez son más quienes deciden formarse en esta materia. Por eso, en nuestro centro de formación hemos preparado los programas académicos más avanzados en desarrollo web, para que comiences tu carrera nada más acabar tu formación.','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto2','content' => 'Vas a una entrevista de trabajo, te preguntan qué sabes dominar del diseño web y les dices que tanto el Back como el Front-End. Se quedan boquiabiertos. Y, por supuesto, te fichan. Porque ese es nuestro objetivo: formarte en el perfil más demandado actualmente por las empresas, agencias y estudios, el de Web Developer Full Stack.','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto3','content' => 'En nuestro centro de formación te formarás con un programa especialmente orientado a tu preparación como experto en los lenguajes front-end HTML5 y CSS3, así como en el dominio del lenguaje de programación Javascript y sus dos principales frameworks: jQuery y Angular.','is_active' => 1),\n array('name' => 'pagina grado superior informatica texto4','content' => 'Además, completarás tu preparación con un conocimiento profesional de los lenguajes de programación Back-End PHP y XML, así como de gestores de bases de datos profesionales como MySQL, adentrándote en técnicas de desarrollo web imprescindibles en tu currículum, tales como Ajax.','is_active' => 1),\n array('name' => 'pagina grado medio administracion titulo','content' => 'Grado Medio de Administración','is_active' => 1),\n array('name' => 'pagina grado medio administracion texto1','content' => 'Con esta titulación oficial y homologada podrás trabajar como auxiliar administrativo en cualquier empresa o institución pública.','is_active' => 1),\n array('name' => 'pagina grado medio administracion texto2','content' => 'En el Grado Medio de Gestión Administrativa adquirirás los conocimientos básicos de gestión empresarial, de contabilidad y de confección de los principales modelos oficiales. Fórmate como auxiliar administrativo y elabora, gestiona y tramita documentos y comunicaciones. Y trabajarás también la atención al cliente y el apoyo a distintas áreas de la empresa.','is_active' => 1),\n array('name' => 'pagina grado medio administracion texto3','content' => 'Realizar actividades de apoyo administrativo en el ámbito laboral, contable, comercial, financiero y fiscal, así como de atención al cliente/usuario, tanto en empresas públicas como privadas, aplicando la normativa vigente y protocolos de calidad, asegurando la satisfacción del cliente y actuando según normas de prevención de riesgos laborales y protección ambiental.','is_active' => 1),\n array('name' => 'pagina grado superior administracion titulo','content' => 'Grado Superior de Administración','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto1','content' => 'Obtén directamente y sin pruebas libres la titulación oficial y homologada de Administración y Finanzas y prepárate para trabajar como administrativo en cualquier empresa.','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto2','content' => 'Este Grado Superior te preparará incluso para emprender y trabajar por tu cuenta. Aprende a crear y desarrollar un “business plan” y a interpretar sus proyecciones financieras y todo lo que se necesita para empezar a levantar cualquier negocio.','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto3','content' => 'Este profesional ejerce su actividad tanto en grandes como en medianas y pequeñas empresas, en cualquier sector de actividad, y particularmente en el sector servicios, así como en las administraciones públicas, desempeñando las tareas administrativas en la gestión y el asesoramiento en las áreas laboral, comercial, contable y fiscal de dichas empresas e instituciones, ofreciendo un servicio y atención a los clientes y ciudadanos, realizando trámites administrativos con las administraciones públicas y gestionando el archivo y las comunicaciones de la empresa.','is_active' => 1),\n array('name' => 'pagina grado superior administracion texto4','content' => 'Podría ser trabajador por cuenta propia, efectuando la gestión de su propia empresa, o a través del ejercicio libre de una actividad económica, como en una asesoría financiera, laboral, estudio de proyectos, entre otros.','is_active' => 1),\n array('name' => 'pagina grado medio sanidad titulo','content' => 'Grado Medio de Sanidad','is_active' => 1),\n array('name' => 'pagina grado medio sanidad texto1','content' => 'El principal objetivo de esta formación es que nuestros alumnos puedan prestar atención básica sanitaria y psicológica en el entorno pre-hospitalario, trasladar al paciente al centro sanitario, llevar a cabo actividades de tele-operación y tele-asistencia sanitaria, colaborar en la organización y desarrollo de los planes de emergencia de los dispositivos de riesgo previsibles y de la logística sanitaria ante una emergencia individual, colectiva o catástrofe.','is_active' => 1),\n array('name' => 'pagina grado medio sanidad texto2','content' => 'Con esta profesión serás capaz de evacuar al paciente o víctima utilizando las técnicas de movilización e inmovilización y adecuando la conducción a las condiciones del mismo, para realizar un traslado seguro al centro sanitario de referencia. Aplicar técnicas de soporte vital básico ventilatorio y circulatorio en situación de compromiso y de atención básica inicial en otras situaciones de emergencia, entre otras cosas.','is_active' => 1),\n array('name' => 'pagina grado medio sanidad texto3','content' => 'Podrás trabajar en el sector sanitario relacionado con el traslado de pacientes o víctimas y la prestación de atención sanitaria y psicológica inicial, colaborando en la preparación y desarrollo de la logística sanitaria ante emergencias colectivas o catástrofes, así como participando en la preparación de planes de emergencia y dispositivos de riesgo previsible del ámbito de la protección civil.','is_active' => 1),\n array('name' => 'pagina grado superior sanidad titulo','content' => 'Grado Superior de Sanidad','is_active' => 1),\n array('name' => 'pagina grado superior sanidad texto1','content' => 'El objetivo principal de esta formación superior es la de poder elaborar y tramitar documentos y comunicaciones propias de los servicios sanitarios a partir de las necesidades detectadas y en el ámbito de su responsabilidad, respetando los criterios deontológicos de la profesión.','is_active' => 1),\n array('name' => 'pagina grado superior sanidad texto2','content' => 'El plan de estudio se basará en Realizar la gestión de ingresos, altas, asignación de camas y prestación de otros servicios sanitarios a pacientes/usuarios, asegurando el cumplimiento de los procesos y los niveles de calidad. Reconocer la terminología clínica de los documentos sanitarios en relación con los procesos patológicos y su atención en los servicios sanitarios, entre otras cosas.','is_active' => 1),\n array('name' => 'pagina grado superior sanidad texto3','content' => 'Con este formación se podrá trabajar de Trabajar en el sector sanitario, en organismos e instituciones del ámbito público y en empresas privadas, tanto en atención primaria como en especializada, así como en centros hospitalarios y de investigación. Realizan su trabajo bajo la supervisión del facultativo correspondiente o gerente administrativo en su caso.','is_active' => 1),\n array('name' => 'titulo del centro','content' => 'Centro de Formación San Juan','is_active' => 1),\n );\n\n foreach($cfg as $cf){ Configuration::create($cf); }\n\n }", "static function set_config() {\n\t\tif ( file_exists( self::childpath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::childpath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'wpgrade-config' . EXT;\n\t\t}\n\t}", "function processConfiguration() ;", "function setConfig() {\n\n\t\t\t// Mapping array for PI flexform\n\t\t\t$flex2conf = array(\n\t\t\t\t'news' => 'sDEF:news',\n\t\t\t\t'days' => 'sDEF:days',\n\t\t\t\t'darkdesign' => 'sDEF:dark',\n\t\t\t\t'show_last' => 'sDEF:show_last',\n\t\t\t\t'order_by' => 'sDEF:listOrderBy',\n\t\t\t\t'asc_desc' => 'sDEF:ascDesc',\n\t\t\t\t'category_mode' => 'sDEF:categoryMode',\n\t\t\t\t'category' => 'sDEF:categorySelection',\n\t\t\t\t'sideTop' => 'sSIDE:blog',\n\t\t\t\t'sideTopTitle' => 'sSIDE:blogTitle',\n\t\t\t\t'sideTopText' => 'sSIDE:blogText',\n\t\t\t\t'sideTopImage' => 'sSIDE:blogImage',\n\t\t\t\t'sideMiddle' => 'sSIDE:reader',\n\t\t\t\t'sideMiddleTitle' => 'sSIDE:readerTitle',\n\t\t\t\t'sideMiddleText' => 'sSIDE:readerText',\n\t\t\t\t'sideMiddleImage' => 'sSIDE:readerImage',\n\t\t\t\t'sideBottom' => 'sSIDE:bottom',\n\t\t\t\t'sideBottomTitle' => 'sSIDE:bottomTitle',\n\t\t\t\t'swfParams.' => array(\n\t\t\t\t\t'loop' => 'sFLASH:loop',\n\t\t\t\t\t'menu' => 'sFLASH:menu',\n\t\t\t\t\t'quality' => 'sFLASH:quality',\n\t\t\t\t\t'scale' => 'sFLASH:scale',\n\t\t\t\t\t'bgcolor' => 'sFLASH:bgcolor',\n\t\t\t\t\t'swliveconnect' => 'sFLASH:swliveconnect',\n\t\t\t\t),\n\t\t\t\t'playerParams.' => array(\n\t\t\t\t\t'timer' => 'sPLAYER:timer',\n\t\t\t\t\t'transition' => 'sPLAYER:transition',\n\t\t\t\t\t'random' => 'sPLAYER:random',\n\t\t\t\t\t'navigation' => 'sPLAYER:navigation',\n\t\t\t\t),\n\t\t\t\t'width' => 'sFLASH:width',\n\t\t\t\t'height' => 'sFLASH:height',\n\t\t\t\t'version' => 'sFLASH:version',\n\t\t\t);\n\n\t\t\t// Ovverride TS setup with flexform\n\t\t\t$this->conf = $this->api->fe_mergeTSconfFlex($flex2conf,$this->conf,$this->piFlexForm);\n\n\t\t\t$this->conf['swfParams.']['width'] = $this->conf['width'];\n\t\t\t$this->conf['swfParams.']['height'] = $this->conf['height'];\n\t\t\t$this->conf['swfParams.']['wmode'] = $this->conf['wmode'];\n \t\t//$this->conf['width'] = 512;\n\t\t\t//$this->conf['height'] = 265;\n\t\t\t//$this->conf['wmode'] = 'opaque';\n\t\t\t// DEBUG ONLY - Output configuration array\n\t\t\t#$this->api->debug($this->conf,'MP3 Player: configuration array');\n\t\t}", "function getConfiguration() ;", "public function config()\n {\n }", "public function setConfig()\n {\n $this->postcode = isset($_POST['postcode']) ? htmlspecialchars($_POST['postcode']) : '000-0000';\n $this->maptype = isset($_POST['maptype']) ? htmlspecialchars($_POST['maptype']) : 'Static MAP';\n $this->unit = isset($_POST['unit']) ? htmlspecialchars($_POST['unit']) : 'CELSIUS';\n $this->apiLocation = isset($_POST['apiLocation']) ? htmlspecialchars($_POST['apiLocation']) : 'Google';\n $this->apiWeather = isset($_POST['apiWeather']) ? htmlspecialchars($_POST['apiWeather']) : 'OpenWeatherMap';\n }", "function before_edit_configuration() { }", "function smartrecruiters_config(){\r\n\t\t\r\n\t\t$is_connected = get_option('sr_connected');\r\n\t\t\r\n\t\tif($is_connected){\r\n\t\t\t//aplikacja juz polaczona, trzeba pokazac mozliwosc odlaczenia\r\n\t\t\t\r\n\t\t\t//jesli kliknieto disconnect\r\n\t\t\tif(isset($_POST['sr_disconnect']) && $_POST['sr_disconnect']){\r\n\t\t\t\t\t//rozlaczyc i odswiezyc strone zeby pokazac formularz logowania\r\n\t\t\t\t\tupdate_option('sr_connected', 0);\r\n\t\t\t\t\tupdate_option('sr_company', null);\r\n\t\t\t\t\t$location = 'http://'.$_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\r\n\t\t\t\t\techo '<script>window.location = \"'.$location.'\";</script>';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//pobieramy joby zeby meic departmenty i lokacje\r\n\t\t\t$company_name = get_option('srcompany');\r\n\t\t\t$url = 'https://www.smartrecruiters.com/cgi-bin/WebObjects/share.woa/wa/careersite?wpp_company='.$company_name;\r\n\t\t\r\n\t\t\t//pobieramy joby\r\n\t\t\t$get_jobs = @file_get_contents($url);\r\n\t\t\t$xml = @simplexml_load_string($get_jobs, 'SimpleXMLElement', LIBXML_NOCDATA);\r\n\t\t\t$jobs = json_decode(json_encode($xml), true);\r\n\r\n if( isset($_POST['template']) ){\r\n update_option('sr_jobDetailsPageTemplate', esc_attr($_POST['template']) );\r\n }\r\n $available_templates = get_page_templates();\r\n $active_template = get_option('sr_jobDetailsPageTemplate');\r\n\r\n\t\t\t//widok konfigurancji i odlaczania\r\n\t\t\tinclude('configure.php');\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(!empty($_GET['srcompany']) && $_GET['srcompany']){\r\n\t\t\t\tupdate_option('sr_connected', 1);\r\n\t\t\t\tupdate_option('srcompany', $_GET['srcompany']);\r\n\t\t\t\t$location = 'http://'.$_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\r\n\t\t\t\techo '<script>window.location = \"'.$location.'\";</script>';\r\n\t\t\t}\r\n\r\n\t\t\t//widok laczenia/logowania\r\n\t\t\tinclude('connect.php');\r\n\t\t}\r\n\t}", "private function createConfiguration()\n {\n $this->createVrpayecommercePluginConfig();\n $this->Form();\n }", "function action_spipbb_admin_reconfig()\n{\n\t$securiser_action = charger_fonction('securiser_action', 'inc');\n\t$arg = $securiser_action();\n\n\t$action=$arg;\n\tinclude_spip('inc/headers');\n\n\t$redirige = urldecode(_request('redirect'));\n\n\tif (!autoriser('configurer', 'plugins')) {\n\t\tinclude_spip('inc/minipres');\n\t\techo minipres();\n\t\texit;\n\t}\n\n#\tif ( ($action==\"save\") AND spipbb_is_configured() ) {\n# h. pourquoi ce controle\n# il y a un controle avant et apres cette \"action\" ! et vu les conditions de cette\n# fonction on ne peut atteindre la reecriture de la config !!\n\n# Il serait bien de pourvoir renvoyer en arg de $redirige un code d'erreur\n# interpreter dans spipbb_cofiguration pour indiquer (en rouge) l'objet qui\n# empeche la config : \"vous n'avez pas remplis ce champs, choisir ceci ... \" !!?\n#(voir gafospip)\n\n\n\tif ($action==\"save\") {\n\n\t\t$reconf=false;\n\n\t\tif (($config_spipbb=_request('config_spipbb'))\n\t\t\tand $config_spipbb!=$GLOBALS['spipbb']['configure']) {\n\t\t\t$GLOBALS['spipbb']['configure']=$config_spipbb;\n\t\t\t$reconf=true;\n\t\t}\n\t\tif ((strlen($spipbb_id_secteur=_request('spipbb_id_secteur')))\n\t\t\tand intval($spipbb_id_secteur)<>intval($GLOBALS['spipbb']['id_secteur'])) {\n\t\t\t$GLOBALS['spipbb']['id_secteur']=intval($spipbb_id_secteur);\n\t\t\t$reconf=true;\n\t\t}\n\t\tif ((strlen($id_groupe_mot=_request('id_groupe_mot')))\n\t\t\t\tand intval($id_groupe_mot)<>intval($GLOBALS['spipbb']['id_groupe_mot'])) {\n\n\t\t\t# solution boiteuse (au 1/12/07) ; peut etre revoir l_ensemble !\n\t\t\t# Mais il est important de conserver la correspondance article/post\n\t\t\t# avec leur mot-clef associes (ferme et annonce)\n\n\t\t\t# on memorise le precedent id_groupe\n\t\t\t$id_groupe_premodif = $GLOBALS['spipbb']['id_groupe_mot'];\n\n\t\t\t$GLOBALS['spipbb']['id_groupe_mot']=intval($id_groupe_mot);\n\t\t\t$reconf=true;\n\t\t}\n\t\telse if ( empty($GLOBALS['spipbb']['id_groupe_mot']) and\n\t\t\t\t(strlen($nom_groupe_mot=trim(_request('nom_groupe_mot')))) ) {\n\n\t\t\t\t// on cherche s'il n'existe pas deja\n\t\t\t\t$row = sql_fetsel('id_groupe','spip_groupes_mots', \"titre = '$nom_groupe_mot'\" ,'','','1');\n\t\t\t\tif (!$row) { // Celui la n'existe pas\n\t\t\t\t\t$res = sql_insertq(\"spip_groupes_mots\",array(\n\t\t\t\t\t\t\t'titre' => $nom_groupe_mot,\n\t\t\t\t\t\t\t'descriptif' => _T('spipbb:mot_groupe_moderation'),\n\t\t\t\t\t\t\t'articles' => 'oui',\n\t\t\t\t\t\t\t'rubriques' => 'oui',\n\t\t\t\t\t\t\t'minirezo' => 'oui',\n\t\t\t\t\t\t\t'comite' => 'oui',\n\t\t\t\t\t\t\t'forum' => 'oui' )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t$row['id_groupe'] = $res;\n\t\t\t\t}\n\t\t\t\t#\n\t\t\t\t$id_groupe_premodif='non';\n\n\t\t\t\t$GLOBALS['spipbb']['id_groupe_mot'] = $row['id_groupe'];\n\t\t\t\t// on cree les mots cles associes\n\t\t\t\t$row = sql_fetsel('count(*) AS total','spip_mots',\n\t\t\t\t\t\tarray('id_groupe='.$GLOBALS['spipbb']['id_groupe_mot']));\n\t\t\t\tif (!$row or $row['total']<3) {\n\t\t\t\t\t$GLOBALS['spipbb']['id_mot_ferme'] = spipbb_init_mot_cle(\"ferme\",$GLOBALS['spipbb']['id_groupe_mot']);\n\t\t\t\t\t$GLOBALS['spipbb']['id_mot_annonce'] = spipbb_init_mot_cle(\"annonce\",$GLOBALS['spipbb']['id_groupe_mot']);\n\t\t\t\t\t$GLOBALS['spipbb']['id_mot_postit'] = spipbb_init_mot_cle(\"postit\",$GLOBALS['spipbb']['id_groupe_mot']);\n\t\t\t\t} // L'admin doit choisir lui meme ses mots clefs\n\t\t\t\t$reconf=true;\n\t\t}\n\t\tif ((strlen($id_mot_ferme=_request('id_mot_ferme')))\n\t\t\tand intval($id_mot_ferme)<>intval($GLOBALS['spipbb']['id_mot_ferme'])) {\n\n\t\t\t#on memorise le precedent mot\n\t\t\t$id_ferme_premodif = $GLOBALS['spipbb']['id_mot_ferme'];\n\n\t\t\t$GLOBALS['spipbb']['id_mot_ferme']=intval($id_mot_ferme);\n\t\t\t$reconf=true;\n\t\t}\n\t\tif ((strlen($id_mot_annonce=_request('id_mot_annonce')))\n\t\t\tand intval($id_mot_annonce)<>intval($GLOBALS['spipbb']['id_mot_annonce'])) {\n\n\t\t\t#on memorise le precedent mot\n\t\t\t$id_annonce_premodif = $GLOBALS['spipbb']['id_mot_annonce'];\n\n\t\t\t$GLOBALS['spipbb']['id_mot_annonce']=intval($id_mot_annonce);\n\t\t\t$reconf=true;\n\t\t}\n\t\tif ((strlen($id_mot_postit=_request('id_mot_postit')))\n\t\t\tand intval($id_mot_postit)<>intval($GLOBALS['spipbb']['id_mot_postit'])) {\n\t\t\t$GLOBALS['spipbb']['id_mot_postit']=intval($id_mot_postit);\n\t\t\t$reconf=true;\n\t\t}\n\t\tif (($squelette_groupeforum=_request('squelette_groupeforum'))\n\t\t\tand $squelette_groupeforum!=$GLOBALS['spipbb']['squelette_groupeforum']) {\n\t\t\t$GLOBALS['spipbb']['squelette_groupeforum']=$squelette_groupeforum;\n\t\t\t$reconf=true;\n\t\t}\n\t\tif (($squelette_filforum=_request('squelette_filforum'))\n\t\t\tand $squelette_filforum!=$GLOBALS['spipbb']['squelette_filforum']) {\n\t\t\t$GLOBALS['spipbb']['squelette_filforum']=$squelette_filforum;\n\t\t\t$reconf=true;\n\t\t}\n\t\tif (($config_spam_words=_request('config_spam_words'))\n\t\t\tand $config_spam_words!=$GLOBALS['spipbb']['config_spam_words']) {\n\t\t\t$GLOBALS['spipbb']['config_spam_words']=$config_spam_words;\n\t\t\t$reconf=true;\n\t\t}\n\t\tif ((strlen($sw_nb_spam_ban=_request('sw_nb_spam_ban')))\n\t\t\tand intval($sw_nb_spam_ban)<>intval($GLOBALS['spipbb']['sw_nb_spam_ban'])) {\n\t\t\t$GLOBALS['spipbb']['sw_nb_spam_ban']=intval($sw_nb_spam_ban);\n\t\t\t$reconf=true;\n\t\t}\n\t\tif ((strlen($sw_ban_ip=_request('sw_ban_ip')))\n\t\t\tand intval($sw_ban_ip)<>intval($GLOBALS['spipbb']['sw_ban_ip'])) {\n\t\t\t$GLOBALS['spipbb']['sw_ban_ip']=intval($sw_ban_ip);\n\t\t\t$reconf=true;\n\t\t}\n\t\tif (($sw_ban_ip=_request('sw_admin_can_spam'))\n\t\t\tand $sw_ban_ip!=$GLOBALS['spipbb']['sw_admin_can_spam']) {\n\t\t\t$GLOBALS['spipbb']['sw_admin_can_spam']=$sw_ban_ip;\n\t\t\t$reconf=true;\n\t\t}\n\t\tif (($sw_modo_can_spam=_request('sw_modo_can_spam'))\n\t\t\tand $sw_modo_can_spam!=$GLOBALS['spipbb']['sw_modo_can_spam']) {\n\t\t\t$GLOBALS['spipbb']['sw_modo_can_spam']=$sw_modo_can_spam;\n\t\t\t$reconf=true;\n\t\t}\n\t\tif (($sw_send_pm_warning=_request('sw_send_pm_warning'))\n\t\t\tand $sw_send_pm_warning!=$GLOBALS['spipbb']['sw_send_pm_warning']) {\n\t\t\t$GLOBALS['spipbb']['sw_send_pm_warning']=$sw_send_pm_warning;\n\t\t\t$reconf=true;\n\t\t}\n\t\tif (($sw_warning_from_admin=_request('sw_warning_from_admin'))\n\t\t\tand $sw_warning_from_admin!=$GLOBALS['spipbb']['sw_warning_from_admin']) {\n\t\t\t$GLOBALS['spipbb']['sw_warning_from_admin']=$sw_warning_from_admin;\n\t\t\t$reconf=true;\n\t\t}\n\t\tif ((strlen($sw_warning_pm_titre=_request('sw_warning_pm_titre')))\n\t\t\tand $sw_warning_pm_titre!=$GLOBALS['spipbb']['sw_warning_pm_titre']) {\n\t\t\t$GLOBALS['spipbb']['sw_warning_pm_titre']=$sw_warning_pm_titre;\n\t\t\t$reconf=true;\n\t\t}\n\t\tif ((strlen($sw_warning_pm_message=_request('sw_warning_pm_message')))\n\t\t\tand $sw_warning_pm_message!=$GLOBALS['spipbb']['sw_warning_pm_message']) {\n\t\t\t$GLOBALS['spipbb']['sw_warning_pm_message']=$sw_warning_pm_message;\n\t\t\t$reconf=true;\n\t\t}\n\t\t# ajouts gafospip / scoty\n\t\t# nombre lignes dans divers tableau de presentation\n\t\tif ((strlen($fixlimit=_request('fixlimit')))\n\t\t\tand intval($fixlimit)<>intval($GLOBALS['spipbb']['fixlimit'])) {\n\t\t\t$GLOBALS['spipbb']['fixlimit']=intval($fixlimit);\n\t\t\t$reconf=true;\n\t\t}\n\t\t# temps avant deplacement d_un thread\n\t\tif ((strlen($lockmaint=_request('lockmaint')))\n\t\t\tand intval($lockmaint)<>intval($GLOBALS['spipbb']['lockmaint'])) {\n\t\t\t$GLOBALS['spipbb']['lockmaint']=intval($lockmaint);\n\t\t\t$reconf=true;\n\t\t}\n\t\tif (($affiche_bouton_abus=_request('affiche_bouton_abus'))\n\t\t\tand $affiche_bouton_abus!=$GLOBALS['spipbb']['affiche_bouton_abus']) {\n\t\t\t$GLOBALS['spipbb']['affiche_bouton_abus']=$affiche_bouton_abus;\n\t\t\t$reconf=true;\n\t\t}\n\t\tif (($affiche_bouton_rss=_request('affiche_bouton_rss'))\n\t\t\tand $affiche_bouton_rss!=$GLOBALS['spipbb']['affiche_bouton_rss']) {\n\t\t\t$GLOBALS['spipbb']['affiche_bouton_rss']=$affiche_bouton_rss;\n\t\t\t$reconf=true;\n\t\t}\n\n\n\t\t# bouton speciaux\n\t\t# bouton abus\n\t\tif (($affiche_bouton_abus=_request('affiche_bouton_abus'))\n\t\t\tand $affiche_bouton_abus!=$GLOBALS['spipbb']['affiche_bouton_abus']) {\n\t\t\t$GLOBALS['spipbb']['affiche_bouton_abus']=$affiche_bouton_abus;\n\t\t\t$reconf=true;\n\t\t}\n\t\t# bouton rss\n\t\tif (($affiche_bouton_rss=_request('affiche_bouton_rss'))\n\t\t\tand $affiche_bouton_rss!=$GLOBALS['spipbb']['affiche_bouton_rss']) {\n\t\t\t$GLOBALS['spipbb']['affiche_bouton_rss']=$affiche_bouton_rss;\n\t\t\t$reconf=true;\n\t\t}\n\t\t# c: 27/12/7\n\t\t# Par defaut on n'apparait pas dans la liste des membres sauf si option modifie\n\t\tif (($affiche_membre_defaut=_request('affiche_membre_defaut'))\n\t\t\tand $affiche_membre_defaut!=$GLOBALS['spipbb']['affiche_membre_defaut']) {\n\t\t\t$GLOBALS['spipbb']['affiche_membre_defaut']=$affiche_membre_defaut;\n\t\t\t$reconf=true;\n\t\t}\n\t\t# c: 27/12/7\n\t\t# on peut parametrer le niveau de log de spipbb compris entre 0 et 3 ( _SPIPBB_LOG_LEVEL par defaut )\n\t\tif ((strlen($log_level=_request('log_level')))\n\t\t\tand intval($log_level)<>intval($GLOBALS['spipbb']['log_level'])) {\n\t\t\t$log_level=intval($log_level);\n\t\t\t$GLOBALS['spipbb']['log_level']=($log_level>3) ? _SPIPBB_LOG_LEVEL : ( ($log_level<0) ? _SPIPBB_LOG_LEVEL : $log_level ) ;\n\t\t\t$reconf=true;\n\t\t}\n\n\t\t# h. 1/12/08 #########################################\n\t\t# Recuperer la jointure de mot-clef annonce, ferme pour articles et posts\n\t\t# d_une precedente install gafospip ( et spipbb anc. generation ??? )\n\t\t# et/ou\n\t\t# d_un changement de mot-clef (-> nouvel ID)\n\t\t#\n\t\t# Rappel :: les mots annonce et ferme peuvent etre associes\n\t\t# aux articles comme au posts\n\t\t#\n\t\tif($GLOBALS['spipbb']['id_mot_annonce']>0 AND $GLOBALS['spipbb']['id_mot_ferme']>0) {\n\t\t\t$mots_base=array('annonce','ferme');\n\t\t\t$mots_preced=array();\n\n\t\t\t# gafospip ? (passe juste en premiere install !!)\n\t\t\tif( isset($id_groupe_premodif) AND $id_groupe_premodif=='non' AND strlen($GLOBALS['meta']['gaf_install']) )\n\t\t\t{\n\t\t\t\t$gaf_install = @unserialize($GLOBALS['meta']['gaf_install']);\n\t\t\t\t$id_groupe_preced = $gaf_install['groupe'];\n\n\t\t\t\t# cherche mot \"annonce\" et \"ferme\" dans ce groupe\n\t\t\t\tforeach($mots_base as $m) {\n\t\t\t\t\t$q = sql_select(\"id_mot\",\n\t\t\t\t\t\t\t\t\t\"spip_mots\",\n\t\t\t\t\t\t\t\t\t\"titre=\"._q($m).\" AND id_groupe=\"._q($id_groupe_preced) );\n\t\t\t\t\tif($row = sql_fetch($q)) {\n\t\t\t\t\t\t$mots_preced[$m] = $row['id_mot'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trecreer_jointures_mots($GLOBALS['spipbb']['id_mot_annonce'], $GLOBALS['spipbb']['id_mot_ferme'], $mots_preced, $mots_base);\n\t\t\t}\n\t\t\t# si antecedent non gafospip (sinon rien a faire)\n\t\t\telseif(isset($id_groupe_premodif) AND is_int($id_groupe_premodif) AND $id_groupe_premodif>0)\n\t\t\t{\n\t\t\t\t$mots_preced['annonce']=$id_annonce_premodif;\n\t\t\t\t$mots_preced['ferme']=$id_ferme_premodif;\n\t\t\t\trecreer_jointures_mots($GLOBALS['spipbb']['id_mot_annonce'], $GLOBALS['spipbb']['id_mot_ferme'], $mots_preced, $mots_base);\n\t\t\t\tnettoyer_ante_jointures($mots_preced, $mots_base);\n\t\t\t}\n\n\t\t}\n\n\t\t# enreg. metas spipbb\n\t\tif ($reconf) spipbb_save_metas();\n\n\t}\n\n\tredirige_par_entete($redirige);\n}", "public static function config();", "public function configure()\n\t{\n\t\t$this->fileDir = 'form';\n\t\t$this->fileName = 'resourcebooking.js';\n\n\t\t$this->addExtension('crm.site.form.resourcebooking');\n\t\t//$this->addExtension('ui.vue.components.datepick');\n\t\t//$this->addExtension('calendar.resourcebooking');\n\n\t\t$this->embeddedModuleName = 'crm.form.resourcebooking';\n\t}", "abstract public function postConfigure();", "private function _retrievePagSeguroConfiguration(){\n \n // retrieving configurated default charset\n PagSeguroConfig::setApplicationCharset(Configuration::get('PAGSEGURO_CHARSET'));\n \n // retrieving configurated default log info\n $log_active = Configuration::get('PAGSEGURO_LOG_ACTIVE');\n if ($log_active)\n PagSeguroConfig::activeLog(_PS_ROOT_DIR_.Configuration::get('PAGSEGURO_LOG_FILELOCATION'));\n\n }", "function saveConfiguration() {\n//\t\t$field_value = DevblocksPlatform::importGPC($_POST['field_value']);\n//\t\t$this->params['field_name'] = $field_value;\n\t}", "abstract protected function defineConfiguration();", "protected function defaultConfig()\n\t{\n\t\t$this->config=array(\n\t\t\t'code'=>'1',\n\t\t\t'scanning'=>\"\",\n\t\t\t'scanCodes'=>array()\n\t\t);\n\t}", "public function _config_para_view() {\n $this->controller->set('ControleAcessoConfig', $this->config);\n }", "public function config()\n\t{\n\t\tparent::config();\n\n\t\t// change inpu\n\t\tif(self::done_step('username'))\n\t\t{\n\t\t\t// if user go to this page from username page\n\t\t\t$this->data->mobile_username = 'eusername';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// if user go to this page from mobile page\n\t\t\t$this->data->mobile_username = 'emobile';\n\t\t}\n\n\t\t// load temp username in username field\n\t\tif(self::get_session('username', 'temp_username'))\n\t\t{\n\t\t\t$this->data->get_username = self::get_session('username', 'temp_username');\n\t\t}\n\n\t\t$this->data->page['title'] = T_('Password');\n\t\t$this->data->page['desc'] = T_('Please enter password to enter');\n\n\t\tswitch (\\lib\\router::get_url(1))\n\t\t{\n\t\t\tcase 'recovery':\n\t\t\t\t$this->data->page['title'] = T_('Recovery Password');\n\t\t\t\t$this->data->page['desc'] = T_('If forget your password, Please enter new password. after pass verification your new password is usable.');\n\t\t\t\tbreak;\n\n\t\t\tcase 'signup':\n\t\t\tcase 'set':\n\t\t\t\t$this->data->page['title'] = T_('Set Password');\n\t\t\t\t$this->data->page['desc'] = T_('Please set your password to secure signup.'). ' '. T_('Next time we only need your mobile and this password to enter');\n\t\t\t\tbreak;\n\n\t\t\tcase 'change':\n\t\t\t\t$this->data->page['title'] = T_('Change to new Password');\n\t\t\t\t$this->data->page['desc'] = T_('Please set your old and new password to change it');\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "function configurar() {\n //SOLO EL ADMINISTRADOR PUEDE MATRICULAR\n if(!$this->AppUser->isRoot())\n return $this->vista->acceso_restringido();\n\n $this->includeModel('TComponente');\n\n //TODO: actualizar el codigo del programa a matricular.\n $cod_programa = $this->params['cod_programa'];\n $this->vista->addJS('jquery.dataTable');\n\n $tiene_cursos = $this->TPrograma->tieneCursos($cod_programa);\n \n $this->vista->set('tiene_cursos', $tiene_cursos);\n if(!$tiene_cursos){\n if($this->TPersona == null)\n $this->TPersona = new TPersona();\n $tiene_participantes = $this->TPersona->hayAdmitidos();\n $this->vista->set('tiene_participantes', $tiene_participantes);\n }\n \n $this->vista->display();\n }", "private function _setWebConfig()\n {\n $this->map_obj->set(\"name\", \"simplemappr\");\n $this->map_obj->setFontSet($this->font_file);\n $this->map_obj->web->set(\"template\", \"template.html\");\n $this->map_obj->web->set(\"imagepath\", $this->tmp_path);\n $this->map_obj->web->set(\"imageurl\", $this->tmp_url);\n }", "protected function setParamConfig()\n {\n $this->paramConfig = ArrayManipulation::deepMerge($this->paramConfig, array(\n 'placeholder' => array(\n 'name' => 'Platzhalter Text',\n 'type' => 'textfield'\n ),\n 'rows' => array(\n 'name' => 'Anzahl Zeilen',\n 'type' => 'textfield'\n ),\n 'maxlength' => array(\n 'name' => 'Maximale Anzahl Zeichen (optional)',\n 'type' => 'textfield'\n )\n ));\n }", "abstract public function getConfig();", "abstract protected function preConfigure();", "protected function RTEtsConfigParams() {}", "private function setPagSeguroConfig()\n {\n $activeLog = $this->getConfigData('log');\n $charset = $this->getConfigData('charset');\n\n //Module version\n PagSeguroLibrary::setModuleVersion('magento' . ':' . Mage::helper('pagseguro')->getVersion());\n\n //CMS version\n PagSeguroLibrary::setCMSVersion('magento' . ':' . Mage::getVersion());\n\n //Setup Charset\n if ($charset != null and !empty($charset)) {\n PagSeguroConfig::setApplicationCharset($charset);\n }\n\n //Setup Log\n if ($activeLog == 1) {\n $logFile = $this->getConfigData('log_file');\n\n if (self::checkFile(Mage::getBaseDir() . '/' . $logFile)) {\n PagSeguroConfig::activeLog(Mage::getBaseDir() . '/' . $logFile);\n } else {\n PagSeguroConfig::activeLog(); //Default Log\n }\n }\n }", "protected function setParamConfig()\n {\n $this->paramConfig = ArrayManipulation::deepMerge($this->paramConfig, array(\n 'compact' => array(\n 'name' => 'Kompakte Anordnung der Auswahlfelder',\n 'type' => 'radio',\n 'values' => array(\n 'ja' => 'Ja',\n 'nein' => 'Nein'\n )\n ),\n 'multicolumn' => array(\n 'name' => 'Datenspeicher: Trennung in Spalten',\n 'type' => 'radio',\n 'help' => '\n Normalerweise wird für dieses Feld im Datenspeicher eine Spalte erstellt, in welchem die getroffene Auswahl mit Komma separiert wird.\n Sofern diese Einstellung aktiviert wird, erscheint im Datenspeicher und Export eine Spalte pro getroffener Auswahl.\n ',\n 'values' => array(\n 'ja' => 'Ja',\n 'nein' => 'Nein'\n )\n ),\n 'multicolumn_label_prefix' => array(\n 'name' => 'Feld-Beschriftung pro Spalte voranstellen',\n 'type' => 'radio',\n 'help' => 'Damit die Spalten eindeutiger sind, kann der Feldname als Prefix vor jede generierte Spalte im Datenspeicher vorangestellt werden.',\n 'values' => array(\n 'ja' => 'Ja',\n 'nein' => 'Nein'\n )\n ),\n 'content' => array(\n 'name' => 'Auswahlmöglichkeiten',\n 'type' => 'textfieldArray',\n 'help' => 'Bitte geben Sie eine oder mehrere Möglichkeiten an.',\n 'separator' => Base::MULTI_ITEM_VALUES_SEPARATOR\n )\n ));\n\n // Set defaults for new fields\n $this->params['compact'] = 'nein';\n $this->params['multicolumn'] = 'nein';\n }", "public function configuracion()\n {\n $usuarioDato = new UsuarioDatoEntity();\n $usuarioDato->buscarPorPk($this->_userdata->idUser());\n\n $tarifa = new TarifasModel();\n\n $this->_view->_tarifas = $tarifa->getAll();\n\n $this->_view->_social = $usuarioDato;\n $this->_view->paneltitle = \"Configura tu cuenta\";\n $this->_view->titulo = $this->_view->getConfigure()->title;\n $this->_view->meta_descripcion = \"Sistema Perreras\";\n $this->_view->titulo_page = \"Panel principal\";\n $this->_view->renderizar(\"configuracion\", 'index');\n }", "function autoriser_ieconfig_configurer_dist($faire, $type, $id, $qui, $opt) {\r\n\treturn autoriser('webmestre', $type, $id, $qui, $opt);\r\n}", "public function setup()\n {\n \t// rtConfig::set('your-key', $your_value);\n }", "abstract public function configure();", "public function configuration()\n {\n if ($this->session->userdata('logged_in') == 1 && $this->session->userdata('user_type') != 'Admin') {\n redirect('home/login_page', 'location');\n }\n \n $data['body'] = \"admin/config/edit_config\";\n $data['time_zone'] = $this->_time_zone_list(); \n $data['language_info'] = $this->_language_list();\n $data[\"themes\"] = $this->_theme_list();\n $data['page_title'] = $this->lang->line('general settings');\n $this->_viewcontroller($data);\n }", "abstract public function generateConfiguration();", "protected function getConfiguration() {}", "public function createConfig()\n\t{\n\t}", "function conf(){\n $this->s__perfil = toba::manejador_sesiones()->get_perfiles_funcionales();\n // print_r($this->s__perfil); \n \n $p = array_search('autoridad_mesa', $this->s__perfil);\n if($p !== false){//Es autoridad de mesa\n //Cargar datos del usuario especifico\n //obtengo el nombre de usuario logueado\n $usr = toba::manejador_sesiones()->get_id_usuario_instancia();\n \n $id_mesa = $this->dep('datos')->tabla('mesa')->get_de_usr($usr);\n if(sizeof($id_mesa)>0){\n $this->s__id_mesa = $id_mesa[0]['id_mesa'];\n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \n if($this->s__mesa['estado'] >= 2){//Ya fue validado por la secretaria\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else//No se encuentra mesa asociada al usuario logueado\n toba::notificacion()->agregar(\"No se encuentra el usuario ingresado\",\"info\");\n }\n else{\n $this->s__id_mesa = toba::memoria()->get_parametro('c');//el parametro c tiene el id mesa\n \n $this->s__retorno = toba::memoria()->get_parametro('k');//el parametro k tiene la dir de retorno\n $this->s__retorno_estado = toba::memoria()->get_parametro('f');\n \n \n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \t\n $p = array_search('junta_electoral', $this->s__perfil);\n if($p !== false){//Es junta electoral\n $this->controlador()->evento('procesar')->set_etiqueta('Confirmar');\n $this->controlador()->evento('enviar')->ocultar();\n\n if($this->s__mesa['estado'] > 3){//Ya fue validado por la secretaria\n// $this->dep('form_ml_directivo')->set_solo_lectura('votos');\n// $this->dep('form_ml_superior')->set_solo_lectura('votos');\n// $this->dep('form_ml_extra')->set_solo_lectura('votos');\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else{\n $p = array_search('secretaria', $this->s__perfil);//print_r(isset($p)?'no es false':'es false');\n if($p !== false){//Es secretaria\n $this->controlador()->evento('procesar')->set_etiqueta('Validar');\n $this->controlador()->evento('enviar')->ocultar();\n\n }\n \n }\n }\n \n if(isset($this->s__id_mesa)){//Si el pedido viene de la operacion Confirmar/Cargar// \n $this->s__claustro = $this->s__mesa['id_claustro'];\n $this->s__id_nro_ue = $this->dep('datos')->tabla('sede')->get_unidad($this->s__mesa['id_sede']);\n $this->s__id_sede = $this->s__mesa['id_sede'];\n }\n }", "function configure() {\n\t\tif($GLOBALS['TSFE']->config['config']['locale_all'])\n\t\t\tsetlocale(LC_ALL, $GLOBALS['TSFE']->config['config']['locale_all']);\n\n $this->pi_setPiVarDefaults();\n\t\t$this->pi_loadLL();\n\t}", "function zarinpalwg_config() {\n $configarray = array(\n \"FriendlyName\" => array(\"Type\" => \"System\", \"Value\"=>\"زرین پال - وب گیت\"),\n \"merchantID\" => array(\"FriendlyName\" => \"merchantID\", \"Type\" => \"text\", \"Size\" => \"50\", ),\n \"Currencies\" => array(\"FriendlyName\" => \"Currencies\", \"Type\" => \"dropdown\", \"Options\" => \"Rial,Toman\", ),\n\t \"MirrorName\" => array(\"FriendlyName\" => \"نود اتصال\", \"Type\" => \"dropdown\", \"Options\" => \"آلمان,ایران,خودکار\", \"Description\" => \"چناانچه سرور شما در ایران باشد ایران دا انتخاب کنید و در غیر اینصورت آلمان و یا خودکار را انتخاب کنید\", ),\n \"afp\" => array(\"FriendlyName\" => \"افزودن کارمزد به قیمت ها\", \"Type\" => \"yesno\", \"Description\" => \"در صورت انتخاب 2.5 درصد به هزینه پرداخت شده افزوده می شود.\", ),\n );\n\treturn $configarray;\n}", "abstract protected function getConfig();", "protected function setup_config() {\n\t\t\t// TODO: Implement setup_config() method.\n\t\t}", "private function init(){\r\n\t\t$this->readDescriptionConfig();\r\n\t\t$this->readKeywordsConfig();\r\n\t\t$this->readMetaConfig();\r\n\t\t$this->readLinksConfig();\r\n\t\t$this->readScriptsConfig();\r\n\t}", "public function specialization() {\n if ($this->config === null) {\n $this->config = new stdClass();\n }\n // Set always show_dedication config settings to avoid errors.\n if (!isset($this->config->show_dedication)) {\n $this->config->show_dedication = 0;\n }\n }", "public function config()\n {\n $errors = [];\n $values = [];\n\n if ($this->request->isPost()) {\n $values = $this->request->getValues();\n\n $validation_errors = $this->validateValues($values);\n\n if (!$validation_errors) {\n $values['human_name'] = $this->fixHumanName($values['human_name']); \n $machine_name = $this->createMachineName($values['human_name']);\n $beauty_name = $this->beautyName($values['human_name']);\n $values['machine_name'] = $machine_name;\n $values['beauty_name'] = $beauty_name;\n $type_id = $this->db->table(MetadataTypeModel::TABLE)->persist($values);\n if ($type_id) {\n $this->flash->success(t('Metadata type created successfully.'));\n } else {\n $this->flash->failure(t('Error saving the metadata type. Retry.'));\n }\n } else {\n $errors = $validation_errors;\n $this->flash->failure(t('There are errors in your submission.'));\n }\n }\n\n $metadataTypes = $this->metadataTypeModel->getAll();\n\n $this->response->html($this->helper->layout->config('MetaMagik:config/metadata_types', [\n 'values' => $values,\n 'errors' => $errors,\n 'types' => $metadataTypes,\n 'title' => t('Settings').' &gt; '.t('Custom Fields'),\n ]));\n }", "public function configSave()\n\t{\n\t\t$section = Mage::app()->getRequest()->getParam('section');\n\t\tif ($section == 'mtghost_design')\n\t\t{\n\t\t\t$websiteCode = Mage::app()->getRequest()->getParam('website');\n\t\t\t$storeCode = Mage::app()->getRequest()->getParam('store');\n\t\t\t\n\t\t\tMage::getSingleton('mtghost/cssgen_generator')->generateCss('design', $websiteCode, $storeCode);\n\t\t}else if($section == 'mtghost'){\n $websiteCode = Mage::app()->getRequest()->getParam('website');\n $storeCode = Mage::app()->getRequest()->getParam('store');\n\n Mage::getSingleton('mtghost/cssgen_generator')->generateCss('layout', $websiteCode, $storeCode);\n }\n\t}", "private function reconfigure() {\n\t\t$global = JConfig::getInstance();\n\t\tforeach ($global as $key => $value) {\n\t\t\tif (array_key_exists($key, $this->config)) {\n\t\t\t\t$this->config[$key] = $value;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tif (class_exists('JPConfig')) {\n\t\t\t\t$this->config = array_merge($this->config, JPConfig::getData());\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t// class JPConfig doesn't exist\n\t\t}\n\t}", "public function configure()\n\t{\n\t\tif (!$this->form)\n\t\t{\n\t\t\t$this->form = new WebForm\\Form($this->getId());\n\t\t}\n\n\t\t$data = $this->form->get();\n\t\t$isCloud = Loader::includeModule('bitrix24');\n\n\t\t$this->fileDir = 'form';\n\t\t$this->fileName = str_replace(\n\t\t\t['#id#', '#sec#'],\n\t\t\t[$this->getId(), $data['SECURITY_CODE']],\n\t\t\t$isCloud ? 'loader_#id#.js' : 'loader_#id#_#sec#.js'\n\t\t);\n\n\t\t$name = 'crm.site.form.embed.unit';\n\t\t$this->addExtension($name);\n\t\t$module = $this->getModule($name);\n\t\t$module->getProfile()->setCallParameter($this->getCallParameter());\n\n\t\t$this->embeddedModuleName = 'crm.site.form.unit.loader';\n\t}", "public function configure() {\r\n\t\r\n\t}", "protected function _initConfig()\n {\n parent::_initConfig();\n $this->_mergeConfig(array(\n 'get_descriptions' => false, // true to get descriptions for text sections\n ));\n }", "protected function _config(){\n parent::_config();\n Raxan::loadLangFile(\"info-module\");\n $this->mnuItem = \"RQHIST\";\n }", "public function config_save() {\n }", "public function ccpa_banner_configuration() {\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\techo esc_html( 'You do not have sufficient permissions to access this page.' );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->save_banner_settings();\n\t\t$this->save_banner_behavior_settings();\n\t\t$this->save_settings();\n\t\t$this->cookiepro_ccpc_button_floatings = get_option( 'CookieProCCPAButtonFloatings' );\n\t\t$this->banner_settings_constant = array(\n\t\t\t'constant' => $this->get_constant_data_array(),\n\t\t\t'field' => $this->get_banner_setting_data_as_array(),\n\t\t\t'behavior' => $this->get_banner_behaviors_setting_data_as_array(),\n\t\t\t'Floating' => $this->cookiepro_ccpc_button_floatings,\n\t\t\t'publishstatus' => $this->display_status(),\n\t\t);\n\t\tinclude_once WP_PLUGIN_DIR . '/' . $this->plugin->name . '/views/settings.php';\n\t}", "abstract protected function configure();", "abstract protected function configure();", "function configurar_formulario (toba_ei_formulario $form){\n switch ($this->s__tipo){\n case \"Definitiva\" : $this->cargar_form_definitivo($form); break;\n case \"Periodo\" : $this->cargar_form_periodo($form); break;\n }\n }", "function setup_mynautique_config($configuration){\n // we need to be admin to configure myNautique\n if(_is_mynautique_configured($configuration)){\n _is_admin_or_return($configuration);\n }\n\n // get and validate user input\n $data = json_decode(file_get_contents('php://input'));\n return _set_mynautique_config($configuration, $data);\n }", "protected function postConfigure()\n {\n }", "public function hookConfigForm() {\n }", "public function hookConfigForm() {\n\t\trequire IIIF_API_BRIDGE_DIRECTORY . '/config_form.php';\n\t}", "function autoriser_cfg_bouton($faire,$quoi,$id,$qui,$options) {\n\t// si on est admin\n\treturn autoriser('configurer','cfg');\n}", "public static function config() {\n require_once( 'includes/widget-config.php' );\n }", "function SetAdminConfiguration() {\n\t\t\tadd_options_page(\"3B Meteo\", \"3B Meteo\", 8, basename(__FILE__), array(\"TreBiMeteo\",'DesignAdminPage'));\n\t\t}", "public function cfg_setup()\n\t{\n\t\t$this->cfg = AppConfig::get()[\"app\"];\n\t\t$this->cfg[\"app_name\"] = $this->cfg[\"name\"];\n\n\t}", "public function processConfiguration() {}", "function construct_settings()\r\n\t{\r\n\t\tglobal $ilance, $phrase;\r\n\t\t\t\r\n\t\t$sql = $ilance->db->query(\"SELECT * FROM \" . DB_PREFIX . \"fbbridge_configuration\", 0, null, __FILE__, __LINE__);\r\n\t\tif ($ilance->db->num_rows($sql) > 0)\r\n\t\t{\r\n\t\t\t\t$html = '';\r\n\t\t\t\twhile ($res = $ilance->db->fetch_array($sql))\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t\t$html .= '<tr>';\r\n\t\t\t\t\t$html .= '<td width=\"27%\" valign=\"top\" nowrap>'.stripslashes($res['description']).'</td>';\r\n\t\t\t\t\t$html .= '<td width=\"34%\" align=\"left\" valign=\"top\">';\r\n\t\t\t\t\tif($res['inputtype'] == \"yesno\")\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\t$html .= '<input type=\"radio\" name=\"'.$res['name'].'\" id=\"'.$res['name'].'\" value=\"1\" ';\r\n\t\t\t\t\t\tif ($res['value'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= 'checked=\"checked\">';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$html .= '<label for=\"'.$res['name'].'\">'.$phrase['_yes'].'</label>';\r\n\r\n\t\t\t\t\t\t$html .= '<input name=\"'.$res['name'].'\" id=\"'.$res['name'].'2\" type=\"radio\" value=\"0\" ';\r\n\t\t\t\t\t\tif ($res['value'] == 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= 'checked=\"checked\">';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<label for=\"'.$res['name'].'2\">'.$phrase['_no'].'</label>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($res['inputtype'] == 'textarea')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<textarea name=\"'.$res['name'].'\" id=\"'.$res['name'].'\" style=\"width:250px; height:100px;\">'.$res['value'].'</textarea>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($res['inputtype'] == 'text')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .='<input style=\"padding:2px; height:15px; width:150px; font-family: verdana;\" id=\"'.$res['name'].'\" type=\"text\" name=\"'.$res['name'].'\" value=\"'.$res['value'].'\" />';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$html .= '</td>';\r\n\t\t\t\t\t$html .= '</tr>';\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$html .= '<tr>';\r\n\t\t\t\t$html .= '<td width=\"27%\" height=\"15\">'.stripslashes($res['description']).'</td>';\r\n\t\t\t\t$html .= '</tr>';\r\n\t\t}\r\n\t\treturn $html;\r\n\t}", "public function setConfiguration() {\n\n // Make sure all new services are available.\n drupal_flush_all_caches();\n $this->updateConfig();\n // Make sure configuration changes are available.\n drupal_flush_all_caches();\n $this->updateAuthors();\n $this->output()->writeln('Your configuration is complete.');\n }", "function ciag_groupe_auteurs_edit_config($row)\n{\n\tglobal $spip_ecran, $spip_lang, $spip_display;\n\n\t$config = $GLOBALS['meta'];\n\t$config['lignes'] = ($spip_ecran == \"large\")? 8 : 5;\n\t$config['afficher_barre'] = false;\n\t$config['langue'] = $spip_lang;\n\treturn $config;\n}", "abstract protected function define_my_settings();", "public function run()\n {\n $settings = new \\App\\Settings();\n $settings->title = 'Camo-Tec™ Интернет-магазин милитари одежды оригинального качества';\n $settings->description = 'Camo-Tec™ Большой выбор милитари одежды | ① Низкие цены ② Высокое качество ③ Доставка: вся Украина - ☎ (063)135-15-40';\n $settings->title_shop = 'Camo-Tec™';\n $settings->owner = 'Camo-Tec™';\n $settings->address = 'Наш офіс знаходиться за адресою: м. Одесса, вул. Базовая, 11, 65120';\n $settings->geocode = '51.519,31.2706109';\n $settings->email = '[email protected]';\n $settings->telephone = '+38(063) 135 15 40';\n $settings->open = \"<p class=\\\"adres icon-gps\\\">ул. Базовая, 11, 65120</p>\n <p class=\\\"phone icon-walkie-talkie\\\"><a href=\\\"tel:+380631351540\\\">+380 63 135 15 40</a>, <a href=\\\"tel:+380978882165\\\">+380 97 888 21 65</a></p>\n <p class=\\\"email icon-envelope\\\"><a href=\\\"mailto:[email protected]\\\">[email protected]</a></p>\";\n $settings->open_ua = \"<p class=\\\"adres icon-gps\\\">ул. Базовая, 11, 65120</p>\n <p class=\\\"phone icon-walkie-talkie\\\"><a href=\\\"tel:+380631351540\\\">+380 63 135 15 40</a>, <a href=\\\"tel:+380978882165\\\">+380 97 888 21 65</a></p>\n <p class=\\\"email icon-envelope\\\"><a href=\\\"mailto:[email protected]\\\">[email protected]</a></p>\";\n $settings->open_en = \"<p class=\\\"adres icon-gps\\\">ул. Базовая, 11, 65120</p>\n <p class=\\\"phone icon-walkie-talkie\\\"><a href=\\\"tel:+380631351540\\\">+380 63 135 15 40</a>, <a href=\\\"tel:+380978882165\\\">+380 97 888 21 65</a></p>\n <p class=\\\"email icon-envelope\\\"><a href=\\\"mailto:[email protected]\\\">[email protected]</a></p>\";\n $settings->save();\n }", "abstract protected function loadConfig();", "function realstate_admin_configuration() {\n osc_plugin_configure_view(osc_plugin_path(__FILE__));\n}", "function renderConfigForm() {\n\t}", "private function mergeConfig()\n {\n $countries = $this->countryIso();\n $this->app->configure('priongeography');\n\n $this->mergeConfigFrom(\n __DIR__ . '/config/priongeography.php',\n 'priongeography'\n );\n }", "public function getConfiguration() {}", "public function getConfiguration() {}", "function lire_config($cfg='', $def=null, $unserialize=true) {\n // ou valeur qui est en fait implicitement /meta/valeur\n // ou casier/valeur qui est en fait implicitement /meta/casier/valeur\n\n // traiter en priorite le cas simple et frequent\n // de lecture direct $GLOBALS['meta']['truc'], si $cfg ne contient ni / ni :\n if ($cfg AND strpbrk($cfg,'/:')===false){\n $r = isset($GLOBALS['meta'][$cfg])?\n ((!$unserialize\n // ne pas essayer de deserialiser autre chose qu'une chaine\n OR !is_string($GLOBALS['meta'][$cfg])\n // ne pas essayer de deserialiser si ce n'est visiblement pas une chaine serializee\n OR strpos($GLOBALS['meta'][$cfg],':')===false\n OR ($t=@unserialize($GLOBALS['meta'][$cfg]))===false)?$GLOBALS['met\na'][$cfg]:$t)\n :$def;\n return $r;\n }\n\n // Brancher sur methodes externes si besoin\n if ($cfg AND $p=strpos($cfg,'::')){\n $methode = substr($cfg,0,$p);\n $lire_config = charger_fonction($methode, 'lire_config');\n return $lire_config(substr($cfg,$p+2),$def,$unserialize);\n }\n\n list($table,$casier,$sous_casier) = expliquer_config($cfg);\n\n if (!isset($GLOBALS[$table]))\n return $def;\n\n $r = $GLOBALS[$table];\n\n // si on a demande #CONFIG{/meta,'',0}\n if (!$casier)\n return $unserialize ? $r : serialize($r);\n\n // casier principal :\n // le deserializer si demande\n // ou si on a besoin\n // d'un sous casier\n $r = isset($r[$casier])?$r[$casier]:null;\n if (($unserialize OR count($sous_casier)) AND $r AND is_string($r))\n $r = (($t=@unserialize($r))===false?$r:$t);\n\n // aller chercher le sous_casier\n while(!is_null($r) AND $casier = array_shift($sous_casier))\n $r = isset($r[$casier])?$r[$casier]:null;\n\n if (is_null($r)) return $def;\n return $r;\n}", "public function getConfig() {\r\n\r\n\t}", "public function populateLocalConfiguration() {}", "public function setRegistry()\n {\n $reg = controllers\\Registry::getInstance();\n foreach ($this->config as $key => $value)\n {\n $reg->setResource($key, $value, true);\n }\n\n\n }", "public function configure();", "function getConfiguration($c) {\r\n $config = array(); \r\n $config['width'] = 'width='.$c['width'];\r\n $config['height'] = 'height='.$c['height'];\r\n $config['backgroundColor'] = ($c['backgroundColor']!='FFFFFF') ? 'backcolor=0x'.$c['backgroundColor'] : '';\r\n $config['foregroundColor'] = ($c['foregroundColor']!='000000') ? 'frontcolor=0x'.$c['foregroundColor'] : '';\r\n $config['highlightColor'] = ($c['highlightColor']!='000000') ? 'lightcolor=0x'.$c['highlightColor'] : '';\r\n $config['screenColor'] = ($c['screenColor']!='000000') ? 'screencolor='.$c['screenColor'] : '';\r\n $config['backgroundImage'] = ($c['backgroundImage']!='') ? 'image=http://'.$c['backgroundImage'] : '';\r\n $config['largeControllBar'] = ($c['largeControllBar']==1) ? 'largecontrols=true' : '';\r\n $config['showDigits'] = ($c['showDigits']!='true') ? 'showdigits='.$c['showDigits'] : '';\r\n# $config['showDownload'] = ($c['showDownload']==1) ? 'showdownload=true&link=\"'.t3lib_div::getIndpEnv('TYPO3_SITE_URL').t3lib_extMgm::siteRelpath('rgmediaimages').'saveFile.php&file='.$url.'\"': '';\r\n $config['showEqualizer'] = ($c['showEqualizer']==1) ? 'showeq=true' : '';\r\n $config['showLoadPlay'] = ($c['showLoadPlay']==0) ? 'showicons=false' : '';\r\n $config['showVolume'] = ($c['showVolume']==0) ? 'showvolume=false' : '';\r\n $config['autoStart'] = ($c['autoStart']!='false') ? 'autostart='.$c['autoStart'] : '';\r\n $config['autoRepeat'] = ($c['autoRepeat']!='false') ? 'repeat='.$c['autoRepeat'] : ''; \r\n $config['volume'] = ($c['volume']!=80) ? 'volume='.intval($c['volume']) : '';\r\n $config['logo'] = ($c['logo']!='') ? 'logo=http://'.$c['logo'] : '';\r\n \r\n return $config;\r\n\t}", "function config_form($preferences){\n return null;\n }", "private function write_config_data()\n\t{\n\t\t$captcha_url = '{base_url}images/captchas/';\n\n\t\tforeach (array('avatar_path', 'photo_path', 'signature_img_path', 'pm_path', 'captcha_path', 'theme_folder_path') as $path)\n\t\t{\n\t\t\t$prefix = ($path != 'theme_folder_path') ? $this->root_theme_path : '';\n\t\t\t$this->userdata[$path] = rtrim(realpath($prefix.$this->userdata[$path]), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;\n\t\t\t$this->userdata[$path] = str_replace($this->base_path, '{base_path}', $this->userdata[$path]);\n\t\t}\n\n\t\t$config = array(\n\t\t\t'db_port' => $this->userdata['db_port'],\n\t\t\t'db_hostname' => $this->userdata['db_hostname'],\n\t\t\t'db_username' => $this->userdata['db_username'],\n\t\t\t'db_password' => $this->userdata['db_password'],\n\t\t\t'db_database' => $this->userdata['db_name'],\n\t\t\t'db_dbprefix' => $this->getDbPrefix(),\n\t\t\t'db_char_set' => $this->userdata['db_char_set'],\n\t\t\t'db_collat' => $this->userdata['db_collat'],\n\t\t\t'app_version' => $this->userdata['app_version'],\n\t\t\t'debug' => '1',\n\t\t\t'site_index' => $this->userdata['site_index'],\n\t\t\t'site_label' => $this->userdata['site_label'],\n\t\t\t'base_path' => $this->base_path,\n\t\t\t'base_url' => $this->userdata['site_url'],\n\t\t\t'cp_url' => str_replace($this->userdata['site_url'], '{base_url}', $this->userdata['cp_url']),\n\t\t\t'site_url' => '{base_url}',\n\t\t\t'theme_folder_url' => '{base_url}themes/',\n\t\t\t'webmaster_email' => $this->userdata['email_address'],\n\t\t\t'webmaster_name' => '',\n\t\t\t'channel_nomenclature' => 'channel',\n\t\t\t'max_caches' => '150',\n\t\t\t'cache_driver' => 'file',\n\t\t\t'captcha_url' => $captcha_url,\n\t\t\t'captcha_path' => $this->userdata['captcha_path'],\n\t\t\t'captcha_font' => 'y',\n\t\t\t'captcha_rand' => 'y',\n\t\t\t'captcha_require_members' => 'n',\n\t\t\t'require_captcha' => 'n',\n\t\t\t'enable_sql_caching' => 'n',\n\t\t\t'force_query_string' => 'n',\n\t\t\t'show_profiler' => 'n',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'cookie_domain' => '',\n\t\t\t'cookie_path' => '/',\n\t\t\t'cookie_prefix' => '',\n\t\t\t'website_session_type' => 'c',\n\t\t\t'cp_session_type' => 'c',\n\t\t\t'cookie_httponly' => 'y',\n\t\t\t'allow_username_change' => 'y',\n\t\t\t'allow_multi_logins' => 'y',\n\t\t\t'password_lockout' => 'y',\n\t\t\t'password_lockout_interval' => '1',\n\t\t\t'require_ip_for_login' => 'y',\n\t\t\t'require_ip_for_posting' => 'y',\n\t\t\t'require_secure_passwords' => 'n',\n\t\t\t'allow_dictionary_pw' => 'y',\n\t\t\t'name_of_dictionary_file' => '',\n\t\t\t'xss_clean_uploads' => 'y',\n\t\t\t'redirect_method' => $this->userdata['redirect_method'],\n\t\t\t'deft_lang' => $this->userdata['deft_lang'],\n\t\t\t'xml_lang' => 'en',\n\t\t\t'send_headers' => 'y',\n\t\t\t'gzip_output' => 'n',\n\t\t\t'is_system_on' => 'y',\n\t\t\t'allow_extensions' => 'y',\n\t\t\t'date_format' => '%n/%j/%Y',\n\t\t\t'time_format' => '12',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'server_offset' => '',\n\t\t\t'default_site_timezone' => date_default_timezone_get(),\n\t\t\t'mail_protocol' => 'mail',\n\t\t\t'email_newline' => '\\n', // single-quoted for portability\n\t\t\t'smtp_server' => '',\n\t\t\t'smtp_username' => '',\n\t\t\t'smtp_password' => '',\n\t\t\t'email_smtp_crypto' => 'ssl',\n\t\t\t'email_debug' => 'n',\n\t\t\t'email_charset' => 'utf-8',\n\t\t\t'email_batchmode' => 'n',\n\t\t\t'email_batch_size' => '',\n\t\t\t'mail_format' => 'plain',\n\t\t\t'word_wrap' => 'y',\n\t\t\t'email_console_timelock' => '5',\n\t\t\t'log_email_console_msgs' => 'y',\n\t\t\t'log_search_terms' => 'y',\n\t\t\t'un_min_len' => '4',\n\t\t\t'pw_min_len' => '5',\n\t\t\t'allow_member_registration' => 'n',\n\t\t\t'allow_member_localization' => 'y',\n\t\t\t'req_mbr_activation' => 'email',\n\t\t\t'new_member_notification' => 'n',\n\t\t\t'mbr_notification_emails' => '',\n\t\t\t'require_terms_of_service' => 'y',\n\t\t\t'default_member_group' => '5',\n\t\t\t'profile_trigger' => 'member',\n\t\t\t'member_theme' => 'default',\n\t\t\t'enable_avatars' => 'y',\n\t\t\t'allow_avatar_uploads' => 'n',\n\t\t\t'avatar_url' => '{base_url}'.$this->userdata['avatar_url'],\n\t\t\t'avatar_path' => $this->userdata['avatar_path'],\n\t\t\t'avatar_max_width' => '100',\n\t\t\t'avatar_max_height' => '100',\n\t\t\t'avatar_max_kb' => '50',\n\t\t\t'enable_photos' => 'n',\n\t\t\t'photo_url' => '{base_url}'.$this->userdata['photo_url'],\n\t\t\t'photo_path' => $this->userdata['photo_path'],\n\t\t\t'photo_max_width' => '100',\n\t\t\t'photo_max_height' => '100',\n\t\t\t'photo_max_kb' => '50',\n\t\t\t'allow_signatures' => 'y',\n\t\t\t'sig_maxlength' => '500',\n\t\t\t'sig_allow_img_hotlink' => 'n',\n\t\t\t'sig_allow_img_upload' => 'n',\n\t\t\t'sig_img_url' => '{base_url}'.$this->userdata['signature_img_url'],\n\t\t\t'sig_img_path' => $this->userdata['signature_img_path'],\n\t\t\t'sig_img_max_width' => '480',\n\t\t\t'sig_img_max_height' => '80',\n\t\t\t'sig_img_max_kb' => '30',\n\t\t\t'prv_msg_enabled' => 'y',\n\t\t\t'prv_msg_allow_attachments' => 'y',\n\t\t\t'prv_msg_upload_path' => $this->userdata['pm_path'],\n\t\t\t'prv_msg_max_attachments' => '3',\n\t\t\t'prv_msg_attach_maxsize' => '250',\n\t\t\t'prv_msg_attach_total' => '100',\n\t\t\t'prv_msg_html_format' => 'safe',\n\t\t\t'prv_msg_auto_links' => 'y',\n\t\t\t'prv_msg_max_chars' => '6000',\n\t\t\t'enable_template_routes' => 'y',\n\t\t\t'strict_urls' => 'y',\n\t\t\t'site_404' => '',\n\t\t\t'save_tmpl_revisions' => 'n',\n\t\t\t'max_tmpl_revisions' => '5',\n\t\t\t'save_tmpl_files' => 'y',\n\t\t\t'deny_duplicate_data' => 'y',\n\t\t\t'redirect_submitted_links' => 'n',\n\t\t\t'enable_censoring' => 'n',\n\t\t\t'censored_words' => '',\n\t\t\t'censor_replacement' => '',\n\t\t\t'banned_ips' => '',\n\t\t\t'banned_emails' => '',\n\t\t\t'banned_usernames' => '',\n\t\t\t'banned_screen_names' => '',\n\t\t\t'ban_action' => 'restrict',\n\t\t\t'ban_message' => 'This site is currently unavailable',\n\t\t\t'ban_destination' => 'http://www.yahoo.com/',\n\t\t\t'enable_emoticons' => 'y',\n\t\t\t'emoticon_url' => '{base_url}'.'images/smileys/',\n\t\t\t'recount_batch_total' => '1000',\n\t\t\t'image_resize_protocol' => 'gd2',\n\t\t\t'image_library_path' => '',\n\t\t\t'thumbnail_prefix' => 'thumb',\n\t\t\t'word_separator' => 'dash',\n\t\t\t'use_category_name' => 'n',\n\t\t\t'reserved_category_word' => 'category',\n\t\t\t'auto_convert_high_ascii' => 'n',\n\t\t\t'new_posts_clear_caches' => 'y',\n\t\t\t'auto_assign_cat_parents' => 'y',\n\t\t\t'new_version_check' => 'y',\n\t\t\t'enable_throttling' => 'n',\n\t\t\t'banish_masked_ips' => 'y',\n\t\t\t'max_page_loads' => '10',\n\t\t\t'time_interval' => '8',\n\t\t\t'lockout_time' => '30',\n\t\t\t'banishment_type' => 'message',\n\t\t\t'banishment_url' => '',\n\t\t\t'banishment_message' => 'You have exceeded the allowed page load frequency.',\n\t\t\t'enable_search_log' => 'y',\n\t\t\t'max_logged_searches' => '500',\n\t\t\t'memberlist_order_by' => \"member_id\",\n\t\t\t'memberlist_sort_order' => \"desc\",\n\t\t\t'memberlist_row_limit' => \"20\",\n\t\t\t'is_site_on' => 'y',\n\t\t\t'theme_folder_path' => $this->userdata['theme_folder_path'],\n\t\t);\n\n\t\t// Default Administration Prefs\n\t\t$admin_default = array(\n\t\t\t'site_index',\n\t\t\t'base_url',\n\t\t\t'base_path',\n\t\t\t'cp_url',\n\t\t\t'site_url',\n\t\t\t'theme_folder_url',\n\t\t\t'webmaster_email',\n\t\t\t'webmaster_name',\n\t\t\t'channel_nomenclature',\n\t\t\t'max_caches',\n\t\t\t'captcha_url',\n\t\t\t'captcha_path',\n\t\t\t'captcha_font',\n\t\t\t'captcha_rand',\n\t\t\t'captcha_require_members',\n\t\t\t'require_captcha',\n\t\t\t'enable_sql_caching',\n\t\t\t'force_query_string',\n\t\t\t'show_profiler',\n\t\t\t'include_seconds',\n\t\t\t'cookie_domain',\n\t\t\t'cookie_path',\n\t\t\t'website_session_type',\n\t\t\t'cp_session_type',\n\t\t\t'allow_username_change',\n\t\t\t'allow_multi_logins',\n\t\t\t'password_lockout',\n\t\t\t'password_lockout_interval',\n\t\t\t'require_ip_for_login',\n\t\t\t'require_ip_for_posting',\n\t\t\t'require_secure_passwords',\n\t\t\t'allow_dictionary_pw',\n\t\t\t'name_of_dictionary_file',\n\t\t\t'xss_clean_uploads',\n\t\t\t'redirect_method',\n\t\t\t'deft_lang',\n\t\t\t'xml_lang',\n\t\t\t'send_headers',\n\t\t\t'gzip_output',\n\t\t\t'date_format',\n\t\t\t'time_format',\n\t\t\t'include_seconds',\n\t\t\t'server_offset',\n\t\t\t'default_site_timezone',\n\t\t\t'mail_protocol',\n\t\t\t'email_newline',\n\t\t\t'smtp_server',\n\t\t\t'smtp_username',\n\t\t\t'smtp_password',\n\t\t\t'email_smtp_crypto',\n\t\t\t'email_debug',\n\t\t\t'email_charset',\n\t\t\t'email_batchmode',\n\t\t\t'email_batch_size',\n\t\t\t'mail_format',\n\t\t\t'word_wrap',\n\t\t\t'email_console_timelock',\n\t\t\t'log_email_console_msgs',\n\t\t\t'log_search_terms',\n\t\t\t'deny_duplicate_data',\n\t\t\t'redirect_submitted_links',\n\t\t\t'enable_censoring',\n\t\t\t'censored_words',\n\t\t\t'censor_replacement',\n\t\t\t'banned_ips',\n\t\t\t'banned_emails',\n\t\t\t'banned_usernames',\n\t\t\t'banned_screen_names',\n\t\t\t'ban_action',\n\t\t\t'ban_message',\n\t\t\t'ban_destination',\n\t\t\t'enable_emoticons',\n\t\t\t'emoticon_url',\n\t\t\t'recount_batch_total',\n\t\t\t'new_version_check',\n\t\t\t'enable_throttling',\n\t\t\t'banish_masked_ips',\n\t\t\t'max_page_loads',\n\t\t\t'time_interval',\n\t\t\t'lockout_time',\n\t\t\t'banishment_type',\n\t\t\t'banishment_url',\n\t\t\t'banishment_message',\n\t\t\t'enable_search_log',\n\t\t\t'max_logged_searches',\n\t\t\t'theme_folder_path',\n\t\t\t'is_site_on'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($admin_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_system_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Members Prefs\n\t\t$member_default = array(\n\t\t\t'un_min_len',\n\t\t\t'pw_min_len',\n\t\t\t'allow_member_registration',\n\t\t\t'allow_member_localization',\n\t\t\t'req_mbr_activation',\n\t\t\t'new_member_notification',\n\t\t\t'mbr_notification_emails',\n\t\t\t'require_terms_of_service',\n\t\t\t'default_member_group',\n\t\t\t'profile_trigger',\n\t\t\t'member_theme',\n\t\t\t'enable_avatars',\n\t\t\t'allow_avatar_uploads',\n\t\t\t'avatar_url',\n\t\t\t'avatar_path',\n\t\t\t'avatar_max_width',\n\t\t\t'avatar_max_height',\n\t\t\t'avatar_max_kb',\n\t\t\t'enable_photos',\n\t\t\t'photo_url',\n\t\t\t'photo_path',\n\t\t\t'photo_max_width',\n\t\t\t'photo_max_height',\n\t\t\t'photo_max_kb',\n\t\t\t'allow_signatures',\n\t\t\t'sig_maxlength',\n\t\t\t'sig_allow_img_hotlink',\n\t\t\t'sig_allow_img_upload',\n\t\t\t'sig_img_url',\n\t\t\t'sig_img_path',\n\t\t\t'sig_img_max_width',\n\t\t\t'sig_img_max_height',\n\t\t\t'sig_img_max_kb',\n\t\t\t'prv_msg_enabled',\n\t\t\t'prv_msg_allow_attachments',\n\t\t\t'prv_msg_upload_path',\n\t\t\t'prv_msg_max_attachments',\n\t\t\t'prv_msg_attach_maxsize',\n\t\t\t'prv_msg_attach_total',\n\t\t\t'prv_msg_html_format',\n\t\t\t'prv_msg_auto_links',\n\t\t\t'prv_msg_max_chars',\n\t\t\t'memberlist_order_by',\n\t\t\t'memberlist_sort_order',\n\t\t\t'memberlist_row_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($member_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_member_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Templates Prefs\n\t\t$template_default = array(\n\t\t\t'enable_template_routes',\n\t\t\t'strict_urls',\n\t\t\t'site_404',\n\t\t\t'save_tmpl_revisions',\n\t\t\t'max_tmpl_revisions',\n\t\t);\n\t\t$site_prefs = array();\n\n\t\tforeach($template_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_template_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Channels Prefs\n\t\t$channel_default = array(\n\t\t\t'image_resize_protocol',\n\t\t\t'image_library_path',\n\t\t\t'thumbnail_prefix',\n\t\t\t'word_separator',\n\t\t\t'use_category_name',\n\t\t\t'reserved_category_word',\n\t\t\t'auto_convert_high_ascii',\n\t\t\t'new_posts_clear_caches',\n\t\t\t'auto_assign_cat_parents',\n\t\t\t'enable_comments',\n\t\t\t'comment_word_censoring',\n\t\t\t'comment_moderation_override',\n\t\t\t'comment_edit_time_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($channel_default as $value)\n\t\t{\n\t\t\tif (isset($config[$value]))\n\t\t\t{\n\t\t\t\t$site_prefs[$value] = $config[$value];\n\t\t\t}\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_channel_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Remove Site Prefs from Config\n\t\tforeach(array_merge($admin_default, $member_default, $template_default, $channel_default) as $value)\n\t\t{\n\t\t\tunset($config[$value]);\n\t\t}\n\n\t\t// Write the config file data\n\t\t$this->write_config_from_template($config);\n\n\t\treturn TRUE;\n\t}", "abstract protected function _updateConfiguration();", "public function hookConfigForm()\n {\n require 'config_form.php';\n }", "public function init() {\n //TODO override and put config intialization code here\n }", "function show_configuration() {\n\n global $VM_LANG, $sess;\n\t\t$db = new ps_DB;\n\t\t$payment_method_id = vmGet( $_REQUEST, 'payment_method_id', null );\n\n\t\t$VM_LANG->load('arsenalpay');\n\t\t\t\n\t\t// Read current Configuration\n\t\tinclude_once(CLASSPATH .\"payment/ps_arsenalpay.cfg.php\");\n\t\t\t\t\n\t\t?>\n<p style=\"text-align: center;font-weight: bold;\"><?php echo $VM_LANG->_('ARSENALPAY_TITLE') ?></p>\n<p><?php echo $VM_LANG->_('ARSENALPAY_DESC') ?></p><br>\n<table>\t\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_UNIQUE_ID') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_UNIQUE_ID\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_UNIQUE_ID') ? AP_UNIQUE_ID : ''?>\"/></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_UNIQUE_ID_DESC')) ?></td>\n\t</tr>\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_SIGN_KEY') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_SIGN_KEY\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_SIGN_KEY') ? AP_SIGN_KEY : ''?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_SIGN_KEY_DESC'))?></td>\n\t</tr>\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_FRAME_URL') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_FRAME_URL\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_FRAME_URL') ? AP_FRAME_URL : 'https://arsenalpay.ru/payframe/pay.php' ?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_FRAME_URL_DESC'))?></td>\n\t</tr>\t\n\t<tr>\n <td><strong><?php echo $VM_LANG->_('ARSENALPAY_PAYMENT_SRC')?></strong></td>\n <td>\n\t\t\t<select name=\"AP_PAYMENT_SRC\" class=\"inputbox\" >\n <option <?php if (AP_PAYMENT_SRC == 'card') echo \"selected=\\\"selected\\\"\"; ?> value=\"card\">card</option>\n <option <?php if (AP_PAYMENT_SRC == 'mk') echo \"selected=\\\"selected\\\"\"; ?> value=\"mk\">mk</option>\n </select>\n </td>\n <td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_PAYMENT_SRC_DESC')) ?>\n </td>\n </tr>\n <tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_PAYER_CALLBACK_URL') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_PAYER_CALLBACK_URL\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_PAYER_CALLBACK_URL') ? AP_PAYER_CALLBACK_URL : 'http(s)://[joomla-site-domain]/administrator/components/com_virtuemart/arsenalpay_notify.php' ?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_PAYER_CALLBACK_URL_DESC'))?></td>\n\t</tr>\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_PAYMENT_CALLBACK_URL') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_PAYMENT_CALLBACK_URL\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_PAYMENT_CALLBACK_URL') ? AP_PAYMENT_CALLBACK_URL : 'http(s)://[joomla-site-domain]/administrator/components/com_virtuemart/arsenalpay_notify.php' ?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_PAYMENT_CALLBACK_URL_DESC'))?></td>\n\t</tr>\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_ALLOWED_IP') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_ALLOWED_IP\" class=\"inputbox\" value=\"<?php echo defined('AP_ALLOWED_IP') ? AP_ALLOWED_IP : '' ?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_ALLOWED_IP_DESC'))?></td>\n\t</tr>\n\t<tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_CSS_FILE') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_CSS_FILE\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_CSS_FILE') ? AP_CSS_FILE : '' ?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_CSS_FILE_DESC'))?></td>\n\t</tr>\n\t<tr>\n <td><strong><?php echo $VM_LANG->_('ARSENALPAY_FRAME_MODE')?></strong></td>\n <td>\n\t\t\t<select name=\"AP_FRAME_MODE\" class=\"inputbox\" >\n <option <?php if (AP_FRAME_MODE == '1') echo \"selected=\\\"selected\\\"\"; ?> value=\"1\">YES</option>\n <option <?php if (AP_FRAME_MODE == '0') echo \"selected=\\\"selected\\\"\"; ?> value=\"0\">NO</option>\n </select>\n </td>\n <td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_FRAME_MODE_DESC')) ?>\n </td>\n </tr>\n <tr>\n\t\t<td><strong><?php echo $VM_LANG->_('ARSENALPAY_FRAME_PARAMS') ?></strong></td>\n\t\t<td><input type=\"text\" name=\"AP_FRAME_PARAMS\" size=\"50\" class=\"inputbox\" value=\"<?php echo defined('AP_FRAME_PARAMS') ? AP_FRAME_PARAMS : \"width='700' height='500' frameborder='0' scrolling='auto'\"?>\" /></td>\n\t\t<td><?php echo vmtooltip($VM_LANG->_('ARSENALPAY_FRAME_PARAMS_DESC'))?></td>\n\t</tr>\n</table>\n\t\t<?php\n\t\treturn true;\n\t}", "public function frontend_configuration()\n {\n if ($this->session->userdata('logged_in') == 1 && $this->session->userdata('user_type') != 'Admin') {\n redirect('home/login_page', 'location');\n }\n \n $data['body'] = \"admin/config/frontend_config\";\n $data['time_zone'] = $this->_time_zone_list(); \n $data['language_info'] = $this->_language_list();\n $data['page_title'] = $this->lang->line('front-end settings');\n $this->_viewcontroller($data);\n }", "public function localConfig();", "protected function generateConfiguration()\n {\n if (!in_array($this->format, array('yml', 'xml', 'php'))) {\n return;\n }\n\n $target = sprintf(\n '%s/Resources/config/routing/%s.%s',\n $this->bundle->getPath(),\n strtolower(str_replace('\\\\', '_', $this->entity)),\n $this->format\n );\n\n $this->renderFile('rest/config/routing.'.$this->format.'.twig', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n ));\n }", "protected function configure()\n {\n $this\n ->setName('iNachoLee:copiarcargas')\n ->setDefinition(array(\n new InputOption('accion', false, InputOption::VALUE_OPTIONAL, 'Preguntas Temporales')\n ))\n ->setDescription('Genera Slug y Linea de academica');\n }", "protected function configure(): void\n {\n $this\n ->setDescription('This command triggers ZgwToVrijbrpService->zgwToVrijbrpHandler() for a birth e-dienst')\n ->setHelp('This command allows you to test mapping and sending a ZGW zaak to the Vrijbrp api /dossiers')\n ->addOption('zaak', 'z', InputOption::VALUE_REQUIRED, 'The zaak uuid we should test with')\n ->addOption('source', 's', InputOption::VALUE_OPTIONAL, 'The location of the Source we will send a request to, location of an existing Source object')\n ->addOption('location', 'l', InputOption::VALUE_OPTIONAL, 'The endpoint we will use on the Source to send a request, just a string')\n ->addOption('mapping', 'm', InputOption::VALUE_OPTIONAL, 'The reference of the mapping we will use before sending the data to the source')\n ->addOption('synchronizationEntity', 'se', InputOption::VALUE_OPTIONAL, 'The reference of the entity we need to create a synchronization object');\n }", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\t\t\t\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = 'Specials products';\r\n }\r\n $response = Configuration::updateValue('FIELD_SPECIALPLS_NBR', 6);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_TITLE', $title);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_VERTICAL', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_COLUMNITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MAXITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MEDIUMITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MINITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLLDELAY', 4000);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAGINATION', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_NAVIGATION', 0);\r\n\r\n return $response;\r\n }", "private function initialize() {\n $CI = get_instance();\n $CI->config->load('dwootemplate', TRUE);\n $config = $CI->config->item('dwootemplate');\n foreach ($config as $key => $val) {\n $this->$key = $val;\n }\n }", "protected function afterConfigurationSet()\n {\n }", "function initialize()\n\t{\n\t\t$this->_configure \t= $this->config->item('province_configure');\n\t\t$this->_pagination \t= $this->config->item('pagination');\n\t\t$this->_validation \t= $this->config->item('province_validation');\n\t}", "public function configure() {\n\t\t}", "protected function initializeConfiguration() {}", "private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMeta('category', 'array');\n //$this->loadMetaCategory();\n $this->loadInitScript();\n }" ]
[ "0.636154", "0.6341113", "0.62895864", "0.62663907", "0.62652236", "0.62629414", "0.6234327", "0.6166044", "0.6067151", "0.6066006", "0.60586715", "0.6043662", "0.6025195", "0.5994459", "0.59890157", "0.5981873", "0.5978416", "0.5977981", "0.5951465", "0.59417367", "0.59219426", "0.5905582", "0.5897052", "0.5892008", "0.5886714", "0.58715916", "0.5868091", "0.5837811", "0.5836996", "0.5833976", "0.5819242", "0.5815094", "0.58115155", "0.58109796", "0.5805456", "0.57917833", "0.5789648", "0.5788676", "0.57884055", "0.57877654", "0.5784318", "0.57838225", "0.57837415", "0.57816017", "0.5759234", "0.5755072", "0.5748629", "0.5744522", "0.57387054", "0.573627", "0.57349545", "0.5703591", "0.56935334", "0.5687855", "0.5687855", "0.5685431", "0.56848717", "0.56838083", "0.56837183", "0.567895", "0.5672241", "0.56704235", "0.5656212", "0.56480527", "0.56471634", "0.5645491", "0.56387234", "0.5637503", "0.56363547", "0.5634782", "0.56307477", "0.5626366", "0.5622969", "0.5620936", "0.56173855", "0.56171393", "0.56165874", "0.5613625", "0.5609368", "0.56048906", "0.5603477", "0.5601806", "0.55991423", "0.5590146", "0.5580408", "0.5562541", "0.556191", "0.55596024", "0.55573434", "0.55556744", "0.55531806", "0.55489683", "0.5548519", "0.5544834", "0.55400217", "0.55289644", "0.55165297", "0.55118924", "0.5506318", "0.54944605" ]
0.67114913
0
Renvoie le code du mode de paiement par CB
protected function getCodeModeDePaiement() { $table = $this->getDbManager()->get('Sbm\Db\System\Libelles'); return $table->getCode('ModeDePaiement', 'CB'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function b_code($code){\n \t$re = new DbManager();\n \t$book = $re -> code_book($code);\n \treturn $book ;\n }", "public function getCodeModele() {\n return $this->codeModele;\n }", "final function getCode();", "public function getCode() {}", "public function getCodebancque()\n {\n return $this->codebancque;\n }", "public function getMode(): string;", "private function codeField()\n {\n $mode = false;\n if (isset($this->jsonData['language'])) {\n if ($this->jsonData['language'] == 'json') {\n $mode = 'application/json';\n } else {\n $mode = $this->jsonData['language'];\n }\n }\n\n $newData = [\n 'mode' => $mode,\n 'vue' => $this->getCorrectVueComponent('form-code-field'),\n ];\n\n $this->data = array_merge($this->data, $newData);\n }", "function recupere_libelle_chambre_libelle($code){\n\treturn ResultatRequette(\"select LIBELLE_TYPE_CHAMBRE as info from type_chambre where CODE_TYPE_CHAMBRE='$code'\");\n }", "public function codeRetrait()\n {\n $code_secret = $this->utils->securite_xss($_POST['codesecret']);\n $fkcarte = $this->utils->securite_xss($_POST['fkcarte']);\n $frais = $this->compteModel->verifCodeRetrait($fkcarte, $code_secret);\n if ($frais == 1) echo 1;\n elseif ($frais == 0) echo 0;\n else echo -2;\n }", "function spcode_activate() {\n // Do nothing\n}", "public function getCode()\n {\n }", "public function veriCode() {}", "public function boleta()\n\t{\n\t\t//\n\t}", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode();", "private function getMode($code){\n\t\t\treturn $this->query_modes[$code];\n\t\t}", "private function getMode($code){\n\t\t\treturn $this->query_modes[$code];\n\t\t}", "function fProcesaBanco(){\n global $db, $cla, $agPar, $igNumChq, $igSecue, $ogDet;\n $alDet = fIniDetalle();\n $alDet[\"det_codcuenta\"]\t= $cla->cla_ctaorigen; \n $alDet[\"det_glosa\"] \t= substr($agPar[\"com_Concepto\"],0, 50) . ' ' . substr($agPar[\"slBenef\"],0,20);\n $alDet['det_idauxiliar']= $agPar[\"com_Emisor\"];\n $alDet[\"det_numcheque\"]\t= $igNumChq;\t\t\t// es el numero de cheque\n $alDet[\"det_feccheque\"]\t= $agPar[\"com_FechCheq\"];\n $alDet['det_valdebito']\t= $agPar[\"flValor\"] * $cla->cla_indicador; // segun el signo del indicador, se aplica como DB/CR al grabar;\n $alDet['det_valcredito']\t= 0;\n $alDet['det_secuencia']\t= $igSecue;\n\tif(fGetParam(\"pAppDbg\",0)){\n\t\tprint_r($alDet);\n\t}\n\tfInsdetalleCont($db, $alDet);\n}", "function codePage($cp)\n{\n return $this->drv->codePage($cp);\n}", "function spcode_deactivate() {\n // Do nothing\n}", "public function getCode() {\n\n $licence = '/*\n * Auto Generated Code for HomeNet\n *\n * Copyright (c) 2011 HomeNet.\n *\n * This file is part of HomeNet.\n *\n * HomeNet is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * HomeNet is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with HomeNet. If not, see <http ://www.gnu.org/licenses/>.\n */';\n return $licence;\n }", "public function currentMode() {}", "private function dataCodeAction()\n {\n $code_action = array(\n 'ABO' => array('Abonnement', '1'),\n 'PROSP' => array('Prospection', '2'),\n 'PROSP1' => array('Prospection tracer 1', '2'),\n 'PROSP11' => array('Prospection tracer 11', '2'),\n 'PROSP12' => array('Prospection tracer 12', '2'),\n 'PROSP13' => array('Prospection tracer 13', '2'),\n 'PROSP2' => array('Prospection tracer 2', '2'),\n 'PROSP21' => array('Prospection tracer 21', '2'),\n 'PROSP22' => array('Prospection tracer 22', '2'),\n 'PROSP23' => array('Prospection tracer 23', '2'),\n 'PROSP24' => array('Prospection tracer 24', '2'),\n 'PROSP3' => array('Prospection tracer 3', '2'),\n 'PROSP5' => array('Prospection tracer 5', '2'),\n 'PROSP51' => array('Prospection tracer 51', '2'),\n 'PROSP52' => array('Prospection tracer 52', '2'),\n 'PROSP53' => array('Prospection tracer 53', '2'),\n 'PROSP ENTR' => array('Contact entrant sans fiche client', '2'),\n 'PROSP REL' => array('Prospection REL', '2'),\n 'PROSPWEB' => array('Prospection Web', '2'),\n 'FID' => array('FID', '20'),\n 'FID PROMO' => array('FID suite promo', '20'),\n 'FID PROG F' => array('FID programme fidélité', '20'),\n 'FID WEB PRGF' => array('FID web PRGF', '20'),\n 'FID WEB PROMO' => array('FID web PROMO', '20'),\n 'FID WEB PROM' => array('FID web PROMO', '20'),\n 'FID WEB' => array('FID web', '20'),\n 'PAR' => array('Parrainage', '27'),\n 'REACT+4M' => array('Reactivation fichier clients +4mois', '28'),\n 'REACT+4MPROMO' => array('Reactivation fichier clients +4mois suite à promo', '28'),\n 'REACT SPONT' => array('Reactivation client spontanée', '28'),\n 'REACT SPONT PROMO' => array('Reactivation client spontanée suite à promo', '28'),\n 'REACTSPONT' => array('Reactivation client AC formulaire', '28'),\n 'REACT AC FORM' => array('Reactivation client AC formulaire', '28'),\n 'REACTIV' => array('Reactivation REACTIV', '28'),\n 'CONT ENTR' => array('CONT ENTR', '35')\n );\n $data = array();\n $c = 1;\n foreach ($code_action as $key => $value) {\n $data[] = array(\n 'id_code_action' => (int)$c,\n 'name' => pSQL($key),\n 'description' => pSQL($value[0]),\n 'groupe' => (int)$value[1]\n );\n $c++;\n }\n\n return $data;\n }", "public function getMode(): string\n {\n return 'into';\n }", "public function CBfunctions() {}", "final public function getMode(): int {}", "public function get_compte(){retrun($id_local_compte); }", "function init__comcode_text()\n{\n\tif (!defined('CCP_NO_MANS_LAND'))\n\t{\n\t\tdefine('CCP_NO_MANS_LAND',0);\n\t\tdefine('CCP_IN_TAG_NAME',1);\n\t\tdefine('CCP_STARTING_TAG',2);\n\t\tdefine('CCP_IN_TAG_BETWEEN_ATTRIBUTES',3);\n\t\tdefine('CCP_IN_TAG_ATTRIBUTE_NAME',4);\n\t\tdefine('CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT',5);\n\t\tdefine('CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT',6);\n\t\tdefine('CCP_IN_TAG_ATTRIBUTE_VALUE',7);\n\t\tdefine('CCP_IN_TAG_ATTRIBUTE_VALUE_NO_QUOTE',8);\n\n\t\tdefine('MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH',30);\n\t}\n\n\t/*\n\n\tNote: Certain tags are included for compatibility with bbcode only...\n\t sql\n\t codebox\n\t php\n\t color\n\t size\n\t right\n\t left\n\t center\n\t list\n\t * (this is a psuedo tag because it is actually exploded seperately -- because it is very non-standard)\n\t snapback\n\t topic\n\t post\n\t thread\n\t highlight\n\t flash\n\tSome of threse add features, but they don't really fit in IMHO.\n\n\tAlso for compatibility, tags are case-insensitive, email/url parameter and embed can be switched, and quotes can be missed out.\n\n\t*/\n\n\t// In theory, almost any tag is reversable. However these tags can be converted ROBUSTLY and hence the WYSIWYG editor can manipulate them as HTML rather than having to display as Comcode\n\t// If the tag is mapped to a string that provides a regexp to say when it is NOT reversible. Usually this is done for certain parameters.\n\tglobal $REVERSABLE_TAGS;\n\t$REVERSABLE_TAGS=array('surround'=>1,'attachment_safe'=>1,'attachment2'=>1,'cite'=>1,'ins'=>1,'del'=>1,'dfn'=>1,'address'=>1,'abbr'=>1,'acronym'=>1,'list'=>1,'highlight'=>1,'indent'=>1,'b'=>1,'i'=>1,'u'=>1,'s'=>1,'sup'=>1,'sub'=>1,\n\t\t\t\t\t\t\t\t\t\t'title'=>1,'size'=>1,'color'=>1,'font'=>1,'tt'=>1,'img'=>'#\\s(rollover|refresh\\_time)=#','url'=>1,'email'=>1,'upload'=>1,\n\t\t\t\t\t\t\t\t\t\t'semihtml'=>1,'html'=>1,'align'=>1,'left'=>1,'center'=>1,'right'=>1,\n\n\t\t\t\t\t\t\t\t\t\t/*Handled in special way*/\n\t\t\t\t\t\t\t\t\t\t'block'=>1,'contents'=>1,'concepts'=>1,'attachment'=>1,'flash'=>1,'menu'=>1,'reference'=>1,'page'=>1,'exp_thumb'=>1,'exp_ref'=>1,'thumb'=>1,'snapback'=>1,'post'=>1,'thread'=>1,'topic'=>1,'include'=>1,'random'=>1,'jumping'=>1,'shocker'=>1,);\n\t// These are not reversable, but we want them WYSIWYGABLE\n\tglobal $PUREHTML_TAGS;\n\t$PUREHTML_TAGS=array(/*'attachment2'=>1,'attachment_safe'=>'1*/); // Actually: there is some dynamicness even in this ($KEEP and $SESSION in particular -- and we couldn't even have them preserved inside a WYSIWYG-edit)\n\t// The following could conceivably not need to be reversed, as they're pure HTML. However, it's better not to let the WYSIWYG'd HTML get too complex.\n\t// 'tooltip'=>1,'section'=>1,'section_controller'=>1,'big_tab'=>1,'big_tab_controller'=>1,'tabs'=>1,'tab'=>1,'carousel'=>1,'flash'=>1,'hide'=>1,'quote'=>1,'ticker'=>1,'jumping'=>1\n\n\t// Any of these will cause free-for-all blacklist-filtered HTML to be disallowed, even if enabled via the hidden option\n\tglobal $POTENTIALLY_EMPTY_TAGS;\n\t$POTENTIALLY_EMPTY_TAGS=array('concepts'=>1,'staff_note'=>1,'if_in_group'=>1,'no_parse'=>1,'concept'=>1,'include'=>1,'random'=>1,'jumping'=>1);\n\n\t// The contents of these tags is human readable text. It may be altered for reasons of bork, or word-wrapping, or textcode; they have hard white space\n\tglobal $TEXTUAL_TAGS;\n\t$TEXTUAL_TAGS=array('overlay'=>1,'tooltip'=>1,'section'=>1,'surround'=>1,'if_in_group'=>1,'cite'=>1,'ins'=>1,'del'=>1,'dfn'=>1,'address'=>1,'abbr'=>1,'acronym'=>1,'list'=>1,'indent'=>1,'align'=>1,'left'=>1,'center'=>1,'right'=>1,'b'=>1,'i'=>1,'u'=>1,'s'=>1,'sup'=>1,'sub'=>1,'title'=>1,'size'=>1,'color'=>1,'highlight'=>1,'font'=>1,'box'=>1,'internal_table'=>1,'external_table'=>1,'hide'=>1,'quote'=>1,'tab'=>1,'big_tab'=>1);\n\n\t// These tags don't have <br />'s done right after them because they are their own block-end (like a paragraph). They may contain textcode lists and rules\n\tglobal $BLOCK_TAGS;\n\t$BLOCK_TAGS=array('section'=>1,'section_controller'=>1,'tabs'=>1,'tab'=>1,'big_tab'=>1,'big_tab_controller'=>1,'carousel'=>1,'surround'=>1,'if_in_group'=>1,'exp_thumb'=>1,'contents'=>1,'concepts'=>1,'php'=>1,'codebox'=>1,'sql'=>1,'code'=>1,'list'=>1,'indent'=>1,'align'=>1,'left'=>1,'center'=>1,'right'=>1,'staff_note'=>1,'reference'=>1,'menu'=>1,'title'=>1,'box'=>1,'internal_table'=>1,'external_table'=>1,'quote'=>1,'block'=>1,'hide'=>1);\n\n\t// These tags can only be used by privileged members\n\tglobal $DANGEROUS_TAGS;\n\t$DANGEROUS_TAGS=array('overlay'=>1,'if_in_group'=>1,'concepts'=>1,'random'=>1,'include'=>1,'block'=>1,'menu'=>1); // Don't want people putting menus around, plus the captions aren't escaped\n\n\t// These tags have contents that are not interpreted as Comcode (so no HTML tags either), but are formatted for white-space\n\tglobal $CODE_TAGS;\n\t$CODE_TAGS=array(/*'img'=>1 - no, can be a symbol for legacy reasons,*/'flash'=>1,'thumb'=>1,'menu'=>1,'no_parse'=>1,'code'=>1,'sql'=>1,'php'=>1,'tt'=>1,'samp'=>1,'codebox'=>1,'staff_note'=>1,'section_controller'=>1,'big_tab_controller'=>1);\n\n\t// ALSO:\n\t// See $non_text_tags list in comcode_renderer.php\n\t// See non_text_tags in JAVASCRIPT_EDITING.tpl\n\t// See _get_details_comcode_tags function in comcode_add.php\n\n\t// Hehe\n\tglobal $LEET_FILTER;\n\t$LEET_FILTER=NULL;\n\n\tglobal $ALLOWED_ENTITIES;\n//\t$ALLOWED_ENTITIES=array('raquo'=>1,'frac14'=>1,'frac12'=>1,'frac34'=>1,'ndash'=>1,'mdash'=>1,'ldquo'=>1,'rdquo'=>1);\n\t$ALLOWED_ENTITIES=array('OElig'=>1,'oelig'=>1,'Scaron'=>1,'scaron'=>1,'Yuml'=>1,'circ'=>1,'tilde'=>1,'ensp'=>1,'emsp'=>1,'thinsp'=>1,'zwnj'=>1,'zwj'=>1,'lrm'=>1,'rlm'=>1,'ndash'=>1,'mdash'=>1,'lsquo'=>1,'rsquo'=>1,'sbquo'=>1,'ldquo'=>1,'rdquo'=>1,'bdquo'=>1,'dagger'=>1,'Dagger'=>1,'hellip'=>1,'permil'=>1,'lsaquo'=>1,'rsaquo'=>1,'euro'=>1,'Agrave'=>1,'Aacute'=>1,'Acirc'=>1,'Atilde'=>1,'Auml'=>1,'Aring'=>1,'AElig'=>1,'Ccedil'=>1,'Egrave'=>1,'Eacute'=>1,'Ecirc'=>1,'Euml'=>1,'Igrave'=>1,'Iacute'=>1,'Icirc'=>1,'Iuml'=>1,'ETH'=>1,'Ntilde'=>1,'Ograve'=>1,'Oacute'=>1,'Ocirc'=>1,'Otilde'=>1,'Ouml'=>1,'Oslash'=>1,'Ugrave'=>1,'Uacute'=>1,'Ucirc'=>1,'Uuml'=>1,'Yacute'=>1,'THORN'=>1,'szlig'=>1,'agrave'=>1,'aacute'=>1,'acirc'=>1,'atilde'=>1,'auml'=>1,'aring'=>1,'aelig'=>1,'ccedil'=>1,'egrave'=>1,'eacute'=>1,'ecirc'=>1,'euml'=>1,'igrave'=>1,'iacute'=>1,'icirc'=>1,'iuml'=>1,'eth'=>1,'ntilde'=>1,'ograve'=>1,'oacute'=>1,'ocirc'=>1,'otilde'=>1,'ouml'=>1,'oslash'=>1,'ugrave'=>1,'uacute'=>1,'ucirc'=>1,'uuml'=>1,'yacute'=>1,'thorn'=>1,'yuml'=>1,'nbsp'=>1,'iexcl'=>1,'curren'=>1,'cent'=>1,'pound'=>1,'yen'=>1,'brvbar'=>1,'sect'=>1,'uml'=>1,'copy'=>1,'ordf'=>1,'laquo'=>1,'not'=>1,'shy'=>1,'reg'=>1,'trade'=>1,'macr'=>1,'deg'=>1,'plusmn'=>1,'sup2'=>1,'sup3'=>1,'acute'=>1,'micro'=>1,'para'=>1,'middot'=>1,'cedil'=>1,'sup1'=>1,'ordm'=>1,'raquo'=>1,'frac14'=>1,'frac12'=>1,'frac34'=>1,'iquest'=>1,'times'=>1,'divide'=>1,'amp'=>1,'lt'=>1,'gt'=>1,'quot'=>1);\n\n\tglobal $ADVERTISING_BANNERS;\n\t$ADVERTISING_BANNERS=NULL;\n\n\tglobal $NO_LINK_TITLES;\n\t$NO_LINK_TITLES=false;\n}", "public function cs(){\n }", "public function codeRechargement()\n {\n $code_secret = $this->utils->securite_xss($_POST['codesecret']);\n $fk_agence = $this->utils->securite_xss($_POST['fkagence']);\n $frais = $this->compteModel->verifCodeRechargement($fk_agence, $code_secret);\n if ($frais == 1) echo 1;\n elseif ($frais == 0) echo 0;\n else echo -2;\n }", "public\n\n\tfunction generate_code()\n\t{\n\t\t$data[\"hitung\"] = $this->Madmin->buat_code();\n\t\t$this->load->view('admin/Generate_code', $data);\n\t}", "public function use_controlbin() {return $this->useControlbin();}", "protected function getCodeCaisse()\r\n {\r\n $table = $this->getDbManager()->get('Sbm\\Db\\System\\Libelles');\r\n return $table->getCode('Caisse', 'DFT');\r\n }", "function niveau ($niveauCode, $niveauTexte)\n{\n if ($niveauCode = 1){\n \n }\n \n }", "public function getCode():string;", "public function activationCode();", "public function getCode() {return $this->code;}", "public function getCode(): string;", "public function getCode(): string;", "public function getCode(): string;", "public function CBfunctions()\n {\n return '\n\t\t// checkOffCB()\n\tfunction checkOffCB(listOfCBnames, link) {\t//\n\t\tvar checkBoxes, flag, i;\n\t\tvar checkBoxes = listOfCBnames.split(\",\");\n\t\tif (link.rel === \"\") {\n\t\t\tlink.rel = \"allChecked\";\n\t\t\tflag = true;\n\t\t} else {\n\t\t\tlink.rel = \"\";\n\t\t\tflag = false;\n\t\t}\n\t\tfor (i = 0; i < checkBoxes.length; i++) {\n\t\t\tsetcbValue(checkBoxes[i], flag);\n\t\t}\n\t}\n\t\t// cbValue()\n\tfunction cbValue(CBname) {\t//\n\t\tvar CBfullName = \"CBC[\"+CBname+\"]\";\n\t\treturn (document.dblistForm[CBfullName] && document.dblistForm[CBfullName].checked ? 1 : 0);\n\t}\n\t\t// setcbValue()\n\tfunction setcbValue(CBname,flag) {\t//\n\t\tCBfullName = \"CBC[\"+CBname+\"]\";\n\t\tif(document.dblistForm[CBfullName]) {\n\t\t\tdocument.dblistForm[CBfullName].checked = flag ? \"on\" : 0;\n\t\t}\n\t}\n\n\t\t';\n }", "public function saveBaixaCompra($param) { \n $CB16PEDIDO = CB16PEDIDO::find()->where(\"CB16_ID = \".$param['pedido'].\" and CB16_STATUS >= 30\")->all()[0];\n if ($CB16PEDIDO) {\n $CB16PEDIDO->setAttribute('CB16_STATUS', 20);\n $CB16PEDIDO->save(); \n }\n }", "public function pasaje_abonado();", "final public function getModeString(): string {}", "function protection_code_activation() {\n\t\n\t}", "protected function cod()\n\t{\n\t\tif ($this->store['cod'] !== false) {\n\t\t\t$this->score += $this->config->data()['cod'];\n\t\t}\t\n\t}", "function lapa_compiler_php_code($act, $parser)\n{\n if ($act == 1) {\n $buff = '';\n if (!isset(LapaEngineParser::$_plugins_property['php_code'])) {\n LapaEngineParser::$_plugins_property['php_code'] = array();\n }\n $attr = $parser->parseDirectiveAttributes();\n $name = isset($attr['name']) ? $attr['name']: 'default';\n $parser->newStackCommand(array('php_code', $name));\n $parser->_outputNew();\n }else {\n if ( (!$stack_commands = $parser->getStackCommand() ) || $stack_commands[0] != 'php_code' ) {\n throw new LapaEngineException('Неверный вызов \"/php_code\" cтрока %s.', $parser->templateLine());\n }\n /* вырезали буффер php кода, его надо еще вернуть */\n $buff = $parser->_outputGet();\n /* создаем переменную с значением */ \n LapaEngineParser::$_plugins_property['php_code'][$stack_commands[1]] = $stack_commands[1];\n $buff .= \"\\$_var_php_code['{$stack_commands[1]}'] = '\" . preg_replace(\"/(?!\\\\\\\\)\\\\'/\", '\\\\\\'','<?php ' . str_replace('\\\\', '\\\\\\\\',$buff) . ' ?>') . \"';\"; \n $parser->removeStackCommand(); \n LapaEngineParser::$_plugins_property['php_code'][$stack_commands[1]] = $stack_commands[1];\n }\n return $buff;\n}", "protected function getComposerMode() {}", "protected function _defineCode()\n {\n return $this->setCode($this->getPoolModel()->setExcludedIds(self::$_alreadySelectedIds)->shift());\n }", "function use_codepress()\n {\n }", "function comboBase($code, $id_transportadora = 0) {\n // pega variaveis global\n global $con;\n \n // pega o ID passado\n $id_transportadora = (empty($id_transportadora)) ? 0 : (int)$id_transportadora;\n\n // seta a condicao\n $_condi = (!empty($id_transportadora)) ? \"WHERE (idtransportadora = '{$id_transportadora}')\" : \"\";\n \n // executa\n $dba = new consulta($con);\n $dba->executa(\"SELECT codbase, nomebase FROM tbbase {$_condi} ORDER BY nomebase ASC\");\n\n // percorre o resultado da query\n for ($ii = 0; $ii < $dba->nrw; $ii++) {\n \t// navega\n $dba->navega($ii);\n \n // pega os campos\n\t\t$id = $dba->data[\"codbase\"];\n\t\t$nome = $dba->data[\"nomebase\"];\n \n // seleciona\n\t $sele = ($id == $code) ? \"selected='selected'\" : \"\";\n\t\t\n\t\t// mostra a opcao\n\t\techo \"<option value='{$id}' {$sele}>{$nome}</option>\\n\";\n }\n}", "public static function getCode()\n\t{\n\t\tthrow new NotImplementedException;\n\t}", "public function BlkSc() {\n # To do some statement\n # To assign some variable to default.php\n require ('BlkSc/default.php'); \t\n }", "public function _loadLanguage($code)\n\t{\n $table_p_language\t = $this->prefix.'admin_language';\n //se cambia el campo enable a 0 para todos los lenguajes\n $update=$this->app['dbs']['mysql_silex']->executeQuery(\"Update {$table_p_language} set enable=0\");\n //se estable el lenguaje indicado como default\n $update=$this->app['dbs']['mysql_silex']->update($table_p_language, array('enable' =>1), array('code' => $code)); \n\t}", "function blocageCompteInconditionnel ($id_cpte) {\n\n\tglobal $dbHandler,$global_id_agence;\n\n\t$db = $dbHandler->openConnection();\n\n\t$sql = \"SELECT etat_cpte FROM ad_cpt WHERE id_ag = $global_id_agence AND id_cpte = $id_cpte;\";\n\t$result=$db->query($sql);\n\tif (DB::isError($result)){\n\t\t$dbHandler->closeConnection(false);\n\t\tsignalErreur(__FILE__,__LINE__,__FUNCTION__);\n\t}\n\n\t$tmprow = $result->fetchrow();\n\t$etat = $tmprow[0];\n\n\tif ($etat == 2){ // Le compte est fermé\n\t\t$dbHandler->closeConnection(false);\n\t\tsignalErreur(__FILE__,__LINE__,__FUNCTION__); // \"Impossible de bloquer le compte $id_cpte qui est fermé\"\n\t}\n\n\n\t//on change l'état du compte à  bloqué\n\t$sql = \"UPDATE ad_cpt SET etat_cpte = 3 WHERE id_ag=$global_id_agence AND id_cpte = $id_cpte;\";\n\t$result=$db->query($sql);\n\tif (DB::isError($result)){\n\t\t$dbHandler->closeConnection(false);\n\t\tsignalErreur(__FILE__,__LINE__,__FUNCTION__);\n\t}\n\n\t$dbHandler->closeConnection(true);\n\n\treturn new ErrorObj(NO_ERR);\n}", "public function __construct() {\n Clanpress_Mode::init();\n }", "protected function initCode(): ?int\n {\n return 1100;\n }", "public function getCode() : int;", "public function getMode();", "public function getMode();", "public function getMode();", "public function getMode();", "protected function _getNextCode() {}", "public function codes()\r\n {\r\n if ($this->model instanceof ZActiveRecord) {\r\n $this->modelId = $this->model->id;\r\n Az::$app->params['modelId'] = $this->modelId;\r\n } else\r\n $this->modelId = $this->paramGet('modelId');\r\n $rand = rand(1, 100);\r\n\r\n $this->htm = strtr($this->_layout['htm'], [\r\n '{id}' => $this->id,\r\n\r\n '{name}' => $this->name,\r\n ]);\r\n\r\n $this->css = <<<CSS\r\n .file-caption-info{\r\n font-size: 12px;\r\n }\r\n .file-size-info{\r\n font-size: 12px;\r\n }\r\n \r\n .file-preview-other{\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n margin-top: 4rem;\r\n }\r\n /*!!!! css siz buzilib ketvotti !!!!*/\r\nCSS;\r\n\r\n if ($this->model instanceof ZActiveRecord) {\r\n $value = $this->model->getAttribute($this->attributeAll);\r\n $className = bname($this->modelClassName);\r\n } else {\r\n $value = $this->value;\r\n $className = $this->parseClassName();\r\n $this->parseAttribute();\r\n }\r\n\r\n $match = Az::$app->utility->pregs->pregMatchAll($this->name, '\\[(.*?)\\]');\r\n $match = ZArrayHelper::getValue($match, 1);\r\n\r\n// $sPrefix = \"/{$this->moduleId}/{$this->controlId}\";\r\n\r\n if (!$myId = $this->httpGet('id'))\r\n $sSuffix = \"modelClassName={$className}&attribute={$this->name}\";\r\n else\r\n $sSuffix = \"modelClassName={$className}&attribute={$this->name}&id=$myId\";\r\n\r\n\r\n $uploadUrl = \"/api/core/files/upload.aspx?{$sSuffix}&test=true\";\r\n $deleteUrl = \"/api/core/files/delete-file.aspx?{$sSuffix}&id={$this->modelId}\";\r\n\r\n $required = $this->_config['required'];\r\n if (!empty($this->value)) {\r\n $required = 0;\r\n }\r\n\r\n $name = $this->name;\r\n $initialFileInputs = '';\r\n\r\n if (!empty($value) && is_array($value)) {\r\n\r\n $modelName = $className;\r\n $isDyno = is_numeric($match[0]);\r\n\r\n foreach ($value as $key => $file) {\r\n if (!is_array($file)) {\r\n if ($isDyno)\r\n switch (count($match)) {\r\n case 4:\r\n $this->_config['initialPreview'][] = Url::to(\"/upload/uploaz/\" . App . \"/{$modelName}/{$match[1]}/$this->modelId/{$match[2]}/{$match[3]}/{$file}\");\r\n break;\r\n case 3:\r\n $this->_config['initialPreview'][] = Url::to(\"/upload/uploaz/\" . App . \"/{$modelName}/{$match[1]}/$this->modelId/{$match[2]}/{$file}\");\r\n break;\r\n default:\r\n $this->_config['initialPreview'][] = Url::to(\"/upload/uploaz/\" . App . \"/{$modelName}/{$match[1]}/$this->modelId/{$file}\");\r\n break;\r\n }\r\n else\r\n switch (count($match)) {\r\n case 3:\r\n $this->_config['initialPreview'][] = Url::to(\"/upload/uploaz/\" . App . \"/{$modelName}/{$match[0]}/$this->modelId/{$match[1]}/{$match[2]}/{$file}\");\r\n break;\r\n case 2:\r\n $this->_config['initialPreview'][] = Url::to(\"/upload/uploaz/\" . App . \"/{$modelName}/{$match[0]}/$this->modelId/{$match[1]}/{$file}\");\r\n break;\r\n default:\r\n $this->_config['initialPreview'][] = Url::to(\"/upload/uploaz/\" . App . \"/{$modelName}/{$match[0]}/$this->modelId/{$file}\");\r\n break;\r\n }\r\n $this->_config['initialPreviewConfig'][] = ['caption' => $file, 'key' => $file];\r\n $initialFileInputs .= \"<input type='\" . $this->_config['type'] . \"' name='$this->name[]' value='\" . $file . \"' />\";\r\n }\r\n }\r\n }\r\n $this->htm = strtr($this->htm, ['{inputs}' => $initialFileInputs]);\r\n\r\n $this->_event['filedeleted'] = <<<JS\r\n function(event, id, index) {\r\n var el = $(\"[name='$name']\");\r\n var filesEl = el.val();\r\n console.log(filesEl);\r\n var filesArr = [];\r\n $.each( JSON.stringify(filesEl), function( fileName, file ) {\r\n if(id === file.name) return ;\r\n fileName = file.name;\r\n filesArr.push(fileName);\r\n });\r\n console.log(filesArr);\r\n el.val(JSON.stringify(filesArr));\r\n \r\n var inputsBlock = $(\"#{id}-inputs input\");\r\n \r\n inputsBlock.each(function(idx, inputField){\r\n console.log(inputField);\r\n var imName = $(this).val();\r\n if(imName == id) {\r\n $(inputField).remove();\r\n }\r\n })\r\n }\r\nJS;\r\n\r\n\r\n $this->_event['filebatchuploadsuccess'] .= <<<JS\r\n \r\n var el = $(\"[name='$this->name']\");\r\n \r\n console.log('Element' + el);\r\n console.log('Element ID: {$this->id}');\r\n\r\n var filesEl = el.val();\r\n var filesArr = [];\r\n \r\n $.each(second.files, function(fileName, file ) {\r\n fileName = file.name;\r\n filesArr.push({name: fileName});\r\n });\r\n \r\n $.each(filesArr, function(fileName, file){\r\n fileName = file.name;\r\n var inputs = \"<input type='{type}' name='{name}[]' value='\"+fileName+\"' />\";\r\n $('#{$this->id}-inputs').append(inputs);\r\n \r\n $('.file-caption-name').attr('title', fileName);\r\n });\r\n var values = JSON.stringify(filesArr);\r\n el.val(values);\r\n \r\n console.log(values);\r\n var key = 'value{$this->attribute}'; \r\n window.localStorage.setItem(key, values);\r\n window.value{$this->attribute} = values;\r\n console.log(window.localStorage.getItem(key));\r\n \r\n $(el).trigger('change');\r\nJS;\r\n\r\n $this->_event['filebatchuploadsuccess'] = strtr($this->_event['filebatchuploadsuccess'], [\r\n '{id}' => $this->id,\r\n '{name}' => $this->name,\r\n '{type}' => $this->_config['type'],\r\n ]);\r\n\r\n $this->_event['filedeleted'] = strtr($this->_event['filedeleted'], [\r\n '{id}' => $this->id,\r\n '{name}' => $this->name,\r\n ]);\r\n\r\n\r\n $this->_event['filezoomshow'] = <<<JS\r\n function(event, files) {\r\n $(\"[class='modal-header']\").attr('style', 'background: white');\r\n \r\n }\r\nJS;\r\n\r\n $this->_event['filebatchselected'] = <<<JS\r\n \r\nJS;\r\n\r\n if (empty($this->_config['initialPreview'])) $this->_config['initialPreview'] = [];\r\n if (empty($this->_config['initialPreviewConfig'])) $this->_config['initialPreviewConfig'] = [];\r\n //vdd($this->jscode($this->_config['allowFileTypes']));\r\n $this->js .= strtr($this->_layout['js'], [\r\n '{id}' => $this->id,\r\n '{rand}' => $rand,\r\n '{showCaption}' => $this->jscode($this->_config['showCaption']),\r\n '{showBrowse}' => $this->jscode($this->_config['showBrowse']),\r\n '{showPreview}' => $this->jscode($this->_config['showPreview']),\r\n '{showRemove}' => $this->jscode($this->_config['showRemove']),\r\n '{showUpload}' => $this->jscode($this->_config['showUpload']),\r\n '{showCancel}' => $this->jscode($this->_config['showCancel']),\r\n '{showPause}' => $this->jscode($this->_config['showPause']),\r\n '{showClose}' => $this->jscode($this->_config['showClose']),\r\n '{browseOnZoneClick}' => $this->jscode($this->_config['browseOnZoneClick']),\r\n '{autoOrientImageInitial}' => $this->jscode($this->_config['autoOrientImageInitial']),\r\n '{initialPreview}' => $this->jscode($this->_config['initialPreview']),\r\n '{initialPreviewConfig}' => $this->jscode($this->_config['initialPreviewConfig']),\r\n '{deleteUrl}' => $deleteUrl,\r\n\r\n //teyganga chipqon chiqsin\r\n\r\n '{allowedFileTypes}' => $this->jscode($this->_config['allowFileTypes']),\r\n\r\n //teyganga chipqon chiqsin\r\n\r\n '{allowedFileExtensions}' => $this->_config['allowedFileExtensions'] ? $this->jscode($this->_config['allowedFileExtensions']) : 'null',\r\n '{uploadUrl}' => $uploadUrl,\r\n '{uploadAsync}' => $this->jscode($this->_config['uploadAsync']),\r\n '{uploadUrlThumb}' => $this->jscode($this->_config['uploadUrlThumb']),\r\n '{maxFileCount}' => $this->jscode($this->_config['maxFileCount']),\r\n '{minFileCount}' => $this->jscode($this->_config['minFileCount']),\r\n '{initialCaption}' => $this->_config['hasPlace'] ? $this->_config['placeholder'] : '',\r\n '{required}' => $this->jscode($required),\r\n '{id}' => $this->jscode($this->id)\r\n ]);\r\n }", "public function getFirstCode() {}", "public function getCodeActivite(): ?string {\n return $this->codeActivite;\n }", "function rebuild_mode($mode)\n {\n foreach ($this->globr($this->BaseDir.\"/\".$mode, \"{$mode}.source\") as $file)\n {\n $basefile = basename($file);\n $uri = str_replace($this->BaseDir, '$URI', $file);\n $uri = str_replace($basefile, \"\", $uri);\n if (file_exists(\"$file.cache\"))\n unlink(\"$file.cache\");\n print \"$file\\n\";\n ob_flush();\n flush();\n $processor = new MarkupBabelProcessor($file, $mode, $uri);\n $processor->rendme();\n }\n }", "function getCode()\n {\n return $this->code;\n }", "private function setMode() {\r\n\t\t$this->mode = substr($this->mode, -1);\r\n\t}", "protected function initSubCode(): ?int\n {\n return 1;\n }", "public function bb()\n {\n }", "public static function getMode();", "static public function ctrRegistroBitacora(){\r\n\r\n\t\tif (isset($_POST[\"editarIdBanco\"])) {\r\n\r\n\t\t$tabla = \"bitacora\";\r\n\r\n\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\r\n\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\r\n\t\t\t\t\t\t\t \"accion\" => 'Edición Banco 6278',\r\n\t\t\t\t\t\t\t \"folio\" => $_POST[\"editarIdBanco\"]);\r\n\r\n\t\t$respuesta = ModeloBanco6278Diario::mdlRegistroBitacora($tabla, $datos);\r\n\r\n\t\treturn $respuesta;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public function getFcpoBiccode() \n {\n return $this->getResponseParameter('clearing_bankbic');\n }", "static function getSynchronizationMode($code)\r\n {\r\n switch ($code) {\r\n case 1:\r\n return self::$UPDATE;\r\n case 2:\r\n return self::$IGNORE;\r\n\r\n default:\r\n return self::$IGNORE;\r\n }\r\n }", "static public function ctrRegistroBitacora(){\r\n\r\n\t\tif (isset($_POST[\"editarIdBanco\"])) {\r\n\r\n\t\t$tabla = \"bitacora\";\r\n\r\n\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\r\n\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\r\n\t\t\t\t\t\t\t \"accion\" => 'Edición Banco 0840',\r\n\t\t\t\t\t\t\t \"folio\" => $_POST[\"editarIdBanco\"]);\r\n\r\n\t\t$respuesta = ModeloBanco0840Diario::mdlRegistroBitacora($tabla, $datos);\r\n\r\n\t\treturn $respuesta;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "function getCode()\r\n {\r\n return $this->code;\r\n }", "public function getAllCode(){\n return parent::getAll('code_ade');\n }", "function bank_config($presta, $abo = false){\n\n\t$id = \"\";\n\t$mode = $presta;\n\tif (preg_match(\",[/-][A-F0-9]{4},Uims\", $presta)){\n\t\t$mode = substr($presta, 0, -5);\n\t\t$id = substr($presta, -4);\n\t}\n\tif (substr($mode, -5)===\"_test\"){\n\t\t$mode = substr($mode, 0, -5);\n\t}\n\n\t// renommage d'un prestataire : assurer la continuite de fonctionnement\n\tif ($mode==\"cyberplus\"){\n\t\t$mode = \"systempay\";\n\t}\n\t$type = null;\n\tif ($abo){\n\t\t$type = 'abo';\n\t}\n\n\t$config = false;\n\tif ($mode!==\"gratuit\"){\n\t\t$configs = bank_lister_configs($type);\n\t\t$ids = array($id);\n\t\tif ($id){\n\t\t\t$ids[] = \"\";\n\t\t}\n\t\tforeach ($ids as $i){\n\t\t\tforeach ($configs as $k => $c){\n\t\t\t\tif ($c['presta']==$mode\n\t\t\t\t\tAND (!$i OR $i==bank_config_id($c))){\n\t\t\t\t\t// si actif c'est le bon, on sort\n\t\t\t\t\tif (isset($c['actif']) AND $c['actif']){\n\t\t\t\t\t\t$config = $c;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// si inactif on le memorise mais on continue a chercher\n\t\t\t\t\tif (!$config){\n\t\t\t\t\t\t$config = $c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($config){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!$config){\n\t\t\tspip_log(\"Configuration $mode introuvable\", \"bank\" . _LOG_ERREUR);\n\t\t\t$config = array('erreur' => 'inconnu');\n\t\t}\n\t} // gratuit est un cas particulier\n\telse {\n\t\t$config = array(\n\t\t\t'presta' => 'gratuit',\n\t\t\t'actif' => true,\n\t\t);\n\t}\n\n\t#if (!isset($config['actif']) OR !$config['actif']){\n\t#\t$config = array();\n\t#}\n\n\tif (!isset($config['presta'])){\n\t\t$config['presta'] = $mode; // servira pour l'aiguillage dans le futur\n\t}\n\tif (!isset($config['config'])){\n\t\t$config['config'] = ($abo ? 'abo_' : '') . $mode;\n\t}\n\tif (!isset($config['type'])){\n\t\t$config['type'] = ($abo ? 'abo' : 'acte');\n\t}\n\n\treturn $config;\n}", "static public function ctrRegistroBitacora(){\r\n\r\n\t\tif (isset($_POST[\"editarIdBanco\"])) {\r\n\r\n\t\t$tabla = \"bitacora\";\r\n\r\n\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\r\n\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\r\n\t\t\t\t\t\t\t \"accion\" => 'Edición Banco 1219',\r\n\t\t\t\t\t\t\t \"folio\" => $_POST[\"editarIdBanco\"]);\r\n\r\n\t\t$respuesta = ModeloBanco1219Diario::mdlRegistroBitacora($tabla, $datos);\r\n\r\n\t\treturn $respuesta;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "function estUnLibelleTypeChambre ($connexion, $mode, $id, $libelle) {\r\n\r\n $libelle = str_replace (\"'\", \"''\", $libelle);\r\n\r\n if ($mode == 'C') {\r\n\r\n $req = \"SELECT COUNT(*) FROM TypeChambre WHERE libelle=:lib\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> bindParam (':lib', $libelle);\r\n\r\n } else {\r\n\r\n $req = \"SELECT COUNT(*) FROM TypeChambre WHERE libelle=:lib and id <> :id\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> bindParam (':lib', $libelle);\r\n $stmt -> bindParam (':id', $id);\r\n\r\n }\r\n\r\n $stmt -> execute ();\r\n return $stmt -> fetchColumn ();\r\n\r\n }", "function load_content_builder_cpts() {\n // FROM PLUGIN AND THEME\n echo efflab_cb_get_module_cpts();\n \n}", "function habilitarCajero(){\n\t\t$this->objFun=new FuncionesCobranza();\t\n\t\t$this->res=$this->objFun->habilitarCajero($this->objParam);\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\n\n\t}", "public function getFcpoBankcode() \n {\n return $this->getResponseParameter('clearing_bankcode');\n }", "public function getCode(): int;", "public function getMode()\n {\n return;\n }", "public function getAvecCodeBarre() {\n return $this->avecCodeBarre;\n }", "public function dp_savecode($data)\n {\n return $this->call('dp_savecode', static::prepareParams($data, [\n 'field_name' => ['string', 20], // Enter the name of an existing field type from the DPCODES table\n 'code' => ['string', 30], // Enter the new CODE value\n 'description' => ['string', 100], // Enter the description value that will appear in drop-down selection values\n 'original_code' => ['string', 20], // Enter NULL unless you are updating an existing code. In that case, set this field to the current (before update) value of the CODE\n 'code_date' => ['date'], // Enter NULL\n 'mcat_hi' => ['money'], // Enter NULL\n 'mcat_lo' => ['money'], // Enter NULL\n 'mcat_gl' => ['string', 1], // Enter NULL\n 'acct_num' => ['string', 30], // Enter NULL\n 'campaign' => ['string', 30], // Enter NULL\n 'solicit_code' => ['string', 30], // Enter NULL\n 'overwrite' => null, // If you are creating a new code, set this field to NULL or 'N'. If you are updating an existing code, set this to 'Y'.\n 'inactive' => ['string', 1], // Enter 'N' for an active code or 'Y' for an inactive code. Inactive codes are not offered in the user interface dropdown lists. Set @inactive='N' to indicate that this entry is Active and will appear in the appropriate drop-down field in the user interface.\n 'client_id' => null,\n 'available_for_sol' => null,\n 'user_id' => $this->appName,\n 'cashact' => null,\n 'membership_type' => null,\n 'leeway_days' => null,\n 'comments' => ['string', 2000], // You may enter a comment of up to 2000 characters if you like.\n 'begin_date' => ['date'], // Set as 'MM/DD/YYYY' only. Setting time values is not supported.\n 'end_date' => ['date'], // Set as 'MM/DD/YYYY' only. Setting time values is not supported.\n 'ty_prioritize' => ['string', 1], // Enter NULL\n 'ty_filter_id' => null,\n 'ty_gift_option' => null,\n 'ty_amount_option' => null,\n 'ty_from_amount' => null,\n 'ty_to_amount' => null,\n 'ty_alternate' => null,\n 'ty_priority' => null,\n ]));\n }", "public function getCode() { return $this->code; }", "public function get_code() {\n\t\treturn $this->code;\n\t}", "public function getcode()\n {\n return $this->code;\n }", "public function get_Code_produit()\n\t\t{\n\t\t\treturn $this->Code_produit;\n\t\t}", "public function change_promocode_status_global(){\n\t\tif(count($_POST['checkbox_id']) > 0 && $_POST['statusMode'] != ''){\n\t\t\t$this->promocode_model->activeInactiveCommon(PROMOCODE,'_id');\n\t\t\tif (strtolower($_POST['statusMode']) == 'delete'){\n\t\t\t\t$this->setErrorMessage('success','Coupon Code deleted successfully','admin_coupon_code_delete_success');\n\t\t\t}else {\n\t\t\t\t$this->setErrorMessage('success','Coupon Code status changed successfully','admin_coupon_code_status_change');\n\t\t\t}\n\t\t\tredirect(ADMIN_ENC_URL.'/promocode/display_promocode');\n\t\t}\n\t}", "public function genererCode()\n {\n if(Session::has('admin')){\n $annonceurs = Annonceur::orderBy('id', 'desc')->get();\n return view('admin.autotheque.genererCode', ['annonceurs' => $annonceurs, 'option' => '']);\n }else{\n return view('admin.index');\n }\n }", "function cl_condicionante() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"condicionante\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function \tc_main(){ return \"\"; }" ]
[ "0.62279075", "0.5990187", "0.57621324", "0.57218874", "0.5644606", "0.5638799", "0.56196356", "0.56118476", "0.560966", "0.5603606", "0.5592896", "0.5590757", "0.55829644", "0.5576152", "0.5576152", "0.5576152", "0.5576152", "0.5576152", "0.5576152", "0.55652493", "0.55652493", "0.55614007", "0.5553984", "0.5547722", "0.5545396", "0.5528161", "0.55033153", "0.54932564", "0.5477712", "0.5448461", "0.54462343", "0.54124343", "0.54113764", "0.5404474", "0.5402824", "0.54023075", "0.54007983", "0.5396984", "0.53915924", "0.5389501", "0.5387911", "0.5372401", "0.5372401", "0.5372401", "0.5369523", "0.53609973", "0.5357569", "0.535598", "0.5350376", "0.53399056", "0.53202057", "0.53108007", "0.5303495", "0.5297316", "0.528029", "0.52700096", "0.52601254", "0.52579707", "0.52573216", "0.5247846", "0.5246809", "0.5229127", "0.5221683", "0.5221683", "0.5221683", "0.5221683", "0.52203095", "0.5219964", "0.52182096", "0.5210478", "0.5210378", "0.51926863", "0.518241", "0.518229", "0.5179556", "0.51788473", "0.517038", "0.51539564", "0.51522267", "0.51518244", "0.51432663", "0.51428455", "0.5140999", "0.51390773", "0.512545", "0.51238275", "0.5123712", "0.51126724", "0.5109857", "0.51076186", "0.5102724", "0.5095461", "0.508445", "0.50818735", "0.5073931", "0.5063911", "0.50612044", "0.50599426", "0.50584793", "0.5054199" ]
0.6939403
0
Renvoie le code de la caisse
protected function getCodeCaisse() { $table = $this->getDbManager()->get('Sbm\Db\System\Libelles'); return $table->getCode('Caisse', 'DFT'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final function getCode();", "public function getCode() {\n\n $licence = '/*\n * Auto Generated Code for HomeNet\n *\n * Copyright (c) 2011 HomeNet.\n *\n * This file is part of HomeNet.\n *\n * HomeNet is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * HomeNet is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with HomeNet. If not, see <http ://www.gnu.org/licenses/>.\n */';\n return $licence;\n }", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode();", "public function getCode() {}", "public function veriCode() {}", "public function codeRetrait()\n {\n $code_secret = $this->utils->securite_xss($_POST['codesecret']);\n $fkcarte = $this->utils->securite_xss($_POST['fkcarte']);\n $frais = $this->compteModel->verifCodeRetrait($fkcarte, $code_secret);\n if ($frais == 1) echo 1;\n elseif ($frais == 0) echo 0;\n else echo -2;\n }", "public function getCode()\n {\n }", "public function code()\n {\n $inventaire = $this->em->getRepository(\"AppBundle:Inventaire\")->findOneBy(['statut'=>true], ['id'=>'DESC']);\n //dump($inventaire->getReference());die();\n if ($inventaire){\n $id = $inventaire->getId() + 1;\n if ($id < 10) $reference = 'A00'.$id;\n elseif ($id<100) $reference = 'A0'.$id;\n else $reference = 'A'.$id;\n return $reference;\n }else{\n $reference = 'A001';\n return $reference;\n }\n }", "public function getCode(): string;", "public function getCode(): string;", "public function getCode(): string;", "public function getCode():string;", "public static function getCode()\n\t{\n\t\tthrow new NotImplementedException;\n\t}", "function b_code($code){\n \t$re = new DbManager();\n \t$book = $re -> code_book($code);\n \treturn $book ;\n }", "public function getCode() {return $this->code;}", "public function getFirstCode() {}", "public function codeRechargement()\n {\n $code_secret = $this->utils->securite_xss($_POST['codesecret']);\n $fk_agence = $this->utils->securite_xss($_POST['fkagence']);\n $frais = $this->compteModel->verifCodeRechargement($fk_agence, $code_secret);\n if ($frais == 1) echo 1;\n elseif ($frais == 0) echo 0;\n else echo -2;\n }", "public function getCodeInspecteur() {\n return $this->codeInspecteur;\n }", "public function code()\n {\n $code = Code::orderBy('id', 'desc')->get();\n return view('Frontend.pages.code', compact(['code']));\n }", "public function code()\n {\n return $this->code;\n }", "public function code()\n {\n return $this->code;\n }", "public function getCode() {\n return $this->parse()['code'];\n }", "function niveau ($niveauCode, $niveauTexte)\n{\n if ($niveauCode = 1){\n \n }\n \n }", "function getCode()\n {\n return $this->code;\n }", "public function get_code() {\n\t\treturn $this->code;\n\t}", "function ret2code2text() {\n\t$this->chapitre(\"Return to .TEXT\");\n\t$this->titre(\"Outrepasser une authentification -> return to text\");\n\t$this->ssTitre(\"Exec Our Programme\");\n\t$this->requette(\"$this->file_path '0123456789' \");\n\t$this->pause();\n\t$this->requette(\"$this->file_path AAAABBBBCCCC\");\n\t$this->requette(\"$this->file_path AAAABBBBCCCCDDDDABCD\");\n\t$this->article(\".Text\", \"La zone text contient les instructions du programme. \n\t\t\tCette région est en lecture seule. \n\t\t\tElle est partagée entre tous les processus qui exécutent le même fichier binaire. \n\t\t\tUne tentative d'écriture dans cette partie provoque une erreur segmentation violation. -> segfault, cette zone n'est pas influençables par l'ASLR ni NX.\");\n\t$this->pause();\n\n\t$this->bin2text2size();$this->pause();\n\t$this->bin2text2content();$this->pause();\n\t$this->titre(\"Adresse de la fonction secret\");\n\t$ret = trim($this->req_ret_str(\"$this->file_path AAAAAAAA | grep '0x' | cut -d : -f 2\"));\n\t$this->ssTitre(\"Via gdb\");\n\t$this->requette(\"gdb -q --batch -ex \\\"print &secret\\\" $this->file_path\");\n\t$this->requette(\"gdb -q --batch -ex \\\"info symbol $ret\\\" $this->file_path\");\n\t$this->ssTitre(\"Via nm\");\t$this->requette(\"nm $this->file_path | grep secret\");\n\t$this->ssTitre(\"Via le script source\");$this->requette(\"$this->file_path AAAAAAAA\");\n\t$this->pause();\n\t$overflow = $this->bin2fuzzeling(\"\");$this->pause();\n\t// $offset_eip = trouve_offset($this->file_path,$overflow) ;\n\t$offset_eip = $this->bin2offset4eip($overflow);\n\t$this->ssTitre(\"ESP & EBP\");\n\t// diff_esp_ebp();pause(); // ok\n\t$ret = $this->hex2rev_32($ret);\n\t$query = \"$this->file_path `python -c print'\\\"A\\\"*$offset_eip+\\\"$ret\\\"'`\";\n\t$this->ssTitre(\"Sous Linux 32 Bits\");\n\t$this->ssTitre(\"Exec Programme\");\n\t$this->requette(\"$this->file_path 123456\");\n\t$this->ssTitre(\"Exec Programme with our payload \");\n\t$this->cmd(\"localhost\", $query);\n\t$this->article(\"Note\", \"Dot it a la main,php recoit un signal segfault du prog qui a lance d'ou l'arret de l'execution de la commande system -> on test en cmd\");\n\t$this->pause();\n\t$this->notify(\"End .text\");\n}", "public function GetCode () \r\n\t{\r\n\t\treturn ($Code);\r\n\t}", "function getCode()\r\n {\r\n return $this->code;\r\n }", "public function getCode() {\n\t\t$code = [];\n\t\tforeach($this->code as $_ => $val) {\n\t\t\t$code[] = \"API.{$val[0]}(\".json_encode($val[1], JSON_UNESCAPED_UNICODE).\")\";\n\t\t}\n\n\t\treturn 'return ['.implode(',', $code).'];';\n\t}", "public function getCode(): string\n {\n return $this->code;\n }", "public function getCode(): string\n {\n return $this->code;\n }", "public function getCode(): string\n {\n return $this->code;\n }", "public function restore_code() {\n\t\t$serial = $this->plain_serial();\n\t\t$secret = pack('H*', $this->secret());\n\t\t// take the 10 last bytes of the digest of our data\n\t\t$data = substr(sha1($serial.$secret, true), -10);\n\t\treturn Authenticator_Crypto::restore_code_to_char($data);\n\t}", "public function getcode()\n {\n return $this->code;\n }", "public\n\n\tfunction generate_code()\n\t{\n\t\t$data[\"hitung\"] = $this->Madmin->buat_code();\n\t\t$this->load->view('admin/Generate_code', $data);\n\t}", "public function getCode() { return $this->code; }", "protected function cod()\n\t{\n\t\tif ($this->store['cod'] !== false) {\n\t\t\t$this->score += $this->config->data()['cod'];\n\t\t}\t\n\t}", "function codePage($cp)\n{\n return $this->drv->codePage($cp);\n}", "function recupere_libelle_chambre_libelle($code){\n\treturn ResultatRequette(\"select LIBELLE_TYPE_CHAMBRE as info from type_chambre where CODE_TYPE_CHAMBRE='$code'\");\n }", "public function getCode() : int;", "public function getCodeRetraiteComplementaire() {\n return $this->codeRetraiteComplementaire;\n }", "public function getCode(): int;", "protected function _getNextCode() {}", "public function getCode()\n {\n $this->code = $_GET['code'];\n return $this->code;\n\n }", "public function getCode()\n\t{\n\t\treturn $this->code;\n\t}", "public function getCode()\n\t{\n\t\treturn $this->code;\n\t}", "public function getCode()\n\t{\n\t\treturn $this->code;\n\t}", "public function getCode() : string\n {\n return $this->_code;\n }", "function code() {\n\t\t$code_issue_replace = false;\n\t\tif (in_array('replace', $this->args)) {\n\t\t\t$code_issue_replace = true;\n\t\t}\n\t\t$files = $this->files();\n\t\tforeach ( $files as $file ) {\n\t\t\t$code = file_get_contents($file);\n\t\t\t$issues = $this->code_issue_find($code);\n\t\t\tif (!empty($issues)) {\n\t\t\t\tif ($code_issue_replace) {\n\t\t\t\t\t$this->code_issue_replace($file, $code);\n\t\t\t\t} else {\n\t\t\t\t\t$this->out($file);\n\t\t\t\t\tprint_r($issues);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function genererCode()\n {\n if(Session::has('admin')){\n $annonceurs = Annonceur::orderBy('id', 'desc')->get();\n return view('admin.autotheque.genererCode', ['annonceurs' => $annonceurs, 'option' => '']);\n }else{\n return view('admin.index');\n }\n }", "public function getCode() {\n return $this->code;\n }", "public function getCode() {\n return $this->code;\n }", "public function getCode()\n {\n return $this->__get(\"code\");\n }", "function ret2code2data() {\n\t$this->chapitre(\"Return to .DATA\");\n\t$this->article(\"La zone data\", \" stocke les données globales statiques initialisées (dont la valeur est fournie lors de la compilation)\");\n\t$overflow = 100;\n\n\t$this->ssTitre(\"exec Programme\");\n\t$this->requette(\"$this->file_path rohff\");\n\t$this->note(\"la variable shellcode_date n'est appelée nulle part dans l'execution du programme\");\n\t$this->bin2data2size();$this->pause();\n\t$this->bin2data2content();$this->pause();\n\n\t$this->titre(\"Adresse de la variable shellcode_data\");\n\t$this->ssTitre(\"Via le script source\");\n\t$ret = trim($this->req_ret_str(\"$this->file_path AAAAAAAA | grep '0x' | cut -d : -f 2\"));$this->pause();\n\t$this->ssTitre(\"Via gdb\");\n\t$this->requette(\"gdb -q --batch -ex \\\"print &shellcode_data\\\" $this->file_path\");\n\t$this->requette(\"gdb -q --batch -ex \\\"info symbol $ret\\\" $this->file_path\");\n\t$this->ssTitre(\"Via nm\");\t$this->requette(\"nm $this->file_path | grep shellcode_data\");\t$this->pause();\n\t$offset_eip = $this->bin2offset4eip($overflow);\n\t$addr = $this->hex2rev_32($ret);\n\t$query = \"$this->file_path `python -c print'\\\"A\\\"*$offset_eip+\\\"$addr\\\"'`\";\n\t$this->requette($query);\n\t$this->pause();\n\t$this->notify(\"END .data Section\");\n}", "public function getAllCode(){\n return parent::getAll('code_ade');\n }", "function init_code(&$code)\n\n{\n\n $code .= \"\\n\";\n\n \n\n // code not allowed to contain our special characters\n\n return ($code = strtr($code, array(\"\\x00\" => '', \"\\x01\" => '')));\n\n}", "private function dataCodeAction()\n {\n $code_action = array(\n 'ABO' => array('Abonnement', '1'),\n 'PROSP' => array('Prospection', '2'),\n 'PROSP1' => array('Prospection tracer 1', '2'),\n 'PROSP11' => array('Prospection tracer 11', '2'),\n 'PROSP12' => array('Prospection tracer 12', '2'),\n 'PROSP13' => array('Prospection tracer 13', '2'),\n 'PROSP2' => array('Prospection tracer 2', '2'),\n 'PROSP21' => array('Prospection tracer 21', '2'),\n 'PROSP22' => array('Prospection tracer 22', '2'),\n 'PROSP23' => array('Prospection tracer 23', '2'),\n 'PROSP24' => array('Prospection tracer 24', '2'),\n 'PROSP3' => array('Prospection tracer 3', '2'),\n 'PROSP5' => array('Prospection tracer 5', '2'),\n 'PROSP51' => array('Prospection tracer 51', '2'),\n 'PROSP52' => array('Prospection tracer 52', '2'),\n 'PROSP53' => array('Prospection tracer 53', '2'),\n 'PROSP ENTR' => array('Contact entrant sans fiche client', '2'),\n 'PROSP REL' => array('Prospection REL', '2'),\n 'PROSPWEB' => array('Prospection Web', '2'),\n 'FID' => array('FID', '20'),\n 'FID PROMO' => array('FID suite promo', '20'),\n 'FID PROG F' => array('FID programme fidélité', '20'),\n 'FID WEB PRGF' => array('FID web PRGF', '20'),\n 'FID WEB PROMO' => array('FID web PROMO', '20'),\n 'FID WEB PROM' => array('FID web PROMO', '20'),\n 'FID WEB' => array('FID web', '20'),\n 'PAR' => array('Parrainage', '27'),\n 'REACT+4M' => array('Reactivation fichier clients +4mois', '28'),\n 'REACT+4MPROMO' => array('Reactivation fichier clients +4mois suite à promo', '28'),\n 'REACT SPONT' => array('Reactivation client spontanée', '28'),\n 'REACT SPONT PROMO' => array('Reactivation client spontanée suite à promo', '28'),\n 'REACTSPONT' => array('Reactivation client AC formulaire', '28'),\n 'REACT AC FORM' => array('Reactivation client AC formulaire', '28'),\n 'REACTIV' => array('Reactivation REACTIV', '28'),\n 'CONT ENTR' => array('CONT ENTR', '35')\n );\n $data = array();\n $c = 1;\n foreach ($code_action as $key => $value) {\n $data[] = array(\n 'id_code_action' => (int)$c,\n 'name' => pSQL($key),\n 'description' => pSQL($value[0]),\n 'groupe' => (int)$value[1]\n );\n $c++;\n }\n\n return $data;\n }", "public function getCode(): ?string;", "public function getCode()\n {\n return $this->getData()->code;\n }", "public function getCode() {\n\t\treturn $this->code;\n\t}", "public function getCode() {\n\t\treturn $this->code;\n\t}", "public function getCode() {\n\t\treturn $this->code;\n\t}", "public function getCodeSample()\n {\n $code = <<< 'CODE'\n namespace KEINOS\\AutoMailReply;\n require_once('./src/constants.php');\n require_once('./src/functions.php');\n echo (isModeDebug() === true) ? 'true' : 'false';\nCODE;\n $code = \\str_replace(PHP_EOL, '', $code);\n\n return $code;\n }", "public function getCode()\r\n {\r\n return $this->code;\r\n }", "public function traerCualquiera()\n {\n }", "private function calculateBelfioreCode()\n {\n return strtoupper($this->subject->getBelfioreCode());\n }", "public function Code()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "public function getCode()\n {\n return $this->code;\n }", "function code($code=null)\n {\n if (isset($code)) $this->code = $code;\n return $this->code;\n }", "public function getCode()\n {\n return $this->getValueObject('code');\n }", "public function getCode()\n {\n return $this->get(self::CODE);\n }" ]
[ "0.7017567", "0.6780629", "0.6758399", "0.6758399", "0.6758399", "0.6758399", "0.6758399", "0.6758399", "0.6754007", "0.6671532", "0.6651441", "0.657072", "0.65506184", "0.6507318", "0.6507318", "0.6507318", "0.6427193", "0.63314235", "0.63183886", "0.62891525", "0.6251207", "0.6201557", "0.61966646", "0.6172759", "0.61425996", "0.61425996", "0.6140886", "0.6134895", "0.611392", "0.61121976", "0.60990393", "0.60954434", "0.6043247", "0.60264665", "0.6022654", "0.6022654", "0.6022654", "0.60110855", "0.60086143", "0.5998482", "0.59876764", "0.5987425", "0.5986341", "0.5973195", "0.5960854", "0.5949626", "0.5911063", "0.5897755", "0.5889185", "0.58890426", "0.58890426", "0.58890426", "0.5888323", "0.5886469", "0.588566", "0.5855528", "0.5855528", "0.58551246", "0.58549356", "0.58442277", "0.58398736", "0.5836638", "0.5831524", "0.5814733", "0.5814514", "0.5814514", "0.5814514", "0.58128506", "0.58079267", "0.5807369", "0.58013934", "0.57989407", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.5794655", "0.57866096", "0.5781142", "0.57725173" ]
0.6565849
12
Add metaboxes for singlefood
function ir_register_food_metabox() { $prefix = 'ir_'; /** * Sample metabox to demonstrate each field type included */ $cmb_food = new_cmb2_box( array( 'id' => $prefix . 'food_metabox', 'title' => esc_html__( 'Component values', 'cmb2' ), 'object_types' => array( 'food', ), // Post type ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'energia, laskennallinen', 'cmb2' ), 'id' => $prefix . 'energy', 'type' => 'text_small', 'desc' => 'kcal' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Food id', 'cmb2' ), 'id' => $prefix . 'foodId', 'type' => 'text_small', ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Hiilihydraatti', 'cmb2' ), 'id' => $prefix . 'hiilihydraatti', 'type' => 'text_small', 'desc' => 'g' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Proteiini', 'cmb2' ), 'id' => $prefix . 'proteiini', 'type' => 'text_small', 'desc' => 'g' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Rasva', 'cmb2' ), 'id' => $prefix . 'rasva', 'type' => 'text_small', 'desc' => 'g' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Sokerit', 'cmb2' ), 'id' => $prefix . 'sokeri', 'type' => 'text_small', 'desc' => 'g' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Kuitu', 'cmb2' ), 'id' => $prefix . 'kuitu', 'type' => 'text_small', 'desc' => 'g' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Folaatti', 'cmb2' ), 'id' => $prefix . 'folaatti', 'type' => 'text_small', 'desc' => 'µg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Niasiiniekvivalentti NE', 'cmb2' ), 'id' => $prefix . 'niasiiniekvivalentti', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Niasiini (nikotiinihappo + nikotiiniamidi)', 'cmb2' ), 'id' => $prefix . 'niasiini', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Pyridoksiini vitameerit (vetykloridi) (B6)', 'cmb2' ), 'id' => $prefix . 'b6', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Riboflaviini (B2)', 'cmb2' ), 'id' => $prefix . 'b2', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Tiamiini (B1)', 'cmb2' ), 'id' => $prefix . 'b1', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'B12-vitamiini (kobalamiini)', 'cmb2 ' ), 'id' => $prefix . 'b12', 'type' => 'text_small', 'desc' => 'µg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'C-vitamiini', 'cmb2' ), 'id' => $prefix . 'C', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'A-vitamiini', 'vitamiini ' ), 'id' => $prefix . 'A_RAE', 'type' => 'text_small', 'desc' => 'µg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Karotenoidit', 'karotenoidit' ), 'id' => $prefix . 'karotenoidit', 'type' => 'text_small', 'desc' => 'µg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'D-vitamiini', 'cmb2' ), 'id' => $prefix . 'D', 'type' => 'text_small', 'desc' => 'µg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'E-vitamiini alfatokoferoli', 'cmb2' ), 'id' => $prefix . 'E', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'K-vitamiini', 'cmb2' ), 'id' => $prefix . 'K', 'type' => 'text_small', 'desc' => 'µg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Kalsium', 'cmb2' ), 'id' => $prefix . 'kalsium', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Rauta', 'cmb2' ), 'id' => $prefix . 'rauta', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Jodidi', 'cmb2' ), 'id' => $prefix . 'jodidi', 'type' => 'text_small', 'desc' => 'µg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Kalium', 'cmb2' ), 'id' => $prefix . 'kalium', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Magnesium', 'cmb2' ), 'id' => $prefix . 'magnesium', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Natrium', 'cmb2' ), 'id' => $prefix . 'natrium', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Suola', 'cmb2' ), 'id' => $prefix . 'suola', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Fosfori', 'cmb2' ), 'id' => $prefix . 'fosfori', 'type' => 'text_small', 'desc' => 'mg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Seleeni', 'cmb2' ), 'id' => $prefix . 'seleeni', 'type' => 'text_small', 'desc' => 'µg' ) ); $cmb_food->add_field( array( 'name' => esc_html__( 'Sinkki', 'cmb2' ), 'id' => $prefix . 'sinkki', 'type' => 'text_small', 'desc' => 'mg' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addMetaboxes() {}", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "public function add_meta_boxes()\n \t{\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('wp_plugin_template_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray($this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\t\t\t\t\n \t}", "public function add_meta_boxes()\n \t{\n\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('WP_Custom_Login_Profile_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray(&$this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\n\n \t}", "function add_ingredienten_metabox(){\n\tadd_meta_box(\n\t\t'ingredienten_metabox',//id\n\t\t'Ingrediënten',//title\n\t\t'content_ingredienten_metabox',//callback\n\t\t'smaak',//page\n\t\t'normal', //context\n\t\t'high'//priority\n\t\t);\n}", "public static function add_metaboxes(){}", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "public function apb_add_meta_boxes() {\r\n\t}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "function add_meta_boxes()\n {\n }", "public function add_meta_boxes()\n {\n /* Author Name */\n add_meta_box(\n 'testimonial_options',\n 'Testimonial Options',\n array ( $this , 'render_features_box'),\n 'testimonial',\n 'side',\n 'default'\n );\n /* Author email */\n /* approved [checkbox] */\n /* featured [checkbox] */\n }", "function tabify_add_meta_boxes($post_type)\n {\n }", "function add_dish_metaboxes()\r\n{\r\n\tadd_meta_box( 'price', __('Price'), 'edit_price_box', 'dish', 'normal');\t\r\n}", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "public function add_meta_boxes()\n {\n\n $this->_add_bitly_meta_box();\n\n }", "public static function add_to_wc_metabox(){\n global $post;\n\n echo '<div class=\"options_group\">';\n\n echo woocommerce_wp_checkbox( array(\n 'id' => '_only_item_in_cart',\n 'label' => __( 'Only Item In Cart' ) ,\n 'description' => __( 'For special items that need to be purchased individually.', 'wc-only-item-in-cart' )\n )\n );\n\n echo '</div>';\n\n }", "function idem_pop_up_add_meta_box()\n{\n add_meta_box(\n 'idem-pop-up-meta-box', // id, used as the html id att\n __( 'Idem Pop Up' ), // meta box title, like \"Page Attributes\"\n 'idem_pop_up_meta_box_cb', // callback function, spits out the content\n 'page', // post type or page. We'll add this to pages only\n 'side', // context (where on the screen)\n 'high' // priority, where should this go in the context?\n );\n}", "public function registerMetaBoxes()\n\t {\n\t \t$dataMetas = self::getDataMetas();\n\n\t \tif ( !empty($dataMetas) ) {\n\t \t\tforeach ($dataMetas as $key => $meta) {\n\t \t\t\t/* CHECK IF HAS PAGES */\n\t \t\t\tif ( isset($meta[\"_pages\"]) && !empty($meta[\"_pages\"][0]) ) {\n\t \t\t\t\tself::createMetasPages($meta);\n\t \t\t\t}\n\n\t \t\t\t/* POSTS TYPES REGISTER METAS */\n\t \t\t\tif ( isset($meta[\"_posts_types\"]) && !empty($meta[\"_posts_types\"][0]) ) {\n\t \t\t\t\tself::createMetasPostTypes($meta);\n\t \t\t\t}\n\n\t \t\t\t/* CHECK IF ALL POSTS IS true */\n\t \t\t\tif ( isset($meta[\"_all_posts\"]) && $meta['_all_posts'] == 'yes' ) {\n\t \t\t\t\tself::createMetasPosts($meta);\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\n\t }", "function tower_register_meta_boxes() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n $meta = $custom_type['meta'];\n add_meta_box(\n $meta['handle'],\n $meta['title'],\n $meta['callback'],\n $key\n );\n }\n}", "function ilusix_my_custom_meta_box() {\n global $myMetaBoxPostTypes;\n\n foreach($myMetaBoxPostTypes as $postType) {\n add_meta_box(\n 'my_custom_meta_box_identifier' . '-' . $postType,\n 'Meta box title',\n 'ilusix_my_custom_meta_box_callback',\n $postType,\n 'normal',\n 'default'\n );\n }\n}", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "function add_metaboxes() \n {\n // add a metabox to the Event using the callback add_time_date_metabox \n add_meta_box( \n \"bbquotations-source\",\n __(\"Quote source url\", $this->localization_domain),\n array(&$this, \"add_source_metabox\"), $this->custom_post_type_name, \"normal\", \"high\"\n );\n\n add_meta_box( \n \"bbquotations-cheatsheet\",\n __(\"Quotes usage cheatsheet\", $this->localization_domain),\n array(&$this, \"add_cheatsheet_metabox\"), $this->custom_post_type_name, \"side\", \"high\"\n );\n }", "function cnew_custom_metabox_add() {\r\n add_meta_box(\r\n 'cnew_custom_metabox_workshop', \r\n __( 'Informações da Oficina', 'cnew' ), \r\n 'cnew_workshop_custom_metabox_callback', \r\n 'cnew_workshop', \r\n 'normal',\r\n 'high'\r\n );\r\n\r\n add_meta_box(\r\n 'cnew_custom_metabox_registration', \r\n __( 'Formulário de Inscrição', 'cnew' ), \r\n 'cnew_registration_custom_metabox_callback', \r\n 'cnew_registration', \r\n 'normal',\r\n 'high'\r\n );\r\n }", "public function register_metaboxes(){\n\t\tif ($this->options('use_metabox')){\n\t\t\t$metabox = $this->metabox();\n\t\t\tadd_meta_box(\n\t\t\t\t$metabox['id'],\n\t\t\t\t$metabox['title'],\n\t\t\t\t'show_meta_boxes',\n\t\t\t\t$metabox['page'],\n\t\t\t\t$metabox['context'],\n\t\t\t\t$metabox['priority']\n\t\t\t);\n\t\t}\n\t}", "static function metabox($post){\n\t\twp_nonce_field( 'flat-options', 'flat-options_nonce' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\techo '<style>';\n\t\techo '.admin-meta-input{display:block; margin-top: 10px;}';\n\t\techo 'div.field-holder{display: block;float: left; margin: 10px 20px; height: 80px;}';\n\t\techo '.field-block{display: inline-block;clear: both;float: none;}';\n\t\techo '.postbox .inside .field-block h2{padding: 8px 12px;font-weight: 600;font-size: 18px;margin: 0;line-height: 1.4}';\n\t\techo '</style>';\n\t\t\t\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Licitálással kapcsolatos adatok</h2>';\n\t\tforeach ($fieldblocks['licit'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Hely adatok</h2>';\n\t\tforeach ($fieldblocks['location'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlan adatok és településrendezési előírások</h2>';\n\t\tforeach ($fieldblocks['parameters'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlanjogi jellemzők</h2>';\n\t\tforeach ($fieldblocks['info'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Közművek, energiaellátás, telekommunikáció</h2>';\n\t\tforeach ($fieldblocks['sources'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\n\t\t\t\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Építmény (épület) jellemzői</h2>';\n\t\tforeach ($fieldblocks['building'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\techo \"\n\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('.datepicker').datepicker();\t\n\t\t\t\t});\t\n\t\t\t</script>\t\n\t\t\";\n\t\t\n\t\techo '<br clear=\"all\">';\n\t\t\n }", "function create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PAGE SETTINGS', 'new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}", "function wck_settings_page_add_meta_boxes() {\r\n global $post;\r\n\t\tdo_action( 'add_meta_boxes', $this->hookname, $post );\r\n\t}", "function singlewanted_boxes() {\r\n add_meta_box(\"singlewanted_seeker\", \"Wer sucht?\", \"singlewanted_seeker\", \"lze_s_wanted\", \"normal\", \"high\");\r\n add_meta_box(\"singlewanted_wanted\", \"Beschreibung des gesuchten Charakters\", \"singlewanted_wanted\", \"lze_s_wanted\", \"normal\", \"high\");\r\n add_meta_box(\"singlewanted_reason\", \"Warum wird der Charakter gesucht?\", \"singlewanted_reason\", \"lze_s_wanted\", \"normal\", \"high\");\r\n\t\tadd_meta_box(\"singlewanted_relatedto\", \"Gehört der Charakter zu einer Gruppe?\", \"singlewanted_relatedto\", \"lze_s_wanted\", \"normal\", \"high\");\r\n add_meta_box(\"singlewanted_avatar\", \"Vorschlag Avatarperson\", \"singlewanted_avatar\", \"lze_s_wanted\", \"normal\", \"high\");\r\n add_meta_box(\"singlewanted_pic\", \"Bild\", \"singlewanted_pic\", \"lze_s_wanted\", \"normal\", \"high\");\r\n }", "public function addMultipleMetaBoxes()\n {\n\n $options = get_option( 'niloy_plugin_cf' ) ?: array();\n\n add_meta_box( 'field_options', 'Field Options', array( $this, 'renderMultipleMetaBoxes'), $options['related_posts'], 'normal', 'default' );\n\n }", "public function add_meta_boxes() {\n global $current_screen;\n\n $page_main = $this->_admin_pages['swpm'];\n\n if ($current_screen->id == $page_main && isset($_REQUEST['form'])) {\n add_meta_box('swpm_form_items_meta_box', __('Form Items', 'swpm-form-builder'), array(&$this, 'meta_box_form_items'), $page_main, 'side', 'high');\n }\n }", "function coolRahulSoni_meta_box_add()\n{\n add_meta_box( 'my-meta-box-id', 'My First Meta Box', 'cd_meta_box_cb', 'post', 'normal', 'high' );\n}", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Word linkages',\n\t\t\t'Word linkages',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'linkages_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'Answers',\n\t\t\t'Answers',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'answers_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "public static function menucat_metabox() {\n\t\t\t\n\t\t\t$position = \"side\";\n\t\t\t$priority = \"low\";\n\t\t\t\n\t\t\tadd_meta_box( 'custom-metabox', __( 'Dish Category' ), array( __CLASS__, 'category_box'), self::$post_type, $position, \"low\" );\n\t\t\tadd_meta_box( 'custom-metabox2', __( 'Dish Price' ), array( __CLASS__, 'price_box'), self::$post_type, $position, $priority );\n\t\t\tadd_meta_box( 'custom-metabox3', __( 'Special Information' ), array( __CLASS__, 'info_box'), self::$post_type, \"normal\", \"high\" );\n\t\t\tadd_meta_box( 'custom-metabox4', __( 'Dish Serving' ), array( __CLASS__, 'serve_box'), self::$post_type, \"normal\", \"high\" );\n\t\t\t\t\t\t\n\t\t}", "public function add_meta_box() {\r\n\r\n\t\tif( ! is_wp_error( $this->tax_obj ) && isset($this->tax_obj->object_type ) ) foreach ( $this->tax_obj->object_type as $post_type ):\r\n\t\t\t$label = $this->tax_obj->labels->name;\r\n\t\t\t$id = ! is_taxonomy_hierarchical( $this->taxonomy ) ? 'radio-tagsdiv-'.$this->taxonomy : 'radio-' .$this->taxonomy .'div' ;\r\n\t\t\tadd_meta_box( $id, $label ,array( $this,'metabox' ), $post_type ,'side','core', array( 'taxonomy'=>$this->taxonomy ) );\r\n\t\tendforeach;\r\n\t}", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }", "function add_meta_boxes() {\n\t\tif( function_exists( 'add_meta_box' ) ) {\n\t\t\tadd_meta_box( 'unit-info', __('Unit Information'), array( $this, '_display_unitinfo_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'maps', __('Maps'), array( $this, '_display_maps_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'gallery', __('Gallery'), array( $this, '_display_gallery_meta'), 'units', 'normal', 'low');\n\t\t\tadd_meta_box( 'unit-status', __('Availability'), array( $this, '_display_status_meta'), 'units', 'side', 'high');\n\t\t}\n\t}", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "function carrousel_metaboxes(){\n add_meta_box(\"MonCarrousel\", \"lien\", \"carrousel_metabox\");\n}", "public function add_meta_boxes() {\n\t\t\t// Address\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_address', \n\t\t\t\t'Adresse',\n\t\t\t\tarray( $this, 'meta_box_address' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Location\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_location', \n\t\t\t\t'Location',\n\t\t\t\tarray( $this, 'meta_box_location' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Geodata\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_geodata', \n\t\t\t\t'Geodaten',\n\t\t\t\tarray( $this, 'meta_box_geodata' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Date\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_dates', \n\t\t\t\t'Datum und Zeit der Meetups',\n\t\t\t\tarray( $this, 'meta_box_date' ),\n\t\t\t\t'wpmeetups', 'advanced', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Gallery\n\t\t\tadd_meta_box(\n\t\t\t\t'meetup_gallery',\n\t\t\t\t'Gallerie',\n\t\t\t\tarray( $this, 'meta_box_gallery' ),\n\t\t\t\t'wpmeetups', 'advanced', 'default'\n\t\t\t);\n\t\t}", "public static function registerMetaBoxes() {}", "function idem_pop_up_inner_add_meta_box()\n{\n add_meta_box(\n 'idem-pop-up-inner-meta-box', // id, used as the html id att\n __( 'Idem Pop Up Inner Meta Box' ), // meta box title, like \"Page Attributes\"\n 'idem_pop_up_inner_meta_box_cb', // callback function, spits out the content\n 'idem_pop_up', // post type or page. We'll add this to pages only\n 'side', // context (where on the screen)\n 'low' // priority, where should this go in the context?\n );\n}", "function careers_metabox() {\n\t\t\tforeach (careers_fields() as $key => $value) {\n\t\t\t\t$id = 'careers_'.$value['slug'];\n\t\t\t\t$title = __( $value['name'], 'careers_textdomain' );\n\t\t\t\tadd_meta_box($id, $title, 'careers_callback', 'Careers', 'normal', 'low',$value);\n\t\t\t}\n\t\t}", "private function add_meta_boxes() {\n\t\t$post_types = $this->post->get_types();\n\n\t\tforeach ( $post_types as $post_type => $value ) {\n\t\t\tadd_meta_box( 'subway_comment_metabox',\n\t\t\t\tesc_html__( 'Memberships Discussion', 'subway' ),\n\t\t\t\tfunction ( $post ) {\n\t\t\t\t\t$this->discussion( $post );\n\t\t\t\t},\n\t\t\t\t$post_type, 'side', 'high'\n\t\t\t);\n\t\t\tadd_meta_box( 'subway_visibility_metabox',\n\t\t\t\tesc_html__( 'Memberships Access', 'subway' ),\n\t\t\t\tfunction ( $post ) {\n\t\t\t\t\t$this->visibility( $post );\n\t\t\t\t},\n\t\t\t\t$post_type, 'side', 'high'\n\t\t\t);\n\t\t}\n\n\t}", "function new_meta_boxes() {\n\tglobal $post, $new_meta_boxes;\n\n\tforeach($new_meta_boxes as $meta_box) {\n\t\tprint_meta_box($meta_box, $post);\n\t}\n}", "public static function create_meta_box() {\n\t\t$content_types_array = self::_get_active_content_types();\n\t\tforeach ( $content_types_array as $content_type ) {\n\t\t\tadd_meta_box( 'custom-content-type-mgr-custom-fields'\n\t\t\t\t, __('Custom Fields', CCTM::txtdomain )\n\t\t\t\t, 'StandardizedCustomFields::print_custom_fields'\n\t\t\t\t, $content_type\n\t\t\t\t, 'normal'\n\t\t\t\t, 'high'\n\t\t\t\t, $content_type \n\t\t\t);\n\t\t}\n\t}", "function create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' POST SETTINGS', 'new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "public function add_meta_boxes() {\n add_meta_box( 'wc-product-label-gallery', __( 'Label gallery', 'wc-label-gallery' ), array( $this, 'gallery_output' ), 'product', 'side', 'low' );\n }", "public function add_metabox() {\r\n\t\tadd_meta_box(\r\n\t\t\t'stats', // ID\r\n\t\t\t'Stats', // Title\r\n\t\t\tarray(\r\n\t\t\t\t$this,\r\n\t\t\t\t'meta_box', // Callback to method to display HTML\r\n\t\t\t),\r\n\t\t\t'spam-stats', // Post type\r\n\t\t\t'normal', // Context, choose between 'normal', 'advanced', or 'side'\r\n\t\t\t'core' // Position, choose between 'high', 'core', 'default' or 'low'\r\n\t\t);\r\n\t}", "static function metabox_at_post_edit_page(){\n\t\t \tadd_meta_box('matebox-to-handle-keywords', 'Affiliate Keywords', array(get_class(), 'metabox_to_deal_keywords'), 'product', 'advanced', 'high');\t \t\n\t\t }", "function testimonials_meta_boxes() {\n\tadd_meta_box( 'testimonials_form', 'testimonials', 'normal', 'high' );\n}", "function add_meta_box() {\t\t\n\t\t\t/* Gets available public post types. */\n\t\t\t$post_types = get_post_types( array( 'public' => true ), 'objects' );\n\t\t\t\n\t\t\t$post_types = apply_filters( 'remove_youtube_white_label_meta_box', $post_types );\n\t\t\t\n\t\t\t/* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */\n\t\t\tforeach ( $post_types as $type ) {\n\t\t\t\t/* Add the meta box. */\n\t\t\t\tadd_meta_box( self::DOMAIN . \"-{$type->name}-meta-box\", __( 'YouTube Embed Shortcode Creator (does not save meta)', self::DOMAIN ), array( $this, 'meta_box' ), $type->name, 'side', 'default' );\n\t\t\t}\n\t\t}", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "public function add_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t$this->plugin_slug . '-post-metabox',\n\t\t\tesc_html__( 'Review Settings', $this->plugin_slug ),\n\t\t\tarray( $this, 'review_settings_view' ),\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'core'\n \t \t);\n\t}", "function register_metaboxes() {\n\n\t\t$this->metaboxes = array(\n\t\t\t'example-metabox' => array(\n\t\t\t\t'title' => 'Example Post Type Metabox',\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'description',\n\t\t\t\t\t'date'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tparent::register_metaboxes();\n\n\t}", "public static function add_meta_boxes() {\n\t\tadd_meta_box( 'replycontextdiv', __( 'Use post to reply to other articles?', 'reply_context' ), array( 'ReplyContextPlugin', 'reply_context_meta_box' ) );\n\t}", "function cinerama_edge_meta_box_add() {\n\t\tglobal $cinerama_edge_global_Framework;\n\n\t\tforeach ( $cinerama_edge_global_Framework->edgtMetaBoxes->metaBoxes as $key => $box ) {\n\t\t\t$hidden = false;\n\t\t\tif ( ! empty( $box->hidden_property ) ) {\n\t\t\t\tforeach ( $box->hidden_values as $value ) {\n\t\t\t\t\tif ( cinerama_edge_option_get_value( $box->hidden_property ) == $value ) {\n\t\t\t\t\t\t$hidden = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( is_string( $box->scope ) ) {\n\t\t\t\t$box->scope = array( $box->scope );\n\t\t\t}\n\n\t\t\tif ( is_array( $box->scope ) && count( $box->scope ) ) {\n\t\t\t\tforeach ( $box->scope as $screen ) {\n\t\t\t\t\tcinerama_edge_create_meta_box_handler( $box, $key, $screen );\n\n\t\t\t\t\tif ( $hidden ) {\n\t\t\t\t\t\tadd_filter( 'postbox_classes_' . $screen . '_edgtf-meta-box-' . $key, 'cinerama_edge_meta_box_add_hidden_class' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tadd_action( 'admin_enqueue_scripts', 'cinerama_edge_enqueue_meta_box_styles' );\n\t\tadd_action( 'admin_enqueue_scripts', 'cinerama_edge_enqueue_meta_box_scripts' );\n\t}", "function add_meta_box() {\n\t\t \tadd_meta_box( 'woocommerce-product-addons', __('Product Add-ons', 'wc_product_addons'), array(&$this, 'meta_box'), 'product', 'side', 'default' );\n\t\t }", "function add_meta_boxes($post_type, $post)\n {\n }", "function alpha_meta_box_add()\n{\n add_meta_box('alpha-beer-list', 'Beer List Properties', 'alpha_beer_list', 'ptf_bars', 'side', 'low');\n}", "function master_sidebar_post_type_meta_boxes() {\n\t\n\t$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' );\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tif ( ! $post_types ) {\n\t\treturn;\n\t}\n\n\t// Add metabox for each posttype\n\tforeach ( $post_types as $post_type ) {\n\t\t$post_type = apply_filters( 'master_sidebar_meta_box_object', $post_type );\n\t\tif ( $post_type ) {\n\t\t\t$id = $post_type->name;\n\t\t\tadd_meta_box( \n\t\t\t\t\"master-add-{$id}\", \n\t\t\t\t$post_type->labels->name, \n\t\t\t\t'master_sidebar_item_post_type_meta_box', \n\t\t\t\t$admin_page_name, \n\t\t\t\t'side', \n\t\t\t\t'default', \n\t\t\t\t$post_type \n\t\t\t);\n\t\t}\n\t}\n}", "public function kiwip_add_meta_box(){\t\t\t\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->title,\n\t\t\tarray(&$this, 'kiwip_metabox_callback'),\n\t\t\t$this->cpt_name,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\t}", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "function ir_register_post_metabox() {\n\tglobal $post;\n\t$related_food_id = 0;\n\tif ( isset( $_GET['post'] ) ) {\n\t\t$related_food_id = get_post_meta( $_GET['post'], 'ir_related_food', true );\n\t}\n\t$prefix = 'ir_';\n\t/**\n\t * Sample metabox to demonstrate each field type included\n\t */\n\t$cmb_post = new_cmb2_box( array(\n\t\t'id' => $prefix . 'post_metabox',\n\t\t'title' => esc_html__( 'Material data', 'cmb2' ),\n\t\t'object_types' => array( 'post' ),\n\t) );\n\t// Add new field\n\t$cmb_post->add_field( array(\n\t\t'name' => __( 'Liittyvä raaka-aine', 'cmb2' ),\n\t\t'id' => $prefix . 'related_food',\n\t\t'desc' => __( 'Klikkaa hakuikonia tai syötä kenttään suoraan raaka-aineen id', 'cmb2' ),\n\t\t'type' => 'post_search_text', // This field type\n\t\t// post type also as array\n\t\t'post_type' => 'food',\n\t\t// Default is 'checkbox', used in the modal view to select the post type\n\t\t'select_type' => 'radio',\n\t\t// Will replace any selection with selection from modal. Default is 'add'\n\t\t'select_behavior' => 'replace',\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Näytettävät ravintoarvot?',\n\t\t'type' => 'title',\n\t\t'id' => $prefix . 'nutrients_title',\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Perusravintoaineet',\n\t\t'id' => $prefix . 'perusravintoaineet',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'energy' => __( 'Energia, laskennallinen', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_energy' ),\n\t\t\t$prefix . 'hiilihydraatti' => __( 'Hiilihydraatti', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_hiilihydraatti' ),\n\t\t\t$prefix . 'proteiini' => __( 'Proteiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_proteiini' ),\n\t\t\t$prefix . 'rasva' => __( 'Rasva', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_rasva' ),\n\t\t),\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Hiilihydraattifraktiot',\n\t\t'id' => $prefix . 'hiilihydraattifraktiot',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'sokeri' => __( 'Kuitu', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_sokeri' ),\n\t\t\t$prefix . 'kuitu' => __( 'Sokerit', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_kuitu' ),\n\t\t),\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Vitamiinit',\n\t\t'id' => $prefix . 'vitamiinit',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'folaatti' => __( 'Folaatti', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_folaatti' ),\n\t\t\t$prefix . 'niasiiniekvivalentti' => __( 'Niasiiniekvivalentti NE', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_niasiiniekvivalentti' ),\n\t\t\t$prefix . 'niasiini' => __( 'Niasiini (nikotiinihappo + nikotiiniamidi)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_niasiini' ),\n\t\t\t$prefix . 'b6' => __( 'Pyridoksiini vitameerit (vetykloridi) (B6)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b6' ),\n\t\t\t$prefix . 'b2' => __( 'Riboflaviini (B2)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b2' ),\n\t\t\t$prefix . 'b1' => __( 'Tiamiini (B1)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b1' ),\n\t\t\t$prefix . 'b12' => __( 'B12-vitamiini (kobalamiini)', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_b12' ),\n\t\t\t$prefix . 'C' => __( 'C-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_C' ),\n\t\t\t$prefix . 'A_RAE' => __( 'A-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_A_RAE' ),\n\t\t\t$prefix . 'karotenoidit' => __( 'Karotenoidit', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_karotenoidit' ),\n\t\t\t$prefix . 'D' => __( 'D-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_D' ),\n\t\t\t$prefix . 'E' => __( 'E-vitamiini alfatokoferoli', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_E' ),\n\t\t\t$prefix . 'K' => __( 'K-vitamiini', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_K' ),\n\t\t),\n\t\t'display_cb' => 'yourprefix_display_text_small_column', // Output the display of the column values through a callback.\n\t) );\n\t$cmb_post->add_field( array(\n\t\t'name' => 'Kivennäis- ja hivenaineet',\n\t\t'id' => $prefix . 'kivennaisaineet',\n\t\t'type' => 'multicheck',\n\t\t'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä',\n\t\t'options' => array(\n\t\t\t$prefix . 'kalsium' => __( 'Kalsium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_kalsium' ),\n\t\t\t$prefix . 'rauta' => __( 'Rauta', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_rauta' ),\n\t\t\t$prefix . 'jodidi' => __( 'Jodidi', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_jodidi' ),\n\t\t\t$prefix . 'kalium' => __( 'Kalium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_kalium' ),\n\t\t\t$prefix . 'magnesium' => __( 'Magnesium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_magnesium' ),\n\t\t\t$prefix . 'natrium' => __( 'Natrium', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_natrium' ),\n\t\t\t$prefix . 'suola' => __( 'Suola', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_suola' ),\n\t\t\t$prefix . 'fosfori' => __( 'Fosfori', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_fosfori' ),\n\t\t\t$prefix . 'seleeni' => __( 'Seleeni', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_seleeni' ),\n\t\t\t$prefix . 'sinkki' => __( 'Sinkki', 'cmb2' ) . \\App\\get_value_and_unit( $related_food_id, 'ir_sinkki' ),\n\t\t),\n\t) );\n}", "function wpb_add_custom_meta_boxes() {\n\tglobal $post;\n\tif ('134' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n\n\tif ('136' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n\n\tif ('138' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n}", "function mixtape_qodef_woocommerce_add_meta_box() {\n\t\t$meta_box = mixtape_qodef_add_meta_box(array(\n\t\t\t'scope' => 'product',\n\t\t\t'title' => esc_html__('Product Masonry Settings','mixtapewp'),\n\t\t\t'name' => 'product-settings-meta-box'\n\t\t));\n\n\t\tmixtape_qodef_add_meta_box_field(array(\n\t\t\t'name' => 'shop_masonry_dimensions',\n\t\t\t'type' => 'select',\n\t\t\t'label' => esc_html__('Dimensions for Masonry','mixtapewp'),\n\t\t\t'description' => esc_html__('Choose image dimensions for Masonry Shop list','mixtapewp'),\n\t\t\t'parent' => $meta_box,\n\t\t\t'options' => array(\n\t\t\t\t'default' => esc_html__('Default','mixtapewp'),\n\t\t\t\t'large_width' => esc_html__('Large width','mixtapewp'),\n\t\t\t\t'large_height' => esc_html__('Large height','mixtapewp'),\n\t\t\t\t'large_width_height' => esc_html__('Large width/height','mixtapewp')\n\t\t\t)\n\t\t));\n\t}", "function create_meta_box() {\n\n\tglobal $postmetas;\n\t\n\tif(!isset($_GET['post_type']) OR empty($_GET['post_type']))\n\t{\n\t\tif(isset($_GET['post']) && !empty($_GET['post']))\n\t\t{\n\t\t\t$post_obj = get_post($_GET['post']);\n\t\t\t$_GET['post_type'] = $post_obj->post_type;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_GET['post_type'] = 'post';\n\t\t}\n\t}\n\t\n\tif ( function_exists('add_meta_box') && isset($postmetas) && count($postmetas) > 0 ) { \n\t\tforeach($postmetas as $key => $postmeta)\n\t\t{\n\t\t\tif($_GET['post_type']==$key)\n\t\t\t{\n\t\t\t\tadd_meta_box( 'metabox', ucfirst($key).' Options', 'new_meta_box', $key, 'side', 'high' ); \n\t\t\t}\n\t\t}\n\t}\n\n}", "public function register_meta_boxes()\n {\n }", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "public function add_meta_boxes() {\n\t\t// Create the Slide Meta Boxes\n\t\tadd_meta_box( 'justart-slider-slide-settings-group', 'Slides', array( $this, 'create_slide_settings_meta_box' ), 'justart-slider', 'normal', 'default' );\n\t\tadd_filter( 'postbox_classes_justart-slider-slide-settings-group', array( $this, 'add_metabox_classes' ) );\n\t\t\n\t\t// Create the Shortcode Meta Box\n\t\tadd_meta_box( 'justart-slider-shortcode-group', 'Shortcode', array( $this, 'create_shortcode_meta_box' ), 'justart-slider', 'side', 'high' );\n\t\t\n\t\t// Create the Global Settings Meta Box\n\t\tadd_meta_box( 'justart-slider-global-settings-group', 'Global settings', array( $this, 'create_global_settings_meta_box' ), 'justart-slider', 'side', 'default' );\n\t}", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "function master_sidebar_taxonomy_meta_boxes() {\n\n\t$taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'object' );\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tif ( ! $taxonomies ) {\n\t\treturn;\n\t}\n\n\tforeach ( $taxonomies as $tax ) {\n\t\t$tax = apply_filters( 'master_sidebar_meta_box_object', $tax );\n\t\tif ( $tax ) {\n\t\t\t$id = $tax->name;\n\t\t\tadd_meta_box( \n\t\t\t\t\"master-add-{$id}\", \n\t\t\t\t$tax->labels->name, \n\t\t\t\t'master_sidebar_item_taxonomy_meta_box', \n\t\t\t\t$admin_page_name, \n\t\t\t\t'side', \n\t\t\t\t'default', \n\t\t\t\t$tax \n\t\t\t);\t\t\t\n\t\t}\n\t}\n}", "function pafd_action_add_metaboxes() {\n\n\tglobal $pafd_textdomain;\n\n\t// Add the file metabox\n\tadd_meta_box(\n\t\t'customdiv-pafd-file'\n\t\t, __( 'File', $pafd_textdomain )\n\t\t, 'pafd_metabox_file_cb'\n\t\t, 'pa_file'\n\t\t, 'normal'\n\t\t, 'core'\n\t);\n\n\t// Add the file status metabox\n\tadd_meta_box(\n\t\t'customdiv-pafd-status'\n\t\t, __( 'File Status', $pafd_textdomain )\n\t\t, 'pafd_metabox_status_cb'\n\t\t, 'pa_file'\n\t\t, 'side'\n\t\t, 'core'\n\t);\n}", "function create_meta_box() {\r\r\n global $key;\r\r\n\r\r\n if( function_exists( 'add_meta_box' ) ) {\r\r\n add_meta_box( 'new-page-boxes', ' Page Options', 'page_meta_boxes', 'page', 'normal', 'high' );\r\r\n add_meta_box( 'new-portfolio-boxes', ' Portfolio Options', 'portfolio_meta_boxes', 'portfolio', 'normal', 'high' );\r\r\n add_meta_box( 'new-slideshow-boxes', ' Slideshow Options', 'slideshow_meta_boxes', 'slideshow', 'normal', 'high' );\r\r\n add_meta_box( 'new-post-boxes', ' Post Options', 'post_meta_boxes', 'post', 'normal', 'high' );\r\r\n }\r\r\n}", "public function add_meta_boxes() {\n\t\tglobal $current_screen;\n\n\t\t$page_main = $this->_admin_pages[ 'vfb-pro' ];\n\n\t\tif ( $current_screen->id == $page_main && isset( $_REQUEST['form'] ) ) {\n\t\t\tadd_meta_box( 'vfb_form_switcher', __( 'Quick Switch', 'visual-form-builder-pro' ), array( &$this, 'meta_box_switch_form' ), $page_main, 'side', 'high' );\n\t\t\tadd_meta_box( 'vfb_form_items_meta_box', __( 'Form Items', 'visual-form-builder-pro' ), array( &$this, 'meta_box_form_items' ), $page_main, 'side', 'high' );\n\t\t\tadd_meta_box( 'vfb_form_media_button_tip', __( 'Display Forms', 'visual-form-builder-pro' ), array( &$this, 'meta_box_display_forms' ), $page_main, 'side', 'low' );\n\t\t}\n\t}", "public function admin_init()\n \t{\t\t\t\n \t\t// Add metaboxes\n \t\t//add_action('add_meta_boxes', array(&$this, 'add_meta_boxes'));\n \t}", "function meta_boxes() {\n\t\tadd_meta_box( 'event-details', 'Event Details', array( $this , 'details_box' ), 'event', 'normal', 'high' );\n\t}", "public function add_meta_box(){\n\t\t\n\t\t/**\n\t\t * Includes our array of post types\n\t\t */\n\t\tinclude( 'q-and-a-post-types.php' );\n\t\t\n\t\tforeach ( $q_and_a_post_types as $post_type ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'q-and-a',\n\t\t\t\t'Questions and Answers',\n\t\t\t\tarray( $this, 'display_meta_box' ),\n\t\t\t\t$post_type, \n\t\t\t\t'normal',\n\t\t\t\t'default'\n\t\t\t);\n\t\t}\n\t}", "function add_your_fields_meta_box(){\r\nadd_meta_box(\r\n'your_fields_meta_box',// $id\r\n'Auteur',// $title\r\n'show_your_fields_meta_box',// $callback\r\n'Livre',// $screen\r\n'normal',// $context\r\n'high'// $priority\r\n);\r\n}", "public function add_meta_box ( $id = '', $title = '', $post_types = array(), $context = 'advanced', $priority = 'default', $callback_args = null ) {\n\n // Get post type(s)\n if ( ! is_array( $post_types ) ) {\n $post_types = array( $post_types );\n }\n\n // Generate each metabox\n foreach ( $post_types as $post_type ) {\n add_meta_box( $id, $title, array( $this, 'meta_box_content' ), $post_type, $context, $priority, $callback_args );\n }\n }", "function country_meta_boxes() {\n\t\t//add_meta_box( 'countries_meta', __( 'Quick link - All Countries', 'countries' ), array( $this, 'render_countries_meta' ), 'countries', 'side', 'low' );\n\t\tadd_meta_box( 'countrycode_meta', __( 'Country', 'countries' ), array( $this, 'render_countrycode_meta' ), 'countries', 'normal', 'low' );\n\t\t}", "function wp_nav_menu_taxonomy_meta_boxes()\n {\n }", "public function add_metabox() {\n add_meta_box(\n 'customer_info',\n __( 'Customer Info', 'textdomain' ),\n array( $this, 'render_metabox' ),\n 'customer',\n 'advanced',\n 'default'\n );\n\n }", "function clix_uppe_add_meta_box() {\r\n\tif( function_exists('add_meta_box') ) {\r\n\t\tadd_meta_box( 'clix_uppe_meta_box', 'Clix Category Exclusion', 'clix_uppe_meta_box', post, 'side' );\r\n \t}\r\n}", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "public function add_metaboxes() {\n\t\tadd_meta_box(\n\t\t\t'pblw-requirements',\n\t\t\t__( 'Requirements', 'pblw_reqs' ),\n\t\t\tarray( $this, 'render_metabox' ),\n\t\t\t'download',\n\t\t\t'normal',\n\t\t\t'core'\n\t\t);\n\t}", "public function add_metaboxes() {\n\t\tadd_meta_box(\n\t\t\t'codes',\n\t\t\t__( 'Codes' ),\n\t\t\tarray( $this, 'render_codes_metabox' )\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'edit-codes',\n\t\t\t__( 'Edit codes' ),\n\t\t\tarray( $this, 'render_edit_metabox' )\n\t\t);\n\t}", "function wp_nav_menu_post_type_meta_boxes()\n {\n }", "Function Wp_meta_box_store(){\n\n\t$mult_posts = array( 'post', 'page' );\n\n\tforeach ($mult_posts as $mult_post) {\n\t\tadd_meta_box(\n\t\t\t'meta_box_id', \t\t\t\t\t# metabox id\n\t\t\t__('Author Bio', 'textdomain'),\t# Title \n\t\t\t'wp_meta_box_call_back_func_store', \t# Callback Function \n\t\t\t$mult_post, \t\t\t\t\t# Post Type\n\t\t\t'normal'\t\t\t\t\t\t# textcontent\n\t\t);\n\t}\n\t\n}", "function caviar_add_meta_box() {\n\n\t$screens = array('page' );\n\n\tforeach ( $screens as $screen ) {\n\n\t\tadd_meta_box(\n\t\t\t'caviar_sectionid',\n\t\t\tesc_html__( 'Caviar Metabox Field Example', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box_callback',\n\t\t\t$screen\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'caviar_2',\n\t\t\tesc_html__( 'Caviar Metabox 2', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box2_callback',\n\t\t\t$screen\n\t\t);\n\t}\n}", "function register_and_do_post_meta_boxes($post)\n {\n }", "function edd_incentives_add_meta_boxes() {\n add_meta_box( 'edd-incentive-preview', __( 'Preview', 'edd-incentives' ), 'edd_incentives_render_preview', 'incentive', 'side', 'default' );\n add_meta_box( 'edd-incentive-options', __( 'Options', 'edd-incentives' ), 'edd_incentives_render_options', 'incentive', 'side', 'default' );\n add_meta_box( 'edd-incentive-exit-options', __( 'Exit Button', 'edd-incentives' ), 'edd_incentives_render_exit_options', 'incentive', 'side', 'default' );\n add_meta_box( 'edd-incentive-conditions', __( 'Conditions For Display', 'edd-incentives' ), 'edd_incentives_render_conditions', 'incentive', 'normal', 'default' );\n\n // Render the pseudo-metabox for the template tags\n add_action( 'edit_form_after_title', 'edd_incentives_render_template_tags' );\n}", "function add_metabox() {\n\tadd_meta_box(\n\t\t'external-connection-groups',\n\t\t__( 'External Connection Groups', 'distributor' ),\n\t\t__NAMESPACE__ . '\\render_metabox',\n\t\t\\Distributor\\Waves\\get_distributable_custom_post_types(),\n\t\t'side',\n\t\t'high'\n\t);\n\n}", "function add_meta_box() {\n global $post;\n\n $post_types = get_post_types( array( 'public' => true ) );\n\n if ( !empty( $post ) ) {\n if ( $this->check_user_analytics_exist( $post ) ) {\n foreach ( $post_types as $post_type ) {\n add_meta_box( 'show_user_analytics', __( 'Post Author Analytics Info', 'wpuf-pro' ), array( $this, 'render_meta_box_content' ), $post_type, 'advanced', 'high' );\n }\n }\n }\n }", "public function meta_box_form_items() {\n include_once (SWPM_FORM_BUILDER_PATH . 'views/button_palette_metabox.php');\n }", "function mobile_kiosk_add_post_meta_boxes() {\n\t\n\t// Gallery Options\n\tadd_meta_box(\n\t\t'gallery-options',\n\t\tesc_html__( 'Gallery Options', 'gallery-options' ),\n\t\t'mobile_kiosk_gallery_options_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'high' \n\t);\n\t\n\t// Gallery Slides\n\tadd_meta_box(\n\t\t'gallery-slides',\n\t\tesc_html__( 'Gallery Slides', 'gallery-slides' ),\n\t\t'mobile_kiosk_gallery_slides_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'low' \n\t);\n\t\n}", "function the_block_editor_meta_boxes()\n {\n }", "function sp_add_custom_box() {\n\tif( function_exists( 'add_meta_box' )) {\n\t\tadd_meta_box( 'sp_custom_box_1', __( 'General Property Info', 'sp' ), 'sp_inner_custom_box_1', 'post', 'normal', 'high' );\n\t\tadd_meta_box( 'sp_custom_box_2', __( 'Property Details', 'sp' ), 'sp_inner_custom_box_2', 'post', 'normal', 'high' );\n\t\tadd_meta_box( 'sp_custom_box_3', __( 'Property Photos', 'sp' ), 'sp_inner_custom_box_3', 'post', 'normal', 'high' );\n\t}\n}", "function team_products_metaboxes() {\n add_meta_box(\n 'team_products',\n 'Choose Products',\n 'team_products_list_html',\n 'team',\n 'normal',\n 'default'\n );\n}", "function ogp_extras() {\n global $meal;\n\n foreach( $meal->ingredients as $ingredient ) { ?>\n <meta property=\"<?php echo Facebook_Sample_Application::APP_NS; ?>:ingredient\" content=\"<?php echo htmlspecialchars( $ingredient ) ?>\">\n<?php\n }\n}", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Translation',\n\t\t\t'Translation',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'meta_box',\n\t\t\t),\n\t\t\t'words',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}" ]
[ "0.8012924", "0.73003554", "0.69341725", "0.6897233", "0.67220974", "0.6699729", "0.66571623", "0.66248643", "0.6582401", "0.65697", "0.65688664", "0.6524824", "0.65148175", "0.6501964", "0.64659", "0.6447188", "0.6432879", "0.6425887", "0.6424033", "0.64047134", "0.639571", "0.63524085", "0.6342961", "0.6300934", "0.62930876", "0.62883896", "0.62882024", "0.6286164", "0.62715864", "0.62662405", "0.6261948", "0.62609786", "0.62582934", "0.6252131", "0.6251761", "0.6250164", "0.6244769", "0.62431604", "0.6233382", "0.6225363", "0.62248397", "0.62198925", "0.6217079", "0.6216669", "0.6210476", "0.620564", "0.6205524", "0.6204762", "0.6196242", "0.6187898", "0.61669934", "0.6166591", "0.61657655", "0.61643636", "0.61596805", "0.61538476", "0.6144473", "0.61417913", "0.61249423", "0.611102", "0.6109784", "0.61009675", "0.60970193", "0.6096609", "0.60964835", "0.60740113", "0.6070741", "0.6070552", "0.60698223", "0.60694504", "0.6061224", "0.6058186", "0.60539013", "0.60535765", "0.60503805", "0.6046685", "0.60329646", "0.60326767", "0.60201627", "0.59904486", "0.5989825", "0.5989686", "0.5984729", "0.5977501", "0.59735054", "0.5973405", "0.5965029", "0.59543556", "0.5954063", "0.5940087", "0.5934959", "0.5931367", "0.59216875", "0.59215164", "0.5920866", "0.5919213", "0.5910488", "0.5910322", "0.59096104", "0.5896857" ]
0.6369206
21
Manually render a field column display.
function yourprefix_display_text_small_column( $field_args, $field ) { ?> <div class="custom-column-display <?php echo $field->row_classes(); ?>"> <p><?php echo $field->escaped_value(); ?></p> <p class="description"><?php echo $field->args( 'description' ); ?></p> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fieldDisplay(): FieldDisplay;", "function column_display( $column ) {\n\t\tglobal $post;\n\t\tswitch ( $column ) {\n\t\tcase 'client_name':\n\t\t\tif ( get_post_meta( $post->ID, 'client_name', true ) )\n\t\t\t\techo get_post_meta( $post->ID, 'client_name', true );\n\t\t\tbreak;\n\t\tcase 'description':\n\t\t\techo the_excerpt();\n\t\t\tbreak;\n\t\tcase 'media':\n\t\tif ( has_post_thumbnail( $post->ID ) ){ echo get_the_post_thumbnail( $post->ID, array(80,80) ); }\n\t\t\tbreak;\n\t\tcase $this->taxID:\n\t\t\techo get_the_term_list( $post->ID, $this->taxID, '', ', ', '' );\n\t\t\tbreak;\n\t\t}\n\t}", "function postasevent_display_text_small_column( $field_args, $field ) {\n\t?>\n\t<div class=\"custom-column-display <?php echo $field->row_classes(); ?>\">\n\t\t<p><?php echo $field->escaped_value(); ?></p>\n\t\t<p class=\"description\"><?php echo $field->args( 'description' ); ?></p>\n\t</div>\n\t<?php\n}", "public function RenderField($fkey, $fvalue)\r\n\t\t{\r\n\t\t\t$field = $this->fieldsArray[$fkey];\r\n\r\n\t\t\tif($fkey != 'ROW_PROPERTIES' || get_class($field) == 'Field')\r\n\t\t\t{\r\n\t\t\t\tif(!$field->hidden && !$fvalue->hidden /*Column*/ )\r\n\t\t\t\t{\r\n\t\t\t\t\tswitch($fvalue->type)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 'text':\r\n\r\n\t\t\t\t\t\t\t$result .= \"<div \".$this->SetFieldsCss($fvalue, $fkey).\" style='\".$this->SetFieldsWidth($fvalue->width, $fkey, false).\"'>\".$fvalue->value.\"</div>\"; // $this->SetStyleAttribute(\"display\", \"inline\", 2)\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase 'object':\r\n\r\n\t\t\t\t\t\t\t$obj = $fvalue->value;\r\n\t\t\t\t\t\t\t$result .= \"<div \".$this->SetFieldsCss($fvalue, $fkey).\" style='\".$this->SetFieldsWidth($fvalue->width, $fkey, false).\"'>\".$obj->OpenTag().$obj->CloseTag().\"</div>\"; //$this->SetStyleAttribute(\"display\", \"inline\", 2)\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $result;\r\n\t\t}", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "function render_field($field)\n {\n }", "public function render_admin_table_column($column_name, $field_group)\n {\n }", "public function grid_display_field($data = array()) {\n\n\t\t$this->_include_theme_js('display_field_grid.js');\n\n\t\t$this->settings['field_id'] = $this->settings['grid_field_id'];\n\n\t\treturn $this->display_field($data);\n\t}", "function acf_render_field($field)\n{\n}", "public function display($field)\n {\n\t\treturn $field->value; \n }", "public function grid_display_field($data)\n {\n $toolsetId = (isset($this->settings['toolset_id'])) ? (int) $this->settings['toolset_id'] : (!empty(ee()->config->item('rte_default_toolset')) ? (int) ee()->config->item('rte_default_toolset') : null);\n if (!empty($toolsetId)) {\n $toolset = ee('Model')->get('rte:Toolset')->filter('toolset_id', $toolsetId)->first();\n } else {\n $toolset = ee('Model')->get('rte:Toolset')->first();\n }\n\n // Load proper toolset\n $serviceName = ucfirst($toolset->toolset_type) . 'Service';\n $configHandle = ee('rte:' . $serviceName)->init($this->settings, $toolset);\n\n // get the cache\n if (! isset(ee()->session->cache['rte'])) {\n ee()->session->cache['rte'] = array();\n }\n $cache = & ee()->session->cache['rte'];\n\n if (! isset($cache['displayed_grid_cols'])) {\n $cache['displayed_grid_cols'] = array();\n }\n\n if (! isset($cache['displayed_grid_cols'][$this->settings['col_id']])) {\n $defer = (isset($this->settings['defer']) && $this->settings['defer'] == 'y') ? 'true' : 'false';\n\n ee()->javascript->output('Rte.gridColConfigs.col_id_' . $this->settings['col_id'] . ' = [\"' . $configHandle . '\", ' . $defer . '];');\n\n $cache['displayed_grid_cols'][$this->settings['col_id']] = true;\n }\n\n // convert file tags to URLs\n RteHelper::replaceFileTags($data);\n\n // convert asset tags to URLs\n RteHelper::replaceExtraTags($data);\n\n // convert site page tags to URLs\n RteHelper::replacePageTags($data);\n\n if (ee()->extensions->active_hook('rte_before_display')) {\n $data = ee()->extensions->call('rte_before_display', $this, $data);\n }\n\n ee()->load->helper('form');\n\n $field = array(\n 'name' => $this->field_name,\n 'value' => $data,\n 'rows' => 10,\n 'data-config' => $configHandle\n );\n\n return form_textarea($field);\n }", "public function getDisplayField()\n {\n if ($this->_displayField === null) {\n $primary = (array)$this->getPrimaryKey();\n $this->_displayField = array_shift($primary);\n\n $schema = $this->getSchema();\n if ($schema->getColumn('title')) {\n $this->_displayField = 'title';\n }\n if ($schema->getColumn('name')) {\n $this->_displayField = 'name';\n }\n }\n\n return $this->_displayField;\n }", "function render_field() {\n return xFormTemplate::apply($this->template_field, $this->options);\n }", "private function showColumn()\n\t{\n\t\techo '<thead>\n\t\t\t<th></th>';\n\t\t\t\n\t\t\tforeach ($this->col_show as $col)\n\t\t\t\techo '<th>' . $col . '</th>';\n\t\t\n\t\techo '</thead>';\n\t}", "public function render_field( $field ) {\n\n\t\t\t$this->create_field( $field );\n\n\t\t}", "function edit_columns_html($column, $post_id){\n \n switch($column){\n \n // Name\n case 'name':\n \n echo '<code style=\"font-size: 12px;\">' . $this->get_name($post_id) . '</code>';\n break;\n \n // Field Groups\n case 'field_groups':\n \n $return = '—';\n \n $field_groups = acf_get_array(get_field('acfe_form_field_groups', $post_id));\n \n if(!empty($field_groups)){\n \n $links = array();\n \n foreach($field_groups as $key){\n \n $field_group = acf_get_field_group($key);\n \n if(!$field_group)\n continue;\n \n if(acf_maybe_get($field_group, 'ID')){\n \n $links[] = '<a href=\"' . admin_url(\"post.php?post={$field_group['ID']}&action=edit\") . '\">' . $field_group['title'] . '</a>';\n \n }else{\n \n $links[] = $field_group['title'];\n \n }\n \n }\n \n $return = implode(', ', $links);\n \n }\n \n echo $return;\n break;\n \n // Actions\n case 'actions':\n \n $return = '—';\n \n $icons = array();\n \n if(have_rows('acfe_form_actions', $post_id)):\n while(have_rows('acfe_form_actions', $post_id)): the_row();\n \n // Custom\n if(get_row_layout() === 'custom'){\n \n $action_name = get_sub_field('acfe_form_custom_action');\n \n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-editor-code\" title=\"Custom action: ' . $action_name . '\"></span>';\n \n }\n \n // E-mail\n elseif(get_row_layout() === 'email'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-email\" title=\"E-mail\"></span>';\n }\n \n // Post\n elseif(get_row_layout() === 'post'){\n \n $action = get_sub_field('acfe_form_post_action');\n \n // Insert\n if($action === 'insert_post'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-edit\" title=\"Create post\"></span>';\n }\n \n // Update\n elseif($action === 'update_post'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-update\" title=\"Update post\"></span>';\n }\n \n }\n \n // Term\n elseif(get_row_layout() === 'term'){\n \n $action = get_sub_field('acfe_form_term_action');\n \n // Insert\n if($action === 'insert_term'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-category\" title=\"Create term\"></span>';\n }\n \n // Update\n elseif($action === 'update_term'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-category\" title=\"Update term\"></span>';\n }\n \n }\n \n // User\n elseif(get_row_layout() === 'user'){\n \n $action = get_sub_field('acfe_form_user_action');\n \n // Insert\n if($action === 'insert_user'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-admin-users\" title=\"Create user\"></span>';\n }\n \n // Update\n elseif($action === 'update_user'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-admin-users\" title=\"Update user\"></span>';\n }\n \n // Update\n elseif($action === 'log_user'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-migrate\" title=\"Log user\"></span>';\n }\n \n }\n \n endwhile;\n endif;\n \n if(!empty($icons)){\n $return = implode('', $icons);\n }\n \n echo $return;\n break;\n \n // Shortcode\n case 'shortcode':\n \n echo '<code style=\"font-size: 12px;\">[acfe_form name=\"' . $this->get_name($post_id) . '\"]</code>';\n break;\n \n }\n \n }", "public function renderField()\n\t{\n\t\tif ($this->hasModel()) {\n\t\t\techo \\CHtml::activeFileField($this->model, $this->attribute, $this->options);\n\n\t\t} else {\n\t\t\techo \\CHtml::fileField($this->options['name'], $this->value, $this->options);\n\t\t}\n\t}", "function render_html($fval) \n {\n $methodname = '_field_' . $this->type;\n if (!method_exists($this, $methodname)) {\n $methodname = \"_field_text\";\n }\n $this->html = '<span class=\"formexField' . ucfirst($this->type) . '\">';\n $this->html .= $this->$methodname($fval);\n $this->html .= '</span>';\n }", "public function display_field($data)\n\t{\n\t\tif (!class_exists('Nsm_better_meta_ext') ) {\n\t\t\tinclude_once(PATH_THIRD.'nsm_better_meta/ext.nsm_better_meta.php');\n\t\t}\n\n\t\t$ext = new Nsm_better_meta_ext();\n\n\t\t$channel_id = (isset($this->settings[\"field_channel_id\"])) \n\t\t\t\t\t\t? $this->settings[\"field_channel_id\"] \n\t\t\t\t\t\t: $this->EE->input->get('channel_id');\n\n\t\t$ext->settings['channels'][$channel_id] = $ext->getChannelSettings($channel_id);\n\n $this->EE->load->library($this->field_type.\"_helper\");\n\n\t\t$entry_meta = (($entry_id = $this->EE->input->get('entry_id')) && empty($data))\n\t\t\t\t\t\t? $this->EE->db->from('nsm_better_meta')\n\t\t\t\t\t\t\t->where(array('entry_id' => $entry_id))\n\t\t\t\t\t\t\t->get()\n\t\t\t\t\t\t\t->result_array()\n\t\t\t\t\t\t: $data;\n\n\t\tif(! is_array($entry_meta) || empty($entry_meta))\n\t\t{\n \t\t\tforeach(array_keys(Nsm_better_meta_ext::$meta_table_fields) as $field)\n\t\t\t\t$entry_meta[0][$field] = FALSE;\n\t\t}\n\n\t\t$field_data = array(\n\t\t\t'show_nsm_better_meta' => (\n\t\t\t\tempty($ext->settings['channels'][$channel_id]['enabled_fields'])\n\t\t\t\t? false\n\t\t\t\t: true\n\t\t\t),\n\t\t\t\"input_prefix\" => $this->field_name,\n\t\t\t\"entry_meta\" => $entry_meta,\n\t\t\t\"ext_settings\" => $ext->settings,\n\t\t\t\"channel_id\" => $channel_id\n\t\t);\n\n\t\treturn $this->EE->load->view('fieldtype/field', $field_data, TRUE);\n\t}", "public function get_display_data($form_name, $column_header, $column_data, $rowid, $state) {\n\t\treturn $this->cell_formatter->format($form_name, $column_header, $column_data, $rowid, $state);\n\t}", "function render_field( $field ) {\n\t\t\n\t\t// vars\n\t\t$sub_fields = $field['sub_fields'];\n\t\t$show_order = true;\n\t\t$show_add = true;\n\t\t$show_remove = true;\n\t\t\n\t\t\n\t\t// bail early if no sub fields\n\t\tif( empty($sub_fields) ) return;\n\t\t\n\t\t\n\t\t// value\n\t\t$value = is_array($field['value']) ? $field['value'] : array();\n\t\t\n\t\t\n\t\t// div\n\t\t$div = array(\n\t\t\t'class' \t\t=> 'acf-repeater',\n\t\t\t'data-min' \t\t=> $field['min'],\n\t\t\t'data-max'\t\t=> $field['max']\n\t\t);\n\t\t\n\t\t\n\t\t// empty\n\t\tif( empty($value) ) {\n\t\t\t\n\t\t\t$div['class'] .= ' -empty';\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// If there are less values than min, populate the extra values\n\t\tif( $field['min'] ) {\n\t\t\t\n\t\t\t$value = array_pad($value, $field['min'], array());\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// If there are more values than man, remove some values\n\t\tif( $field['max'] ) {\n\t\t\t\n\t\t\t$value = array_slice($value, 0, $field['max']);\n\t\t\t\n\t\t\t\n\t\t\t// if max 1 row, don't show order\n\t\t\tif( $field['max'] == 1 ) {\n\t\t\t\n\t\t\t\t$show_order = false;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// if max == min, don't show add or remove buttons\n\t\t\tif( $field['max'] <= $field['min'] ) {\n\t\t\t\n\t\t\t\t$show_remove = false;\n\t\t\t\t$show_add = false;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// setup values for row clone\n\t\t$value['acfcloneindex'] = array();\n\t\t\n\t\t\n\t\t// button label\n\t\tif( $field['button_label'] === '' ) $field['button_label'] = __('Add Row', 'acf');\n\t\t\n\t\t\n\t\t// field wrap\n\t\t$el = 'td';\n\t\t$before_fields = '';\n\t\t$after_fields = '';\n\t\t\n\t\tif( $field['layout'] == 'row' ) {\n\t\t\n\t\t\t$el = 'div';\n\t\t\t$before_fields = '<td class=\"acf-fields -left\">';\n\t\t\t$after_fields = '</td>';\n\t\t\t\n\t\t} elseif( $field['layout'] == 'block' ) {\n\t\t\n\t\t\t$el = 'div';\n\t\t\t\n\t\t\t$before_fields = '<td class=\"acf-fields\">';\n\t\t\t$after_fields = '</td>';\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// layout\n\t\t$div['class'] .= ' -' . $field['layout'];\n\t\t\n\t\t\n\t\t// hidden input\n\t\tacf_hidden_input(array(\n\t\t\t'type'\t=> 'hidden',\n\t\t\t'name'\t=> $field['name'],\n\t\t));\n\t\t\n\t\t\n\t\t// collapsed\n\t\tif( $field['collapsed'] ) {\n\t\t\t\n\t\t\t// add target class\n\t\t\tforeach( $sub_fields as $i => $sub_field ) {\n\t\t\t\t\n\t\t\t\t// bail early if no match\n\t\t\t\tif( $sub_field['key'] !== $field['collapsed'] ) continue;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// class\n\t\t\t\t$sub_field['wrapper']['class'] .= ' -collapsed-target';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// update\n\t\t\t\t$sub_fields[ $i ] = $sub_field;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n?>\n<div <?php acf_esc_attr_e($div); ?>>\n<table class=\"acf-table\">\n\t\n\t<?php if( $field['layout'] == 'table' ): ?>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<?php if( $show_order ): ?>\n\t\t\t\t\t<th class=\"acf-row-handle\"></th>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t\n\t\t\t\t<?php foreach( $sub_fields as $sub_field ): \n\t\t\t\t\t\n\t\t\t\t\t// prepare field (allow sub fields to be removed)\n\t\t\t\t\t$sub_field = acf_prepare_field($sub_field);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// bail ealry if no field\n\t\t\t\t\tif( !$sub_field ) continue;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// vars\n\t\t\t\t\t$atts = array();\n\t\t\t\t\t$atts['class'] = 'acf-th';\n\t\t\t\t\t$atts['data-name'] = $sub_field['_name'];\n\t\t\t\t\t$atts['data-type'] = $sub_field['type'];\n\t\t\t\t\t$atts['data-key'] = $sub_field['key'];\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Add custom width\n\t\t\t\t\tif( $sub_field['wrapper']['width'] ) {\n\t\t\t\t\t\n\t\t\t\t\t\t$atts['data-width'] = $sub_field['wrapper']['width'];\n\t\t\t\t\t\t$atts['style'] = 'width: ' . $sub_field['wrapper']['width'] . '%;';\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<th <?php echo acf_esc_attr( $atts ); ?>>\n\t\t\t\t\t\t<?php echo acf_get_field_label( $sub_field ); ?>\n\t\t\t\t\t\t<?php if( $sub_field['instructions'] ): ?>\n\t\t\t\t\t\t\t<p class=\"description\"><?php echo $sub_field['instructions']; ?></p>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t</th>\n\t\t\t\t<?php endforeach; ?>\n\n\t\t\t\t<?php if( $show_remove ): ?>\n\t\t\t\t\t<th class=\"acf-row-handle\"></th>\n\t\t\t\t<?php endif; ?>\n\t\t\t</tr>\n\t\t</thead>\n\t<?php endif; ?>\n\t\n\t<tbody>\n\t\t<?php foreach( $value as $i => $row ): \n\t\t\t\n\t\t\t$row_class = 'acf-row';\n\t\t\t\n\t\t\tif( $i === 'acfcloneindex' ) {\n\t\t\t\t\n\t\t\t\t$row_class .= ' acf-clone';\n\t\t\t\t\n\t\t\t} elseif( $field['collapsed'] && acf_is_row_collapsed($field['key'], $i) ) {\n\t\t\t\t\n\t\t\t\t$row_class .= ' -collapsed';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t?>\n\t\t\t<tr class=\"<?php echo $row_class; ?>\" data-id=\"<?php echo $i; ?>\">\n\t\t\t\t\n\t\t\t\t<?php if( $show_order ): ?>\n\t\t\t\t\t<td class=\"acf-row-handle order\" title=\"<?php _e('Drag to reorder','acf'); ?>\">\n\t\t\t\t\t\t<?php if( $field['collapsed'] ): ?>\n\t\t\t\t\t\t<a class=\"acf-icon -collapse small\" href=\"#\" data-event=\"collapse-row\" title=\"<?php _e('Click to toggle','acf'); ?>\"></a>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t<span><?php echo intval($i) + 1; ?></span>\n\t\t\t\t\t</td>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t\n\t\t\t\t<?php echo $before_fields; ?>\n\t\t\t\t\n\t\t\t\t<?php foreach( $sub_fields as $sub_field ): \n\t\t\t\t\t\n\t\t\t\t\t// prevent repeater field from creating multiple conditional logic items for each row\n\t\t\t\t\tif( $i !== 'acfcloneindex' ) {\n\t\t\t\t\t\n\t\t\t\t\t\t$sub_field['conditional_logic'] = 0;\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// add value\n\t\t\t\t\tif( isset($row[ $sub_field['key'] ]) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// this is a normal value\n\t\t\t\t\t\t$sub_field['value'] = $row[ $sub_field['key'] ];\n\t\t\t\t\t\t\n\t\t\t\t\t} elseif( isset($sub_field['default_value']) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// no value, but this sub field has a default value\n\t\t\t\t\t\t$sub_field['value'] = $sub_field['default_value'];\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// update prefix to allow for nested values\n\t\t\t\t\t$sub_field['prefix'] = $field['name'] . '[' . $i . ']';\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// render input\n\t\t\t\t\tacf_render_field_wrap( $sub_field, $el ); ?>\n\t\t\t\t\t\n\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\n\t\t\t\t<?php echo $after_fields; ?>\n\t\t\t\t\n\t\t\t\t<?php if( $show_remove ): ?>\n\t\t\t\t\t<td class=\"acf-row-handle remove\">\n\t\t\t\t\t\t<a class=\"acf-icon -plus small acf-js-tooltip\" href=\"#\" data-event=\"add-row\" title=\"<?php _e('Add row','acf'); ?>\"></a>\n\t\t\t\t\t\t<a class=\"acf-icon -minus small acf-js-tooltip\" href=\"#\" data-event=\"remove-row\" title=\"<?php _e('Remove row','acf'); ?>\"></a>\n\t\t\t\t\t</td>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t\n\t\t\t</tr>\n\t\t<?php endforeach; ?>\n\t</tbody>\n</table>\n<?php if( $show_add ): ?>\n\t\n\t<ul class=\"acf-actions acf-hl\">\n\t\t<li>\n\t\t\t<a class=\"acf-button button button-primary\" href=\"#\" data-event=\"add-row\"><?php echo $field['button_label']; ?></a>\n\t\t</li>\n\t</ul>\n\t\t\t\n<?php endif; ?>\n</div>\n<?php\n\t\t\n\t}", "function columns_data( $column ) {\r\n\r\n\t\tglobal $post, $wp_taxonomies;\r\n\r\n\t\tswitch( $column ) {\r\n\t\t\tcase \"listing_thumbnail\":\r\n\t\t\t\tprintf( '<p>%s</p>', genesis_get_image( array( 'size' => 'thumbnail' ) ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_details\":\r\n\t\t\t\tforeach ( (array) $this->property_details['col1'] as $label => $key ) {\r\n\t\t\t\t\tprintf( '<b>%s</b> %s<br />', esc_html( $label ), esc_html( get_post_meta($post->ID, $key, true) ) );\r\n\t\t\t\t}\r\n\t\t\t\tforeach ( (array) $this->property_details['col2'] as $label => $key ) {\r\n\t\t\t\t\tprintf( '<b>%s</b> %s<br />', esc_html( $label ), esc_html( get_post_meta($post->ID, $key, true) ) );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_features\":\r\n\t\t\t\techo get_the_term_list( $post->ID, 'features', '', ', ', '' );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_categories\":\r\n\t\t\t\tforeach ( (array) get_option( $this->settings_field ) as $key => $data ) {\r\n\t\t\t\t\tprintf( '<b>%s:</b> %s<br />', esc_html( $data['labels']['singular_name'] ), get_the_term_list( $post->ID, $key, '', ', ', '' ) );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "function edit_columns_html($column, $post_id){\n \n switch($column){\n \n // Name\n case 'name':\n \n echo '<code style=\"font-size: 12px;\">' . $this->get_name($post_id) . '</code>';\n break;\n \n // Post ID\n case 'post_id':\n \n $p_id = get_field('post_id', $post_id);\n \n if(empty($p_id))\n $p_id = 'options';\n \n echo '<code style=\"font-size: 12px;\">' . $p_id. '</code>';\n break;\n \n // Autoload\n case 'autoload':\n \n $al = __('No');\n $autoload = get_field('autoload', $post_id);\n \n if(!empty($autoload))\n $al = __('Yes');\n \n echo $al;\n break;\n \n }\n \n }", "public function printCol()\n\t{\n\t\techo '<div class=\"col\">';\n\t\t\n\t\t// image\n\t\techo $this->getImg();\n\t\techo '<br /><br />';\n\t\t\n\t\t// caption\n\t\techo $this->getCaption();\t\t\n\t\t\n\t\t// delete\n\t\techo $this->getDel();\n\t\t\n\t\techo '</div>'.\"\\n\";\n\t}", "function mpwtl_render_form_builder_field($field) {\n\t\t$type = $field->type;\n\t\t$classNameCol = 'col-md-12';\n\t\tif (isset($field->className)) {\n\t\t\tif (strpos($field->className, 'form-col') !== false) {\n\t\t\t\t$classNames = explode(' ', $field->className);\n\t\t\t\tif (is_array($classNames)) {\n\t\t\t\t\t$classNameColArray = array_filter($classNames, function ($class) {\n\t\t\t\t\t\treturn startsWith($class, 'form-col');\n\t\t\t\t\t});\n\n\t\t\t\t\t$classNameCol = implode(' ', $classNameColArray);\n\t\t\t\t\t$classNameCol = trim($classNameCol);\n\n\t\t\t\t\t$classNameCol = str_replace('form-col-xs', 'col-xs', $classNameCol);\n\t\t\t\t\t$classNameCol = str_replace('form-col-sm', 'col-sm', $classNameCol);\n\t\t\t\t\t$classNameCol = str_replace('form-col-md', 'col-md', $classNameCol);\n\t\t\t\t\t$classNameCol = str_replace('form-col-lg', 'col-lg', $classNameCol);\n\n\t\t\t\t\t// Default col-md-X\n\t\t\t\t\t$classNameCol = str_replace('form-col', 'col-md', $classNameCol);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo '<div class=\"' . $classNameCol . '\">';\n\t\tif ($type == 'header' || $type == 'paragraph') {\n\t\t\techo '<' . $field->subtype . ' class=\"' . (isset($field->className) ? $field->className : '') . '\">' . html_entity_decode(check_for_links(nl2br($field->label))) . '</' . $field->subtype . '>';\n\t\t} else {\n\t\t\techo '<div class=\"form-group\" data-type=\"' . $type . '\" data-name=\"' . $field->name . '\" data-required=\"' . (isset($field->required) ? true : 'false') . '\">';\n\t\t\techo '<label class=\"control-label\" for=\"' . $field->name . '\">' . (isset($field->required) ? ' <span class=\"text-danger\">* </span> ' : '') . $field->label . '' . (isset($field->description) ? ' <i class=\"fa fa-question-circle\" data-toggle=\"tooltip\" data-title=\"' . $field->description . '\" data-placement=\"' . (is_rtl(true) ? 'left' : 'right') . '\"></i>' : '') . '</label>';\n\t\t\tif (isset($field->subtype) && $field->subtype == 'color') {\n\t\t\t\techo '<div class=\"input-group colorpicker-input\">\n <input' . (isset($field->required) ? ' required=\"true\"' : '') . ' placeholder=\"' . (isset($field->placeholder) ? $field->placeholder : '') . '\" type=\"text\"' . (isset($field->value) ? ' value=\"' . $field->value . '\"' : '') . ' name=\"' . $field->name . '\" id=\"' . $field->name . '\" class=\"' . (isset($field->className) ? $field->className : '') . '\" />\n <span class=\"input-group-addon\"><i></i></span>\n </div>';\n\t\t\t} elseif ($type == 'file' || $type == 'text' || $type == 'number') {\n\t\t\t\t$ftype = isset($field->subtype) ? $field->subtype : $type;\n\t\t\t\techo '<input' . (isset($field->required) ? ' required=\"true\"' : '') . (isset($field->placeholder) ? ' placeholder=\"' . $field->placeholder . '\"' : '') . ' type=\"' . $ftype . '\" name=\"' . $field->name . '\" id=\"' . $field->name . '\" class=\"' . (isset($field->className) ? $field->className : '') . '\" value=\"' . (isset($field->value) ? $field->value : '') . '\"' . ($field->type == 'file' ? ' accept=\"' . get_form_accepted_mimes() . '\" filesize=\"' . file_upload_max_size() . '\"' : '') . '>';\n\t\t\t} elseif ($type == 'textarea') {\n\t\t\t\techo '<textarea' . (isset($field->required) ? ' required=\"true\"' : '') . ' id=\"' . $field->name . '\" name=\"' . $field->name . '\" rows=\"' . (isset($field->rows) ? $field->rows : '4') . '\" class=\"' . (isset($field->className) ? $field->className : '') . '\" placeholder=\"' . (isset($field->placeholder) ? $field->placeholder : '') . '\">' . (isset($field->value) ? $field->value : '') . '</textarea>';\n\t\t\t} elseif ($type == 'date') {\n\t\t\t\techo '<input' . (isset($field->required) ? ' required=\"true\"' : '') . ' placeholder=\"' . (isset($field->placeholder) ? $field->placeholder : '') . '\" type=\"text\" class=\"' . (isset($field->className) ? $field->className : '') . ' datepicker\" name=\"' . $field->name . '\" id=\"' . $field->name . '\" value=\"' . (isset($field->value) ? _d($field->value) : '') . '\">';\n\t\t\t} elseif ($type == 'datetime-local') {\n\t\t\t\techo '<input' . (isset($field->required) ? ' required=\"true\"' : '') . ' placeholder=\"' . (isset($field->placeholder) ? $field->placeholder : '') . '\" type=\"text\" class=\"' . (isset($field->className) ? $field->className : '') . ' datetimepicker\" name=\"' . $field->name . '\" id=\"' . $field->name . '\" value=\"' . (isset($field->value) ? _dt($field->value) : '') . '\">';\n\t\t\t} elseif ($type == 'select') {\n\t\t\t\techo '<select' . (isset($field->required) ? ' required=\"true\"' : '') . '' . (isset($field->multiple) ? ' multiple=\"true\"' : '') . ' class=\"' . (isset($field->className) ? $field->className : '') . '\" name=\"' . $field->name . (isset($field->multiple) ? '[]' : '') . '\" id=\"' . $field->name . '\"' . (isset($field->values) && count($field->values) > 10 ? 'data-live-search=\"true\"' : '') . 'data-none-selected-text=\"' . (isset($field->placeholder) ? $field->placeholder : '') . '\">';\n\t\t\t\t$values = [];\n\t\t\t\tif (isset($field->values) && count($field->values) > 0) {\n\t\t\t\t\tforeach ($field->values as $option) {\n\t\t\t\t\t\techo '<option value=\"' . $option->value . '\" ' . (isset($option->selected) ? ' selected' : '') . '>' . $option->label . '</option>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo '</select>';\n\t\t\t} elseif ($type == 'checkbox-group') {\n\t\t\t\t$values = [];\n\t\t\t\tif (isset($field->values) && count($field->values) > 0) {\n\t\t\t\t\t$i = 0;\n\t\t\t\t\techo '<div class=\"chk\">';\n\t\t\t\t\tforeach ($field->values as $checkbox) {\n\t\t\t\t\t\techo '<div class=\"checkbox' . ((isset($field->inline) && $field->inline == 'true') || (isset($field->className) && strpos($field->className, 'form-inline-checkbox') !== false) ? ' checkbox-inline' : '') . '\">';\n\t\t\t\t\t\techo '<input' . (isset($field->required) ? ' required=\"true\"' : '') . ' class=\"' . (isset($field->className) ? $field->className : '') . '\" type=\"checkbox\" id=\"chk_' . $field->name . '_' . $i . '\" value=\"' . $checkbox->value . '\" name=\"' . $field->name . '[]\"' . (isset($checkbox->selected) ? ' checked' : '') . '>';\n\t\t\t\t\t\techo '<label for=\"chk_' . $field->name . '_' . $i . '\">';\n\t\t\t\t\t\techo $checkbox->label;\n\t\t\t\t\t\techo '</label>';\n\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}\n\t\techo '</div>';\n\t}", "function render_field( $field_name ) {\n\t\tif( !isset( $this->fields[ $field_name ] ) ) {\n\t\t\treturn;\n\t\t}\n\t\tglobal $post;\n\t\t$atts = $this->fields[ $field_name ];\n\t\t$atts['value'] = get_post_meta( $post->ID, $field_name, true );\n\t\tif( empty( $atts['value'] ) && !empty( $atts['default'] ) ) {\n\t\t\t$atts['value'] = $atts['default'];\n\t\t}\n\t\t\n\t\t// Escape values\n\t\tif( is_callable( $atts['escape_func'] ) ) {\n\t\t\t$atts['value'] = call_user_func( $atts['escape_func'], $atts['value'] );\n\t\t}\n\t\t\n\t\t// ! Default values\n\t\tif( $field_name == 'opening_hours' && !is_array( $atts['value'] ) ) {\n\t\t\t$atts['value'] = [];\n\t\t}\n\t\t\n\t\t// Load template\n\t\t$file_path = trailingslashit(__DIR__).'views/'.$atts['file'];\n\t\tif( is_file( $file_path ) && is_readable( $file_path ) ) {\n\t\t\tinclude( $file_path );\n\t\t}\n\t}", "private function renderFields(): String\n {\n\n foreach ($this->fields as $name => $field) {\n\n $FieldClass = $field['class'];\n $attr = $field['attr'];\n\n // Instantiate the new field class\n $newField = new $FieldClass();\n\n // Set the field attributes\n $newField->setAttributes($attr);\n\n // Get it HTML code\n $newFieldView = $newField->render($name);\n\n // Append it\n $this->fieldsView .= \"<br> <br> \" . $newFieldView;\n }\n\n return $this->fieldsView;\n }", "protected abstract function retrieveFormDisplayFields(Row $row);", "public function get_display_fields() {\n return $this->displayable_fields;\n }", "function render_cell($column, $photo_gallery)\r\n {\r\n $content_object = $photo_gallery->get_publication_object();\r\n \r\n switch ($column->get_name())\r\n {\r\n case ContentObject :: PROPERTY_TITLE :\r\n return $content_object->get_title();\r\n case ContentObject :: PROPERTY_DESCRIPTION :\r\n return Utilities :: truncate_string($content_object->get_description(), 200);\r\n default :\r\n return '&nbsp;';\r\n }\r\n }", "public function render() {\n\t\tif ($this->getPage()) {\n\t\t\t$options = $this->getPage()->getOptions();\n\t\t} else {\n\t\t\t$options = [];\n\t\t}\n\t\techo $this->field->render($options);\n\t}", "function wpc_shipment_container_table_column_display_callback( $column, $post_id ) {\n\tglobal $wpcargo;\n if ( $column == 'flight' ){\n echo get_post_meta( $post_id, 'container_no', TRUE );\n }\n if( $column == 'shipments' ){\n \t$shipment_count = wpcshcon_shipment_count( $post_id );\n\t\techo $shipment_count \n\t\t? '<a href=\"#\" class=\"text-info\" data-id=\"'.$post_id.'\"><span class=\"dashicons dashicons-list-view\"></span> '.sprintf( _n( '%s Shipment', '%s Shipments', $shipment_count, 'wpcargo-shipment-container' ), $shipment_count ).'</a>' \n\t\t: '';\n }\n if( $column == 'agent' ){\n \techo get_post_meta( $post_id, 'container_agent', TRUE );\n }\n if( $column == 'delivery_agent' ){\n \techo get_post_meta( $post_id, 'delivery_agent', TRUE );\n }\n if( $column == 'status' ){\n \techo get_post_meta( $post_id, 'container_status', TRUE );\n }\n if( $column == 'scprint' ){\n \techo '<a href=\"'.admin_url( 'admin.php?page=print-shipment-container&id='.$post_id ).'\" target=\"_blank\"><span class=\"dashicons dashicons-printer\"></span></a>';\n }\n if( $column == 'scmanifest' ){\n \techo '<a href=\"'.admin_url( '/?wpcscpdf='.$post_id ).'\"><span class=\"dashicons dashicons-download\"></span></a>';\n }\n}", "function Field() {\n\t\t$fs = $this->FieldSet();\n \t$spaceZebra = isset($this->zebra) ? \" $this->zebra\" : '';\n \t$idAtt = isset($this->id) ? \" id=\\\"{$this->id}\\\"\" : '';\n\t\t$content = \"<div class=\\\"fieldgroup$spaceZebra\\\"$idAtt>\";\n\t\tforeach($fs as $subfield) {\n\t\t\t$childZebra = (!isset($childZebra) || $childZebra == \"odd\") ? \"even\" : \"odd\";\n\t\t\tif($subfield->hasMethod('setZebra')) $subfield->setZebra($childZebra);\n\t\t\t$content .= \"<div class=\\\"fieldgroupField\\\">\" . $subfield->{$this->subfieldParam}() . \"</div>\";\n\t\t}\n\t\t$content .= \"</div>\";\n\t\treturn $content;\n\t}", "function render_cell($column, $content_object)\r\n\t{\r\n\t\tswitch ($column->get_name())\r\n\t\t{\r\n\t\t\tcase ContentObject :: PROPERTY_TITLE :\r\n return '<a href=\"' . $content_object->get_view_url() . '\">' . htmlspecialchars($content_object->get_title()) . '</a>';\r\n\t\t\t\tbreak;\r\n\t\t\tcase ContentObject :: PROPERTY_DESCRIPTION :\r\n\t\t\t\treturn Utilities :: truncate_string($content_object->get_description(), 50);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "function display_browse_field($recordid, $template) {\n return $this->display_field($recordid, $template);\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "function render_field_settings($field)\n {\n }", "public function setDisplayField($field)\n {\n $this->_displayField = $field;\n\n return $this;\n }", "public function var_display_field($data)\n {\n return $this->display_field($data);\n }", "function render_field( $field ) {\n\n//\t\tvar_dump($field);\n//\t\tdie;\n\n\t\t// Work around for the ACF export to code option adding extra slashes and quotes\n\t\t$address_options = stripcslashes( $field['address_options'] );\n\t\t$address_layout = stripcslashes( $field['address_layout'] );\n\n\t\tif ( strpos( $address_layout, '\"' ) === 0 ) {\n\t\t\t// remove the extra quotes\n\t\t\t$address_layout = trim( $address_layout, '\"' );\n\t\t}\n\n\t\tif ( strpos( $address_options, '\"' ) === 0 ) {\n\t\t\t// remove the extra quotes\n\t\t\t$address_options = trim( $address_options, '\"' );\n\t\t}\n\n\t\t?>\n\n\t\t<div class=\"acf-address-field\"\n\t\t data-name=\"<?php echo $field['name']; ?>\"\n <?php\n $jsonValue = $this->jsonEncode( $field['value'] );\n $escValue = esc_js( $jsonValue );\n ?>\n\t\t data-value=\"<?php echo $escValue ?>\"\n\t\t data-output-type=\"<?php echo $field['output_type']; ?>\"\n\t\t data-layout=\"<?php echo esc_js( $address_layout ); ?>\"\n\t\t data-options=\"<?php echo esc_js( $address_options ); ?>\"\n\t\t\t></div>\n\n\t<?php\n\t}" ]
[ "0.7059962", "0.6958023", "0.68331015", "0.68229085", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.6816184", "0.68156606", "0.67067194", "0.6631119", "0.66201514", "0.65740126", "0.6542864", "0.6380054", "0.635188", "0.6349648", "0.63007236", "0.628666", "0.6253422", "0.6252422", "0.62503356", "0.622844", "0.62280726", "0.62268853", "0.6214762", "0.61528534", "0.61431366", "0.6082644", "0.6048873", "0.603873", "0.6035014", "0.60305107", "0.5993203", "0.5986729", "0.59760845", "0.5971729", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.59608513", "0.5938321", "0.5937808", "0.59346193" ]
0.7036813
1
Add metaboxes for singlepost
function ir_register_post_metabox() { global $post; $related_food_id = 0; if ( isset( $_GET['post'] ) ) { $related_food_id = get_post_meta( $_GET['post'], 'ir_related_food', true ); } $prefix = 'ir_'; /** * Sample metabox to demonstrate each field type included */ $cmb_post = new_cmb2_box( array( 'id' => $prefix . 'post_metabox', 'title' => esc_html__( 'Material data', 'cmb2' ), 'object_types' => array( 'post' ), ) ); // Add new field $cmb_post->add_field( array( 'name' => __( 'Liittyvä raaka-aine', 'cmb2' ), 'id' => $prefix . 'related_food', 'desc' => __( 'Klikkaa hakuikonia tai syötä kenttään suoraan raaka-aineen id', 'cmb2' ), 'type' => 'post_search_text', // This field type // post type also as array 'post_type' => 'food', // Default is 'checkbox', used in the modal view to select the post type 'select_type' => 'radio', // Will replace any selection with selection from modal. Default is 'add' 'select_behavior' => 'replace', ) ); $cmb_post->add_field( array( 'name' => 'Näytettävät ravintoarvot?', 'type' => 'title', 'id' => $prefix . 'nutrients_title', ) ); $cmb_post->add_field( array( 'name' => 'Perusravintoaineet', 'id' => $prefix . 'perusravintoaineet', 'type' => 'multicheck', 'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä', 'options' => array( $prefix . 'energy' => __( 'Energia, laskennallinen', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_energy' ), $prefix . 'hiilihydraatti' => __( 'Hiilihydraatti', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_hiilihydraatti' ), $prefix . 'proteiini' => __( 'Proteiini', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_proteiini' ), $prefix . 'rasva' => __( 'Rasva', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_rasva' ), ), ) ); $cmb_post->add_field( array( 'name' => 'Hiilihydraattifraktiot', 'id' => $prefix . 'hiilihydraattifraktiot', 'type' => 'multicheck', 'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä', 'options' => array( $prefix . 'sokeri' => __( 'Kuitu', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_sokeri' ), $prefix . 'kuitu' => __( 'Sokerit', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_kuitu' ), ), ) ); $cmb_post->add_field( array( 'name' => 'Vitamiinit', 'id' => $prefix . 'vitamiinit', 'type' => 'multicheck', 'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä', 'options' => array( $prefix . 'folaatti' => __( 'Folaatti', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_folaatti' ), $prefix . 'niasiiniekvivalentti' => __( 'Niasiiniekvivalentti NE', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_niasiiniekvivalentti' ), $prefix . 'niasiini' => __( 'Niasiini (nikotiinihappo + nikotiiniamidi)', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_niasiini' ), $prefix . 'b6' => __( 'Pyridoksiini vitameerit (vetykloridi) (B6)', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_b6' ), $prefix . 'b2' => __( 'Riboflaviini (B2)', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_b2' ), $prefix . 'b1' => __( 'Tiamiini (B1)', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_b1' ), $prefix . 'b12' => __( 'B12-vitamiini (kobalamiini)', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_b12' ), $prefix . 'C' => __( 'C-vitamiini', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_C' ), $prefix . 'A_RAE' => __( 'A-vitamiini', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_A_RAE' ), $prefix . 'karotenoidit' => __( 'Karotenoidit', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_karotenoidit' ), $prefix . 'D' => __( 'D-vitamiini', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_D' ), $prefix . 'E' => __( 'E-vitamiini alfatokoferoli', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_E' ), $prefix . 'K' => __( 'K-vitamiini', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_K' ), ), 'display_cb' => 'yourprefix_display_text_small_column', // Output the display of the column values through a callback. ) ); $cmb_post->add_field( array( 'name' => 'Kivennäis- ja hivenaineet', 'id' => $prefix . 'kivennaisaineet', 'type' => 'multicheck', 'desc' => 'Valitse mitkä ravintoarvot haluat näyttää kirjoituksen yhteydessä', 'options' => array( $prefix . 'kalsium' => __( 'Kalsium', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_kalsium' ), $prefix . 'rauta' => __( 'Rauta', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_rauta' ), $prefix . 'jodidi' => __( 'Jodidi', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_jodidi' ), $prefix . 'kalium' => __( 'Kalium', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_kalium' ), $prefix . 'magnesium' => __( 'Magnesium', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_magnesium' ), $prefix . 'natrium' => __( 'Natrium', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_natrium' ), $prefix . 'suola' => __( 'Suola', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_suola' ), $prefix . 'fosfori' => __( 'Fosfori', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_fosfori' ), $prefix . 'seleeni' => __( 'Seleeni', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_seleeni' ), $prefix . 'sinkki' => __( 'Sinkki', 'cmb2' ) . \App\get_value_and_unit( $related_food_id, 'ir_sinkki' ), ), ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "public function add_meta_boxes()\n \t{\n\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('WP_Custom_Login_Profile_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray(&$this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\n\n \t}", "public function add_meta_boxes()\n \t{\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('wp_plugin_template_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray($this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\t\t\t\t\n \t}", "public function add_post_metaboxes() {\n\t\tif( empty( $this->push_syndicate_settings['selected_post_types'] ) )\n\t\t\treturn;\n\n\t\tif( !$this->current_user_can_syndicate() )\n\t\t\treturn;\n\n\t\t$selected_post_types = $this->push_syndicate_settings[ 'selected_post_types' ];\n\t\tforeach( $selected_post_types as $selected_post_type ) {\n\t\t\tadd_meta_box( 'syndicatediv', __( ' Syndicate ' ), array( $this, 'add_syndicate_metabox' ), $selected_post_type, 'side', 'high' );\n\t\t\t//add_meta_box( 'syndicationstatusdiv', __( ' Syndication Status ' ), array( $this, 'add_syndication_status_metabox' ), $selected_post_type, 'normal', 'high' );\n\t\t}\n\n\t}", "function wck_settings_page_add_meta_boxes() {\r\n global $post;\r\n\t\tdo_action( 'add_meta_boxes', $this->hookname, $post );\r\n\t}", "public function addMetaboxes() {}", "function add_meta_boxes($post_type, $post)\n {\n }", "static function metabox_at_post_edit_page(){\n\t\t \tadd_meta_box('matebox-to-handle-keywords', 'Affiliate Keywords', array(get_class(), 'metabox_to_deal_keywords'), 'product', 'advanced', 'high');\t \t\n\t\t }", "private function add_meta_boxes() {\n\t\t$post_types = $this->post->get_types();\n\n\t\tforeach ( $post_types as $post_type => $value ) {\n\t\t\tadd_meta_box( 'subway_comment_metabox',\n\t\t\t\tesc_html__( 'Memberships Discussion', 'subway' ),\n\t\t\t\tfunction ( $post ) {\n\t\t\t\t\t$this->discussion( $post );\n\t\t\t\t},\n\t\t\t\t$post_type, 'side', 'high'\n\t\t\t);\n\t\t\tadd_meta_box( 'subway_visibility_metabox',\n\t\t\t\tesc_html__( 'Memberships Access', 'subway' ),\n\t\t\t\tfunction ( $post ) {\n\t\t\t\t\t$this->visibility( $post );\n\t\t\t\t},\n\t\t\t\t$post_type, 'side', 'high'\n\t\t\t);\n\t\t}\n\n\t}", "public function addMultipleMetaBoxes()\n {\n\n $options = get_option( 'niloy_plugin_cf' ) ?: array();\n\n add_meta_box( 'field_options', 'Field Options', array( $this, 'renderMultipleMetaBoxes'), $options['related_posts'], 'normal', 'default' );\n\n }", "public function add_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t$this->plugin_slug . '-post-metabox',\n\t\t\tesc_html__( 'Review Settings', $this->plugin_slug ),\n\t\t\tarray( $this, 'review_settings_view' ),\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'core'\n \t \t);\n\t}", "function register_and_do_post_meta_boxes($post)\n {\n }", "public function add_meta_boxes()\n {\n /* Author Name */\n add_meta_box(\n 'testimonial_options',\n 'Testimonial Options',\n array ( $this , 'render_features_box'),\n 'testimonial',\n 'side',\n 'default'\n );\n /* Author email */\n /* approved [checkbox] */\n /* featured [checkbox] */\n }", "Function Wp_meta_box_store(){\n\n\t$mult_posts = array( 'post', 'page' );\n\n\tforeach ($mult_posts as $mult_post) {\n\t\tadd_meta_box(\n\t\t\t'meta_box_id', \t\t\t\t\t# metabox id\n\t\t\t__('Author Bio', 'textdomain'),\t# Title \n\t\t\t'wp_meta_box_call_back_func_store', \t# Callback Function \n\t\t\t$mult_post, \t\t\t\t\t# Post Type\n\t\t\t'normal'\t\t\t\t\t\t# textcontent\n\t\t);\n\t}\n\t\n}", "function wtfdivi099_add_meta_boxes() {\r\n\tforeach(get_post_types() as $pt) {\r\n\t\tif (post_type_supports($pt, 'editor') and function_exists('et_single_settings_meta_box')) {\r\n\t\t\tadd_meta_box('et_settings_meta_box', __('Divi Custom Post Settings', 'Divi'), 'et_single_settings_meta_box', $pt, 'side', 'high');\r\n\t\t}\r\n\t} \r\n}", "static function metabox($post){\n\t\twp_nonce_field( 'flat-options', 'flat-options_nonce' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\techo '<style>';\n\t\techo '.admin-meta-input{display:block; margin-top: 10px;}';\n\t\techo 'div.field-holder{display: block;float: left; margin: 10px 20px; height: 80px;}';\n\t\techo '.field-block{display: inline-block;clear: both;float: none;}';\n\t\techo '.postbox .inside .field-block h2{padding: 8px 12px;font-weight: 600;font-size: 18px;margin: 0;line-height: 1.4}';\n\t\techo '</style>';\n\t\t\t\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Licitálással kapcsolatos adatok</h2>';\n\t\tforeach ($fieldblocks['licit'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Hely adatok</h2>';\n\t\tforeach ($fieldblocks['location'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlan adatok és településrendezési előírások</h2>';\n\t\tforeach ($fieldblocks['parameters'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlanjogi jellemzők</h2>';\n\t\tforeach ($fieldblocks['info'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Közművek, energiaellátás, telekommunikáció</h2>';\n\t\tforeach ($fieldblocks['sources'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\n\t\t\t\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Építmény (épület) jellemzői</h2>';\n\t\tforeach ($fieldblocks['building'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\techo \"\n\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('.datepicker').datepicker();\t\n\t\t\t\t});\t\n\t\t\t</script>\t\n\t\t\";\n\t\t\n\t\techo '<br clear=\"all\">';\n\t\t\n }", "function tabify_add_meta_boxes($post_type)\n {\n }", "public static function add_meta_boxes_post($post) {\n add_meta_box(\"medium\", \"Medium\", array(\"Medium_Admin\", \"meta_box_callback\"),\n null, \"side\", \"high\");\n }", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "public static function add_metaboxes(){}", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }", "function add_meta_boxes()\n {\n }", "function tower_register_meta_boxes() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n $meta = $custom_type['meta'];\n add_meta_box(\n $meta['handle'],\n $meta['title'],\n $meta['callback'],\n $key\n );\n }\n}", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "function add_metaboxes() \n {\n // add a metabox to the Event using the callback add_time_date_metabox \n add_meta_box( \n \"bbquotations-source\",\n __(\"Quote source url\", $this->localization_domain),\n array(&$this, \"add_source_metabox\"), $this->custom_post_type_name, \"normal\", \"high\"\n );\n\n add_meta_box( \n \"bbquotations-cheatsheet\",\n __(\"Quotes usage cheatsheet\", $this->localization_domain),\n array(&$this, \"add_cheatsheet_metabox\"), $this->custom_post_type_name, \"side\", \"high\"\n );\n }", "public function apb_add_meta_boxes() {\r\n\t}", "function create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' POST SETTINGS', 'new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "public function registerMetaBoxes()\n\t {\n\t \t$dataMetas = self::getDataMetas();\n\n\t \tif ( !empty($dataMetas) ) {\n\t \t\tforeach ($dataMetas as $key => $meta) {\n\t \t\t\t/* CHECK IF HAS PAGES */\n\t \t\t\tif ( isset($meta[\"_pages\"]) && !empty($meta[\"_pages\"][0]) ) {\n\t \t\t\t\tself::createMetasPages($meta);\n\t \t\t\t}\n\n\t \t\t\t/* POSTS TYPES REGISTER METAS */\n\t \t\t\tif ( isset($meta[\"_posts_types\"]) && !empty($meta[\"_posts_types\"][0]) ) {\n\t \t\t\t\tself::createMetasPostTypes($meta);\n\t \t\t\t}\n\n\t \t\t\t/* CHECK IF ALL POSTS IS true */\n\t \t\t\tif ( isset($meta[\"_all_posts\"]) && $meta['_all_posts'] == 'yes' ) {\n\t \t\t\t\tself::createMetasPosts($meta);\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\n\t }", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "public function add_inner_meta_boxes($post)\n\t\t{\t\t\n\t\t\t// Render the job order metabox\n\t\t\t//include(sprintf(\"%s/../templates/%s_metabox.php\", dirname(__FILE__), self::POST_TYPE));\t\t\t\n\t\t}", "public function add_meta_boxes()\n {\n\n $this->_add_bitly_meta_box();\n\n }", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "function ilusix_my_custom_meta_box() {\n global $myMetaBoxPostTypes;\n\n foreach($myMetaBoxPostTypes as $postType) {\n add_meta_box(\n 'my_custom_meta_box_identifier' . '-' . $postType,\n 'Meta box title',\n 'ilusix_my_custom_meta_box_callback',\n $postType,\n 'normal',\n 'default'\n );\n }\n}", "function admin_metaboxes() {\r\n\r\n// \t\t\t/** Check if wpeo_log_select_post_type exist */\r\n// \t\t\tif( !empty(\t$this->wpeologs_settings['post_type'] ) ) {\r\n// \t\t\t\tforeach ( $this->wpeologs_settings['post_type'] as $post_type ) {\r\n\r\n// \t\t\t\t\t//add_meta_box( 'wpeologs_metabox_' . $post_type, __( 'Logs', 'wpeologs-i18n'), array( &$this, 'associated_post_type_metabox' ), $post_type, 'normal' );\r\n// \t\t\t\t}\r\n// \t\t\t}\r\n\t\t}", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Word linkages',\n\t\t\t'Word linkages',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'linkages_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'Answers',\n\t\t\t'Answers',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'answers_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "function master_sidebar_post_type_meta_boxes() {\n\t\n\t$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' );\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tif ( ! $post_types ) {\n\t\treturn;\n\t}\n\n\t// Add metabox for each posttype\n\tforeach ( $post_types as $post_type ) {\n\t\t$post_type = apply_filters( 'master_sidebar_meta_box_object', $post_type );\n\t\tif ( $post_type ) {\n\t\t\t$id = $post_type->name;\n\t\t\tadd_meta_box( \n\t\t\t\t\"master-add-{$id}\", \n\t\t\t\t$post_type->labels->name, \n\t\t\t\t'master_sidebar_item_post_type_meta_box', \n\t\t\t\t$admin_page_name, \n\t\t\t\t'side', \n\t\t\t\t'default', \n\t\t\t\t$post_type \n\t\t\t);\n\t\t}\n\t}\n}", "function create_meta_box() {\n\n\tglobal $postmetas;\n\t\n\tif(!isset($_GET['post_type']) OR empty($_GET['post_type']))\n\t{\n\t\tif(isset($_GET['post']) && !empty($_GET['post']))\n\t\t{\n\t\t\t$post_obj = get_post($_GET['post']);\n\t\t\t$_GET['post_type'] = $post_obj->post_type;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_GET['post_type'] = 'post';\n\t\t}\n\t}\n\t\n\tif ( function_exists('add_meta_box') && isset($postmetas) && count($postmetas) > 0 ) { \n\t\tforeach($postmetas as $key => $postmeta)\n\t\t{\n\t\t\tif($_GET['post_type']==$key)\n\t\t\t{\n\t\t\t\tadd_meta_box( 'metabox', ucfirst($key).' Options', 'new_meta_box', $key, 'side', 'high' ); \n\t\t\t}\n\t\t}\n\t}\n\n}", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "function quiz_add_meta_boxes( $post ){\n\tadd_meta_box( 'quiz_meta_box', __( 'Quiz settings', 'random-timed-quiz' ), 'build_meta_box', 'random-timed-quiz', 'normal', 'high' );\t\n}", "function testimonials_meta_boxes() {\n\tadd_meta_box( 'testimonials_form', 'testimonials', 'normal', 'high' );\n}", "function add_post_meta_boxes() {\n\n\t\t\tadd_meta_box(\n\t\t\t\t'video-post', // Unique ID\n\t\t\t\tesc_html__( 'Video Post' ), // Title\n\t\t\t\tarray( 'VWvideoShare', 'post_meta_box'), // Callback function\n\t\t\t\t'video', // Admin page (or post type)\n\t\t\t\t'normal', // Context\n\t\t\t\t'high' // Priority\n\t\t\t);\n\t\t}", "public function register_metaboxes(){\n\t\tif ($this->options('use_metabox')){\n\t\t\t$metabox = $this->metabox();\n\t\t\tadd_meta_box(\n\t\t\t\t$metabox['id'],\n\t\t\t\t$metabox['title'],\n\t\t\t\t'show_meta_boxes',\n\t\t\t\t$metabox['page'],\n\t\t\t\t$metabox['context'],\n\t\t\t\t$metabox['priority']\n\t\t\t);\n\t\t}\n\t}", "function add_meta_box() {\t\t\n\t\t\t/* Gets available public post types. */\n\t\t\t$post_types = get_post_types( array( 'public' => true ), 'objects' );\n\t\t\t\n\t\t\t$post_types = apply_filters( 'remove_youtube_white_label_meta_box', $post_types );\n\t\t\t\n\t\t\t/* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */\n\t\t\tforeach ( $post_types as $type ) {\n\t\t\t\t/* Add the meta box. */\n\t\t\t\tadd_meta_box( self::DOMAIN . \"-{$type->name}-meta-box\", __( 'YouTube Embed Shortcode Creator (does not save meta)', self::DOMAIN ), array( $this, 'meta_box' ), $type->name, 'side', 'default' );\n\t\t\t}\n\t\t}", "public function add_meta_boxes() {\n\t\t// Create the Slide Meta Boxes\n\t\tadd_meta_box( 'justart-slider-slide-settings-group', 'Slides', array( $this, 'create_slide_settings_meta_box' ), 'justart-slider', 'normal', 'default' );\n\t\tadd_filter( 'postbox_classes_justart-slider-slide-settings-group', array( $this, 'add_metabox_classes' ) );\n\t\t\n\t\t// Create the Shortcode Meta Box\n\t\tadd_meta_box( 'justart-slider-shortcode-group', 'Shortcode', array( $this, 'create_shortcode_meta_box' ), 'justart-slider', 'side', 'high' );\n\t\t\n\t\t// Create the Global Settings Meta Box\n\t\tadd_meta_box( 'justart-slider-global-settings-group', 'Global settings', array( $this, 'create_global_settings_meta_box' ), 'justart-slider', 'side', 'default' );\n\t}", "public function admin_init()\n \t{\t\t\t\n \t\t// Add metaboxes\n \t\t//add_action('add_meta_boxes', array(&$this, 'add_meta_boxes'));\n \t}", "public function sailthru_post_metabox() {\n\n\t\tadd_meta_box(\n\t\t\t'sailthru-post-data',\n\t\t\t__( 'Sailthru Post Data', 'sailthru' ),\n\t\t\tarray( $this, 'post_metabox_display' ),\n\t\t\t'post',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t}", "public static function create_meta_box() {\n\t\t$content_types_array = self::_get_active_content_types();\n\t\tforeach ( $content_types_array as $content_type ) {\n\t\t\tadd_meta_box( 'custom-content-type-mgr-custom-fields'\n\t\t\t\t, __('Custom Fields', CCTM::txtdomain )\n\t\t\t\t, 'StandardizedCustomFields::print_custom_fields'\n\t\t\t\t, $content_type\n\t\t\t\t, 'normal'\n\t\t\t\t, 'high'\n\t\t\t\t, $content_type \n\t\t\t);\n\t\t}\n\t}", "function m_custom_meta() {\r\n add_meta_box( 'sm_meta', __( 'Featured Posts', 'sm-textdomain' ), 'sm_meta_callback', 'post' );\r\n add_meta_box( 'mm_meta', __( 'Main Posts', 'sm-textdomain' ), 'mm_meta_callback', 'post' );\r\n\r\n}", "public function add_meta_boxes() {\r\n\t\tadd_meta_box( 'zakra-page-setting', esc_html__( 'Page Settings', 'zakra' ), 'Zakra_Meta_Box_Page_Settings::render', array(\r\n\t\t\t'post',\r\n\t\t\t'page',\r\n\t\t) );\r\n\t}", "public function metabox(){\n\t\tif ($this->options('use_metabox')){\n\t\t\treturn array(\n\t\t\t\t'id' => $this->options('name').'_metabox',\n\t\t\t\t'title' => __($this->options('singular_name').' Fields'),\n\t\t\t\t'page' => $this->options('name'),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}", "function register_metaboxes() {\n\n\t\t$this->metaboxes = array(\n\t\t\t'example-metabox' => array(\n\t\t\t\t'title' => 'Example Post Type Metabox',\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'description',\n\t\t\t\t\t'date'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tparent::register_metaboxes();\n\n\t}", "function wpb_add_custom_meta_boxes() {\n\tglobal $post;\n\tif ('134' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n\n\tif ('136' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n\n\tif ('138' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n}", "public function add_inner_meta_boxes($post)\n\t\t{\n\t\t\t$this->nonce = self::POST_TYPE.'add_inner_meta_boxes'.'_nonce';\n\t\t\t$this->action = basename( __FILE__);\n\t\t\t\n\t\t\t// Add an nonce field so we can check for it later.\n\t\t\twp_nonce_field( $this->action , $this->nonce );\n\t\t\t\n\t\t\t//add the array of input\n\t\t\t$prfx_stored_meta = get_post_meta($post->ID);\n\t\t\t\n\t\t\t// Render the job order metabox\n\t\t\tinclude(sprintf(\"%s/../templates/%s_metabox.php\", dirname(__FILE__), self::POST_TYPE));\t\t\t\n\t\t}", "function add_meta_box() {\n global $post;\n\n $post_types = get_post_types( array( 'public' => true ) );\n\n if ( !empty( $post ) ) {\n if ( $this->check_user_analytics_exist( $post ) ) {\n foreach ( $post_types as $post_type ) {\n add_meta_box( 'show_user_analytics', __( 'Post Author Analytics Info', 'wpuf-pro' ), array( $this, 'render_meta_box_content' ), $post_type, 'advanced', 'high' );\n }\n }\n }\n }", "function snax_mashshare_add_post_types_to_metaboxes( $metaboxes ) {\n\t$metaboxes[0]['pages'][] = 'snax_quiz';\n\treturn $metaboxes;\n}", "final public function add_meta_boxes()\n {\n foreach ((array)$this->GetHooks() as $hook) :\n if (!$hook['edit']) {\n continue;\n }\n foreach ((array)$hook['permalink'] as $post_type) :\n remove_meta_box('tagsdiv-' . $this->Archive, $post_type, 'side');\n remove_meta_box($this->Archive . 'div', $post_type, 'side');\n endforeach;\n endforeach;\n }", "public function add_meta_box(){\n\t\t\n\t\t/**\n\t\t * Includes our array of post types\n\t\t */\n\t\tinclude( 'q-and-a-post-types.php' );\n\t\t\n\t\tforeach ( $q_and_a_post_types as $post_type ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'q-and-a',\n\t\t\t\t'Questions and Answers',\n\t\t\t\tarray( $this, 'display_meta_box' ),\n\t\t\t\t$post_type, \n\t\t\t\t'normal',\n\t\t\t\t'default'\n\t\t\t);\n\t\t}\n\t}", "function sample_add_metabox() {\n\tadd_meta_box(\n\t\t'post-notes',\n\t\t__( 'Post Notes', 'textdomain' ),\n\t\t'sample_render_metabox',\n\t\t'post',\n\t\t'normal',\n\t\t'default'\n\t);\n}", "function siteorigin_panels_metaboxes() {\n\tforeach( siteorigin_panels_setting( 'post-types' ) as $type ){\n\t\tadd_meta_box( 'so-panels-panels', __( 'Page Builder', 'positive-panels' ), 'siteorigin_panels_metabox_render', $type, 'advanced', 'high' );\n\t}\n}", "function add_meta_boxes() {\n\t\t$post_types = get_post_types();\n\t\tif($post_types) :\n\t\t\tforeach($post_types as $post_type) :\n\t\t\t\tif(post_type_supports($post_type,'sliders')) :\n\t\t\t\t\t//It's supported!\n\t\t\t\t\tadd_meta_box('tw-sliders-box',__('Sliders','tw-sliders'),array($this,'manage_sliders'),$post_type,'normal','high');\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\tendif;\n\t}", "function ppc_add_custom_metaboxes(){\n add_meta_box('my_meta_box_id','Post Submission Actions','ppc_post_submission','ppclps','normal','high');\n}", "public function registerMetaBox() {\n\n add_meta_box(\n 'post-clone',\n 'Clone',\n array($this, 'buildForm'),\n self::$post_types,\n 'side',\n 'low');\n }", "public function add_meta_box() {\n\t\tadd_meta_box(\n\t\t\t 'related_posts_meta_box'\n\t\t\t,__( 'Related Posts', self::LANG )\n\t\t\t,array( &$this, 'render_meta_box_content' )\n\t\t\t,'post'\n\t\t\t,'advanced'\n\t\t\t,'high'\n\t\t);\n\t}", "function pavi_post_meta_boxes_setup() {\n add_action( 'add_meta_boxes', 'pavi_textarea_meta_boxes' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'pavi_save_post_class_meta', 10, 2 );\n}", "public static function add_meta_boxes() {\n\t\tadd_meta_box( 'replycontextdiv', __( 'Use post to reply to other articles?', 'reply_context' ), array( 'ReplyContextPlugin', 'reply_context_meta_box' ) );\n\t}", "function addPostMetaboxes() {\n\t\t$assignment_meta = get_post_meta($_GET['post'], '_lepress-assignment-meta', true);\n\t\tif($this->checkPermissions() && !isSet($_GET['p']) && !$assignment_meta) {\n\t\t\tadd_meta_box('lepress-assignment-metabox', 'Assignment', array(&$this, 'fillAssignmentMetabox'), 'post', 'side', 'high');\n\t\t}\n\t}", "function mobile_kiosk_add_post_meta_boxes() {\n\t\n\t// Gallery Options\n\tadd_meta_box(\n\t\t'gallery-options',\n\t\tesc_html__( 'Gallery Options', 'gallery-options' ),\n\t\t'mobile_kiosk_gallery_options_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'high' \n\t);\n\t\n\t// Gallery Slides\n\tadd_meta_box(\n\t\t'gallery-slides',\n\t\tesc_html__( 'Gallery Slides', 'gallery-slides' ),\n\t\t'mobile_kiosk_gallery_slides_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'low' \n\t);\n\t\n}", "function wp_nav_menu_post_type_meta_boxes()\n {\n }", "public function metabox_start( $post ) {\n\t\t\tif ( ! $post ) global $post;\n\n\t\t\tif ( ! in_array( $post->post_type, $this->_meta_box['pages'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$pageTpl = null;\n\t\t\t$tabbed = ( $this->_meta_box['tabs'] ) ? ( ' jquery-ui-tabs' ) : ( '' );\n\t\t\t$metaFields = $this->_fields;\n\n\t\t\tif ( 'page' == $post->post_type ) {\n\t\t\t\t$pageTpl = get_post_meta( $post->ID, '_wp_page_template', true );\n\t\t\t\tif ( $post->ID == get_option( 'page_for_posts' ) )\n\t\t\t\t\t$pageTpl = 'blog-page';\n\t\t\t}\n\n\t\t\twp_nonce_field( 'wm-' . $post->post_type . '-metabox-nonce', $post->post_type . '-metabox-nonce' );\n\n\t\t\t//display meta box form HTML\n\t\t\t$out = '<div class=\"wm-wrap meta meta-special' . $tabbed . '\">';\n\n\t\t\t\t//tabs\n\t\t\t\tif ( $tabbed ) {\n\t\t\t\t\t$out .= '<ul class=\"tabs no-js\">';\n\t\t\t\t\t$out .= '<li class=\"item-0 visual-editor\"><a href=\"#wm-meta-visual-editor\">' . __( 'Content', 'clifden_domain_adm' ) . '</a></li>';\n\t\t\t\t\t$i = 0;\n\t\t\t\t\tforeach ( $metaFields as $tab ) {\n\t\t\t\t\t\tif ( 'section-open' == $tab['type'] ) {\n\t\t\t\t\t\t\t$hideThis = null;\n\t\t\t\t\t\t\tif ( 'page' == $post->post_type && isset( $tab['exclude'] ) && in_array( $pageTpl, $tab['exclude'] ) ) {\n\t\t\t\t\t\t\t\t$hideThis = ' hide';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$out .= '<li class=\"item-' . ++$i . $hideThis . ' ' . $tab['section-id'] . '\"><a href=\"#wm-meta-' . $tab['section-id'] . '\">' . $tab['title'] . '</a></li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$out .= '</ul> <!-- /tabs -->';\n\t\t\t\t}\n\n\t\t\techo $out;\n\n\t\t\t$editorTabContent = array(\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"section-open\",\n\t\t\t\t\t\"section-id\" => \"visual-editor\",\n\t\t\t\t\t\"exclude\" => array( 'page-template/redirect.php', 'tpl-redirect.php' )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t//Content\n\t\t\twm_render_form( $editorTabContent, 'meta', $pageTpl );\n\t\t}", "public function add_meta_box() {\r\n\r\n\t\tif( ! is_wp_error( $this->tax_obj ) && isset($this->tax_obj->object_type ) ) foreach ( $this->tax_obj->object_type as $post_type ):\r\n\t\t\t$label = $this->tax_obj->labels->name;\r\n\t\t\t$id = ! is_taxonomy_hierarchical( $this->taxonomy ) ? 'radio-tagsdiv-'.$this->taxonomy : 'radio-' .$this->taxonomy .'div' ;\r\n\t\t\tadd_meta_box( $id, $label ,array( $this,'metabox' ), $post_type ,'side','core', array( 'taxonomy'=>$this->taxonomy ) );\r\n\t\tendforeach;\r\n\t}", "public function add_metabox() {\r\n\t\tadd_meta_box(\r\n\t\t\t'stats', // ID\r\n\t\t\t'Stats', // Title\r\n\t\t\tarray(\r\n\t\t\t\t$this,\r\n\t\t\t\t'meta_box', // Callback to method to display HTML\r\n\t\t\t),\r\n\t\t\t'spam-stats', // Post type\r\n\t\t\t'normal', // Context, choose between 'normal', 'advanced', or 'side'\r\n\t\t\t'core' // Position, choose between 'high', 'core', 'default' or 'low'\r\n\t\t);\r\n\t}", "public function kiwip_add_meta_box(){\t\t\t\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->title,\n\t\t\tarray(&$this, 'kiwip_metabox_callback'),\n\t\t\t$this->cpt_name,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\t}", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Translation',\n\t\t\t'Translation',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'meta_box',\n\t\t\t),\n\t\t\t'words',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "function careers_metabox() {\n\t\t\tforeach (careers_fields() as $key => $value) {\n\t\t\t\t$id = 'careers_'.$value['slug'];\n\t\t\t\t$title = __( $value['name'], 'careers_textdomain' );\n\t\t\t\tadd_meta_box($id, $title, 'careers_callback', 'Careers', 'normal', 'low',$value);\n\t\t\t}\n\t\t}", "function agnosia_post_meta_boxes_setup() {\r\n\r\n\t\t/* Add meta boxes on the 'add_meta_boxes' hook. */\r\n\t\tadd_action( 'add_meta_boxes', 'agnosia_add_post_meta_boxes' );\r\n\r\n\t\t/* Save post meta on the 'save_post' hook. */\r\n\t\tadd_action( 'save_post', 'agnosia_save_post_meta', 10 , 2 );\r\n\r\n\t}", "public function add_meta_boxes() {\n global $current_screen;\n\n $page_main = $this->_admin_pages['swpm'];\n\n if ($current_screen->id == $page_main && isset($_REQUEST['form'])) {\n add_meta_box('swpm_form_items_meta_box', __('Form Items', 'swpm-form-builder'), array(&$this, 'meta_box_form_items'), $page_main, 'side', 'high');\n }\n }", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "public function add_meta_boxes() {\n\t\t\t// Address\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_address', \n\t\t\t\t'Adresse',\n\t\t\t\tarray( $this, 'meta_box_address' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Location\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_location', \n\t\t\t\t'Location',\n\t\t\t\tarray( $this, 'meta_box_location' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Geodata\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_geodata', \n\t\t\t\t'Geodaten',\n\t\t\t\tarray( $this, 'meta_box_geodata' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Date\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_dates', \n\t\t\t\t'Datum und Zeit der Meetups',\n\t\t\t\tarray( $this, 'meta_box_date' ),\n\t\t\t\t'wpmeetups', 'advanced', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Gallery\n\t\t\tadd_meta_box(\n\t\t\t\t'meetup_gallery',\n\t\t\t\t'Gallerie',\n\t\t\t\tarray( $this, 'meta_box_gallery' ),\n\t\t\t\t'wpmeetups', 'advanced', 'default'\n\t\t\t);\n\t\t}", "function addPostMetaboxes() {\n\t\t$assignment_meta = get_post_meta($_GET['post'], '_lepress-assignment-meta', true);\n\t\tif(isSet($_GET['p']) || $assignment_meta) {\n\t\t\tadd_meta_box('lepress-submission-metabox', __('Submission', lepress_textdomain), array(&$this, 'fillAssignmentMetabox'), 'post', 'side', 'high');\n\t\t}\n\t}", "function wck_add_metabox() {\r\n\t\t\r\n\t\tglobal $pb_wck_pages_hooknames;\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' ){\r\n\t\t\tif( $this->args['post_id'] == '' && $this->args['page_template'] == '' ){\r\n\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $this->args['post_type'], $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );\r\n\t\t\t\t/* add class to meta box */\r\n\t\t\t\tadd_filter( \"postbox_classes_\".$this->args['post_type'].\"_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t}\r\n\t\t\telse{\t\t\t\t\r\n\t\t\t\tif( !empty( $_GET['post'] ) )\r\n\t\t\t\t\t$post_id = filter_var( $_GET['post'], FILTER_SANITIZE_NUMBER_INT );\r\n\t\t\t\telse if( !empty( $_POST['post_ID'] ) )\r\n\t\t\t\t\t$post_id = filter_var( $_POST['post_ID'], FILTER_SANITIZE_NUMBER_INT );\r\n\t\t\t\telse \r\n\t\t\t\t\t$post_id = '';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\tif( $this->args['post_id'] != '' && $this->args['page_template'] != '' ){\r\n\t\t\t\t\t$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);\t\t\t\t\r\n\t\t\t\t\tif( $this->args['post_id'] == $post_id && $template_file == $this->args['page_template'] )\r\n\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), 'page', $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array'] ) );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\tadd_filter( \"postbox_classes_page_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t\tif( $this->args['post_id'] != '' ){\r\n\t\t\t\t\t\tif( $this->args['post_id'] == $post_id ){\r\n\t\t\t\t\t\t\t$post_type = get_post_type( $post_id );\r\n\t\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $post_type, $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array'] ) );\r\n\t\t\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\t\t\tadd_filter( \"postbox_classes_\".$post_type.\"_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\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\tif( $this->args['page_template'] != '' ){\r\n\t\t\t\t\t\t$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);\t\r\n\t\t\t\t\t\tif ( $template_file == $this->args['page_template'] ){\r\n\t\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), 'page', $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );\r\n\t\t\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\t\t\tadd_filter( \"postbox_classes_page_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\telse if( $this->args['context'] == 'option' ){\r\n if( !empty( $pb_wck_pages_hooknames[$this->args['post_type']] ) ) {\r\n add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array(&$this, 'wck_content'), $pb_wck_pages_hooknames[$this->args['post_type']], $this->args['mb_context'], 'high', array('meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']));\r\n /* add class to meta box */\r\n add_filter(\"postbox_classes_\" . $pb_wck_pages_hooknames[$this->args['post_type']] . \"_\" . $this->args['metabox_id'], array(&$this, 'wck_add_metabox_classes'));\r\n }\r\n\t\t}\r\n\t}", "function post_meta_boxes_setup() {\n\n\t\tadd_action( 'add_meta_boxes', array($this, 'add_post_meta_boxes') );\n\t}", "public function register_meta_boxes()\n {\n }", "function add_press_metaboxes() {\n\tadd_meta_box('wpt_press_link', 'Relevant link', 'wpt_press_link', 'press', 'normal', 'default');\n\tadd_meta_box('wpt_press_date', 'Publication date', 'wpt_press_date', 'press', 'normal', 'default');\n\tadd_meta_box('wpt_press_type', 'Publication type', 'wpt_press_type', 'press', 'side', 'default');\n \n}", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "function post_custom_meta_box($post)\n {\n }", "function coolRahulSoni_meta_box_add()\n{\n add_meta_box( 'my-meta-box-id', 'My First Meta Box', 'cd_meta_box_cb', 'post', 'normal', 'high' );\n}", "function custom_meta_box($object)\n {\n wp_nonce_field(basename(__FILE__), \"meta-box-nonce\");\n\n ?>\n <div class=\"MetaHeader\"><p><b>Appear Post</b></p>\n <div>\n\n <label for=\"Main_Posts\">Main Posts</label>\n <?php\n /*------- Add CheckBox To Appear The Post In Main Posts Area --------*/\n $Main_value = get_post_meta($object->ID, \"Main_Posts\", true);\n\n if($Main_value == \"\")\n {\n ?>\n <input name=\"Main_Posts\" type=\"checkbox\" value=\"main\">\n <?php\n }\n else if($Main_value == \"main\")\n {\n ?> \n <input name=\"Main_Posts\" type=\"checkbox\" value=\"main\" checked>\n <?php\n }\n ?>\n </div>\n\n <div>\n\n <label for=\"Features_Posts\">Features Posts</label>\n <?php\n /*------- Add CheckBox To Appear The Post In Feature Posts Area --------*/\n $Feature_value = get_post_meta($object->ID, \"Features_Posts\", true);\n\n if($Feature_value == \"\")\n {\n ?>\n <input name=\"Features_Posts\" type=\"checkbox\" value=\"feature\">\n <?php\n }\n else if($Feature_value == \"feature\")\n {\n ?> \n <input name=\"Features_Posts\" type=\"checkbox\" value=\"feature\" checked>\n <?php\n }\n ?>\n </div>\n <p><b>Type Of Post</b></p>\n <div>\n\n <label for=\"Local_Posts\">Local Posts</label>\n <?php\n /*------- Add CheckBox To Check If The Type Of The Post Is Local --------*/\n $Local_value = get_post_meta($object->ID, \"Local_Posts\", true);\n\n if($Local_value == \"\")\n {\n ?>\n <input name=\"Local_Posts\" type=\"checkbox\" value=\"local\">\n <?php\n }\n else if($Local_value == \"local\")\n {\n ?> \n <input name=\"Local_Posts\" type=\"checkbox\" value=\"local\" checked>\n <?php\n }\n ?>\n </div>\n\n <div>\n\n <label for=\"World_Posts\">World Posts</label>\n <?php\n /*------- Add CheckBox To Check If The Type Of The Post Is World --------*/\n $World_value = get_post_meta($object->ID, \"World_Posts\", true);\n \n if($World_value == \"\")\n {\n ?>\n <input name=\"World_Posts\" type=\"checkbox\" value=\"world\">\n <?php\n }\n else if($World_value == \"world\")\n {\n ?> \n <input name=\"World_Posts\" type=\"checkbox\" value=\"world\" checked>\n <?php\n }\n ?>\n </div>\n </div>\n <?php \n }", "public function metabox( $post, $box ) {\r\n\t\t$defaults = array('taxonomy' => 'category');\r\n\t\tif ( !isset($box['args']) || !is_array($box['args']) )\r\n\t\t\t$args = array();\r\n\t\telse\r\n\t\t\t$args = $box['args'];\r\n\t\textract( wp_parse_args($args, $defaults), EXTR_SKIP );\r\n\r\n\t\t$tax = get_taxonomy($taxonomy);\r\n\r\n\t\t//get current terms\r\n\t\t$checked_terms = $post->ID ? get_the_terms( $post->ID, $taxonomy) : array();\r\n\r\n\t\t//get first term object\r\n $current_term = ! empty( $checked_terms ) && ! is_wp_error( $checked_terms ) ? array_pop( $checked_terms ) : false;\r\n $current_id = ( $current_term ) ? $current_term->term_id : '';\r\n\r\n\t\t?>\r\n\t\t<div id=\"taxonomy-<?php echo $taxonomy; ?>\" class=\"radio-buttons-for-taxonomies\">\r\n\t\t\t<ul id=\"<?php echo $taxonomy; ?>-tabs\" class=\"category-tabs\">\r\n\t\t\t\t<li class=\"tabs\"><a href=\"#<?php echo $taxonomy; ?>-all\" tabindex=\"3\"><?php echo $tax->labels->all_items; ?></a></li>\r\n\t\t\t\t<li class=\"hide-if-no-js\"><a href=\"#<?php echo $taxonomy; ?>-pop\" tabindex=\"3\"><?php _e( 'Most Used' ); ?></a></li>\r\n\t\t\t</ul>\r\n\r\n\t\t\t<style>\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.categorychecklist, .radio-buttons-for-taxonomies ul.tagchecklist { margin: 0; }\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.children { margin-left: 18px; }\r\n\t\t\t</style>\r\n\r\n\t\t\t<?php wp_nonce_field( 'radio_nonce-' . $taxonomy, '_radio_nonce-' . $taxonomy ); ?>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-pop\" class=\"wp-tab-panel tabs-panel\" style=\"display: none;\">\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist-pop\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\" >\r\n\t\t\t\t\t<?php $popular = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );\r\n\r\n\t\t\t\t\t\tif ( ! current_user_can($tax->cap->assign_terms) )\r\n\t\t\t\t\t\t\t$disabled = 'disabled=\"disabled\"';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$disabled = '';\r\n\r\n\t\t\t\t\t\t$popular_ids = array(); ?>\r\n\r\n\t\t\t\t\t\t<?php foreach( $popular as $term ){\r\n\r\n\t\t\t\t\t\t\t$popular_ids[] = $term->term_id;\r\n\r\n\t\t\t\t\t $value = is_taxonomy_hierarchical( $taxonomy ) ? $term->term_id : $term->slug;\r\n\t\t\t\t\t $id = 'popular-'.$taxonomy.'-'.$term->term_id;\r\n\r\n\t\t\t\t\t echo \"<li id='$id'><label class='selectit'>\";\r\n\t\t\t\t\t echo \"<input type='radio' id='in-{$id}'\" . checked( $current_id, $term->term_id, false ) . \" value='{$value}' {$disabled} />&nbsp;{$term->name}<br />\";\r\n\r\n\t\t\t\t\t echo \"</label></li>\";\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-all\" class=\"wp-tab-panel tabs-panel\">\r\n\t\t\t\t<?php\r\n\t $name = 'radio_tax_input[' . $taxonomy . ']';\r\n\t echo \"<input type='hidden' name='{$name}[]' value='0' />\"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.\r\n\t ?>\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist\" data-wp-lists=\"list:<?php echo $taxonomy?>\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\">\r\n\t\t\t\t\t<?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t<?php if ( current_user_can( $tax->cap->edit_terms ) ) : ?>\r\n\t\t\t\t<div id=\"<?php echo $taxonomy; ?>-adder\" class=\"wp-hidden-children\">\r\n\t\t\t\t\t<h4>\r\n\t\t\t\t\t\t<a id=\"<?php echo $taxonomy; ?>-add-toggle\" href=\"#<?php echo $taxonomy; ?>-add\" class=\"hide-if-no-js\" tabindex=\"3\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t/* translators: %s: add new taxonomy label */\r\n\t\t\t\t\t\t\t\tprintf( __( '+ %s' ), $tax->labels->add_new_item );\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t</h4>\r\n\t\t\t\t\t<p id=\"<?php echo $taxonomy; ?>-add\" class=\"category-add wp-hidden-child\">\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>\"><?php echo $tax->labels->add_new_item; ?></label>\r\n\t\t\t\t\t\t<input type=\"text\" name=\"new<?php echo $taxonomy; ?>\" id=\"new<?php echo $taxonomy; ?>\" class=\"form-required form-input-tip\" value=\"<?php echo esc_attr( $tax->labels->new_item_name ); ?>\" aria-required=\"true\"/>\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>_parent\">\r\n\t\t\t\t\t\t\t<?php echo $tax->labels->parent_item_colon; ?>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t<?php if( is_taxonomy_hierarchical($taxonomy) ) {\r\n\t\t\t\t\t\t\twp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $tax->labels->parent_item . ' &mdash;', 'tab_index' => 3 ) );\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t<input type=\"button\" id=\"<?php echo $taxonomy; ?>-add-submit\" data-wp-lists=\"add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add\" class=\"button <?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'category-add-submit'; } else { echo 'radio-add-submit';} ?>\" value=\"<?php echo esc_attr( $tax->labels->add_new_item ); ?>\" tabindex=\"3\" />\r\n\t\t\t\t\t\t<?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy ); ?>\r\n\t\t\t\t\t\t<span id=\"<?php echo $taxonomy; ?>-ajax-response\"></span>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t</div>\r\n\t<?php\r\n\t}", "function add_metabox() {\n\tadd_meta_box(\n\t\t'external-connection-groups',\n\t\t__( 'External Connection Groups', 'distributor' ),\n\t\t__NAMESPACE__ . '\\render_metabox',\n\t\t\\Distributor\\Waves\\get_distributable_custom_post_types(),\n\t\t'side',\n\t\t'high'\n\t);\n\n}", "function toolbox_portfolio_meta_boxes_setup() {\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'toolbox_add_portfolio_meta_box' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'toolbox_portfolio_save_info', 10, 2 );\n}", "function carrousel_metaboxes(){\n add_meta_box(\"MonCarrousel\", \"lien\", \"carrousel_metabox\");\n}", "function AP_Meta_Box_Setup() {\n\tadd_action('add_meta_boxes','AP_Meta_Box_Add');\n\n\tadd_action( 'save_post', 'AP_Meta_Box_Save', 10, 2 );\n}", "function add_dish_metaboxes()\r\n{\r\n\tadd_meta_box( 'price', __('Price'), 'edit_price_box', 'dish', 'normal');\t\r\n}", "function add_post_meta_box( ) {\n\t\t\tadd_meta_box('Course-Information', __( 'Course Information', $this->plugin_domain), array($this, 'setup_meta_english'), 'public-courses', 'normal', 'high');\n\t\t\tadd_meta_box('Arabic-Translations', __( 'Arabic Translations', $this->plugin_domain), array($this, 'setup_meta_translation'), 'public-courses', 'normal', 'high');\n\t\t\tadd_meta_box('Course-Dates', __( 'Course Dates', $this->plugin_domain), array($this, 'setup_meta_dates'), 'public-courses', 'normal', 'high');\n\t\t}", "public static function action_add_meta_boxes( $post ) {\n remove_meta_box( 'wpseo_meta', 'th_domain', 'normal' );\n remove_meta_box( 'wordpress-https', 'th_domain', 'side' );\n add_meta_box( 'th-domain-info', __( 'Domain Information', 'th' ), array( __CLASS__, 'mb_info' ), 'th_domain', 'normal', 'core' );\n add_meta_box( 'th-domain-dns', __( 'DNS Records', 'th' ), array( __CLASS__, 'mb_dns' ), 'th_domain', 'normal', 'core' );\n }", "function add_custom_fields_meta_box( $posttypes , $custom_field_set , $custom_field_item )\n\t{\n\t\tif( $custom_field_set == 'sliders' ) \n\t\t\t$this->slider_field_item = $custom_field_item != '' ? $custom_field_item : 'base';\n\t\t\t\n\t\t\tadd_action('add_meta_boxes', function() use( $posttypes, $custom_field_set , $custom_field_item ) {\n\t\t\t\t\t\n\t\t\t\t$custom_field_item_info = include( get_template_directory().'/module/'.$custom_field_set.'/'.$custom_field_item.'/config.details.php' );\n\n\t\t\t\tforeach ($posttypes as $key => $posttype_section ) {\n\t\t\t\t\t\n\t\t\t\t\tadd_meta_box('custom_post_type_section_'.$posttype_section . '-' . $custom_field_item , $custom_field_item_info['title'], function() use( $custom_field_set , $custom_field_item ){\n\n\t\t\t\t\t\t\t$custom_fields = $this->get_fields( $custom_field_set , $custom_field_item );\n\t\t\t\t\t\t\t$data['type'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['dir'] = array('module',$custom_field_set , $custom_field_item , 'admin' ,'views');\n\t\t\t\t\t\t\t$data['view'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['customfields'] = $custom_fields;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tload_view( $data );\n\n\t\t\t\t\t}, $posttype_section );\n\n\t\t\t\t}\n\t\t});\n\n\t\t$this->save_post( $custom_field_set , $custom_field_item );\n\t}", "function df_meta_boxes( ) {\n\t\tglobal $post, $df_box_objects;\n\t\tforeach( $df_box_objects as $df_box ) {\n\t\t\t\n\t\t\t//Get current post type. If is a revision - get parent post type.\n\t\t\t$post_type = get_post_type( $post->ID );\n\t\t\tif( $post_type == 'revision' ) {\n\t\t\t\tglobal $post;\n\t\t\t\t$post_type = get_post_type( $post->post_parent );\n\t\t\t}\t\t\n\t\t\t\n\t\t\tif( in_array( $post_type, $df_box->post_types ) ) :\n\t\t\t\tforeach( $df_box->post_types as $post_type ) {\n\t\t\t\t\tadd_meta_box( $df_box->id . \"_box\", $df_box->title, 'df_meta_fields', $post_type, 'side', 'low', $df_box );\n\t\t\t\t}\n\t\t\tendif;\n\t\t}\n\t}", "public static function add_to_wc_metabox(){\n global $post;\n\n echo '<div class=\"options_group\">';\n\n echo woocommerce_wp_checkbox( array(\n 'id' => '_only_item_in_cart',\n 'label' => __( 'Only Item In Cart' ) ,\n 'description' => __( 'For special items that need to be purchased individually.', 'wc-only-item-in-cart' )\n )\n );\n\n echo '</div>';\n\n }", "function show_my_meta_box( $post ) {\n\t\t\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . 'civ_slider';\n\t\t$row_count = $wpdb->get_var( 'select count(*) from $table_name' );\n\t\t$slide_count = $row_count + 1;\n\t\t$post_id_check = $post->ID;\n\n\t\t$box_check = $wpdb->get_row($wpdb->prepare(\"select * from $table_name where post_id=%d\", $post_id_check));\n?>\n\t<form method=\"post\" >\n\t\t<label>Check here to add post to homepage slider: </label>\n\t\t<input type=\"checkbox\" name=\"chkd\" <?php if($box_check != null ){echo \"checked\";} ?> />\n\t\t<input type=\"hidden\" value=\"<?php echo $post->ID; ?>\" name=\"post_id\" />\n\t\t<input type=\"hidden\" value=\"<?php echo $slide_count; ?>\" name=\"slide_order\" />\n\t</form>\n\t\t<?php\n\t}", "function ppes_admin_init(){\r\n\tadd_meta_box(\"et_post_meta\", \"ET Settings\", \"et_post_meta\", \"auctions\", \"normal\", \"high\");\r\n}" ]
[ "0.80718267", "0.7958561", "0.7905715", "0.74339986", "0.73729384", "0.7287924", "0.72368675", "0.72339725", "0.7225989", "0.7223426", "0.7219713", "0.72196716", "0.7203484", "0.7197258", "0.7191029", "0.71728545", "0.7171", "0.7166859", "0.71480656", "0.713828", "0.7113409", "0.71067536", "0.70958346", "0.7095249", "0.70793504", "0.70777166", "0.7073085", "0.7063423", "0.70516473", "0.7045606", "0.7025787", "0.70199424", "0.70160407", "0.70083356", "0.6989648", "0.69876975", "0.6982394", "0.69716823", "0.6960202", "0.69553393", "0.69453603", "0.69357747", "0.69335836", "0.6932462", "0.69173247", "0.68949", "0.68942726", "0.6894121", "0.68874073", "0.68843436", "0.6868237", "0.6866688", "0.68513113", "0.6848485", "0.6839865", "0.6839361", "0.68363327", "0.6834343", "0.6832259", "0.68274474", "0.6813384", "0.6810876", "0.68092895", "0.68057644", "0.6795492", "0.67930144", "0.6791645", "0.67885536", "0.67838115", "0.6782847", "0.6770575", "0.6770227", "0.67684025", "0.67652273", "0.676326", "0.6757068", "0.67452234", "0.67443144", "0.67422676", "0.67381614", "0.67242235", "0.6713353", "0.6709441", "0.6705295", "0.6703287", "0.6700971", "0.66932064", "0.66744226", "0.6661684", "0.66608304", "0.6660506", "0.66586894", "0.66530037", "0.6650208", "0.66478485", "0.6636177", "0.66358936", "0.66349876", "0.6632683", "0.6624745", "0.66229904" ]
0.0
-1
return $this>morphToMany('App\Place', 'placeable')>withPivot('place_name', 'title', 'intro', 'deep', 'comment');
public function places() { $p = $this ->morphToMany('App\Place', 'placeable') ->withPivot('id', 'place_id', 'placeable_type', 'placeable_id', 'deep', 'comment') ->using(Placeable::class); return $p; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function places()\n {\n return $this->belongsToMany('App\\Models\\Admin\\Place\\Place');\n }", "public function objects() {\n \t// return call_user_func_array($this->belongsToMany('Object')->withPivot, static::$pivotColumns);\n return $this->belongsToMany('Object')\n ->withPivot('subdivision', 'time', 'place', 'form');\n }", "public function places()\r\n {\r\n return $this->belongsTo('App\\Place');\r\n }", "public function morphologys()\n {\n return $this->belongsToMany('App\\SkeletalElement', 'se_morphology', 'morphology_id', 'se_id')\n ->withoutGlobalScope(ProjectScope::class)\n ->withPivot('se_id', 'morphology_id', 'org_id', 'project_id', 'created_by', 'updated_by')\n ->withTimestamps();\n }", "public function favorite()\n {\n return $this->belongsToMany(Realestate::class,'favourites')->withPivot('user_id', 'property_id');\n }", "public function pokemon()\n {\n return $this->belongsToMany('App\\Pokemon');\n }", "public function morphologys2()\n {\n return $this->belongsToMany('App\\SkeletalElement', 'se_morphology', 'morphology_id', 'se_id')\n ->withoutGlobalScope(ProjectScope::class)\n ->withPivot('se_id', 'morphology_id', 'org_id', 'project_id', 'created_by', 'updated_by')\n ->withTimestamps();\n }", "public function metas()\n {\n return $this->morphMany('App\\Meta','metable');\n }", "public function pivot()\n {\n $pivot = new Pivot($this->joining, $this->model->connection());\n return new HasMany($this->base, $pivot, $this->foreign_key());\n }", "public function morphologys1()\n {\n return $this->belongsToMany('App\\SkeletalElement', 'se_morphology', 'se_id', 'morphology_id')\n ->withoutGlobalScope(ProjectScope::class)\n ->withPivot('se_id', 'morphology_id', 'org_id', 'project_id', 'created_by', 'updated_by')\n ->withTimestamps();\n }", "public function place()\n {\n return $this->belongsTo(\\App\\Models\\Place\\Place::class, 'place_id');\n }", "public function pagos()\n {\n return $this->belongsToMany('DSIproject\\Pago', 'alumno_pago')\n ->withPivot('pago')\n ->withTimestamps();\n }", "public function products()\n {\n return $this->belongsToMany('App\\Models\\Product')->withPivot('feature_value');\n }", "public function place()\n {\n return $this->belongsTo('Model\\Place');\n }", "public function vehicle()\n {\n return $this->belongsToMany(Vehicle::class, 'nodeVehicle', 'relNodeId', 'relVehicleId')\n ->using(new class extends Pivot {\n use UuidModelTrait;\n });\n }", "public function paris() {\n $relation = $this->hasMany(\"Paris\");\n return $relation;\n }", "public function extras()\n {\n return $this->belongsToMany('App\\DescriptionExtra','description_description_category_column','description_id','column_id')\n ->withPivot('value');\n }", "public function spots()\n {\n return $this->belongsToMany(Spot::class);\n }", "public function parientes()\n {\n return $this->belongsToMany('CBA\\Pariente', 'estudiante_pariente', 'id_estudiantes', 'id_parientes')\n ->withPivot('es_representante');\n }", "public function posters()\n {\n return $this->belongsToMany(\"App\\Poster\")->withPivot('order')->orderBy('order');\n }", "public function ventas()\n {\n \treturn $this->belongsToMany(Ventas::class, 'venta_motor', 'motor_id', 'venta_id')\n \t\t\t\t->withPivot('venta_id', 'cantidad');\t\n }", "public function orders(): BelongsToMany\n {\n return $this->belongsToMany(Order::class)->withPivot('name', 'price', 'quantity');\n }", "public function items()\n {\n return $this->belongsToMany(Item::class, 'ride_item')\n ->using(RideItem::class)\n ->withPivot([\n 'id', \n 'status', \n 'place', \n 'type', \n 'order', \n 'distance', \n 'distance_value', \n 'duration',\n 'duration_value',\n 'direction',\n 'leg',\n\t\t\t\t\t\t'arrived_at', \n\t\t\t\t\t\t'start_at',\n\t\t\t\t\t\t'started_at',\n\t\t\t\t\t\t'canceled_at',\n\t\t\t\t\t\t'completed_at',\n ])->orderBy('order', 'asc');\n }", "public function place()\n {\n return $this->belongsTo(place::class, 'place_id', 'id');\n }", "public function routes()\n {\n\n return $this->belongsToMany(Stations::class, 'route_stops' , 'stop_point' , ' route_id')->withPivot('stop_order', 'created_at', 'updated_at');\n\n }", "public function likes() {\n return $this->morphMany('App\\Like', 'likeable');\n }", "public function photos(){\n return $this->morphMany('App\\Models\\Photo','image');\n \n }", "public function peliculas(){\n //retornar tipo de relacion\n return $this->belongsToMany('App\\Pelicula','pelicula_director');\n }", "public function sorts(){\n return $this->belongsToMany(Sort::class, 'bouquet_sort', 'bouquet_id');\n }", "public function sponsors(){\n return $this->belongsToMany('App\\Sponsor')->withPivot('points_balance');\n }", "public function employee()\n {\n return $this->belongsToMany('App\\Models\\Employee')->withPivot('data');\n }", "public function houses(){\n return $this->belongsToMany(House::class);\n }", "public function docentes(){\n return $this->belongsToMany('App\\Docente', 'asignatura_docente_grupo')\n ->withPivot('asignatura_id', 'responsable');\n }", "public function types()\n {\n return $this->belongsToMany(Type::class, 'pokemon_type', 'pokemon_id', 'type_id')->select(['type_id', 'name']);\n }", "public function teams()\n {\n return $this->belongsToMany('App\\Team')->withPivot('isCaptain');\n }", "public function bus() \r\n {\r\n return $this->belongsToMany('Bus')->withPivot('id', 'arrival_time', 'arrival_time2');\r\n }", "public function pharmacies(){\n return $this->hasMany('App\\Pharmacie');\n }", "public function product()\n\t{\n\t\treturn $this->belongsToMany('App\\Models\\Products','inventory','store_id','product_id')->withPivot('stocks', 'lower_limit', 'higher_limit');\n\t}", "public function item() {\n return $this->belongsToMany('App\\item');\n }", "public function games(){\n\t\treturn $this->belongsToMany('App\\Game','favorite_games');\n\t}", "PUBLIC function productos(){\n return $this->belongsToMany(Producto::class)->withPivot(['cantidad']);\n }", "public function platforms() {\n return $this->belongsToMany('Rockit\\Models\\Platform', 'sharings')->withTrashed()\n ->withPivot('url');\n }", "public function tags(){\n return $this->morphToMany('App\\Models\\Tag','taggable');\n\n }", "public function Prodotto()\n {\n return $this->belongsToMany('App\\models\\Prodotto',\n 'App\\models\\Lista','id_cliente',\n 'codice_prodotto','id','codice')\n ->withPivot('quantita_prodotto');\n }", "public function skills() {\n return $this->belongsToMany('Rockit\\Models\\Skill', 'needs')\n ->withPivot('nb_people');\n }", "public function playlists()\n {\n return $this->belongsToMany('App\\Playlist')->withPivot('position');\n }", "public function getHasMany()\n {\n return $this->hasMany;\n }", "public function place(){\n return $this->hasOne(Place::class,'id','place_id');\n }", "public function place(){\n return $this->hasOne(Place::class,'id','place_id');\n }", "public function bulk_items(){\n return $this->belongsToMany('App\\Item','transaction_bulk')\n ->withPivot('quantity', 'unit_price')\n ->withTimestamps();\n }", "public function votos(): HasMany\n {\n return $this->hasMany(VotosModel::class, 'votacao_id', 'id')->orderBy('qtd_votos', 'DESC');\n }", "public function position(){\n return $this->hasMany(Position::class);\n }", "public function products(): MorphToMany;", "public function movies()\n {\n return $this->belongsToMany('App\\Core\\Movies\\Movie');\n }", "public function mobiteli()\n {\n return $this->belongsToMany('App\\Mobitel', 'mobitel_trgovina'); //m:n\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Role', 'role_user')->withTimestamps()->withPivot('game_id');\n }", "public function agresores () \n {\n // \"agresor_denuncia\" pero se llama denuncia_agresor por lo que se debe indicar el nombre de la tabla pivot\n return $this->belongsToMany(Agresor::class, 'denuncia_agresor')->whereNull('denuncia_agresor.deleted_at')->withPivot('tblparentesco_id'); \n // withPivot -> agregar la colunma adicional de la tabla pivot en una relacion muchos a muchos.\n }", "public function projects()\n {\n return $this->belongsToMany('App\\Project')->withPivot('role', 'title');\n }", "public function locations() \n {\n return $this->belongsToMany('App\\Models\\WorldExpansion\\Location', 'event_locations')->withPivot('id');\n }", "public function house()\n {\n return $this->belongsToMany(House::class);\n }", "public function items(){\n \treturn $this->belongsToMany(Item::class);\n }", "public function provincias()\n {\n return $this->belongsToMany(Provincia::class,'projecto__provincias__distritos');\n }", "public function bPelajaran()\n {\n return $this->belongsToMany('App\\Pelajaran');\n }", "public function recruiter(){\n return $this->belongsTo('App\\Models\\Recruiter')->withPivot('Job_title');\n }", "public function tournaments(){\n return $this->belongsToMany('App\\Tournament','tournament_teams')->withTimestamps();\n }", "public function asignacion_pe()\n {\n return $this->belongsToMany('App\\Personal', 'personal_has_asignatura', 'id_seccion','id_personal')->withPivot('id_periodo','id_asignatura');\n }", "public function sons(): HasMany\n {\n return $this->hasMany(Article::class, 'parent_id', 'id');\n // ->with(['post'])->orderBy('pos');\n }", "public function villes()\n {\n return $this->belongsToMany('App\\Models\\Ville', 'sl_produits_villes'); //->whereNull('sl_produits_villes.deleted_at'); // le create_at, updated_at, delete_at ne sont pas stockées sur table pivot.\n }", "public function teams(){\n\t\treturn $this->belongsToMany('App\\Team','part_of');\n\t}", "public function roles(){\n return $this->belongsToMany('cms\\Role')->withPivot('created_at');\n // if not follow naming convention then would need to add extra parameters like so\n // to customize tables and columns follow this format\n // return $this->>belongsToMany('cms\\Role', 'user_roles', 'user_id', 'role_id);\n // if named pivot table user_roles would need to specify these extra FKs since laravel won't know but since we did we don't need to\n\n }", "public function roles()\n {\n return $this->belongsToMany('App\\Role')->withPivot( 'clearance');\n }", "public function pokemon()\n {\n //belongsToMany($related, $table = null, $foreignPivotKey = null, $relatedPivotKey = null,\n //$parentKey = null, $relatedKey = null, $relation = null)\n //return $this->belongsToMany(Pokemon::class, 'users_captured', 'user_id', 'pokemon_id')->withTimestamps();\n return $this->belongsToMany(Pokemon::class, 'users_captured')->withTimestamps();\n }", "public function tags(){\n return $this->belongsToMany(Tag::class);\n// $result = DB::select( select `tags`.*, `\n//tag_thread`.`thread_id` as `pivot_thread_id`, `tag_thread`.`tag_id` as\n// `pivot_tag_id` from `tags` inner join `tag_thread` on `tags`.`id` = `tag_thread`.`tag_id` where `tag\n//_thread`.`thread_id` = 3);\n// $result = DB::statement('SELECT name FROM tags WHERE tags.id = post_tag.tag_id AND post_tag.pos')\n }", "public function alumnos()\n {\n \treturn $this->belongsToMany('App\\Alumno');\n }", "public function categories(){\n\t\treturn $this->belongsToMany('ProductCategory', 'product_pivot_categories');\n\t}", "public function vehicles()\n {\n return $this->belongsToMany('App\\Vehicle');\n }", "public function songs(){\n return $this->belongsToMany(Song::class);\n }", "public function getPivotData(): Collection;", "public function review()\n {\n return $this->belongsToMany(\n 'PMW\\Models\\Proposal',\n 'review',\n 'id_pengguna',\n 'id_proposal')\n ->withPivot('tahap', 'komentar', 'id');\n }", "public function taphonomys()\n {\n return $this->belongsToMany('App\\Taphonomy', 'se_taphonomy', 'se_id', 'taphonomy_id')\n ->withPivot('se_id', 'taphonomy_id', 'created_by', 'updated_by')\n ->withTimestamps();\n }", "public function artefacts()\n {\n return $this->belongsToMany('App\\Artefact');\n }", "public function user()\n {\n return $this->belongsToMany('App\\User')\n ->withPivot('operation','created_at', 'updated_at')\n ->withTimestamps();\n }", "public function pathologys()\n {\n return $this->belongsToMany('App\\Pathology', 'se_pathology', 'se_id', 'pathology_id')\n ->withPivot('id', 'se_id', 'zone_id', 'pathology_id', 'additional_information', 'created_by', 'updated_by')\n ->withTimestamps();\n }", "public function items(){\n return $this->belongsToMany(Item::class, 'item_tag', 'tag_id', 'item_id', 'id', 'id');\n }", "public function users() {\n \treturn $this->belongsToMany('App\\User')->withPivot('vote')->withTimestamps();\n }", "public function imagenes(){\n return $this->belongsToMany(Imagen::class);\n }", "public function pais(){\n return $this->belongsTo('App\\Models\\Pais');//relaciona provincia con pais\n }", "public function genres()\n {\n return $this->belongsToMany('App\\Models\\Genre','post_genres',\n 'post_id','genre_id');\n }", "public function surveys(){\n return $this->belongsToMany('App\\surveys');\n }", "public function friends(){\n return $this->belongsToMany('App\\User', 'friends', 'user_1', 'user_2')->withPivot('status');\n }", "public function canciones() \n {\n return $this->belongsToMany('App\\Cancion',\n \t\t\t\t\t\t\t'canciones_artistas', \n \t\t\t\t\t\t\t'artista_id', \n \t\t\t\t\t\t\t'cancion_id')\n \t\t\t\t\t\t\t->withPivot('invitado'); // Comprobar si se debe añadir 'id'.\n }", "public function songs() {\n return $this->belongsToMany(Song::class, 'schedule')\n ->withPivot('start', 'end');\n }", "public function plans(){\n return $this->belongsToMany('App\\Models\\Plan');\n }", "public function vacante(){\n return $this->belongsToMany('App\\Models\\Vacante');\n }", "public function games ()\n {\n\n $this->belongsToMany ( Game::class );\n\n }", "public function vehiculos()\n {\n return $this->HasMany('Apis\\Vehiculo');\n }", "public function permissions()\n {\n return $this->belongsToMany(Permission::class)->withPivot('has_access');\n }", "public function albums(){\n return $this->belongsToMany(Album::class);\n }", "public function photo()\n {\n return $this->belongsToMany(Photos::class,'photo_product','photo_id', 'product_id');\n }", "public function product_lists()\n {\n return $this->belongsToMany('App\\ProductVariant', 'shopping_list_products', 'shopping_list_id', 'variant_id')\n ->withPivot('quantity', 'branch_id', 'buying_date', 'buying_price')\n ->withTimestamps();\n }" ]
[ "0.72494346", "0.68421024", "0.6529764", "0.64798677", "0.6449216", "0.6425935", "0.6374937", "0.63660985", "0.63582", "0.6348674", "0.63026226", "0.62719196", "0.6235767", "0.62266904", "0.62138927", "0.6202758", "0.61768824", "0.61608773", "0.61602384", "0.61448675", "0.61397076", "0.61369264", "0.61298263", "0.6104301", "0.6102742", "0.6076398", "0.60601807", "0.6054442", "0.6041461", "0.6036998", "0.60296804", "0.6022329", "0.6020013", "0.6007121", "0.5993058", "0.5991345", "0.5969362", "0.5959156", "0.59537965", "0.59469676", "0.59409595", "0.59376955", "0.5914752", "0.5914019", "0.5908507", "0.58995885", "0.5888074", "0.5879062", "0.5879062", "0.5875854", "0.5872988", "0.587165", "0.5860991", "0.5858211", "0.5854298", "0.58499146", "0.5849631", "0.5847717", "0.5840966", "0.5840455", "0.5838831", "0.5834117", "0.5825083", "0.582042", "0.5814031", "0.58124423", "0.58071893", "0.5805532", "0.57994413", "0.5799222", "0.57930005", "0.57802874", "0.57766634", "0.5775729", "0.57738334", "0.5760956", "0.5758625", "0.5753357", "0.5749769", "0.5743195", "0.57426864", "0.57405216", "0.5737362", "0.5735451", "0.57349354", "0.57331747", "0.5720401", "0.57136714", "0.5710065", "0.56986403", "0.56969166", "0.56849295", "0.568352", "0.56826574", "0.56817424", "0.5680896", "0.5677992", "0.56745857", "0.5672761", "0.5671965" ]
0.75706804
0
Run the database seeds.
public function run() { DB::table('cities')->insert( ['name' => str_random(10) ] ); DB::table('cities')->insert( ['name' => 'split' ] ); DB::table('cities')->insert( ['name' => 'razanac' ] ); DB::table('cities')->insert( ['name' => 'zadar' ] ); DB::table('cities')->insert( ['name' => 'dubrovnik' ] ); DB::table('cities')->insert( ['name' => 'zagreb' ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8014072", "0.7980389", "0.7977261", "0.79545176", "0.7951285", "0.7949779", "0.79447794", "0.79427236", "0.7938544", "0.7937133", "0.7933888", "0.7892658", "0.78813094", "0.7879304", "0.78790134", "0.7875582", "0.78718805", "0.7870327", "0.7851507", "0.78506047", "0.7841656", "0.7834773", "0.782799", "0.7819246", "0.7809116", "0.7803176", "0.7802559", "0.7800953", "0.7799208", "0.77958846", "0.77905864", "0.7788729", "0.7786444", "0.7778857", "0.7777666", "0.7765372", "0.77626014", "0.7762562", "0.77622634", "0.77615577", "0.7760895", "0.77596897", "0.7757152", "0.7753893", "0.77497184", "0.77495176", "0.77468747", "0.77301675", "0.77291715", "0.772798", "0.7716827", "0.77145964", "0.7714208", "0.7713344", "0.77125347", "0.771253", "0.7711237", "0.77112275", "0.77108705", "0.7710304", "0.7705747", "0.77048707", "0.770442", "0.77041996", "0.77028614", "0.77021116", "0.77008957", "0.7698864", "0.76987725", "0.7697583", "0.76966494", "0.76945114", "0.7692977", "0.7691408", "0.76907796", "0.7688464", "0.7687695", "0.7686974", "0.7686826", "0.76851374", "0.7684132", "0.7679417", "0.7678492", "0.76778567", "0.76769906", "0.76728696", "0.7671034", "0.76692134", "0.7668971", "0.7668952", "0.7666531", "0.7662757", "0.7662455", "0.76616526", "0.765996", "0.7656754", "0.765413", "0.76537156", "0.76526105", "0.76523715", "0.7652133" ]
0.0
-1
Gets the currently logged in user.
public function getCurrentUser() { if (!property_exists($this, 'currentUser')) { $this->currentUser = null; $uid = isset($_SESSION['uid']) ? $_SESSION['uid'] : false; if ($uid) { $this->currentUser = User::find($uid); } } return $this->currentUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLoggedInUser() {\n return $this->_user->getLoggedInUser();\n }", "public function GetCurrentUser()\n {\n return $this->userManager->getCurrent();\n }", "public function getCurrentUser()\n {\n $this->validateUser();\n\n if ($this->session->has(\"user\")) {\n return $this->session->get(\"user\");\n }\n }", "public function getCurrentUser()\n\t{\n\t\treturn $this->users->getCurrentUser();\n\t}", "public static function user()\n {\n if (!isset(static::$user)) {\n $uid = static::getCurrentUserId();\n if ($uid) static::$user = static::fetchUserById($uid);\n }\n \n return static::$user;\n }", "public function get_user() {\n\t\treturn ($this->logged_in()) ? $this->session->get($this->config['session_key'], null) : null;\n\t}", "public function getLoggedInUser() {\n\t\treturn elgg_get_logged_in_user_entity();\n\t}", "private function getAuthenticatedUser()\r\n {\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n return $tokenStorage->getToken()->getUser();\r\n }", "private function getAuthenticatedUser()\r\n {\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n return $tokenStorage->getToken()->getUser();\r\n }", "public static function getCurrentUser(){\r\n\t\treturn self::isLoggedIn() == true ? User::getUserById($_SESSION[\"id\"]) : null;\r\n\t}", "public function getAuthenticatedUser()\n {\n return $this->getUnsplashClient()->sendRequest('GET', 'me');\n }", "private function getLoggedInUser()\n {\n if (null !== $token = $this->securityContext->getToken()) {\n return $token->getUser();\n }\n\n return null;\n }", "public static function getCurrentUser()\n {\n /**\n * @var \\ZCMS\\Core\\ZSession $session\n */\n $session = Di::getDefault()->get('session');\n return $session->get('auth');\n }", "protected function getCurrentUser() {\n $userUtil = \\JumpUpUser\\Util\\ServicesUtil::getUserUtil($this->getServiceLocator());\n return $userUtil->getCurrentUser();\n }", "public function get_user() {\n\t\treturn $this->user;\n\t}", "public function get_current_user()\n\t{\n\t\treturn $this->current_user;\n\t}", "public function getAuthenticatedUser()\n {\n // get the web-user\n $user = Auth::guard()->user();\n\n // get the api-user\n if(!isset($user) && $user == null) {\n $user = Auth::guard('api')->user();\n }\n return $user;\n }", "public function get_user() {\r\n\t\treturn ($this->user);\r\n\t}", "public static function getCurrentUser()\n {\n if (isset($_SESSION['user'])) {\n return $_SESSION['user'];\n } else {\n return new User();\n }\n }", "function getLoggedInUser()\n{\n\tif(isLoggedIn()) {\n\t\treturn auth()->user();\n\t}\n\treturn null;\n}", "static function getCurrentUser()\r\n {\r\n return self::getSingleUser('id', $_SESSION[\"user_id\"]);\r\n }", "public function getUser() {\n $user = $this->getSessionUser();\n\n return $user;\n }", "public function getLoggedInUser()\n {\n $securityContext = $this->container->get('security.context');\n $consultant = $securityContext->getToken()->getUser();\n return $consultant;\n }", "public static function user()\n {\n if (isset($_SESSION['LOGGED_IN_USER'])){\n return $username;\n }\n }", "public function getLoggedUser() {\n\t\t$session = $this->getUserSession();\n\t\treturn ($this->isAdmin()) ? $session->getUser() : $session->getCustomer();\n\t}", "public function getUser()\n {\n return Session::get(self::USER);\n }", "public function getUser()\n {\n if(!$this->user)\n $this->user = User::getActive();\n\n return $this->user;\n }", "protected function getUser()\n {\n return $this->container->get('security.context')->getToken()->getUser();\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "protected function getCurrentUser()\n {\n return User::query()->findOrFail(Auth::user()->id);\n }", "public function getLoggedInUser()\n\t{\n\t\tif (!isset($this->loggedInUser)) {\n $this->loggedInUser = array();\n \n if ($this->getIsUserLoggedIn()) {\n // get the logged in user\n $this->loggedInUser = $this->getFamilyGraph()->api('me');\n }\n }\n \n return $this->loggedInUser;\n\t}", "static public function GetUser() {\n if (self::GetImpersonatedUser()) {\n return self::GetImpersonatedUser();\n }\n return self::GetAuthUser();\n }", "protected function getCurrentUser()\n {\n $user = null;\n if (!is_null($this->tokenStorage->getToken())) {\n $user = $this->tokenStorage->getToken()->getUser();\n }\n\n return $user;\n }", "public static function getUser()\n {\n return self::getInstance()->_getUser();\n }", "public static function currentUser()\n {\n self::startSession();\n return self::isLoggedIn() ? $_SESSION['user'] :\n new User(array('role' => 'unregistered'));\n }", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = User::findIdentity(Yii::$app->user->id);\n }\n\n return $this->_user;\n }", "public static function currentUser()\n {\n return wp_get_current_user();\n }", "public function user() {\n\t\tif (!Auth::check()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn Auth::getUser();\n\t}", "public static function getUser() {\n return isset($_SESSION[Security::SESSION_USER]) ? $_SESSION[Security::SESSION_USER] : NULL;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByLogin($this->login);\n }\n\n return $this->_user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByLogin($this->login);\n }\n\n return $this->_user;\n }", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = Users::findByUsername($this->login);\n }\n\n return $this->_user;\n }", "private function getAuthenticatedUser()\n {\n return auth()->user();\n }", "public function getUser()\n {\n if ($this->user === null) {\n // if we have not already determined this and cached the result.\n $this->user = $this->getUserFromAvailableData();\n }\n\n return $this->user;\n }", "public static function getAuthenticatedUser ()\n\t{\n\t\t$inst = self::getInstance();\n\t\t\n\t\tif ($inst->_authenticatedUser == null) \n\t\t{\n\t\t\t$user = $inst->_auth->getIdentity();\n\t\t\tif ($user)\n\t\t\t\t$inst->_authenticatedUser = Tg_User::getUserById($user['id']);\n\t\t\telse\n\t\t\t\t$inst->_authenticatedUser = false;\n\t\t}\n\t\t\t\n\t\treturn $inst->_authenticatedUser;\n\t}", "public function user()\n {\n return $this->app->auth->user();\n }", "public function user()\n {\n return $this->app->auth->user();\n }", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "public function getCurrentUser()\n {\n $accessToken = $this->getFOSOauthServer()->verifyAccessToken(\n $this->getAccessTokenString(),\n 'user'\n );\n\n return $accessToken->getUser();\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public static function user() {\n return Auth::currentUser();\n }", "public function getUser() {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public static function getUser() {\n return session(\"auth_user\", null);\n }", "protected static function retrieveCurrentUser()\n {\n global $user;\n\n return $user;\n }", "public static function getUser()\n\t{\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\t\n\t\t\treturn User::findByID($_SESSION['user_id']);\n\t\t\t\n\t\t}else{\n\t\t\n\t\t\treturn static::loginFromRememberCookie();\n\t\t\n\t\t}\n\t}", "public function getCurrentUser() {\n\t\treturn Zend_Registry::get('currentUser');\n\t}", "public function getUser()\n {\n if (!$membership = $this->getMembership()) {\n return false;\n }\n \n return $membership->getUser();\n }", "public function get_user()\n\t{\n\t\tif ($this->logged_in())\n\t\t{\n\t\t\treturn $this->_session->get($this->_config['session_key']);\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->email);\n }\n return $this->_user;\n }", "public function user()\n {\n return $this->auth->user();\n }", "function getAuthenticatedUser()\n {\n if (isset($_SESSION['MFW_authenticated_user'])) {\n return $_SESSION['MFW_authenticated_user'];\n }\n\n return null;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = \\app\\models\\User::findByUsername($this->username);\n }\n return $this->_user;\n }", "public function getUser() {\r\n\r\n if (self::$user === null)\r\n $this->refreshIdentity();\r\n\r\n return self::$user;\r\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername(Yii::$app->user->identity->username);\n }\n return $this->_user;\n }", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = User::findByUsername($this->username);\n }\n return $this->_user;\n }", "public function getLoggedUser()\n {\n if (null === $token = $this->securityContext->getToken()) {\n return null;\n }\n\n if (!is_object($user = $token->getUser())) {\n return null;\n }\n\n return $user;\n }", "public static function getCurrentUser();", "public static function user(){\n\t\treturn self::session()->user();\n\t}", "public function getUser()\n {\n if ($this->_user === null) {\n $this->_user = Admin::findByUsernameOrEmail($this->username);\n }\n\n return $this->_user;\n }", "public static function getLoggedUser()\r\n {\r\n self::session_start();\r\n if (!isset($_SESSION['user'])) return false;\r\n return $_SESSION['user'];\r\n }", "public function getUser() {\n\t\treturn User::newFromName( $this->params['user'], false );\n\t}", "public function getCurrentUser()\n {\n if ($this->_currentUser == null) {\n\n if ($this->_oauthToken == null) {\n $this->_setOauthToken();\n }\n $this->_currentUser = json_decode($this->_oauthToken)->user;\n }\n\n return $this->_currentUser;\n }", "public static function currentUser() {\n global $user;\n\n return $user;\n }", "public final function getUser()\n {\n return $this->user;\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "protected function getUser()\n {\n return $this->user;\n }", "public function getUser( ) {\n\t\treturn $this->user;\n\t}", "public function getUser( ) {\n\t\treturn $this->user;\n\t}", "public function getUser() {\n if ($this->_user === false) {\n $this->_user = CoLogin::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public function getCurrentUser() {\n\t\treturn $this->request->getServer ()->get ( 'REMOTE_USER', 'NoUser' );\n\t}", "static function currentUser() {\n $cookie = new CookieSigner(Config::app()['BASE_KEY']);\n\n if (isset($_SESSION['userId']) && $userId = $_SESSION['userId']) {\n $user = new User();\n return $user->findOne($userId);\n } else if ($userId = $cookie->get('userId')) {\n $user = new User();\n $user->findOne($userId);\n\n if ($user && $user->isAuthenticated('remember', $cookie->get('rememberToken'))) {\n self::logIn($user);\n return $user;\n }\n }\n return null;\n }", "public function getUser()\n {\n if ($this->user === null) {\n $this->user = Yii::$app->user->getIdentity();\n }\n\n return $this->user;\n }", "public function getAuthenticatedUser()\n\t{\n\t\t$user = Auth::user();\n\t\t$user->merchant;\n\n\t\treturn $user;\n\t}", "public function user()\n {\n if ( ! Auth::check()) {\n return null;\n }\n\n return Auth::getUser();\n }", "public function getUser()\n {\n if (! $this->user) {\n $this->exchange();\n }\n\n return $this->user;\n }", "public function getUser ()\r\n\t{\r\n\t\treturn $this->user;\r\n\t}", "public function GetUser()\n\t\t{\n\t\t\treturn $this->User;\n\t\t}", "public function getUser() {\n\t\treturn $this->user;\n\t}", "public function getUser() {\n\t\treturn $this->user;\n\t}", "public function getLoggedIn()\n\t{\n\t\treturn auth()->user();\n\t}", "protected function getUser()\n {\n $token = $this->securityContext->getToken();\n if ($token) {\n $user = $token->getUser();\n if ($user instanceof UserInterface) {\n return $user;\n }\n }\n\n return null;\n }", "public function fetchUser() {\n return $this->QueryAPI(\"current_user\");\n }", "public function getUser() {\n\t\treturn User::find($this->user_id);\n\t}", "public function user()\n\t{\n\t\tif (is_null($this->user) and $this->session->has(static::$key))\n\t\t{\n\t\t\t$this->user = call_user_func(Config::get('auth.by_id'), $this->session->get(static::$key));\n\t\t}\n\n\t\treturn $this->user;\n\t}", "public static function user ()\n {\n return self::$user;\n }" ]
[ "0.85585564", "0.85186386", "0.8475539", "0.844894", "0.82808536", "0.82723236", "0.8266299", "0.82199013", "0.82199013", "0.8205339", "0.8169144", "0.81546074", "0.8116375", "0.8112953", "0.81105494", "0.81019664", "0.80949444", "0.8086172", "0.80818105", "0.80786777", "0.8074806", "0.80651873", "0.8042318", "0.802695", "0.79806113", "0.7976255", "0.7956268", "0.79548544", "0.79420936", "0.79420936", "0.79420936", "0.79420936", "0.79229885", "0.7919164", "0.7910069", "0.790555", "0.7890258", "0.78785276", "0.78777224", "0.7832358", "0.78306323", "0.7825973", "0.78228873", "0.78228873", "0.78123194", "0.781231", "0.7811605", "0.78062165", "0.7800923", "0.7800923", "0.77964276", "0.7792994", "0.7782217", "0.7782217", "0.7753255", "0.7743225", "0.77414876", "0.7735705", "0.7735584", "0.7734498", "0.77261305", "0.77201575", "0.7711875", "0.7707792", "0.7703657", "0.7699291", "0.7688224", "0.76862663", "0.76856166", "0.76842064", "0.7682524", "0.76779026", "0.76734746", "0.76727843", "0.76725584", "0.76717824", "0.7669126", "0.766624", "0.7660679", "0.7653865", "0.7645769", "0.7640798", "0.7640798", "0.7639421", "0.7639323", "0.7634872", "0.7634394", "0.76330954", "0.76325315", "0.76272357", "0.76239485", "0.7617526", "0.7614329", "0.7614329", "0.7612068", "0.7610744", "0.76086795", "0.7604673", "0.7602626", "0.76014626" ]
0.815724
11
Checks if a user is currently logged in.
public function isLoggedIn() { if (!property_exists($this, 'loggedIn')) { $this->loggedIn = false; $user = $this->getCurrentUser(); if ($user) { $pass = $_SESSION['pass']; $this->loggedIn = password_verify($pass, $user->password); } } return $this->loggedIn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isLoggedIn()\n {\n return (bool)Users::getCurrentUser();\n }", "public function isUserLoggedIn() {\r\n\t\treturn ($this->coreAuthenticationFactory->isUserLoggedIn ());\r\n\t}", "public function isUserLoggedIn()\n {\n return (isset($this->session->sUserId) && !empty($this->session->sUserId));\n }", "static function isLoggedIn() {\n $user = self::currentUser();\n return isset($user) && $user != null;\n }", "public function is_user_logged_in(){\n\t\treturn $this->session->userdata('current_user_id') != FALSE;\n\t}", "public function isUserLoggedIn()\n {\n return $this->user_is_logged_in;\n }", "public function isLoggedIn()\n {\n return ($this->userInfo->userid ? true : false);\n }", "public function is_logged_in()\n {\n return isset($this->user);\n }", "private function checkUserLoggedIn(): bool\n {\n $user = JFactory::getUser();\n if ($user->id > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function isUserLoggedIn()\n {\n return $this->_customerSession->isLoggedIn();\n }", "public function isLoggedIn()\n {\n return $this->session->has('user');\n }", "public function is_user_logged_in()\n {\n $result = (boolean)self::getUser();\n return $result;\n }", "public function isUserLoggedIn() \n {\n if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_logged_in'])) {\n return false;\n } else {\n return true;\n }\n }", "public function isUserLoggedIn()\n {\n if (isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] == 1) {\n return true;\n }\n // default return\n return false;\n }", "public static function is_user_logged_in() {\r\n if (isset($_SESSION['user_id'])) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public static function isUserLoggedIn(): bool\n {\n if (isset($_SESSION['user_id'])) return true;\n return false;\n }", "public function isLoggedIn()\n {\n return isset($_SESSION['user']);\n }", "public function loggedIn()\n {\n return $this->user() != null;\n }", "public function isLoggedIn() {\n\t\treturn (bool) $this->getLoggedInUser();\n\t}", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isUserLoggedIn()\n {\n return $this->container->get('security.authorization_checker')\n ->isGranted('IS_AUTHENTICATED_FULLY');\n }", "public static function isLoggedIn()\n {\n self::startSession();\n return isset($_SESSION['user']);\n }", "public static function check()\n {\n if (!empty($_SESSION['LOGGED_IN_USER'])){\n return true;\n } else{\n return false;\n }\n }", "public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }", "function wv_is_user_loggedin() {\n $output = 0;\n if (is_user_logged_in()) {\n $output = 1;\n } else {\n $output = 0;\n }\n return $output;\n }", "public function is_loggedin()\n {\n if (isset($_SESSION['user_session'])) {\n return true;\n }\n }", "public function isUserLoggedIn() {\n\n $this->restartSession();\n\n if ($this->checkLogin() == false) {\n return false;\n } else {\n return true;\n }\n }", "protected function isUserLoggedIn() {}", "protected function isUserLoggedIn() {}", "public function is_logged_in() {\n\t\treturn is_a($this->user, 'WP_User');\n\t}", "public function is_user_logged_in() {\n if ( $session_id = in('session_id') ) {\n return user()->check_session_id( $session_id );\n }\n else if ( is_user_logged_in() ) return wp_get_current_user()->ID;\n else return false;\n }", "public function isLoggedIn() {\n\t\t\treturn $this->bLoggedInUser;\n\t\t}", "public function is_logged_in()\n {\n if (isset($_SESSION['user_session'])) {\n return true;\n }\n }", "protected function is_logged_in( )\n\t{\n\t\t$this->user = $this->php_session->get('user');\n\t\tif( is_null($this->user))\n\t\t\treturn False;\n\t\tif( ! $this->is_timed_out() )\n\t\t\treturn False;\n\t\t$this->user['last_active'] = time();\n\t\t$this->php_session->set('user' , $this->user );\n\n\t\t//apply user permissions globally\n\t\t//@see user_helper\n\t\tapply_global_perms( $this->user );\n\n\n\t\t\n\t\treturn True;\n\t}", "public static function loggedIn(): bool\n {\n // Check if user is in the session\n return isset($_SESSION['user']);\n }", "public function isCurrentlyLoggedIn() {}", "public function is_logged_in()\n\t{\n\t\treturn ($this->session->userdata('iduser') != FALSE);\n\t}", "public function loggedIn()\n {\n if ($this->userId) {\n return true;\n } else {\n return false;\n }\n }", "public function logged_in()\n\t{\n\t\treturn $this->_me != NULL;\n\t}", "protected function isLoggedIn()\n\t{\n\t\treturn is_user_logged_in();\n\t}", "public function is_logged_in()\n\t{\n\t\tif(isset($_SESSION['userSession']))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "function is_logged_in() \n {\n return (empty($this->userID) || $this->userID == \"\") ? false : true;\n }", "private function checkLoggedIn()\n {\n $loggedin = false;\n $user = Account::checkLogin($this->getDb());\n\n if ($user) {\n $loggedin = true;\n }\n\n return $loggedin;\n }", "public static function isLoggedIn()\n {\n if(isset($_SESSION[static::$sessionKey]))\n return (self::getUser(false) ? true : false);\n \n return false;\n }", "function is_user_logged_in() {\n\t$user = wp_get_current_user();\n\n\tif ( empty( $user->ID ) )\n\t\treturn false;\n\n\treturn true;\n}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "function isUserLoggedIn()\r\n\t{\r\n\t\t\tglobal $con;\r\n\t\t\t$return = false;\r\n\t\t\tif (isset($_SESSION['USER_ID']) && ($_SESSION['USER_ID'] > 0) && ($_SESSION['USER_ID'] != ''))\r\n\t\t\t{\r\n\t\t\t\t$id = $_SESSION['USER_ID'];\r\n\t\t\t\tif ($this->chkValidUser($id))\r\n\t\t\t\t{\r\n\t\t\t\t\t$return = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $return;\r\n\t}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "function is_user_logged_in()\n{\n global $current_user;\n\n // if $current_user is not NULL, then a user is logged in!\n return ($current_user != NULL);\n}", "function is_logged_in()\n\t{\n\t\treturn require_login();\n\t}", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function getIsUserLoggedIn()\n {\n if (!isset($this->isUserLoggedIn)) {\n $userId = $this->getFamilyGraph()->getUserId();\n $this->isUserLoggedIn = (!empty($userId));\n }\n \n return $this->isUserLoggedIn;\n }", "public function isLoggedIn()\n {\n // check session for user id\n if(isset($_SESSION['user']['id'])) {\n // return true;\n return $_SESSION['user']['id'];\n }\n else {\n return false;\n }\n }", "public static function isLoggedIn()\n {\n return !is_null(SessionService::getCurrent());\n }", "public function is_logged_in()\n {\n // Check if user session has been set\n if (isset($_SESSION['session'])) {\n return true;\n }\n }", "function IsLoggedIn() {\t\tif( Member::currentUserID() ) {\r\n\t\t return true;\r\n\t\t}\r\n }", "public function isloggedin()\n {\n return Session::userIsLoggedIn();\n }", "function is_user_logged_in()\n{\n global $current_user;\n return ($current_user != NULL);\n}", "function isUserLogged() {\r\n return isset($_SESSION['user']);\r\n }", "public static function is_logged_in()\r\n {\r\n if (SessionUtil::session('user') && SessionUtil::session('loggedIn')) {\r\n\r\n $user = unserialize(SessionUtil::session('user'));\r\n\r\n if (self::user_token($user->salt) == SessionUtil::session('loggedIn')) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "public function isLoggedUser()\n {\n return $this->container->get('user')->isLogged();\n }", "public function loggedIn()\n {\n if(isset($_SESSION['user']) && !empty($_SESSION['user'])) {\n return true;\n }\n\n return false;\n }", "public function isUserLogged(){\r\n return isset($_SESSION[$this->userSessionKey]);\r\n }", "function is_logged_in()\n {\n //check session\n //return logged in user_id or false\n }", "public function loggedIn()\n {\n $page = $this->getSession()->getPage();\n\n // Look for a selector to determine if the user is logged in.\n try {\n return $page->has('css', 'body.logged-in');\n\n // This may fail if the user has not loaded any site yet.\n } catch (DriverException $e) {\n }\n\n return false;\n }", "private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }", "public function isLoggedIn() {\n // Check if user ID is set in session\n if (isset($_SESSION['user_id'])) {\n // Verify user agent/ip\n if (isset($_SESSION['ip']) && isset($_SESSION['user_agent']) && $_SESSION['user_agent'] === $_SERVER['HTTP_USER_AGENT'] && $_SESSION['ip']===$_SERVER['REMOTE_ADDR']) {\n // User is logged in\n return true;\n } else {\n // User agent mismatch, possible session hijacking attempt\n $this->logout();\n }\n }\n // User is not logged in\n return false;\n }", "public function userIsLoggedIn() {\n return auth()->check() ;\n }", "public function is_loggedin(){\n if(isset($_SESSION['user_session'])){\n return true;\n }\n return false;\n }", "public function is_logged_in() {\n\t\t\treturn $this->logged_in;\n\t\t}", "public function isLoggedIn()\n {\n if(Session::get('user_id') != '') {\n $this->user_id=Session::get('user_id');\n $this->role_id=Session::get('role_id');\n return true;\n }else {\n return false;\n }\n }", "function isLoggedIn() {\n\treturn isset($_SESSION['user']);\n}", "public function isLoggedIn(){\r\n\t\tif(!isset($_SESSION)){\r\n\t\t\tsession_start();\r\n\t\t}\r\n\t\tif(isset($_SESSION['logged_in']) && isset($_SESSION['userID']) && $_SESSION['logged_in'] == true){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function is_facebook_user_logged_in(){\n\t\treturn $this->session->userdata('current_fb_user_id') != FALSE;\n\t}", "public function logged_in()\n\t{\n\t\t$status = FALSE;\n\n\t\t// Get the user from the session\n\t\t$user = $this->_session->get($this->_config['session_key']);\n\n\t\tif ( ! is_object($user))\n\t\t{\n\t\t\t// Attempt auto login\n\t\t\tif ($this->auto_login())\n\t\t\t{\n\t\t\t\t// Success, get the user back out of the session\n\t\t\t\t$user = $this->_session->get($this->_config['session_key']);\n\t\t\t}\n\t\t}\n\n\t\t// check from DB if set in config\n\t\tif ($this->_config['strong_check'])\n\t\t{\n\t\t\t$user = $this->_get_object($user, TRUE);\n\t\t}\n\n\t\tif (is_object($user)\n\t\t\tAND is_subclass_of($user, 'Model_MangoRauth_User')\n\t\t\tAND $user->loaded()\n\t\t\tAND $user->is_active\n\t\t)\n\t\t{\n\t\t\t// Everything is okay so far\n\t\t\t$status = TRUE;\n\t\t}\n\n\t\treturn $status;\n\t}", "public function isLoggedIn()\n {\n $loggedIn = $this->di->get(\"session\")->has(\"user\");\n if (!$loggedIn) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n return false;\n }\n return true;\n }", "public function isLoggedIn() {\n\t\treturn $this->loggedIn;\n\t}", "public function checkLoggedIn() {\r\n\t\t$bLoggedIn = Mage::getSingleton('customer/session')->isLoggedIn();\r\n\t\tif (!$this->checkAllowed()) {\r\n\t\t\t$bLoggedIn = false;\r\n\t\t}\r\n\t\treturn $bLoggedIn;\r\n\t}", "public function isLoggedIn()\n\t{\n\t\tif( isset($_SESSION['username']) )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isLoggedIn() {\n\t\t\treturn $this->loggedIn;\n\t\t}", "private function is_logged_in()\n\t{\n\t\treturn null !== $this->session->userdata('logged_in');\n\t}", "public function hasLoggedUser()\n {\n return ($this->getLoggedUser() !== null);\n }", "public function isUserLoggedIn() {\n self::$isLoggedIn = $this->session->getLoginSession(self::$storedUserId);\n unset($_SESSION['flashMessage']);\n return self::$isLoggedIn;\n }", "private function _isLoggedIn() {\n \n if ( ! is_multisite() ) { \n if ( ! function_exists( 'is_user_logged_in' ) ) {\n include( ABSPATH . \"wp-includes/pluggable.php\" ); \n } \n return is_user_logged_in();\n }\n \n // For multi-sites\n return is_user_member_of_blog( get_current_user_id(), get_current_blog_id() );\n\n }", "private function if_user_logged_in()\n {\n\n session_start();\n\n if(!empty($_SESSION)){\n\n if(isset($_SESSION[\"user_id\"]) && isset($_SESSION[\"user_type\"])){\n \n return true;\n\n }else{\n\n return false;\n }\n\n }else{\n\n return false;\n }\n }", "function is_user_logged_in() {\n global $current_user;\n\n return ($current_user != NULL); // if $current_user is not NULL, return true, else false\n}", "public static function checkIfUserIsLogged(){\r\n\t\tif(isset($_SESSION[SessionUtil::$KEY_USER_LOGGED])){\r\n\t\t\treturn $_SESSION[SessionUtil::$KEY_USER_LOGGED];\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public function isLoggedIn() {\n\t\treturn $this->isLoggedin;\n\t}", "function isUserLoggedIn()\n\t{\n\t\tglobal $loggedInUser,$db,$db_table_prefix;\n\t\t\n\t\t$sql = \"SELECT User_ID,\n\t\t\t\tPassword\n\t\t\t\tFROM \".$db_table_prefix.\"Users\n\t\t\t\tWHERE\n\t\t\t\tUser_ID = '\".$db->sql_escape($loggedInUser->user_id).\"'\n\t\t\t\tAND \n\t\t\t\tPassword = '\".$db->sql_escape($loggedInUser->hash_pw).\"' \n\t\t\t\tAND\n\t\t\t\tActive = 1\n\t\t\t\tLIMIT 1\";\n\t\t\n\t\tif($loggedInUser == NULL)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Query the database to ensure they haven't been removed or disabled\n\t\t\tif(returns_result($sql) > 0)\n\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// No result returned kill the user session, user removed or disabled\n\t\t\t\t$loggedInUser->userLogOut();\n\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\n }", "function isLoggedIn() {\n\treturn isset($_SESSION['user_id']);\n}", "public function isLoggedIn()\n {\n return $this->session->isLoggedIn();\n }", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "public function isLoggedIn() {\n return isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_LOGGED_IN]) && $_SESSION[self::SESSION_FIELD_LOGGED_IN] === true;\n }", "public function logged_in()\n {\n if (isset($_SESSION['user_data'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isLoggedIn()\n {\n return $this->loggedIn;\n }", "public function is_logged_in() {\n\n\t}", "protected function isCurrentUser()\n {\n return ($this->credentials->check() && $this->credentials->getUser()->id == $this->wrappedObject->revisionable_id);\n }", "protected function hasLoggedInUser()\n {\n try {\n $user = $this->loggedInUserProvider->getAuthenticatedUser();\n } catch (AccessDeniedException $e) {\n return false;\n }\n\n return $user;\n }" ]
[ "0.8293189", "0.825508", "0.82508963", "0.8234174", "0.82080185", "0.82038194", "0.819742", "0.8163682", "0.8135206", "0.81293255", "0.81256485", "0.81018007", "0.8099972", "0.8082041", "0.8071132", "0.80705786", "0.80679244", "0.8062674", "0.8056616", "0.80438334", "0.80438334", "0.80104786", "0.8003361", "0.7988246", "0.79851735", "0.7981967", "0.79817784", "0.79776525", "0.797426", "0.797426", "0.7962384", "0.7941552", "0.7935432", "0.7923675", "0.7922956", "0.79220635", "0.792205", "0.790997", "0.7896303", "0.78859943", "0.7880225", "0.7849205", "0.78331476", "0.78295016", "0.78169423", "0.7800824", "0.7784298", "0.77836907", "0.7783054", "0.77827215", "0.7781734", "0.7780337", "0.7780221", "0.77791655", "0.77764976", "0.7764314", "0.77460295", "0.774506", "0.77440953", "0.77409446", "0.77304757", "0.7709011", "0.7706019", "0.77000475", "0.7695546", "0.7694637", "0.7687824", "0.7678859", "0.76766884", "0.76641065", "0.76609623", "0.7653315", "0.7652581", "0.7652186", "0.76498234", "0.76479393", "0.7645761", "0.7636882", "0.76338875", "0.7627615", "0.76266974", "0.76250726", "0.7623914", "0.7613507", "0.76056516", "0.76016957", "0.7599527", "0.7593998", "0.75907624", "0.75840914", "0.7584036", "0.75809103", "0.7577915", "0.7577529", "0.7565298", "0.7556687", "0.7551951", "0.75497526", "0.7548174", "0.75458074" ]
0.7550652
97
Checks if a user is logged in. Redirects to login page if nobody is logged in.
public function checkLogin() { if (!$this->isLoggedIn()) { Router::getInstance()->redirect('login'); } return $this->getCurrentUser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redirect_when_logged() {\n $is_logged_in = AppAuthentication::is_logged_in();\n\n // If the user is already logged in we redirect to the default path of\n // his role.\n if ($is_logged_in) {\n $user_info = AppAuthentication::get_user_data();\n redirect_to_user_default_path($user_info);\n return TRUE;\n }\n\n return FALSE;\n }", "public static function isLoggedIn(){\n if(!self::exists('is_logged_in')&& self::get('is_logged_in')!==true){\n \n header('location:' . URL . 'user/login.php');\n exit;\n }\n }", "private function check_is_user_login()\n\t{\n\t\tif($this->session->userdata('logged_in') != FALSE)\n\t\t{\n\t\t\tredirect('home');\n\t\t}\n\t}", "protected function _checkAndRedirect() {\n $auth = $this->_checkAuthentication();\n if(true === $auth) { // authentication required, redirects to login page\n $user = $this->getCurrentUser();\n if(null === $user) { // user doesn't appear do be logged in\n $this->flashMessenger()->addErrorMessage(IControllerMessages::FATAL_ERROR_NOT_AUTHENTIFICATED);\n $this->redirect()->toRoute(IRouteStore::LOGIN); // break;\n return;\n }\n else {\n \treturn $user;\n }\n }\n else {\n \texit;\n \treturn false;\n }\n }", "public function checkUser()\n {\n $response = $this->di->get(\"response\");\n $user = $this->di->get(\"user\");\n\n if (!$user->isLoggedIn()) {\n $response->redirect(\"login\");\n }\n }", "public function logged_in_redirect(){\n\n\t\tif (isset($_SESSION['user_id'])) {\n\t\t \t# code...\n\t\t \theader('Location: index.php');\n\t\t } \n\t}", "public function must_be_logged_in()\n {\n Session::_start();\n if(!isset($_SESSION['user']))\n {\n Session::_destroy();\n header('location: ' . URL_WITH_INDEX_FILE . 'login/index');\n exit();\n }\n }", "public function redirect_if_logged_in()\n {\n Session::_start();\n if(isset($_SESSION['user']))\n {\n header('location: ' . URL_WITH_INDEX_FILE . 'results/index');\n exit();\n }\n }", "public static function check_log_in ()\n {\n session_start();\n\n if (!$_SESSION['user_data']) {\n header('Location: ./../index.php');\n exit;\n }\n }", "public static function perform_login_check() {\n\t\tif (self::is_logged_in()) {\n\t\t\t# User is logged in - leave them be\n\t\t\treturn (true);\n\t\t} else {\n\t\t\t# User isn't logged in - send them to the login form\n\t\t\t$host = $_SERVER['HTTP_HOST'];\n\t\t\t$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n\t\t\t$extra = 'login.php';\n\t\t\theader(\"Location: http://$host$uri/$extra\");\n\n\t\t\texit;\n\t\t}\n\t}", "private function checkLogin() {\n\t\t\n\t\tif ( ! $this->user_model->isLoggedIn() )\n\t\t\tredirect( base_url() . 'admin' );\n\n\t}", "function validateUser() {\n\tif (!isLoggedIn()) {\n\t\tredirectTo(\"index.php\");\n\t}\n}", "public function checkLoggedIn() {\n\t\t\tif (isset($_SESSION['username'])) {\n\t\t\t\t// Get User object from the database\n\t\t\t\t$this->dao = new UserDAO();\n\t\t\t\treturn $this->dao->getUser($_SESSION['username']);\n\t\t\t}\n\t\t\t//redirect to login page\n\t\t\theader('Location: ./');\n\t\t}", "function checkLoginStatus() // Check if user is logged in.\n\t{\n\t\tif(!$_SESSION['loggedIn'])\n\t\t{\n\t\t\theader(\"Location: login.html\");\n\t\t\texit();\n\t\t}\n\t}", "public function checkLoggedIn()\n\t\t{\n\t\t\t\n\t\t\ttry {\n\t\t\t \n\t\t\t\t$query = $this->_db->prepare( \"SELECT username FROM login WHERE username=:username\" );\n \n \n\t\t\t\t$query->bindParam( \":username\", $_SESSION[ 'username' ], PDO::PARAM_STR );\n\n\t\t\t\t$query->execute();\n\t\t\t\n\t\t\t} catch ( PDOException $e ) {\n\n\t\t\t\techo $e->getMessage();\n\n\t\t\t}\n\n\t\t\t$row = $query->fetch();\n\t\t\t\n \n\t\t\t$loggedInUser = $row[ 'username' ];\n \n //if the user is not logged in\n\t\t\tif( !isset( $loggedInUser ) )\n\t\t\t{\n //head to the log in page\n\t\t\t\theader( 'Location: login.php' );\n\n\t\t\t}\n\t\t\t\n\t\t}", "private function checkLogged() {\r\n if (isset($_SESSION['user'])) {\r\n return $_SESSION['user'];\r\n }\r\n header('Location: /login');\r\n }", "public function checkAccess() {\n $this->maybeStartSession();\n\n //If user is not logged in, redirect to login page\n if(!isset($_SESSION['userID'])) {\n header('Location: login.php');\n die();\n }\n\n //if user doesn't exist in database, redirect to logout page to clear session\n $repo = $this->getRepository();\n if($repo && !$repo->getUser($_SESSION['userID'])) {\n header('Location: logout.php');\n die();\n }\n }", "function userLoggedIn()\n{\n\tif(Auth::check()) {\n\t\t// Log::info('');\n\t\theader('Location: /users/account?id=' . Auth::id() );\n\t\tdie();\n\t}\n}", "function redirect_logged_in_users()\n{\n\tif(is_user_logged_in())\n\t{\n\t\theader(\"Location: \".HOME_URL);\n\t}\n}", "public static function checkUser()\n\t{\n\n\t\tif (!User::verifyLogin())\n\t\t{\n\n\t\t\theader(\"Location: /admin/login\");\n\t\t\texit;\n\n\t\t}\n\n\t}", "protected function redirectNotLoggedIn(){\r\n if(!$this->login->isloggedIn()){\r\n header(\"Location: \".BASE_URI.Routes::getUri('signin').'?rd=true');\r\n }\r\n }", "protected function isUserLoggedIn() {}", "protected function isUserLoggedIn() {}", "public static function checkLogged()\n {\n\n if (isset($_SESSION['user'])) {\n return $_SESSION['user'];\n }\n header(\"Location: /user/login\");\n }", "private function _checkAuth()\n {\n // check login or not\n if (!$this->getUser()->isAuthenticated()) {\n $this->redirect('login');\n }\n }", "public function loggedIn ()\r\n {\r\n\r\n if (isset($_SESSION['userID'])) {\r\n return true;\r\n } else {\r\n header('Location: login');\r\n exit;\r\n }\r\n }", "function checkIfUserIsLoggedInAndRedirect($redirectLocation = null){\n if(isLoggedIn()){\n redirect($redirectLocation);\n }\n}", "function ensure_logged_in() {\n\t\tif(!isset($_SESSION[\"user\"])) {\n\t\t\tredirect(\"start\", \"You must log in before you can view the page.\");\n\t\t}\n\t}", "public static function checkLogin() {\n\t\t\n\t\tif(!isset($_SESSION[\"uid\"])) {\n ?>\n <script language=\"javascript\">\n window.location.href = \"login.php\"\n </script>\n <?php\n \t}\n\n\t}", "function isLogin()\n\t {\n\t\t if(empty($_SESSION['username']) || empty($_SESSION['user']))\n\t\t {\n\t\t\t header(\"Location:login.php\");\n\t\t }\n\t }", "function requires_login()\n {\n $user = user();\n \n if ( empty( $user ) )\n {\n // no user id found, send to login\n Utility::redirect( Utility::login_url() );\n }\n }", "public static function authPage(){\n\t\tif(!self::isLogged()){\n\t\t\theader(\"Location: login.php?required\");\n\t\t\texit;\n\t\t}\n\t}", "protected function check_logged_in(){\n\n\t\t$this->load->model('patoauth/patoauth_model', 'patoauth');\n\n\t/*\n\t\tTRY TO AUTOLOGIN */\n\n\t\tif(! $this->patoauth->is_logged_in())\n\t\t\t$this->patoauth->autologin();\n\n\t/*\n\t\tIF STILLS NO LOGGED IN GET OUT OF HERE */\n\n\t\tif(! $this->patoauth->is_logged_in())\n\t\t\tredirect(site_url('auth/login'));\n\t}", "public static function requireAuthorized()\n {\n if(!SessionHelper::isUserLoggedIn()){\n header('location: ' . (string)getenv('URL') . 'user/logIn');\n }\n }", "public static function checkLogged()\r\n {\r\n // If there is a session, return the user ID\r\n if (isset($_SESSION['user'])) {\r\n return $_SESSION['user'];\r\n }\r\n\r\n header(\"Location: /user/login\");\r\n }", "private function checkUser()\n {\n $session = $this->di->get(\"session\");\n\n if (!$session->get(\"activeUser\") && !$session->get(\"username\")) {\n return $this->di->response->redirect(\"user/login\");\n }\n }", "protected function checkUser() {\n if(!$this->session->userdata(\"usuario_id\")) {\n redirect(\"/login\");\n }\n }", "function checkLogin() {\n if (!isset($_SESSION['userid'])) {\n header(\"Location: ../index.php?message=nologin\");\n }\n }", "function logged_in_redirect() {\n if(logged_in()) {\n header('Location: index.php');\n exit();\n }\n }", "public static function check() {\n session_start();\n if (!isset($_SESSION['user'])) {\n header('Location: /');\n exit;\n }\n }", "public function controlLogin()\n {\n if ($this->checkUserLogin() == false) {\n if (isset($_SERVER[\"REQUEST_URI\"])) {\n $url = trim($_SERVER[\"REQUEST_URI\"], '/');\n $this->server->redirect(\"/login?pre=\" . $url);\n } else {\n $this->server->redirect(\"/login\");\n }\n } else {\n return true;\n }\n }", "public static function LoggedIn() {\n\t\tif (empty($_SESSION['current_user'])) {\n\t\t\tnotfound();\n\t\t}\n\t}", "public function isLoggedIn()\n {\n if (isset($_SESSION['username'], $_SESSION['email'])) {\n return true;\n } else {\n $url=URL::getURI('login/required');\n header(\"location:$url\");\n }\n }", "private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }", "function user_loggedin(){\n\t$app = \\Jolt\\Jolt::getInstance();\n\tif( !$app->store('user') ){\n\t\treturn false;\n\t}\n\treturn true;\n//\t$app->redirect( $app->getBaseUri().'/login',!$app->store('user') );\n}", "public function redirectIfNotLoggedIn() {\n if (!LoggedInUserDetails::isLoggedIn()) {\n $url = Url::fromRoute('<front>');\n if (\\Drupal::moduleHandler()->moduleExists('iish_conference_login_logout')) {\n $url = Url::fromRoute(\n 'iish_conference_login_logout.login_form',\n array(),\n array('query' => \\Drupal::destination()->getAsArray())\n );\n }\n\n $response = new RedirectResponse($url->toString());\n $response->send();\n\n return TRUE;\n }\n\n return FALSE;\n }", "public function restrict() {\n\t\tif (!$this->is_logged_in()) {\n\t\t\tredirect('login', 'refresh');\n\t\t}\n\t}", "private function checkLogin()\n {\n // save the user's destination in case we direct them to authenticate\n\n // whitelist authentication mechanisms\n if($this->_controller == \"authenticate\")\n return;\n\n // whitelist database reload\n if($this->_controller == \"populatetestdata\")\n return;\n\n if(!isset($_SESSION['userid']))\n {\n // Don't redirect the user to an error page just in principle\n // @todo possible @bug why would it do this?\n if($this->_controller != \"error\" && $this->_controller != \"undefined\")\n {\n $this->slogger->slog(\"saving destination to \" . $this->_controller, SLOG_DEBUG);\n $_SESSION['destination'] = $this->_controller;\n }\n redirect('authenticate');\n\n }\n\n }", "public function checkLoggedIn()\n {\n if(!isset($_SESSION['user_id']))\n {\n redirect('pages/view/home');\n exit;\n }\n else\n {\n return $user_id=$_SESSION['user_id'];\n }\n }", "function __redirectLoggedInUser()\n{\n global $action;\n \n if ($action == 'logout' || ! is_user_logged_in()) {\n return;\n }\n \n wp_redirect(current_user_can('read') ? admin_url() : home_url(), 302);\n\t\n\tdie();\n}", "public function requireLogin(){\n if( ! Authentifiacation::isLoggedIn()){\n Authentifiacation::rememberRequestedPage();\n Flash::addMessage('You need to login to view this page', Flash::INFO);\n self::redirect('/login/new');\n }\n }", "public function checkLogged() {\n if (!PlonkSession::exists('id')) {\n PlonkWebsite::redirect($_SERVER['PHP_SELF'] . '?' . PlonkWebsite::$moduleKey . '=home&' . PlonkWebsite::$viewKey . '=home');\n } \n }", "private function checkIfLoggedIn()\n {\n if (!session()->has('user')) {\n abort(403, 'You are not logged in.');\n }\n }", "public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "private function checkUserLoggedIn(): bool\n {\n $user = JFactory::getUser();\n if ($user->id > 0) {\n return true;\n } else {\n return false;\n }\n }", "function checkLogin()\n{\n\t// http://php.net/manual/en/function.session-start.php\n\tsession_start();\n\t\n\t// Check that a there is not a user logged in\n\tif( !isset($_SESSION[\"current_user\"]) or !is_a($_SESSION[\"current_user\"],'User') ) \n\t{\n\t\tunset($_SESSION[\"current_user\"]);\n\t\t\n\t\t// http://stackoverflow.com/questions/14523468/redirecting-to-previous-page-after-login-php\n\t\t// Όποιος νοιάζετε ας βάλει και τα σωστά if για να μην γίνονται malicious redirects\n\t\theader(\"Location: login.php?location=\" . urlencode($_SERVER['REQUEST_URI']));\n\t\treturn false;\n\t}\n\t\n\treturn true;\t\n}", "private function handleJustLoggedIn() {\n $this->authenticatedView->setViewMessage(\"Welcome\");\n\n $keepLoggedIn = $this->userRequest->wantsToStayLoggedIn();\n \n if ($keepLoggedIn) {\n $userCredentials = $this->getUserCredentials();\n $cookieHandler = new CookieHandler();\n $cookieHandler->serveCookie($userCredentials);\n }\n }", "public static function checkLogged()\n {\n // SESSION['user']\n if(isset($_SESSION['user']))\n {\n return $_SESSION['user'];\n }\n\n //header(\"Location: /user/login\");\n return false;\n }", "public function logged_out_redirect(){\n\n\t\t\n\t\tif (!isset($_SESSION['user_id'])) {\n\t\t\t# code...\n\t\t\theader('Location: login.php');\n\t\t}\n\n\n\t}", "public function loggedIn()\n {\n if(isset($_SESSION['user']) && !empty($_SESSION['user'])) {\n return true;\n }\n\n return false;\n }", "public static function userLoggedIn()\n {\n //Hvis en bruker ikke er logget inn, vil han bli sent til login.php\n if (!isset($_SESSION['user'])) {\n //Lagrer siden brukeren er på nå slik at han kan bli redirigert hit etter han har logget inn\n $_SESSION['returnPage'] = $_SERVER['REQUEST_URI'];\n $alert = new Alert(Alert::ERROR, \"Du er nøtt til å være logget inn for å se den siden. Ikke prøv deg på noe.\");\n $alert->displayOnOtherPage('login.php');\n\n }\n }", "function login() {\n // Check is already a user is logged in or not.\n if (!isset ($_SESSION['user_id'])) {\n include('blog/site/VIEW/Login.php');\n }\n else {\n header(\"location: /index.php/User/home\");\n }\n }", "private function _userLoggedIn()\n {\n $this->utility->redirect('write');\n }", "public function checkAuthentication() \n {\n if(!isset($this->userInfo['admin_id']) && empty($this->userInfo['admin_id'])) \n {\n redirect('login/loginPage');\n }\n }", "function exec_login_if_not(){\t\r\n\tif (!(isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] == 1)) {\r\n\t\theader(\"Location:login.php?redirect_to=\" . urlencode($_SERVER['REQUEST_URI']));\r\n\t\tdie();\r\n\t}\r\n}", "function loggedin_users_only() {\n global $pagenow;\n //check if the current page is not the wp-logon.php page\n //check if the current user is logged in\n if(!is_user_logged_in() && $pagenow != 'wp-login.php') {\n auth_redirect();\n }\n}", "public function checkLogin() {\r\n\t\t$post = $this -> sanitize();\r\n\t\textract($post);\r\n\t\t// Hash the password that was entered into the form (if it was correct, it will match the hashed password in the database)\r\n\t\t$password = sha1($password);\r\n\t\t// Query\r\n\t\t$query = \"SELECT username, userID, profilePic, access, email FROM users WHERE username='$username' AND password='$password'\";\r\n\t\t$data = $this -> singleSelectQuery($query);\r\n\t\tif($data){\r\n\t\t\t//set up the session\r\n\t\t\t$_SESSION['userID'] = $data['userID'];\r\n\t\t\t$_SESSION['username'] = $data['username'];\r\n\t\t\t$_SESSION['profilePic'] = $data['profilePic'];\r\n\t\t\t$_SESSION['userType'] = $data['userType'];\r\n\t\t\t$_SESSION['access'] = $data['access'];\r\n\t\t\t//redirects to their profile\r\n\t\t\theader('location: index.php?page=profile&userID='.$_SESSION['userID']);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "public function UserIsSignedInOrRecirectToSignIn() {\n\t\t\n\t\tif(!isset($_SESSION['accountUser'])) { \n\t\t\trequire(TP_PAGESPATH . '/pages_login/PLogin.php');\n\t\t}\n\t}", "public static function checkLogin()\n {\n if (!isset($_SESSION)) {\n session_start();\n }\n if (!isset($_SESSION['email'])) {\n header('Location: login.php');\n }\n }", "function ifLoggedIn(){\n\t\n\tif(isset($_SESSION[\"userinfo\"])){\n\t\t\n\t\t\n\t\tif($_SESSION[\"userinfo\"][\"role\"]==1){\n\t\t\tredirect(\"admin.php\");\n\t\t}\n\n\t\tif($_SESSION[\"userinfo\"][\"role\"]==2){\n\t\t\tredirect(\"member.php\");\n\t\t}\n\t\t\n\t}\n}", "public function isUserLoggedIn() \n {\n if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_logged_in'])) {\n return false;\n } else {\n return true;\n }\n }", "function is_already_authenticated()\n {\n /**\n * Checks is user already authenticated\n * If it's true, sends to main page\n */\n $session = Session::getInstance();\n $username = $session->username;\n $logged = $session->logged;\n if (self::check($username,$logged))\n {\n header(\"Location: /admin\");\n }\n }", "function getUserIsLoggedIn() {\r\n\r\n // For now, just return false\r\n return false;\r\n}", "public static function session_check(){\n if(!isset($_SESSION)){\n session_start();\n }\n if( !isset( $_SESSION[\"loggedIn\"])){\n\n header(\"Location: login.php\");\n }\n }", "function auth_check() {\n if (!is_logged()) {\n header(\"location:login.php\");\n }\n}", "public function isUserLoggedIn() {\r\n\t\treturn ($this->coreAuthenticationFactory->isUserLoggedIn ());\r\n\t}", "function checkUserLogin() {\n\t$index_page = \"http://\".$_SERVER['HTTP_HOST'].\"/v3.2/index.php\";\n\tif(is_loggedIn()) {\n\t\t//user logged in to cb\n\t\tif(is_linkedInAuthorized()) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\t//user logged not authorized - weird case - removed the cookies manually\n\t\t\terror_log(\"User logged in but not authorized to linkedin\");\n\t\t\t//Initiate linked in authorization\n\t\t\theader('Location: ' . $index_page);\n\t\t}\n\t}else {\n\t\t//Not logged in redirect him to index page for login in\n\t\terror_log(\"User not logged in \");\n\t\theader('Location: ' . $index_page);\n\t}\n}", "function checkUserLogin() {\n\t$index_page = \"http://\".$_SERVER['HTTP_HOST'].\"/v3.2/index.php\";\n\tif(is_loggedIn()) {\n\t\t//user logged in to cb\n\t\tif(is_linkedInAuthorized()) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\t//user logged not authorized - weird case - removed the cookies manually\n\t\t\terror_log(\"User logged in but not authorized to linkedin\");\n\t\t\t//Initiate linked in authorization\n\t\t\theader('Location: ' . $index_page);\n\t\t}\n\t}else {\n\t\t//Not logged in redirect him to index page for login in\n\t\terror_log(\"User not logged in \");\n\t\theader('Location: ' . $index_page);\n\t}\n}", "function sabs_logged_in_only() {\n\tif ( ! is_user_logged_in() ) {\n\t\tdie( 'Please Log In' );\n\t}\n}", "public function isLoggedIn()\n {\n $loggedIn = $this->di->get(\"session\")->has(\"user\");\n if (!$loggedIn) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n return false;\n }\n return true;\n }", "abstract protected function isUserLoggedIn() ;", "public function LoginCheck()\n {\n $protocol = Yii::app()->params['protocol'];\n $servername = Yii::app()->request->getServerName();\n $user = Yii::app()->session['username'];\n if (empty($user)) {\n $returnUrl = $protocol . $servername . Yii::app()->homeUrl;\n $this->redirect($returnUrl);\n }\n }", "function checkLogin() { //Determine status of the user in current session\n\n\t//If a user is currently logged in\n\tif(isset($_SESSION['userID'])) {\n\n\t\tlogout(); //Display components to allow user to logout\n\n\t} else {\n\n\t\tlogin(); //Otherwise display components to allow a guest to login\n\n\t}\n\n}", "function logged_user_check() {\n if(is_user_logged())\n launch_error(\"You are already logged in.\");\n}", "public function check_login()\n\t{\n\t\tif(isset($_SESSION[\"user_id\"]))\n\t\t{\n\t\t $this->_user_id = $_SESSION[\"user_id\"];\n\t\t\t$this->_client = $_SESSION[\"client\"];\n\t\t\t$this->_loged_in = true;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_loged_in = false;\n\t\t\t$this->_client = false;\n\t\t\tunset($this->_user_id);\n\t\t}\n\t}", "public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }", "public function authenticated(){\n if(isset($_SESSION['user'])){\n if($this->load($_SESSION['user']) == false){\n header('Location: /logout.php');\n die;\n }\n return true;\n }\n return false;\n }", "public function check_login()\n {\n if (!$this->session->userdata('is_login')) {\n redirect('auth/login');\n }\n }", "function _loginRedirect(){\r\n \t// send user to the login page\r\n \theader(\"Location:/index.php\");\r\n }", "public function redirectUnauthenticatedUser(){\n if(!$this->isAuthenticated() )\n $this->logout();\n }", "function check_login()\n // Make sure user is logged in. Redirect to login page if not.\n {\n if (!isset ($_SESSION['uid']) || !$_SESSION['uid'] || $_SESSION['ip']!=allIPs() || time()>=$_SESSION['expires_on'])\n {\n\t\t\theader(\"location: ../ressources/controleur/action/logout.php\");\n }\n $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT; // User accessed a page : Update his/her session expiration date.\n }", "public function isAuthenticated()\r\n {\r\n if (!isset($_SESSION[\"ed\"])) {\r\n echo '<meta http-equiv=\"refresh\" content=\"0; url=' . (new CodeFlirt\\Handlers)->path(\"login\") . '\">';\r\n exit(0);\r\n }\r\n }", "public function isUserLoggedIn()\n {\n if (isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] == 1) {\n return true;\n }\n // default return\n return false;\n }", "public static function already_logged_in() {\n\t\tif (self::logged_in()) {\n\t\t\tSession::setFlash(\"alert-danger\", \"You have already logged in.\");\n\t\t\theader(\"Location: index.php\");\n\t\t}\n\t}", "function is_logged_in(){\n\t\t$is_logged_in = $this->session->userdata('is_logged_in');\n $this->session->sess_expire_on_close = TRUE;\n $this->session->sess_expiration = 1800;\n if(!$this->session->userdata('is_logged_in') && !strstr(current_url(),'login/')){\n redirect('login/index');\n }\n\n\t\tif(!isset($is_logged_in) || $is_logged_in !=true ){\n redirect('login/index');\n die();\n\t\t}\n\t}", "private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }", "function checkUserValidate(){\r\n\t\tsession_start();\r\n\t\tif(empty($_SESSION['loginuser'])){\r\n\t\t\theader(\"Location: login.php?errno=1\");\r\n\t\t}\r\n\t}", "private function check_login()\n {\n if (self::exists('user_id')) {\n $this->user_id = self::get('user_id');\n $this->logged_in = true;\n } else {\n unset($this->user_id);\n $this->logged_in = false;\n }\n }", "function is_user_logged_in()\n{\n\t$CI = &get_instance();\n\n\t$CI->load->model('user_model', 'users');\n\t$user = $CI->users->get_by('id', $CI->session->userdata('user')['user_id']);\n\n\tif (!$CI->session->userdata('user') || $user['is_active'] == 0)\n\t{\n\t\t$CI->session->set_userdata('redirect_url', current_url());\n\t\tredirect('authentication');\n\t}\n}", "public function do_login()\n {\n $this->userObject = new User();\n\n // grab the uID of the person signing in\n $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);\n\n // if the uID exists\n if ($uid) {\n\n $this->set('message', 'You logged in!');\n\n // grab the array of user-data from the database\n $user = $this->userObject->getUser($uid);\n\n // leave out the password\n unset($user['password']);\n unset($user[4]);\n\n // if (strlen($_SESSION['redirect']i) > 0) { // basically, if someone types in the url with the funciton after,\n // // supposed to redirect people to the pages they want.\n // $view = $_SESSION['redirect'];\n // unset($_SESSION['redirect']);\n // header('Location: ' . BASE_URL . $view);\n\n // make the SESSION key 'user' and set it equal to the aray of user-data\n $_SESSION['user'] = $user;\n\n header('Location: /index.php/');\n\n } else {\n\n $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');\n }\n }" ]
[ "0.7935685", "0.79252285", "0.7878963", "0.7849462", "0.7808341", "0.78002685", "0.7767775", "0.77538973", "0.7737225", "0.7691615", "0.76436687", "0.7595066", "0.7537642", "0.75250924", "0.7519968", "0.75110674", "0.75016546", "0.74799275", "0.74503", "0.7423361", "0.73824435", "0.73636705", "0.73636705", "0.7363181", "0.73565245", "0.73529327", "0.734248", "0.73151755", "0.7291723", "0.7278273", "0.72532266", "0.72488546", "0.7246719", "0.724229", "0.723152", "0.72072554", "0.7203383", "0.72005963", "0.7198895", "0.71813196", "0.7180488", "0.7174302", "0.71682125", "0.71653897", "0.7164575", "0.71527284", "0.7133162", "0.71069354", "0.70925367", "0.707302", "0.70717996", "0.7059074", "0.70565647", "0.70412064", "0.703976", "0.7035841", "0.7035144", "0.7032067", "0.7027195", "0.7005426", "0.70037735", "0.69943094", "0.69905204", "0.6986695", "0.6971468", "0.6967175", "0.695263", "0.6949616", "0.694009", "0.6939536", "0.69319063", "0.6916058", "0.6914293", "0.69005316", "0.6898487", "0.6892969", "0.6882554", "0.6882554", "0.68760085", "0.6875663", "0.6874329", "0.68720883", "0.6868175", "0.68612176", "0.6858133", "0.6856588", "0.6844096", "0.6832113", "0.6821186", "0.6818658", "0.68177646", "0.681762", "0.6817125", "0.68120515", "0.68081266", "0.6806081", "0.6789541", "0.6787372", "0.67816794", "0.6771842" ]
0.7057948
52
Metodo que define la relacion entre Category>Products
public function products(){ return $this->hasMany(Product::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function productByCategory($id)\n {\n \t\n }", "public function prod_list_by_category() {\n $url_cate = get_raw_app_uri();\n if (!empty($url_cate)) {\n $Product = new Product();\n $info = $Product->getProductByCategory($url_cate);\n $data['content'] = 'list_product'; \n $data['product'] = $info['product'];\n $data['paging'] = $info['paging'];\n $data['selected'] = $url_cate;\n \n //seo\n \n $Category = new ProductCategory();\n $list_cate = $Category->getCategoryByLink($url_cate);\n if ($list_cate->countRows() > 0){\n $list_cate->fetchNext();\n $data['title_page'] = $list_cate->get_prod_cate_name();\n $data['description'] = $list_cate->get_prod_cate_meta_description();\n $data['keywords'] = $list_cate->get_prod_cate_keywords();\n }else{\n $data['title_page'] = '';\n $data['description'] = '';\n $data['keywords'] = '';\n }\n \n $array_menus = array();\n $filter = array();\n $filter['parent_id'] = 0;\n Menu::getMenuTree($array_menus, $filter);\n $data['array_menus'] = $array_menus;\n \n $this->load->view('temp', $data);\n } else {\n redirect(Variable::getDefaultPageString());\n }\n }", "public function products()\n {\n\n }", "public function getProduct();", "public function action_cat()\n {\n $cat = $this->request->param('cat');\n $cat = mysql_real_escape_string ($cat);\n \n // Получаем список продукций\n // $category = ORM::factory('category')->where('cat_id', '=', $cat)->find();\n $category = ORM::factory('category')->where('path', '=', $cat)->find();\n\n if(!$category->loaded()){\n $this->redirect();\n }\n \n $count = $category->products->where('status', '<>', 0)->count_all();\n $pagination = Pagination::factory(array('total_items'=>$count,'items_per_page'=>2));\n $prods = array();\n $products = $category->products\n ->where('status', '<>', 0)\n ->limit($pagination->items_per_page)\n ->offset($pagination->offset)\n ->find_all();\n $prs = $category->products\n ->select('prod_cats.prod_id')\n ->where('status', '<>', 0)\n ->find_all();\n foreach ($prs as $p)\n {\n $prods[] = $p->prod_id;\n }\n if(count($prods))\n $brands = ORM::factory('brand')\n ->join('products')\n ->on('brand.brand_id', '=', 'products.brand_id')\n ->where('products.prod_id','in',$prods)\n ->group_by('brand.title')\n ->order_by('brand.title', 'ASC')\n ->find_all();\n \n \n \n //$products = $category->products->where('status', '!=', 0)->find_all();\n // $this->breadcrumbs[] = array('name' => $category->title, 'link' => '/catalog/cat/c' . $category->cat_id);\n $this->breadcrumbs[] = array('name' => $category->title, 'link' => '/catalog/cat/' . $category->path);\n $this->template->breadcrumbs = Breadcrumb::generate($this->breadcrumbs);\n \n $content = View::factory('/' . $this->theme . 'index/catalog/v_catalog_cat', array(\n 'products' => $products,\n 'cat' => $cat,\n 'pagination' =>$pagination,\n 'brands' =>$brands,\n \n ));\n \n // Выводим в шаблон\n \n $this->template->title = $category->title;\n $this->template->page_title = $category->title;\n $this->template->page_caption = $category->title;\n $this->template->center_block = array($content);\n $this->template->block_right = null; \n $filter = Filter::factory();\n $filter->loadFiltersOptions($category->cat_id);\n $this->template->filter = $filter->render();\n }", "function shophead_index()\n {\n $this->layout = 'admin_layout'; \n $this->set('title','Product Items Management');\n App::Import(\"Model\",\"ProductCategory\");\n $this->ProductCategory=new ProductCategory();\n $categories_list = $this->ProductCategory->find('list', array('conditions' => array('ProductCategory.is_deleted' => 0), 'fields' => array('ProductCategory.id', 'ProductCategory.name')));\n $this->set('categories_list', $categories_list);\n\t\t$Category_join = array('table' => 'product_sub_categories', 'alias' => 'ProductSubCategory', 'type' => 'inner', 'conditions' => array('ProductItem.product_sub_category_id =ProductSubCategory.id'));\t\t\n $conditions = array('ProductItem.is_deleted' => 0);\n if (!empty($this->request->data)) {\n \n if ($this->request->data['ProductItem']['product_sub_category_id'] != \"\") {\n $conditions['ProductItem.product_sub_category_id'] = $this->request->data['ProductItem']['product_sub_category_id'];\n $this->request->params['named']['ProductItem.product_sub_category_id'] = $this->request->data['ProductItem']['product_sub_category_id'];\n }\n if ($this->request->data['ProductItem']['product_category_id'] != \"\") {\n $conditions['ProductItem.product_category_id'] = $this->request->data['ProductItem']['product_category_id'];\n $this->request->params['named']['ProductItem.product_category_id'] = $this->request->data['ProductItem']['product_category_id'];\n }\n } else {\n if (isset($this->request->params['named']['ProductItem.product_category_id']) && $this->request->params['named']['ProductItem.product_category_id'] != \"\") {\n $conditions['ProductItem.product_category_id'] = $this->request->params['named']['ProductItem.product_category_id'];\n $this->request->data['ProductItem']['product_category_id'] = $this->request->params['named']['ProductItem.product_category_id'];\n }\n if (isset($this->request->params['named']['ProductItem.product_sub_category_id']) && $this->request->params['named']['ProductItem.product_sub_category_id'] != \"\") {\n $conditions['ProductItem.product_sub_category_id'] = $this->request->params['named']['ProductItem.product_sub_category_id'];\n $this->request->data['ProductItem']['product_sub_category_id'] = $this->request->params['named']['ProductItem.product_sub_category_id'];\n }\n }\n \n $this->paginate = array(\n 'recursive' => 0,\n 'limit' => LIMIT,\n 'fields'=> array('ProductSubCategory.name as catname,ProductItem.id,ProductItem.name,ProductItem.sort_order,ProductItem.created,ProductItem.status,ProductItem.updated,ProductItem.product_sub_category_id'),\n 'conditions' => $conditions,\n 'order' => array(\n 'ProductItem.sort_order' => 'Asc'\n ),\n 'joins'=>array($Category_join)\n );\n\t\t\n\t\t\n $result = $this->paginate('ProductItem');\n\t\t//pr($result);\n $this->set('result', $result);\n }", "function app_products() {\r\n $this->name=\"app_products\";\r\n $this->title=\"<#LANG_APP_PRODUCTS#>\";\r\n $this->module_category=\"<#LANG_SECTION_APPLICATIONS#>\";\r\n $this->checkInstalled();\r\n}", "public function show(Category $Products)\n {\n //\n }", "public static function route_products_and_categories()\n\t{\n\t\tforeach(ORM::factory('product')->find_all() as $object)\n\t\t{\n\t\t\tKohana::config_set('routes.' . $object->show_path(false), inflector::plural($object->object_name) . '/show/' . $object);\n\t\t}\n\t\t\n\t\tforeach(ORM::factory('category')->find_all() as $object)\n\t\t{\n\t\t\tKohana::config_set('routes.' . $object->show_path(false), inflector::plural($object->object_name) . '/show/' . $object);\n\t\t}\n\t}", "public function productByCategoryAction()\n {\n $category = $this->route['category'];\n $vars['products'] = $this->model->getProductsByCategory($category);\n $this->view->render('Riding Gear', $vars);\n }", "public function manageOrderProducts()\n {\n }", "public function productBySubCategoryAction()\n {\n $category = $this->route['category'];\n $vars['products'] = $this->model->getProductsBySubCategory($category);\n $this->view->render('Riding Gear', $vars);\n }", "function product_category_list(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u;\n\t\t\n\t\t$product_category_list = mysql_q(\"SELECT *\n\t\t\tFROM product_category\n\t\t\tORDER BY id\");\n\t\t$tpl->assign(\"product_category_list\", $product_category_list);\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_product_category_list.tpl\");\n\t\tdisplay($main);\n\t}", "public function getCategory() {}", "public function catalogos() \n\t{\n\t}", "function productList() {\n\t$categoryIds = array_merge ( [ \n\t\t\t$this->id \n\t], $this->subcategoryIds () );\n\tprint_r ( $categoryIds );\n\t// Find all products that match the retrieved category IDs\n\treturn Product::whereIn ( 'cate_id', $categoryIds )->get ();\n}", "public function listProductsRelated($params)\n{\n $type = $this->db->real_escape_string($params['type']);\n $prdId = $this->db->real_escape_string($params['prdId']);\n\n if ($type == 'K'){\n $qry = \"SELECT pr.*, sc.sbc_name, ct.cat_name \n FROM ctt_products AS pr\n INNER JOIN ctt_subcategories AS sc ON sc.sbc_id = pr.sbc_id\n INNER JOIN ctt_categories AS ct ON ct.cat_id = sc.cat_id\n WHERE prd_id = $prdId AND pr.prd_status = 1 AND sc.sbc_status = 1 AND ct.cat_status = 1\n UNION\n SELECT pr.*, sc.sbc_name, ct.cat_name \n FROM ctt_products_packages AS pk\n INNER JOIN ctt_products AS pr ON pr.prd_id = pk.prd_id\n INNER JOIN ctt_subcategories AS sc ON sc.sbc_id = pr.sbc_id\n INNER JOIN ctt_categories AS ct ON ct.cat_id = sc.cat_id\n WHERE pk.prd_parent = $prdId AND pr.prd_status = 1 AND sc.sbc_status = 1 AND ct.cat_status = 1;\";\n return $this->db->query($qry);\n // cambio ac.prd_id por prd_parent\n } else if($type == 'P') {\n $qry = \"SELECT pr.*, sc.sbc_name, ct.cat_name \n FROM ctt_products AS pr\n INNER JOIN ctt_subcategories AS sc ON sc.sbc_id = pr.sbc_id\n INNER JOIN ctt_categories AS ct ON ct.cat_id = sc.cat_id\n WHERE prd_id = $prdId AND pr.prd_status = 1 AND sc.sbc_status = 1 AND ct.cat_status = 1\n UNION\n SELECT pr.*, sc.sbc_name, ct.cat_name \n FROM ctt_accesories AS ac\n INNER JOIN ctt_products AS pr ON pr.prd_id = ac.prd_parent \n INNER JOIN ctt_subcategories AS sc ON sc.sbc_id = pr.sbc_id\n INNER JOIN ctt_categories AS ct ON ct.cat_id = sc.cat_id\n WHERE ac.prd_parent = $prdId AND pr.prd_status = 1 AND sc.sbc_status = 1 AND ct.cat_status = 1;\";\n return $this->db->query($qry);\n\n } else {\n $qry = \"SELECT * FROM ctt_products WHERE prd_id = $prdId\";\n return $this->db->query($qry);\n }\n}", "public function categoriesAction()\r\n {\r\n $categories = $this->getDoctrine()\r\n ->getManager()\r\n ->getRepository('NiftyThriftyShopBundle:ProductCategory')\r\n ->findNavigation();\r\n return $this->render('NiftyThriftyShopBundle:Navigation:_itemList.html.twig',\r\n array('title' => 'Categories',\r\n 'prefix' => 'cat',\r\n 'items' => $categories,\r\n 'path_name' => 'show_category'));\r\n }", "function productList($subCatId = null)\r\n {\r\n // Setting the page title\r\n $this->set(\"title_for_layout\",\"Product List\");\r\n \r\n // If nothing passing then redirecting to home page.\r\n if (empty($subCatId))\r\n {\r\n $this->redirect('home');\r\n }\r\n \r\n // Getting category list\r\n $categoryList = $this->Category->getCategoryList();\r\n \r\n // Passing categories to view\r\n $this->set('categoryList', $categoryList);\r\n \r\n // Getting subcategory name and passing to views\r\n $subCatArray = $this->SubCategory->getSubCategoryName($subCatId);\r\n \r\n $this->set('selectedSubCategoryName', $subCatArray['SubCategory']['sub_category_name']);\r\n $this->set('selectedCategoryName', $subCatArray['Category']['category_name']);\r\n $this->set('selectedCategoryId', $subCatArray['Category']['id']);\r\n \r\n // Getting all the products against subcategory id and passing to view\r\n $whereCondition = \" Product.sub_category_id = '\".$subCatId.\"' \";\r\n $conditions[] = $whereCondition;\r\n \r\n // Getting the product list\r\n $productList = $this->Product->getSearchResults($conditions);\r\n \r\n // Passing the product list to view\r\n $this->set('productList', $productList);\r\n }", "public function GetAllProduct(){\r\n\t\r\n\t\t\t$m_product = new m_product();\r\n\t\t\t$CatFlowingPro = $m_product->GetAll();\r\n\t\t\r\n\t\t\r\n\t\t\t//view\r\n\t\t\tinclude(\"view/layout/header.php\");\r\n\t\t\tinclude(\"view/layout/menu.php\");\r\n\t\t\tinclude(\"view/category/cat_detail.php\");\r\n\t\t\tinclude(\"view/layout/footer.php\");\r\n\t\t}", "public function categories(){\n /* \n id_categoria_producto int NOT NULL AUTO_INCREMENT,\n\ttipo_producto varchar(20) NOT NULL ,\n\tcaracteristicas_producto varchar(100) ,\n CONSTRAINT pk_categoria_producto PRIMARY KEY ( id_categoria_producto )\n\n\n id_producto int NOT NULL AUTO_INCREMENT,\n\tt_cat_producto int NOT NULL ,\n\tnombre_producto varchar(50) NOT NULL ,\n\tfecha varchar(10) NOT NULL ,\n\tpeso varchar(10) NOT NULL ,\n\tCONSTRAINT pk_producto PRIMARY KEY ( id_producto )\n */ \n $sql = 'SELECT c.name_categoria,\n c.id,\n p.id,\n p.id_categoria,\n p.nombre_producto,\n p.peso\n FROM categoria AS c, producto AS p\n WHERE c.id = p.id_categoria';\n $categories = $this->db->query($sql)->fetchAll(PDO::FETCH_CLASS, 'Category');\n return $categories;\n }", "public function productsAction()\n {\n $this->_initCoursedoc();\n $this->loadLayout();\n $this->getLayout()->getBlock('coursedoc.edit.tab.product')\n ->setCoursedocProducts($this->getRequest()->getPost('coursedoc_products', null));\n $this->renderLayout();\n }", "public function getCollectionProducts()\n {\n\t\treturn \"hi\";\n }", "function showProducts()\n\t{\n\t\tif($_GET['id']!='')\n\t\t{\n\t\t\t$sql = \"SELECT \t* FROM products_table where category_id=\".(int)$_GET['id'] ;\n\t\n\t\t\t$query = new Bin_Query();\n\t\n\t\t\tif($query->executeQuery($sql))\n\t\t\t{\n\t\t\t\t$totrows = $query->totrows;\n\t\t\t}\n\t\t\tif($totrows > 0)\n\t\t\t\treturn Display_DManageProducts::productList($query->records);\n\t\t\telse\n\t\t\t\treturn Display_DManageProducts::displayNoProductFound();\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\techo 'Select SubCategory';\n\t\t}\t\n\t}", "public function run()\n {\n $this->uploadFiles('product-categories');\n\n $categories = [\n [\n 'name' => 'Hot Promotions',\n 'icon' => 'icon-star',\n ],\n [\n 'name' => 'Electronics',\n 'icon' => 'icon-laundry',\n 'image' => 'product-categories/1.jpg',\n 'is_featured' => true,\n 'children' => [\n [\n 'name' => 'Consumer Electronic',\n 'children' => [\n [\n 'name' => 'Home Audio & Theaters',\n ],\n [\n 'name' => 'TV & Videos',\n ],\n [\n 'name' => 'Camera, Photos & Videos',\n ],\n [\n 'name' => 'Cellphones & Accessories',\n ],\n [\n 'name' => 'Headphones',\n ],\n [\n 'name' => 'Videos games',\n ],\n [\n 'name' => 'Wireless Speakers',\n ],\n [\n 'name' => 'Office Electronic',\n ],\n ],\n ],\n [\n 'name' => 'Accessories & Parts',\n 'children' => [\n [\n 'name' => 'Digital Cables',\n ],\n [\n 'name' => 'Audio & Video Cables',\n ],\n [\n 'name' => 'Batteries',\n ],\n ],\n ],\n ],\n ],\n [\n 'name' => 'Clothing',\n 'icon' => 'icon-shirt',\n 'image' => 'product-categories/2.jpg',\n 'is_featured' => true,\n ],\n [\n 'name' => 'Computers',\n 'icon' => 'icon-desktop',\n 'image' => 'product-categories/3.jpg',\n 'is_featured' => true,\n 'children' => [\n [\n 'name' => 'Computer & Technologies',\n 'children' => [\n [\n 'name' => 'Computer & Tablets',\n ],\n [\n 'name' => 'Laptop',\n ],\n [\n 'name' => 'Monitors',\n ],\n [\n 'name' => 'Computer Components',\n ],\n ],\n ],\n [\n 'name' => 'Networking',\n 'children' => [\n [\n 'name' => 'Drive & Storages',\n ],\n [\n 'name' => 'Gaming Laptop',\n ],\n [\n 'name' => 'Security & Protection',\n ],\n [\n 'name' => 'Accessories',\n ],\n ],\n ],\n ],\n ],\n [\n 'name' => 'Home & Kitchen',\n 'icon' => 'icon-lampshade',\n 'image' => 'product-categories/4.jpg',\n 'is_featured' => true,\n ],\n [\n 'name' => 'Health & Beauty',\n 'icon' => 'icon-heart-pulse',\n 'image' => 'product-categories/5.jpg',\n 'is_featured' => true,\n ],\n [\n 'name' => 'Jewelry & Watch',\n 'icon' => 'icon-diamond2',\n 'image' => 'product-categories/6.jpg',\n 'is_featured' => true,\n ],\n [\n 'name' => 'Technology Toys',\n 'icon' => 'icon-desktop',\n 'image' => 'product-categories/7.jpg',\n 'is_featured' => true,\n ],\n [\n 'name' => 'Phones',\n 'icon' => 'icon-smartphone',\n 'image' => 'product-categories/8.jpg',\n 'is_featured' => true,\n ],\n [\n 'name' => 'Babies & Moms',\n 'icon' => 'icon-baby-bottle',\n ],\n [\n 'name' => 'Sport & Outdoor',\n 'icon' => 'icon-baseball',\n ],\n [\n 'name' => 'Books & Office',\n 'icon' => 'icon-book2',\n ],\n [\n 'name' => 'Cars & Motorcycles',\n 'icon' => 'icon-car-siren',\n ],\n [\n 'name' => 'Home Improvements',\n 'icon' => 'icon-wrench',\n ],\n ];\n\n ProductCategory::truncate();\n Slug::where('reference_type', ProductCategory::class)->delete();\n MetaBoxModel::where('reference_type', ProductCategory::class)->delete();\n\n foreach ($categories as $index => $item) {\n $this->createCategoryItem($index, $item);\n }\n\n // Translations\n DB::table('ec_product_categories_translations')->truncate();\n\n $translations = [\n [\n 'name' => 'Khuyến mãi hấp dẫn',\n ],\n [\n 'name' => 'Điện tử',\n 'children' => [\n [\n 'name' => 'Điện tử tiêu dùng',\n 'children' => [\n [\n 'name' => 'Thiết bị nghe nhìn',\n ],\n [\n 'name' => 'TV & Videos',\n ],\n [\n 'name' => 'Camera, Photos & Videos',\n ],\n [\n 'name' => 'Điện thoại di động & Phụ kiện',\n ],\n [\n 'name' => 'Tai nghe',\n ],\n [\n 'name' => 'Trò chơi video',\n ],\n [\n 'name' => 'Loa không dây',\n ],\n [\n 'name' => 'Điện tử văn phòng',\n ],\n ],\n ],\n [\n 'name' => 'Phụ kiện & Phụ tùng',\n 'children' => [\n [\n 'name' => 'Digital Cables',\n ],\n [\n 'name' => 'Audio & Video Cables',\n ],\n [\n 'name' => 'Pin',\n ],\n ],\n ],\n ],\n ],\n [\n 'name' => 'Quần áo',\n ],\n [\n 'name' => 'Máy tính',\n 'children' => [\n [\n 'name' => 'Máy tính & Công nghệ',\n 'children' => [\n [\n 'name' => 'Máy tính & Máy tính bảng',\n ],\n [\n 'name' => 'Máy tính xách tay',\n ],\n [\n 'name' => 'Màn hình',\n ],\n [\n 'name' => 'Linh kiện Máy tính',\n ],\n ],\n ],\n [\n 'name' => 'Mạng máy tính',\n 'children' => [\n [\n 'name' => 'Thiết bị lưu trữ',\n ],\n [\n 'name' => 'Máy tính xách tay chơi game',\n ],\n [\n 'name' => 'Thiết bị bảo mật',\n ],\n [\n 'name' => 'Phụ kiện',\n ],\n ],\n ],\n ],\n ],\n [\n 'name' => 'Đồ dùng làm bếp',\n ],\n [\n 'name' => 'Sức khỏe & làm đẹp',\n ],\n [\n 'name' => 'Trang sức & Đồng hồ',\n ],\n [\n 'name' => 'Đồ chơi công nghệ',\n ],\n [\n 'name' => 'Điện thoại',\n ],\n [\n 'name' => 'Mẹ và bé',\n ],\n [\n 'name' => 'Thể thao & ngoài trời',\n ],\n [\n 'name' => 'Sách & Văn phòng',\n ],\n [\n 'name' => 'Ô tô & Xe máy',\n ],\n [\n 'name' => 'Cải tiến nhà cửa',\n ],\n ];\n\n $count = 1;\n foreach ($translations as $translation) {\n\n $translation['lang_code'] = 'vi';\n $translation['ec_product_categories_id'] = $count;\n\n DB::table('ec_product_categories_translations')->insert(Arr::except($translation, ['children']));\n\n $count++;\n\n if (isset($translation['children'])) {\n foreach ($translation['children'] as $child) {\n\n $child['lang_code'] = 'vi';\n $child['ec_product_categories_id'] = $count;\n\n DB::table('ec_product_categories_translations')->insert(Arr::except($child, ['children']));\n\n $count++;\n\n if (isset($child['children'])) {\n foreach ($child['children'] as $item) {\n\n $item['lang_code'] = 'vi';\n $item['ec_product_categories_id'] = $count;\n\n DB::table('ec_product_categories_translations')->insert(Arr::except($item, ['children']));\n\n $count++;\n }\n }\n }\n }\n }\n }", "function get_products() {\n\t\tApp::Import('model', 'Product');\n\t\t$this->Product = &new Product;\n\n\t\t$products = $this->Product->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t\"Product.short_description != ''\",\n\t\t\t\t'Availability.cart_allowed' => true,\n\t\t\t\t'Product.active' => true\n\t\t\t),\n\t\t\t'contain' => array(\n\t\t\t\t'TaxClass' => array(\n\t\t\t\t\t'fields' => array('id', 'value')\n\t\t\t\t),\n\t\t\t\t'Image' => array(\n\t\t\t\t\t'conditions' => array('Image.is_main' => '1'),\n\t\t\t\t\t'fields' => array('id', 'name')\n\t\t\t\t),\n\t\t\t\t'Manufacturer' => array(\n\t\t\t\t\t'fields' => array('id', 'name')\n\t\t\t\t),\n\t\t\t\t'CategoriesProduct' => array(\n\t\t\t\t\t'Category' => array(\n\t\t\t\t\t\t'fields' => array('id', 'name')\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'Availability' => array(\n\t\t\t\t\t'fields' => array('id', 'cart_allowed')\n\t\t\t\t)\n\t\t\t),\n\t\t\t'fields' => array(\n\t\t\t\t'Product.id',\n\t\t\t\t'Product.name',\n\t\t\t\t'Product.short_description',\n\t\t\t\t'Product.url',\n\t\t\t\t'Product.retail_price_with_dph',\n\t\t\t\t'Product.ean',\n\t\t\t\t'Product.zbozi_name',\n\t\t\t\t'Product.heureka_name',\n\t\t\t\t'Product.discount_common',\n\t\t\t\t'Product.zbozi_cpc',\n\t\t\t\t'Product.heureka_cpc'\n\t\t\t)\n\t\t));\n\t\t\n\t\t$products = array_filter($products, array('ExportsController', 'empty_category'));\n\t\t\n\t\tforeach ($products as $i => $product) {\n\t\t\t$products[$i]['Product']['retail_price_with_dph'] = $this->Product->assign_discount_price($products[$i]);\n\t\t\t$products[$i]['Product']['name'] = str_replace('&times;', 'x', $products[$i]['Product']['name']);\n\t\t\t$products[$i]['Product']['short_description'] = str_replace('&times;', 'x', $products[$i]['Product']['short_description']);\n\t\t}\n\n\t\treturn $products;\n\t}", "public function getProductCategory()\n {\n return $this->hasMany(ProductCategory::className(), ['category_id' => 'id']);\n }", "function get_ProductsBy_CatID($data) {\r\n $params[0] = array(\"name\" => \":category_id\", \"value\" => &$data['category_id']);\r\n $params[1] = array(\"name\" => \":prodType\", \"value\" => &$data['prodType']);\r\n return $this->DBObject->readCursor(\"product_actions.get_ProductsBy_CatID(:category_id,:prodType)\", $params);\r\n }", "public function getCategory();", "public function getCategory();", "public function products(): MorphToMany;", "public function get_categories() {\n\t\treturn [ 'dtwcbe-woo-single-product' ];\n\t}", "function category($title, $id, $page)\n {\n $sort = Input::get('sort');\n\n $aliexpressApi = new AliexpressAPI();\n\n $options = [\n \"sort\" => $sort,\n \"pageNo\" => $page\n ];\n if (Cache::get('aliCategory' . $id . '-' . $page . '-' . $sort) == null) {\n Cache::put('aliCategory' . $id . '-' . $page . '-' . $sort, json_decode($aliexpressApi->getCategoryProducts($id,\n 39, \"USD\", App::getLocale(), $options)), Config::get('cache.storeAliHotProducts'));\n }\n $aliData = Cache::get('aliCategory' . $id . '-' . $page . '-' . $sort);\n\n $similarCategories = $this->model->getSimilarCategory($id);\n $breadCramb = $this->model->getBreadCramb($id);\n $resultsAmount = isset($aliData->result->totalResults) ? $aliData->result->totalResults : 100;\n\n // pagination ( not the perfect of implementations, but it works )\n $totalPages = 100;\n $pagesAvailable = Util::getPaginationList($page, $totalPages);\n\n $categoryData = $this->makeCategoryData($page, $id, $title, $sort, $resultsAmount);\n\n // product forms action route base\n $productBaseRoute = \"/{$this->siteslug}/product\";\n $categoryBaseRoute = \"/{$this->siteslug}/category/$title/$id\";\n\n $paginationResult = Util::getLinksForPagination($pagesAvailable, \"category\", $title, $page, $this->siteslug, null, $id);\n\n $pages = $paginationResult['pages'];\n $pageNext = $paginationResult['pageNext'];\n\n if ($page == 1) {\n $pageForTitle = '';\n } else {\n $pageForTitle = ' ' . 'עמוד' . ' ' . $page;\n }\n /*if (is_null($categoryData['sort'])){\n $sortForTitle='';\n }else{\n $sortForTitle='-' . $categoryData['sort'];\n }*/\n // dd($categoryData);\n if (Lang::getLocale() == 'he') {\n $this->shopName = Lang::get('general.aliexpress');\n } elseif (Lang::getLocale() == 'en') {\n $this->shopName = 'aliexpress';\n };\n $this->title =$categoryData['title']. ' - ' . $breadCramb['category']. ' - ' . $this->shopName . ' - ' . $categoryData['page'] . ' - ' .'עליאקספרס' ;\n// $this->title = $categoryData['title'];\n $this->description = $categoryData['title'] . $pageForTitle . '- ' . \"עליאקספרס בעברית\" . ' - ' . \"שירות לקוחות בעברית,תשלום ללא כ.א בינלאומי,למעלה ממיליארד מוצרים בעברית\";\n return view(\"aliexpress.category\", [\n 'timerTime' => $this->timerTime,\n 'nextPageLink' => $pageNext,\n 'pageLinks' => $pages,\n 'pagination' => $pagesAvailable,\n 'categoryData' => $categoryData,\n 'productBase' => $productBaseRoute,\n 'categoryBase' => $categoryBaseRoute,\n 'aliData' => $this->model->parseCategoryData($aliData),\n 'categories' => $this->categories,\n 'siteslug' => $this->siteslug,\n 'breadCramb' => $breadCramb,\n 'title' => $this->title,\n 'description' => $this->description,\n 'page' => $page,\n 'similarCategories' => $similarCategories,\n ]);\n }", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public static function getCategoryListing() {\n global $lC_Database, $lC_Language, $lC_Products, $lC_CategoryTree, $lC_Vqmod, $cPath, $cPath_array, $current_category_id;\n \n include_once($lC_Vqmod->modCheck('includes/classes/products.php'));\n \n if (isset($cPath) && strpos($cPath, '_')) {\n // check to see if there are deeper categories within the current category\n $category_links = array_reverse($cPath_array);\n for($i=0, $n=sizeof($category_links); $i<$n; $i++) {\n $Qcategories = $lC_Database->query('select count(*) as total from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n\n if ($Qcategories->valueInt('total') < 1) {\n // do nothing, go through the loop\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n break; // we've found the deepest category the customer is in\n }\n }\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.categories_mode, c.categories_link_target, c.categories_custom_url from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $current_category_id);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n }\n $number_of_categories = $Qcategories->numberOfRows();\n $rows = 0;\n $output = '';\n while ($Qcategories->next()) {\n $rows++;\n $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';\n $exists = ($Qcategories->value('categories_image') != null) ? true : false;\n $output .= ' <td style=\"text-align:center;\" class=\"categoryListing\" width=\"' . $width . '\" valign=\"top\">';\n if ($Qcategories->value('categories_custom_url') != '') {\n $output .= lc_link_object(lc_href_link($Qcategories->value('categories_custom_url'), ''), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no-image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n } else {\n $output .= lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $lC_CategoryTree->buildBreadcrumb($Qcategories->valueInt('categories_id'))), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no_image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n }\n $output .= '</td>' . \"\\n\";\n if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {\n $output .= ' </tr>' . \"\\n\";\n $output .= ' <tr>' . \"\\n\";\n } \n } \n \n return $output;\n }", "public function products() {\n return $this->hasMany('App\\Product', 'category_id', 'id');\n }", "public function getProducts()\n {\n return $this->hasMany(Product::className(), ['category_id' => 'id']);\n }", "function relatedProducts($people_cat_id, $product_type_id, $product_id)\n\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t$sql= 'SELECT product. *\n\t\t\t\tFROM product\n\t\t\t\tJOIN product_people ON product_people.product_id = product.product_id\n\t\t\t\tWHERE product.product_type_id = '.$people_cat_id.'\n\t\t\t\tAND product_people.people_cat_id = '.$product_type_id.'\n\t\t\t\tAND product.product_id != '.$product_id.'\n\t\t\t\tORDER BY product.product_id DESC';\n\t\t\t\t\n\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\tforeach ($Q-> result_array() as $row){\n\t\t\t\t}\n\t\t\t\treturn $Q;\n\t\t\t\t\n\t\t\t\t}", "function displayCategory()\r\n\t {\r\n\t \t$productId = JRequest::getVar('product_id');\r\n\t \t\r\n\t \t$model = $this->getModel('qrcode');\r\n\t \t$productList = $model->getProductByCategory();//Store product details based on category.\r\n\t \tob_clean();\r\n\t \t\r\n\t \techo \"<b>\".JText::_('COM_QRCODE_VIEW_DEFAULT_PRODUCT_LIST').\"</b>\";\r\n \r\n\t \t\t\t$options = array();\r\n $default = \"\";\r\n if($productId)\r\n {\r\n \t$default = $productId;\r\n }\r\n $options[] = JHTML::_('select.option', \"0\", JText::_('COM_QRCODE_VIEW_DEFAULT_DISPLAY_ALL'));\r\n foreach ($productList as $key=>$val) {\r\n $options[] = JHTML::_('select.option', $val['product_id'], $val['product_name']);\r\n }\r\n echo JHTML::_('select.genericlist', $options, 'qrcode', 'onchange=getProductId(this.value)','value', 'text', $default); \r\n exit();\r\n\t }", "public function getProducts(){\n return $this->hasMany('App\\Models\\Products', 'categories_id', 'id');\n }", "function shophead_add()\n {\n $this->layout = 'admin_layout';\n\n\t\tApp::import('Model', 'ProductCategory');\n\t\t$this -> ProductCategory = new ProductCategory();\n\t\t\n\t\t$this -> set('categories', $this -> ProductCategory -> find('list', array('fields' => array('ProductCategory.id', 'ProductCategory.name'), 'conditions' => array('ProductCategory.status' => 1,'ProductCategory.is_deleted'=>0))));\n\t\t$categories_list = $this->ProductCategory->find('list', array('conditions' => array('ProductCategory.is_deleted' => 0), 'fields' => array('ProductCategory.id', 'ProductCategory.name')));\n $this->set('categories_list', $categories_list);\n if ($this->request->is('post')) {\n $this->ProductItem->set($this->request->data);\n\t\t\t $this->request->data = Sanitize::clean($this->request->data, array('encode' => false));\n if ($this->ProductItem->validates()) {\n //pr($this->request->data);die;\n if ($this->ProductItem->save($this->request->data)) {\n $this->Session->write('flash', array(ADD_RECORD, 'success'));\n } else {\n $this->Session->write('flash', array(ERROR_MSG, 'failure'));\n }\n $this->redirect(array('controller' => 'ProductItems', 'action' => 'index'));\n }\n }\n }", "public function getCategory() {\n $productModel = new productModel();\n $categories = $productModel->getCategoryList();\n $this->JsonCall($categories);\n }", "public function index()\n {\n $searchImg = new ProductsModel();\n\n $products = $searchImg->getProductWithImageCat();//changé pour avoir category\n\n $this->show('products/listproducts', array(\n 'products' => $products,\n ));\n }", "public function products()\n {\n return $this->hasMany('App\\Models\\Product', 'category_id', 'id');\n }", "function clone_to_category($newParentCatId)\n {\n global $application;\n\n\n /*\n If creating an object the incorrect id was passed, then\n this method will not do anything.\n */\n if ($this->_fProductIDIsIncorrect == true)\n {\n return ($this->debugmode ? 'Product ID is incorrect' : null);\n }\n\n if ($this->_fProductAttributesInfo == null)\n {\n $this->_loadProductAttributesInfo();\n }\n\n # check $newParentCatId\n\n # First create a new product in the table products\n modApiFunc('Catalog', 'insertNewProduct',\n $this->_fBaseProductInfo[0]['p_type_id'],\n $this->_fBaseProductInfo[0]['p_name']);\n $new_product_id = $application->db->DB_Insert_Id();\n\n // copy multilang product names\n $p_ml = modApiFunc('MultiLang', 'getMLTableData', 'Catalog', 'products', $this->_fBaseProductInfo[0]['p_id']);\n modApiFunc('MultiLang', 'addMLTableData', 'Catalog', 'products', $new_product_id, $p_ml);\n\n //<add_link>\n modApiFunc('Catalog','addProductLinkToCategory',$new_product_id,$newParentCatId);\n //</add_link>\n\n # Copies all the current product attributes\n # to the created product\n foreach ($this->_fProductAttributesInfo as $attribute)\n {\n // - , $this->_fProductAttributesInfo\n // , ,\n // product_attributes.\n if ($attribute['pa_id'] === null)\n {\n continue;\n }\n\n modApiFunc('Catalog', 'insertNewProductAttribute', $new_product_id, $attribute['a_id'], $attribute['pa_value']);\n $new_pa_id = $application->db->DB_Insert_Id();\n\n // copy multilang attribute values\n $pa_ml = modApiFunc('MultiLang', 'getMLTableData', 'Catalog', 'product_attributes', $attribute['pa_id']);\n modApiFunc('MultiLang', 'addMLTableData', 'Catalog', 'product_attributes', $new_pa_id, $pa_ml);\n\n // if it is an image, save it to the separate table\n if (strtoupper($attribute['a_input_type_name']) == 'IMAGE')\n {\n if ($attribute['image_name'] &&\n is_readable($application->getAppIni('PATH_IMAGES_DIR').$attribute['image_name']))\n {\n # a temporary image name\n $source_name = $attribute['image_name'];\n $clone_name = basename($application->getUploadImageName($source_name));\n # copy the current imge to the temporary file\n $cr = copy($application->_img_path($source_name), $application->_img_path($clone_name));\n\n # Clone the image (and delete a temporary one)\n $image_info = $application->saveUploadImage(\"\", $clone_name);\n\n # create image info\n modApiFunc('Catalog', 'insertNewProductImage', $new_pa_id, $image_info['name'], $image_info['width'], $image_info['height']);\n }\n }\n }\n modApiFunc('EventsManager','throwEvent','ProductCloned', array('pid'=>$this->_fProductID, 'new_pid'=>$new_product_id, 'cid'=>$newParentCatId));\n return $new_product_id;\n }", "public function index()\n {\n return ProductCategoryResource::collection(ProductCategory::all());\n }", "public function products(){\n \treturn $this->hasMany(Product::class,'category_id');\n }", "public function product(){\n\n }", "public function product()\n {\n return $this->hasMany(product::class, 'category_id', 'id');\n }", "public function catalogo(){\n \n $inicio['recomendado'] = $this->carga_recomendado();\n $inicio['categorias'] = $this->carga_menu_categorias();\n $this->Plantilla(\"catalogo\", $inicio);\n \n }", "public function getSource()\n {\n return 'product_category';\n }", "function getProductByCategoryPath($path){\r\n\t\t$q_product_id=getResultSet(\"SELECT product_id FROM \".DB_PREFIX.\"product_to_category WHERE category_id=\".$path);\r\n\t\twhile($rp=mysql_fetch_array($q_product_id)){\r\n\t\t\t$product_id = $rp['product_id'];\r\n\t\t\t$product = new product($product_id);\r\n\t\t\t\r\n\t\t\techo '<div class=\"item\">';\r\n\t\t\t\techo '<div class=\"desc\">';\r\n\t\t\t\t\techo '<div class=\"item_name\" >'.$product->getProductName().'</div>';\r\n\t\t\t\t\techo '<div class=\"shop_name\"><span style=\"padding: 5px 20px 5px 20px; background-image: url('.HTTP_DOMAIN.'store/image/icon/store.png);background-repeat: no-repeat;background-position: 0px center;\">'.$product->getShopName().'</span></div>';\r\n\t\t\t\t\techo '<div class=\"price\" >$'.$product->getProductPrice().'</div>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\techo '<a href=\"?page=productdetail&product='.$product_id.'\">';\r\n\t\t\t\t\techo '<img src=\"'.$product->getProductImage().'\">';\r\n\t\t\t\techo '</a>';\r\n\t\t\techo '</div>';\r\n\t\t}\t\t\r\n\t}", "public function testGetProductsListByCategory()\n\t{\n\t\t/**\n\t\t * @var shopModel $shopModel\n\t\t */\n\t\t$shopModel = getModel('shop');\n\n\t\t$product_repository = $shopModel->getProductRepository();\n\n\t\t$args = new stdClass();\n\t\t$args->module_srl = 104;\n\t\t$args->category_srls = array(self::CATEGORY_TSHIRTS);\n\t\t$output = $product_repository->getProductList($args);\n\n\t\t$products = $output->products;\n\t\t$this->assertEquals(1, count($products));\n\n\t\tforeach($products as $product)\n\t\t{\n\t\t\t$this->assertNull($product->parent_product_srl);\n\n\t\t\t$this->assertTrue($product->isConfigurable());\n\t\t\t$this->assertTrue(is_a($product, 'ConfigurableProduct'));\n\n\t\t\t$this->assertEquals(6, count($product->associated_products));\n\n\t\t\tforeach($product->associated_products as $associated_product)\n\t\t\t{\n\t\t\t\t$this->assertTrue(is_a($associated_product, 'SimpleProduct'));\n\t\t\t}\n\t\t}\n\n\t}", "public function producto(){\n\t \t$this->load->template('catalogo_producto');\n\t }", "public function show($slug_parent, $slug_child = FALSE)\n {\n $category_main = new Category();\n $category_main->where( array('slug' => $slug_parent, 'parent_id' => 0) )->get();\n\n // Instance a new category description\n $category_description = new Category_Description();\n\n // Check if the category exists\n if( !$category_main->exists() ) redirect( site_url('site/galatea_404') );\n\n // Define product class\n $products = new Item();\n\n // Define sidebar sub-categories\n $sidebar_sub_categories = new Category();\n\n // Define category\n $category_description->where('parent_id', $category_main->id);\n\n // Define breadcrumbs\n $breadcrumbs['breadcrumbs'] = array(\n\n // Main page\n array(\n 'href' => base_url(),\n 'name' => 'Home',\n ),\n\n // Main category\n array(\n 'href' => base_url(\"categoria/{$category_main->slug}/\"),\n 'name' => $category_main->name,\n ),\n\n );\n\n // The child category was sent?\n if($slug_child)\n {\n $category_sub = new Category();\n $category_sub->where( array('slug' => $slug_child, 'parent_id' => $category_main->id) )->get();\n\n // Breadcrumb sub-category address\n $breadcrumbs['breadcrumbs'][] = array(\n 'href' => base_url(\"categoria/{$category_main->slug}/\" . $category_sub->slug),\n 'name' => $category_sub->name,\n );\n\n // The child category exists?\n if( $category_sub->exists() ) {\n\n // Define product category\n $products->where_related_category('id', $category_sub->id);\n\n // Define sidebar category\n $sidebar_sub_categories->where('parent_id', $category_main->id);\n\n // Define the main category\n $category_name = $category_main->name;\n\n // Deifine actual main category for main menu\n $category_main_actual = $category_main->id;\n\n // Define the actual sub-category for sidebar\n $this->category_actual = $category_sub->id;\n\n // Define sub-category\n $category_description->where('child_id', $category_sub->id);\n\n }else{\n\n // Define sub-category\n $category_description->where('child_id', 0);\n\n }\n\n }else{\n\n // Define parent category name\n $category_name = $category_main->name;\n\n // Define sub-categories\n $sub_categories = new Category();\n $sub_categories->where('parent_id', $category_main->id)->get();\n\n // Get all products that have the sub-category\n $products->where_related_category('parent_id', $category_main->id);\n\n // Unset variable\n unset($sub_categories);\n\n // Deifine actual main category for main menu\n $category_main_actual = $category_main->id;\n\n // Define sidebar category\n $sidebar_sub_categories->where('parent_id', $category_main->id);\n\n // Define sub-category\n $category_description->where('child_id', 0);\n\n }\n\n // Define only products that is effectively a \"product\" and is activated\n $products->where( array('status' => 1, 'type' => 2) );\n\n //ORDER\n if( $this->input->get('order') ) {\n //order by price\n if ($this->input->get('order') == 'price_asc') {\n $products->order_by('production_price', 'asc');\n }else{\n $products->order_by('production_price', 'desc');\n }\n\n }else{\n $products->order_by(\"create_date\", \"desc\");\n }\n\n //FILTER\n if( $this->input->get('filter') )\n {\n // Voted (favorites)\n if( $this->input->get('filter') == 'favorites' and $this->session->userdata('id') )\n $products->where_related('item_vote', 'user_id', $this->session->userdata('id'));\n\n //LAST 30 DAYS NEWS\n if($this->input->get('filter') == 'news') {\n $last30days = date('Y-m-d', strtotime(date('Y-m-d') . '-30 days'));\n $products->where('create_date >', $last30days);\n }\n }\n\n $category_url = \"categoria/{$category_main->slug}\";\n\n if( isset($category_sub) ) {\n $category_url .= \"/{$category_sub->slug}\";\n $category['image'] = $category_sub->image;\n $category['href'] = $category_sub->link_address ? $category_sub->link_address : '#';\n }else{\n $category['image'] = $category_main->image;\n $category['href'] = $category_main->link_address ? $category_main->link_address : '#';\n $category_sub = FALSE;\n }\n\n $categories = new Category();\n\n // Get category description\n $category_description->get();\n\n // Variables to the view\n {\n $toview['breadcrumbs'] = $this->load->view('site/common/breadcrumbs', $breadcrumbs, TRUE);\n $toview['category_main'] = $category_main;\n $toview['category_sub'] = $category_sub;\n $toview['categories'] = $categories->where('parent_id', 0)->get();\n $toview['category_url'] = $category_url = isset($category_url) ? $category_url : FALSE;\n $toview['category'] = $category;\n $toview['category_actual'] = $this->category_actual;\n $toview['category_name'] = $category_name;\n $toview['products'] = $products->get();\n $toview['sub_categories'] = $sidebar_sub_categories->get();\n $toview['category_main_actual'] = $category_main_actual;\n $toview['title'] = $category_description->title;\n $toview['metas'] = meta('description', $category_description->description);\n }\n\n $this->load->view('site/common/header/main', $toview);\n $this->load->view('site/common/header/categories', $toview);\n $this->load->view('site/category', $toview);\n $this->load->view('site/common/footer/main', $toview);\n\n }", "private function packCategory()\n {\n /** @var modCategory $category */\n $category = $this->modx->newObject('modCategory');\n $category->set('category', self::PKG_NAME);\n\n $this->packCategoryElements($category, 'plugins');\n\n $this->builder->putVehicle($this->builder->createVehicle($category, [\n xPDOTransport::UNIQUE_KEY => 'category',\n xPDOTransport::PRESERVE_KEYS => false,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::RELATED_OBJECTS => true,\n xPDOTransport::RELATED_OBJECT_ATTRIBUTES => [\n 'Plugins' => [\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::UNIQUE_KEY => 'name'\n ],\n 'PluginEvents' => [\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::UNIQUE_KEY => ['pluginid','event'],\n ]\n ]\n ]));\n }", "public function admin_add() \r\n {\r\n\r\n \t// setting the layout for admin\r\n \t$this->layout = 'admin';\r\n \t\r\n \tif (!empty($this->data)) \r\n \t{\r\n \t\t$this->Product->create();\r\n \t\t\r\n \t\tif ($this->Product->save($this->data)) \r\n \t\t{\r\n \t\t\t$this->Session->setFlash(__('The product has been saved', true));\r\n \t\t\t$this->redirect(array('action' => 'index'));\r\n \t\t} \r\n \t\telse \r\n \t\t{\r\n \t\t\t$this->Session->setFlash(__('The product could not be saved. Please, try again.', true));\r\n \t\t}\r\n \t}\r\n \t\r\n\t\t$categories = $this->Product->Category->find('list');\r\n\t\r\n\t\t$firstCategories = $this->Product->Category->find('first');\r\n\t\r\n\t\t// getting the subcategories for first category which is displaying by default\r\n\t\t$subCategoriesArray = $this->Product->SubCategory->find('list',array('conditions'=>array('SubCategory.category_id'=>$firstCategories['Category']['id'])));\r\n\t\r\n\t\t$subCategories[] = 'Please select';\r\n\t\tforeach ($subCategoriesArray as $key => $subCat) \r\n\t\t{\r\n\t\t\t$subCategories[$key] = $subCat;\r\n\t\t}\r\n\r\n\t\t$this->set(compact('categories', 'subCategories'));\r\n\r\n }", "public function viewAction()\n {\n $alias = $this->route['alias'];\n $category = R::findOne('category', 'alias = ?', [$alias]);\n\n $curr = \\ishop\\App::$app->getProperty('currency');\n\n if(!$category){\n throw new \\Exception('Страница не найдена', 404);\n }\n\n // 2. breadcrumbs & ids for all children categories\n $breadcrumbs = Breadcrumbs::getBreadcrumbs($category->id);\n $cat_model = new Category();\n $ids = $cat_model->getIds($category->id);\n $ids = $ids ? ($ids . $category->id) : $category->id;\n $filterData['categoryIds'] = $ids;\n\n // 3. get product sort parameters\n $productsSort = App::$app->getProperty('productsSort');\n $sort = self::productSort();\n $productSortDB = self::productSortDB();\n $productsPerPage = App::$app->getProperty('productsPerPage');\n $perpage = self::getProductPerpage();\n $productsMode = self::getProductMode();\n\n // 4. filters for products\n $filter = null; $sql_part = '';\n if(!empty($_GET['filter']))\n {\n new \\app\\widgets\\filter\\Filter($filterData);\n $filter = Filter::getFilter();\n\n if($filter){\n $countGroups = Filter::countGroups($filter);\n $sql_part = \"AND product.id IN (\n SELECT attribute_product.product_id\n FROM attribute_product \n LEFT JOIN attribute_value ON attribute_value.id = attribute_product.attr_id\n LEFT JOIN attribute_group ON attribute_group.id = attribute_value.attr_group_id\n WHERE attribute_product.attr_id IN ({$filter})\n GROUP BY attribute_product.product_id\n HAVING COUNT(DISTINCT attribute_value.attr_group_id) = {$countGroups}\n )\";\n }\n\n $filter = explode(',', $filter);\n }\n\n $filterPrice = null;\n if(!empty($_GET['minPrice']) && $_GET['maxPrice'])\n {\n $minPrice = round($_GET['minPrice'] / $curr['value']);\n $maxPrice = round($_GET['maxPrice'] / $curr['value']);\n $sql_part .= \" AND product.price >= {$minPrice} AND product.price <= {$maxPrice} \";\n }\n\n // 5. find total (with filters) & get pagination\n $page = isset($_GET['page']) ? (int)$_GET['page'] : 1;\n $total = R::count('product', \"category_id IN ($ids) AND status = 'visible' $sql_part\");\n $pagination = new Pagination($page, $perpage, $total);\n $start = $pagination->getStart();\n\n $products = R::getAll(\"SELECT product.*, GROUP_CONCAT(product_base_img.img SEPARATOR ',') AS base_img FROM product \n LEFT JOIN product_base_img ON product_base_img.product_id = product.id\n WHERE product.category_id IN ($ids) AND product.status = 'visible' $sql_part\n GROUP BY product.id ORDER BY $productSortDB LIMIT $start, $perpage\");\n\n if($products){\n for ($z=0; $z<count($products); $z++){\n $getProductSizes = R::getAll(\"SELECT GROUP_CONCAT(attribute_value.value) AS value\n FROM attribute_value\n LEFT JOIN attribute_product ON attribute_value.id = attribute_product.attr_id\n WHERE attribute_product.product_id = {$products[$z]['id']} AND attribute_value.attr_group_id = 6\");\n $products[$z]['sizes'] = $getProductSizes[0]['value'];\n }\n }\n\n $sizes = R::findAll(\"attribute_value\", 'attr_group_id = ? ', [6]);\n\n $productRangeCount = ($perpage*($pagination->currentPage-1)+1) .\" - \". ($perpage*($pagination->currentPage-1) + count($products));\n\n\n $filterPrice = R::getRow(\"SELECT MIN(price) AS minPrice, MAX(price) AS maxPrice\n FROM `product` \n WHERE category_id IN($ids) AND status = 'visible'\");\n\n $filterData['minPrice'] = round($filterPrice['minPrice'] * $curr['value']);\n $filterData['maxPrice'] = round($filterPrice['maxPrice'] * $curr['value']);\n\n if($this->isAjax())\n {\n $categoryViews['products'] = $this->loadViews('products', compact('products'));\n $categoryViews['productPagination'] = $this->loadViews('product_pagination', compact( 'pagination', 'total', 'productRangeCount'));\n $filterObj = new \\app\\widgets\\filter\\Filter($filterData);\n $categoryViews['productFilter'] = $filterObj->run();\n\n echo json_encode($categoryViews, true);\n die;\n }\n\n $title = $category->meta_title ? $category->meta_title : $category->title;\n $this->setMeta( $title.' - интернет магазин MegaShop Demo', $category->description, $category->keywords);\n $this->set(compact('breadcrumbs', 'category', 'products',\n 'pagination', 'total', 'perpage', 'productsPerPage', 'sizes',\n 'productsSort', 'sort', 'productRangeCount', 'productsMode', 'filterData'));\n\n }", "public function listProducts(){\n\t\t$response_ = json_decode($this->configuration());\n if($response_->codeState==200){ \n\n /*---\n $listCategories_ =view_listar_productos::\n select('*',DB::raw('count(*) as cnt_rows'))->where('parent',1)\n ->groupBy('nameCategorie')\n ->orderBy('nameCategorie')\n ->get(['idCategorie','nameCategorie','cnt_rows']);\n ---*/\n\n $litarCategorias_ = view_list_categories::All();\n\n $ProductsList_ = view_listar_productos::where('parent',1)\n \t->orderBy('nameAttribute','Asc')\n \t->get(); \n \n /*------\n $Store_categorie_ = Store_products_selection::groupBy('nameCategorie')->orderBy('nameCategorie','Asc')->get(['nameCategorie','idCategorie','imageCategorie','slug_category']);\n ------*/\n\n $permisos_ = User::where('id',Auth::user()->id)->first(['modulos_permisos']);\n\n return view('theme.components.administrator.comp_manage.listProducts')\n ->with([\n \t\"ProductsList_\" => $ProductsList_, \n \"permisos_\" => $permisos_,\n \"litarCategorias_\" => $litarCategorias_\n ]);\n }\n\t}", "public function products()\n {\n //$products = $api->getAllProducts();\n //var_dump($products);\n // TODO save products to database\n }", "function other_product_catalog($cid, $cpath, $COLLAPSABLE) {\n global $categories_string3, $languages_id, $level, $categories;\n\n $selectedPath = array();\n // Get all of the categories on this level\n\n\n /* Added for Discount pharmacy hide and show on 2nd feb 2012 */\n $category_query_raw = \"\";\n\n if(isset($_SESSION['customer_id']) && !empty($_SESSION['customer_id'])) {\t\n \n\t\t$customer_group_id = tep_get_customers_access_group($_SESSION['customer_id']);\t\n\t \n\t //$customer_group_id = array(\"G\",\"0\");\n\t\t\n } else {\n \n\t\t$customer_group_id = array(\"G\",\"0\");\n\t\t\n }\n \n $category_query_raw .= tep_get_access_sql('c.products_group_access', $customer_group_id);\n\n/* Added for Discount pharmacy hide and show on 2nd feb 2012 /end */\n\n \n \n /* Default Modified for Discount pharmacy hide and show on 2nd feb 2012 */\n\n /*if(!$_SESSION['sppc_customer_group_id']) {\n $customer_group_id = 'G';\n } else {\n $customer_group_id = $sppc_customer_group_id;\n }*/\n \n /* Default Modified for Discount pharmacy hide and show on 2nd feb 2012 */\n\n \n \n $categories_query = tep_db_query(\"SELECT c.categories_id, cd.categories_name, c.parent_id \n from \" . TABLE_CATEGORIES . \" c,\n \" . TABLE_CATEGORIES_DESCRIPTION . \" cd \n WHERE c.parent_id = '25' \n and c.categories_id = cd.categories_id \n and cd.language_id='\" . $languages_id .\"' \n $category_query_raw order by sort_order, cd.categories_name\");\n \n while ($categories = tep_db_fetch_array($categories_query)) {\n if ($categories[$level]['parent_id'] == \"\") { $categories[$level]['parent_id'] = 0; }\n $categories[$level]['categories_id'] = $categories[$level]['parent_id'] + 1;\n // Add category link to $categories_string3\n for ($a=1; $a < $level[$categories]['categories_id']; $a++) {\n $categories_string3 .= \"&nbsp;&nbsp;\";\n }\n\t\n $categories_string3 .= '<li><a href=\"';\n $cPath_new = $cpath;\n if ($categories[$level]['parent_id'] > 0) {\n $cPath_new .= \"_\";\n }\n $cPath_new .= $categories['categories_id'];\n // added for CDS CDpath support\n $CDpath = (isset($_SESSION['CDpath'])) ? '&CDpath=' . $_SESSION['CDpath'] : ''; \n $cPath_new_text = \"cPath=\" . $cPath_new . $CDpath;\n $categories_string3 .= tep_href_link(FILENAME_DEFAULT, $cPath_new_text);\n $categories_string3 .= '\">';\n if ($_GET['cPath']) {\n $selectedPath = split(\"_\", $_GET['cPath']);\n }\n if (in_array($categories['categories_id'], $selectedPath)) { $categories_string3 .= '<b>'; }\n //if ($categories[$level]['categories_id'] == 1) { $categories_string3 .= '<u>'; }\n $categories_string3 .= tep_db_output($categories['categories_name']);\n if ($COLLAPSABLE && tep_has_category_subcategories($categories['categories_id'])) { $categories_string3 .= ' ->'; }\n //if ($categories[$level]['categories_id'] == 1) { $categories_string3 .= '</u>'; }\n if (in_array($categories['categories_id'], $selectedPath)) { $categories_string3 .= '</b>'; }\n $categories_string3 .= '</a></li>';\n \n \n // If I have subcategories, get them and show them\n if (tep_has_category_subcategories($categories['categories_id'])) {\n if ($COLLAPSABLE) {\n if (in_array($categories['categories_id'], $selectedPath)) {\n other_product_catalog($categories['categories_id'], $cPath_new, $COLLAPSABLE);\n }\n } else { \n other_product_catalog($categories['categories_id'], $cPath_new, $COLLAPSABLE); \n }\n }\n\t\n }\n \n}", "function product()\n {\n if (($data['logedUser'] = $this->_admin_pages()))\n { \n \n $product['content'] = Modules::run('product/_index'); \n \n $data['header'] = '';\n $data['titelHeader'] = $this->lang->line('product');\n $data['content'] = Modules::run('ajaxme/ajaxmeAdminProduct',$product);\n \n \n $this->load->view('general',$data);\n \n }\n }", "public function products() {\n return $this->hasMany('App\\Models\\Product', 'category_id', 'id');\n }", "public function categoryProduct(){\n return $this->hasMany(CategoryProduct::class);\n }", "public function index()\n {\n return ProductResource::collection(Product::with('categories')->get());\n }", "public function products()\n {\n return $this->morphedByMany(Product::class, 'categorables');\n }", "public function getActiveCartProducts();", "function showCategory()\r\n {\r\n }", "public function HM_CategoCuentas()\n {\n }", "function __construct()\n {\n $this->productGroupsToCategories = Array(\n 1 => 1, // Power kits => Systems\n 2 => 3, // Solar lanterns => Light\n 14 => 1, // SHS 12V => Systems\n 16 => 3, // LED => Light\n 17 => 2, // Fans => Appliances\n 18 => 2, // Fridges => Appliances\n 19 => 2, // Pumps => Appliances\n 24 => 2, // Various appliances => Appliances\n 20 => 2, // Radios => Appliances\n 21 => 2, // TV => Appliances\n 25 => 0, // PAYG (component) => n/a\n 26 => 1, // SHS <12V => Systems\n );\n\n /*\n * Productsubgroups => Options\n */\n $this->productSubGroupsToOptions = Array(\n 14 => 23, // 21Wp - 50Wp =>\n 15 => 23, // 1Wp - 20Wp =>\n 16 => 24, // 51Wp -100Wp =>\n 17 => 36, // Table =>\n 18 => 37, // Ceiling =>\n 19 => 79, // < 1W =>\n 20 => 80, // 1W =>\n 21 => 81, // 2W =>\n 22 => 82, // 3W =>\n 23 => 83, // 4W =>\n 24 => 84, // 5W =>\n 25 => 85, // > 5W =>\n 26 => 44, // up to 20'' =>\n 27 => 45, // > 20'' =>\n //28 => 0, // Cloth dryers =>\n 29 => 58, // Egg incubators =>\n 30 => 59, // Electric fences =>\n 31 => 60, // Hand drills =>\n 32 => 61, // Kettles =>\n 33 => 62, // Sewing machines =>\n //34 => 0, // Spinning wheels =>\n 35 => 63, // Washing machines =>\n 36 => 25, // > 100Wp =>\n 37 => 35, // Stand =>\n 38 => 41, // Surface =>\n 39 => 40, // Submersible =>\n 40 => 46, // Portable =>\n\n 41 => 57, // Iron =>\n 42 => 56, // Hair dryer =>\n 43 => 55, // Mosquito repellent =>\n 44 => 54, // Cooker/Stove =>\n\n 45 => 2, // <12V =>\n 46 => 3, // 12V =>\n 47 => 4, // 24V =>\n 48 => 5, // 48V =>\n\n 49 => 53, // Refrigerators/Freezers =>\n 50 => 50, // Medical Fridges/Freezers =>\n 51 => 51, // Mobile/Portable =>\n 52 => 52, // Refrigerators =>\n 53 => 49, // Freezers =>\n );\n }", "protected function export_categoryless_products()\n {\n $table = $this->getTableName(\"catalog_product_entity\");\n $categoryProductsTable = $this->getTableName(\"catalog_category_product\");\n $catalogProductWebsite = $this->getTableName(\"catalog_product_website\");\n $rootCategoryId = $this->_fStore->getRootCategoryId();\n $sql = \"SELECT DISTINCT(entity_id), type_id, sku FROM {$table}\n LEFT JOIN (`{$categoryProductsTable}`) ON ({$table}.`entity_id` = `{$categoryProductsTable}`.`product_id`)\n LEFT JOIN (`{$catalogProductWebsite}`) ON ({$table}.`entity_id` = `{$catalogProductWebsite}`.`product_id`)\n WHERE (`{$categoryProductsTable}`.`product_id` IS NULL OR `{$categoryProductsTable}`.`category_id` NOT IN ({$this->_getCategoriesForStore()}))\n AND {$table}.entity_type_id = {$this->_product_entity_type_id}\n AND `{$catalogProductWebsite}`.`website_id` = \" . $this->getWebsiteId($this->_fStore_id); \n \n return $this->export_products($sql, 'categoryless_products');\n }", "public function paramsAction() {\n\n$product_collection = Mage::getModel('catalog/category')->load(3)->getProductCollection();\n\n// Now let's loop through the product collection and print the ID of every product \nforeach($product_collection as $product) {\n // Get the product ID\n\n$product_id = $product->getId();\n\n // Load the full product model based on the product ID\n\n$full_product = Mage::getModel('catalog/product')->load($product_id);\n\n // Now that we loaded the full product model, let's access all of it's data\n\n // Let's get the Product Name\n\n $product_name = $full_product->getName();\n\n // Let's get the Product URL path\n\n $product_url = $full_product->getProductUrl();\n\n // Let's get the Product Image URL\n\n $product_image_url = $full_product->getImageUrl();\n\n // Let's print the product information we gathered and continue onto the next one\n\n echo $product_name;\n\n echo $product_image_url;\n}\n }", "public function testGetProductCategories() {\n \n }", "function index() {\t\n\t $this->account();\t \n\t // $conditions=array('Catproduct.status'=>1);\t\n\t $this->paginate = array('limit' => '15','order' => 'Album.id ASC');\n\t $this->set('Album', $this->paginate('Album',array()));\n $list_cat = $this->Album->generatetreelist(null,null,null,\" _ \");\n\t $this->set(compact('list_cat'));\n\t}", "function sos_chapter_change_cat_object() {\n global $wp_taxonomies;\n $labels = &$wp_taxonomies['product_cat']->labels;\n $labels->name = 'Topic';\n $labels->singular_name = 'Topic';\n $labels->add_new = 'Add Topic';\n $labels->add_new_item = 'Add Topic';\n $labels->edit_item = 'Edit Topic';\n $labels->new_item = 'Topic';\n $labels->view_item = 'View Topic';\n $labels->search_items = 'Search Topics';\n $labels->not_found = 'No Topics found';\n $labels->not_found_in_trash = 'No Topics found in Trash';\n $labels->all_items = 'All Topics';\n $labels->menu_name = 'Topic';\n $labels->name_admin_bar = 'Topic';\n}", "public function product_action()\n\t{\n\t\t// shut up php\n\t\terror_reporting(0);\n\t\tee()->load->helper('xml');\n\n\t\t$output = new Oxymel;\n\n\t\t// create our structure\n\t\t$output->xml->products->contains;\n\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\n\t\t$query = ee()->sync_db\n\t\t\t->where('processed', 0)\n\t\t\t->get('products', 500);\n\n\t\t$ids_processed = array();\n\n\t\tforeach($query->result() as $row)\n\t\t{\n\n\t\t\tif($row->tax_exempt == 0)\n\t\t\t{\n\t\t\t\t$tax_exempt = \"Taxable\";\n\t\t\t}\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tax_exempt = \"\";\n\t\t\t}\n\n\t\t\tif(!empty($row->product_category_3))\n\t\t\t{\n\t\t\t\t$product_category = $row->product_category_3;\n\t\t\t}\t\n\t\t\telseif(!empty($row->product_category_2))\n\t\t\t{\n\t\t\t\t$product_category = $row->product_category_2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$product_category = $row->product_category_1;\n\t\t\t}\n\n\t\t\t// append a product\n\t\t\t$output\n\t\t\t\t->product->contains\n\t\t\t\t \t->title->contains->cdata($row->sku .' - ' . $row->name)->end\n\t\t\t\t \t->sku($row->sku)\n\t\t\t\t \t->name->contains->cdata($row->name)->end\n\t\t\t\t \t->price($row->price)\n\t\t\t\t \t->weight($row->weight)\n\t\t\t\t \t->length($row->length)\n\t\t\t\t \t->width($row->width)\n\t\t\t\t \t->height($row->height)\n\t\t\t\t \t->handling($row->handling)\n\t\t\t\t \t->free_shipping($row->free_shipping)\n\t\t\t\t \t->tax_exempt($tax_exempt)\n\t\t\t\t \t->category->contains->cdata($product_category)->end\n\t\t\t\t \t->product_number($row->product_number)\n\t\t\t\t \t->manufacturer->contains->cdata($row->product_manufacturer)->end\n\t\t\t\t \t->container($row->product_container)\n\t\t\t\t \t->condition($row->product_condition)\n\t\t\t\t \t->listed($row->product_listed)\n\t\t\t\t \t->location($row->product_location)\n\t\t\t\t \t->tested($row->product_tested)\n\t\t\t\t \t->cosmetic_condition->contains->cdata($row->product_cosmetic_condition)->end\n\t\t\t\t \t->keywords->contains->cdata($row->product_keywords)->end\n\t\t\t\t \t->natural_search->contains->cdata($row->product_natural_search)->end\n\t\t\t\t \t->description->contains->cdata($row->product_description)->end\n\t\t\t\t \t->image($row->product_image_filename)\n\t\t\t\t \t->stock_level($row->product_stock_level)\n\t\t\t\t \t->sell_online($row->product_sell_online)\n\t\t\t\t \t->timestamp($row->timestamp)\n\t\t\t\t->end;\t\n\n\t\t\t$ids_processed[] = $row->id;\n\n\t\t}\t\n\n\t\t// close our structure\n\t\t$output->end;\t\n\t\t\t \t\n\t\t// update processed flag on records\t\n\t\tif(count($ids_processed) > 0)\n\t\t{\n\t\t\tee()->sync_db->where_in('id', $ids_processed)->set('processed', 1)->update('products');\n\t\t}\n\n\t\theader('Content-Type: text/xml');\n\t\texit($output->to_string());\n\n\t}", "function IsProduct() {\r\n\t\treturn true;\r\n\t}", "function __construct() \n\t{\n\t\tparent::__construct( 'rt_products', 'id', 'prd' );\n\t}", "function setCategory($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n}", "function dbAddCategoriesProduct( $iCategory, $iProduct, $bErase = true ){\n global $oFF;\n if( isset( $bErase ) )\n $oFF->deleteInFile( DB_PRODUCTS_CATEGORIES, $iProduct, 1 );\n $oFF->setRow( Array( $iCategory, $iProduct ) );\n $oFF->addToFile( DB_PRODUCTS_CATEGORIES );\n }", "public function getCategory()\n {\n }", "private function createInitialProducts()\n {\n $this->product = $this->createProduct();\n $this->product2 = $this->createProduct();\n\n $this->category = $this->createCategory();\n $this->product->addCategory($this->category);\n $this->product2->addCategory($this->category);\n }", "function crunchify_create_deals_custom_taxonomy2() {\r\n \r\n $labels = array(\r\n 'name' => _x( 'Marca produto', 'marca_produtos' ),\r\n 'singular_name' => _x( 'Marca produto', 'marca_produtos' ),\r\n 'search_items' => __( 'Pesquisar marca produto' ),\r\n 'all_items' => __( 'Todas as marcas' ),\r\n 'parent_item' => __( 'Marca produto pai' ),\r\n 'parent_item_colon' => __( 'Marca produto pai:' ),\r\n 'edit_item' => __( 'Editar Marca produto' ), \r\n 'update_item' => __( 'Atualizar marca produto' ),\r\n 'add_new_item' => __( 'Adicionar marca produto' ),\r\n 'new_item_name' => __( 'Nova marca produto' ),\r\n 'menu_name' => __( 'Marca produto' ),\r\n ); \r\n \r\n register_taxonomy('marca_produtos',array('product'), array(\r\n 'hierarchical' => true,\r\n 'labels' => $labels,\r\n 'show_ui' => true,\r\n 'show_admin_column' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'marca_produtos' ),\r\n ));\r\n}", "public function index()\n {\n $products = Product::productWithCategoriesTags()->get(); // scope utiliser dans model Product\n //$products = Product::withCount('category')->with('category.type')->get();\n return view('backend.products.index',compact('products'));\n }", "public static function productLists()\n {\n array_push(self::$products, \n [\n CART::ID => self::$id,\n CART::NAME => self::$name,\n CART::PRICE => self::$price,\n CART::QUANTITY => self::$quantity\n ]);\n }", "private function createViewProducto()\n {\n $this->addView('ListProductoSample', 'ProductoSample', 'products', 'fas fa-cubes');\n $this->addSearchFields('ListProductoSample', ['referencia', 'descripcion', 'observaciones']);\n $this->addOrderBy('ListProductoSample', ['referencia'], 'reference');\n $this->addOrderBy('ListProductoSample', ['descripcion'], 'description');\n $this->addOrderBy('ListProductoSample', ['precio'], 'price');\n $this->addOrderBy('ListProductoSample', ['stockfis'], 'stock');\n $this->addOrderBy('ListProductoSample', ['actualizado'], 'update-time');\n\n $manufacturers = $this->codeModel::all('fabricantes', 'codfabricante', 'nombre');\n $this->addFilterSelect('ListProductoSample', 'codfabricante', 'manufacturer', 'codfabricante', $manufacturers);\n\n $families = $this->codeModel::all('familias', 'codfamilia', 'descripcion');\n $this->addFilterSelect('ListProductoSample', 'codfamilia', 'family', 'codfamilia', $families);\n\n $taxes = $this->codeModel::all('impuestos', 'codimpuesto', 'descripcion');\n $this->addFilterSelect('ListProductoSample', 'codimpuesto', 'tax', 'codimpuesto', $taxes);\n\n $this->addFilterCheckbox('ListProductoSample', 'nostock', 'no-stock', 'nostock');\n $this->addFilterCheckbox('ListProductoSample', 'bloqueado', 'locked', 'bloqueado');\n $this->addFilterCheckbox('ListProductoSample', 'secompra', 'for-purchase', 'secompra');\n $this->addFilterCheckbox('ListProductoSample', 'sevende', 'for-sale', 'sevende');\n $this->addFilterCheckbox('ListProductoSample', 'publico', 'public', 'publico');\n }", "function GetProducts(){\n $query = $this->db->prepare(\"SELECT `p`.`id` as `id_producto`, `p`.`nombre` as `nombre_producto`, `p`.`descripcion` as `desc_producto`, `p`.`precio` as `precio`, `p`.`stock` as `stock`, `c`.`nombre` as `nombre_categoria` FROM producto p INNER JOIN categoria c ON `p`.`id_categoria`=`c`.`id`\");\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "public function getProducts() {\n return $this->hasMany(Product::className(), ['brand_id' => 'id']); // second param - field in dependent table\n }", "public function actionCategories()\n {\n // $model ->select('category')\n // ->from('product')\n // ->distinct()\n // ->all();\n \n // if ($model) {\n // foreach ($model as $row) {\n // print_r($row['category']);\n // }\n // }\n $query = product::find()->select('category')->distinct();\n foreach($query as $row)\n {\n print_r($row->category);\n }\n \n exit();\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return $model;\n\n }", "function saveCategories($product_id)\n {\n //var_dump(Category::$cats); exit;\n if(is_null($this->categories) || sizeof($this->categories) < 1){\n return;\n }\n \n foreach ($this->categories as $ids) {\n if(empty($ids)){\n continue;\n }\n \tif(isset(Category::$cats[$ids]) && is_object(Category::$cats[$ids])){\n\t $names[] = array('name'=>Category::$cats[$ids]->name);\n\t $cids[] = array('name'=>Category::$cats[$ids]->cid);\n\t $i = 0;\n\t $parent_id = $ids;\n\t \n\t while(($parent_id = Category::$cats[$parent_id]->parent_id) != 0){\n\t \n\t $names[] = array('name'=>Category::$cats[$parent_id]->name);\n\t $cids[] = array('name'=>Category::$cats[$parent_id]->cid);\n\t $i++;\n\t if($i > 7 ){ $i = 0; break; }\n\t }\n\t \t\n\t // \t\n\t \t$this->saveWords(Category::$cats[$ids]->name, $product_id, 2);\n\t \t $this->saveWords(Category::$cats[$ids]->description, $product_id, 1);\n\t\t//\t\t}\n\t\t\t}\n } \n\t\tif(isset($names)){\n \t$this->options['category'] = array('name'=>'category','value'=>$names);\n \t$this->options['category_id'] = array('name'=>'category_id','value'=>$cids);\n\t\t}\n }", "public function getCategory(): string;", "public function getProduct_category () {\n\t$preValue = $this->preGetValue(\"product_category\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->getClass()->getFieldDefinition(\"product_category\")->preGetData($this);\n\treturn $data;\n}", "function Register_Product(){\n\t\tregister_taxonomy('location_cat', 'product' , array(\n\t\t\t'hierarchical'\t\t\t=> true,\n\t\t\t'query_var'\t\t\t\t\t=> true,\n\t\t\t'rewrite'\t\t\t\t\t\t=> array( 'slug' => 'location' ), \n\t\t\t'label'\t\t\t\t\t\t\t=> __( 'Locations', 'sharehouse' ),\n\t\t\t'singular_name'\t\t\t=> __( 'Location ', 'sharehouse' ),\n\t\t\t'menu_name'\t\t\t\t\t=> __( 'Locations', 'sharehouse' ), \n\t\t)); \n\t}", "public function category_product()\n {\n return $this->belongsTo(Category_product::class);\n }", "function createProduct($parent = null);", "function showProducts() \n{\n global $products;\n foreach ($products as $category=>$value) {\n foreach ($value as $subcategory=>$x) {\n foreach ($x as $product=>$y) {\n echo \"<tr><td>\".$category.\"</td>\";\n echo \"<td>\".$subcategory.\"</td>\";\n echo \"<td>\".$y['id'].\"</td>\";\n echo \"<td>\".$y['name'].\"</td>\";\n echo \"<td>\".$y['brand'].\"</td></tr>\";\n }\n }\n }\n}", "public function products()\n {\n \t// y dinh : phuong thuc se lien ket quan he one - to - many voi bang product\n \treturn $this->hasMany('App\\Models\\Products');\n }", "function mg_custom_product() {\n\n $labels = array(\n 'name' => _x( 'Products', 'Post Type General Name', 'mog' ),\n 'singular_name' => _x( 'Product', 'Post Type Singular Name', 'mog' ),\n 'menu_name' => __( 'Products', 'mog' ),\n 'name_admin_bar' => __( 'Products', 'mog' ),\n 'archives' => __( 'Products', 'mog' ),\n 'attributes' => __( 'Products', 'mog' ),\n 'parent_item_colon' => __( 'Products:', 'mog' ),\n 'all_items' => __( 'All Products', 'mog' ),\n 'add_new_item' => __( 'Add New Product', 'mog' ),\n 'add_new' => __( 'Add New', 'mog' ),\n 'new_item' => __( 'New Product', 'mog' ),\n 'edit_item' => __( 'Edit Product', 'mog' ),\n 'update_item' => __( 'Update Product', 'mog' ),\n 'view_item' => __( 'View Product', 'mog' ),\n 'view_items' => __( 'View Products', 'mog' ),\n 'search_items' => __( 'Search Product', 'mog' ),\n 'not_found' => __( 'Not found', 'mog' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'mog' ),\n 'featured_image' => __( 'Featured Image', 'mog' ),\n 'set_featured_image' => __( 'Set featured image', 'mog' ),\n 'remove_featured_image' => __( 'Remove featured image', 'mog' ),\n 'use_featured_image' => __( 'Use as featured image', 'mog' ),\n 'insert_into_item' => __( 'Insert into Product', 'mog' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this Product', 'mog' ),\n 'items_list' => __( 'Products list', 'mog' ),\n 'items_list_navigation' => __( 'Product list navigation', 'mog' ),\n 'filter_items_list' => __( 'Filter products list', 'mog' ),\n );\n $args = array(\n 'label' => __( 'Product', 'mog' ),\n 'description' => __( 'Products', 'mog' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n\t 'rewrite' => array( 'slug' => 'products' ),\n );\n register_post_type( 'custom_product', $args );\n\tflush_rewrite_rules();\n\n}", "public function getCatalogoCategory($category) {\n $cat = Category::findOrFail($category);\n $prods = $cat->productTypes->pluck('id');\n $products = ProductType::whereIn('id', $prods)->paginate(8);\n\n // Manipolazione dei prodotti !!!\n $products->map(function ($product) {\n\n });;\n\n return view('frontoffice.pages.shop', ['products' => $products, 'parent' => $cat]);\n }", "public function categorie()\n {\n $data[\"categories\"]=$this->categories->list();\n $this->template_admin->displayad('categories' , $data);\n }", "function get_sale_product_list($type, $category_id)\n\t{\n\t\tif ($type == 'category')\n\t\t\t$products = $this->db->get_where('product', array(\n\t\t\t\t'category_id' => $category_id\n\t\t\t))->result_array();\n\t\tif ($type == 'sub_category')\n\t\t\t$products = $this->db->get_where('product', array(\n\t\t\t\t'sub_category_id' => $category_id\n\t\t\t))->result_array();\n\t\tforeach ($products as $row) {\n\t\t\techo '<p onclick=\"add_product(' . $row['product_id'] . ')\" style=\"cursor: pointer;\">\n\t\t\t\t\t<span class=\"fa-stack fa-2x text-success\">\n\t\t\t\t\t\t<i class=\"fa fa-circle-o fa-stack-2x\"></i>\n\t\t\t\t\t\t<i class=\"fa fa-plus fa-stack-1x\"></i>\n\t\t\t\t\t</span>' . $row['name'] . '' . ' '. '(' . $row['stock_quantity'] . ')\n\t\t\t\t</p>';\n\t\t}\n\t}" ]
[ "0.7163742", "0.688953", "0.67565954", "0.67385197", "0.6655302", "0.66274375", "0.6548645", "0.6482956", "0.6478918", "0.64338267", "0.6419959", "0.64161074", "0.6390495", "0.63654184", "0.63520306", "0.6339948", "0.6337067", "0.6326756", "0.63190836", "0.63155955", "0.62719756", "0.6270222", "0.62683356", "0.6265245", "0.6261153", "0.625329", "0.62409216", "0.6227342", "0.6222242", "0.6222242", "0.6203352", "0.6194928", "0.61928755", "0.6186794", "0.61767834", "0.61754847", "0.6169913", "0.6161263", "0.61605054", "0.6157932", "0.6152058", "0.6143932", "0.61436516", "0.6138104", "0.61321944", "0.6128677", "0.6123826", "0.612113", "0.6115226", "0.6106863", "0.61011696", "0.60909283", "0.6086363", "0.6084182", "0.60784346", "0.6074589", "0.6073159", "0.607222", "0.60702324", "0.60688496", "0.6067925", "0.6059428", "0.6058964", "0.6038948", "0.60348815", "0.6033604", "0.60271955", "0.6020632", "0.60154945", "0.60141325", "0.6014018", "0.6004366", "0.5999684", "0.59988403", "0.59932023", "0.5992462", "0.5989426", "0.5982641", "0.598252", "0.5981217", "0.5981028", "0.5978901", "0.59788084", "0.59689426", "0.5968784", "0.5963984", "0.5958139", "0.5957381", "0.594755", "0.5945935", "0.59457886", "0.5945745", "0.59448385", "0.5937524", "0.5937125", "0.5935982", "0.5933985", "0.5930214", "0.59300834", "0.5922819", "0.5921955" ]
0.0
-1
Change Method. More information on this method is available here:
public function change() { $this->table('countries') ->addColumn('name', 'string', [ 'default' => null, 'limit' => 64, 'null' => false, ]) ->addColumn('ori_name', 'string', [ 'default' => null, 'limit' => 64, 'null' => false, ]) ->addColumn('continent_id', 'integer', [ 'default' => null, 'limit' => 10, 'null' => true, 'signed' => false, ]) ->addColumn('iso2', 'string', [ 'default' => null, 'limit' => 2, 'null' => false, ]) ->addColumn('iso3', 'string', [ 'default' => null, 'limit' => 3, 'null' => false, ]) ->addColumn('phone_code', 'string', [ 'default' => null, 'limit' => 20, 'null' => true, ]) ->addColumn('eu_member', 'boolean', [ 'comment' => 'Member of the EU', 'default' => false, 'limit' => null, 'null' => false, ]) ->addColumn('zip_length', 'tinyinteger', [ 'comment' => 'if > 0 validate on this length', 'default' => '0', 'limit' => null, 'null' => false, 'signed' => false, ]) ->addColumn('zip_regexp', 'string', [ 'default' => null, 'limit' => 190, 'null' => true, ]) ->addColumn('sort', 'integer', [ 'default' => '0', 'limit' => null, 'null' => false, 'signed' => false, ]) ->addColumn('lat', 'float', [ 'comment' => 'latitude', 'default' => null, 'null' => true, 'precision' => 10, 'scale' => 6, ]) ->addColumn('lng', 'float', [ 'comment' => 'longitude', 'default' => null, 'null' => true, 'precision' => 10, 'scale' => 6, ]) ->addColumn('address_format', 'string', [ 'default' => null, 'limit' => 190, 'null' => true, ]) ->addColumn('timezone_offset', 'string', [ 'default' => null, 'limit' => 255, 'null' => true, ]) ->addColumn('status', 'tinyinteger', [ 'default' => '0', 'limit' => null, 'null' => false, 'signed' => false, ]) ->addColumn('modified', 'datetime', [ 'default' => null, 'limit' => null, 'null' => false, ]) ->addIndex( [ 'iso2', ], ['unique' => true], ) ->addIndex( [ 'iso3', ], ['unique' => true], ) ->create(); // ALTER TABLE `countries` ADD `timezone_offset` VARCHAR(255) NULL AFTER `phone_code`; // ALTER TABLE `countries` CHANGE `country_code` `phone_code` VARCHAR(20) NULL DEFAULT NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function change();", "function change()\n {\n }", "public function change($changes);", "public function change()\n {\n echo '客户要求改变一个需求' . PHP_EOL;\n }", "public function change($options)\n\t{\n\n\t}", "public function setChanged()\n {\n\n $this->_changed = true;\n\n }", "public function changeFunc() {}", "public function change()\n {\n $this->table('change_history')\n ->setComment('数据修改记录')\n ->setEngine('InnoDB')\n ->addColumn('model_type','string', ['comment' => '数据模型类名'])\n ->addColumn('model_id', 'integer', ['comment' => '数据ID'])\n ->addColumn('before', 'text', ['comment' => '修改前内容'])\n ->addColumn('after', 'text', ['comment' => '修改后内容'])\n ->addColumn('method', 'string', ['comment' => '请求方式'])\n ->addColumn('url', 'text', ['comment' => '请求url'])\n ->addColumn('param', 'text', ['comment' => '请求参数'])\n ->addFingerPrint()\n ->create();\n }", "public function change()\n {\n // a:6:{i:0;s:9:\"wechat_id\";i:1;s:8:\"nickname\";i:2;s:6:\"isbind\";i:3;s:9:\"firstbind\";i:4;s:7:\"liushui\";i:5;s:11:\"og_username\";}\n $table = $this->table('k_user');\n $table->addColumn('wechat_id', 'string', ['null' => true, 'limit' => 64,])\n ->addColumn('nickname', 'string', ['null' => true, 'limit' => 64,])\n ->addColumn('isbind', 'integer', ['null' => true, 'default'=>0,'limit' => \\Phinx\\Db\\Adapter\\MysqlAdapter::INT_TINY,])\n ->addColumn('firstbind', 'integer', ['null' => true, 'default'=>0,'limit' => \\Phinx\\Db\\Adapter\\MysqlAdapter::INT_TINY,])\n ->addColumn('liushui', 'decimal', ['null' => true, 'precision'=>18,'scale'=>2,'default'=>0.00,])\n ->addColumn('og_username', 'string', ['null' => true, 'limit' => 32,])\n ->update(); \n }", "public function changeStatus()\n {\n }", "public function change()\n {\n $this->adapter->beginTransaction();\n $this->execute(\"UPDATE lightning_node_field_data, lightning_node__field_published_date SET published_at = UNIX_TIMESTAMP(STR_TO_DATE(lightning_node__field_published_date.field_published_date_value, '%Y-%m-%d %h:%i%p')) WHERE nid = lightning_node__field_published_date.entity_id AND vid = revision_id;\");\n $this->execute(\"UPDATE lightning_node_field_revision, lightning_node__field_published_date SET published_at = UNIX_TIMESTAMP(STR_TO_DATE(lightning_node__field_published_date.field_published_date_value, '%Y-%m-%d %h:%i%p')) WHERE nid = lightning_node__field_published_date.entity_id;\");\n $this->execute(\"UPDATE lightning_node_field_data SET published_at = created WHERE published_at IS NULL;\");\n $this->execute(\"UPDATE lightning_node_field_revision SET published_at = created WHERE published_at IS NULL;\");\n $this->adapter->commitTransaction();\n }", "public function change()\n {\n $config = $this->table('config');\n $config\n ->addColumn('name', 'string', ['limit' => 255])\n ->addColumn('value', 'string', ['limit' => 255])\n ->addIndex(['name'], ['unique' => true])\n ->create();\n\n $configRows = [\n ['id' => 1, 'name' => 'active_theme_id', 'value' => '1'],\n ['id' => 2, 'name' => 'active_menu_id', 'value' => '0'],\n ['id' => 3, 'name' => 'active_footer_menu_id', 'value' => '0'],\n ['id' => 4, 'name' => 'siteurl', 'value' => ''],\n ['id' => 5, 'name' => 'sitetitle', 'value' => ''],\n ['id' => 6, 'name' => 'sitedescription', 'value' => ''],\n ['id' => 7, 'name' => 'sitesubtitle', 'value' => ''],\n ['id' => 8, 'name' => 'home_page_id', 'value' => '1']\n ];\n\n $this->insert('config', $configRows);\n }", "function changeValue (&$valueToChange, $value) {\n $valueToChange = $value;\n }", "public function change()\n {\n \n $this->execute('DELETE FROM cotz_cotizaciones_catalogo WHERE id = 12');\n \n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Abierta', etiqueta='abierta' WHERE id = '7'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Ganada', etiqueta='ganada' WHERE id = '9'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Perdida', etiqueta='perdida' WHERE id = '10'\");\n $this->execute(\"UPDATE cotz_cotizaciones_catalogo SET valor='Anulada', etiqueta='anulada' WHERE id = '11'\");\n \n $this->execute(\"UPDATE cotz_cotizaciones SET estado='abierta' WHERE estado = 'aprobado'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='ganada' WHERE estado = 'ganado'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='perdida' WHERE estado = 'perdido'\");\n $this->execute(\"UPDATE cotz_cotizaciones SET estado='anulada' WHERE estado = 'anulado'\");\n }", "public function change()\n {\n\t /**\n\t * status 0=unpaid, 1=paid, 2=fulfilled\n\t */\n\t $table = $this->table('accounts_crypto_payments');\n\t $table\n\t\t ->addColumn('source_type', 'string',['limit' => 20, 'null' => true])\n\t\t ->addColumn('aup_transaction_id', 'integer',['null' => true])\n\t\t ->addColumn('accountUrlPrefix', 'string',['limit' => 17, 'null' => false])\n\t\t ->addColumn('username', 'string',['limit' => 30, 'null' => true])\n\t\t ->addColumn('invoice_id', 'integer',['null' => true])\n\t\t ->addColumn('destination_currency', 'string',['limit' => 3, 'null' => false])\n\t\t ->addColumn('currency_amount', 'string',['limit' => '23','null' => true, 'default' => '0.00000000'])\n\t\t ->addColumn('status', 'integer',['null' => 'false', 'default' => 0])\n\t\t ->addColumn('created', 'datetime',['default' => 'CURRENT_TIMESTAMP'])\n\t\t ->addColumn('updated', 'datetime',['default' => 'CURRENT_TIMESTAMP'])\n\n\t\t ->addIndex(['source_type', 'aup_transaction_id', 'accountUrlPrefix', 'username', 'invoice_id', 'destination_currency', 'status', 'created', 'updated'], ['unique' => false])\n\t\t ->addIndex(['aup_transaction_id', 'accountUrlPrefix', 'invoice_id'], ['unique' => false])\n\t\t ->create();\n\t $table = $this->table('accounts_crypto_payments');\n\t $table\n\t\t ->addForeignKey('accountUrlPrefix', 'accounts', 'accountUrlPrefix',['delete'=>'CASCADE', 'update'=>'CASCADE'])\n\t\t ->addForeignKey('aup_transaction_id', 'accounts_users_propay_transactions', 'id',['delete'=>'CASCADE', 'update'=>'CASCADE'])\n\t\t ->update();\n }", "public function setChanged($changed = true) { $this->changed = $changed; }", "public function change()\n {\n $changedId = \\Input::get('chgid');\n\n if ( count(explode(',', $changedId)) > 1 ) {\n if(Gate::allows('view', Resource::get('affiliate-id-*'))){\n Session::put('affiliate_id', '*');\n }\n } else {\n $affiliate = AffiliateService::find(AffiliateService::getHashKeyName(), $changedId);\n $affiliate = current($affiliate);\n $affiliateId = $affiliate['id'];\n if(Gate::allows('view', Resource::get('affiliate-id-' . $affiliateId))){\n Session::put('affiliate_id', $affiliateId);\n }\n }\n }", "public function getChange();", "private function changed()\n {\n $this->isDirty = true;\n }", "public function modify();", "public function change()\n {\n $this->query(\"update `UserRole` set `description`='Administrator of system' where `role_id`=2\");\n $this->query(\"update `UserRole` set `description`='Owner of site' where `role_id`=1\");\n $this->query(\"update `Site` set `site_name`='teamlab-srv.oft-e.com' where `id`=1\");\n $this->query(\"update `Site` set `site_name`='smartbiz24.ru' where `id`=2\");\n $this->query(\"update `Site` set `site_name`='yandex.ru' where `id`=3\");\n $this->query(\"update `Site` set `site_name`='google.com' where `id`=4\");\n $this->query(\"update `User` set `first_name`='Witaliy' where `id`=1\");\n $this->query(\"update `User` set `first_name`='Victor' where `id`=2\");\n $this->query(\"update `User` set `first_name`='Peter' where `id`=3\");\n $this->query(\"update `User` set `first_name`='Sergey' where `id`=4\");\n $this->query(\"update `User` set `first_name`='Igor' where `id`=5\");\n }", "public function update() {\n $this->connection->update(\n \"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), array(\"idchangemoney\" => $this->observer->idchangemoney), $this->user->iduser\n );\n }", "public function change(): void\n {\n $foreign_keys = [\n 'session_expiration' => ['column' => 'session_id', 'table' => 'session'],\n ];\n foreach ($foreign_keys as $table => $key) {\n $this->table($table)\n ->dropForeignKey($key['column'])\n ->save();\n }\n // update all the primary key id columns\n $primary_keys = [\n 'cron', 'datastore', 'defex', 'email', 'email_unsubscribe',\n 'filestore', 'locking', 'page', 'page_link', 'page_slug',\n 'rich_media', 'search_index', 'session', 'session_expiration',\n 'user', 'user_group', 'user_group_membership', 'user_source'\n ];\n foreach ($primary_keys as $table) {\n $this->table($table)\n ->changeColumn('id', 'integer', ['signed' => false, 'null' => false, 'identity' => true])\n ->changePrimaryKey('id')\n ->save();\n }\n // re-add all the foreign keys that reference primary key id columns\n foreach ($foreign_keys as $table => $key) {\n $this->table($table)\n ->changeColumn($key['column'], 'integer', ['null' => false, 'signed' => false])\n ->addForeignKey($key['column'], $key['table'])\n ->save();\n }\n }", "public function change()\n {\n $AdminTable = TableRegistry::get('Bakkerij/CakeAdmin.Administrators');\n $user = $AdminTable->newEntity([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => 'test',\n 'active' => 1\n ]);\n $AdminTable->save($user);\n }", "public function change()\n {\n $table = $this->table('languages');\n $table->addColumn('is_rtl', 'boolean', [\n 'default' => false,\n 'null' => false,\n ]);\n $table->addColumn('trashed', 'datetime', [\n 'default' => null,\n 'null' => true,\n ]);\n $table->changeColumn('is_active', 'boolean', [\n 'default' => true,\n 'null' => false,\n ]);\n $table->renameColumn('short_code', 'code');\n $table->removeColumn('description');\n $table->update();\n }", "public function update()\r\n {\r\n \r\n }", "public function update()\n\t{\n\n\t}", "public function change()\n {\n $statistics = $this->table('vrchat');\n $statistics->addColumn('auth', 'string', ['limit' => 100])\n ->addColumn('apiKey', 'string', ['limit' => 100])\n ->addColumn('login', 'string', ['limit' => 100])\n ->addColumn('password', 'string', ['limit' => 100])\n ->create();\n\n // inserting only one row\n $singleRow = [\n 'id' => 1,\n 'auth' => '',\n 'apiKey' => 'JlE5Jldo5Jibnk5O5hTx6XVqsJu4WJ26',\n 'login' => 'Loli E1ON',\n 'password' => ''\n ];\n\n $table = $this->table('vrchat');\n $table->insert($singleRow);\n $table->saveData();\n\n }", "public function change()\n {\n $table = $this->table('companies');\n $table->addColumn('name', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('fantasy', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('address', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('city', 'string', [\n 'limit' => 45\n ]);\n\n $table->addColumn('state', 'string', [\n 'limit' => 45\n ]);\n\n $table->addColumn('zipcode', 'string', [\n 'limit' => 8\n ]);\n\n $table->addColumn('cnpj', 'string', [\n 'limit' => 14\n ]);\n\n $table->addColumn('cpf', 'string', [\n 'limit' => 11\n ]);\n\n $table->addColumn('state_registration', 'string', [\n 'limit' => 12\n ]);\n\n $table->addColumn('logo', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('status', 'integer', [\n 'default' => 1\n ]);\n\n $table->addColumn('email', 'string', [\n 'limit' => 80\n ]);\n\n $table->addColumn('people_id', 'integer');\n $table->addForeignKey('people_id', 'peoples','id');\n\n $table->addColumn('created', 'datetime');\n $table->addColumn('modified', 'datetime');\n $table->create();\n }", "public function update() {\r\n\r\n\t}", "public function update()\r\n {\r\n //\r\n }", "public function change(): void\n {\n $leads = $this->table('leads');\n $leads->addColumn('id_proyecto', 'integer')\n ->addColumn('status', 'integer')\n ->addColumn('comentarios', 'text')\n ->addColumn('created_at', 'timestamp')\n ->addColumn('updated_at', 'timestamp')\n ->addForeignKey('id_proyecto', 'proyectos', 'id', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION'])\n ->create();\n\n $datos = $this->table('datos');\n $datos->addColumn('id_lead', 'integer')\n ->addColumn('campo', 'string', ['limit' => 250])\n ->addColumn('valor', 'string', ['limit' => 250])\n ->addColumn('created_at', 'timestamp')\n ->addColumn('updated_at', 'timestamp')\n ->addForeignKey('id_lead', 'leads', 'id', ['delete' => 'CASCADE', 'update' => 'CASCADE'])\n ->create();\n }", "public function change()\n {\n $table = $this->table('summary');\n $table->addColumn('batch_id', 'biginteger', [\n 'limit' => 14,\n 'null' => false,\n 'default' => 0\n ]);\n $table->update();\n }", "public function update()\n {\n }", "public function change()\n {\n $table = $this->table('orders');\n $table->addColumn('payment_method', 'string', [\n 'default' => null,\n 'limit' => 50,\n 'null' => true,\n 'after' => 'invoice_file'\n ]);\n $table->addColumn('transaction_status', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n 'after' => 'payment_method'\n ]);\n $table->addColumn('transactionId', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n 'after' => 'transaction_status'\n ]);\n $table->addColumn('signature', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n 'after' => 'transactionId'\n ]);\n $table->addColumn('transaction_responce', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n 'after' => 'signature'\n ]);\n $table->update();\n }", "public function change()\n {\n //角色信息\n $table = $this->table('admin_role');\n $table->addColumn('rolename','string',['limit'=>20,'comment'=>'角色名'])\n ->addColumn('status','integer',['default'=>0,'comment'=>'状态'])\n ->addColumn('remark','string',['limit'=>30,'comment'=>'备注'])\n ->addColumn('create_by','integer',['comment'=>'创建者'])\n ->addTimestamps()\n ->addIndex('rolename',['unique'=>true])\n ->create();\n \n //管理员用户和角色对应表\n $table = $this->table('admin_user_role')\n ->addColumn('adminuser_id','integer',['comment'=>'管理员用户ID'])\n ->addColumn('role_id','integer',['comment'=>'角色id'])\n ->addTimestamps()\n ->create();\n }", "public function update()\n {\n\n }", "public function update()\n {\n\n }", "public function update()\n {\n \n }", "public function update()\n {\n \n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "public function update() {\r\n }", "public function updating()\n {\n # code...\n }", "public function change()\n {\n $table = $this->table('notifications');\n $table->addColumn('destination', 'enum', [\n 'values' => [\n 'Global',\n 'Role',\n 'User'\n ]\n ]);\n $table->addColumn('role_id', 'string', [\n 'default' => '',\n 'limit' => 32\n ]);\n $table->changeColumn('user_id', 'string', [\n 'default' => '',\n 'limit' => 36\n ]);\n $table->removeColumn('seen');\n $table->removeColumn('deleted');\n $table->update();\n\n $tableLogs = $this->table('admin_l_t_e_notification_logs');\n $tableLogs->addColumn('notification_id', 'integer');\n $tableLogs->addColumn('user_id', 'string', [\n 'default' => null,\n 'limit' => 36,\n 'null' => false\n ]);\n $tableLogs->addColumn('created', 'datetime');\n $tableLogs->create();\n }", "static function alter() {\n }", "public function update () {\n\n }", "public function change()\n {\n $wallet = $this->table('wallet');\n $wallet->addColumn('description', 'string', ['limit' => 100])\n ->addColumn('primary', 'enum', ['values' => ['y', 'n']])\n ->addColumn('user_id', 'integer')\n ->addColumn('total_avg', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('total_balance', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('total_stock', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('total_fund', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('profit', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('variation', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('variation_money', 'string', ['limit' => 50, 'default' => '0.00'])\n ->addColumn('created_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])\n ->addColumn('updated_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])\n ->addForeignKey('user_id', 'user', ['id'], ['constraint' => 'fk_wallet_user_id'])\n ->create();\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function change()\n {\n $table = $this->table('information');\n $table->addColumn('reserved_at', 'timestamp', [\n 'null' => true,\n 'after' => 'information_category_id',\n 'comment' => '公開予約日',\n ]);\n $table->update();\n }", "public function change()\n {\n // Migration for table entry\n $table = $this->table('entry');\n $table\n ->addColumn('domain', 'string', array('limit' => 25))\n ->addColumn('url', 'string', array('limit' => 255))\n ->addColumn('title', 'string', array('limit' => 255))\n ->addColumn('code', 'string', array('limit' => 64))\n ->addColumn('Countdown', 'integer', array('limit' => 11))\n ->addColumn('ExpireDate', 'datetime', array('null' => true))\n ->addColumn('ExpiryAction', 'enum', array('values' => array('stop','free')))\n ->addColumn('created', 'datetime')\n ->addColumn('deleted', 'boolean', array('limit' => 1))\n ->addColumn('used', 'integer', array('default' => '0', 'signed' => false))\n ->create();\n\n\n // Migration for table users\n $table = $this->table('user');\n $table\n ->addColumn('settings', 'text', array('null' => true))\n ->addColumn('email', 'string', array('limit' => 128))\n ->addColumn('firstname', 'string', array('null' => true, 'limit' => 32))\n ->addColumn('lastname', 'string', array('null' => true, 'limit' => 32))\n ->addColumn('password', 'string', array('limit' => 40))\n ->addColumn('login', 'string', array('limit' => 32))\n ->addColumn('DatCreate', 'datetime', array())\n ->addColumn('DatSave', 'datetime', array('null' => true))\n ->addColumn('last_modifier_id', 'integer', array('null' => true, 'signed' => false))\n ->create();\n }", "public function change()\r\n {\r\n $table = $this->table('financialv2');\r\n $table->addColumn('output_template', 'string', ['after'=>'csvbody'])\r\n ->addColumn('graph1', 'string', ['after'=>'output_template'])\r\n ->addColumn('graph2', 'string', ['after'=>'graph1'])\r\n ->addColumn('graph1_data', 'text', ['after'=>'graph2','limit'=>MysqlAdapter::TEXT_LONG,'null'=>true])\r\n ->addColumn('graph2_data', 'text', ['after'=>'graph1_data','limit'=>MysqlAdapter::TEXT_LONG,'null'=>true])\r\n ->addColumn('table1', 'string', ['after'=>'graph2'])\r\n ->addColumn('table2', 'string', ['after'=>'table1'])\r\n ->update();\r\n }", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit() {\n\t\t\t\n\t\t}", "public function setChangeInternalName($value)\n {\n \t$this->_change_internal_name = $value;\n }", "public function change()\n {\n $table = $this->table('entrant_to_ticket');\n\n if (!$table->exists()) {\n $table\n ->addColumn('id_entrant', 'integer')\n ->addColumn('id_ticket', 'integer')\n ->addColumn('is_done', 'boolean', [\n 'default' => 0\n ])\n ->addColumn('rating', 'integer')\n ->addForeignKey('id_entrant', 'entrants')\n ->addForeignKey('id_ticket', 'tickets')\n\n ->addTimestamps('created', 'modified')\n ->save();\n }\n }", "public function update() {\n \n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function edit()\n\t{\n\t\t\n\t}", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n }", "function after_change()\n\t{\n\t\treturn true;\n\t}", "public function Do_update_Example1(){\n\n\t}", "function __set($attributeToChange, $newValueToAssign) {\n //check that name is valid class attribute\n switch($attributeToChange) {\n case \"name\":\n $this->name = $newValueToAssign;\n break;\n case \"favoriteFood\":\n $this->favoriteFood = $newValueToAssign;\n break;\n case \"sound\":\n $this->sound = $newValueToAssign;\n break;\n default:\n echo $attributeToChange . \" was not found <br>\";\n }\n echo \"Set \" . $attributeToChange . \" to \" . $newValueToAssign . \"<br>\";\n }", "public function edit()\n {\n \n }", "public function setChanged($changed) {\n $this->changed = $changed;\n }", "function change() {\n\t\t$mainframe = JFactory::getApplication();\n\t\t// Check for request forgeries\n\t\tdefined('_JEXEC') or die('Invalid Token');\n\t\t$option = clm_core::$load->request_string('option', '');\n\t\t$section = clm_core::$load->request_string('section', '');\n\t\t$db = JFactory::getDBO();\n\t\t$table = JTable::getInstance('saisons', 'TableCLM');\n\t\t$table->load(1);\n\t\t$pub_1 = $table->archiv;\n\t\tif ($pub_1 == \"1\") {\n\t\t\t$table->archiv = 0;\n\t\t} else {\n\t\t\t$table->archiv = 1;\n\t\t}\n\t\t$table->store();\n\t\t$table->load(2);\n\t\t$pub_2 = $table->published;\n\t\tif ($pub_2 == \"1\") {\n\t\t\t$table->published = 0;\n\t\t} else {\n\t\t\t$table->published = 1;\n\t\t}\n\t\t$table->store();\n\t\t$msg = JText::_('SAISON_MSG_STATUS');\n\t\t$this->setMessage($msg);\n\t\t$this->setRedirect('index.php?option=' . $option . '&section=' . $section);\n\t}", "public function change(): void\n {\n $table = $this->table(\n EmployeeValues::TABLE_NAME, ['id' => false, 'primary_key' => ['id']]\n );\n\n $table->addColumn('id', Column::BINARYUUID, ['null' => false])\n ->addColumn('employer_id', Column::BINARYUUID, ['null' => true])\n ->addColumn('position_id', Column::BINARYUUID, ['null' => true])\n ->addColumn('status_id', Column::BINARYUUID, ['null' => true])\n ->addColumn(\n 'name', Column::STRING, ['null' => true, 'limit' => 100]\n )\n ->addColumn(\n 'initial', Column::STRING, ['null' => true, 'limit' => 5]\n )\n ->addColumn(\n 'email', Column::STRING, ['null' => true, 'limit' => 100]\n )\n ->addColumn('birthday', Column::DATETIME, ['null' => true])\n ->addColumn('created_at', Column::TIMESTAMP, ['null' => true])\n ->addColumn('updated_at', Column::TIMESTAMP, ['null' => true])\n ->addColumn('deleted_at', Column::TIMESTAMP, ['null' => true])\n ->addIndex(['employer_id'])\n ->addIndex(['status_id'])\n ->addIndex(['position_id'])\n ->addIndex(['email'])\n ->create()\n ;\n }", "function change()\n\t{\n\t\tglobal $errors, $db;\n\t\t\n\t\t$menuid = ( isset( $_GET[ 'menuid' ] ) ) ? intval( $_GET[ 'menuid' ] ) : 0;\n\t\t$title = $_POST[ 'newmenutitle' ];\n\t\t\n\t\t$sql = \"UPDATE \" . MORECONTENT_MENU_TABLE . \" SET menu_title='$title' WHERE menu_id='$menuid' LIMIT 1\";\n\t\tif ( !$db->sql_query( $sql ) )\n\t\t{\n\t\t\t$errors->report_error( 'Couldn\\'t modify', CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t$errors->report_error( $this->lang[ 'Menu_changed' ], MESSAGE );\n\t}", "public function testUpdate(): void { }", "protected function _update()\n\t{\n\t}", "public function setModified($value) {}", "public function __construct($changed) {\n $this->changed = $changed;\n }", "public function update()\n {\n # code...\n }", "public function change()\n {\n $tableAdmin=$this-> table('wtv_user',['id' => false, 'primary_key' => ['user_id']]);\n $tableAdmin\n ->addColumn('user_id','integer')\n ->addColumn('user_code','string',['limit'=>100,'null' => false])\n ->addColumn('user_first_name','string',['limit'=>100,'null' => false])\n ->addColumn('user_last_name','string',['limit'=>300,'null' => false])\n ->addColumn('user_full_name','string',['limit'=>300,'null' => false])\n ->addColumn('user_login_name','string',['limit'=>300,'null' => false])\n ->addColumn('user_login_pass','string',['limit'=>300,'null' => false])\n ->addColumn('user_email','string',['limit'=>300,'null' => false])\n ->addColumn('user_phone','string',['limit'=>300,'null' => false])\n ->addColumn('user_city','string',['limit'=>300,'null' => false])\n ->addColumn('user_district','string',['limit'=>300,'null' => false])\n ->addColumn('user_address','string',['limit'=>300,'null' => false])\n ->addColumn('user_birthday','date',['null' => false])\n ->addColumn('user_url_image_alias','string',['limit'=>300,'null' => false])\n ->addColumn('user_url_background','string',['limit'=>300,'null' => false])\n ->addColumn('user_jog_present','string',['limit'=>300,'null' => false])\n ->addColumn('user_type_account','integer',['default'=>0,'null' => false])\n ->addColumn('created','date')\n ->save();\n }", "protected function update() {}", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function setToUpdate()\n\t{\n\t\t$this->todo = 2 ;\n\t}", "public function change()\n {\n $table = $this->table('site_instances');\n $table->addColumn('adapter', 'string')\n ->addColumn('endpoint', 'string')\n ->addColumn('last_retrieved', 'datetime', array('null' => true))\n ->addColumn('update_interval', 'integer', ['default' => 168])\n ->save();\n\n $table = $this->table('data');\n $table->addColumn('site_instance_id', 'integer')\n ->addColumn('key', 'string')\n ->addColumn('value', 'string')\n ->addColumn('timestamp', 'datetime')\n ->save();\n }", "public function edit( )\r\n {\r\n //\r\n }", "public function edit()\n {\n \n \n }", "public function change()\n {\n $table = $this->table('clients');\n $table->addColumn('cpf','string', ['null' => false, 'limit' => 11,'type' => 'unique'])\n ->addColumn('rg','string', ['null' => false,'limit' => 10,'type' => 'unique'])\n ->addColumn('nome','string', ['null' => false,'type' => 'unique'])\n ->addColumn('endereco','string', ['null' => false,])\n ->addColumn('dt_nasc','date', ['null' => false,])\n ->addColumn('email','string', ['null' => true,'type' => 'unique'])\n ->addColumn('telefone1','string', ['null' => false,'limit' => 9,])\n ->addColumn('telefone2','string', ['null' => true,'limit' => 9,])\n ->addColumn('created','datetime',[ 'null' => false,])\n ->addColumn('modified','datetime', ['null' => false,])\n ->create();\n\n\n }", "abstract protected function alter_set($name,$value);", "public function mutate();", "public function mutate();", "public function change()\n {\n\t\t$table=$this->table('comp_front_sources')\n\t\t\t\t\t->addColumn('main_title','string',array('null'=>true,'default'=>'标题','comment'=>'主标题'))\n\t\t\t\t\t->addColumn('sub_title','string',array('null'=>true,'comment'=>'副标题'))\n\t\t\t\t\t->addColumn('main_pic','string',array('null'=>true,'comment'=>'主要图片'))\n\t\t\t\t\t->addColumn('secondary_pic','string',array('null'=>true,'comment'=>'次要图片'))\n\t\t\t\t\t->addColumn('main_content','string',array('null'=>true,'default'=>'暂时没有内容','comment'=>'主要内容'))\n\t\t\t\t\t->addColumn('secondary_content','string',array('null'=>true,'comment'=>'次要内容'))\n\t\t\t\t\t->addColumn('main_figure','string',array('null'=>true,'comment'=>'主要数值'))\n\t\t\t\t\t->addColumn('secondary_figure','string',array('null'=>true,'comment'=>'次要数值'))\n\t\t\t\t\t->addColumn('parameter','string',array('null'=>true,'comment'=>'参数'))\n\t\t\t\t\t->addColumn('category','string',array('null'=>true,'default'=>'未分类','comment'=>'分类'))\n\t\t\t\t\t->addColumn('description','string',array('null'=>true,'comment'=>'备注'))\n\t\t\t\t\t->addColumn('created_at','integer', array('null'=>true))\n\t\t\t\t\t->save();\n\t}", "function changeJob($newjob){\n $this->job = $newjob; // Change the person's job\n }" ]
[ "0.84217495", "0.77721107", "0.7686793", "0.74927205", "0.7245604", "0.70412993", "0.6984869", "0.6883122", "0.68630093", "0.68287313", "0.68282807", "0.6820752", "0.68063927", "0.67938966", "0.67618406", "0.6757705", "0.65657175", "0.6544782", "0.65386945", "0.65318614", "0.6499685", "0.64898556", "0.6482691", "0.6463817", "0.64593905", "0.6452917", "0.64390415", "0.64352214", "0.6388026", "0.6385832", "0.63772225", "0.6373899", "0.63542473", "0.6324718", "0.6323571", "0.62912726", "0.62891823", "0.62891823", "0.6283448", "0.6283448", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.62767607", "0.6267618", "0.6267618", "0.6265769", "0.62554705", "0.62491447", "0.6241723", "0.6221026", "0.6219892", "0.6209209", "0.6209209", "0.6187832", "0.6185969", "0.61670744", "0.6165947", "0.6142508", "0.6140089", "0.6130955", "0.61298513", "0.6128044", "0.61245126", "0.6121989", "0.61127526", "0.61053383", "0.60979795", "0.60905504", "0.60869277", "0.6082933", "0.6054327", "0.60400265", "0.6039752", "0.6039341", "0.6026143", "0.6022063", "0.601676", "0.60158914", "0.6012629", "0.6009748", "0.6009748", "0.6009748", "0.6009301", "0.598471", "0.59823483", "0.59684074", "0.59619445", "0.59618694", "0.59430295", "0.59430295", "0.5941351", "0.59389263" ]
0.0
-1
Parse the network settings page
private function parseNetworks($objUser) { global $_ARRAYLANG; $availableProviders = \Cx\Lib\SocialLogin::getProviders(); foreach ($availableProviders as $index => $provider) { if (!$provider->isActive()) { unset($availableProviders[$index]); } } $userNetworks = $objUser->getNetworks()->getNetworksAsArray(); $this->_objTpl->setGlobalVariable(array( 'TXT_ACCESS_SOCIALLOGIN_PROVIDER' => $_ARRAYLANG['TXT_ACCESS_SOCIALLOGIN_PROVIDER'], 'TXT_ACCESS_SOCIALLOGIN_STATE' => $_ARRAYLANG['TXT_ACCESS_SOCIALLOGIN_STATE'], )); // get current url for redirect parameter $currentUrl = clone \Env::get('Resolver')->getUrl(); if (!$this->_objTpl->blockExists('access_sociallogin_provider')) { return null; } // parse the connect buttons foreach ($availableProviders as $providerName => $providerSettings) { if (empty($userNetworks[$providerName])) { $state = $_ARRAYLANG['TXT_ACCESS_SOCIALLOGIN_DISCONNECTED']; $class = 'disconnected'; $uri = contrexx_raw2xhtml( \Cx\Lib\SocialLogin::getLoginUrl($providerName, base64_encode($currentUrl->__toString()) ) ); $uriAction = $_ARRAYLANG['TXT_ACCESS_SOCIALLOGIN_CONNECT']; } else { $state = $_ARRAYLANG['TXT_ACCESS_SOCIALLOGIN_CONNECTED']; $class = 'connected'; $disconnectUrl = clone \Env::get('Resolver')->getUrl(); $disconnectUrl->setParam('act', 'disconnect'); $disconnectUrl->setParam('provider', $providerName); $uri = $disconnectUrl->__toString(); $uriAction = $_ARRAYLANG['TXT_ACCESS_SOCIALLOGIN_DISCONNECT']; } $this->_objTpl->setVariable(array( 'ACCESS_SOCIALLOGIN_PROVIDER_NAME_UPPER' => contrexx_raw2xhtml(ucfirst($providerName)), 'ACCESS_SOCIALLOGIN_PROVIDER_STATE' => $state, 'ACCESS_SOCIALLOGIN_PROVIDER_STATE_CLASS'=> $class, 'ACCESS_SOCIALLOGIN_PROVIDER_NAME' => contrexx_raw2xhtml($providerName), 'ACCESS_SOCIALLOGIN_URL' => $uri, 'ACCESS_SOCIALLOGIN_URL_ACTION' => $uriAction, )); if ($class == 'disconnected') { $this->_objTpl->parse('access_sociallogin_provider_disconnected'); $this->_objTpl->hideBlock('access_sociallogin_provider_connected'); } else { $this->_objTpl->parse('access_sociallogin_provider_connected'); $this->_objTpl->hideBlock('access_sociallogin_provider_disconnected'); } $this->_objTpl->parse('access_sociallogin_provider'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function display_network_settings() {\n\t\twp_nonce_field( 'cjur-network-settings', 'cjur-network-settings-nonce' );\n\n\t\tdo_settings_sections( 'cjur-network-settings-page' );\n\t}", "public function network_config_page() {\n\t\trequire_once WPSEO_PATH . 'admin/pages/network.php';\n\t}", "public static function add_network_settings() {\n\t\tadd_settings_section(\n\t\t\t'cjur-network-settings-section',\n\t\t\t__( 'CSS JS URL Rewriter', 'css-js-url-rewriter' ),\n\t\t\t'__return_false',\n\t\t\t'cjur-network-settings-page'\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'css_js_url_rewriter_cdn_url',\n\t\t\t__( 'CDN URL', 'css-js-url-rewriter' ),\n\t\t\t[ __CLASS__, 'render_field' ],\n\t\t\t'cjur-network-settings-page',\n\t\t\t'cjur-network-settings-section'\n\t\t);\n\t}", "public function settings_page_content() {\n\t\t// Common items.\n\t\t$args = [\n\t\t\t'network' => $this->is_network(),\n\t\t];\n\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Is plugin active network wide.\n\t\t$networkwide = General::is_networkwide();\n\n\t\tswitch ( $tab ) {\n\t\t\tcase 'reports':\n\t\t\t\t$roles = Permission::get_roles();\n\t\t\t\t// If subsites can not over write.\n\t\t\t\tif ( ! Permission::can_overwrite() && $networkwide ) {\n\t\t\t\t\t$selected = (array) beehive_analytics()->settings->get( 'roles', 'permissions', true, [] );\n\t\t\t\t} else {\n\t\t\t\t\t$selected = (array) beehive_analytics()->settings->get( 'roles', 'permissions', $this->is_network(), [] );\n\t\t\t\t}\n\t\t\t\tforeach ( $roles as $role => $data ) {\n\t\t\t\t\t// Leave administrators please. They are powerful.\n\t\t\t\t\tif ( 'administrator' === $role ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! in_array( $role, $selected, true ) ) {\n\t\t\t\t\t\tunset( $roles[ $role ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Only applicable on single/sub site.\n\t\t\t\t$args['roles'] = $roles;\n\t\t\t\t$args['dashboard_tree'] = Analytics_Settings::instance()->dashboard_tree();\n\t\t\t\t$args['statistics_tree'] = Analytics_Settings::instance()->statistics_tree();\n\t\t\t\t$args['dashboard_selected'] = beehive_analytics()->settings->get( 'dashboard', 'reports', false, [] );\n\t\t\t\t$args['statistics_selected'] = beehive_analytics()->settings->get( 'statistics', 'reports', false, [] );\n\t\t\t\tbreak;\n\t\t\tcase 'permissions':\n\t\t\t\t$args['roles'] = Permission::get_roles();\n\t\t\t\tbreak;\n\t\t\tcase 'tracking':\n\t\t\t\t$args['settings_page'] = Template::settings_page( 'general', $this->is_network() );\n\t\t\t\t$args['tracking'] = beehive_analytics()->settings->get( 'code', 'tracking' );\n\t\t\t\t$args['network_tracking'] = beehive_analytics()->settings->get( 'code', 'tracking', true );\n\t\t\t\t$args['auto_tracking'] = beehive_analytics()->settings->get( 'auto_track', 'google', $this->is_network() );\n\t\t\t\t$args['auto_tracking_code'] = beehive_analytics()->settings->get( 'auto_track', 'misc', $this->is_network() );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$anonymize_visible = true;\n\t\t\t\tif ( $networkwide && ! $this->is_network() ) {\n\t\t\t\t\tif ( beehive_analytics()->settings->get( 'anonymize', 'general', true )\n\t\t\t\t\t && beehive_analytics()->settings->get( 'force_anonymize', 'general', true )\n\t\t\t\t\t) {\n\t\t\t\t\t\t$anonymize_visible = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Get Pro Sites levels.\n\t\t\t\t$args['ps_levels'] = $this->is_network() ? Permission::get_ps_levels() : false;\n\t\t\t\t$args['anonymize_visible'] = $anonymize_visible;\n\t\t\t\t$args['networkwide'] = $networkwide;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Render network settings content.\n\t\t$this->view( \"settings/tabs/{$tab}\", $args );\n\t}", "function adrotate_network_settings() {\n\tglobal $wpdb;\n\n\t$status = '';\n\tif(isset($_GET['status'])) $status = esc_attr($_GET['status']);\n\t$adrotate_network = get_site_option('adrotate_network_settings');\n\t?>\n\n\t<div class=\"wrap\">\n\t \t<h1><?php _e('Network Settings', 'adrotate-pro'); ?></h1>\n\n\t\t<?php if($status > 0) adrotate_status($status); ?>\n\t\t\n\t \t<form name=\"settings\" id=\"post\" method=\"post\" action=\"admin.php?page=adrotate-network-settings\">\n\n\t\t\t<?php wp_nonce_field('adrotate_settings','adrotate_nonce_settings'); ?>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr>\n\t\t\t\t\t<th valign=\"top\"><?php _e('Primary site', 'adrotate-pro'); ?></th>\n\t\t\t\t\t<td><label for=\"adrotate_network_site_dashboard\"><input name=\"adrotate_network_primary\" type=\"text\" class=\"search-input\" size=\"5\" value=\"<?php echo $adrotate_network['primary']; ?>\" autocomplete=\"off\" /> <?php _e('Enter the site id for the site you will publish adverts from. This is usually id 1.', 'adrotate-pro'); ?></label></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th valign=\"top\"><?php _e('Enable dashboard on sites', 'adrotate-pro'); ?></th>\n\t\t\t\t\t<td><label for=\"adrotate_network_site_dashboard\"><input type=\"checkbox\" name=\"adrotate_network_site_dashboard\" <?php if($adrotate_network['site_dashboard'] == 'Y') { ?>checked=\"checked\" <?php } ?> /> <?php _e('Enabled by default. This allows admins of those sites to create and manage adverts with AdRotate Pro just like you do from your primary site. Caution: May cause group id conflicts when using cross site adverts, use with care!', 'adrotate-pro'); ?></label></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\n\t\t\t<p class=\"submit\">\n\t\t\t \t<input type=\"submit\" name=\"adrotate_save_network_options\" class=\"button-primary\" value=\"<?php _e('Update Options', 'adrotate-pro'); ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t\t<br class=\"clear\" />\n\n\t\t<?php echo adrotate_trademark(); ?>\n\n\t</div>\n<?php\n}", "private function get_settings()\r\n\t{\r\n\t\tlist ($this->path, $this->webpath, $this->maxwidth, $this->maxheight, $this->type, $this->size, $this->preview_width, $this->preview_cols, $this->tablestyle, $this->picstyle) = $this->elements->get_element(0, \"show\", 0, 0);\r\n\t}", "public function ajax_web_parser_setting() {\n if (!isset($_GET['product_id']) || !isset($_GET['product_group_id']) || !isset($_GET['store_id'])) {\n show_404();\n }\n\n $store = ManagerHolder::get('Store')->getById($_GET['store_id'], 'e.*');\n if (empty($store)) {\n die('ERROR');\n }\n\n $where = array_copy_by_keys($_GET, array('product_id', 'product_group_id', 'store_id'));\n if (empty($_GET['product_group_id']) || ($store['code'] == 'i-love-mum' || $store['code'] == 'White Rabbit')) {\n $where['product_group_id'] = NULL;\n }\n\n $setting = ManagerHolder::get('StoreInventoryParserSetting')->getOneWhere($where, 'e.*');\n if (empty($setting)) {\n $setting = $where;\n $setting['url'] = '';\n// $setting['config'] = NULL;\n } else {\n// $setting['config'] = unserialize($setting['config']);\n }\n\n $this->layout->setLayout('ajax');\n $this->layout->set('setting', $setting);\n $this->layout->view('store/parser_setting');\n }", "abstract public function get_settings();", "public function settings_page() {\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Render settings header.\n\t\t$this->view( 'settings/common/header' );\n\n\t\t// Render settings page.\n\t\t$this->view( 'settings/settings', [\n\t\t\t'title' => Template::tabs()[ $tab ],\n\t\t\t'tab' => $tab,\n\t\t\t'form_url' => Template::settings_page(\n\t\t\t\t$tab,\n\t\t\t\t$this->is_network()\n\t\t\t),\n\t\t] );\n\n\t\t// Render settings footer.\n\t\t$this->view( 'settings/common/footer' );\n\t}", "public function getNetworkSettings() : NetworkSettings\n {\n return $this->networkSettings;\n }", "public function load_settings()\n {\n // Basic Settings\n\t\t$args = array(\n\t\t\t'id'\t\t\t => 'asse_http_basic',\n\t\t\t'title'\t\t\t => 'Grundeinstellungen',\n\t\t\t'page'\t\t\t => $this->page,\n\t\t\t'description'\t=> '',\n\t\t);\n\t\t$asse_http_basic = new Section( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_send_cache_control_header',\n\t\t\t'title'\t\t\t\t => 'Cache-Control Headers',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page\n\t\t);\n\t\t$asse_http_send_cache_control_header = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_add_etag',\n\t\t\t'title'\t\t\t\t => 'ETag',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_add_etag = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_generate_weak_etag',\n\t\t\t'title'\t\t\t\t => 'Weak ETag',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_generate_weak_etag = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_add_last_modified',\n\t\t\t'title'\t\t\t\t => 'Modified Header',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_add_last_modified = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_add_expires',\n\t\t\t'title'\t\t\t\t => 'Expries Header',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_add_expires = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_add_backwards_cache_control',\n\t\t\t'title'\t\t\t\t => 'Legacy Cache Control',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_add_backwards_cache_control = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_mobile_detect',\n\t\t\t'title'\t\t\t\t => 'Mobile Geräteerkennung',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_mobile_detect = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_expires_max_age',\n\t\t\t'title'\t\t\t\t => 'Expires Max-Age',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_basic',\n\t\t\t'description' => 'Sekunden',\n\t\t\t'type'\t\t\t\t => 'text', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_expires_max_age = new Field( $args );\n\n // Compression\n\t\t$args = array(\n\t\t\t'id'\t\t\t => 'asse_http_compression',\n\t\t\t'title'\t\t\t => 'Kompression',\n\t\t\t'page'\t\t\t => $this->page,\n\t\t\t'description'\t=> '',\n\t\t);\n\t\t$asse_http_compression = new Section( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_gzip',\n\t\t\t'title'\t\t\t\t => 'GZip',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_compression',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_gzip = new Field( $args );\n\n\t $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_br',\n\t\t\t'title'\t\t\t\t => 'Brotli',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_compression',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_br = new Field( $args );\n\n\t $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_deflate',\n\t\t\t'title'\t\t\t\t => 'Deflate (Zlib)',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_compression',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_deflate = new Field( $args );\n\n // Monitoring\n\t\t$args = array(\n\t\t\t'id'\t\t\t => 'asse_http_health',\n\t\t\t'title'\t\t\t => 'Monitoring',\n\t\t\t'page'\t\t\t => $this->page,\n\t\t\t'description'\t=> '',\n\t\t);\n\t\t$asse_http_health = new Section( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_health',\n\t\t\t'title'\t\t\t\t => 'Health Check',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_health',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox, dropbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page\n\t\t);\n\t\t$asse_http_health_enable = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_health_url',\n\t\t\t'title'\t\t\t\t => 'Health Url',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_health',\n\t\t\t'description' => 'Z.B. /healthz',\n\t\t\t'type'\t\t\t\t => 'text', // text, textarea, password, checkbox, dropbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page\n\t\t);\n\t\t$asse_http_healt_url= new Field( $args );\n\n // CDN\n\t\t$args = array(\n\t\t\t'id'\t\t\t => 'asse_http_cdn',\n\t\t\t'title'\t\t\t => 'CDN',\n\t\t\t'page'\t\t\t => $this->page,\n\t\t\t'description'\t=> '',\n\t\t);\n\t\t$asse_http_cdn = new Section( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_cdn',\n\t\t\t'title'\t\t\t\t => 'CDN',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_cdn',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'dropdown', // text, textarea, password, checkbox, dropbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n 'options' => array( CDN::None => 'Keins', CDN::Akamai => 'Akamai', CDN::Cloudfront => 'Cloudfront' )\n\t\t);\n\t\t$asse_http_cdn = new Field( $args );\n\n // Advanced\n\t\t$args = array(\n\t\t\t'id'\t\t\t => 'asse_http_experimental',\n\t\t\t'title'\t\t\t => 'Experimental',\n\t\t\t'page'\t\t\t => $this->page,\n\t\t\t'description'\t=> '',\n\t\t);\n\t\t$asse_http_experimental = new Section( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_origin',\n\t\t\t'title'\t\t\t\t => 'Origin',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_experimental',\n\t\t\t'description' => 'Vorsicht! Kann nicht gesetzt werden, wenn HTTP_ORIGIN gesetzt ist',\n\t\t\t'type'\t\t\t\t => 'text', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n 'disabled' => true,\n 'disabled_default' => ORIGIN_HOST, // todo\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_origin = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_replace_urls',\n\t\t\t'title'\t\t\t\t => 'Urls ersetzen',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_experimental',\n\t\t\t'description' => 'Vorsicht!',\n\t\t\t'type'\t\t\t\t => 'text', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => true,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_etag_salt = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_etag_salt',\n\t\t\t'title'\t\t\t\t => 'ETag Salt',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_experimental',\n\t\t\t'description' => '',\n\t\t\t'type'\t\t\t\t => 'text', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_etag_salt = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_try_rewrite_categories',\n\t\t\t'title'\t\t\t\t => 'Rewrite Kategorien',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_experimental',\n\t\t\t'description' => 'Vorsicht!',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_try_rewrite_categories = new Field( $args );\n\n $args = array(\n\t\t\t'id'\t\t\t\t => 'asse_http_try_catch_404',\n\t\t\t'title'\t\t\t\t => 'Try Catch 404',\n\t\t\t'page'\t\t\t\t => $this->page,\n\t\t\t'section'\t\t\t => 'asse_http_experimental',\n\t\t\t'description' => 'Vorsicht!',\n\t\t\t'type'\t\t\t\t => 'checkbox', // text, textarea, password, checkbox\n\t\t\t'multi'\t\t\t\t => false,\n\t\t\t'option_group'\t=> $this->page,\n\t\t);\n\t\t$asse_http_expires_max_age = new Field( $args );\n }", "public function save_network_options()\n\t{\n\t\t\n\t}", "public static function parseSettings()\n\t{\n\t\t$settings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['sd_googlemaps']);\n\n\t\tif (!is_array($settings)) {\n\t\t\t$settings = [];\n\t\t}\n\t\treturn $settings;\n\t}", "function display_global_settings()\n {\n $settings = array_merge($this->settings, $_POST);\n \n $site_url = rtrim($this->EE->config->item('site_url'), '/');\n $third_party_path_array = explode('/', trim(PATH_THIRD, '/'));\n $uri_segments_array = array();\n $uri_segments_array = array_slice($third_party_path_array, -3);\n //print_r($uri_segments_array);\n $third_party_uri = implode('/', $uri_segments_array);\n // Styles\n $this->EE->cp->add_to_head('<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$site_url.'/'.$third_party_uri.'/page_type_switcher/styles/display_global_settings.css\" />');\n \n $this->EE->lang->loadfile('page_type_switcher');\n \n //print_r($this->settings);\n \n // Get custom field info \n $query_field_info = $this->_get_field_info();\n $query_field_info_num_rows = $query_field_info->num_rows();\n //echo '$query_field_info_num_rows: ['.$query_field_info_num_rows.']<br><br>'.PHP_EOL;\n $query_field_info_result = $query_field_info->result_array();\n //print_r($query_field_info_result);\n \n // Find page type switcher's ftype_id\n $sql_ftype_id = \"SELECT fieldtype_id \n FROM exp_fieldtypes \n WHERE name = 'page_type_switcher'\n LIMIT 1\";\n $query_ftype_id = $this->EE->db->query($sql_ftype_id);\n if ($query_ftype_id->num_rows() == 1)\n {\n $ftype_id = $query_ftype_id->row('fieldtype_id');\n //echo '$ftype_id: ['.$ftype_id.']<br><br>'.PHP_EOL;\n }\n \n // Create fieldtype's site settings form\n $r = '';\n $r .= '<table class=\"mainTable padTable\" cellspacing=\"0\" cellpaddind=\"0\" border=\"0\">'.PHP_EOL;\n $r .= '<tr>'.PHP_EOL;\n $r .= '<td width=\"30%\">'.PHP_EOL;\n $r .= $this->EE->lang->line('page_types_max_num');\n $r .= '</td>'.PHP_EOL;\n $r .= '<td>'.PHP_EOL;\n $r .= '<input type=\"text\" name=\"page_types_max_num\" value=\"'.$this->settings['page_types_max_num'].'\" style=\"width: 90%;\" />';\n $r .= '</td>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n \n if ($query_field_info_num_rows == 0)\n {\n $r .= '<script type=\"text/javascript\">alert(\"'.$this->EE->lang->line('no_page_type_switchers_in_field_groups_allert').'\");</script>'.PHP_EOL;\n }\n\n for ($i = 0; $i < $query_field_info_num_rows; $i++)\n {\n if ($i == 0 OR $query_field_info_result[$i]['group_id'] != $query_field_info_result[$i - 1]['group_id'])\n {\n $r .= '<tr class=\"header\">'.PHP_EOL;\n $r .= '<th colspan=\"2\">';\n $r .= $query_field_info_result[$i]['group_name'];\n $r .= '</th>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n \n for ($j = 1; $j <= $this->settings['page_types_max_num']; $j++)\n {\n $r .= '<tr>'.PHP_EOL;\n $r .= '<td width=\"30%\">'.PHP_EOL;\n $r .= str_replace('{number}', $j, $this->EE->lang->line('page_type_number_name'));\n $r .= '</td>'.PHP_EOL;\n $r .= '<td>'.PHP_EOL;\n $value = '';\n if (isset($this->settings['field_group'][$query_field_info_result[$i]['group_id']]['page_type_'.$j.'_name']))\n {\n $value = $this->settings['field_group'][$query_field_info_result[$i]['group_id']]['page_type_'.$j.'_name'];\n }\n $r .= '<input type=\"text\" name=\"'.'field_group['.$query_field_info_result[$i]['group_id'].'][page_type_'.$j.'_name]'.'\" value=\"'.$value.'\" style=\"width: 90%;\">'; \n $r .= '</td>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n }\n }\n \n // Display all fields except page type switcher\n if ($query_field_info_result[$i]['field_type'] != 'page_type_switcher')\n {\n $r .= '<tr>'.PHP_EOL;\n $r .= '<td width=\"30%\">'.PHP_EOL;\n $r .= $query_field_info_result[$i]['field_label'];\n $r .= '</td>'.PHP_EOL;\n $r .= '<td style=\"white-space: pre\">'.PHP_EOL;\n for ($j = 1; $j <= $this->settings['page_types_max_num']; $j++)\n {\n $checked = '';\n if (isset($this->settings['page_types_field_id'][$query_field_info_result[$i]['field_id']]['page_type_'.$j]) AND $this->settings['page_types_field_id'][$query_field_info_result[$i]['field_id']]['page_type_'.$j] == 'y')\n {\n $checked = 'checked=\"checked\"';\n }\n $r .= str_replace('{number}', $j, $this->EE->lang->line('page_type_number_checkbox')).NBS.NBS.'<input type=\"checkbox\" name=\"'.'page_types_field_id['.$query_field_info_result[$i]['field_id'].'][page_type_'.$j.']'.'\" value=\"y\" '.$checked.'>'.NBS.NBS.NBS.NBS;\n \n }\n $r .= '</td>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n }\n }\n $r .= '</table>'.PHP_EOL;\n\n return $r;\n \n }", "public function network_settings_init() {\n\t\tregister_setting( 'wpsimplesmtp_smtp_ms', 'wpssmtp_smtp_ms' );\n\n\t\tadd_settings_section(\n\t\t\t'wpsimplesmtp_ms_adminaccess_section',\n\t\t\t__( 'Global Administration Settings', 'simple-smtp' ),\n\t\t\tfunction () {\n\t\t\t\tesc_html_e( 'Configurations set here will overwrite any local site settings.', 'simple-smtp' );\n\t\t\t},\n\t\t\t'wpsimplesmtp_smtp_ms'\n\t\t);\n\n\t\t$this->generate_generic_field( 'host', __( 'Host', 'simple-smtp' ), 'text', 'smtp.example.com' );\n\t\t$this->generate_generic_field( 'port', __( 'Port', 'simple-smtp' ), 'number', '587' );\n\t\t$this->generate_unique_checkbox( 'auth', __( 'Authenticate', 'simple-smtp' ), __( 'Authenticate connection with username and password', 'simple-smtp' ) );\n\t\t$this->generate_generic_field( 'user', __( 'Username', 'simple-smtp' ), 'text', '[email protected]' );\n\t\t$this->generate_generic_field( 'pass', __( 'Password', 'simple-smtp' ), 'password' );\n\t\t$this->generate_generic_field( 'from', __( 'Force from e-mail address', 'simple-smtp' ), 'email', '[email protected]' );\n\t\t$this->generate_generic_field( 'fromname', __( 'Force from e-mail sender name', 'simple-smtp' ), 'text', _x( 'WordPress System', 'Force from e-mail sender name', 'simple-smtp' ) );\n\t\t$this->generate_selection( 'sec', __( 'Security', 'simple-smtp' ), $this->acceptable_security_types() );\n\t\t$this->generate_checkbox_area(\n\t\t\t'adt',\n\t\t\t__( 'Options', 'simple-smtp' ),\n\t\t\tfunction() {\n\t\t\t\t$this->generate_checkbox( 'disable', __( 'Disable email services', 'simple-smtp' ), __( 'When marked, all multisite email services will be disabled.', 'simple-smtp' ) );\n\t\t\t\t$this->generate_checkbox( 'log', __( 'Log all sent emails to the database', 'simple-smtp' ), __( 'Works with the WordPress privacy features.', 'simple-smtp' ) );\n\t\t\t\t$this->generate_checkbox( 'noverifyssl', __( 'Disable SSL Verification (advanced)', 'simple-smtp' ), __( 'Do not disable this unless you know what you\\'re doing.', 'simple-smtp' ) );\n\t\t\t}\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'wpssmtp_smtp_siteselection',\n\t\t\t__( 'Site Administration Control', 'simple-smtp' ),\n\t\t\tfunction () {\n\t\t\t\t$collection = [];\n\t\t\t\t$sites = get_sites();\n\n\t\t\t\tforeach ( $sites as $site ) {\n\t\t\t\t\t$site_details = get_blog_details( array( 'blog_id' => $site->blog_id ) );\n\t\t\t\t\t$url = $site_details->siteurl;\n\t\t\t\t\t$name = $site_details->blogname;\n\t\t\t\t\t$string = \\sprintf(\n\t\t\t\t\t\t// translators: Tooltip to clarify to the user clicking the link will take them to the child SMTP settings.\n\t\t\t\t\t\t_x( 'Go to settings for %s', 'Sub site name', 'simple-smtp' ),\n\t\t\t\t\t\t$name\n\t\t\t\t\t);\n\t\t\t\t\t$collection[] = [\n\t\t\t\t\t\t'id' => $site->blog_id,\n\t\t\t\t\t\t'url' => $url,\n\t\t\t\t\t\t'string' => $string,\n\t\t\t\t\t\t'name' => $name,\n\t\t\t\t\t\t'settings' => add_query_arg( [ 'page' => 'wpsimplesmtp' ], get_admin_url( $site->blog_id ) . 'options-general.php' ),\n\t\t\t\t\t\t'no_set' => get_network_option( $site->blog_id, 'wpssmtp_disable_settings', 0 ),\n\t\t\t\t\t\t'no_log' => get_network_option( $site->blog_id, 'wpssmtp_disable_logging', 0 ),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\t?>\n\t\t\t\t<table class=\"wp-list-table widefat striped wpsmtp-multisite-table\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th><?php esc_html_e( 'Site', 'simple-smtp' ); ?></th>\n\t\t\t\t\t\t\t<th><?php esc_html_e( 'Disable Settings', 'simple-smtp' ); ?></th>\n\t\t\t\t\t\t\t<th><?php esc_html_e( 'Disable Logging', 'simple-smtp' ); ?></th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<?php foreach ( $collection as $site ) : ?>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td><a href=\"<?php echo esc_url( $site['settings'] ); ?>\" title=\"<?php echo esc_attr( $site['string'] ); ?>\"><?php echo esc_attr( $site['name'] ); ?></a><br /><?php echo esc_url( $site['url'] ); ?></td>\n\t\t\t\t\t\t\t\t<td><input type='checkbox' name='wpssmtp_perm_set_s<?php echo (int) $site['id']; ?>' <?php checked( $site['no_set'], 1 ); ?> value='1'></td>\n\t\t\t\t\t\t\t\t<td><input type='checkbox' name='wpssmtp_perm_log_s<?php echo (int) $site['id']; ?>' <?php checked( $site['no_log'], 1 ); ?> value='1'></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t<p class=\"description\"><?php esc_html_e( 'Hide aspects from local site administrators. Super administrators will still be able to see settings.', 'simple-smtp' ); ?></p>\n\t\t\t\t<?php\n\t\t\t},\n\t\t\t'wpsimplesmtp_smtp_ms',\n\t\t\t'wpsimplesmtp_ms_adminaccess_section'\n\t\t);\n\t}", "function retrieveSettings()\n\t\t{\t\n\t\t\t$this->settings = array();\n\t\t\t// first retrieve the \"external\" settings\n\t\t\t$this->retrieveExternalSettings();\n\t\t\t// read the settings property\n\t\t\t$stream = mapi_openpropertytostream($this->store, PR_EC_WEBACCESS_SETTINGS);\n\t\t\tif ($stream == false) {\n\t\t\t\treturn ;\n\t\t\t}\n\n\t\t\t$stat = mapi_stream_stat($stream);\n\t\t\tmapi_stream_seek($stream, 0, STREAM_SEEK_SET);\n\t\t\t$settings_string = '';\n\t\t\tfor($i=0;$i<$stat['cb'];$i+=1024){\n\t\t\t\t$settings_string .= mapi_stream_read($stream, 1024);\n\t\t\t}\n\t\t\t\n\t\t\t// suppress php notice in case unserializing fails\n\t\t\t$settings = @unserialize($settings_string);\n\n\t\t\tif (!$settings){ // backwards compatible with old saving method using XML\n\t\t\t\t$xml = new XMLParser();\n\t\t\t\t$settings = $xml->getData($settings_string);\n\t\t\t}\n\n\t\t\tif (is_array($settings) && isset($settings['settings']) && is_array($settings['settings'])){\n\t\t\t\t$this->settings = array_merge_recursive_overwrite($settings['settings'],$this->settings);\n\t\t\t}\n\t\t}", "function wp_get_network($network)\n {\n }", "public function get_settings() {\n\t\t$settings = parent::get_settings();\n\n\t\t$settings[] = 'ogone_directlink';\n\n\t\treturn $settings;\n\t}", "private function render_settings() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php esc_html_e( 'Network Mail', 'simple-smtp' ); ?></h1>\n\t\t\t<form action='edit.php?action=wpsimplesmtpms' method='post'>\t\n\t\t\t\t<?php\n\t\t\t\twp_nonce_field( 'simple-smtp-ms' );\n\t\t\t\tdo_settings_sections( 'wpsimplesmtp_smtp_ms' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function settings_page() { ?>\n\n <div class=\"wrap\">\n <?php $this->settings_api->settings_html(); ?>\n </div><?php\n }", "function wponion_network_settings( $instance_id_or_args = array(), $fields = array() ) {\n\t\tif ( is_string( $instance_id_or_args ) && empty( $fields ) ) {\n\t\t\treturn wponion_settings_registry( $instance_id_or_args );\n\t\t}\n\t\treturn new Network( $instance_id_or_args, $fields );\n\t}", "private function _pageSettings(){\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($this->hasLogin()){\r\n\r\n /*\r\n \t*\r\n \t*\r\n \t*\tCheck the method used is POST\r\n \t*\r\n \t*\r\n \t*/\r\n \tif($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n\r\n $uri = $this->_getContentURI();\r\n\r\n /*\r\n foreach ($_POST as $name => $value) {\r\n $config = HTMLPurifier_Config::createDefault();\r\n $purifier = new HTMLPurifier($config);\r\n $clean_html = $purifier->purify($value);\r\n }\r\n */\r\n\r\n\r\n $settings = new stdClass();\r\n $settings->page_title = isset($_POST['mrzpn-menu-page-title'])?$_POST['mrzpn-menu-page-title']:'';\r\n $settings->page_script = isset($_POST['mrzpn-menu-page-script'])?$_POST['mrzpn-menu-page-script']:'';\r\n\r\n if(file_put_contents(ROOT.DS.'site'.DS.'content'.DS.$uri.DS.'settings.json', json_encode($settings))){\r\n $response = 200;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n\r\n }", "private function load_settings() {\n\t\t\n\t}", "function wp_load_core_site_options($network_id = \\null)\n {\n }", "public static function menuConnection() {\n ?>\n <div class=\"wrap\">\n <h1><?php echo __(\"Neo4j Connection Settings\", 'neopress'); ?></h1>\n <form method=\"post\" action=\"options.php\">\n <?php\n // This prints out all hidden setting fields\n settings_fields( 'neopress_connection' );\n do_settings_sections( 'neopress' );\n submit_button();\n ?>\n </form>\n </div>\n <?php\n }", "private\n\t\tstatic function get_settings_url() {\n\t\t\treturn admin_url( 'options-general.php?page=' . self::LINKID_SETTINGS_PAGE_ID );\n\t\t}", "function settings_section() {\n\t\t}", "function ag_load_settings() {\n\tinclude_once(AG_DIR . '/classes/ag_builder_sources_hub.php');\n\n\tif(!isset($_POST['gallery_id'])) {die('missing data');}\n\t$gid = $_POST['gallery_id'];\n\t\n\tif(!isset($_POST['ag_type'])) {die('missing data');}\n\t$type = $_POST['ag_type'];\n\t\n\tif(!isset($_POST['ag_username'])) {die('missing data');}\n\t$username = $_POST['ag_username'];\n\t\n\tif(!isset($_POST['ag_psw'])) {die('missing data');}\n\t$psw = $_POST['ag_psw'];\n\t\n\tif(!isset($_POST['ag_connect_id'])) {die('missing data');}\n\t$connect_id = $_POST['ag_connect_id'];\n\t\n\t\n\t// specific options\n\t$hub = new ag_builder_hub($gid, $type);\n\techo $hub->spec_opt(array('username' => $username, 'psw' => $psw, 'connect_id' => $connect_id));\n\tdie();\n}", "public function settings_page() {\n\t\tinclude_once( dirname( __FILE__ ) . '/class-vendor-admin-settings.php' );\n\t\tVendor_Admin_Settings::output();\n\t}", "public static function general_settings() {\n\t\t$msg = '';\n\t\tif (!empty($_POST) && isset($_POST['save-settings'])) {\n\t\t\t$msg = self::save();\n\t\t}\n\t\t$page_id = get_option('dod_page_id');\n\t\t$args['page_id'] = $page_id;\n\t\t$query = new WP_Query($args);\n\t\t$page = $query->posts[0];\n\t\t$custom_css = array_shift(get_post_meta($page_id, 'dod_custom_css'));\n\t\t$selected_template = array_shift(get_post_meta($page_id, '_wp_page_template'));\n\t\t$templates = get_page_templates();\n\t\tinclude 'views/_geneal_settings.php';\n\t}", "abstract public function getSettings();", "function getSettings()\r\n {\r\n global $objDatabase;\r\n $query = \"SELECT name, value FROM \".DBPREFIX.\"module_banner_settings\";\r\n $objResult = $objDatabase->Execute($query);\r\n while (!$objResult->EOF) {\r\n $this->arrSettings[$objResult->fields['name']] = $objResult->fields['value'];\r\n $objResult->MoveNext();\r\n }\r\n }", "public function website_settings_get($type=\"homepage\")\n {\n $json = array();\n $sutil = new CILServiceUtil();\n if(strcmp($type, \"homepage\") == 0)\n {\n $url = $this->config->item('homepage_settings');\n $data = NULL;\n $response = $sutil->just_curl_get_data($url,$data);\n $json = json_decode($response);\n }\n else \n {\n $json['Found'] =false;\n $json['Error'] = \"Invalid type:\".$type;\n }\n \n $this->response($json);\n }", "function setup_settings() {\n\t\t\t$page = is_network_admin() ? 'settings.php' : 'writing';\n\t\t\t$section = 'post_revision_workflow';\n\t\t\t\n\t\t\tif( is_network_admin() ) {\n\t\t\t\tadd_action( 'wpmu_options', array( &$this, 'ms_settings_section' ) );\n\t\t\t\tadd_action( 'update_wpmu_options', array( &$this, 'update_ms_settings' ) );\n\t\t\t} else {\n\t\t\t\tregister_setting( $page, 'dpn_reviewers', array( &$this, 'sanitize_settings' ) );\n\t\t\t\tadd_settings_section( $section, __( 'Post Revision Workflow', $this->text_domain ), array( &$this, 'settings_section' ), $page );\n\t\t\t\tadd_settings_field( 'dpn_reviewers', __( 'Default email address for post revision workflow notification:', $this->text_domain ), array( &$this, 'settings_field' ), $page, $section, array( 'label_for' => 'dpn_reviewers' ) );\n\t\t\t}\n\t\t}", "public function getBasicSettingsValues()\n\t{\n\t\t$values = array();\n\n\t\t$values[\"webspace_dir\"] = getcwd().\"/data\";\n\t\t$values[\"data_dir\"] = $this->setup->ini->readVariable(\"clients\",\"datadir\");\n\t\t$values[\"convert_path\"] = $this->setup->ini->readVariable(\"tools\",\"convert\");\n\t\t$values[\"zip_path\"] = $this->setup->ini->readVariable(\"tools\",\"zip\");\n\t\t$values[\"unzip_path\"] = $this->setup->ini->readVariable(\"tools\",\"unzip\");\n\t\t$values[\"ghostscript_path\"] = $this->setup->ini->readVariable(\"tools\",\"ghostscript\");\n\t\t$values[\"java_path\"] = $this->setup->ini->readVariable(\"tools\",\"java\");\n\t\t$values[\"htmldoc_path\"] = $this->setup->ini->readVariable(\"tools\",\"htmldoc\");\n\t\t//$values[\"mkisofs_path\"] = $this->setup->ini->readVariable(\"tools\",\"mkisofs\");\n\t\t$values[\"ffmpeg_path\"] = $this->setup->ini->readVariable(\"tools\",\"ffmpeg\");\n\t\t$values[\"latex_url\"] = $this->setup->ini->readVariable(\"tools\",\"latex\");\n\t\t$values[\"fop_path\"] = $this->setup->ini->readVariable(\"tools\",\"fop\");\n\t\t$values[\"vscanner_type\"] = $this->setup->ini->readVariable(\"tools\", \"vscantype\");\n\t\t$values[\"scan_command\"] = $this->setup->ini->readVariable(\"tools\", \"scancommand\");\n\t\t$values[\"clean_command\"] = $this->setup->ini->readVariable(\"tools\", \"cleancommand\");\n\t\t$values[\"log_path\"] = $this->setup->ini->readVariable(\"log\",\"path\").\"/\".\n\t\t\t$this->setup->ini->readVariable(\"log\",\"file\");\n\t\t$values[\"chk_log_status\"] = !$this->setup->ini->readVariable(\"log\",\"enabled\");\n\t\t$values[\"time_zone\"] = $this->setup->ini->readVariable(\"server\", \"timezone\");\n\t\t\n\t\t// https settings\n\t\t$values[\"auto_https_detect_enabled\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_enabled\");\n\t\t$values[\"auto_https_detect_header_name\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_header_name\");\n\t\t$values[\"auto_https_detect_header_value\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_header_value\");\n\n\t\t$this->form->setValuesByArray($values);\n\t}", "public function save_network_options() {\n\n\t\tif ( isset( $_POST['itsec_hide_backend'] ) ) {\n\n\t\t\tif ( ! wp_verify_nonce( $_POST['_wpnonce'], 'security_page_toplevel_page_itsec_settings-options' ) ) {\n\t\t\t\tdie( __( 'Security error!', 'it-l10n-ithemes-security-pro' ) );\n\t\t\t}\n\n\t\t\tupdate_site_option( 'itsec_hide_backend', $_POST['itsec_hide_backend'] ); //we must manually save network options\n\n\t\t}\n\n\t}", "public function get_settings()\n {\n }", "private function init_general_settings() {\n\t\t\tregister_setting(\n\t\t\t\tself::LINKID_SETTINGS_PAGE_ID, //Needs to be the page itself, otherwise the variables do not get white-listed on post...\n\t\t\t\tLink_WP_LinkID::LINKID_SETTINGS_VARIABLE,\n\t\t\t\tarray( $this, 'validate_settings' )\n\t\t\t);\n\n\t\t\t//\n\t\t\t// Initialize the section\n\t\t\t//\n\t\t\tadd_settings_section(\n\t\t\t\tself::GENERAL_SETTINGS_SECTION_ID,\n\t\t\t\t__( \"General Settings\", \"link-linkid\" ),\n\t\t\t\tarray( $this, 'render_general_settings_info' ),\n\t\t\t\tself::LINKID_SETTINGS_PAGE_ID );\n\n\t\t\t//\n\t\t\t// Add fields\n\t\t\t//\n\t\t\t$this->add_field(\n\t\t\t\tLink_WP_LinkID::SETTINGS_APPLICATION_NAME,\n\t\t\t\t__( \"linkID Application Name\", \"link-linkid\" ),\n\t\t\t\t__( \"The name of your linkID application.\", \"link-linkid\" ),\n\t\t\t\tself::INPUT_TYPE_TEXT_INPUT,\n\t\t\t\tself::GENERAL_SETTINGS_SECTION_ID\n\t\t\t);\n\t\t\t$this->add_field(\n\t\t\t\tLink_WP_LinkID::SETTINGS_LINKID_HOSTNAME,\n\t\t\t\t__( \"linkID Hostname\", \"link-linkid\" ),\n\t\t\t\t__( \"The url of the linkID server with which the store will communicate. Use service.linkid.be \"\n\t\t\t\t . \"for production and demo.linkid.be for testing.\", \"link-linkid\" ),\n\t\t\t\tself::INPUT_TYPE_TEXT_INPUT,\n\t\t\t\tself::GENERAL_SETTINGS_SECTION_ID\n\t\t\t);\n\t\t\t$this->add_field(\n\t\t\t\tLink_WP_LinkID::SETTINGS_APPLICATION_USERNAME,\n\t\t\t\t__( \"linkID Application Username\", \"link-linkid\" ),\n\t\t\t\t__( \"The username of your linkID application.\", \"link-linkid\" ),\n\t\t\t\tself::INPUT_TYPE_TEXT_INPUT,\n\t\t\t\tself::GENERAL_SETTINGS_SECTION_ID\n\t\t\t);\n\t\t\t$this->add_field(\n\t\t\t\tLink_WP_LinkID::SETTINGS_APPLICATION_PASSWORD,\n\t\t\t\t__( \"linkID Application Password\", \"link-linkid\" ),\n\t\t\t\t__( \"The password of your linkID application.\", \"link-linkid\" ),\n\t\t\t\tself::INPUT_TYPE_TEXT_INPUT,\n\t\t\t\tself::GENERAL_SETTINGS_SECTION_ID\n\t\t\t);\n\t\t\t$this->add_field(\n\t\t\t\tLink_WP_LinkID::SETTINGS_LINKID_PROFILE,\n\t\t\t\t__( \"linkID Profile\", \"link-linkid\" ),\n\t\t\t\t__( \"The linkID profile used during login and/or payment. The profile may ask for e-mail, First Name, \"\n\t\t\t\t . \"Family Name, Street Name, Street Number, Street Bus, City, Postal/Zip Code and Country from the user.\",\n\t\t\t\t\t\"link-linkid\" ),\n\t\t\t\tself::INPUT_TYPE_TEXT_INPUT,\n\t\t\t\tself::GENERAL_SETTINGS_SECTION_ID\n\t\t\t);\n\n\n\t\t}", "public static function settings() {\r\n\t\t// VC Form MH Listing\r\n\t\t// Here we setup MH Listing element (basic data and params)\r\n\t\treturn array(\r\n\t\t\t'name' => esc_html__( 'Property Listings', 'myhome-core' ),\r\n\t\t\t'base' => 'mh_listing',\r\n 'icon' => plugins_url( 'myhome-core/public/img/vc-icon.png' ),\r\n\t\t\t'category' => esc_html__( 'MyHome', 'myhome-core' ),\r\n\t\t\t'params' => My_Home_Listing::get_settings()\r\n\t\t);\r\n\t}", "function pajaxReadSettings(){\r\r\n\r\r\n\tif(file_exists(PAJAXSETTINGFILE)){\r\r\n\r\r\n\t\t$settings = file_get_contents(PAJAXSETTINGFILE);\r\r\n\r\r\n\t\treturn explode(\"||\", $settings);\r\r\n\r\r\n\t}\r\r\n\r\r\n\treturn $settings = array();\r\r\n\r\r\n\r\r\n\r\r\n}", "public function update_network_settings() {\n\t\tif ( isset( $_REQUEST['_wpnonce'] ) && ! wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ), 'simple-smtp-ms' ) ) {\n\t\t\twp_die( esc_attr_e( 'Your nonce key has expired.', 'simple-smtp' ) );\n\t\t}\n\n\t\tif ( ! is_multisite() && ! current_user_can( 'manage_network_options' ) ) {\n\t\t\twp_die( esc_attr_e( 'You do not have permission to use this endpoint.', 'simple-smtp' ) );\n\t\t}\n\n\t\t// Save per-site configurations for access.\n\t\t$sites = get_sites();\n\t\tforeach ( $sites as $site ) {\n\t\t\t$id = $site->blog_id;\n\t\t\t$set_val = ( isset( $_REQUEST[ \"wpssmtp_perm_set_s{$id}\" ] ) && '1' === $_REQUEST[ \"wpssmtp_perm_set_s{$id}\" ] ) ? 1 : 0;\n\t\t\t$log_val = ( isset( $_REQUEST[ \"wpssmtp_perm_log_s{$id}\" ] ) && '1' === $_REQUEST[ \"wpssmtp_perm_log_s{$id}\" ] ) ? 1 : 0;\n\n\t\t\tupdate_network_option( $site->blog_id, 'wpssmtp_disable_settings', $set_val );\n\t\t\tupdate_network_option( $site->blog_id, 'wpssmtp_disable_logging', $log_val );\n\t\t}\n\n\t\t// Save over-ruling SMTP configurations.\n\t\tif ( isset( $_REQUEST['wpssmtp_smtp'] ) ) {\n\t\t\t$settings = [];\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['host'] ) ) {\n\t\t\t\t$settings['host'] = sanitize_text_field( wp_unslash( $_REQUEST['wpssmtp_smtp']['host'] ) ); }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['port'] ) ) {\n\t\t\t\t$settings['port'] = (int) $_REQUEST['wpssmtp_smtp']['port']; }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['auth'] ) ) {\n\t\t\t\t$settings['auth'] = (int) $_REQUEST['wpssmtp_smtp']['auth']; }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['user'] ) ) {\n\t\t\t\t$settings['user'] = sanitize_text_field( wp_unslash( $_REQUEST['wpssmtp_smtp']['user'] ) ); }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['pass'] ) ) {\n\t\t\t\tif ( $this->dummy_password === $_REQUEST['wpssmtp_smtp']['pass'] ) {\n\t\t\t\t\t$settings['pass'] = get_site_option( 'wpssmtp_smtp_ms', [ 'pass' => null ] )['pass'];\n\t\t\t\t} else {\n\t\t\t\t\t$settings['pass'] = sanitize_text_field( wp_unslash( $_REQUEST['wpssmtp_smtp']['pass'] ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['from'] ) ) {\n\t\t\t\t$settings['from'] = sanitize_email( wp_unslash( $_REQUEST['wpssmtp_smtp']['from'] ) ); }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['fromname'] ) ) {\n\t\t\t\t$settings['fromname'] = sanitize_text_field( wp_unslash( $_REQUEST['wpssmtp_smtp']['fromname'] ) ); }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['sec'] ) && 'def' !== $_REQUEST['wpssmtp_smtp']['sec'] ) {\n\t\t\t\t$settings['sec'] = sanitize_text_field( wp_unslash( $_REQUEST['wpssmtp_smtp']['sec'] ) ); }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['noverifyssl'] ) ) {\n\t\t\t\t$settings['noverifyssl'] = (int) $_REQUEST['wpssmtp_smtp']['noverifyssl']; }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['disable'] ) ) {\n\t\t\t\t$settings['disable'] = (int) $_REQUEST['wpssmtp_smtp']['disable']; }\n\t\t\tif ( ! empty( $_REQUEST['wpssmtp_smtp']['log'] ) ) {\n\t\t\t\t$settings['log'] = (int) $_REQUEST['wpssmtp_smtp']['log']; }\n\n\t\t\tupdate_site_option( 'wpssmtp_smtp_ms', $settings );\n\t\t}\n\n\t\t// Done with saving - send them back.\n\t\twp_safe_redirect( network_admin_url( 'settings.php?page=wpsimplesmtpms' ) );\n\t\texit;\n\t}", "function webnotik_register_general_settings() {\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_name' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_phone' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_email' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_address1' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_address2' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_privacy' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_tos' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_sma_linkedin' );\n}", "private function settingsAnalyzer()\n {\n require '../configuration/app.php';\n\n if ($external_server_settings['mode'] == 'on') {\n return $this->settings[] = $external_server_settings; \n }\n \n return $this->settings[] = $server_settings;\n }", "public function initGeneralPageSettingsForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\t\n\t\t$aset = new ilSetting(\"adve\");\n\n\t\t// use physical character styles\n\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"adve_use_physical\"), \"use_physical\");\n\t\t$cb->setInfo($this->lng->txt(\"adve_use_physical_info\"));\n\t\t$cb->setChecked($aset->get(\"use_physical\"));\n\t\t$form->addItem($cb);\n\n\t\t// blocking mode\n\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"adve_blocking_mode\"), \"block_mode_act\");\n\t\t$cb->setChecked($aset->get(\"block_mode_minutes\") > 0);\n\t\t$form->addItem($cb);\n\n\t\t\t// number of minutes\n\t\t\t$ni = new ilNumberInputGUI($this->lng->txt(\"adve_minutes\"), \"block_mode_minutes\");\n\t\t\t$ni->setMinValue(2);\n\t\t\t$ni->setMaxLength(5);\n\t\t\t$ni->setSize(5);\n\t\t\t$ni->setRequired(true);\n\t\t\t$ni->setInfo($this->lng->txt(\"adve_minutes_info\"));\n\t\t\t$ni->setValue($aset->get(\"block_mode_minutes\"));\n\t\t\t$cb->addSubItem($ni);\n\t\t\n\t\t$form->addCommandButton(\"saveGeneralPageSettings\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($lng->txt(\"adve_pe_general\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t \n\t\treturn $form;\n\t}", "public function initialize_settings_page()\n {\n }", "public function getPagerSettings();", "public function get_settings() {\n\n\t\tif($this->settings) {\n\t\t\treturn $this->settings;\n\t\t}\n\n\t\t$query = $this->db->get('shortee_settings');\n\t\t$this->settings = $query->row_array();\n\t\t$this->domain_list = explode(',',$this->settings['short_domain']);\n\n\t\treturn $this->settings;\n\t}", "private function _loadPageSettings(){\r\n\r\n $uri = $this->_getContentURI();\r\n $settings = ROOT.DS.'site'.DS.'content'.DS.$uri.DS.'settings.json';\r\n\r\n if(file_exists($settings)){\r\n $this->pageSettings = json_decode(file_get_contents($settings));\r\n } else {\r\n $page_dir = ROOT.DS.'site'.DS.'content';\r\n foreach(explode('/', $uri) as $dir){\r\n $page_dir .= DS.$dir;\r\n if(!file_exists($page_dir)){\r\n mkdir($page_dir);\r\n }\r\n }\r\n $pageSettings = new stdClass();\r\n $pageSettings->page_title = '';\r\n $pageSettings->page_script = '';\r\n file_put_contents($settings, json_encode($pageSettings));\r\n }\r\n\r\n }", "public function add_network_admin_pages() {\n\n\t\t// Add our main settings page.\n\t\tadd_menu_page(\n\t\t\tsprintf( __( 'Manage %s', 'wpcampus-network' ), 'WPCampus' ),\n\t\t\t'WPCampus',\n\t\t\t'manage_wpc_network',\n\t\t\t'manage-wpc-network',\n\t\t\t[ $this, 'print_manage_network_page' ]\n\t\t);\n\t}", "public function getSettingsPageUrl() {\t \n\t\tswitch ($this->getModule()) {\n\t\t\tcase RublonMagentoModule::ADMIN:\n\t\t\t\treturn Mage::helper(\"adminhtml\")->getUrl('rublon/adminhtml_settings');\n\t\t\tcase RublonMagentoModule::CONNECT:\n\t\t\t\treturn $this->getMagentoConnectUrl();\n// \t\t\tdefault:\n// \t\t\t\treturn Mage::getUrl('rublon/customer/settings');\n\t\t}\n\t}", "function nrelate_admin_do_page() { ?> \n\n\t\t<div id=\"nr-admin-settings\" class=\"postbox\">\n\t\t\t<h3 class=\"hndle\"><span><?php _e('Common settings for all nrelate products:')?></span></h3>\n\t\t\t\t<ul class=\"inside\">\n\t\t\t\t\t<?php $connectionstatus = update_nrelate_admin_data();\n\t\t\t\t\tif($connectionstatus !=\"Success\"){\n\t\t\t\t\t\techo \"<h1 style='color:red;font-size:16px;'>\".$connectionstatus.\"</h1>\";\n\t\t\t\t\t} ?>\n\t\t\t\t\t<form name=\"settings\" action=\"options.php\" method=\"post\" enctype=\"multipart/form-action\">\n\t\t\t\t\t\t<?php settings_fields('nrelate_admin_options'); ?>\n\t\t\t\t\t\t<?php do_settings_sections(__FILE__);?>\n\t\t\t\t\t\t<p class=\"submit\">\n\t\t\t\t\t\t\t<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes','nrelate'); ?>\" <?php echo NRELATE_API_ONLINE ? '' : 'disabled=\"disabled\" title=\"Sorry nrelate\\'s api server is not available. Please try again later\"'; ?> />\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</form>\n\t\t\t\t</ul><!-- .inside -->\n\t\t</div><!-- #nr-admin-settings -->\n\t\t<script type=\"text/javascript\">getnrcode(\"<?php echo NRELATE_BLOG_ROOT; ?>\",\"<?php echo NRELATE_LATEST_ADMIN_VERSION; ?>\",\"<?php echo get_option('nrelate_key');?>\");</script>\n<?php\n\t\n\tupdate_nrelate_admin_data();\n}", "function ffw_port_get_registered_settings() {\n\n $pages = get_pages();\n $pages_options = array( 0 => '' ); // Blank option\n if ( $pages ) {\n foreach ( $pages as $page ) {\n $pages_options[ $page->ID ] = $page->post_title;\n }\n }\n\n /**\n * 'Whitelisted' FFW_PORT settings, filters are provided for each settings\n * section to allow extensions and other plugins to add their own settings\n */\n $ffw_port_settings = array(\n /** General Settings */\n 'general' => apply_filters( 'ffw_port_settings_general',\n array(\n 'basic_settings' => array(\n 'id' => 'basic_settings',\n 'name' => '<strong>' . __( 'Basic Settings', 'ffw_port' ) . '</strong>',\n 'desc' => '',\n 'type' => 'header'\n ),\n 'port_slug' => array(\n 'id' => 'port_slug',\n 'name' => __( ffw_port_get_label_plural() . ' URL Slug', 'ffw_port' ),\n 'desc' => __( 'Enter the slug you would like to use for your ' . strtolower( ffw_port_get_label_plural() ) . '.' , 'ffw_port' ),\n 'type' => 'text',\n 'size' => 'medium',\n 'std' => strtolower( ffw_port_get_label_plural() )\n ),\n 'port_label_plural' => array(\n 'id' => 'port_label_plural',\n 'name' => __( ffw_port_get_label_plural() . ' Label Plural', 'ffw_port' ),\n 'desc' => __( 'Enter the label you would like to use for your ' . strtolower( ffw_port_get_label_plural() ) . '.', 'ffw_port' ),\n 'type' => 'text',\n 'size' => 'medium',\n 'std' => ffw_port_get_label_plural()\n ),\n 'port_label_singular' => array(\n 'id' => 'port_label_singular',\n 'name' => __( ffw_port_get_label_singular() . ' Label Singular', 'ffw_port' ),\n 'desc' => __( 'Enter the label you would like to use for your ' . strtolower( ffw_port_get_label_singular() ) . '.', 'ffw_port' ),\n 'type' => 'text',\n 'size' => 'medium',\n 'std' => ffw_port_get_label_singular()\n ),\n 'port_disable_link_to_single' => array(\n 'id' => 'port_disable_link_to_single',\n 'name' => __( 'Disable Link', 'ffw_port' ),\n 'desc' => __( 'Disable clicking through to the single detail.', 'ffw_port' ),\n 'type' => 'checkbox',\n 'std' => ''\n ),\n 'dash_icons' => array(\n 'id' => 'dash_icons',\n 'name' => __( 'Label Icon', 'ffw_port' ),\n 'desc' => __( 'Change the icon using <a href=\"http://melchoyce.github.io/dashicons/\">Dashicons</icons>', 'ffw_port' ),\n 'type' => 'text',\n 'size' => 'medium',\n 'std' => 'dashicons-portfolio'\n ),\n 'port_posts_per_page' => array(\n 'id' => 'port_posts_per_page',\n 'name' => __( 'Archive Posts Page', 'ffw_port' ),\n 'desc' => __( 'Enter the number of posts you would like to display on the archive template' , 'ffw_port' ),\n 'type' => 'text',\n 'size' => 'small',\n 'std' => '100'\n ),\n 'disable_archive' => array(\n 'id' => 'disable_archive',\n 'name' => __( 'Disable Archives Page', 'ffw_port' ),\n 'desc' => __( 'Check to disable archives page', 'ffw_port' ),\n 'type' => 'checkbox',\n 'std' => ''\n ),\n 'exclude_from_search' => array(\n 'id' => 'exclude_from_search',\n 'name' => __( 'Exclude from Search', 'ffw_port' ),\n 'desc' => __( 'Check to exclude from search', 'ffw_port' ),\n 'type' => 'checkbox',\n 'std' => ''\n ),\n )\n ),\n \n );\n\n return $ffw_port_settings;\n}", "public function page_init() { \n\n\t\t\tif (!get_option('dls_settings_site_id')) {\n\t\t\t\tadd_option('dls_settings_site_id');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_enabled_post_types')) {\n\t\t\t\tadd_option('dls_settings_enabled_post_types');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_replace_host_list')) {\n\t\t\t\tadd_option('dls_settings_replace_host_list');\n }\n\n\t\t\tif (!get_option('dls_settings_auto_redirect_to_admin_page')) {\n\t\t\t\tadd_option('dls_settings_auto_redirect_to_admin_page');\n }\n\n\t\t\tif (!get_option('dls_overwrite_viewable_permalink')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink');\n }\n\n \t\t\tif (!get_option('dls_overwrite_viewable_permalink_host')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink_host');\n\t\t\t}\n \n register_setting( 'my_option_group', 'dls_settings_site_id', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_enabled_post_types', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_replace_host_list', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_auto_redirect_to_admin_page', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink_host', array( $this, 'sanitize' ) );\n\n add_settings_section( 'settings_site_id', 'Site ID', array( $this, 'print_site_id' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Set the site id for this site', array( $this, 'site_id_callback'), 'my-setting-admin', 'settings_site_id' ); \n\n add_settings_section( 'setting_section_id', 'Post types settings', array( $this, 'print_post_types_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Select post types', array( $this, 'post_type_callback'), 'my-setting-admin', 'setting_section_id' ); \n\n add_settings_section( 'settings_replace_hosts', 'Hosts to replace', array( $this, 'print_replace_hosts_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'List of hosts', array( $this, 'replace_hosts_callback'), 'my-setting-admin', 'settings_replace_hosts' ); \n\n add_settings_section( 'settings_auto_redirect_to_admin', 'Auto redirect to admin page', array( $this, 'print_auto_redirect_to_admin' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Auto redirect to admin page', array( $this, 'auto_redirect_to_admin_callback'), 'my-setting-admin', 'settings_auto_redirect_to_admin' ); \n\n add_settings_section( 'settings_overwrite_viewable_permalink', 'Overwrite the viewable permalink', array( $this, 'print_overwrite_viewable_permalink' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Overwrite the viewable permalink', array( $this, 'overwrite_viewable_permalink_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\t\t\tadd_settings_field( 'dls-settings-overwrite_viewable_permalink_host', 'Overwrite the viewable permalink host', array( $this, 'overwrite_viewable_permalink_host_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\n\t\t}", "function loadSettings() {\n\tsetupSiteURLs();\n}", "function ethnik_settings_link($links)\n\t\t{\n\t\t\t$settings_link = '<a href=\"options-general.php?page=wp_ethnik\">Settings</a>';\n\t\t\tarray_unshift($links, $settings_link);\n\t\t\treturn $links;\n\t\t}", "public function pluginReadSettingsPage()\n {\n $this->getOptions();\n global $rundizable_wp_features_optname;\n\n $output['rundizable_wp_features_optname'] = $rundizable_wp_features_optname;\n\n $Loader = new \\RundizableWpFeatures\\App\\Libraries\\Loader();\n $Loader->loadView('admin/readsettings_v', $output);\n unset($Loader, $output);\n }", "public function save_network_options() {\n\n\t\tif ( isset( $_POST['itsec_away_mode'] ) ) {\n\n\t\t\tif ( ! wp_verify_nonce( $_POST['_wpnonce'], 'security_page_toplevel_page_itsec_settings-options' ) ) {\n\t\t\t\tdie( __( 'Security error!', 'it-l10n-ithemes-security-pro' ) );\n\t\t\t}\n\n\t\t\tupdate_site_option( 'itsec_away_mode', $_POST['itsec_away_mode'] ); //we must manually save network options\n\n\t\t}\n\n\t}", "public function settings_page () {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __( 'Plugin Settings' , 'listeo_core' ) . '</h2>' . \"\\n\";\n\n $tab = '';\n if ( isset( $_GET['tab'] ) && $_GET['tab'] ) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if ( is_array( $this->settings ) && 1 < count( $this->settings ) ) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ( $this->settings as $section => $data ) {\n\n // Set tab class\n $class = 'nav-tab';\n if ( ! isset( $_GET['tab'] ) ) {\n if ( 0 == $c ) {\n $class .= ' nav-tab-active';\n }\n } else {\n if ( isset( $_GET['tab'] ) && $section == $_GET['tab'] ) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg( array( 'tab' => $section ) );\n if ( isset( $_GET['settings-updated'] ) ) {\n $tab_link = remove_query_arg( 'settings-updated', $tab_link );\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr( $class ) . '\">' . esc_html( $data['title'] ) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields( $this->_token . '_settings' );\n do_settings_sections( $this->_token . '_settings' );\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr( $tab ) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr( __( 'Save Settings' , 'listeo_core' ) ) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "public function getNetwork() {\n return $this->getValue('network');\n }", "public function default_settings_section_info() {\n global $WCPc;\n _e('Enter your default settings below', $WCPc->text_domain);\n }", "public function redq_rental_get_settings_pages($settings)\n {\n $settings[] = include('includes/admin/class-redq-rental-settings-rnb.php');\n return $settings;\n }", "public function getUserSettings()\n {\n return $this->postRequest('GetUserSettings', null, '5.3.1.68');\n }", "public function getSettings();", "abstract public function getTextSettings();", "public function getSettingsLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_general'), 'text' => $this->__('General settings'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_display'), 'text' => $this->__('Display'), 'class' => 'z-icon-es-displa');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_albums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-displa');\n }\n \t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_media'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-displa');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_access'), 'text' => $this->__('Access'), 'class' => 'z-icon-es-displa');\n }\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_storage'), 'text' => $this->__('Storage'), 'class' => 'z-icon-es-displa');\n } \n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_handlers'), 'text' => $this->__('Handlers'), 'class' => 'z-icon-es-displa');\n }\n \tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_sources'), 'text' => $this->__('Sources'), 'class' => 'z-icon-es-displa');\n }\n \tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_import'), 'text' => $this->__('Import'), 'class' => 'z-icon-es-displa');\n } \n\t\t\t\t\n return $links;\n }", "public function settings()\n\t{\n\t\t$settings = array();\n\n\t\t$settings['early_global'] = array('c', array(\n\t\t 'member_id' => \"global_member_id\",\n\t\t 'group_id' => \"global_group_id\",\n\t\t // defaults\n\t\t), array('member_id','group_id'));\n\n\t $settings['early_logged_in'] = array('c', array(\n\t\t 'member_id' => \"logged_in_member_id\",\n\t\t 'group_id' => \"logged_in_group_id\",\n\t\t // defaults\n\t\t), array('member_id','group_id'));\n\n\t // for demo, include some others\n\t $settings['include_other'] = array('c', array(\n\t\t 'include_other' => \"Include other member variables\",\n\t\t), array());\n\t\t\n \t\t$settings['others'] = array('ms', array(\n\t\t 'username' => 'username',\n\t\t 'screen_name' => 'screen_name',\n\t\t 'email' => 'email',\n\t\t // 'last_visit' => 'last_visit',\n\t\t 'access_cp' => 'access_cp',\n\t\t // defaults\n\t\t), array());\n\n\t\t$settings['handy'] = array('c', array(\n\t\t 'comment_edit_time_limit' => \"comment_edit_time_limit\",\n\t\t), array('comment_edit_time_limit'));\n\n\t\treturn $settings;\n\t}", "public function settings( &$form )\n\t{\n\t\t$settings = json_decode( $this->settings, TRUE );\n\t\t\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'authorizenet_login', $settings['login'], TRUE ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'authorizenet_tran_key', $settings['tran_key'], TRUE ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Radio( 'authorizenet_method', $settings['method'], TRUE, array(\n\t\t\t'options' \t=> array(\n\t\t\t\t'AIM'\t\t=> 'authorizenet_AIM',\n\t\t\t\t'DPM'\t\t=> 'authorizenet_DPM'\n\t\t\t),\n\t\t\t'toggles'\t=> array(\n\t\t\t\t'AIM'\t\t=> array( 'authorizenet_cim' ),\n\t\t\t\t'DPM'\t\t=> array( 'authorizenet_hash' )\n\t\t\t)\n\t\t) ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\YesNo( 'authorizenet_cim', $settings['cim'], FALSE, array(), NULL, NULL, NULL, 'authorizenet_cim' ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'authorizenet_hash', $settings['hash'], FALSE, array(), NULL, NULL, NULL, 'authorizenet_hash' ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Select( 'authorizenet_processor', $settings['processor'], FALSE, array( 'options' => array(\n\t\t\t0\t\t=> 'dont_know',\n\t\t\t'North American Payment Processors'\t=> array(\n\t\t\t\t1 \t=> 'Chase Paymentech Tampa Processing Platform',\n\t\t\t\t2\t=> 'Elavon',\n\t\t\t\t3\t=> 'First Data Merchant Services (FDMS) Omaha, Nashville, and EFSNet Processing Platforms',\n\t\t\t\t4\t=> 'Global Payments',\n\t\t\t\t5\t=> 'Heartland Payment Systems',\n\t\t\t\t6\t=> 'TSYS Acquiring Solutions',\n\t\t\t\t7\t=> 'WorldPay Atlanta Processing Platform',\n\t\t\t),\n\t\t\t'European Payment Processors'\t\t=> array(\n\t\t\t\t8\t=> 'AIB Merchant Services',\n\t\t\t\t9\t=> 'Barclaycard',\n\t\t\t\t10\t=> 'First Data Merchant Solutions (MSIP platform)',\n\t\t\t\t11\t=> 'HSBC Merchant Services',\n\t\t\t\t12\t=> 'Lloyds Bank Cardnet',\n\t\t\t\t13\t=> 'Streamline',\n\t\t\t),\n\t\t\t'Asia-Pacific Processors'\t\t\t=> array(\n\t\t\t\t14\t=> 'FDI Australia',\n\t\t\t\t15\t=> 'Westpac',\n\t\t\t)\n\t\t) ) ) );\n\t}", "public static function settings_page() {\r\n\t\treturn '';\r\n\t}", "private function _network()\n {\n if (CommonFunctions::executeProgram('netstat', '-ni | tail -n +2', $netstat)) {\n $lines = preg_split(\"/\\n/\", $netstat, -1, PREG_SPLIT_NO_EMPTY);\n foreach ($lines as $line) {\n $ar_buf = preg_split(\"/\\s+/\", $line);\n if (! empty($ar_buf[0]) && ! empty($ar_buf[3])) {\n $dev = new NetDevice();\n $dev->setName($ar_buf[0]);\n $dev->setRxBytes($ar_buf[4]);\n $dev->setTxBytes($ar_buf[6]);\n $dev->setErrors($ar_buf[5] + $ar_buf[7]);\n //$dev->setDrops($ar_buf[8]);\n $this->sys->setNetDevices($dev);\n }\n }\n }\n }", "function do_settings_sections($page)\n {\n }", "public function settings_page_init() {\n global $WCPc;\n \n $settings_tab_options = array(\"tab\" => \"{$this->tab}\", \"ref\" => &$this,\n \"sections\" => array(\n // Section one\n \"default_settings_section\" => array(\n \"title\" => __('Default Settings', $WCPc->text_domain), \n \"fields\" => array( /* Hidden */\n \"id\" => array('title' => '', \n 'type' => 'hidden', \n 'id' => 'id', \n 'name' => 'id', \n 'value' => 999\n ),\n /* Text */ \n \"id_number\" => array('title' => __('ID Number', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'id_number', \n 'label_for' => 'id_number', \n 'name' => 'id_number', \n 'hints' => __('Enter your ID Number here.', $WCPc->text_domain), \n 'desc' => __('It will represent your identification.', $WCPc->text_domain)\n ), \n /* Textarea */\n \"about\" => array('title' => __('About', $WCPc->text_domain) , \n 'type' => 'textarea', \n 'id' => 'about', \n 'label_for' => 'about', \n 'name' => 'about', \n 'rows' => 5, \n 'placeholder' => __('About you', $WCPc->text_domain), \n 'desc' => __('It will represent your significant.', $WCPc->text_domain)\n ), \n /* Text */\n \"demo_test\" => array('title' => __('Demo Test', $WCPc->text_domain),\n 'type' => 'text',\n 'id' => 'demo_test',\n 'label_for' => 'demo_test',\n 'name' => 'demo_test',\n 'placeholder' => __('Demo Test', $WCPc->text_domain)\n ),\n /* Wp Eeditor */\n \"bio\" => array('title' => __('Bio', $WCPc->text_domain), \n 'type' => 'wpeditor', \n 'id' => 'bio', \n 'label_for' => 'bio', \n 'name' => 'bio'\n ), \n /* Checkbox */\n \"is_enable\" => array('title' => __('Enable', $WCPc->text_domain), \n 'type' => 'checkbox', \n 'id' => 'is_enable', \n 'label_for' => 'is_enable', \n 'name' => 'is_enable', \n 'value' => 'Enable'\n ), \n /* Radio */\n \"offday\" => array('title' => __('Off Day', $WCPc->text_domain), \n 'type' => 'radio', \n 'id' => 'offday', \n 'label_for' => 'offday', \n 'name' => 'offday', \n 'dfvalue' => 'wednesday', \n 'options' => array('sunday' => 'Sunday', \n 'monday' => 'Monday', \n 'tuesday' => 'Tuesday', \n 'wednesday' => 'Wednesday', \n 'thrusday' => 'Thrusday'\n ), \n 'hints' => __('Choose your preferred week offday.', $WCPc->text_domain), \n 'desc' => __('By default Saterday will be offday.', $WCPc->text_domain)\n ), \n /* Select */\n \"preference\" => array('title' => __('Preference', $WCPc->text_domain), \n 'type' => 'select', \n 'id' => 'preference', \n 'label_for' => 'preference', \n 'name' => 'preference', \n 'options' => array('one' => 'One Time', \n 'two' => 'Two Time', \n 'three' => 'Three Time'\n ), \n 'hints' => __('Choose your preferred occurence count.', $WCPc->text_domain)\n ), \n /* Upload */\n \"logo\" => array('title' => __('Logo', $WCPc->text_domain), \n 'type' => 'upload', \n 'id' => 'logo', \n 'label_for' => 'logo', \n 'name' => 'logo', \n 'prwidth' => 125, \n 'hints' => __('Your presentation.', $WCPc->text_domain), \n 'desc' => __('Represent your graphical signature.', $WCPc->text_domain)\n ), \n /* Colorpicker */\n \"dc_colorpicker\" => array('title' => __('Choose Color', $WCPc->text_domain), \n 'type' => 'colorpicker', \n 'id' => 'dc_colorpicker', \n 'label_for' => 'dc_colorpicker', \n 'name' => 'dc_colorpicker', \n 'default' => '000000', \n 'hints' => __('Choose your color here.', $WCPc->text_domain),\n 'desc' => __('This lets you choose your desired color.', $WCPc->text_domain)\n ), \n /* Datepicker */\n \"dc_datepicker\" => array('title' => __('Choose DOB', $WCPc->text_domain),\n 'type' => 'datepicker', \n 'id' => 'dc_datepicker', \n 'label_for' => 'dc_datepicker', \n 'name' => 'dc_datepicker', \n 'hints' => __('Choose your DOB here', $WCPc->text_domain), \n 'desc' => __('This lets you choose your date of birth.', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd-mm-yy')\n ), \n /* Multiinput */\n \"slider\" => array('title' => __('Slider', $WCPc->text_domain) , \n 'type' => 'multiinput', \n 'id' => 'slider', \n 'label_for' => 'slider', \n 'name' => 'slider', \n 'options' => array(\n \"title\" => array('label' => __('Title', $WCPc->text_domain) , \n 'type' => 'text', \n 'label_for' => 'title', \n 'name' => 'title', \n 'class' => 'regular-text'\n ),\n \"content\" => array('label' => __('Content', $WCPc->text_domain), \n 'type' => 'textarea', \n 'label_for' => 'content', \n 'name' => 'content', \n 'cols' => 40\n ),\n \"image\" => array('label' => __('Image', $WCPc->text_domain), \n 'type' => 'upload', \n 'label_for' => 'image', \n 'name' => 'image', \n 'prwidth' => 125\n ),\n \"url\" => array('label' => __('URL', $WCPc->text_domain) , \n 'type' => 'url', \n 'label_for' => 'url', \n 'name' => 'url', \n 'class' => 'regular-text'\n ),\n \"published\" => array('label' => __('Published ON', $WCPc->text_domain), \n 'type' => 'datepicker', \n 'id' => 'published', \n 'label_for' => 'published', \n 'name' => 'published', \n 'hints' => __('Published Date', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd th M, yy')\n )\n )\n )\n )\n ), \n \"custom_settings_section\" => array(\n \"title\" => \"Demo Custom Settings\", // Another section\n \"fields\" => array(\n \"location\" => array('title' => __('Location', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'location', \n 'name' => 'location', \n 'hints' => __('Location', $WCPc->text_domain)\n ),\n \"role\" => array('title' => __('Role', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'role', \n 'name' => 'role', \n 'hints' => __('Role', $WCPc->text_domain)\n )\n )\n )\n )\n );\n \n $WCPc->admin->settings->wcpc_settings_field_init(apply_filters(\"wcpc_settings_{$this->tab}_tab_options\", $settings_tab_options));\n }", "function register_settings() {\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'endpoint'); // Sanitize\n\t\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'check_interval'); // Sanitize\n\t\n\tregister_setting('StandardsReader_settings_group', 'mapPage');\n\tregister_setting('StandardsReader_settings_group', 'mapListing');\n\t\t \n}", "public function setting_page() {\n\n\t\techo '<div class=\"wrap\">';\n\t\tsettings_errors();\n\n\t\t$this->setting->show_navigation();\n\t\t$this->setting->show_forms();\n\n\t\techo '</div>';\n\t}", "function init_url_settings() {\n\t\tglobal $phpbb_seo;\n\t\t// vars will fell like rain in the code ;)\n\t\t$this->url_settings['google_txt_delim'] = !empty($phpbb_seo->seo_delim['google_txt']) ? $phpbb_seo->seo_delim['google_txt'] : '-';\n\t\t$this->url_settings['google_txt_static'] = !empty($phpbb_seo->seo_static['google_txt']) ? $phpbb_seo->seo_static['google_txt'] : 'txt';\n\t\t$this->url_settings['modrewrite'] = $this->module_config['google_modrewrite'];\n\n\t\tif ($this->url_settings['modrewrite']) { // Module links\n\t\t\t$this->url_settings['google_txt_tpl'] = $this->module_config['google_url'] . 'txt' . $this->url_settings['google_txt_delim'] . '%1$s.xml' . $this->url_settings['gzip_ext_out'];\n\t\t} else {\n\t\t\t$this->url_settings['google_txt_tpl'] = $this->module_config['google_url'] . $this->url_settings['google_default'] . '?txt=%1$s';\n\t\t}\n\t\treturn;\n\t}", "function wponion_network_settings_registry( &$instance ) {\n\t\treturn wponion_get_registry_instance( 'network_settings', $instance, 'module' );\n\t}", "private function parseConfig(){\n\t\t\treturn parse_ini_file(BASE_PATH . 'config' . DIRECTORY_SEPARATOR . 'config.ini');\n\t\t}", "private function settings_pointer() {\n\t\treturn array(\n\t\t\t'content' => '<h3>' . __( 'Global Settings', 'formidable' ) . '</h3>'\n\t\t\t\t. '<p><strong>' . __( 'General', 'formidable' ) . '</strong><br/>'\n\t\t\t\t. __( 'Turn stylesheets and scripts off, set which user roles have access to change and create forms, setup your reCaptcha, and set default messages for new forms and fields.', 'formidable' )\n\t\t\t\t. '<p><strong>' . __( 'Plugin Licenses', 'formidable' ) . '</strong><br/>'\n\t\t\t\t. sprintf( __( 'Once you&#8217;ve purchased %1$s or any addons, you&#8217;ll have to enter a license key to get access to all of their powerful features. A Plugin Licenses tab will appear here for you to enter your license key.', 'formidable' ), 'Formidable Pro' )\n \t . '</p>',\n\t\t\t'prev_page' => 'import',\n\t\t\t'next_page' => 'addons',\n\t\t);\n\t}", "private function parseSettings($settings) {\n\t\t\tif (!is_numeric($settings['thread_limit']) ||\n\t\t\t\t!is_numeric($settings['random_count']) ||\n\t\t\t\t!is_numeric($settings['recent_count']))\n\t\t\t{\n\t\t\t\terror('Invalid configuration parameters.', true);\n\t\t\t}\n\n\t\t\t$settings['exclude'] = explode(' ', (string) $settings['exclude']);\n\t\t\t$settings['thread_limit'] = intval($settings['thread_limit']);\n\t\t\t$settings['random_count'] = intval($settings['random_count']);\n\t\t\t$settings['recent_count'] = intval($settings['recent_count']);\n\n\t\t\tif ($settings['thread_limit'] < 1 ||\n\t\t\t\t$settings['random_count'] < 1 ||\n\t\t\t\t$settings['recent_count'] < 1)\n\t\t\t{\n\t\t\t\terror('Invalid configuration parameters.', true);\n\t\t\t}\n\n\t\t\treturn $settings;\n\t\t}", "function yz_get_social_networks_fields() {\n\n // Init Vars\n $networks_fields = array();\n\n // Get Social Networks\n $social_networks = yz_option( 'yz_social_networks' );\n\n if ( empty( $social_networks ) ) {\n return false;\n }\n\n // Unserialize data\n if ( is_serialized( $social_networks ) ) {\n $social_networks = unserialize( $social_networks );\n }\n\n // Check if there's URL related to the icons.\n foreach ( $social_networks as $network => $data ) {\n $networks_fields[ $network ] = array( 'title' => $data['name'] );\n }\n\n return $networks_fields;\n}", "public function settings_page()\n {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->parent->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __('SUAPI Settings', 'wp-suapi') . '</h2>' . \"\\n\";\n\n $tab = '';\n if (isset($_GET['tab']) && $_GET['tab']) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if (is_array($this->settings) && 1 < count($this->settings)) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ($this->settings as $section => $data) {\n\n // Set tab class\n $class = 'nav-tab';\n if (!isset($_GET['tab'])) {\n if (0 == $c) {\n $class .= ' nav-tab-active';\n }\n } else {\n if (isset($_GET['tab']) && $section == $_GET['tab']) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg(array('tab' => $section));\n if (isset($_GET['settings-updated'])) {\n $tab_link = remove_query_arg('settings-updated', $tab_link);\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr($class) . '\">' . esc_html($data['title']) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields($this->parent->_token . '_settings');\n do_settings_sections($this->parent->_token . '_settings');\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr($tab) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr(__('Save Settings', 'wp-suapi')) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "function construct_settings()\r\n\t{\r\n\t\tglobal $ilance, $phrase;\r\n\t\t\t\r\n\t\t$sql = $ilance->db->query(\"SELECT * FROM \" . DB_PREFIX . \"fbbridge_configuration\", 0, null, __FILE__, __LINE__);\r\n\t\tif ($ilance->db->num_rows($sql) > 0)\r\n\t\t{\r\n\t\t\t\t$html = '';\r\n\t\t\t\twhile ($res = $ilance->db->fetch_array($sql))\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t\t$html .= '<tr>';\r\n\t\t\t\t\t$html .= '<td width=\"27%\" valign=\"top\" nowrap>'.stripslashes($res['description']).'</td>';\r\n\t\t\t\t\t$html .= '<td width=\"34%\" align=\"left\" valign=\"top\">';\r\n\t\t\t\t\tif($res['inputtype'] == \"yesno\")\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\t$html .= '<input type=\"radio\" name=\"'.$res['name'].'\" id=\"'.$res['name'].'\" value=\"1\" ';\r\n\t\t\t\t\t\tif ($res['value'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= 'checked=\"checked\">';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$html .= '<label for=\"'.$res['name'].'\">'.$phrase['_yes'].'</label>';\r\n\r\n\t\t\t\t\t\t$html .= '<input name=\"'.$res['name'].'\" id=\"'.$res['name'].'2\" type=\"radio\" value=\"0\" ';\r\n\t\t\t\t\t\tif ($res['value'] == 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= 'checked=\"checked\">';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<label for=\"'.$res['name'].'2\">'.$phrase['_no'].'</label>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($res['inputtype'] == 'textarea')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<textarea name=\"'.$res['name'].'\" id=\"'.$res['name'].'\" style=\"width:250px; height:100px;\">'.$res['value'].'</textarea>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($res['inputtype'] == 'text')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .='<input style=\"padding:2px; height:15px; width:150px; font-family: verdana;\" id=\"'.$res['name'].'\" type=\"text\" name=\"'.$res['name'].'\" value=\"'.$res['value'].'\" />';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$html .= '</td>';\r\n\t\t\t\t\t$html .= '</tr>';\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$html .= '<tr>';\r\n\t\t\t\t$html .= '<td width=\"27%\" height=\"15\">'.stripslashes($res['description']).'</td>';\r\n\t\t\t\t$html .= '</tr>';\r\n\t\t}\r\n\t\treturn $html;\r\n\t}", "public function settings() {\n\n\t\tdo_settings_sections( 'wpbgdc' );\n\n\t\tsubmit_button();\n\n\t\techo '<div class=\"clear\"></div>';\n\n\t}", "function _bellcom_collect_theme_settings() {\n $settings = array();\n\n // Contact information\n $settings['contact_information']['business_owner_name'] = theme_get_setting('business_owner_name');\n $settings['contact_information']['business_startup_year'] = theme_get_setting('business_startup_year');\n $settings['contact_information']['address'] = theme_get_setting('address');\n $settings['contact_information']['zipcode'] = theme_get_setting('zipcode');\n $settings['contact_information']['city'] = theme_get_setting('city');\n $settings['contact_information']['phone_system'] = theme_get_setting('phone_system');\n $settings['contact_information']['phone_readable'] = theme_get_setting('phone_readable');\n $settings['contact_information']['email'] = theme_get_setting('email');\n $settings['contact_information']['working_hours'] = theme_get_setting('working_hours');\n\n // Social links\n $settings['social_links']['facebook']['active'] = theme_get_setting('facebook');\n $settings['social_links']['facebook']['url'] = theme_get_setting('facebook_url');\n $settings['social_links']['facebook']['tooltip'] = t(theme_get_setting('facebook_tooltip'));\n $settings['social_links']['twitter']['active'] = theme_get_setting('twitter');\n $settings['social_links']['twitter']['url'] = theme_get_setting('twitter_url');\n $settings['social_links']['twitter']['tooltip'] = t(theme_get_setting('twitter_tooltip'));\n $settings['social_links']['googleplus']['active'] = theme_get_setting('googleplus');\n $settings['social_links']['googleplus']['url'] = theme_get_setting('googleplus_url');\n $settings['social_links']['googleplus']['tooltip'] = t(theme_get_setting('googleplus_tooltip'));\n $settings['social_links']['instagram']['active'] = theme_get_setting('instagram');\n $settings['social_links']['instagram']['url'] = theme_get_setting('instagram_url');\n $settings['social_links']['instagram']['tooltip'] = t(theme_get_setting('instagram_tooltip'));\n $settings['social_links']['linkedin']['active'] = theme_get_setting('linkedin');\n $settings['social_links']['linkedin']['url'] = theme_get_setting('linkedin_url');\n $settings['social_links']['linkedin']['tooltip'] = t(theme_get_setting('linkedin_tooltip'));\n $settings['social_links']['pinterest']['active'] = theme_get_setting('pinterest');\n $settings['social_links']['pinterest']['url'] = theme_get_setting('pinterest_url');\n $settings['social_links']['pinterest']['tooltip'] = t(theme_get_setting('pinterest_tooltip'));\n $settings['social_links']['vimeo']['active'] = theme_get_setting('vimeo');\n $settings['social_links']['vimeo']['url'] = theme_get_setting('vimeo_url');\n $settings['social_links']['vimeo']['tooltip'] = t(theme_get_setting('vimeo_tooltip'));\n $settings['social_links']['youtube']['active'] = theme_get_setting('youtube');\n $settings['social_links']['youtube']['url'] = theme_get_setting('youtube_url');\n $settings['social_links']['youtube']['tooltip'] = t(theme_get_setting('youtube_tooltip'));\n\n // Layout\n $settings['layout']['copyright'] = ($settings['contact_information']['business_startup_year'] < date('Y') AND $settings['contact_information']['business_startup_year'] !== NULL) ? $settings['contact_information']['business_startup_year'] . '-' . date('Y') : date('Y');\n $settings['layout']['footer']['show_social_links'] = theme_get_setting('footer_show_social_links');\n $settings['layout']['sidebar']['show_social_links'] = theme_get_setting('sidebar_show_social_links');\n\n return $settings;\n}", "public static function getPage()\n {\n ?>\n <div class=\"wrap\">\n <h2>LMS Settings</h2>\n <?php settings_errors(); ?>\n\n <?php\n $active_tab = 'mp-lms-header-options';\n if (isset($_GET['page']) && $_GET['page'] !== 'mp-lms-settings') {\n $active_tab = $_GET['page'];\n }\n ?>\n\n <h2 class=\"nav-tab-wrapper\">\n <a href=\"?page=mp-lms-header-options\" class=\"nav-tab <?php echo 'mp-lms-header-options' == $active_tab || 'mp-lms-settings' == $active_tab ? 'nav-tab-active' : '' ?>\">Header Options</a>\n <a href=\"?page=mp-lms-footer-options\" class=\"nav-tab <?php echo 'mp-lms-footer-options' == $active_tab ? 'nav-tab-active' : '' ?>\">Footer Options</a>\n </h2>\n\n <form action=\"options.php\" method=\"post\">\n <?php\n\n if ( 'mp-lms-header-options' == $active_tab )\n {\n // Render the settings for the header_section\n settings_fields('header_section');\n\n // Renders all of the settings for sections\n do_settings_sections('mp-lms-header-options');\n }\n\n if ( 'mp-lms-footer-options' == $active_tab )\n {\n // Render the settings for the header_section\n settings_fields('footer_section');\n\n // Renders all of the settings for sections\n do_settings_sections('mp-lms-footer-options');\n }\n\n // Add the submit button\n submit_button();\n\n ?>\n </form>\n </div>\n <?php\n }", "public function ajax_web_parser_setting_process() {\n if (!isset($_GET['product_id']) || !isset($_GET['product_group_id']) || !isset($_GET['store_id'])) {\n show_404();\n }\n\n $store = ManagerHolder::get('Store')->getById($_GET['store_id'], 'e.*');\n if (empty($store)) {\n die('ERROR');\n }\n\n $where = array_copy_by_keys($_GET, array('product_id', 'product_group_id', 'store_id'));\n if (empty($_GET['product_group_id']) || ($store['code'] == 'i-love-mum' || $store['code'] == 'White Rabbit')) {\n $where['product_group_id'] = NULL;\n }\n\n $setting = $where;\n $setting['url'] = $_POST['url'];\n\n $exists = ManagerHolder::get('StoreInventoryParserSetting')->existsWhere($where);\n if ($exists) {\n unset($setting['product_group_id']);\n ManagerHolder::get('StoreInventoryParserSetting')->updateAllWhere($where, $setting);\n } else {\n $dayAgo = date(DOCTRINE_DATE_FORMAT, 0);\n $setting['last_parse_at'] = $dayAgo;\n ManagerHolder::get('StoreInventoryParserSetting')->insert($setting);\n }\n\n die('Настройки сохранены');\n }", "public function render_settings_page()\n {\n }", "public function print_settings_section_info()\n {\n }", "function settings_page() { include($this->plugin_basename . '/core/admin/settings.php'); }", "public static function settings_url( $tab = 'permissions', $network = false, $blog_id = false, $page = 'beehive-settings' ) {\r\n\t\t// Get current blog id if empty.\r\n\t\tif ( ! $blog_id ) {\r\n\t\t\t$blog_id = get_current_blog_id();\r\n\t\t}\r\n\r\n\t\t// Get base url.\r\n\t\t$url = $network ? network_admin_url( 'admin.php' ) : get_admin_url( $blog_id, 'admin.php' );\r\n\r\n\t\t// Get page.\r\n\t\t$url = add_query_arg(\r\n\t\t\tarray(\r\n\t\t\t\t'page' => $page,\r\n\t\t\t),\r\n\t\t\t$url\r\n\t\t);\r\n\r\n\t\t// Append tab.\r\n\t\t$url = $url . '#/' . $tab;\r\n\r\n\t\t/**\r\n\t\t * Filter to modify main url used to build settings url\r\n\t\t *\r\n\t\t * @param string $url URL.\r\n\t\t * @param bool $network Network flag.\r\n\t\t * @param int $blog_id Blog ID.\r\n\t\t *\r\n\t\t * @since 3.2.2\r\n\t\t */\r\n\t\treturn apply_filters( 'beehive_settings_main_url', $url, $network, $blog_id );\r\n\t}", "public function settings()\n {\n $result = $this->dtbs->list('site_settings');\n $data['info'] = $result;\n $this->load->view('back/settings/anasehife',$data);\n }", "function common_get_network_config($net){\r\n\t$file = '/etc/network/interfaces';\r\n\t$curr = file_get_contents($file);\r\n\tif($net == 'ip'){\t\t\r\n\t\t$curr_ip = explode('#ip',$curr);\r\n\t\t$curr_ip = $curr_ip[1];\r\n\t\t$curr_ip = explode(' ', $curr_ip);\r\n\t\t$curr_ip = trim($curr_ip[1]);\r\n\t\t\r\n\t\treturn $curr_ip;\r\n\t}\r\n\telse if($net == 'subnet'){\r\n\t\t$curr_subnet = explode('#subnet',$curr);\r\n\t\t$curr_subnet = $curr_subnet[1];\r\n\t\t$curr_subnet= explode(' ', $curr_subnet);\r\n\t\t$curr_subnet = trim($curr_subnet[1]);\r\n\t\t\r\n\t\treturn $curr_subnet;\r\n\t}\r\n\telse if($net == 'gw'){\r\n\t\t$curr_gw = explode('#gw',$curr);\r\n\t\t$curr_gw = $curr_gw[1];\r\n\t\t$curr_gw= explode(' ', $curr_gw);\r\n\t\t$curr_gw = trim($curr_gw[1]);\r\n\t\t\r\n\t\treturn $curr_gw;\r\n\t}\r\n\telse if($net == 'dns'){\r\n\t\t$curr_dns = explode('#dns',$curr);\r\n\t\t$curr_dns = $curr_dns[1];\r\n\t\t$curr_dns= explode(' ', $curr_dns);\r\n\t\t$curr_dns = trim($curr_dns[1]);\r\n\t\t\r\n\t\treturn $curr_dns;\r\n\t}\t\r\n\t\r\n\treturn null;\r\n}", "function achilles_settings_init() {\n\t\n\t//create one option to store all of our values. \n register_setting( 'achilles-settings-group', 'achilles-settings' );\n add_settings_section( 'achilles-general-settings', 'General Settings', 'achilles_general_settings_callback', 'achilles' );\n add_settings_field('resident-portal', 'Resident Portal URL', 'resident_portal_url_callback', 'achilles', 'achilles-general-settings');\n add_settings_field('facebook-url', 'Facebook URL', 'facebook_url_callback', 'achilles', 'achilles-general-settings' );\n add_settings_field('google-analytics-id', 'Google Analytics ID', 'google_analytics_id_callback', 'achilles', 'achilles-general-settings');\n\t\n}", "abstract protected function loadSettings();", "public static function parse() {\n\t\t/* Grab the base URL from the Site class */\n\t\t$baseurl = parse_url( Config::instance()->get('baseurl') );\n\t\t$baseurl = $baseurl['path'];\n\n\t\t/* Start with the entire URL coming from web server... */\n\t\tif(isset($_SERVER['REQUEST_URI']))\n\t\t\t$request = str_replace('?' . $_SERVER['QUERY_STRING'], '', $_SERVER['REQUEST_URI']);\n\t\telse\n\t\t\t$request = $_SERVER['SCRIPT_NAME'] . ( isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '' );\n\n\t\t/* Strip out the base URL from the requested URL */\n\t\t/* but only if the base URL isn't / */\n\t\tif ( '/' != $baseurl ) {\n\t\t\t$request = str_replace($baseurl, '', $request);\n\t\t}\n\n\t\t$request = trim($request, '/');\n\t\tself::$request = $request;\n\t}", "private function settings()\n\t{\n\t\tif($_POST)\n\t\t{\n\t\t\t// Available Vews\n config::set('s7n.views', $this->input->post('views'));\n\n\t\t\t// Default Sidebar Title\n config::set('s7n.default_sidebar_title', $this->input->post('default_sidebar_title'));\n\n\t\t\t// Default Sidebar Content\n config::set('s7n.default_sidebar_content', $this->input->post('default_sidebar_content'));\n\n\t\t\tmessage::info(__('Page Settings edited successfully'), 'admin/page/settings');\n\t\t}\n\n\t\t$this->head->title->append(__('Settings'));\n\n\t\t$this->template->title .= __('Settings');\n\t\t$this->template->content = View::factory('page/settings', array(\n\t\t\t'views' => config::get('s7n.page_views'),\n\t\t\t'default_sidebar_title' => config::get('s7n.default_sidebar_title'),\n\t\t\t'default_sidebar_content' => config::get('s7n.default_sidebar_content')\n\t\t));\n\t}", "public function settings_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1><?= $this::$name; ?> Settings Page</h1>\n\t\t\t\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "function getSettingsList(){\n\t\treturn array(\n\t\t'institute_name',\n\t\t'institute_phone',\n\t\t'institute_address',\n\t\t'email',\n\t\t'notifications',\n\t\t'facebook_url',\n\t\t'linkedin_url',\n\t\t'twitter_url',\n\t\t'youtube_url',\n\t\t'copyright',\n\t\t'metatags'\n\t\t);\n\t}", "function network_settings_add_js()\n {\n }", "function settings_init()\n\t{\n\t\t//-----------------------------------------\n\t\t// Load the settings lib\n\t\t//-----------------------------------------\n\t\t\n\t\t$settings = $this->ipsclass->load_class( ROOT_PATH.'sources/action_admin/settings.php', 'ad_settings' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Have we created this setting group yet?\n\t\t//-----------------------------------------\n\t\t\n\t\t$group = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'conf_title_id', 'from' => 'conf_settings_titles', 'where' => \"conf_title_keyword='umi'\" ) );\n\t\t\n\t\tif ( !$group['conf_title_id'] )\n\t\t{\n\t\t\t$this->ipsclass->DB->do_insert( 'conf_settings_titles', array( 'conf_title_title' => 'Universal Mod Installer',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conf_title_desc' => 'Install and manage all compatible mods',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conf_title_count' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conf_title_noshow' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conf_title_keyword' => 'umi',\n\t\t\t\t\t\t\t\t\t\t )\t\t\t\t\t\t\t\t );\n\t\t\t\n\t\t\t$group['conf_title_id'] = $this->ipsclass->DB->get_insert_id();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Define our settings\n\t\t//-----------------------------------------\n\t\t\n\t\t$umi_settings = array( 'umi_mods_perpage' => array( 'conf_title' => 'Number of mods to display per page',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_description' => 'How many mods do you want to display per page on the mods list?',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_type' => 'input',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_default' => 10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_extra' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_evalphp' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_position' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_start_group' => 'Universal Mod Installer settings',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_end_group' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_help_key' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t 'umi_do_callbacks' => array( 'conf_title' => 'Use the \\'callback\\' functions?',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_description' => 'These functions can help ensure your mods are up to date, but not all hosts allow them to work.',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_type' => 'yes_no',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_default' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_extra' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_evalphp' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_position' => 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_start_group' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_end_group' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_help_key' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t 'umi_skin_recache' => array( 'conf_title' => 'Recache skins automatically?',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_description' => 'If any templates are added, should the skin be automatically recached? Turn this off if installing a mod exhausts your memory at this point.',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_type' => 'yes_no',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_default' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_extra' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_evalphp' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_position' => 3,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_start_group' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_end_group' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conf_help_key' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Ensure the settings have been created\n\t\t//-----------------------------------------\n\t\t\n\t\t$cnt = 0;\n\t\t\n\t\tforeach ( $umi_settings as $key => $value )\n\t\t{\n\t\t\tif ( !isset( $this->ipsclass->vars[ $key ] ) )\n\t\t\t{\n\t\t\t\t$cnt++;\n\t\t\t\t\n\t\t\t\t$insert = array( 'conf_title' => $value['conf_title'],\n\t\t\t\t\t\t\t\t 'conf_description' => $value['conf_description'],\n\t\t\t\t\t\t\t\t 'conf_group' => $group['conf_title_id'],\n\t\t\t\t\t\t\t\t 'conf_type' => $value['conf_type'],\n\t\t\t\t\t\t\t\t 'conf_key' => $key,\n\t\t\t\t\t\t\t\t 'conf_default' => $value['conf_default'],\n\t\t\t\t\t\t\t\t 'conf_extra' => $value['conf_extra'],\n\t\t\t\t\t\t\t\t 'conf_evalphp' => $value['conf_evalphp'],\n\t\t\t\t\t\t\t\t 'conf_protected' => 1,\n\t\t\t\t\t\t\t\t 'conf_position' => $value['conf_position'],\n\t\t\t\t\t\t\t\t 'conf_start_group' => $value['conf_start_group'],\n\t\t\t\t\t\t\t\t 'conf_end_group' => $value['conf_end_group'],\n\t\t\t\t\t\t\t\t 'conf_help_key' => $value['conf_help_key'],\n\t\t\t\t\t\t\t\t 'conf_add_cache' => 1,\n\t\t\t\t\t\t\t );\n\t\t\t\t\n\t\t\t\tif ( !$this->ipsclass->DB->field_exists( 'conf_help_key', 'conf_settings' ) )\n\t\t\t\t{\n\t\t\t\t\tunset( $insert['conf_help_key'] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->do_insert( 'conf_settings', $insert );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Recache, if needed\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $cnt )\n\t\t{\n\t\t\t$settings->setting_rebuildcache();\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "function shibboleth_network_admin_panels() {\n\tif ( is_multisite() ) {\n\t\tadd_submenu_page( 'settings.php', __( 'Shibboleth Options', 'shibboleth' ), __( 'Shibboleth', 'shibboleth' ), 'manage_network_options', 'shibboleth-options', 'shibboleth_options_page' );\n\t}\n}", "public static function getNavConfig()\n {\n return [\n 'label' => 'networking',\n 'url' => ['/networking'],\n ];\n }" ]
[ "0.72646844", "0.65959096", "0.6171499", "0.58326817", "0.579032", "0.5725085", "0.5603935", "0.55970275", "0.5596541", "0.5585041", "0.5584309", "0.5565432", "0.5558386", "0.5545529", "0.5538863", "0.55284095", "0.5521502", "0.5463713", "0.5412116", "0.5400303", "0.5358372", "0.53555954", "0.53511256", "0.53447384", "0.5333591", "0.53177744", "0.53175175", "0.53163093", "0.5306315", "0.5297987", "0.5297837", "0.52926636", "0.52855164", "0.5282637", "0.5276114", "0.5274322", "0.5247466", "0.52298486", "0.52259237", "0.5222154", "0.5203215", "0.51872164", "0.518338", "0.5170237", "0.5158101", "0.5155111", "0.51499724", "0.51441514", "0.5136646", "0.5133067", "0.5118581", "0.51183146", "0.5099363", "0.5089224", "0.5086432", "0.50841707", "0.5081303", "0.50743926", "0.5074268", "0.5067451", "0.5065269", "0.5058632", "0.5052084", "0.5049235", "0.5033224", "0.50315243", "0.5029646", "0.502776", "0.5022209", "0.5020375", "0.5013441", "0.50133806", "0.50076044", "0.50020206", "0.49943736", "0.4991558", "0.49900067", "0.4987886", "0.49822497", "0.49813968", "0.49708828", "0.49648103", "0.49607334", "0.4956066", "0.49555025", "0.4955396", "0.4948966", "0.49470174", "0.49448428", "0.49405795", "0.49400234", "0.4939719", "0.4938467", "0.49370784", "0.49311742", "0.49297908", "0.49287626", "0.4923991", "0.49225438", "0.4920999", "0.49160776" ]
0.0
-1
DHCP server add subnet.
function add($iface) { $this->_add_edit($iface, 'add'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function networkAdd($ipvar, $subnet){\n\t\t# $octetbit array is used in computing on how many '1' bits are in a specific octet of the IP address\n\t\t$octetbit = [128, 64, 32, 16, 8, 4, 2, 1];\n\n\t\t#To check which octet is the subnet mask located(in terms of count of 8),\n \t#which will help in computing for the network address of the IP address\n\t\t$octetindex = floor((int)$subnet/8);\n\n\t #To check the bits that overflowed from the biggest 8 count from the previous variable\n\t #i.e. if the subnet is /25, 3 octets from the left are all 1s and in the 4th octet,\n\t #the first bit from the left is set to 1 while the rest are set to 0 \n\t\t$octetrem = (int)$subnet%8;\n\n\t\tif ($octetindex == 4)\n\t\t\treturn (implode(\".\", $ipvar));\n\n\t #modresult is to maintain count for which bits will be set to '1' to get the value\n\t #i.e. if the value is 3, then the 2nd bit from the right will be set to '1' and a value of\n\t #1 will remain, making the 1st bit from the right, be set to '1' as well for a total value of 3\n\t\t$modresult = (int)$ipvar[$octetindex];\n\t\t$netconstant = 0;\n\t\t$i = 0;\n\n\t\tif ($octetrem == 0)\n\t\t\tfor ($i = $octetindex; $i < 4; $i++ )\n\t\t\t\t$ipvar[$i] = \"0\";\n\n\t\telse if ($octetrem > 0){\n\t\t\twhile ($i < $octetrem){\n\t\t\t\tif ($modresult >= $octetbit[$i]){\n\t\t\t\t\t$netconstant += $octetbit[$i];\n\t\t\t\t\t$modresult = $modresult % $octetbit[$i];\n\t\t\t\t}\n\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\t$ipvar[$octetindex] = (string)$netconstant;\n\n\t\t\tfor($j = $octetindex+1; $j < 4; $j++)\n\t\t\t\t$ipvar[$j] = \"0\";\n\t\t}\n\n\t\t$netadd = implode(\".\", $ipvar);\n\n\t\treturn $netadd;\n\n\t}", "public static function addSubnet( $ip, $network, $expiration, $userID ){\n\t\t\tglobal $wpdb;\n\n\t\t\tif( is_multisite() ){\n\t\t\t\t$currentBlogID = get_current_blog_id();\n\n\t\t\t\tglobal $switched;\n\t\t\t\tswitch_to_blog(1);\n\n\t\t\t\t/*\n\t\t\t\t\tClenses and adds the IP\n\t\t\t\t\tto the database.\n\t\t\t\t*/\n\t\t\t\t$wpdb->query( $wpdb->prepare(\n\t\t\t\t\t\"INSERT INTO \".$wpdb->prefix.\"wps_subnets\n\t\t\t\t\t( blog_id, added_by, start_ip, subnet, expires )\n\t\t\t\t\tVALUES ( %d, %d, %s, %s, '\".$expiration.\"')\",\n\t\t\t\t\t$currentBlogID,\n\t\t\t\t\t$userID,\n\t\t\t\t\t$ip,\n\t\t\t\t\t$network\n\t\t\t\t) );\n\n\t\t\t\t$rangeID = $wpdb->insert_id;\n\n\t\t\t\trestore_current_blog();\n\t\t\t}else{\n\t\t\t\t/*\n\t\t\t\t\tClenses and adds the IP\n\t\t\t\t\tto the database.\n\t\t\t\t*/\n\t\t\t\t$wpdb->query( $wpdb->prepare(\n\t\t\t\t\t\"INSERT INTO \".$wpdb->prefix.\"wps_subnets\n\t\t\t\t\t( added_by, start_ip, subnet, expires )\n\t\t\t\t\tVALUES ( %d, %s, %s, '\".$expiration.\"')\",\n\t\t\t\t\t$userID,\n\t\t\t\t\t$ip,\n\t\t\t\t\t$network\n\t\t\t\t) );\n\n\t\t\t\t$rangeID = $wpdb->insert_id;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tReturns the newly added ID.\n\t\t\t*/\n\t\t\treturn $rangeID;\n\t\t}", "function addSubnet($addList){\n\t\t$subList = [];\n\n\t\tfor ($i = 0, $j = 8; $i < sizeof($addList), $j < 33; $i++, $j++){\n\t\t\t$address = $addList[$i] . \"/\" . $j;\n\t\t\t$subList[] = $address;\n\t\t}\n\n\t\treturn $subList;\n\t}", "function add_network_option($network_id, $option, $value)\n {\n }", "function subnet ($ip=NULL, $subnet=NULL)\n\t{\n\n\t\t// assign defaults\n\t\tif (is_null($ip))\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\n\t\t// default to REMOTE_ADDR\n\t\tif (!is_null($subnet))\n\t\t{\n\t\t\t$explodeip = explode('.', $ip);\n\t\t\t$subnetip = explode('.', substr($subnet, 0, strpos($subnet, '/')));\n\t\t\t$subnetmask = substr($subnet, strpos($subnet, '/') + 1);\n\t\t\tif ($subnetmask == 32)\n\t\t\t{\n\t\t\t\tif (substr($subnet, 0, strpos($subnet, '/')) == $ip)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} elseif ($subnetmask < 32 && $subnetmask >= 24)\n\t\t\t{\n\t\t\t\t$start = $subnetip[3];\n\t\t\t\t$check = 32;\n\t\t\t\t$top = 254;\n\t\t\t\t$checkip = $explodeip[3];\n\t\t\t} elseif ($subnetmask < 24 && $subnetmask >= 16)\n\t\t\t{\n\t\t\t\t$start = $subnetip[2];\n\t\t\t\t$check = 24;\n\t\t\t\t$top = 255;\n\t\t\t\t$checkip = $explodeip[2];\n\t\t\t} elseif ($subnetmask < 16 && $subnetmask >= 8)\n\t\t\t{\n\t\t\t\t$start = $subnetip[1];\n\t\t\t\t$check = 16;\n\t\t\t\t$top = 255;\n\t\t\t\t$checkip = $explodeip[1];\n\t\t\t} elseif ($subnetmask < 8)\n\t\t\t{\n\t\t\t\t$start = $subnetip[0];\n\t\t\t\t$check = 8;\n\t\t\t\t$top = 254;\n\t\t\t\t$checkip = $explodeip[0];\n\t\t\t}\n\t\t\t$end = $start + pow(2, ($check - $subnetmask));\n\t\t\tif ($end > $top) $end = $top;\n\t\t\tif ($checkip >= $start && $checkip <= $end)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t\t\n\t\t} else {\t\t\t\t\n\t\t\t\t\n\t\t\t// wow hard\n\t\t\t$subnet = substr($ip, 0, strrpos($ip, '.')).\".0/24\";\n\t\n\t\t\treturn $subnet;\n\t\t}\n\t}", "function is_subnet($subnet) {\n\tif (!is_string($subnet))\n\treturn false;\n\n\tlist($hp,$np) = explode('/', $subnet);\n\n\tif (!is_ipaddr($hp))\n\treturn false;\n\n\tif (!is_numeric($np) || ($np < 1) || ($np > 32))\n\treturn false;\n\n\treturn true;\n}", "protected function validateAndAddIp(string $ip): void\n {\n $ip = trim($ip);\n\n if (empty($ip)) {\n return;\n }\n\n // Split IP and subnet if needed\n if (strpos($ip, '/') !== false) {\n [$ip, $subnet] = explode('/', $ip, 2);\n } else {\n $subnet = false;\n }\n\n // If IPv6, subnet 128 can be omitted\n if ($subnet === '128' && filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {\n $subnet = false;\n }\n\n // If IPv4, subnet 32 can be omitted\n if ($subnet === '32' && filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $subnet = false;\n }\n\n // Compress and validate IP-address\n $ipBin = inet_pton($ip);\n\n if ($ipBin === false) {\n $this->logWarn(\"Invalid IP address: '{$ip}'\");\n\n return;\n }\n\n $ip = inet_ntop($ipBin);\n\n if ($ip === false) {\n $this->logWarn(\"Invalid IP address: '{$ip}'\");\n\n return;\n }\n\n // Add back subnet to the IP\n $ip .= ($subnet !== false ? '/' . $subnet : '');\n\n $this->list[] = $ip;\n }", "public static function checkIPSubnet( $ipAddress ){\n\t\t\tglobal $wpdb;\n\n\t\t\t/*\n\t\t\t\tGrabs allowed subnets from the \n\t\t\t\tcurrent blog.\n\t\t\t*/\n\t\t\tif( is_multisite() ){\n\t\t\t\t$currentBlogID = get_current_blog_id();\n\n\t\t\t\tglobal $switched;\n\t\t\t\tswitch_to_blog(1);\n\n\t\t\t\t$subnets = $wpdb->get_results( $wpdb->prepare(\n\t\t\t\t\t\"SELECT *\n\t\t\t\t\t FROM \".$wpdb->prefix.\"wps_subnets\n\t\t\t\t\t WHERE blog_id = '%d'\",\n\t\t\t\t\t $currentBlogID\n\t\t\t\t), ARRAY_A );\n\n\t\t\t\trestore_current_blog();\n\t\t\t}else{\n\t\t\t\t$subnets = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.\"wps_subnets\", ARRAY_A );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tIterates through subnets and checks to see\n\t\t\t\tif the IP address is within the range.\n\t\t\t*/\n\t\t\tforeach( $subnets as $subnet ){\n\t\t\t\t$subnetParts \t= explode( '.', $subnet['start_ip'] );\n\n\t\t\t\t$firstOctet \t= $subnetParts[0];\n\t\t\t\t$secondOctet \t= $subnetParts[1];\n\t\t\t\t$thirdOctet \t= $subnetParts[2];\n\t\t\t\t$fourthOctet \t= $subnetParts[3];\n\n\t\t\t\t$newFirstOctet \t= '';\n\t\t\t\t$newSecondOctet\t= '';\n\t\t\t\t$newThirdOctet \t= '';\n\t\t\t\t$newFourthOctet = '';\n\n\t\t\t\t/*\n\t\t\t\t\tChecks from the largest networks\n\t\t\t\t\tfirst down to the smallest.\n\t\t\t\t*/\n\t\t\t\tif( $subnet['subnet'] <= 8 ){\n\t\t\t\t\tif( ( $firstOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newFirstOctet = 255;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFirstOctet = $firstOctet + $subnet['subnet'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$min \t= ip2long( $subnet['start_ip'] );\n\t\t\t\t\t$max \t= ip2long( $newFirstOctet.'.255.255.254' );\n\t\t\t\t\t$needle = ip2long( $ipAddress );\n\n\t\t\t\t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else if( ( $subnet['subnet'] > 8 ) && ( $subnet['subnet'] <= 16 ) ){\n\t\t\t\t\tif( ( $secondOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newScondOctet = ( $secondOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newFirstOctet = $firstOctet + 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFirstOctet = $firstOctet;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet + $subnet['subnet'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t\t\t\t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t\t\t\t\t$needle = ip2long( $ipAddress ); \n\n\t\t\t\t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else if( ( $subnet['subnet'] > 16 ) && ( $subnet['subnet'] <= 24 ) ){\n\t\t\t\t\tif( ( $thirdOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newThirdOctet \t= ( $thirdOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet + 1;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet + $subnet['subnet'];\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t \t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t \t\t$needle = ip2long( $ipAddress ); \n\n\t \t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t \t\t\treturn true;\n\t \t\t}\n\t\t\t\t}else if( $subnet['subnet'] > 24 ){\n\t\t\t\t\tif( ( $fourthOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newFourthOctet = ( $fourthOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet + 1;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFourthOctet = $fourthOctet + $subnet['subnet'];\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t \t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t \t\t$needle = ip2long( $ipAddress ); \n\n\t \t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t \t\t\treturn true;\n\t \t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tOnly reachable if nothing was returned\n\t\t\t\tmeaning that the IP is NOT in the subnet.\n\t\t\t*/\n\t\t\treturn false;\n\t\t}", "function _add_edit($iface, $form_type)\n {\n // Load libraries\n //---------------\n\n $this->load->library('dhcp/Dnsmasq');\n $this->lang->load('dhcp');\n\n // Set validation rules\n //---------------------\n\n $this->load->library('form_validation');\n $this->form_validation->set_policy('gateway', 'dhcp/Dnsmasq', 'validate_gateway', TRUE);\n $this->form_validation->set_policy('lease_time', 'dhcp/Dnsmasq', 'validate_lease_time', TRUE);\n $this->form_validation->set_policy('start', 'dhcp/Dnsmasq', 'validate_start_ip', TRUE);\n $this->form_validation->set_policy('end', 'dhcp/Dnsmasq', 'validate_end_ip', TRUE);\n $this->form_validation->set_policy('dns1', 'dhcp/Dnsmasq', 'validate_dns_server');\n $this->form_validation->set_policy('dns2', 'dhcp/Dnsmasq', 'validate_dns_server');\n $this->form_validation->set_policy('dns3', 'dhcp/Dnsmasq', 'validate_dns_server');\n $this->form_validation->set_policy('wins', 'dhcp/Dnsmasq', 'validate_wins_server');\n $this->form_validation->set_policy('tftp', 'dhcp/Dnsmasq', 'validate_tftp_server');\n $this->form_validation->set_policy('ntp', 'dhcp/Dnsmasq', 'validate_ntp_server');\n $this->form_validation->set_policy('wpad', 'dhcp/Dnsmasq', 'validate_wpad_server');\n $form_ok = $this->form_validation->run();\n\n // Handle form submit\n //-------------------\n\n if ($this->input->post('submit') && ($form_ok === TRUE)) {\n $subnet['interface'] = $this->input->post('interface');\n $subnet['network'] = $this->input->post('network');\n $subnet['gateway'] = $this->input->post('gateway');\n $subnet['start'] = $this->input->post('start');\n $subnet['end'] = $this->input->post('end');\n $subnet['wins'] = $this->input->post('wins');\n $subnet['tftp'] = $this->input->post('tftp');\n $subnet['ntp'] = $this->input->post('ntp');\n $subnet['wpad'] = $this->input->post('wpad');\n $subnet['lease_time'] = $this->input->post('lease_time');\n $subnet['dns'] = array(\n $this->input->post('dns1'),\n $this->input->post('dns2'),\n $this->input->post('dns3'),\n );\n\n try {\n if ($form_type === 'add') {\n $this->dnsmasq->add_subnet(\n $subnet['interface'],\n $subnet['start'],\n $subnet['end'],\n $subnet['lease_time'],\n $subnet['gateway'],\n $subnet['dns'],\n $subnet['wins'],\n $subnet['tftp'],\n $subnet['ntp'],\n $subnet['wpad']\n );\n\n } else {\n $this->dnsmasq->update_subnet(\n $iface,\n $subnet['start'],\n $subnet['end'],\n $subnet['lease_time'],\n $subnet['gateway'],\n $subnet['dns'],\n $subnet['wins'],\n $subnet['tftp'],\n $subnet['ntp'],\n $subnet['wpad']\n );\n }\n\n // Do a full restart for DHCP\n $this->dnsmasq->restart(TRUE);\n\n // Return to summary page with status message\n $this->page->set_status_added();\n redirect('/dhcp/subnets');\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return;\n }\n }\n\n // Load the view data \n //------------------- \n\n try {\n if ($form_type === 'add') \n $subnet = $this->dnsmasq->get_subnet_default($iface);\n else\n $subnet = $this->dnsmasq->get_subnet($iface);\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return;\n }\n\n $data['form_type'] = $form_type;\n\n $data['interface'] = $iface;\n $data['network'] = (isset($subnet['network'])) ? $subnet['network'] : '';\n $data['gateway'] = (isset($subnet['gateway'])) ? $subnet['gateway'] : '';\n $data['start'] = (isset($subnet['start'])) ? $subnet['start'] : '';\n $data['end'] = (isset($subnet['end'])) ? $subnet['end'] : '';\n $data['dns'] = (isset($subnet['dns'])) ? $subnet['dns'] : '';\n $data['wins'] = (isset($subnet['wins'])) ? $subnet['wins'] : '';\n $data['tftp'] = (isset($subnet['tftp'])) ? $subnet['tftp'] : '';\n $data['ntp'] = (isset($subnet['ntp'])) ? $subnet['ntp'] : '';\n $data['wpad'] = (isset($subnet['wpad'])) ? $subnet['wpad'] : '';\n $data['lease_time'] = (isset($subnet['lease_time'])) ? $subnet['lease_time'] : '';\n\n $data['lease_times'] = array();\n $data['lease_times'][1] = 1 . \" \" . lang('base_hour');\n $data['lease_times'][2] = 2 . \" \" . lang('base_hours');\n $data['lease_times'][4] = 4 . \" \" . lang('base_hours');\n $data['lease_times'][6] = 6 . \" \" . lang('base_hours');\n $data['lease_times'][12] = 12 . \" \" . lang('base_hours');\n $data['lease_times'][24] = 24 . \" \" . lang('base_hours');\n $data['lease_times'][48] = 2 . \" \" . lang('base_days');\n $data['lease_times'][72] = 3 . \" \" . lang('base_days');\n $data['lease_times'][96] = 4 . \" \" . lang('base_days');\n $data['lease_times'][120] = 5 . \" \" . lang('base_days');\n $data['lease_times'][144] = 6 . \" \" . lang('base_days');\n $data['lease_times'][168] = 7 . \" \" . lang('base_days');\n $data['lease_times'][336] = 2 . \" \" . lang('base_weeks');\n $data['lease_times'][504] = 3 . \" \" . lang('base_weeks');\n $data['lease_times'][672] = 4 . \" \" . lang('base_weeks');\n $data['lease_times'][\\clearos\\apps\\dhcp\\Dnsmasq::CONSTANT_UNLIMITED_LEASE] = lang('base_unlimited');\n \n // Load the views\n //---------------\n\n $this->page->view_form('dhcp/subnets/add_edit', $data, lang('dhcp_subnets'));\n }", "public function enableDHCP() {\r\n\t\t/* fire up dhclient */\r\n\t\tFunctions::shellCommand ( \"/sbin/dhclient -c /var/etc/dhclient_\" . ( string ) $this->data->if . \".conf \" . ( string ) $this->data->if . \" >/tmp/\" . ( string ) $this->data->if . \"_output >/tmp/\" . ( string ) $this->data->if . \"_error_output\" );\r\n\t}", "public function add($param)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand(\"/ip/address/add\");\n foreach ($param as $name => $value) {\n $sentence->setAttribute($name, $value);\n }\n $this->talker->send($sentence);\n return \"Sucsess\";\n }", "public function getSubnetId()\n {\n return $this->subnet_id;\n }", "function gen_subnet($ipaddr, $bits) {\n\tif (!is_ipaddr($ipaddr) || !is_numeric($bits))\n\treturn \"\";\n\n\treturn long2ip(ip2long($ipaddr) & gen_subnet_mask_long($bits));\n}", "public static function subnetContainsIP($subnet, $ip) {\n\t\tlist($network, $prefix) = array_pad(explode('/', $subnet, 2), 2, null);\n\t\t\n\t\tif (filter_var($network, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n\t\t\t// If no prefix was supplied, 32 is implied for IPv4\n\t\t\tif ($prefix === null) {\n\t\t\t\t$prefix = 32;\n\t\t\t}\n\t\t\t\n\t\t\t// Validate the IPv4 network prefix\n\t\t\tif ($prefix < 0 || $prefix > 32) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Increase the IPv4 network prefix to work in the IPv6 address space\n\t\t\t$prefix += 96;\n\t\t} else {\n\t\t\t// If no prefix was supplied, 128 is implied for IPv6\n\t\t\tif ($prefix === null) {\n\t\t\t\t$prefix = 128;\n\t\t\t}\n\t\t\t\n\t\t\t// Validate the IPv6 network prefix\n\t\t\tif ($prefix < 1 || $prefix > 128) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$bin_network = wfWAFUtils::substr(self::inet_pton($network), 0, ceil($prefix / 8));\n\t\t$bin_ip = wfWAFUtils::substr(self::inet_pton($ip), 0, ceil($prefix / 8));\n\t\tif ($prefix % 8 != 0) { //Adjust the last relevant character to fit the mask length since the character's bits are split over it\n\t\t\t$pos = intval($prefix / 8);\n\t\t\t$adjustment = chr(((0xff << (8 - ($prefix % 8))) & 0xff));\n\t\t\t$bin_network[$pos] = ($bin_network[$pos] & $adjustment);\n\t\t\t$bin_ip[$pos] = ($bin_ip[$pos] & $adjustment);\n\t\t}\n\t\t\n\t\treturn ($bin_network === $bin_ip);\n\t}", "function add_iptables($ip){\n\t$cmd_add_iptables = \"sudo iptables -t nat -I PREROUTING -s \".$ip.\" -p tcp -j ACCEPT\";\n\tshell_exec($cmd_add_iptables);\n}", "public function setSubnetId($var)\n {\n GPBUtil::checkString($var, True);\n $this->subnet_id = $var;\n\n return $this;\n }", "function validate_subnet($subnet) {\n\t\t\t$parts = explode(\"/\", $subnet);\n\t\t\tif (count($parts) != 2)\n\t\t\t\treturn false;\n\n\t\t\tif (!IPv6::validate_ip($parts[0]) || !IPv6::validate_cidr($parts[1]))\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}", "function convert_ip_to_network_format($ip, $subnet) {\n\t$ipsplit = explode('.', $ip);\n\t$string = $ipsplit[0] . \".\" . $ipsplit[1] . \".\" . $ipsplit[2] . \".0/\" . $subnet;\n\treturn $string;\n}", "public function configureDHCP() {\r\n\t\t$fd = fopen ( \"/var/etc/dhclient_\" . ( string ) $this->data->if . \".conf\", \"w\" );\r\n\t\tif (! $fd) {\r\n\t\t\t$this->logger->error ( \"Cannot open dhclient_\" . ( string ) $this->data->if . \".conf for writing.\\n\" );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (( string ) $this->data->dhcphostname != '') {\r\n\t\t\t$dhclientconf_hostname = \"send dhcp-client-identifier \\\"\" . ( string ) $this->data->dhcpdhostname . \"\\\";\\n\";\r\n\t\t\t$dhclientconf_hostname .= \"\\tsend host-name \\\"\" . ( string ) $this->data->dhcpdhostname . \"\\\";\\n\";\r\n\t\t} else {\r\n\t\t\t$dhclientconf_hostname = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t$dhclientconf = \"\";\r\n\t\t\r\n\t\t$dhclientconf .= \"timeout 60;\\n\n\t\tretry 1;\\n\n\t\tselect-timeout 0;\\n\n\t\tinitial-interval 1;\\n\n\t\tinterface \\\"\" . ( string ) $this->data->interface . \"\\\" {\\n\n\t\t\t{$dhclientconf_hostname}\\n\n\t\t\tscript \\\"/sbin/dhclient-script\\\";\\n\n\t\t}\";\r\n\t\t\r\n\t\tfwrite ( $fd, $dhclientconf );\r\n\t\tfclose ( $fd );\r\n\t\treturn true;\r\n\t}", "function check_subnet($ip, $network, $netmask) {\n\t$network_long = ip2long($network);\n\t$mask_long = ip2long($netmask);\n\t$ip_long = ip2long($ip);\n\n\t// Remove the host part of the addresses.\n\t$network_net_long = $network_long & $mask_long;\n\t$ip_net_long = $ip_long & $mask_long;\n\n\t// If the network parts are equal, return true.\n\treturn ($network_net_long === $ip_net_long);\n}", "public function addNameserverIp(string $ip): bool {}", "function ip_in_range($ip, $range) {\r\n if (strpos($ip, '.') !== false) { // regular IPv4\r\n if (strpos($range, '/') !== false) {\r\n // $range is in IP/NETMASK format\r\n list($range, $netmask) = explode('/', $range, 2);\r\n if (strpos($netmask, '.') !== false) {\r\n // $netmask is a 255.255.0.0 format, or 255.*\r\n $nets = explode('.', $netmask);\r\n while(count($nets) < 4) $nets[] = '*';\r\n $netmask = implode('.', $nets);\r\n // by now we have ensured that we have 4 octets of the netmask a.b.c.d\r\n $netmask = str_replace('*', '0', $netmask);\r\n $netmask_dec = ip2float($netmask);\r\n#printf(\"%-10s: %s\\n\", \"Netmask\", $netmask);\r\n#printf(\"%-10s: %-032b\\n\", \"Netmaskbin\", $netmask_dec);\r\n\r\n } else {\r\n // $netmask is a CIDR size block\r\n // fix the range argument\r\n $x = explode('.', $range);\r\n while(count($x)<4) $x[] = '0';\r\n #list($a,$b,$c,$d) = $x;\r\n #$range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\r\n $range = implode('.', $x);\r\n\r\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\r\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\r\n\r\n # Strategy 2 - Use math to create it\r\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\r\n $netmask_dec = ~ $wildcard_dec;\r\n $netmask_dec = (float)(pow(2,32) - pow(2, (32-$netmask)));\r\n\r\n }\r\n#printf(\"%-10s: %s\\n\", \"IP\", $ip);\r\n#printf(\"%-10s: %-032b\\n\", \"IPbin\", ip2float($ip));\r\n#printf(\"%-10s: %s\\n\", \"Range\", $range);\r\n#printf(\"%-10s: %-032b\\n\", \"Rangebin\", ip2float($range));\r\n#printf(\"%-10s: %-032b\\n\", \"Netmask\", $netmask_dec);\r\n# $a = float_and(ip2float($ip), $netmask_dec);\r\n# $b = float_and(ip2float($range), $netmask_dec);\r\n#printf(\"%-10s: %-032b\\n\", \"IP&MASK\", $a);\r\n#printf(\"%-10s: %-032b\\n\", \"Range&MASK\", $b);\r\n return ( float_and(ip2float($ip), $netmask_dec) == float_and(ip2float($range), $netmask_dec) );\r\n } else {\r\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\r\n if (strpos($range, '*') !==false) { // a.b.*.* format\r\n // Just convert to A-B format by setting * to 0 for A and 255 for B\r\n $lower = str_replace('*', '0', $range);\r\n $upper = str_replace('*', '255', $range);\r\n $range = \"$lower-$upper\";\r\n }\r\n\r\n if (strpos($range, '-')!==false) { // A-B format\r\n list($lower, $upper) = explode('-', $range, 2);\r\n $lower_dec = ip2float($lower);\r\n $upper_dec = ip2float($upper);\r\n $ip_dec = ip2float($ip);\r\n return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\r\n }\r\n\r\n echo 'Range argument is not in 1.2.3.4/24 or 1.2.3.4/255.255.255.0 format';\r\n return false;\r\n }\r\n }\r\n if (strpos($ip, ':') !== false) { // IPv6\r\n ini_set(\"display_errors\", 1);\r\n error_reporting(E_ALL);\r\n // Parse out the $range\r\n if (strpos($range, '/') !== false) {\r\n // $range is in IPv6/NETMASK format\r\n list($range, $netbits) = explode('/', $range, 2);\r\n $netmask_binstr = str_pad('', $netbits, '1') . str_pad('', 128-$netbits, '0');\r\n }\r\n if (preg_match('/::$/', $range)) {\r\n $range = preg_replace('/::$/', '', $range);\r\n $x = explode(':', $range);\r\n while(count($x) < 8) $x[] = '0';\r\n $range = implode(':', $x);\r\n }\r\n return ( largearray_and(ip6floatA($ip), largebin2floatA($netmask_binstr)) == largearray_and(ip6floatA($range), largebin2floatA($netmask_binstr)) );\r\n }\r\n\r\n}", "function ip_in_subnet($addr,$subnet) {\n\tlist($ip, $mask) = explode('/', $subnet);\n\t$mask = 0xffffffff << (32 - $mask);\n\treturn ((ip2long($addr) & $mask) == (ip2long($ip) & $mask));\n}", "private function addTunnel(){\n\t\t$this->validateTunnelForm();\n\t\t\n\t\t$newtunnel = $this->data->tunnels->addChild('tunnel');\n\t\t$newtunnel->addAttribute('id',time());\n\t\t$newtunnel->addAttribute('enable','true');\n\t\t$newtunnel->addChild('description',htmlentities($_POST['services_ipsec_tunnel_descr']));\n\t\t$local = $newtunnel->addChild('local');\n\t\t$local->addChild('public_ip',$_POST['services_ipsec_tunnel_local_gateway']);\n\t\t$local->addChild('type',$_POST['services_ipsec_tunnel_local_subnet_type']);\n\t\tif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'ipaddr' \n\t\t\t|| $_POST['services_ipsec_tunnel_local_subnet_type'] == 'network'){\n\t\t\t$local->addChild('private_ip',$_POST['services_ipsec_tunnel_local_subnet_ipaddr']);\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'network'){\n\t\t\t$local->addChild('private_subnet',$_POST['services_ipsec_tunnel_local_subnet_subnet']);\n\t\t}\n\t\t\n\t\t$remote = $newtunnel->addChild('remote');\n\t\t$remote->addChild('public_ip',$_POST['services_ipsec_tunnel_remote_gateway']);\n\t\t$remote->addChild('type',$_POST['services_ipsec_tunnel_remote_subnet_type']);\n\t\tif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'ipaddr' \n\t\t\t|| $_POST['services_ipsec_tunnel_remote_subnet_type'] == 'network'){\n\t\t\t$remote->addChild('private_ip',$_POST['services_ipsec_tunnel_remote_subnet_ipaddr']);\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'network'){\n\t\t\t$remote->addChild('private_subnet',$_POST['services_ipsec_tunnel_remote_subnet_subnet']);\n\t\t}\n\t\t\n\t\t$keepalive = $remote->addChild('keepalive');\n\t\t$keepalive->addAttribute('enable','false');\n\t\tif($_POST['services_ipsec_tunnel_send_keepalive'] == 'true'){\n\t\t\t$keepalive = $_POST['services_ipsec_tunnel_keepalive_ipaddr'];\n\t\t\t$keepalive['enable'] = 'true';\t\n\t\t}\n\t\t\n\t\t$phase1 = $newtunnel->addChild('phase1');\n\t\t$phase1->addChild('mode',$_POST['services_ipsec_tunnel_phase1_negotiation_mode']);\n\t\t$identifier = $phase1->addChild('identifier');\n\t\t$identifier->addAttribute('type',$_POST['services_ipsec_tunnel_p1_id_type']);\n\t\t$identifier = $_POST['services_ipsec_tunnel_p1_id'];\n\t\t\n\t\t//\tCreate array with all supported encryption algorithms\n\t\t$algs = array('des','3des','blowfish','cast128','aes','aes256');\n\t\tforeach($algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p1_encryption_alg_'.$alg] == 'true'){\n\t\t\t\t$encryption_array[] = $alg;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t// \tCreate array with all supported hash algorithms\n\t\t$hash_algs = array('md5','sha1');\n\t\tforeach($hash_algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p1_hashing_alg_'.$alg] == 'true'){\n\t\t\t\t$hash_array[] = $alg;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//\timplode the two arrays into a single string and dump into the XML\n\t\t$phase1->addChild('encryption-algorithm',implode('|',$encryption_array));\n\t\t$phase1->addChild('hash-algorithm',implode('|',$hash_array));\n\t\t\n\t\t$phase1->addChild('dhgroup',$_POST['services_ipsec_tunnel_p1_dh_keygroup']);\n\t\t$phase1->addChild('lifetime',$_POST['services_ipsec_tunnel_p1_lifetime']);\n\t\t\n\t\t$auth_method = $phase1->addChild('authentication-method');\n\t\t$auth_method->addAttribute('type',$_POST['services_ipsec_tunnel_p1_auth_method']);\n\t\tif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'psk'){\n\t\t\t$auth_method = $_POST['services_ipsec_tunnel_p1_preshared_key'];\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'rsasig'){\n\t\t\t$auth_method = $_POST['services_ipsec_tunnel_p1_rsa_sig'];\n\t\t}\n\t\t\n\t\t$phase2 = $newtunnel->addChild('phase2');\n\t\t$phase2->addChild('protocol',$_POST['services_ipsec_tunnel_p2_protocol']);\n\t\t\n\t\t//\tCreate array with all supported encryption algorithms\n\t\t$algs = array('des','3des','blowfish','cast128','aes','aes256');\n\t\tforeach($algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p2_encryption_alg_'.$alg] == 'true'){\n\t\t\t\t$encryption_array[] = $alg;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t// \tCreate array with all supported authentication algorithms\n\t\t$auth_algs = array('des','3des','md5','sha1');\n\t\tforeach($auth_algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p2_hashing_alg_'.$alg] == 'true'){\n\t\t\t\t$auth_array[] = $alg;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//\timplode the two arrays into a single string and dump into the XML\n\t\t$phase2->addChild('encryption-algorithm',implode('|',$encryption_array));\n\t\t$phase2->addChild('authentication-algorithm',implode('|',$auth_array));\n\t\t$phase2->addChild('lifetime',$_POST['services_ipsec_tunnel_p2_lifetime']);\n\t\t$phase2->addChild('pfsgroup',$_POST['services_ipsec_tunnel_p2_pfs_keygroup']);\n\t\t\n\t\t\n\t\t$this->config->saveConfig();\n\t\techo '<reply action=\"ok\"><ipsec><tunnels>';\n\t\techo $newtunnel->asXML();\n\t\techo '</tunnels></ipsec></reply>';\n\t}", "public function addAddress($address);", "function addRvps()\n {\n $output = new stdClass();\n\n $db = new MySQL(DB_INFO);\n $table = 'ipt_networks';\n $where = 'status=1 AND server_nid='.$_POST['server'];\n $networks = $db->select($table, $where);\n\n $table = 'ipt_servers';\n $where = 'status=1 AND nid='.$_POST['server'];\n $output->res['server'] = $db->selectRow($where, null,$table);\n\n $table = 'fin_plans';\n $output->res['plan'] = $db->selectId($_POST['plan'],'*',$table);\n\n $table = 'fin_plan_limits';\n $where = \"plan_name='\".$output->res['plan']['plan_name'].\"'\";\n $output->res['limits'] = $db->selectRow($where, null,$table);\n\n $table = 'ipt_os';\n $plan_cpu = $output->res['plan']['cpu_core'];\n $plan_ram = $output->res['plan']['ram'];\n $where = 'min_ram<='.$plan_ram.' AND min_cpu<='.$plan_cpu;\n $output->res['os'] = $db->select($table, $where);\n\n $ip = false;\n foreach ($networks as $network) {\n $output->res['network'] = $network;\n $table = 'ipt_ips';\n $where = 'status=1 AND network_id='.$network['id'];\n $order = 'network_id';\n $ip = $db->selectRow($where, $order,$table);\n if ($ip) break;\n }\n $output->res['ip'] = $ip;\n $output->e = ($ip) ? false : true;\n echo json_encode($output);\n }", "public function start() {\r\n\t\tparent::start ();\r\n\t\tif (( string ) $this->data->ipaddr == 'dhcp') {\r\n\t\t\t$this->enableDHCP ();\r\n\t\t}\r\n\t}", "function addMasterserver($address, $port = self::DEFAULT_PORT_MASTER) {\n\t\t\n\t\t/* cast to right types */\n\t\t$address = (string)$address;\n\t\t$port = (int)$port;\n\t\t\n\t\t/* if address is invalid abort */\n\t\tif (empty($address)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* if port is invalid set to default port */\n\t\tif ($port < 0 || $port > 65535) {\n\t\t\t$port = self::DEFAULT_PORT_MASTER;\n\t\t}\n\t\t\n\t\t/* add if not a duplicate */\n\t\t$server = array($address, $port);\n\t\tif (!in_array($server, $this->masterservers, true)) {\n\t\t\t$this->masterservers[] = $server;\n\t\t}\n\t}", "public function add($parent, Google_Service_ServiceNetworking_AddDnsZoneRequest $postBody, $optParams = array())\n {\n $params = array('parent' => $parent, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('add', array($params), \"Google_Service_ServiceNetworking_Operation\");\n }", "function ip_in_subnet($ip, $subnet)\n{\n // Converts a human-readable IP address into its binary representation\n $binary_ip = inet_pton($ip);\n\n // Converts the binary IP into a string of bits.\n // We can't convert the IP to an int (using, for example ip2long()) because php only\n // natively supports unsigned 32 bit ints, while an ipv6 address is 128 bits.\n // If we want, we could make use of some php libraries (e.g. BC Math or GMP) to create a 128\n // bit int, but this is not necessary because we don't need to perform any math operations\n // on this int anyway.\n // Instead, we just convert the IP to a string which is sufficient because we only need to\n // use it for a single string comparison later.\n $ip_bits = inet_to_bits($binary_ip);\n\n // Get the bit string for the subnet address, as well as the length of the subnet mask (in bits)\n list($range, $netmask_len) = explode('/', $subnet, 2); //$netmask_len is aka. the CIDR prefix\n $binary_range = inet_pton($range);\n $range_bits = inet_to_bits($binary_range);\n\n // Get the network bits of the given IP address and the subnet address\n $ip_net_bits = substr($ip_bits, 0, $netmask_len);\n $range_net_bits = substr($range_bits, 0, $netmask_len);\n\n // If the network bits are identical, then this IP is part of the subnet\n return ($ip_net_bits == $range_net_bits);\n}", "public function testApikeyGetSubnetsV1()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function add_relais($domain,$ip,$id){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"INSERT INTO `relais_mail` (`nom_domain`,`ip`,`utilisateur_id_utilisateur`) values (:domain,:ip,:id);\");\n\t\t$req->execute(array(\n\t\t\t\t\t\t\t'domain'=>$domain,\n\t\t\t\t\t\t\t'ip'=>$ip,\n\t\t\t\t\t\t\t'id'=>$id));\n\t\t$req->closeCursor();\n\t}", "public function setCidr($cidr)\n {\n if (strpos($cidr, '-') !== false) {\n return $this->setRange($cidr);\n }\n\n list($ip, $bits) = array_pad(array_map('trim', explode('/', $cidr, 2)), 2, null);\n if (false === filter_var($ip, FILTER_VALIDATE_IP)) {\n throw new \\InvalidArgumentException(\"Invalid IP address \\\"$cidr\\\"\");\n }\n\n // determine version (4 or 6)\n $this->version = (false === filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) ? 6 : 4;\n\n $this->start = $ip;\n $this->istart = IP::inet_ptod($ip);\n\n if ($bits !== null and $bits !== '') {\n $this->prefix = $bits;\n } else {\n $this->prefix = $this->version == 4 ? 32 : 128;\n }\n\n if (($this->prefix < 0)\n || ($this->prefix > 32 and $this->version == 4)\n || ($this->prefix > 128 and $this->version == 6)) {\n throw new \\InvalidArgumentException(\"Invalid IP address \\\"$cidr\\\"\");\n }\n\n $this->end = $this->getBroadcast();\n $this->iend = IP::inet_ptod($this->end);\n\n $this->cache = array();\n }", "public function create($p_objID, $p_newRecStatus, $p_title, $p_typeID, $p_address, $p_netmask, $p_gateway, $p_dhcp, $p_from, $p_to, $p_dnsID, $p_domainID, $p_description, $p_cidr_suffix, $p_dns_server_selected = null, $p_dns_domain_selected = null, $p_reverse_dns = 0, $p_layer_2_assignment = null)\n {\n $this->check_missing_net_params($p_typeID, $p_address, $p_netmask, $p_cidr_suffix, $p_from, $p_to);\n\n $l_ip_from_long = Ip::ip2long($p_from);\n $l_ip_to_long = Ip::ip2long($p_to);\n\n if ($l_ip_from_long > $l_ip_to_long)\n {\n $l_temp = $l_ip_from_long;\n $l_ip_from_long = $l_ip_to_long;\n $l_ip_to_long = $l_temp;\n\n $l_temp = $p_from;\n $p_from = $p_to;\n $p_to = $l_temp;\n } // if\n\n $l_strSql = \"INSERT IGNORE INTO isys_cats_net_list SET \" . \"isys_cats_net_list__description = \" . $this->convert_sql_text(\n $p_description\n ) . \", \" . \"isys_cats_net_list__title = \" . $this->convert_sql_text($p_title) . \", \" . \"isys_cats_net_list__address = \" . $this->convert_sql_text(\n $p_address\n ) . \", \" . \"isys_cats_net_list__mask = \" . $this->convert_sql_text($p_netmask) . \", \" . \"isys_cats_net_list__address_range_from = \" . $this->convert_sql_text(\n $p_from\n ) . \", \" . \"isys_cats_net_list__address_range_to = \" . $this->convert_sql_text($p_to) . \", \" . \"isys_cats_net_list__isys_net_type__id = \" . $this->convert_sql_id(\n $p_typeID\n ) . \", \" . \"isys_cats_net_list__isys_net_dns_server__id = \" . $this->convert_sql_id(\n $p_dnsID\n ) . \", \" . \"isys_cats_net_list__isys_net_dns_domain__id = \" . $this->convert_sql_id($p_domainID) . \", \" . \"isys_cats_net_list__status = \" . $this->convert_sql_id(\n $p_newRecStatus\n ) . \", \" . \"isys_cats_net_list__isys_obj__id = '\" . $p_objID . \"', \" . \"isys_cats_net_list__cidr_suffix = \" . $this->convert_sql_int(\n $p_cidr_suffix\n ) . \", \" . \"isys_cats_net_list__isys_catg_ip_list__id = \" . $this->convert_sql_id($p_gateway) . \", \" . \"isys_cats_net_list__address_long = '\" . Ip::ip2long(\n $p_address\n ) . \"', \" . \"isys_cats_net_list__mask_long = '\" . Ip::ip2long(\n $p_netmask\n ) . \"', \" . \"isys_cats_net_list__address_range_from_long = '\" . $l_ip_from_long . \"', \" . \"isys_cats_net_list__address_range_to_long = '\" . $l_ip_to_long . \"', \" . \"isys_cats_net_list__reverse_dns = \" . $this->convert_sql_text(\n $p_reverse_dns\n ) . \";\";\n\n if ($this->update($l_strSql) && $this->apply_update())\n {\n $l_last_id = $this->get_last_insert_id();\n\n if (!empty($p_dns_server_selected))\n {\n if (is_string($p_dns_server_selected) || is_array($p_dns_server_selected))\n {\n\n if (!is_array($p_dns_server_selected))\n {\n $l_dns_server_arr = explode(\",\", $p_dns_server_selected);\n }\n else\n {\n $l_dns_server_arr = $p_dns_server_selected;\n }\n\n if (count($l_dns_server_arr) > 0)\n {\n foreach ($l_dns_server_arr AS $l_dns_server_id)\n {\n $this->attach_dns_server($l_last_id, $l_dns_server_id);\n }\n }\n }\n }\n\n if (!empty($p_dns_domain_selected))\n {\n if (is_string($p_dns_domain_selected) || is_array($p_dns_domain_selected))\n {\n\n if (!is_array($p_dns_domain_selected)) $l_dns_domain_arr = explode(\",\", $p_dns_domain_selected);\n else $l_dns_domain_arr = $p_dns_domain_selected;\n\n if (count($l_dns_domain_arr) > 0)\n {\n foreach ($l_dns_domain_arr AS $l_dns_domain_id)\n {\n $this->attach_dns_domain($l_last_id, $l_dns_domain_id);\n }\n }\n }\n }\n\n $l_layer2_ids = $this->get_layer_2_id_by_obj_id($p_layer_2_assignment);\n\n if (is_array($l_layer2_ids) && count($l_layer2_ids) > 0)\n {\n $this->add_layer2_assignment($l_layer2_ids, $p_objID);\n } // if\n\n return $l_last_id;\n }\n else\n return false;\n }", "function handle_put($target, $params, $body) {\n $result = array();\n $restart_nic = FALSE;\n $restart_dhcp = FALSE;\n $nic = current_nic();\n\n $addr = safe_array_get('addr', $body);\n if (!is_null($addr)) {\n $valid = sugar_valid_ip4($addr);\n if (!$valid) {\n return rest_error('e_bad_ip_address');\n }\n\n // retrive current IP address for recovery\n $old_ip = read_last_line(run_bin(\"network\", \"ip\"));\n\n // add mask support for format like 255.255.255.0\n // use ipcalc to check it\n $mask = safe_array_get('mask', $body, \"\");\n if ($mask && is_cmd_fail(shell_cmd_short(\"ipcalc -c 0.0.0.0 $mask\"))) {\n return rest_error(\"e_bad_format_netmask\");\n }\n\n // using the old IP for management\n // notify clients with new IP address based on the old IP\n send_cc_command_registered(\"--change-server --server-ip $valid\");\n\n if (is_cmd_fail(run_bin_as_root(\"network\", \"ip $nic $valid $mask\"))) {\n log_warning(\"Restore IP address to $old_ip\");\n send_cc_command_registered(\"--change-server --server-ip $old_ip\");\n run_bin_as_root(\"network\", \"ip $nic $old_ip $mask\");\n return rest_error('e_fail_change_ip');\n }\n\n $restart_nic = TRUE;\n $restart_dhcp = TRUE;\n }\n\n $nic_gw = safe_array_get('gateway', $body);\n if (!is_null($nic_gw)) {\n $valid = sugar_valid_ip4($nic_gw);\n if (!$valid && $nic_gw !== \"\") {\n return rest_error('e_bad_ip_address');\n }\n if ($nic_gw === \"\") {\n if (is_cmd_fail(call_home_bin(\"network\", \"gateway $nic delete\"))) {\n log_warning(\"Fail to delete $nic gateway\");\n return rest_error('e_fail_change_gw');\n }\n } else {\n if (is_cmd_fail(call_home_bin(\"network\", \"gateway $nic $valid\"))) {\n log_warning(\"Fail to update $nic gateway, $nic_gw\");\n return rest_error('e_fail_change_gw');\n }\n }\n $restart_nic = TRUE;\n }\n\n $nic_dns = safe_array_get('dns', $body);\n if (!is_null($nic_dns)) {\n $valid = sugar_valid_ip4($nic_dns);\n if (!$valid && $nic_dns !== \"\") {\n return rest_error('e_bad_ip_address');\n }\n if ($nic_dns === \"\") {\n $dns = shell_last_line(home_bin(\"network\", \"dns $nic\"));\n if ($dns) {\n if (is_cmd_fail(call_home_bin(\"network\", \"nameserver del $dns\"))) {\n log_warning(\"Fail to delete nameserver $dns from resolv.conf\");\n return rest_error('e_fail_change_dns');\n }\n } \n if (is_cmd_fail(call_home_bin(\"network\", \"dns $nic delete\"))) {\n log_warning(\"Fail to delete $nic dns\");\n return rest_error('e_fail_change_dns');\n }\n } else {\n if (is_cmd_fail(call_home_bin(\"network\", \"dns $nic $valid\"))) {\n log_warning(\"Fail to update $nic dns, $nic_dns\");\n return rest_error('e_fail_change_dns');\n }\n }\n $restart_nic = TRUE;\n }\n\n $dhcp_router = safe_array_get('dhcp_router', $body);\n if ($dhcp_router) {\n $valid = sugar_valid_ip4($dhcp_router);\n if (!$valid) {\n return rest_error(\"e_bad_ip_address\");\n }\n $err = validate_dhcp_router($valid);\n if ($err) {\n return rest_error($err);\n }\n if (is_cmd_fail(call_home_bin(\"network\", \"dhcp router $valid\"))) {\n return rest_error(\"e_fail_change_dhcp_router\");\n }\n\n $restart_dhcp = TRUE;\n $result['dhcp_router'] = $valid;\n }\n\n $dhcp_subnet_begin = safe_array_get('dhcp_subnet_begin', $body);\n $dhcp_subnet_end = safe_array_get('dhcp_subnet_end', $body);\n $dhcp_subnet_mask = safe_array_get('dhcp_subnet_mask', $body);\n if ($dhcp_subnet_begin && $dhcp_subnet_end && $dhcp_subnet_mask) {\n $begin = sugar_valid_ip4($dhcp_subnet_begin);\n $end = sugar_valid_ip4($dhcp_subnet_end);\n $mask = $dhcp_subnet_mask;\n if (is_cmd_fail(shell_cmd(\"ipcalc -c 0.0.0.0 $mask\"))) {\n return rest_error(\"e_bad_format_netmask\");\n }\n if (!$begin) {\n return rest_error_extra(\"e_invalid_dhcp_subnet_range\", 0, $dhcp_subnet_begin);\n }\n if (!$end) {\n return rest_error_extra(\"e_invalid_dhcp_subnet_range\", 0, $dhcp_subnet_end);\n }\n $err = validate_dhcp_range($begin, $end, $mask);\n if ($err) {\n return rest_error($err);\n }\n if (is_cmd_fail(call_home_bin(\"network\", \"dhcp range $begin $end $mask\"))) {\n return rest_error(\"e_invalid_dhcp_subnet_range\");\n }\n\n $restart_dhcp = TRUE;\n $result['dhcp_subnet_begin'] = $begin;\n $result['dhcp_subnet_end'] = $end;\n $result['dhcp_subnet_mask'] = $mask;\n }\n\n $dhcp_dns = safe_array_get('dhcp_dns', $body, NULL);\n if ($dhcp_dns !== NULL) {\n if ($dhcp_dns === \"\") {\n $res = run_bin(\"network\", \"ip\");\n if (is_cmd_fail($res)) {\n log_error(\"Cannot read IP for nic\");\n }\n $nic_ip = $res[\"last_line\"];\n $settings = parse_dhcp_settings();\n $dhcp_dns = $settings['dns'];\n if ( $dhcp_dns && $nic_ip != $dhcp_dns) {\n if (is_cmd_fail(call_home_bin(\"network\", \"dhcp dns del $dhcp_dns\"))) {\n return rest_error(\"e_fail_change_dhcp_dns\");\n }\n }\n $result['dhcp_dns'] = \"\";\n } else {\n $valid = sugar_valid_ip4($dhcp_dns);\n if (!$valid) {\n return rest_error(\"e_bad_ip_address\");\n }\n if (is_cmd_fail(call_home_bin(\"network\", \"dhcp dns add $valid\"))) {\n return rest_error(\"e_fail_change_dhcp_dns\");\n }\n $result['dhcp_dns'] = $valid;\n }\n $restart_dhcp = TRUE;\n }\n\n if ($restart_nic) {\n call_home_bin(\"network\", \"restart $nic\");\n run_as_root(\"systemctl restart tcs-disk-server\");\n run_as_root(\"systemctl restart tcs-delivery-server\");\n run_as_root(\"systemctl restart tcs-ccontrol-server\");\n }\n if ($restart_dhcp) {\n call_home_bin(\"network\", \"dhcp restart\");\n }\n\n return rest_result_ok($result);\n}", "function gen_subnet_mask($bits) {\n\treturn long2ip(gen_subnet_mask_long($bits));\n}", "public function addNumeroIP( $numero ) {\n $this->setNumeroIP($this->numero_ip.$numero);\n }", "function calc($subnet) {\n\t\t\tif (!IPv6::validate_subnet($subnet))\n\t\t\t\treturn false;\n\n\t\t\tlist($ip, $cidr) = explode(\"/\", $subnet);\n\n\t\t\t$minip = IPv6::minip($subnet);\n\n\t\t\treturn array(\t\"address\"\t=> $ip\n\t\t\t\t,\t\"cidr\"\t\t=> $cidr\n\t\t\t\t,\t\"uncompress\"\t=> IPv6::uncompress($ip)\n\t\t\t\t,\t\"compress\"\t=> IPv6::compress($ip)\n\t\t\t\t,\t\"network\"\t=> $minip .\"/\" .$cidr\n\t\t\t\t,\t\"minip\"\t\t=> $minip\n\t\t\t\t,\t\"maxip\"\t\t=> IPv6::maxip($subnet)\n\t\t\t\t,\t\"ipcount\"\t=> IPv6::cidrips($cidr)\n\t\t\t\t);\n\t\t}", "function verifyAndCleanAddresses($data, $subnets_allowed = 'subnets-allowed') {\n\t/** Remove extra spaces */\n\t$data = preg_replace('/\\s\\s+/', ' ', $data);\n\t\n\t/** Swap delimiters for ; */\n\t$data = str_replace(array(\"\\n\", ';', ' ', ','), ',', $data);\n\t$data = str_replace(',,', ',', $data);\n\t$data = trim($data, ',');\n\t\n\t$addresses = explode(',', $data);\n\tforeach ($addresses as $ip_address) {\n\t\t$cidr = null;\n\n\t\t$ip_address = rtrim(trim($ip_address), '.');\n\t\tif (!strlen($ip_address)) continue;\n\t\t\n\t\t/** Handle negated addresses */\n\t\tif (strpos($ip_address, '!') === 0) {\n\t\t\t$ip_address = substr($ip_address, 1);\n\t\t}\n\t\t\n\t\tif (strpos($ip_address, '/') !== false && $subnets_allowed == 'subnets-allowed') {\n\t\t\t$cidr_array = explode('/', $ip_address);\n\t\t\tlist($ip_address, $cidr) = $cidr_array;\n\t\t}\n\t\t\n\t\t/** IPv4 checks */\n\t\tif (strpos($ip_address, ':') === false) {\n\t\t\t/** Valid CIDR? */\n\t\t\tif ($cidr && !checkCIDR($cidr, 32)) return sprintf(__('%s is not valid.'), \"$ip_address/$cidr\");\n\t\t\t\n\t\t\t/** Create full IP */\n\t\t\t$ip_octets = explode('.', $ip_address);\n\t\t\tif (count($ip_octets) < 4) {\n\t\t\t\t$ip_octets = array_merge($ip_octets, array_fill(count($ip_octets), 4 - count($ip_octets), 0));\n\t\t\t}\n\t\t\t$ip_address = implode('.', $ip_octets);\n\t\t} else {\n\t\t\t/** IPv6 checks */\n\t\t\tif ($cidr && !checkCIDR($cidr, 128)) return sprintf(__('%s is not valid.'), \"$ip_address/$cidr\");\n\t\t}\n\t\t\n\t\tif (verifyIPAddress($ip_address) === false) return sprintf(__('%s is not valid.'), $ip_address);\n\t}\n\t\n\treturn $data;\n}", "private function setIPv6( $addr, $mask )\n\t{\n\t\t$this->net_addr = @inet_pton($addr);\n\t\tif( $this->net_addr == false )\n\t\t{\n\t\t\tthrow new \\Exception( \"invalid ip address {$addr}\" );\n\t\t} \n\t\t$this->valid = true;\n\t\t$this->net_addr_long = $this->inet_ntogmp( $this->net_addr );\n\t\t//$this->inet_gmpton( $this->net_addr_long );\n\t\t\t\n\t\t// set the netmask\n\t\tif( preg_match( '/^[0-9]+$/', $mask ))\n\t\t{\n\t\t\t$this->net_mask_bits = intval( $mask );\n\t\t\tif( $this->ipv4 && $this->net_mask_bits != 0 ){\n\t\t\t\t$this->net_mask_bits += 96;\n\t\t\t}\n\t\t\t$this->net_mask_long = \\gmp_mul( \\gmp_sub( gmp_pow( 2, $this->net_mask_bits ), 1 ), \\gmp_pow( 2, 128-$this->net_mask_bits ));\n\t\t\t//\t\t\techo gmp_strval( $this->net_mask_long, 2 ).\"<br />\\n\";\n\t\t\t$this->net_mask = $this->inet_gmpton($this->net_mask_long);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->net_mask = inet_pton($mask);\n\t\t\t$this->net_mask_long = $this->inet_ntogmp($this->netmask);\n\t\t\t$this->net_mask_bits = \\gmp_scan0( $this->net_mask_long, 0 );\n\t\t}\n\t\t\t\n\t\t// normalize it...\n\t\t$this->net_addr_long = \\gmp_and( $this->net_addr_long, $this->net_mask_long );\n\t\t$this->net_addr = $this->inet_gmpton( $this->net_addr_long );\n\t\t$this->net_broadcast_long = \\gmp_or( $this->net_addr_long, \\gmp_sub( \\gmp_pow( 2, 128-$this->net_mask_bits ), 1 ));\n\t\t$this->net_broadcast = $this->inet_gmpton($this->net_broadcast_long );\n\t}", "function maxip($subnet) {\n\t\t\tif (!IPv6::validate_subnet($subnet))\n\t\t\t\treturn false;\n\n\t\t\tlist($ip, $cidr) = explode(\"/\", $subnet);\n\n\t\t\treturn IPv6::bintoip(substr(IPv6::iptobin($ip), 0, $cidr) . sprintf(\"%'1\" .(128-$cidr) .\"s\", \"\"));\n\t\t}", "function make_iptables_command($action, $subnet, $http_port, $https_port, $from, $to)\n{\n $command = <<<COMMAND\nsudo iptables -t nat -$action PREROUTING -s $subnet -d $from -p tcp -m tcp --dport $http_port -j DNAT --to-destination $to:$http_port\nsudo iptables -t nat -$action PREROUTING -s $subnet -d $from -p tcp -m tcp --dport 80 -j DNAT --to-destination $to:$http_port\nsudo iptables -t nat -$action PREROUTING -s $subnet -d 192.168.254.8 -p tcp -m tcp --dport 80 -j DNAT --to-destination $to:$http_port\nsudo iptables -t nat -$action PREROUTING -s $subnet -d $from -p tcp -m tcp --dport $https_port -j DNAT --to-destination $to:$https_port\nsudo iptables -t nat -$action PREROUTING -s $subnet -d $from -p tcp -m tcp --dport 443 -j DNAT --to-destination $to:$https_port\nsudo iptables -t nat -$action PREROUTING -s $subnet -d 192.168.254.8 -p tcp -m tcp --dport 443 -j DNAT --to-destination $to:$https_port\nCOMMAND;\n return $command;\n}", "function get_localsubnet_ip_prefix()\n\t{\n\t\t// Consider using something like the 'IANA Private list' provided at http://sites.google.com/site/blocklist/ instead. \n\t\t// The data in this list is a subset of what IANA makes available at http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xhtml\n\t\t// Note that you may want/need to add in the IPv6 equivalent, too: http://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml\n\t\treturn \"192.\";\n\t}", "function delete($iface)\n {\n $this->lang->load('dhcp');\n\n $confirm_uri = '/app/dhcp/subnets/destroy/' . $iface;\n $cancel_uri = '/app/dhcp/subnets';\n $items = array($iface . ' - ' . lang('dhcp_dhcp'));\n\n $this->page->view_confirm_delete($confirm_uri, $cancel_uri, $items);\n }", "function set_ipalias($ip, $netmask, $if, $action = '') {\n if($action == '-') {\n $_alias = \"-alias\";\n log_error(\"Removing IP $ip with netmask $netmask from interface $if\");\n } else {\n $_alias = \"alias\";\n log_error(\"Adding IP $ip with netmask $netmask to interface $if\");\n }\n\n $_cmd = \"ifconfig $if $_alias $ip netmask $netmask\";\n system($_cmd, $_exit_status);\n return $_exit_status; \n}", "function listNetworkAdd($searchadd){\n #sends the deconstructed IP to the networkAdd function\n\n\t\t$iplist = explode(\".\", $searchadd);\n\n\t\t$networkList = [];\n\n\t\tfor($i = 8; $i < 33; $i++){\n\t\t\t$ipvar = explode(\".\", $searchadd);\n\t\t\t$temp = networkAdd($ipvar, $i);\n\t\t\t$networkList[] = $temp;\n\t\t}\n\n\t\t#echo\"All network addresses</br>\";\n\n\t\treturn $networkList;\n\t}", "public function add_ip_binding($param){\n $input = array(\n 'command' => '/ip/hotspot/ip-binding/add'\n );\n $out = array_merge($input, $param);\n return $this->query($out);\n }", "protected static function add_netmask($ips) {\r\n\r\n $output = array();\r\n\r\n foreach ( $ips as $ip ) {\r\n\r\n $parts = explode('.', $ip);\r\n\r\n // Skip any IP that is empty, has more parts than expected or has\r\n // a non-numeric first part.\r\n if ( empty($parts) || (count($parts) > 4) || !is_numeric($parts[0]) ) {\r\n continue;\r\n }\r\n\r\n $ip_out = array( $parts[0] );\r\n $netmask = 8;\r\n\r\n for ( $i = 1, $force_zero = false; ($i < 4) && $ip_out; $i++ ) {\r\n if ( $force_zero || !isset($parts[$i]) || ($parts[$i] === '') || ($parts[$i] === '*') ) {\r\n $ip_out[$i] = '0';\r\n $force_zero = true; // Forces all subsequent parts to be a zero\r\n }\r\n else if ( is_numeric($parts[$i]) ) {\r\n $ip_out[$i] = $parts[$i];\r\n $netmask += 8;\r\n }\r\n else {\r\n // Invalid IP part detected, invalidate entire IP\r\n $ip_out = false;\r\n }\r\n }\r\n\r\n if ( $ip_out ) {\r\n // Glue IP back together, add netmask if IP denotes a subnet, store for output.\r\n $output[] = implode('.', $ip_out) . (($netmask < 32) ? ('/' . $netmask) : '');\r\n }\r\n }\r\n\r\n return $output;\r\n }", "public function setIpAddress($ip_address);", "public function testIpAAddressWithParameter()\n {\n $ipV6Address = new Ipv6address(\"abc::\");\n $this->assertEquals(\"abc::\", $ipV6Address->getHexa());\n $this->assertEquals(\"00001010101111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\", $ipV6Address->getBinary());\n $this->assertEquals(128, strlen($ipV6Address->getBinary()));\n $this->assertCount(8, $ipV6Address->getAddressArray());\n $this->assertEquals(\"abc\", $ipV6Address->getAddressArray()[0]);\n $this->assertEquals(\"0000\", $ipV6Address->getAddressArray()[1]);\n $this->assertEquals(\"0000\", $ipV6Address->getAddressArray()[7]);\n }", "public function subnetNetwork(array $subnetsSizes)\n {\n $return = array();\n\n if (!$this->_isNetworkSpecified()) {\n throw new BadMethodCallException(\n 'Network address and/or mask are not specified');\n }\n\n $max = $this->_getSubnetUsableHostsCount(\n $this->getNetworkMask());\n $total = array_sum($subnetsSizes);\n if ($max < $total) {\n throw New InvalidArgumentException(\n sprintf('Can\\'t subnet `%s`, `\\%d` is not enough for `%d` hosts',\n $this->getNetworkAddress(), $this->getNetworkMask(), $total));\n }\n\n arsort($subnetsSizes);\n $long = ip2long($this->getNetworkAddress());\n \n foreach ($subnetsSizes as $name => $size) {\n $subnet = $this->_createSubnet($size, $long);\n $long = ip2long($subnet['subnet'])+$subnet['size']+2;\n $return[$name] = $subnet;\n }\n\n return $return;\n }", "public function addSecondaryDnsDomains($domain, $domain2add, $ip){\n $domain = (string)$domain;\n if (!$domain)\n throw new BadMethodCallException('Parameter $domain is missing.');\n $domain2add = (string)$domain2add;\n if (!$domain2add)\n throw new BadMethodCallException('Parameter $domain2add is missing.');\n $ip = (string)$ip;\n if (!$ip)\n throw new BadMethodCallException('Parameter $ip is missing.');\n $payload = array(\"domain\"=>$domain2add, \"ip\"=>$ip);\n try {\n $r = $this->post('dedicated/server/'.$domain.'/secondaryDnsDomains', array('Content-Type' => 'application/json;charset=UTF-8'), json_encode($payload))->send();\n } catch (\\Exception $e) {\n throw new ServerException($e->getMessage(), $e->getCode(), $e);\n }\n }", "function destroy($iface)\n {\n try {\n $this->load->library('dhcp/Dnsmasq');\n \n $this->dnsmasq->delete_subnet($iface);\n $this->dnsmasq->reset(TRUE);\n\n $this->page->set_status_deleted();\n redirect('/dhcp/subnets');\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return;\n }\n }", "private function check_missing_net_params($p_typeID, $p_address, $p_netmask, &$p_cidr_suffix, &$p_from, &$p_to)\n {\n if ($p_typeID == C__CATS_NET_TYPE__IPV4)\n {\n if (empty($p_cidr_suffix) && $p_netmask != '')\n {\n $p_cidr_suffix = Ip::calc_cidr_suffix($p_netmask);\n } // if\n\n if (empty($p_from) || empty($p_to))\n {\n $l_range = Ip::calc_ip_range($p_address, $p_netmask);\n $p_from = $l_range['from'];\n $p_to = $l_range['to'];\n } // if\n }\n elseif ($p_typeID == C__CATS_NET_TYPE__IPV6)\n {\n if (empty($p_cidr_suffix) && $p_netmask != '')\n {\n $p_cidr_suffix = Ip::calc_cidr_suffix_ipv6($p_netmask);\n } // if\n\n if (empty($p_from) || empty($p_to))\n {\n $l_range = Ip::calc_ip_range_ipv6($p_address, $p_cidr_suffix);\n $p_from = $l_range['from'];\n $p_to = $l_range['to'];\n } // if\n } // if\n }", "public function setSubnetwork($var)\n {\n GPBUtil::checkString($var, True);\n $this->subnetwork = $var;\n\n return $this;\n }", "public function add($address, $list, $type);", "public function addAddressN($value)\n {\n if ($this->address_n === null) {\n $this->address_n = new \\Protobuf\\ScalarCollection();\n }\n\n $this->address_n->add($value);\n }", "public static function checkIp6(string $requestIp, string $subnet) {\n\t\tif (!((extension_loaded('sockets') && \\defined('AF_INET6')) || @inet_pton('::1'))) {\n\t\t\tthrow new Exception('Unable to check Ipv6. Check that PHP was not compiled with option \"disable-ipv6\".');\n\t\t}\n\n\t\tif (false !== strpos($subnet, '/')) {\n\t\t\tlist($address, $netmask) = explode('/', $subnet, 2);\n\n\t\t\tif ('0' === $netmask) {\n\t\t\t\treturn (bool) unpack('n*', @inet_pton($address));\n\t\t\t}\n\n\t\t\tif ($netmask < 1 || $netmask > 128) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t$address = $subnet;\n\t\t\t$netmask = 128;\n\t\t}\n\n\t\t$bytesAddr = unpack('n*', @inet_pton($address));\n\t\t$bytesTest = unpack('n*', @inet_pton($requestIp));\n\n\t\tif (!$bytesAddr || !$bytesTest) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) {\n\t\t\t$left = $netmask - 16 * ($i - 1);\n\t\t\t$left = ($left <= 16) ? $left : 16;\n\t\t\t$mask = ~(0xffff >> $left) & 0xffff;\n\t\t\tif (($bytesAddr[$i] & $mask) != ($bytesTest[$i] & $mask)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function addServer($host, $port, $weight = 0) {}", "function setAddress($add) {\n if ( strpos($add->value, \"BEGIN:VCARD\") || strpos($add->value, \"begin:vcard\") )\n $add->type = 'text/directory';\n else\n $add->type = 'text/plain';\n $this->address = $add;\n $changed = true;\n }", "public function addIp($data) {\n\n $this->db->query('INSERT INTO Ip (Ip, Atempts) VALUES (:ip, :atempts)');\n\n //Bind values \n $this->db->bind(':ip', $data['ip']);\n $this->db->bind(':atempts', $data['atempts']);\n\n //Execute\n if ($this->db->execute()) {\n return true;\n } else {\n return false;\n }\n }", "public static function accept($value)\n {\n try\n {\n $subnet = static::getSubnet($value);\n\n return ($subnet !== null);\n }\n catch (\\Exception $e)\n {\n unset($e);\n return false;\n }\n }", "function add() {\n\n\t\t/**\n\t\t * Check if DNS module is enabled.\n\t\t * Call \"Module\" component to check.\n\t\t * 'DNS' is the module name (check in database).\n\t\t */\n\t\t$this->Module->check('DNS');\n\n\t\t/**\n\t\t * Check if maintenance is on.\n\t\t * Call the \"Maintenance\" component to check.\n\t\t */\n\t\t$this->Maintenance->check();\n\n\t\t/**\n\t\t * Check if subdomain quota is not over.\n\t\t * If yes, the user see an error message.\n\t\t * Call the \"Quota\" component to check.\n\t\t */\n\t\t$this->Quota->check('Subdomain', 'subdomain');\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t/**\n\t\t\t * Select the user ID of the domain owner.\n\t\t\t * @var array\n\t\t\t */\n\t\t\t$conditionUserId = array('conditions' => array('Domain.id' => $this->params['data']['Subdomain']['domain_id']));\n\t\t\t$queryUserDomainId = $this->Subdomain->Domain->find('first', $conditionUserId);\n\t\t\t\n\t\t\t/**\n\t\t\t * Split the subdomain string in an array. \n\t\t\t * @var array\n\t\t\t */\n\t\t\t$analyze = explode('.', $this->data['Subdomain']['name']);\n\n\t\t\t/**\n\t\t\t * Check if the domain name in the subdomain is the same than the domain name selected in the domains list.\n\t\t\t */\n\t\t\tif (isset($analyze['1']) && isset($analyze['2']) && $analyze['1'] . '.' . $analyze['2'] != $queryUserDomainId['Domain']['name']) {\n\t\t\t\t$this->Session->setFlash(__d('domain', 'Wrong domain name used in the subdomain name string.', true), 'default', array('class' => 'error'));\n\t\t\t\t$this->redirect(array('action' => 'add'));\n\t\t\t}\n\n\t\t\t$this->Subdomain->create();\n\n\t\t\t/**\n\t\t\t * Save new subdomain.\n\t\t\t */\n\t\t\tif ($this->Subdomain->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * Insert the create action in the \"robot\" table.\n\t\t\t\t * The Perl robot will check in this table.\n\t\t\t\t */\n\t\t\t\t$this->Robot->insert($this->data['Subdomain']['name'], 'SUBDOMAIN', $this->Auth->user('name'), $this->Auth->user('email'), $this->data['Subdomain']['domain_id'], NULL, 1);\n\n\t\t\t\t/**\n\t\t\t\t * Insert the create action in the \"logs\" table.\n\t\t\t\t */\n\t\t\t\t$this->Logs->insert($this->Auth->user('id'), '<strong>[ ' . $this->data['Subdomain']['name'] . ' ]</strong> ' . __d('domain', 'The subdomain has been saved.', true) , 'DNS', $_SERVER[\"REMOTE_ADDR\"]);\n\n\t\t\t\t/**\n\t\t\t\t * Save the user ID.\n\t\t\t\t */\n\t\t\t\t$this->Subdomain->saveField('user_id', $this->Auth->user('id'));\n\n\t\t\t\t/**\n\t\t\t\t * If the new subdomain is saved, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('domain', 'The subdomain has been saved.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the subdomain is not saved, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('domain', 'The subdomain has not been saved.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Select all domains who belongs to the user.\n\t\t * Select by user ID.\n\t\t * @var array\n\t\t */\n\t\t$conditions = array('conditions' => array('Domain.user_id' => $this->Auth->user('id')));\n\t\t$domains = $this->Subdomain->Domain->find('list', $conditions);\n\n\t\t/**\n\t\t * Put all domains in \"$domains\".\n\t\t * $domains will be available in the view.\n\t\t */\n\t\t$this->set(compact('domains'));\n\n\t}", "public function marcarPunto( ) {\n $this->addNumeroIP(\".\");\n\n }", "public function configure() {\r\n\t\t$this->logger->info ( 'Setting up WAN interface: ' . ( string ) $this->data->if );\r\n\t\t$this->stop ();\r\n\t\t\r\n\t\t//\t\tSet MTU\n\t\tif (( string ) $this->data->mtu != '') {\r\n\t\t\tFunctions::shellCommand ( \"/sbin/ifconfig \" . ( string ) $this->data->if . \" mtu \" . ( string ) $this->data->mtu );\r\n\t\t}\r\n\t\t\r\n\t\t//\t\tSpoof mac address\n\t\tif (Functions::isMacAddress ( ( string ) $this->data->mac )) {\r\n\t\t\tFunctions::shellCommand ( \"/sbin/ifconfig \" . escapeshellarg ( $this->data->if ) . \" link \" . escapeshellarg ( $this->data->mac ) );\r\n\t\t} else {\r\n\t\t\t$mac = $this->getMacAddress ();\r\n\t\t\tif ($mac == \"ff:ff:ff:ff:ff:ff\") {\r\n\t\t\t\t/* this is not a valid mac address. */\r\n\t\t\t\t$this->logger->info ( \"Generating new MAC address for WAN interface.\" );\r\n\t\t\t\t$random_mac = $this->generateMacAddress ();\r\n\t\t\t\tFunctions::shellCommand ( \"/sbin/ifconfig \" . escapeshellarg ( $this->data->if ) . \" link \" . escapeshellarg ( $random_mac ) );\r\n\t\t\t\t$this->data->mac = $random_mac;\r\n\t\t\t\t\r\n\t\t\t\t$this->config->saveConfig ();\r\n\t\t\t\t$this->logger->info ( \"The invalid MAC(ff:ff:ff:ff:ff:ff) on interface \" . ( string ) $this->data->if . \" has been replaced with \" . $random_mac );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//\t\tSet IP address\n\t\tif (( string ) $this->data->ipaddr == 'dhcp') {\r\n\t\t\t$this->configureDHCP ();\r\n\t\t} elseif (Functions::is_ipAddr ( ( string ) $this->data->ipaddr )) {\r\n\t\t\tFunctions::shellCommand ( \"/sbin/ifconfig \" . ( string ) $this->data->if . \" \" . ( string ) $this->data->ipaddr . \"/\" . Functions::mask2prefix(( string ) $this->data->subnet) );\r\n\t\t\t//\t\tDefault gateway\n\t\t\tif ($this->data->gateway != '') {\r\n\t\t\t\tif (Functions::is_ipAddr ( ( string ) $this->data->gateway )) {\r\n\t\t\t\t\t$return = Functions::shellCommand ( \"/sbin/route add default \" . escapeshellarg ( $this->data->gateway ) );\r\n\t\t\t\t\tif ($return != \"\") {\r\n\t\t\t\t\t\t$this->logger->error ( 'Could not add default gateway, route returned the following message: {' . $return . '}' );\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->logger->info ( 'Could not add default gateway from WAN (' . ( string ) $this->data->ipaddr . ') invalid address' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function AddTrust($post)\n {\n if(!empty($post)){\n if(tests::is_ip($post) || tests::is_domain($post) || (tests::is_ip_with_subnetmask($post))){\n $this->TrustedNetworks[$post] = $post;\n }else{\n msg_dialog::display(_(\"Error\"), msgPool::invalid(_(\"Trusted network\")), ERROR_DIALOG);\n }\n }\n }", "public function add($address, $list, $type)\n {\n $range = Range::parse($address);\n\n $this->getQuery()->insert([\n 'type' => $type,\n 'list' => $list,\n 'label' => $address,\n 'range_start' => $range->getFirstIp()->long,\n 'range_end' => $range->getLastIp()->long,\n ]);\n }", "public function getIPAddress(): string;", "private function _getSubnetBroadcastAddress($network, $cidr)\n {\n $host = $this->_getSubnetLastUsableHost($network, $cidr);\n return long2ip(ip2long($host)+1);\n }", "private function addAddress($options)\n {\n $address = $options['billing_address']\n ?: $options['address'];\n\n $this->post['card']['address_line1'] = $address['address1'];\n $this->post['card']['address_line2'] = $address['address2'];\n $this->post['card']['address_city'] = $address['city'];\n $this->post['card']['address_postcode'] = $address['zip'];\n $this->post['card']['address_state'] = $address['state'];\n $this->post['card']['address_country'] = $address['country'];\n }", "public function setIpAddress($val)\n {\n $this->_propDict[\"ipAddress\"] = $val;\n return $this;\n }", "private function _convertCIDRToNetworkMask($cidr)\n {\n return long2ip(pow(2, 32)-1<<32-$cidr);\n }", "function check_subnets_overlap($subnet1, $bits1, $subnet2, $bits2) {\n\n\tif (!is_numeric($bits1))\n\t$bits1 = 32;\n\tif (!is_numeric($bits2))\n\t$bits2 = 32;\n\n\tif ($bits1 < $bits2)\n\t$relbits = $bits1;\n\telse\n\t$relbits = $bits2;\n\n\t$sn1 = gen_subnet_mask_long($relbits) & ip2long($subnet1);\n\t$sn2 = gen_subnet_mask_long($relbits) & ip2long($subnet2);\n\n\tif ($sn1 == $sn2)\n\treturn true;\n\telse\n\treturn false;\n}", "public static function deleteSubnet( $subnetID ){\n\t\t\tglobal $wpdb;\n\n\t\t\tglobal $switched;\n\t\t\tswitch_to_blog(1);\n\t\t\t\n\t\t\t$wpdb->query( $wpdb->prepare(\n\t\t\t\t\"DELETE FROM \".$wpdb->prefix.\"wps_subnets\n\t\t\t\tWHERE id = '%d'\",\n\t\t\t\t$subnetID\n\t\t\t) );\n\n\t\t\trestore_current_blog();\n\t\t}", "public function addServer () {\n return view ('server/add');\n }", "public function __construct($config = array()) {\r\n if (isset($config['multipleIPs']) && $config['multipleIPs']) {\r\n $this->config['multipleIPs'] = true;\r\n $this->config['IPs'] = $config['IPs'];\r\n $this->outgoing_ip = $config['IPs'][mt_rand(0, count($config['IPs']) - 1)];\r\n }\r\n }", "function do_c_block_firewall() {\n\t\t$rxs = $this->get_option( 'service_ips' );\n\t\t$service_ips_external = get_option( 'vaultpress_service_ips_external' );\n\n\t\tif ( !empty( $rxs['data'] ) && !empty( $service_ips_external['data'] ) )\n\t\t\t$rxs = array_merge( $rxs['data'], $service_ips_external['data'] );\t\t\n\t\tif ( ! $rxs )\n\t\t\treturn false;\n\t\treturn $this->validate_ip_address( $rxs );\n\t}", "function guifi_domain_add() {\n guifi_log(GUIFILOG_TRACE,'function guifi_domain_add()');\n if (arg(8) == 'external')\n $ipv4 = '';\n else\n $ipv4 = arg(6);\n\n $output = drupal_get_form('guifi_domain_form',array(\n 'add' => arg(3),\n 'dname' => arg(4),\n 'type' => arg(5),\n 'ipv4' => $ipv4,\n 'mname' => arg(7),\n 'scope' => arg(8),\n 'management' => arg(9)));\n\n // To gain space, save bandwith and CPU, omit blocks\n print theme('page', $output, FALSE);\n}", "public function addAddress()\n\t{\n\t\treturn $this->editAddress();\n\t}", "public function addwhitelistip() \n\t{\n\t\tUserModel::authentication();\n\t\t\n\t\tSecurityModel::add_ip_whitelist();\n }", "private function validateTunnelForm(){\n\t\t$subnet_type = array('lan_subnet','ipaddr','network');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_local_subnet_type'],$subnet_type)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_type');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'ipaddr'){\n\t\t\t//\t\tvalidate local IP address\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_local_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_ipaddr');\n\t\t\t}\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'network'){\n\t\t\t//\t\tValidate network portion of the local subnet\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_local_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_ipaddr');\n\t\t\t}\n\t\t\tif($_POST['services_ipsec_tunnel_local_subnet_subnet'] < 0 || $_POST['services_ipsec_tunnel_local_subnet_subnet'] > 32){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_subnet');\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!in_array($_POST['services_ipsec_tunnel_remote_subnet_type'],$subnet_type)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_type');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'ipaddr'){\n\t\t\t//\t\tvalidate remote IP address\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_remote_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_ipaddr');\n\t\t\t}\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'network'){\n\t\t\t//\t\tValidate network portion of the remote subnet\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_remote_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_ipaddr');\n\t\t\t}\n\t\t\tif($_POST['services_ipsec_tunnel_remote_subnet_subnet'] < 0 || $_POST['services_ipsec_tunnel_remote_subnet_subnet'] > 32){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_subnet');\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_local_gateway'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_gateway');\n\t\t}\n\t\t\n\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_remote_gateway'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_gateway');\n\t\t}\n\t\t\n\t\tif(!empty($_POST['services_ipsec_tunnel_keepalive_ipaddr']) && !Functions::is_ipAddr($_POST['services_ipsec_tunnel_keepalive_ipaddr'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_keepalive_ipaddr');\n\t\t}\n\t\t\n\t\t$negotiation_modes = array('main','agressive','base');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_negotiation_mode'],$negotiation_modes)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_negotiation_mode');\n\t\t}\n\t\t\n\t\t$identifier_types = array('myipaddr','ipaddr','fqdn','usr_fqdn','dyn_dns');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_id_type'],$identifier_types)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_id_type');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_p1_id_type'] == 'ipaddr' && !Functions::is_ipAddr($_POST['services_ipsec_tunnel_p1_id'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_id');\n\t\t}\n\t\tif($_POST['services_ipsec_tunnel_p1_id_type'] == 'fqdn' && !Functions::isUrl($_POST['services_ipsec_tunnel_p1_id'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_id');\n\t\t}\n\t\t\n\t\t$dh_keygroups = array('1','2','5');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_dh_keygroup'],$dh_keygroups)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_dh_keygroup');\n\t\t}\n\t\t\n\t\tif(!is_numeric($_POST['services_ipsec_tunnel_p1_lifetime'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_lifetime');\n\t\t}\n\t\t\n\t\t$auth_method = array('psk','rsasig');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_auth_method'],$auth_method)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_auth_method');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'psk'){\n\t\t\t$found = false;\n\t\t\tforeach($this->data->keys->key as $key){\n\t\t\t\tif($key['id'] == $_POST['services_ipsec_tunnel_p1_preshared_key']){\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\t\n\t\t\tif(!$found){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_preshared_key');\n\t\t\t}\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'rsasig'){\n\t\t\t$found = false;\n\t\t\tforeach($this->data->certificates->certificate as $cert){\n\t\t\t\tif($cert['id'] == $_POST['services_ipsec_tunnel_p1_rsa_sig']){\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\t\n\t\t\tif(!$found){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_rsa_sig');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$protocol = array('esp','ah','esp_ah');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p2_protocol'],$protocol)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p2_protocol');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_p2_pfs_keygroup'] != 'off' && !in_array($_POST['services_ipsec_tunnel_p2_pfs_keygroup'],$dh_keygroups)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p2_pfs_keygroup');\n\t\t}\n\t\t\n\t\tif(!is_numeric($_POST['services_ipsec_tunnel_p2_lifetime'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p2_lifetime');\n\t\t}\n\t\t\n\t\tif(ErrorHandler::errorCount() > 0){\n\t\t\tthrow new Exception('There is invalid form input');\n\t\t}\n\t}", "public static function inet() {}", "function update_dhcp($dhcp_configuration)\n{\n $new_dhcp_configuration=parse_dhcp_server();\n // Actualize eth0, ath0 and ath1 information.\n if ($dhcp_configuration['dhcp_server_eth0']=='on')\n {\n $new_dhcp_configuration['eth0']['start']=$dhcp_configuration['dhcp_start_eth0'];\n $new_dhcp_configuration['eth0']['end']=$dhcp_configuration['dhcp_end_eth0'];\n $new_dhcp_configuration['eth0']['expire']=$dhcp_configuration['dhcp_expire_eth0'];\n }\n else\n {\n unset ($new_dhcp_configuration['eth0']);\n }\n if ($dhcp_configuration['dhcp_server_ath0']=='on')\n {\n $new_dhcp_configuration['ath0']['start']=$dhcp_configuration['dhcp_start_ath0'];\n $new_dhcp_configuration['ath0']['end']=$dhcp_configuration['dhcp_end_ath0'];\n $new_dhcp_configuration['ath0']['expire']=$dhcp_configuration['dhcp_expire_ath0'];\n }\n else\n {\n unset ($new_dhcp_configuration['ath0']);\n }\n if ($dhcp_configuration['dhcp_server_ath1']=='on')\n {\n $new_dhcp_configuration['ath1']['start']=$dhcp_configuration['dhcp_start_ath1'];\n $new_dhcp_configuration['ath1']['end']=$dhcp_configuration['dhcp_end_ath1'];\n $new_dhcp_configuration['ath1']['expire']=$dhcp_configuration['dhcp_expire_ath1'];\n }\n else\n {\n unset ($new_dhcp_configuration['ath1']);\n }\n return $new_dhcp_configuration;\n}", "function guildBanAdd(Guild $guild, User $user);", "function wp_sub_add_user_to_network( int $user_id, int $network_id ) : bool {\n\tif ( ! get_network( $network_id ) instanceof WP_Network ) {\n\t\treturn false;\n\t}\n\n\tif ( wp_sub_user_exists_on_network( $user_id, $network_id ) ) {\n\t\treturn false;\n\t}\n\n\treturn boolval( add_user_meta( $user_id, \\WP_SUB\\WP_Separate_User_Base::NETWORK_META_KEY, $network_id ) );\n}", "public function addAddress($data){\n\t\tglobal $dbh;\n\t\t$fields = array(\n\t\t\t\"nombre\",\n\t\t\t\"receptorNombre\",\n\t\t\t\"receptorApellido\",\n\t\t\t\"nombreEmpresa\",\n\t\t\t\"facturacion\",\n\t\t\t\"principal\",\n\t\t\t\"idCliente\",\n\t\t\t\"direccion\",\n\t\t\t\"fono\",\n\t\t\t\"cel\",\n\t\t\t\"idZona\"\n\t\t);\n\t\t$query = \"INSERT INTO direccion(nombre,receptorNombre,receptorApellido,nombreEmpresa,facturacion,principal,idCliente,direccion,fono,cel,idZona) VALUES(?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t$update = array();\n\t\tif( $data!=null && is_array($data) ){\n\t\t\tforeach( $fields as $field ){\n\t\t\t\tif( $field == 'idCliente' ){\n\t\t\t\t\t$update[$field] = $this->id;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$update[$field] = null;\n\t\t\t\tif( isset($data[$field]) && !empty($data[$field]) ){\n\t\t\t\t\t$update[$field] = $data[$field];\n\t\t\t\t} else {\n\t\t\t\t\t//$update[$field] = $old[$field];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$res = $dbh->query($query,$update);\n\t\t\treturn $res;\n\t\t}\n\t\treturn false;\n\t}", "public function set_address($new) {\n\t\t$this->CI->api->dns->modify->zone_address($this->zone, $this->address, 'address', $new);\n\t\t$this->hostname = $new;\n\t}", "public function addAddress(){\n\t\t$name = $_REQUEST['name'];\n\t\t$address = $_REQUEST['address'];\n $stuid = $_REQUEST['stuid'];\n\t\t$phone = $_REQUEST['phone'];\n\t\t$form = M(\"addressinfo\");\n\t\t$data['name'] = $name;\n \t$data['address'] = $address;\n \t$data['phone'] = $phone;\n $data['stuid'] = $stuid;\n \t$result = $form->add($data);\n\t\tif ($result) {$this->redirect('/fastfood/index.php/Admin/admin');}\n\t\t\telse {$this->error('添加失败');}\n }", "public function add_network_menu() {\n\t\tadd_submenu_page(\n\t\t\t'settings.php',\n\t\t\t__( 'Network Mail', 'simple-smtp' ),\n\t\t\t__( 'Network Mail', 'simple-smtp' ),\n\t\t\t'manage_network_options',\n\t\t\t'wpsimplesmtpms',\n\t\t\t[ &$this, 'options_page' ]\n\t\t);\n\t}", "public function getIpv4();", "static function computeNetworkRangeFromAdressAndNetmask($address, $netmask, &$firstAddress,\n &$lastAddress = null,\n $excludeBroadcastAndNetwork = false) {\n if ($address instanceof IPAddress) {\n $address = $address->getBinary();\n }\n if ($netmask instanceof IPNetmask) {\n $netmask = $netmask->getBinary();\n }\n $start = [];\n $end = [];\n for ($i = 0; $i < 4; ++$i) {\n $start[$i] = IPAddress::convertNegativeIntegerToPositiveFloat($address[$i] & $netmask[$i]);\n $end[$i] = IPAddress::convertNegativeIntegerToPositiveFloat($address[$i] | ~$netmask[$i]);\n }\n\n if ($excludeBroadcastAndNetwork) {\n IPAddress::addValueToAddress($start, 1);\n IPAddress::addValueToAddress($end, -1);\n }\n\n if ($firstAddress instanceof IPAddress) {\n $firstAddress->setAddressFromBinary($start);\n } else {\n $firstAddress = $start;\n }\n\n if ($lastAddress instanceof IPAddress) {\n $lastAddress->setAddressFromBinary($end);\n } else {\n $lastAddress = $end;\n }\n }", "public function __construct($ip_or_cidr, $prefix = '')\n\t{\n\t\t$this->given_ip = $ip_or_cidr;\n\t\tif ( strpos($ip_or_cidr, '/') !== false ) {\n\t\t\tlist($this->given_ip, $prefix) = explode('/', $ip_or_cidr, 2);\n\t\t}\n\n\t\tif ( ! $this->given_ip instanceof IP ) {\n\t\t\t$this->given_ip = new $this->ip_class($this->given_ip);\n\t\t}\n\n\t\t$this->checkPrefix($prefix);\n\t\t$this->prefix = (int) $prefix;\n\n\t\t$this->first_ip = $this->given_ip->bit_and($this->getMask());\n\t\t$this->last_ip = $this->first_ip->bit_or($this->getDelta());\n\t}", "private function addAddress($options)\n {\n if (!isset($options['address'])\n || !isset($options['billing_address'])\n ) {\n return false;\n }\n\n $address = isset($options['billing_address'])\n ? $options['billing_address']\n : $options['address'];\n\n $this->post['BillingStreet'] = isset($address['address1']) ? $address['address1'] : null;\n $this->post['BillingHouseNumber'] = isset($address['address2']) ? $address['address2'] : null;\n $this->post['BillingCity'] = isset($address['city']) ? $address['city'] : null;\n $this->post['BillingState'] = isset($address['state']) ? $address['state'] : null;\n $this->post['BillingPostCode'] = isset($address['zip']) ? $address['zip'] : null;\n }", "function listNetworkIp($net,$broadcast,$sn) {\n\n $lista=[]; // lista da ritornare \n\n $no = explode('.', $net); // array con gli ottetti dell'indirizzo NET\n $bo = explode('.', $broadcast); // array con gli ottetti dell'indirizzo NET\n\n $nbit = 32-$sn; // numero di bit assegnati agli host\n \n $nhost = pow(2,$nbit); // numero totale degli host\n\n $start = (int) $no[3]+1;\n $end = (int) $bo[3]-1;\n $roots = $no[0].\".\".$no[1].\".\".$no[2].\".\";\n $roote = $bo[0].\".\".$bo[1].\".\".$bo[2].\".\";\n $primo = $roots.$start;\n $ultimo = $roote.$end;\n $hosts = [];\n\n //echo $start.\" - \".$end.\"<br>\";\n\n // verifica che gli IP disponibili non superino le 5000 unità -> stila la lista\n if($nhost > 35000) {\n $lista[0] = $primo;\n $lista[1] = $ultimo;\n }\n else {\n for($i=ip2long($primo); $i<=ip2long($ultimo); $i++) {\n\n $ip2conv = $i;\n $ip2write = long2ip($ip2conv);\n $lista[] = $ip2write;\n \n $host=gethostbyaddr($ip2write); // prelevo il nome del host (se disponibile)\n //echo $host.\" | \";\n\n // se il nome host NON è uguale all'IP -> salvo il nome Host in una lista\n if(!filter_var($host, FILTER_VALIDATE_IP)) {\n $hosts[] = \"IP: $ip2write ==> Nome Host:<b> $host </b><br>\";\n }\n\n }\n }\n\n $ret['hostnames'] = $hosts;\n $ret['primo'] = $primo;\n $ret['ultimo'] = $ultimo;\n $ret['lista'] = $lista;\n $ret['nhost'] = $nhost; \n\n return $ret;\n}", "public function getIpv6(): string;", "function process_add_server()\n{\n // Verify we have all the required info (based on LDAP or AD)\n $error = \"\";\n $enabled = grab_request_var(\"enabled\", \"\");\n if (!empty($enabled)) { $enabled = 1; }\n\n $conn_method = grab_request_var(\"conn_method\", \"\");\n $base_dn = grab_request_var(\"base_dn\", \"\");\n $security_level = grab_request_var(\"security_level\", \"none\");\n\n // AD Only\n $account_suffix = grab_request_var(\"account_suffix\", \"\");\n $domain_controllers = grab_request_var(\"domain_controllers\", \"\");\n\n // LDAP Only\n $ldap_host = grab_request_var(\"ldap_host\", \"\");\n $ldap_port = grab_request_var(\"ldap_port\", \"\");\n\n if ($conn_method == \"ad\") {\n\n // Verify AD sections required\n if (empty($account_suffix) || empty($base_dn) || empty($domain_controllers) || empty($security_level)) {\n $error = _(\"You must fill out all the Active Directory server information.\");\n }\n\n } else if ($conn_method == \"ldap\") {\n\n // Verify LDAP sections required\n if (empty($ldap_host) || empty($ldap_port) || empty($base_dn) || empty($security_level)) {\n $error = _(\"You must fill out all the LDAP server information.\");\n }\n\n } else {\n // Not a recognized connection method...\n $error = _(\"Unknown connection method specified.\");\n }\n\n // Quit if error exists\n if (!empty($error)) {\n display_page(true, $error);\n exit;\n }\n\n $server = array(\"id\" => uniqid(),\n \"enabled\" => $enabled,\n \"conn_method\" => $conn_method,\n \"ad_account_suffix\" => $account_suffix,\n \"ad_domain_controllers\" => $domain_controllers,\n \"base_dn\" => $base_dn,\n \"security_level\" => $security_level,\n \"ldap_port\" => $ldap_port,\n \"ldap_host\" => $ldap_host);\n\n // Add server\n auth_server_add($server);\n\n // Success... display normal page\n display_page();\n}", "function getServiceAddress();", "public function add($domain): bool\n {\n $ipAddress = Config::get('hostIpAddress');\n $data = \"{$ipAddress} {$domain}\";\n\n $contents = $this->fileManager->getFileContents(Config::get('hostFile'));\n\n if (false === strpos($contents, $this->blockStart) || false === strpos($contents, $this->blockEnd)) {\n return $this->createBlock($data);\n }\n\n return $this->updateBlock($data, $contents);\n }", "function ip_in_range($ip, $range) {\n if ( is_string($range) ) $ranges = explode(',',$range);\n else $ranges = $range;\n if (strpos($ip,':') !== false) {\n return in_array($ip,$ranges);\n } else {\n $in = false;\n foreach($ranges as $range) {\n if ($in) return $in;\n if (strpos($range,':') !== false) continue;\n # If IP has the 4 blocks is a host, but we need the prefix, so put it\n if (strpos($range,'/') === false && strpos($range,'-') === false && strpos($range,'*') === false) $range .= '/32';\n if (strpos($range, '/') !== false) {\n // $range is in IP/NETMASK format\n list($range, $netmask) = explode('/', $range, 2);\n if (strpos($netmask, '.') !== false) {\n // $netmask is a 255.255.0.0 format\n $netmask = str_replace('*', '0', $netmask);\n $netmask_dec = ip2long($netmask);\n return ( (ip2long($ip) & $netmask_dec) == (ip2long($range) & $netmask_dec) );\n } else {\n // $netmask is a CIDR size block\n // fix the range argument\n $x = explode('.', $range);\n while(count($x)<4) $x[] = '0';\n list($a,$b,$c,$d) = $x;\n $range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\n $range_dec = ip2long($range);\n $ip_dec = ip2long($ip);\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\n # Strategy 2 - Use math to create it\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\n $netmask_dec = ~ $wildcard_dec;\n $in = (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec));\n }\n } else {\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\n if (strpos($range, '*') !==false) { // a.b.*.* format\n // Just convert to A-B format by setting * to 0 for A and 255 for B\n $lower = str_replace('*', '0', $range);\n $upper = str_replace('*', '255', $range);\n $range = \"$lower-$upper\";\n }\n if (strpos($range, '-')!==false) { // A-B format\n list($lower, $upper) = explode('-', $range, 2);\n $lower_dec = (float)sprintf(\"%u\",ip2long($lower));\n $upper_dec = (float)sprintf(\"%u\",ip2long($upper));\n $ip_dec = (float)sprintf(\"%u\",ip2long($ip));\n $in = ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\n }\n }\n }\n return $in;\n }\n}", "public function __construct( $addr )\n\t{\n\t\t$this->valid = false;\n\t\t// check for netmask\n\t\t$cx = strpos($addr, '/');\n\t\tif( $cx )\n\t\t{\n\t\t\t$mask = trim(substr($addr, $cx+1));\n\t\t\t$addr = trim( substr($addr, 0, $cx));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$mask = null;\n\t\t}\n\t\t$this->ipv4 = $this->isIPv4( $addr );\n\t\tif( $this->ipv4 ) \n\t\t{\n\t\t\t$addr = '::'.$addr;\n\t\t\tif( $mask != null )\n\t\t\t{\n\t\t\t\tif( $this->isIPv4( $mask ))\n\t\t\t\t{\n\t\t\t\t\t$mask = '::'.$mask;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( $mask == null )\n\t\t{\n\t\t\t$mask = 128; \n\t\t}\n\t\t$this->setIPv6($addr, $mask);\n\t}", "function ip_in_pfb_localsub($subnet) {\n\tglobal $pfb_localsub;\n\n\tif (!empty($pfb_localsub)) {\n\t\tforeach ($pfb_localsub as $line) {\n\t\t\tif (ip_in_subnet($subnet, $line)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t}\n\treturn FALSE;\n}" ]
[ "0.630979", "0.59423196", "0.58789194", "0.5854955", "0.5642866", "0.5421193", "0.52758896", "0.5245642", "0.52162373", "0.5182487", "0.5168595", "0.51371276", "0.5061889", "0.5056955", "0.50293684", "0.49974075", "0.49780065", "0.4971123", "0.49291348", "0.49133232", "0.49051598", "0.48424265", "0.48309562", "0.48245224", "0.48195204", "0.47885403", "0.4782986", "0.47821814", "0.47721428", "0.4676419", "0.46582875", "0.4628586", "0.46262637", "0.46145776", "0.4602088", "0.45806915", "0.4578612", "0.4562505", "0.45536754", "0.45502928", "0.45451024", "0.45446602", "0.45441556", "0.45421878", "0.45408094", "0.45358276", "0.45355916", "0.45304787", "0.45125124", "0.44650716", "0.446158", "0.4445514", "0.44430774", "0.44332147", "0.44289333", "0.4424364", "0.44234082", "0.44138628", "0.44121382", "0.44120362", "0.4400226", "0.43979174", "0.43956754", "0.43726698", "0.43631494", "0.4353228", "0.43439353", "0.4343231", "0.43396223", "0.43378207", "0.433242", "0.43229514", "0.43202168", "0.4316902", "0.43162197", "0.43132108", "0.42944494", "0.42842054", "0.42753792", "0.4273851", "0.4271194", "0.42635068", "0.42584845", "0.4252089", "0.42509526", "0.42441916", "0.4239067", "0.42358473", "0.42323703", "0.42192596", "0.4215471", "0.42109844", "0.42100263", "0.42070666", "0.4206946", "0.4203951", "0.42004326", "0.41978988", "0.41966644", "0.4195043", "0.41934976" ]
0.0
-1
DHCP server delete subnet view.
function delete($iface) { $this->lang->load('dhcp'); $confirm_uri = '/app/dhcp/subnets/destroy/' . $iface; $cancel_uri = '/app/dhcp/subnets'; $items = array($iface . ' - ' . lang('dhcp_dhcp')); $this->page->view_confirm_delete($confirm_uri, $cancel_uri, $items); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function destroy($iface)\n {\n try {\n $this->load->library('dhcp/Dnsmasq');\n \n $this->dnsmasq->delete_subnet($iface);\n $this->dnsmasq->reset(TRUE);\n\n $this->page->set_status_deleted();\n redirect('/dhcp/subnets');\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return;\n }\n }", "function delete_network_option($network_id, $option)\n {\n }", "public static function deleteSubnet( $subnetID ){\n\t\t\tglobal $wpdb;\n\n\t\t\tglobal $switched;\n\t\t\tswitch_to_blog(1);\n\t\t\t\n\t\t\t$wpdb->query( $wpdb->prepare(\n\t\t\t\t\"DELETE FROM \".$wpdb->prefix.\"wps_subnets\n\t\t\t\tWHERE id = '%d'\",\n\t\t\t\t$subnetID\n\t\t\t) );\n\n\t\t\trestore_current_blog();\n\t\t}", "function deleteIpAddress($ipaddress){\n\t\t\t//load data from persistence object\n\t\t\t$storageType \t\t= $this->configManager->getStorageType();\n\t\t\n\t\t\t\t\t\t\t\t\n\t\t\tif(strtolower($storageType) == 'file'){\n\t\t\t\t$fileName = $this->configManager->getDataDir().'/'.$this->configManager->getBanFileName();\n\t\t\t\t$this->persistenceManager->setStorageType('file');\n\t\t\t\t$this->persistenceManager->setBanFile($fileName);\n\t\t\t}elseif(strtolower($storageType) == 'mysql'){\n\t\t\t\tdie(\"MySQL storage type, not implemented yet!\");\n\t\t\t}else{\n\t\t\t\tdie(\"Unknown storage type!\");\n\t\t\t}\n\t\t\t\n\t\t\t$this->persistenceManager->deleteIpAddress($ipaddress);\n\t\t\t\n\t\t}", "public function delete($id)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand(\"/ip/address/remove\");\n $sentence->where(\".id\", \"=\", $id);\n $enable = $this->talker->send($sentence);\n return \"Sucsess\";\n }", "function delete($id) {\n $centinela = new Centinela();\n $flag = $centinela->accessTo('conf/conf_viazul_routes');\n if ($flag) {\n $this->conn->delete($id);\n } else {\n $this->redirectError();\n }\n }", "public function cliente_delete(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t$respuesta = $this->Cliente_model->delete($cliente_id);\n\t\t\n\t\t$this->response($respuesta);\n\t}", "public function destroy($id)\n\t{\n\t\t$this->network->find($id)->delete();\n\n\t\treturn Redirect::route('networks.index');\n\t}", "public function deleteAction(Request $request, $id) {\n $form = $this->createDeleteForm($id);\n $form->bind($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('MccASMemberBundle:Ip')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Ip entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('ip'));\n }", "public function deleteAction(Request $request, $id)\n {\n\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN')) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n $option=0;\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n $form_checkbox=$request->get('option');\n \n if ($form->isValid()){\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SytemSGBundle:Intervalosips')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Intervalo de Ip não existe na base de dados');\n }\n if($form_checkbox==1){\n $this->removeIntervalo($entity->getIntervalo());\n }\n $em->remove($entity);\n $em->flush();\n $this->get('session')->getFlashBag()->set('message', 'Item removido com sucesso.');\n }\n\n return $this->redirect($this->generateUrl('intervalosips'));\n }", "function index_delete() {\n $id_diagnosa = $this->delete('id_diagnosa');\n $this->db->where('id_diagnosa', $id_diagnosa);\n $delete = $this->db->delete('diagnosa');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function doRemove() {\r\n\t\t$host = xn(\"host\");\r\n\t\t\r\n\t\t$ret = $this->_mongo->selectDB(\"admin\")->command(array(\r\n\t\t\t\"removeshard\" => $host\r\n\t\t));\r\n\t\t\r\n\t\t$this->ret = $this->_highlight($ret, \"json\");\r\n\t\t\r\n\t\t$this->display();\r\n\t}", "public function DeleteComandoRisco() {\n\t\t\t$this->objComandoRisco->Delete();\n\t\t}", "public function destroy($id)\n {\n Social_network::where('id', $id)->delete();\n return redirect('/admin/network');\n }", "function delete_ip_pool() {\r\n\t\ttry {\r\n\t\t\t$conn = db_connect::getInstance();\r\n\t\t\t$result = $conn->db->query(\"SELECT IP_POOL_ID from OLT_IP_POOLS where IP_POOL_ID = '$this->id'\");\r\n\t\t} catch (PDOException $e) {\r\n\t\t\t$error = \"Connection Failed:\" . $e->getMessage() . \"\\n\";\r\n\t\t\treturn $error;\r\n\t\t}\r\n\t\twhile ($row = $result->fetch(PDO::FETCH_ASSOC)) {\r\n\t\t\tif ($row[\"IP_POOL_ID\"])\r\n\t\t\t\t$error = (\"ERROR: THIS ip_pool IS ASSIGNED TO OLT, Please remove ip_pool from OLT and then try to Delete it again!\");\r\n\t\t\t\treturn $error;\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$conn = db_connect::getInstance();\r\n\t\t\t$conn->db->query(\"DELETE FROM IP_POOL where ID='$this->id'\");\r\n\t\t} catch (PDOException $e) {\r\n\t\t\t$error = \"Connection Failed:\" . $e->getMessage() . \"\\n\";\r\n\t\t\treturn $error;\r\n\t\t}\r\n\t}", "public function destroy($id_cliente){}", "public function delete(Request $request)\n {\n // Sending data to view\n return response()->view('app.allow.mac_address.delete');\n }", "public function destroy($id = null){\n $selection = $_POST[\"selection\"];\n $sql = \"DELETE FROM NEIGHBORHOOD WHERE NEIGHBOR_ID = \" . $selection;\n $this->db->simpleQuery($sql);\n return redirect(\"neighbor\");\n }", "public function destroy($id)\n {\n // delete\n $networks = Network::find($id);\n $networks->delete();\n\n // redirect\n// Session::flash('message', 'Successfully deleted the device!');\n return redirect()->back()->with('message', 'Network device is successfully deleted!');\n }", "public static function deleteIpAddress($ipAddress)\n\t{\n\t\treturn self::_getSoapClient(array_merge(array($ipAddress), array('__method' => 'deleteIpAddress')))->deleteIpAddress($ipAddress);\n\t}", "function _deleteSubscriptionIPRanges($subscriptionId) {\n\t\treturn $this->update(\n\t\t\t'DELETE FROM institutional_subscription_ip WHERE subscription_id = ?', $subscriptionId\n\t\t);\n\t}", "public function getSubnetId()\n {\n return $this->subnet_id;\n }", "public function deleteIP($ip) {\n return $this->_mysqli->query(sprintf(\"DELETE FROM tbl_nonces WHERE s_ip = '%s' \", $this->_mysqli->real_escape_string($ip)));\n }", "public function destroy($id)\n {\n $region = $this->region->find($id);\n \n\t\t$region->delete();\n\t\treturn back()->with('message',\"Район $region->name удалена\");\n }", "function destroy($request)\n {\n\t $addressid = NULL;\n\n\t if(isset($request[\"args\"][0]))\n\t {\n\n\t\t if(!is_numeric($request[\"args\"][0]))\n\t\t\t throw new \\Exception(\"Invalid Address ID\");\n\t\t $addressid = $request[\"args\"][0];\n\n\n /**\n * Checking if the address is not deleted\n */\n $this->index($request);\n\n\n\t\t $addressObj = new AddressModel();\n\t\t if(!$addressObj->destroyAddress($addressid))\n\t\t\t throw new \\Exception(\"Address Could not be deleted\");\n\n\n\t\t return \"Address ID \".$addressid.\" deleted successfully \";\n\t }\n }", "public function eliminac($id)\n {\n clientes::find($id)->delete();\n $titulo = \"Desactivar cliente\";\n $mensaje1 = \"El cliente a sido desactivado correctamente\";\n return view ('cliente.mensaje1')\n ->with('titulo',$titulo)\n ->with('mensaje1',$mensaje1);\n \n }", "public function delNumeroIP( ) {\n $longitud=strlen($this->numero_ip);\n $this->setNumeroIP(substr($this->numero_ip, 0,$longitud-1));\n }", "public function deleteAddress(){\n $key = $_REQUEST['id'];\n //$key = 2;\n $condition['id'] = $key;\n $form = M(\"addressinfo\");\n $data = $form->where($condition)->delete();\n //$this->display();\n }", "public function actionDelete($id, $app_id=NULL)\n {\n $model = $this->findModel($id);\n ///仅仅用户与该应用在同一个系统组才可以操作\n $temp = DcmdApp::findOne($model['app_id']);\n $query_svr=NULL;\n if($temp->is_self) {\n $query_svr = DcmdUserGroup::findOne(['uid'=>Yii::$app->user->getId(), 'gid'=>$temp['svr_gid']]);\n }\n $query = DcmdUserGroup::findOne(['uid'=>Yii::$app->user->getId(), 'gid'=>$temp['sa_gid']]);\n if($query==NULL && $query_svr==NULL && Yii::$app->user->getIdentity()->sa != 1) {\n Yii::$app->getSession()->setFlash('success', NULL);\n Yii::$app->getSession()->setFlash('error', \"对不起, 你没有权限!\");\n return $this->redirect(array('dcmd-app/view', 'id'=>$model['app_id']));\n }\n $node = DcmdServicePool::find()->where(['svr_id' => $id])->one();\n if($node) {\n Yii::$app->getSession()->setFlash('error', '服务池子不为空,不可删除!');\n }else {\n $this->oprlog(3, \"delete svrvice:\".$model->svr_name);\n $this->deleteDiagram($id);\n $model->delete();\n Yii::$app->getSession()->setFlash('success', '删除成功!');\n }\n if ($app_id) {\n return $this->redirect(array('dcmd-app/view', 'id'=>$app_id));\n }\n return $this->redirect(['index']);\n }", "function removeZone($id){\n\t\ttry{\n\t\t\t$db = getConnection();\n\n\t\t\t$sql = \"DELETE FROM infrastructure_zones WHERE id = ?\";\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->execute(array($id));\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t echo $e->getMessage();\n\t }\n\t}", "public function delete_address(){\n if(!wp_verify_nonce($_REQUEST[\"_wpnonce\"],\"wedevs_delete_address_n\")){\n wp_die(\"Are You cheating?\");\n }\n if(!current_user_can(\"manage_options\")){\n wp_die(\"Are You cheating?\");\n }\n $id=isset($_REQUEST[\"id\"])?intval($_REQUEST['id']):0;\n\n if(wedevs_delete_single_address($id)){\n $redirect_to=admin_url(\"admin.php?page=weDevsAcademy&address_delete=true\");\n }else{\n $redirect_to=admin_url(\"admin.php?page=weDevsAcademy&address_delete=false\");\n }\n wp_redirect($redirect_to);\n exit;\n }", "public function deleteIpControl($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->deleteIpControlWithOptions($request, $runtime);\n }", "public function delete()\n {\n $this->model->deleteStations($_GET['id']);\n $this->model->deleteZone($_GET['id']);\n header(\"Location: /resabike/zone\");\n }", "public function delete($id){\n\t\t$dropCliente = Cliente::find($id);\n\t\t$dropCliente->delete();\n\t}", "function DeleteRep($HostServer) { // Detruit le repertoire de la sauvegarde de la machine HostServer\n\t$dir_backup=\"/var/lib/backuppc/pc/\";\n\tif($HostServer==\"\") {\n\t\treturn;\n\t}\n\t$rep = $dir_backup.$HostServer;\n\tif(is_dir($rep)) {\n $cmd=\"/usr/bin/sudo /usr/share/se3/scripts/move_rep_backuppc.sh delete \".$HostServer;\n exec($cmd);\n }\n}", "public function destroy($id)\n {\n try{\n $client = Client::findOrFail($id);\n $client->address()->delete();\n // $client->machine()->delete();\n $machines = Machine::all();\n foreach($machines as $machine){\n if ($machine->client_id == $id) {\n $machine->delete();\n }\n }\n\n // foreach($address as $data){\n // if($data->client_id == $client->id){\n // $address->delete();\n // }\n // }\n\n $client->delete();\n // $client->address()->delete;\n }catch(\\Exception $exception){\n\n DB::rollback();\n return back()\n ->with('msg_error','Erro no servidor ao excluir cliente');\n \n } \n\n return redirect()\n ->route('clients.index')\n ->with('msg_success', 'Cliente deletado');\n }", "public function delete($id_rekap_nilai);", "public static function eliminarServicio($id_servicio){\n \n $eliminar = Neo4Play::client()->getNode($id_servicio);\t\t\n $eliminar->delete();\t\n \n\t}", "public function destroy(Request $request, $id) {\n $cancer = Cancer::find($id);\n\n if (!$cancer instanceof Cancer) {\n return \"Mi pana, el cancer con el id ${id} no existe\";\n }\n\n $cancer->enable = false;\n $cancer->save();\n\n $bitacora = new Bitacora();\n $bitacora->ip = $request->getClientIp();\n $bitacora->operacion = 'eliminar';\n $bitacora->tabla = 'cancer';\n $bitacora->save();\n\n return response()->json('Cancer deshabilitado correctamente');\n }", "public function destroy(Request $request, $id)\n {\n Grupo::destroy($id);\n\n\n\n $bitacora = new Bitacora;\n $bitacora->user_id = Auth::id();\n $consulta = User::where('id',Auth::id())->select(\"nombres\",\"apellidos\",\"rolprimario\",\"rolsecundario\")->get();\n foreach($consulta as $item){\n $nombres = $item->nombres;\n $apellidos = $item->apellidos;\n $rolprimario = $item->rolprimario;\n $rolsecundario = $item->rolsecundario;\n }\n \n $bitacora->usuario = $nombres.\" \".$apellidos;\n $bitacora->rol = $rolprimario.\", \".$rolsecundario;\n $bitacora->fecha = Carbon::now()->setTimezone('America/Caracas')->toDateString();\n $bitacora->hora = Carbon::now()->setTimezone('America/Caracas')->toTimeString();\n $bitacora->accion = \"Eliminado grupo\";\n $bitacora->direccion_ip = $request->getClientIp();\n $bitacora->save();\n\n return redirect('grupo');\n }", "final public function delete($id) {\n global $config;\n $this->db->query(\"DELETE FROM Nino_2 WHERE codigo_nino='$codigo'\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'ninos/&success=true');\n }", "public function delete($ip)\n {\n // TODO: Implement delete() method.\n }", "public function deleteCollectionHostSubnet(\n $fieldSelector = null,\n $labelSelector = null,\n $resourceVersion = null,\n $timeoutSeconds = null,\n $watch = null,\n $pretty = null\n ) {\n\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n \n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.'/oapi/v1/hostsubnets';\n\n //process optional query parameters\n APIHelper::appendUrlWithQueryParameters($_queryBuilder, array (\n 'fieldSelector' => $fieldSelector,\n 'labelSelector' => $labelSelector,\n 'resourceVersion' => $resourceVersion,\n 'timeoutSeconds' => $timeoutSeconds,\n 'watch' => var_export($watch, true),\n 'pretty' => $pretty,\n ));\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'APIMATIC 2.0',\n 'Accept' => 'application/json'\n );\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::DELETE, $_headers, $_queryUrl);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::delete($_queryUrl, $_headers);\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n\n $mapper = $this->getJsonMapper();\n\n return $mapper->mapClass($response->body, 'OpenShiftAPIWithKubernetesLib\\\\Models\\\\V1Status');\n }", "public function destroy($id)\n {\n $travelgrant = TravelGrant::findOrFail($id);\n $ipAddress = new CaptureIpTrait();\n\n \n #$travelgrant->deleted_ip_address = $ipAddress->getClientIp();\n $travelgrant->save();\n $travelgrant->delete();\n\n return redirect('travel-grants')->with('success', trans('travelgrants.deleteSuccess'));\n\n }", "public function deletaCliente($id) {\n }", "public function delete($id)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand('/ip/hotspot/remove');\n $sentence->where('.id', '=', $id);\n $enable = $this->talker->send($sentence);\n\n return 'Sucsess';\n }", "function deletePartition() {\n\n global $connection_production;\n\n if (isset($_POST['delete_league'])) {\n\n echo 'working';\n }\n }", "function deleteChildNameServerIp($userName,$password,$role,$langpref,$parentid,$orderId,$cns,$ipAddress)\n\t\t{\n\t\t\t$para = array($userName,$password,$role,$langpref,$parentid,$orderId,$cns,$ipAddress);\n\t\t\t$return = $this->s->call(\"deleteChildNameServerIp\",$para);\n\t\t\t$this->debugfunction();\n\t\t\treturn $return;\n\t\t}", "public function eliminar(Request $request, $id)\n {\n Asignacion::destroy($id);\n\n $bitacora = new Bitacora;\n $bitacora->user_id = Auth::id();\n $consulta = User::where('id',Auth::id())->select(\"nombres\",\"apellidos\",\"rolprimario\",\"rolsecundario\")->get();\n foreach($consulta as $item){\n $nombres = $item->nombres;\n $apellidos = $item->apellidos;\n $rolprimario = $item->rolprimario;\n $rolsecundario = $item->rolsecundario;\n }\n \n $bitacora->usuario = $nombres.\" \".$apellidos;\n $bitacora->rol = $rolprimario.\", \".$rolsecundario;\n $bitacora->fecha = Carbon::now()->setTimezone('America/Caracas')->toDateString();\n $bitacora->hora = Carbon::now()->setTimezone('America/Caracas')->toTimeString();\n $bitacora->accion = \"Eliminada asignacion de materia-grupo-horario\";\n $bitacora->direccion_ip = $request->getClientIp();\n $bitacora->save();\n\n return redirect('asignacion');\n }", "public function destroy(Request $request, $id)\n {\n Unidad_CentroCostos::where('idunidadcentrocostos', '=', $id)->delete();\n return redirect()->action('UnidadController@edit', $request['codigoUnidad'])->with('mensaje', 'Centro Costos Eliminado');\n }", "public function destroy($id)\n {\n Port::destroy($id);\n\n $isDeleted = true;\n\n $ports = Port::all();\n $servers = Server::all();\n $cryptos = Crypto::hydrate( DB::table('cryptos')->orderBy('name')->get()->toArray() );\n return view('ports.index', compact('ports','servers', 'cryptos', 'isDeleted'));\n }", "public function destroy(NetworkIPSEC $networkIPSEC)\n {\n //\n }", "public function testDeleteOutroCardForTenantAdmin(): void\n {\n $token = $this->loginByEmail(self::TENANT_ADMIN_1[0], self::TENANT_ADMIN_1[1]);\n\n // Request\n $response = $this->delete('api/v1/outroCards/tenants/2?token=' . $token);\n\n // Check response status\n $response->assertStatus(200);\n\n // Check response structure\n $response->assertJsonStructure(\n [\n 'success',\n 'code',\n 'data',\n 'message'\n ]\n );\n $responseJSON = json_decode($response->getContent(), true);\n $success = $responseJSON['success']; // array\n $code = $responseJSON['code']; // array\n $message = $responseJSON['message']; // array\n $data = $responseJSON['data']; // array\n\n $this->assertEquals(true, $success);\n $this->assertEquals(200, $code);\n $this->assertEquals(null, $data);\n $this->assertEquals(\"Deleted The Outro Card.\", $message);\n\n $removedOutroCard = OutroCard::where('tenant_id', 2)->first();\n $this->assertEquals(null, $removedOutroCard->outro_card);\n }", "public function delete_mnt_record()\r\n {\r\n $mnt_id = $this->input->get('mnt_id');\r\n echo $this->maintenance_model->delete_record($mnt_id);\r\n\r\n }", "public function deleteServer ($id) {\n $server = Server::find($id);\n\n if ($server) {\n $server->delete();\n }\n return redirect('servers');\n }", "public function delete( $option );", "public function delete()\n\t{\n\t\t$id=$this->uri->segment(3);\n\t\t$this->cazuri_m->delete($id);\n\t\tredirect('cazuri','refresh'); //redirectioneaza utilizatorul pe pagina cu cazuri\n\t}", "public function destroy(Request $request, $id) {\n\t$band = Band::find($id);\n\t\n\t$band->delete();\n\t\n\treturn \"Band record successfully deleted #\" . $request->input('id');\n }", "function teamdelete(){\n $this->auth(COMP_ADM_LEVEL);\n $team_id = $this->uri->segment(3);\n $contest_id = urldecode($this->uri->segment(4));\n $this->m_key->removeTeam($team_id);\n $this->m_team->delete($team_id, $contest_id);\n $this->teams($contest_id);\n }", "public function deleteContract(Request $request, Response $response, array $args)\n {\n// if ($_SESSION['user_type'] != 'admin') {\n// $response = $response->withStatus(403);\n// $response = $response->withHeader(\"Content-Type\", \"application/json\");\n// $results = array(\n// \"error\" => \"Unauthorized access to endpoint\"\n// );\n// $response->getBody()->write(json_encode($results));\n// return $response;\n// }\n $connection = $this->container->get(\"db\");\n $contract_id_param = $args['cid'];\n\n $stmt = $connection->prepare(\n \"DELETE FROM \".ContractController::$contract_table_name.\" WHERE contract_id=:cid\"\n );\n\n $stmt->bindValue(':cid', $contract_id_param, PDO::PARAM_INT);\n $successful = $stmt->execute(); // $result = success/fail of execution\n\n if (!$successful) {\n $response = $response->withStatus(404);\n $response = $response->withHeader(\"Content-Type\", \"application/json\");\n $results = array(\n \"error\" => \"Contract with ID '\".$contract_id_param.\"' was not deleted successfully\"\n );\n $response->getBody()->write(json_encode($results));\n return $response;\n }\n\n $response = $response->withHeader(\"Content-Type\", \"application/json\");\n $results = array(\n \"message\" => \"Successfully delete the contract with ID'\".$contract_id_param\n );\n $response->getBody()->write(json_encode($results));\n return $response;\n }", "function index_delete() {\n $id = $this->delete('id'); // Memanggil data berdasarkan arraynya\n $this->db->where('id', $id);\n $delete = $this->db->delete('telepon'); \n if ($delete) {\n $this->response(array('status' => 'success'), 201);// Jika berhasil maka akan tampil\n } else {\n $this->response(array('status' => 'fail', 502));// Jika gagal maka akan tampil\n }\n }", "public function deleteConnectionWithGroup(){\n $respondent = $this->id;\n $table = 'tbl_link_users_group_respondents';\n $sql = 'DELETE FROM '.$table.' WHERE respondents_id=:respondent';\n $command = Yii::app()->db->createCommand($sql);\n $command->bindParam(\":respondent\", $respondent);\n $command->execute();\n }", "public function deleteServer() {\n $request = $this->client->delete($this->pathName . \"/\" . $this->serverId, []);\n\n $this->response = $request->getBody();\n\n if ($request->getStatusCode() == 200) {\n $this->response = json_encode([\n 'status' => 'success',\n 'message' => 'Server rebooted',\n ]);\n }\n\n return $this;\n }", "public function destroy($id)\n {\n Ethnic::findOrFail($id)->delete();\n return redirect()\n ->route('admin.general.ethnics.index')\n ->with('success', 'Ethnic delete successfully');\n }", "public function destroy(Request $request)\n {\n $user = \\Authorization::user();\n return $user->adresses()->where('id', '=', $request->address)->delete();\n }", "public function destroy($id, Request $request)\n {\n \n $deleteVM = VM::with('rework')->find($id);\n \n $path = storage_path('app/'.$deleteVM->dir);\n $process = new Process('terraform12 destroy -var=\"project='.$deleteVM->project.'\" -lock=false -no-color -auto-approve');\n //$process = new Process('ping -c 50 www.google.com');\n $process->setTimeout(3600);\n $process->setWorkingDirectory($path);\n $process->run();\n Log::debug($process->getOutput()); \n if ($process->isSuccessful()) {\n $deleteVM->active = 0;\n $deleteVM->jira = $deleteVM->jira.'/'.$request->jira;\n $deleteVM->deleted_by = Auth::user()->name;\n if($deleteVM->save()){\n\n if(count($deleteVM->rework)){\n $this->openstack->deleteVolume($deleteVM);\n }\n\n Mail::to('[email protected]')->send(new IpUpdateNotification($deleteVM));\n $explodeHostname = explode('.',$deleteVM->hostname);\n $policy = $explodeHostname[0].'_'.$deleteVM->username;\n\n $cookieName = 'del-'.$deleteVM->name;\n $this->ipa->login($cookieName);\n // $this->ipa->deleteUser($deleteVM->username, $cookieName);\n $this->ipa->deleteHost($deleteVM->hostname, $cookieName);\n $this->ipa->deletePolicy($policy, $cookieName);\n $this->ipa->delDNS($explodeHostname[0], $cookieName);\n Log::info($deleteVM->vmname.'- VM deleted');\n return $deleteVM->id;\n }\n }else{\n dd('error');\n }\n\n\n \n }", "public function destroy($id)\n { \n // Valor de cliente: \"http://localhost/laravel/balance/public/api/ \n // apunto a la funcion api_destroy\n $this->cliente->delete('ingresos/' . $id);\n return back()->with('Mensaje','Ingreso eliminado correctamente');\n }", "public function delete($id)\n {\n return view('nodes.delete')\n ->with('node', Node::findOrFail($id));\n }", "public function destroy($id)\n {\n $deleted = RadIpPoolProvider::find($id);\n $deleted->delete();\n return redirect('../public/radippool')->with('success', 'Data Removed');\n }", "public function destroy($subdomain,$id)\n {\n //\n }", "public function delete(){\r\n\t\t// goi den phuong thuc delete cua tableMask voi id cua man ghi hien hanh\r\n\t\t$mask = $this->mask();\r\n\t\treturn $mask->delete(array($mask->idField=>$this->id));\r\n\t\t// $query = \"DELETE FROM $this->tableName WHERE id='$this->id'\";\r\n\t\t// $conn = self::getConnect()->prepare($query);\r\n\t}", "public function delete($id) {\n\n$annonce= Annonce:: findorfail($id) ; \n\n//$image->delete();\n$annonce->delete();\n\nreturn view('index');\n}", "public function deleteAction() {\r\n \t$id = intval($this->getInput('id'));\r\n \t$addressInfo = Gc_Service_UserAddress::getUserAddress($id);\r\n \t$webroot = Yaf_Application::app()->getConfig()->webroot;\n \tif (!$addressInfo || $addressInfo['user_id'] != $this->userInfo['id']) {\n \t\t$this->redirect($webroot.'/user/index/index');\n \t}\r\n \t$ret = Gc_Service_UserAddress::deleteUserAddress($id);\r\n \tif (!$ret) $this->output(-1, '操作失败.');\r\n \t$this->output(0, '操作成功.');\r\n }", "public function delIpRuleAction($zoneid = 0, $uuid)\n {\n $result = array(\"result\"=>\"failed\");\n if ($this->request->isPost() && $uuid != null) {\n $mdlCP = new CaptivePortal();\n $cpZone = $mdlCP->getByZoneID($zoneid);\n if ($cpZone != null) {\n if ($cpZone->ipAccess->ipRule->del($uuid)) {\n // if item is removed, serialize to config and save\n $mdlCP->serializeToConfig();\n Config::getInstance()->save();\n if ($this->reloadConfig($mdlCP)) {\n $result['result'] = 'deleted';\n }\n } else {\n $result['result'] = 'not found';\n }\n }\n }\n return $result;\n }", "public function destroy($id,$tipo)\n {\n $ip = request()->server();\n $user =auth()->user();\n\n $venta = Venta::find($id);\n\n $mensaje = Venta::find($id);\n $darBaja =\"200\"; \n $darAlta =\"400\";\n $eliminado =\"600\";\n if($tipo === $darBaja){\n //si es 200 de da de baja\n $venta->estado = false;\n Log::info( 'IP DEL CLIENTE:'. $ip['REMOTE_ADDR'] . ' CLIENTE: '. $user->name . ' DESDE NAVEGADOR:'.$ip['HTTP_USER_AGENT'] . ' DESCRIPCIÓN: Venta dado de baja, id: ' .$mensaje->id . ', Nombre: ' . $mensaje->nombre . ' ' );\n \n $venta->save();\n\n return back()->with('info', 'Dado de baja correctamente');\n }\n if($tipo === $darAlta){\n //si es 400 dar Alta\n $venta->estado = true;\n Log::info( 'IP DEL CLIENTE:'. $ip['REMOTE_ADDR'] . ' CLIENTE: '. $user->name . ' DESDE NAVEGADOR:'.$ip['HTTP_USER_AGENT'] . ' DESCRIPCIÓN: Venta dado de alta, id: ' .$mensaje->id . ', Nombre: ' . $mensaje->nombre . ' ' );\n $venta->save();\n\n return back()->with('info', 'Dado de alta correctamente');\n }\n if($tipo === $eliminado){\n //si es 400 de cambia el eliminado\n $venta->eliminado = true;\n\n //Cambia el estado eliminado de las areas dependientes de este venta\n //DB::table('areas')->where('departamento_id',$venta->id)->update(['eliminado'=>true]);\n\n Log::info( 'IP DEL CLIENTE:'. $ip['REMOTE_ADDR'] . ' CLIENTE: '. $user->name . ' DESDE NAVEGADOR:'.$ip['HTTP_USER_AGENT'] . ' DESCRIPCIÓN: Venta eliminado, id: ' .$mensaje->id . ', Nombre: ' . $mensaje->nombre . ' ' );\n $venta->save();\n\n return back()->with('info', 'Eliminado correctamente');\n }\n \n }", "private function deleteLdapServer() {\n global $xmlConfig;\n $xpath = \"//services/ldapserver\";\n\t\t$object = $xmlConfig->get($xpath);\n //stop the openldap service while we clear the ldap directory\n $cmd = \"service slapd stop\";\n if (0 !== $this->exec($cmd, $output)) {\n throw new OMVException(OMVErrorMsg::E_EXEC_FAILED,\n $cmd, implode(\"\\n\", $output));\n }\n \n //now we clear the ldap directory\n $ldapDir=\"/var/lib/ldap\";\n $ldapConf=\"/etc/ldap/slapd.d\";\n $delCmd=\"rm -rf $ldapDir/* $ldapConf/cn=config $ldapConf/cn=config.ldif\";\n if (0 !== $this->exec($delCmd, $output)) {\n throw new OMVException(OMVErrorMsg::E_EXEC_FAILED,\n $delCmd, implode(\"\\n\", $output));\n }\n }", "function delete_trip_id() {\n $id = $this->uri->segment(3);\n $this->insert_model->delete_trip_id($id);\n $this->trip_id();\n }", "public function destroy(Request $request,$id)\n {\n $tcc = $this->getTccs($request, $id);\n if($tcc == null) {\n return response(view('403'), 403);\n }\n\n $tcc->professoresBanca()->detach();\n $result = $tcc->delete($tcc->id);\n\n if($result) {\n return back()->with('success', 'Excluido com sucesso');\n }\n\n return back()->with('error', 'Houve um erro ao realizar a operação');\n }", "public function deleteTemplate ()\n {\n // Recovering template id\n $target =Input::get('data'); \n \n // Removing template\n $num = DB::update(\"DELETE FROM ezz_templates where id_template = $target\");\n return response () -> json ([\n 'borradas' => $num,\n 'status' => 'success'\n ],200);\n }", "public function restaurarc($id)\n {\n //echo \"El maestro a eliminar es $idm\";\n clientes::withTrashed()->where('id',$id)->restore();\n // find($idm)->delete();\n $titulo = \"Restaurar cliente\";\n $mensaje1 = \"El cliente a sido restaurado correctamente\";\n return view ('cliente.mensaje1')\n ->with('titulo',$titulo)\n ->with('mensaje1',$mensaje1);\n }", "public function delete()\r\n\t{\r\n\t\t$this->auth->restrict('Banner.Content.Delete');\r\n\r\n\t\t$id = $this->uri->segment(6);\r\n\r\n\t\tif (!empty($id))\r\n\t\t{\r\n\r\n\t\t\tif ($this->banner_group_model->delete($id))\r\n\t\t\t{\r\n\t\t\t\t// Log the activity\r\n\t\t\t\t$this->activity_model->log_activity($this->current_user->id, lang('banner_act_delete_record').': ' . $id . ' : ' . $this->input->ip_address(), 'banner');\r\n \r\n // Delete all banner in the group\r\n\t\t\t\t$this->banner_model->delete_where(array('banner.group_id' => $id));\r\n \r\n\t\t\t\tTemplate::set_message(lang('banner_delete_success'), 'success');\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tTemplate::set_message(lang('banner_delete_failure') . $this->banner_group_model->error, 'error');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tredirect(SITE_AREA .'/content/banner/groups');\r\n\t}", "public function vymaz(){\r\n $db = napoj_db();\r\n $sql =<<<EOF\r\n DELETE FROM Diskusie WHERE id = \"$this->ID\";\r\nEOF;\r\n $ret = $db->exec($sql);\r\n if(!$ret){\r\n echo $db->lastErrorMsg();\r\n }\r\n $db->close();\r\n }", "public function destroy($mask): JsonResponse\n {\n try {\n $shelf = Shelf::where(\"mask\", $mask)->firstOrFail();\n $shelf->delete();\n return $this->successResponse(\"Shelf deleted successfully.\");\n }\n catch (ModelNotFoundException $e) {\n return $this->notFoundResponse();\n }\n catch (Exception $e) {\n return $this->errorResponse($e->getMessage());\n }\n }", "public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$query = $this->podb->deleteFrom('detailfasilitaskesehatan')->where('id', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query->execute();\n\t\t\t$this->poflash->success('Detailfasilitaskesehatan has been successfully deleted', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t}\n\t}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function destroy($id)\n {\n\n\n $LDdeleted = LabelDetail::where(\"id\", $id)->delete();\n\n if($LDdeleted) {\n print \"successfully dlete label detail $id\";\n } else {\n print \"failed to dleted label detail $id\";\n }\n\n }" ]
[ "0.6741856", "0.6202219", "0.58431697", "0.5778033", "0.5552737", "0.5428738", "0.54147714", "0.5357392", "0.5339986", "0.5291946", "0.52326626", "0.5214437", "0.5194922", "0.5172071", "0.51681715", "0.5154211", "0.50551534", "0.5045336", "0.5015896", "0.5012315", "0.49923727", "0.4986073", "0.49826735", "0.4977966", "0.49712542", "0.4943071", "0.49414176", "0.4940801", "0.49300444", "0.49143615", "0.49009225", "0.48999038", "0.48984873", "0.4896155", "0.48832768", "0.48795658", "0.4879265", "0.48706484", "0.48515505", "0.4839216", "0.4836444", "0.48332077", "0.48327723", "0.4832589", "0.48292863", "0.48267615", "0.4821449", "0.47987837", "0.47975084", "0.47961906", "0.47939336", "0.47880745", "0.47775224", "0.47749582", "0.4774048", "0.47689345", "0.47605276", "0.4753318", "0.4751703", "0.47286433", "0.472728", "0.47206345", "0.47154355", "0.47150397", "0.47125056", "0.47106937", "0.47101438", "0.47049096", "0.47028077", "0.47013298", "0.46954855", "0.46933356", "0.46897236", "0.4684833", "0.4678009", "0.4671348", "0.46683648", "0.46668482", "0.4664994", "0.46603924", "0.46597695", "0.46560282", "0.46546125", "0.46532673", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.4652628", "0.46525872" ]
0.69273627
0
Destroys DHCP server subnet.
function destroy($iface) { try { $this->load->library('dhcp/Dnsmasq'); $this->dnsmasq->delete_subnet($iface); $this->dnsmasq->reset(TRUE); $this->page->set_status_deleted(); redirect('/dhcp/subnets'); } catch (Exception $e) { $this->page->view_exception($e); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function deleteSubnet( $subnetID ){\n\t\t\tglobal $wpdb;\n\n\t\t\tglobal $switched;\n\t\t\tswitch_to_blog(1);\n\t\t\t\n\t\t\t$wpdb->query( $wpdb->prepare(\n\t\t\t\t\"DELETE FROM \".$wpdb->prefix.\"wps_subnets\n\t\t\t\tWHERE id = '%d'\",\n\t\t\t\t$subnetID\n\t\t\t) );\n\n\t\t\trestore_current_blog();\n\t\t}", "public function destroy(NetworkIPSEC $networkIPSEC)\n {\n //\n }", "function delete($iface)\n {\n $this->lang->load('dhcp');\n\n $confirm_uri = '/app/dhcp/subnets/destroy/' . $iface;\n $cancel_uri = '/app/dhcp/subnets';\n $items = array($iface . ' - ' . lang('dhcp_dhcp'));\n\n $this->page->view_confirm_delete($confirm_uri, $cancel_uri, $items);\n }", "public function destroy()\n\t{\n\t\t$this->init();\n\t\tif (!shmop_delete($this->shmId)) {\n\t\t\t$msg = sprintf(\"Can't destroy shared memory segment (shmId: 0x%s)\", $this->shmId);\n\t\t\tthrow new AzaException($msg, 1);\n\t\t}\n\t\t$this->detach();\n\t}", "public function destroy(WithdrawNetwork $withdrawNetwork)\n {\n //\n }", "function delete_network_option($network_id, $option)\n {\n }", "public function destroy(Address $address)\n {\n //\n }", "public function destroy(Address $address)\n\t{\n\t\t//\n\t}", "public function destroy(Neighbor $neighbor)\n {\n //\n }", "private function deleteLdapServer() {\n global $xmlConfig;\n $xpath = \"//services/ldapserver\";\n\t\t$object = $xmlConfig->get($xpath);\n //stop the openldap service while we clear the ldap directory\n $cmd = \"service slapd stop\";\n if (0 !== $this->exec($cmd, $output)) {\n throw new OMVException(OMVErrorMsg::E_EXEC_FAILED,\n $cmd, implode(\"\\n\", $output));\n }\n \n //now we clear the ldap directory\n $ldapDir=\"/var/lib/ldap\";\n $ldapConf=\"/etc/ldap/slapd.d\";\n $delCmd=\"rm -rf $ldapDir/* $ldapConf/cn=config $ldapConf/cn=config.ldif\";\n if (0 !== $this->exec($delCmd, $output)) {\n throw new OMVException(OMVErrorMsg::E_EXEC_FAILED,\n $delCmd, implode(\"\\n\", $output));\n }\n }", "public function destroy(Rsp $rsp)\n {\n //\n }", "public function shutdown(): NetworkInterface;", "public function stop() {\r\n\t\tif (( string ) $this->data->ipaddr == 'dhcp') {\r\n\t\t\t$this->disableDHCP ();\r\n\t\t}\r\n\t\tparent::stop ();\r\n\t}", "public function destroy(Nid $nid)\n {\n //\n }", "public function disableDHCP() {\r\n\t\tFunctions::shellCommand ( \"/sbin/ifconfig \" . ( string ) $this->data->if . \" down\" );\r\n\t\tsleep ( 1 );\r\n\t\t$pid = Functions::shellCommand ( 'ps awux | grep dhclient | grep -v grep | grep ' . ( string ) $this->data->if . ' | awk \\'{ print $2 }\\'' );\r\n\t\tif (! empty ( $pid )) {\r\n\t\t\tFunctions::shellCommand ( \"kill {$pid}\" );\r\n\t\t}\r\n\t}", "public function destroy() {\n\t\t$this->removeInstance();\n\t\t$this->tearDownTestDatabase();\n\t}", "public static function destroy() {}", "public function destroy(Ibd $ibd)\n {\n //\n }", "public function down()\n\t{\n\t\t//\n Schema::drop('satellites');\n\t}", "public function destroy();", "public function destroy();", "public function destroy();", "public function destroy();", "public function destroy();", "public function destroy();", "public function destroy();", "public function destroy(Snake $snake)\n {\n\n }", "public function destroy(Ip $ip)\n {\n //\n }", "function deleteIpAddress($ipaddress){\n\t\t\t//load data from persistence object\n\t\t\t$storageType \t\t= $this->configManager->getStorageType();\n\t\t\n\t\t\t\t\t\t\t\t\n\t\t\tif(strtolower($storageType) == 'file'){\n\t\t\t\t$fileName = $this->configManager->getDataDir().'/'.$this->configManager->getBanFileName();\n\t\t\t\t$this->persistenceManager->setStorageType('file');\n\t\t\t\t$this->persistenceManager->setBanFile($fileName);\n\t\t\t}elseif(strtolower($storageType) == 'mysql'){\n\t\t\t\tdie(\"MySQL storage type, not implemented yet!\");\n\t\t\t}else{\n\t\t\t\tdie(\"Unknown storage type!\");\n\t\t\t}\n\t\t\t\n\t\t\t$this->persistenceManager->deleteIpAddress($ipaddress);\n\t\t\t\n\t\t}", "public static function destroy();", "protected function destroyServer(Server $server)\n\t{\n\t\t// Get pid from temp location\n\t\tif (file_exists($filename = $server->getServerPidPath()))\n\t\t{\n\t\t\t$pid = (int) file_get_contents($filename);\n\t\t\tif ($pid)\n\t\t\t{\n\t\t\t\t$this->killProcessById($server, $pid);\n\t\t\t}\n\t\t\t@unlink($filename);\n\t\t}\n\t}", "public function destroy() {}", "public function destroy() {}", "public function destroy() {}", "public function destroy() {}", "public function destroy() {}", "public function destroy() {}", "public function getSubnetId()\n {\n return $this->subnet_id;\n }", "public function destroy(District $district)\n {\n //\n }", "public function destroy(District $district)\n {\n //\n }", "public function destroy(District $district)\n {\n //\n }", "public function __destroy()\n {\n socket_close($this->socket);\n }", "public function destroy()\n {\n /**\n * We don't clean up swap because of performance considerations\n * Cleaning is performed by Memory Manager destructor\n */\n\n $this->_memManager->unlink($this, $this->_id);\n }", "public function destroy(ShippingZone $shippingZone)\n {\n //\n }", "public function destroy(Namaz $namaz)\n {\n //\n }", "public function destroy(Reply $reply)\n {\n //\n }", "public function destroy(Reply $reply)\n {\n //\n }", "public static function destroy()\n {\n static::getInstance()->destroy();\n }", "public function destroy(Slot $slot)\n {\n //\n }", "public function destroy(Holiday $holiday)\n {\n //\n }", "public function destroy(Holiday $holiday)\n {\n //\n }", "function destroy($request)\n {\n\t $addressid = NULL;\n\n\t if(isset($request[\"args\"][0]))\n\t {\n\n\t\t if(!is_numeric($request[\"args\"][0]))\n\t\t\t throw new \\Exception(\"Invalid Address ID\");\n\t\t $addressid = $request[\"args\"][0];\n\n\n /**\n * Checking if the address is not deleted\n */\n $this->index($request);\n\n\n\t\t $addressObj = new AddressModel();\n\t\t if(!$addressObj->destroyAddress($addressid))\n\t\t\t throw new \\Exception(\"Address Could not be deleted\");\n\n\n\t\t return \"Address ID \".$addressid.\" deleted successfully \";\n\t }\n }", "public function destroy(ZoznamStn $zoznamStn)\n {\n //\n }", "function is_subnet($subnet) {\n\tif (!is_string($subnet))\n\treturn false;\n\n\tlist($hp,$np) = explode('/', $subnet);\n\n\tif (!is_ipaddr($hp))\n\treturn false;\n\n\tif (!is_numeric($np) || ($np < 1) || ($np > 32))\n\treturn false;\n\n\treturn true;\n}", "public function destroy(Dotb $dotb)\n {\n //\n }", "public function destroy(Reservation $reservation)\n {\n //\n }", "public function destroy(Reservation $reservation)\n {\n //\n }", "public function destroy(Reservation $reservation)\n {\n //\n }", "public function destroy(Reservation $reservation)\n {\n //\n }", "public function destroy(Reservation $reservation)\n {\n //\n }", "public function destroy()\n {\n $this->getGraph()->removeEdge($this);\n foreach ($this->getVertices() as $vertex) {\n $vertex->removeEdge($this);\n }\n }", "public function setSubnetId($var)\n {\n GPBUtil::checkString($var, True);\n $this->subnet_id = $var;\n\n return $this;\n }", "function __DESTRUCT() {\n self::disconnect();\n }", "public function destroy() {\n $this->connection->schema()->dropTable($this->mapTable);\n $this->connection->schema()->dropTable($this->messageTable);\n }", "public function destroy()\n {\n $db = XenForo_Application::get('db');\n $db->query('DROP TABLE `' . self::DB_TABLE . '`');\n }", "public function destroy(Districts $districts)\n {\n //\n }", "public function destroy(Town $town)\n {\n //\n }", "public function destroy(Hora $hora)\n {\n //\n }", "public function destroy()\n {\n $this->stop();\n $this->setupListeners();\n }", "public function destroy(Region $region)\n {\n //\n }", "public function destroy(Region $region)\n {\n //\n }", "public function destroy(Equivalent $equivalent)\n {\n //\n }", "public function __destruct()\n\t{\n\t\tif ($this->hasInitialised)\n\t\t{\n\t\t\tforeach ($this->servers as $server)\n\t\t\t{\n\t\t\t\t$this->destroyServer($server);\n\t\t\t}\n\t\t}\n\t}", "public function destroy(Rezervation $rezervation)\n {\n //\n }", "public static function checkIPSubnet( $ipAddress ){\n\t\t\tglobal $wpdb;\n\n\t\t\t/*\n\t\t\t\tGrabs allowed subnets from the \n\t\t\t\tcurrent blog.\n\t\t\t*/\n\t\t\tif( is_multisite() ){\n\t\t\t\t$currentBlogID = get_current_blog_id();\n\n\t\t\t\tglobal $switched;\n\t\t\t\tswitch_to_blog(1);\n\n\t\t\t\t$subnets = $wpdb->get_results( $wpdb->prepare(\n\t\t\t\t\t\"SELECT *\n\t\t\t\t\t FROM \".$wpdb->prefix.\"wps_subnets\n\t\t\t\t\t WHERE blog_id = '%d'\",\n\t\t\t\t\t $currentBlogID\n\t\t\t\t), ARRAY_A );\n\n\t\t\t\trestore_current_blog();\n\t\t\t}else{\n\t\t\t\t$subnets = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.\"wps_subnets\", ARRAY_A );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tIterates through subnets and checks to see\n\t\t\t\tif the IP address is within the range.\n\t\t\t*/\n\t\t\tforeach( $subnets as $subnet ){\n\t\t\t\t$subnetParts \t= explode( '.', $subnet['start_ip'] );\n\n\t\t\t\t$firstOctet \t= $subnetParts[0];\n\t\t\t\t$secondOctet \t= $subnetParts[1];\n\t\t\t\t$thirdOctet \t= $subnetParts[2];\n\t\t\t\t$fourthOctet \t= $subnetParts[3];\n\n\t\t\t\t$newFirstOctet \t= '';\n\t\t\t\t$newSecondOctet\t= '';\n\t\t\t\t$newThirdOctet \t= '';\n\t\t\t\t$newFourthOctet = '';\n\n\t\t\t\t/*\n\t\t\t\t\tChecks from the largest networks\n\t\t\t\t\tfirst down to the smallest.\n\t\t\t\t*/\n\t\t\t\tif( $subnet['subnet'] <= 8 ){\n\t\t\t\t\tif( ( $firstOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newFirstOctet = 255;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFirstOctet = $firstOctet + $subnet['subnet'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$min \t= ip2long( $subnet['start_ip'] );\n\t\t\t\t\t$max \t= ip2long( $newFirstOctet.'.255.255.254' );\n\t\t\t\t\t$needle = ip2long( $ipAddress );\n\n\t\t\t\t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else if( ( $subnet['subnet'] > 8 ) && ( $subnet['subnet'] <= 16 ) ){\n\t\t\t\t\tif( ( $secondOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newScondOctet = ( $secondOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newFirstOctet = $firstOctet + 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFirstOctet = $firstOctet;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet + $subnet['subnet'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t\t\t\t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t\t\t\t\t$needle = ip2long( $ipAddress ); \n\n\t\t\t\t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else if( ( $subnet['subnet'] > 16 ) && ( $subnet['subnet'] <= 24 ) ){\n\t\t\t\t\tif( ( $thirdOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newThirdOctet \t= ( $thirdOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet + 1;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet + $subnet['subnet'];\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t \t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t \t\t$needle = ip2long( $ipAddress ); \n\n\t \t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t \t\t\treturn true;\n\t \t\t}\n\t\t\t\t}else if( $subnet['subnet'] > 24 ){\n\t\t\t\t\tif( ( $fourthOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newFourthOctet = ( $fourthOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet + 1;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFourthOctet = $fourthOctet + $subnet['subnet'];\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t \t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t \t\t$needle = ip2long( $ipAddress ); \n\n\t \t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t \t\t\treturn true;\n\t \t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tOnly reachable if nothing was returned\n\t\t\t\tmeaning that the IP is NOT in the subnet.\n\t\t\t*/\n\t\t\treturn false;\n\t\t}", "public function destroy(Subscription $subscription)\n {\n //\n }", "public function destroy(BanCanSu $banCanSu)\n {\n //\n }", "function removeZone($id){\n\t\ttry{\n\t\t\t$db = getConnection();\n\n\t\t\t$sql = \"DELETE FROM infrastructure_zones WHERE id = ?\";\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->execute(array($id));\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t echo $e->getMessage();\n\t }\n\t}", "public function destroy(Annonce $annonce)\n {\n //\n }", "public function destroy(Annonce $annonce)\n {\n //\n }", "public function destroy(Slink $slink)\n {\n //\n }", "public function destroy(Banner $banner)\n {\n //\n }", "public function destroy(sites $sites)\n {\n //\n }", "public function destroy(Destinations $destinations)\n {\n //\n }", "public function down()\n\t{\n\t\tSchema::drop('oneauth_clients');\n\t}", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function destroy(ClassSubscription $classSubscription)\n {\n \n }", "public function destroy(IP $iP)\n {\n //\n }", "public function destroy($id)\n\t{\n\t\t$this->network->find($id)->delete();\n\n\t\treturn Redirect::route('networks.index');\n\t}", "public function destroy() {\n }", "public function destroy(EvacSite $evacSite)\n {\n //\n }", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "public function destroy(Continent $continent)\n {\n //\n }", "public function destroy(geoip $geoip)\n {\n //\n }", "public function down()\n {\n Schema::dropIfExists('personas');\n }", "public function destroy(Gateway $gateway)\n {\n //\n }", "public function destroy(Subscriber $subscriber)\n {\n //\n }", "public function destroy(Kibb $kibb)\n {\n //\n }", "public function destroy(Candidate $candidate)\n {\n //\n }", "public function unbind(ConnectionInterface $conn)\n {\n $resourceId = $conn->resourceId;\n\n qlog(\"{$resourceId} disconnected.\");\n self::$clients->forget($resourceId);\n\n $client = Client::where('resource_id', $resourceId)->first();\n if ($client) {\n $id = $client->id;\n DB::table('clients')->where('id', $id)->delete();\n DB::table('channel_client')->where('client_id', $id)->delete();\n }\n }" ]
[ "0.5999652", "0.5602587", "0.55879855", "0.5200593", "0.516263", "0.50957024", "0.5056942", "0.5039685", "0.4944451", "0.49284953", "0.49180615", "0.49103948", "0.48604628", "0.4846279", "0.48204187", "0.47936264", "0.47891158", "0.4695959", "0.46936908", "0.4692789", "0.4692789", "0.4692789", "0.4692789", "0.4692789", "0.4692789", "0.4692789", "0.4682081", "0.46538523", "0.4650266", "0.46478495", "0.46472228", "0.46189064", "0.46189064", "0.46189064", "0.46189064", "0.46189064", "0.46180162", "0.45684373", "0.4562795", "0.4562795", "0.4562795", "0.455331", "0.45529255", "0.45226488", "0.4509833", "0.4509093", "0.4509093", "0.4507715", "0.4503467", "0.45013845", "0.45013845", "0.44999474", "0.44894397", "0.4487856", "0.44871032", "0.4471614", "0.4471614", "0.4471614", "0.4471614", "0.4471614", "0.44684008", "0.44629475", "0.44542664", "0.44533446", "0.4451786", "0.44367203", "0.44310534", "0.44267067", "0.44266722", "0.44193736", "0.44193736", "0.44187546", "0.44185466", "0.4417839", "0.44159612", "0.44122884", "0.43960133", "0.43935764", "0.4388598", "0.4388598", "0.43707114", "0.43691972", "0.43686727", "0.4366815", "0.4363416", "0.43629175", "0.43602556", "0.43592823", "0.43510824", "0.43487546", "0.4345364", "0.43428165", "0.4338808", "0.43381822", "0.43314797", "0.43235874", "0.43200475", "0.4313119", "0.4311755", "0.4299057" ]
0.6734208
0
DHCP server edit subnet.
function edit($iface) { $this->_add_edit($iface, 'edit'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handle_put($target, $params, $body) {\n $result = array();\n $restart_nic = FALSE;\n $restart_dhcp = FALSE;\n $nic = current_nic();\n\n $addr = safe_array_get('addr', $body);\n if (!is_null($addr)) {\n $valid = sugar_valid_ip4($addr);\n if (!$valid) {\n return rest_error('e_bad_ip_address');\n }\n\n // retrive current IP address for recovery\n $old_ip = read_last_line(run_bin(\"network\", \"ip\"));\n\n // add mask support for format like 255.255.255.0\n // use ipcalc to check it\n $mask = safe_array_get('mask', $body, \"\");\n if ($mask && is_cmd_fail(shell_cmd_short(\"ipcalc -c 0.0.0.0 $mask\"))) {\n return rest_error(\"e_bad_format_netmask\");\n }\n\n // using the old IP for management\n // notify clients with new IP address based on the old IP\n send_cc_command_registered(\"--change-server --server-ip $valid\");\n\n if (is_cmd_fail(run_bin_as_root(\"network\", \"ip $nic $valid $mask\"))) {\n log_warning(\"Restore IP address to $old_ip\");\n send_cc_command_registered(\"--change-server --server-ip $old_ip\");\n run_bin_as_root(\"network\", \"ip $nic $old_ip $mask\");\n return rest_error('e_fail_change_ip');\n }\n\n $restart_nic = TRUE;\n $restart_dhcp = TRUE;\n }\n\n $nic_gw = safe_array_get('gateway', $body);\n if (!is_null($nic_gw)) {\n $valid = sugar_valid_ip4($nic_gw);\n if (!$valid && $nic_gw !== \"\") {\n return rest_error('e_bad_ip_address');\n }\n if ($nic_gw === \"\") {\n if (is_cmd_fail(call_home_bin(\"network\", \"gateway $nic delete\"))) {\n log_warning(\"Fail to delete $nic gateway\");\n return rest_error('e_fail_change_gw');\n }\n } else {\n if (is_cmd_fail(call_home_bin(\"network\", \"gateway $nic $valid\"))) {\n log_warning(\"Fail to update $nic gateway, $nic_gw\");\n return rest_error('e_fail_change_gw');\n }\n }\n $restart_nic = TRUE;\n }\n\n $nic_dns = safe_array_get('dns', $body);\n if (!is_null($nic_dns)) {\n $valid = sugar_valid_ip4($nic_dns);\n if (!$valid && $nic_dns !== \"\") {\n return rest_error('e_bad_ip_address');\n }\n if ($nic_dns === \"\") {\n $dns = shell_last_line(home_bin(\"network\", \"dns $nic\"));\n if ($dns) {\n if (is_cmd_fail(call_home_bin(\"network\", \"nameserver del $dns\"))) {\n log_warning(\"Fail to delete nameserver $dns from resolv.conf\");\n return rest_error('e_fail_change_dns');\n }\n } \n if (is_cmd_fail(call_home_bin(\"network\", \"dns $nic delete\"))) {\n log_warning(\"Fail to delete $nic dns\");\n return rest_error('e_fail_change_dns');\n }\n } else {\n if (is_cmd_fail(call_home_bin(\"network\", \"dns $nic $valid\"))) {\n log_warning(\"Fail to update $nic dns, $nic_dns\");\n return rest_error('e_fail_change_dns');\n }\n }\n $restart_nic = TRUE;\n }\n\n $dhcp_router = safe_array_get('dhcp_router', $body);\n if ($dhcp_router) {\n $valid = sugar_valid_ip4($dhcp_router);\n if (!$valid) {\n return rest_error(\"e_bad_ip_address\");\n }\n $err = validate_dhcp_router($valid);\n if ($err) {\n return rest_error($err);\n }\n if (is_cmd_fail(call_home_bin(\"network\", \"dhcp router $valid\"))) {\n return rest_error(\"e_fail_change_dhcp_router\");\n }\n\n $restart_dhcp = TRUE;\n $result['dhcp_router'] = $valid;\n }\n\n $dhcp_subnet_begin = safe_array_get('dhcp_subnet_begin', $body);\n $dhcp_subnet_end = safe_array_get('dhcp_subnet_end', $body);\n $dhcp_subnet_mask = safe_array_get('dhcp_subnet_mask', $body);\n if ($dhcp_subnet_begin && $dhcp_subnet_end && $dhcp_subnet_mask) {\n $begin = sugar_valid_ip4($dhcp_subnet_begin);\n $end = sugar_valid_ip4($dhcp_subnet_end);\n $mask = $dhcp_subnet_mask;\n if (is_cmd_fail(shell_cmd(\"ipcalc -c 0.0.0.0 $mask\"))) {\n return rest_error(\"e_bad_format_netmask\");\n }\n if (!$begin) {\n return rest_error_extra(\"e_invalid_dhcp_subnet_range\", 0, $dhcp_subnet_begin);\n }\n if (!$end) {\n return rest_error_extra(\"e_invalid_dhcp_subnet_range\", 0, $dhcp_subnet_end);\n }\n $err = validate_dhcp_range($begin, $end, $mask);\n if ($err) {\n return rest_error($err);\n }\n if (is_cmd_fail(call_home_bin(\"network\", \"dhcp range $begin $end $mask\"))) {\n return rest_error(\"e_invalid_dhcp_subnet_range\");\n }\n\n $restart_dhcp = TRUE;\n $result['dhcp_subnet_begin'] = $begin;\n $result['dhcp_subnet_end'] = $end;\n $result['dhcp_subnet_mask'] = $mask;\n }\n\n $dhcp_dns = safe_array_get('dhcp_dns', $body, NULL);\n if ($dhcp_dns !== NULL) {\n if ($dhcp_dns === \"\") {\n $res = run_bin(\"network\", \"ip\");\n if (is_cmd_fail($res)) {\n log_error(\"Cannot read IP for nic\");\n }\n $nic_ip = $res[\"last_line\"];\n $settings = parse_dhcp_settings();\n $dhcp_dns = $settings['dns'];\n if ( $dhcp_dns && $nic_ip != $dhcp_dns) {\n if (is_cmd_fail(call_home_bin(\"network\", \"dhcp dns del $dhcp_dns\"))) {\n return rest_error(\"e_fail_change_dhcp_dns\");\n }\n }\n $result['dhcp_dns'] = \"\";\n } else {\n $valid = sugar_valid_ip4($dhcp_dns);\n if (!$valid) {\n return rest_error(\"e_bad_ip_address\");\n }\n if (is_cmd_fail(call_home_bin(\"network\", \"dhcp dns add $valid\"))) {\n return rest_error(\"e_fail_change_dhcp_dns\");\n }\n $result['dhcp_dns'] = $valid;\n }\n $restart_dhcp = TRUE;\n }\n\n if ($restart_nic) {\n call_home_bin(\"network\", \"restart $nic\");\n run_as_root(\"systemctl restart tcs-disk-server\");\n run_as_root(\"systemctl restart tcs-delivery-server\");\n run_as_root(\"systemctl restart tcs-ccontrol-server\");\n }\n if ($restart_dhcp) {\n call_home_bin(\"network\", \"dhcp restart\");\n }\n\n return rest_result_ok($result);\n}", "function update_network_option($network_id, $option, $value)\n {\n }", "function subnet ($ip=NULL, $subnet=NULL)\n\t{\n\n\t\t// assign defaults\n\t\tif (is_null($ip))\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\n\t\t// default to REMOTE_ADDR\n\t\tif (!is_null($subnet))\n\t\t{\n\t\t\t$explodeip = explode('.', $ip);\n\t\t\t$subnetip = explode('.', substr($subnet, 0, strpos($subnet, '/')));\n\t\t\t$subnetmask = substr($subnet, strpos($subnet, '/') + 1);\n\t\t\tif ($subnetmask == 32)\n\t\t\t{\n\t\t\t\tif (substr($subnet, 0, strpos($subnet, '/')) == $ip)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} elseif ($subnetmask < 32 && $subnetmask >= 24)\n\t\t\t{\n\t\t\t\t$start = $subnetip[3];\n\t\t\t\t$check = 32;\n\t\t\t\t$top = 254;\n\t\t\t\t$checkip = $explodeip[3];\n\t\t\t} elseif ($subnetmask < 24 && $subnetmask >= 16)\n\t\t\t{\n\t\t\t\t$start = $subnetip[2];\n\t\t\t\t$check = 24;\n\t\t\t\t$top = 255;\n\t\t\t\t$checkip = $explodeip[2];\n\t\t\t} elseif ($subnetmask < 16 && $subnetmask >= 8)\n\t\t\t{\n\t\t\t\t$start = $subnetip[1];\n\t\t\t\t$check = 16;\n\t\t\t\t$top = 255;\n\t\t\t\t$checkip = $explodeip[1];\n\t\t\t} elseif ($subnetmask < 8)\n\t\t\t{\n\t\t\t\t$start = $subnetip[0];\n\t\t\t\t$check = 8;\n\t\t\t\t$top = 254;\n\t\t\t\t$checkip = $explodeip[0];\n\t\t\t}\n\t\t\t$end = $start + pow(2, ($check - $subnetmask));\n\t\t\tif ($end > $top) $end = $top;\n\t\t\tif ($checkip >= $start && $checkip <= $end)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t\t\n\t\t} else {\t\t\t\t\n\t\t\t\t\n\t\t\t// wow hard\n\t\t\t$subnet = substr($ip, 0, strrpos($ip, '.')).\".0/24\";\n\t\n\t\t\treturn $subnet;\n\t\t}\n\t}", "function _add_edit($iface, $form_type)\n {\n // Load libraries\n //---------------\n\n $this->load->library('dhcp/Dnsmasq');\n $this->lang->load('dhcp');\n\n // Set validation rules\n //---------------------\n\n $this->load->library('form_validation');\n $this->form_validation->set_policy('gateway', 'dhcp/Dnsmasq', 'validate_gateway', TRUE);\n $this->form_validation->set_policy('lease_time', 'dhcp/Dnsmasq', 'validate_lease_time', TRUE);\n $this->form_validation->set_policy('start', 'dhcp/Dnsmasq', 'validate_start_ip', TRUE);\n $this->form_validation->set_policy('end', 'dhcp/Dnsmasq', 'validate_end_ip', TRUE);\n $this->form_validation->set_policy('dns1', 'dhcp/Dnsmasq', 'validate_dns_server');\n $this->form_validation->set_policy('dns2', 'dhcp/Dnsmasq', 'validate_dns_server');\n $this->form_validation->set_policy('dns3', 'dhcp/Dnsmasq', 'validate_dns_server');\n $this->form_validation->set_policy('wins', 'dhcp/Dnsmasq', 'validate_wins_server');\n $this->form_validation->set_policy('tftp', 'dhcp/Dnsmasq', 'validate_tftp_server');\n $this->form_validation->set_policy('ntp', 'dhcp/Dnsmasq', 'validate_ntp_server');\n $this->form_validation->set_policy('wpad', 'dhcp/Dnsmasq', 'validate_wpad_server');\n $form_ok = $this->form_validation->run();\n\n // Handle form submit\n //-------------------\n\n if ($this->input->post('submit') && ($form_ok === TRUE)) {\n $subnet['interface'] = $this->input->post('interface');\n $subnet['network'] = $this->input->post('network');\n $subnet['gateway'] = $this->input->post('gateway');\n $subnet['start'] = $this->input->post('start');\n $subnet['end'] = $this->input->post('end');\n $subnet['wins'] = $this->input->post('wins');\n $subnet['tftp'] = $this->input->post('tftp');\n $subnet['ntp'] = $this->input->post('ntp');\n $subnet['wpad'] = $this->input->post('wpad');\n $subnet['lease_time'] = $this->input->post('lease_time');\n $subnet['dns'] = array(\n $this->input->post('dns1'),\n $this->input->post('dns2'),\n $this->input->post('dns3'),\n );\n\n try {\n if ($form_type === 'add') {\n $this->dnsmasq->add_subnet(\n $subnet['interface'],\n $subnet['start'],\n $subnet['end'],\n $subnet['lease_time'],\n $subnet['gateway'],\n $subnet['dns'],\n $subnet['wins'],\n $subnet['tftp'],\n $subnet['ntp'],\n $subnet['wpad']\n );\n\n } else {\n $this->dnsmasq->update_subnet(\n $iface,\n $subnet['start'],\n $subnet['end'],\n $subnet['lease_time'],\n $subnet['gateway'],\n $subnet['dns'],\n $subnet['wins'],\n $subnet['tftp'],\n $subnet['ntp'],\n $subnet['wpad']\n );\n }\n\n // Do a full restart for DHCP\n $this->dnsmasq->restart(TRUE);\n\n // Return to summary page with status message\n $this->page->set_status_added();\n redirect('/dhcp/subnets');\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return;\n }\n }\n\n // Load the view data \n //------------------- \n\n try {\n if ($form_type === 'add') \n $subnet = $this->dnsmasq->get_subnet_default($iface);\n else\n $subnet = $this->dnsmasq->get_subnet($iface);\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return;\n }\n\n $data['form_type'] = $form_type;\n\n $data['interface'] = $iface;\n $data['network'] = (isset($subnet['network'])) ? $subnet['network'] : '';\n $data['gateway'] = (isset($subnet['gateway'])) ? $subnet['gateway'] : '';\n $data['start'] = (isset($subnet['start'])) ? $subnet['start'] : '';\n $data['end'] = (isset($subnet['end'])) ? $subnet['end'] : '';\n $data['dns'] = (isset($subnet['dns'])) ? $subnet['dns'] : '';\n $data['wins'] = (isset($subnet['wins'])) ? $subnet['wins'] : '';\n $data['tftp'] = (isset($subnet['tftp'])) ? $subnet['tftp'] : '';\n $data['ntp'] = (isset($subnet['ntp'])) ? $subnet['ntp'] : '';\n $data['wpad'] = (isset($subnet['wpad'])) ? $subnet['wpad'] : '';\n $data['lease_time'] = (isset($subnet['lease_time'])) ? $subnet['lease_time'] : '';\n\n $data['lease_times'] = array();\n $data['lease_times'][1] = 1 . \" \" . lang('base_hour');\n $data['lease_times'][2] = 2 . \" \" . lang('base_hours');\n $data['lease_times'][4] = 4 . \" \" . lang('base_hours');\n $data['lease_times'][6] = 6 . \" \" . lang('base_hours');\n $data['lease_times'][12] = 12 . \" \" . lang('base_hours');\n $data['lease_times'][24] = 24 . \" \" . lang('base_hours');\n $data['lease_times'][48] = 2 . \" \" . lang('base_days');\n $data['lease_times'][72] = 3 . \" \" . lang('base_days');\n $data['lease_times'][96] = 4 . \" \" . lang('base_days');\n $data['lease_times'][120] = 5 . \" \" . lang('base_days');\n $data['lease_times'][144] = 6 . \" \" . lang('base_days');\n $data['lease_times'][168] = 7 . \" \" . lang('base_days');\n $data['lease_times'][336] = 2 . \" \" . lang('base_weeks');\n $data['lease_times'][504] = 3 . \" \" . lang('base_weeks');\n $data['lease_times'][672] = 4 . \" \" . lang('base_weeks');\n $data['lease_times'][\\clearos\\apps\\dhcp\\Dnsmasq::CONSTANT_UNLIMITED_LEASE] = lang('base_unlimited');\n \n // Load the views\n //---------------\n\n $this->page->view_form('dhcp/subnets/add_edit', $data, lang('dhcp_subnets'));\n }", "public function edit(NetworkIPSEC $networkIPSEC)\n {\n //\n }", "function can_edit_network($network_id)\n {\n }", "public static function checkIPSubnet( $ipAddress ){\n\t\t\tglobal $wpdb;\n\n\t\t\t/*\n\t\t\t\tGrabs allowed subnets from the \n\t\t\t\tcurrent blog.\n\t\t\t*/\n\t\t\tif( is_multisite() ){\n\t\t\t\t$currentBlogID = get_current_blog_id();\n\n\t\t\t\tglobal $switched;\n\t\t\t\tswitch_to_blog(1);\n\n\t\t\t\t$subnets = $wpdb->get_results( $wpdb->prepare(\n\t\t\t\t\t\"SELECT *\n\t\t\t\t\t FROM \".$wpdb->prefix.\"wps_subnets\n\t\t\t\t\t WHERE blog_id = '%d'\",\n\t\t\t\t\t $currentBlogID\n\t\t\t\t), ARRAY_A );\n\n\t\t\t\trestore_current_blog();\n\t\t\t}else{\n\t\t\t\t$subnets = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.\"wps_subnets\", ARRAY_A );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tIterates through subnets and checks to see\n\t\t\t\tif the IP address is within the range.\n\t\t\t*/\n\t\t\tforeach( $subnets as $subnet ){\n\t\t\t\t$subnetParts \t= explode( '.', $subnet['start_ip'] );\n\n\t\t\t\t$firstOctet \t= $subnetParts[0];\n\t\t\t\t$secondOctet \t= $subnetParts[1];\n\t\t\t\t$thirdOctet \t= $subnetParts[2];\n\t\t\t\t$fourthOctet \t= $subnetParts[3];\n\n\t\t\t\t$newFirstOctet \t= '';\n\t\t\t\t$newSecondOctet\t= '';\n\t\t\t\t$newThirdOctet \t= '';\n\t\t\t\t$newFourthOctet = '';\n\n\t\t\t\t/*\n\t\t\t\t\tChecks from the largest networks\n\t\t\t\t\tfirst down to the smallest.\n\t\t\t\t*/\n\t\t\t\tif( $subnet['subnet'] <= 8 ){\n\t\t\t\t\tif( ( $firstOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newFirstOctet = 255;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFirstOctet = $firstOctet + $subnet['subnet'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$min \t= ip2long( $subnet['start_ip'] );\n\t\t\t\t\t$max \t= ip2long( $newFirstOctet.'.255.255.254' );\n\t\t\t\t\t$needle = ip2long( $ipAddress );\n\n\t\t\t\t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else if( ( $subnet['subnet'] > 8 ) && ( $subnet['subnet'] <= 16 ) ){\n\t\t\t\t\tif( ( $secondOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newScondOctet = ( $secondOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newFirstOctet = $firstOctet + 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFirstOctet = $firstOctet;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet + $subnet['subnet'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t\t\t\t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t\t\t\t\t$needle = ip2long( $ipAddress ); \n\n\t\t\t\t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else if( ( $subnet['subnet'] > 16 ) && ( $subnet['subnet'] <= 24 ) ){\n\t\t\t\t\tif( ( $thirdOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newThirdOctet \t= ( $thirdOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet + 1;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet + $subnet['subnet'];\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t \t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t \t\t$needle = ip2long( $ipAddress ); \n\n\t \t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t \t\t\treturn true;\n\t \t\t}\n\t\t\t\t}else if( $subnet['subnet'] > 24 ){\n\t\t\t\t\tif( ( $fourthOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newFourthOctet = ( $fourthOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet + 1;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFourthOctet = $fourthOctet + $subnet['subnet'];\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t \t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t \t\t$needle = ip2long( $ipAddress ); \n\n\t \t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t \t\t\treturn true;\n\t \t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tOnly reachable if nothing was returned\n\t\t\t\tmeaning that the IP is NOT in the subnet.\n\t\t\t*/\n\t\t\treturn false;\n\t\t}", "public function getSubnetId()\n {\n return $this->subnet_id;\n }", "function set_ipalias($ip, $netmask, $if, $action = '') {\n if($action == '-') {\n $_alias = \"-alias\";\n log_error(\"Removing IP $ip with netmask $netmask from interface $if\");\n } else {\n $_alias = \"alias\";\n log_error(\"Adding IP $ip with netmask $netmask to interface $if\");\n }\n\n $_cmd = \"ifconfig $if $_alias $ip netmask $netmask\";\n system($_cmd, $_exit_status);\n return $_exit_status; \n}", "private function setIPv6( $addr, $mask )\n\t{\n\t\t$this->net_addr = @inet_pton($addr);\n\t\tif( $this->net_addr == false )\n\t\t{\n\t\t\tthrow new \\Exception( \"invalid ip address {$addr}\" );\n\t\t} \n\t\t$this->valid = true;\n\t\t$this->net_addr_long = $this->inet_ntogmp( $this->net_addr );\n\t\t//$this->inet_gmpton( $this->net_addr_long );\n\t\t\t\n\t\t// set the netmask\n\t\tif( preg_match( '/^[0-9]+$/', $mask ))\n\t\t{\n\t\t\t$this->net_mask_bits = intval( $mask );\n\t\t\tif( $this->ipv4 && $this->net_mask_bits != 0 ){\n\t\t\t\t$this->net_mask_bits += 96;\n\t\t\t}\n\t\t\t$this->net_mask_long = \\gmp_mul( \\gmp_sub( gmp_pow( 2, $this->net_mask_bits ), 1 ), \\gmp_pow( 2, 128-$this->net_mask_bits ));\n\t\t\t//\t\t\techo gmp_strval( $this->net_mask_long, 2 ).\"<br />\\n\";\n\t\t\t$this->net_mask = $this->inet_gmpton($this->net_mask_long);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->net_mask = inet_pton($mask);\n\t\t\t$this->net_mask_long = $this->inet_ntogmp($this->netmask);\n\t\t\t$this->net_mask_bits = \\gmp_scan0( $this->net_mask_long, 0 );\n\t\t}\n\t\t\t\n\t\t// normalize it...\n\t\t$this->net_addr_long = \\gmp_and( $this->net_addr_long, $this->net_mask_long );\n\t\t$this->net_addr = $this->inet_gmpton( $this->net_addr_long );\n\t\t$this->net_broadcast_long = \\gmp_or( $this->net_addr_long, \\gmp_sub( \\gmp_pow( 2, 128-$this->net_mask_bits ), 1 ));\n\t\t$this->net_broadcast = $this->inet_gmpton($this->net_broadcast_long );\n\t}", "function is_subnet($subnet) {\n\tif (!is_string($subnet))\n\treturn false;\n\n\tlist($hp,$np) = explode('/', $subnet);\n\n\tif (!is_ipaddr($hp))\n\treturn false;\n\n\tif (!is_numeric($np) || ($np < 1) || ($np > 32))\n\treturn false;\n\n\treturn true;\n}", "public function setCidr($cidr)\n {\n if (strpos($cidr, '-') !== false) {\n return $this->setRange($cidr);\n }\n\n list($ip, $bits) = array_pad(array_map('trim', explode('/', $cidr, 2)), 2, null);\n if (false === filter_var($ip, FILTER_VALIDATE_IP)) {\n throw new \\InvalidArgumentException(\"Invalid IP address \\\"$cidr\\\"\");\n }\n\n // determine version (4 or 6)\n $this->version = (false === filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) ? 6 : 4;\n\n $this->start = $ip;\n $this->istart = IP::inet_ptod($ip);\n\n if ($bits !== null and $bits !== '') {\n $this->prefix = $bits;\n } else {\n $this->prefix = $this->version == 4 ? 32 : 128;\n }\n\n if (($this->prefix < 0)\n || ($this->prefix > 32 and $this->version == 4)\n || ($this->prefix > 128 and $this->version == 6)) {\n throw new \\InvalidArgumentException(\"Invalid IP address \\\"$cidr\\\"\");\n }\n\n $this->end = $this->getBroadcast();\n $this->iend = IP::inet_ptod($this->end);\n\n $this->cache = array();\n }", "public function setIpAddress($ip_address);", "function pnAddressBook_admin_modifyconfig() {\r\n\tglobal $bgcolor1,$bgcolor2,$bgcolor3,$bgcolor4;\r\n\r\n $output = new pnHTML();\r\n\t$output->SetInputMode(_PNH_VERBATIMINPUT);\r\n\t$output->Text(pnAddressBook_themetable('start'));\r\n\r\n // Security check\r\n if (!pnSecAuthAction(0, 'pnAddressBook::', '::', ACCESS_ADMIN)) {\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_NOAUTH));\r\n $output->Text(pnAddressBook_themetable('end'));\r\n\t\treturn $output->GetOutput();\r\n }\r\n\r\n $output->Text(pnAddressBook_admin_menu());\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n\t$msg = pnVarCleanFromInput('msg');\r\n\t$output->Title($msg);\r\n\r\n\t// some design ;)\r\n\t$bc1 = $bgcolor1;\r\n\t$bc2 = $bgcolor2;\r\n\tif ($bgcolor1 == $bgcolor2) {\r\n\t\tif ($bgcolor1 == $bgcolor3) {\r\n\t\t\t$bc2 = $bgcolor4;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$bc2 = $bgcolor3;\r\n\t\t}\r\n\t}\r\n\r\n // Start form\r\n $output->FormStart(pnModURL(__PNADDRESSBOOK__, 'admin', 'updateconfig'));\r\n\r\n // Add an authorisation ID\r\n $output->FormHidden('authid', pnSecGenAuthKey());\r\n\r\n\t// get access rights\r\n\tswitch (pnModGetVar(__PNADDRESSBOOK__, 'guestmode')) {\r\n\t\tcase '0':\r\n\t\t\t$guestmode_1 = 0;\r\n\t\t\t$guestmode_2 = 0;\r\n\t\t\t$guestmode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '1':\r\n\t\t\t$guestmode_1 = 0;\r\n\t\t\t$guestmode_2 = 0;\r\n\t\t\t$guestmode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '2':\r\n\t\t\t$guestmode_1 = 0;\r\n\t\t\t$guestmode_2 = 1;\r\n\t\t\t$guestmode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '3':\r\n\t\t\t$guestmode_1 = 0;\r\n\t\t\t$guestmode_2 = 1;\r\n\t\t\t$guestmode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '4':\r\n\t\t\t$guestmode_1 = 1;\r\n\t\t\t$guestmode_2 = 0;\r\n\t\t\t$guestmode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '5':\r\n\t\t\t$guestmode_1 = 1;\r\n\t\t\t$guestmode_2 = 0;\r\n\t\t\t$guestmode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '6':\r\n\t\t\t$guestmode_1 = 1;\r\n\t\t\t$guestmode_2 = 1;\r\n\t\t\t$guestmode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '7':\r\n\t\t\t$guestmode_1 = 1;\r\n\t\t\t$guestmode_2 = 1;\r\n\t\t\t$guestmode_3 = 1;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch (pnModGetVar(__PNADDRESSBOOK__, 'usermode')) {\r\n\t\tcase '0':\r\n\t\t\t$usermode_1 = 0;\r\n\t\t\t$usermode_2 = 0;\r\n\t\t\t$usermode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '1':\r\n\t\t\t$usermode_1 = 0;\r\n\t\t\t$usermode_2 = 0;\r\n\t\t\t$usermode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '2':\r\n\t\t\t$usermode_1 = 0;\r\n\t\t\t$usermode_2 = 1;\r\n\t\t\t$usermode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '3':\r\n\t\t\t$usermode_1 = 0;\r\n\t\t\t$usermode_2 = 1;\r\n\t\t\t$usermode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '4':\r\n\t\t\t$usermode_1 = 1;\r\n\t\t\t$usermode_2 = 0;\r\n\t\t\t$usermode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '5':\r\n\t\t\t$usermode_1 = 1;\r\n\t\t\t$usermode_2 = 0;\r\n\t\t\t$usermode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '6':\r\n\t\t\t$usermode_1 = 1;\r\n\t\t\t$usermode_2 = 1;\r\n\t\t\t$usermode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '7':\r\n\t\t\t$usermode_1 = 1;\r\n\t\t\t$usermode_2 = 1;\r\n\t\t\t$usermode_3 = 1;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n // Start the table that holds the information to be modified.\r\n $output->Text(pnAddressBook_themetable('start'));\r\n\t$output->Linebreak(1);\r\n\t$output->Text('<table align=\"center\" cellpadding=\"5\" cellspacing=\"1\" bgcolor=\"'.$bc2.'\">');\r\n\r\n\t// note\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td colspan=\"4\" align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_GRANTNOTE));\r\n\t$output->Linebreak(2);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// headline\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text('<b>'.pnVarPrepHTMLDisplay(_pnAB_GRANTLEVEL).'</b>');\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text(pnVarPrepHTMLDisplay(_pnAB_VIEW));\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text(pnVarPrepHTMLDisplay(_pnAB_CREATE));\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text(pnVarPrepHTMLDisplay(_pnAB_EDITDELETE));\r\n $output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Access rights for unregistered users\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_GUESTMODE));\r\n\t$output->TableColEnd();\r\n $output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('guestmode_1', $guestmode_1);\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('guestmode_2', $guestmode_2);\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('guestmode_3', $guestmode_3);\r\n $output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Access rights for registered users\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_USERMODE));\r\n\t$output->TableColEnd();\r\n $output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('usermode_1', $usermode_1);\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('usermode_2', $usermode_2);\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('usermode_3', $usermode_3);\r\n $output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// empty row\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td colspan=\"4\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Linebreak(1);\r\n $output->Text('<b>'.pnVarPrepHTMLDisplay(_pnAB_OTHERSTUFF).'</b>');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Title of Address Book\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_TITLE));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('abtitle', pnModGetVar(__PNADDRESSBOOK__, 'abtitle'), 30, 60);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t//Default sortorder 1\r\n\t$sortCols = explode(',',pnModGetVar(__PNADDRESSBOOK__, 'sortorder_1'));\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_SORTORDER_1));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$sortdata_1[] = array('id'=>'adr_sortname', 'name'=>_pnAB_NAME);\r\n\t$sortdata_1[] = array('id'=>'adr_title', 'name'=>_pnAB_TITLE);\r\n\t$sortdata_1[] = array('id'=>'adr_sortcompany', 'name'=>_pnAB_COMPANY);\r\n\t$sortdata_1[] = array('id'=>'adr_zip', 'name'=>_pnAB_ZIP);\r\n\t$sortdata_1[] = array('id'=>'adr_city', 'name'=>_pnAB_CITY);\r\n\t$sortdata_1[] = array('id'=>'adr_state', 'name'=>_pnAB_STATE);\r\n\t$sortdata_1[] = array('id'=>'adr_country', 'name'=>_pnAB_COUNTRY);\r\n\t$custom_tab = pnModGetVar(__PNADDRESSBOOK__,'custom_tab');\r\n\tif ((!empty($custom_tab)) && ($custom_tab != '')) {\r\n\t\t$cus_fields = pnModAPIFunc(__PNADDRESSBOOK__,'admin','customFieldInformation',array('id'=>$id));\r\n\t\tforeach($cus_fields as $cus) {\r\n\t\t\t$the_name = 'adr_custom_'.$cus['nr'];\r\n\t\t\t$sortdata_1[] = array('id'=>$the_name, 'name'=>pnVarPrepHTMLDisplay($cus['name']));\r\n\t\t}\r\n\t}\r\n\t$output->FormSelectMultiple('sortdata_1',$sortdata_1, 0, 1,$sortCols[0], '');\r\n\t$output->Text(' | ');\r\n\t$sortdata_2[] = array('id'=>'adr_sortname', 'name'=>_pnAB_NAME);\r\n\t$sortdata_2[] = array('id'=>'adr_title', 'name'=>_pnAB_TITLE);\r\n\t$sortdata_2[] = array('id'=>'adr_sortcompany', 'name'=>_pnAB_COMPANY);\r\n\t$sortdata_2[] = array('id'=>'adr_zip', 'name'=>_pnAB_ZIP);\r\n\t$sortdata_2[] = array('id'=>'adr_city', 'name'=>_pnAB_CITY);\r\n\t$sortdata_2[] = array('id'=>'adr_state', 'name'=>_pnAB_STATE);\r\n\t$sortdata_2[] = array('id'=>'adr_country', 'name'=>_pnAB_COUNTRY);\r\n\tif ((!empty($custom_tab)) && ($custom_tab != '')) {\r\n\t\t$cus_fields2 = pnModAPIFunc(__PNADDRESSBOOK__,'admin','customFieldInformation',array('id'=>$id));\r\n\t\tforeach($cus_fields2 as $cus) {\r\n\t\t\t$the_name = 'adr_custom_'.$cus['nr'];\r\n\t\t\t$sortdata_2[] = array('id'=>$the_name, 'name'=>pnVarPrepHTMLDisplay($cus['name']));\r\n\t\t}\r\n\t}\r\n\t$output->FormSelectMultiple('sortdata_2',$sortdata_2, 0, 1,$sortCols[1], '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t//Default sortorder 2\r\n\t$sortCols = explode(',',pnModGetVar(__PNADDRESSBOOK__, 'sortorder_2'));\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_SORTORDER_2));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$sortdata_3[] = array('id'=>'adr_sortname', 'name'=>_pnAB_NAME);\r\n\t$sortdata_3[] = array('id'=>'adr_title', 'name'=>_pnAB_TITLE);\r\n\t$sortdata_3[] = array('id'=>'adr_sortcompany', 'name'=>_pnAB_COMPANY);\r\n\t$sortdata_3[] = array('id'=>'adr_zip', 'name'=>_pnAB_ZIP);\r\n\t$sortdata_3[] = array('id'=>'adr_city', 'name'=>_pnAB_CITY);\r\n\t$sortdata_3[] = array('id'=>'adr_state', 'name'=>_pnAB_STATE);\r\n\t$sortdata_3[] = array('id'=>'adr_country', 'name'=>_pnAB_COUNTRY);\r\n\tif ((!empty($custom_tab)) && ($custom_tab != '')) {\r\n\t\t$cus_fields3 = pnModAPIFunc(__PNADDRESSBOOK__,'admin','customFieldInformation',array('id'=>$id));\r\n\t\tforeach($cus_fields3 as $cus) {\r\n\t\t\t$the_name = 'adr_custom_'.$cus['nr'];\r\n\t\t\t$sortdata_3[] = array('id'=>$the_name, 'name'=>pnVarPrepHTMLDisplay($cus['name']));\r\n\t\t}\r\n\t}\r\n\t$output->FormSelectMultiple('sortdata_3',$sortdata_3, 0, 1,$sortCols[0], '');\r\n\t$output->Text(' | ');\r\n\t$sortdata_4[] = array('id'=>'adr_sortname', 'name'=>_pnAB_NAME);\r\n\t$sortdata_4[] = array('id'=>'adr_title', 'name'=>_pnAB_TITLE);\r\n\t$sortdata_4[] = array('id'=>'adr_sortcompany', 'name'=>_pnAB_COMPANY);\r\n\t$sortdata_4[] = array('id'=>'adr_zip', 'name'=>_pnAB_ZIP);\r\n\t$sortdata_4[] = array('id'=>'adr_city', 'name'=>_pnAB_CITY);\r\n\t$sortdata_4[] = array('id'=>'adr_state', 'name'=>_pnAB_STATE);\r\n\t$sortdata_4[] = array('id'=>'adr_country', 'name'=>_pnAB_COUNTRY);\r\n\tif ((!empty($custom_tab)) && ($custom_tab != '')) {\r\n\t\t$cus_fields4 = pnModAPIFunc(__PNADDRESSBOOK__,'admin','customFieldInformation',array('id'=>$id));\r\n\t\tforeach($cus_fields4 as $cus) {\r\n\t\t\t$the_name = 'adr_custom_'.$cus['nr'];\r\n\t\t\t$sortdata_4[] = array('id'=>$the_name, 'name'=>pnVarPrepHTMLDisplay($cus['name']));\r\n\t\t}\r\n\t}\r\n\t$output->FormSelectMultiple('sortdata_4',$sortdata_4, 0, 1,$sortCols[1], '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Name display / sortorder\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_NAME_ORDER));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$temp1 = pnVarPrepHTMLDisplay(_pnAB_LASTNAME).', '.pnVarPrepHTMLDisplay(_pnAB_FIRSTNAME);\r\n\t$temp2 = pnVarPrepHTMLDisplay(_pnAB_FIRSTNAME).' '.pnVarPrepHTMLDisplay(_pnAB_LASTNAME);\r\n\t$name_order_data[] = array('id'=>0, 'name'=>$temp1);\r\n\t$name_order_data[] = array('id'=>1, 'name'=>$temp2);\r\n\t$output->FormSelectMultiple('name_order',$name_order_data, 0, 1,pnModGetVar(__PNADDRESSBOOK__, 'name_order'), '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Special character replacement in sort columns\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_SPECIAL_CHARS));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('special_chars_1', pnModGetVar(__PNADDRESSBOOK__, 'special_chars_1'), 12, 24);\r\n\t$output->Text(' => ');\r\n\t$output->FormText('special_chars_2', pnModGetVar(__PNADDRESSBOOK__, 'special_chars_2'), 12, 24);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Allow global entries\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_GLOBALPROTECT));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('globalprotect', pnModGetVar(__PNADDRESSBOOK__, 'globalprotect'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Use prefixes\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_SHOWPREFIX));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('use_prefix', pnModGetVar(__PNADDRESSBOOK__, 'use_prefix'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Use images\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_SHOWIMG));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('use_img', pnModGetVar(__PNADDRESSBOOK__, 'use_img'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Disable the menu\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_MENU_OFF));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$menu_off_data[] = array('id'=>0, 'name'=>pnVarPrepHTMLDisplay(_pnAB_HIDENOTHING));\r\n\t$menu_off_data[] = array('id'=>1, 'name'=>pnVarPrepHTMLDisplay(_pnAB_HIDEALL));\r\n\t$menu_off_data[] = array('id'=>2, 'name'=>pnVarPrepHTMLDisplay(_pnAB_HIDEGUESTS));\r\n\t$output->FormSelectMultiple('menu_off',$menu_off_data, 0, 1,pnModGetVar(__PNADDRESSBOOK__, 'menu_off'), '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Disable second main menu line\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_MENU_SEMI));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('menu_semi', pnModGetVar(__PNADDRESSBOOK__, 'menu_semi'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Show zip before city\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_ZIPBEFORECITY));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('zipbeforecity', pnModGetVar(__PNADDRESSBOOK__, 'zipbeforecity'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Number of items to display per page\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_ITEMSPERPAGE));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('itemsperpage', pnModGetVar(__PNADDRESSBOOK__, 'itemsperpage'), 4, 4);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Hide Copyright\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_HIDECOPYRIGHT));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('hidecopyright', pnModGetVar(__PNADDRESSBOOK__, 'hidecopyright'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// empty row\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td colspan=\"4\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Linebreak(1);\r\n $output->Text('<b>'.pnVarPrepHTMLDisplay(_pnAB_CUSTOMLABEL).'</b>');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Custom Tab\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_CUSTOM_TAB));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('custom_tab', pnModGetVar(__PNADDRESSBOOK__, 'custom_tab'), 30, 60);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Custom textareawidth\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_CUSTOM_TEXTAREAWIDTH));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('textareawidth', pnModGetVar(__PNADDRESSBOOK__, 'textareawidth'), 4, 4);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Custom dateformat\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_CUSTOM_DATEFORMAT));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$formdata1[] = array('id'=>0, 'name'=>pnVarPrepForDisplay(_pnAB_DATEFORMAT_1));\r\n\t$formdata1[] = array('id'=>1, 'name'=>pnVarPrepForDisplay(_pnAB_DATEFORMAT_2));\r\n\t$output->FormSelectMultiple('dateformat',$formdata1, 0, 1,pnModGetVar(__PNADDRESSBOOK__, 'dateformat'), '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Custom numeric format\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_CUSTOM_NUMFORMAT));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$formdata2[] = array('id'=>'9,999.99', 'name'=>'9,999.99');\r\n\t$formdata2[] = array('id'=>'9.999,99', 'name'=>'9.999,99');\r\n\t$output->FormSelectMultiple('numformat',$formdata2, 0, 1,pnModGetVar(__PNADDRESSBOOK__, 'numformat'), '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t$output->Text('</table>');\r\n\t$output->Linebreak(1);\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n\r\n\t// End form\r\n\t$output->Linebreak(1);\r\n\t$output->Text(pnAddressBook_themetable('start'));\r\n\t$output->Text('<div align=\"center\"><br>');\r\n $output->FormSubmit(pnVarPrepHTMLDisplay(_pnAB_PNADDRESSBOOKUPDATE));\r\n\t$output->Text('<br><br></div>');\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n $output->FormEnd();\r\n\r\n\t// Return the output that has been generated by this function\r\n $output->SetInputMode(_PNH_PARSEINPUT);\r\n\treturn $output->GetOutput();\r\n}", "function check_subnet($ip, $network, $netmask) {\n\t$network_long = ip2long($network);\n\t$mask_long = ip2long($netmask);\n\t$ip_long = ip2long($ip);\n\n\t// Remove the host part of the addresses.\n\t$network_net_long = $network_long & $mask_long;\n\t$ip_net_long = $ip_long & $mask_long;\n\n\t// If the network parts are equal, return true.\n\treturn ($network_net_long === $ip_net_long);\n}", "function networkAdd($ipvar, $subnet){\n\t\t# $octetbit array is used in computing on how many '1' bits are in a specific octet of the IP address\n\t\t$octetbit = [128, 64, 32, 16, 8, 4, 2, 1];\n\n\t\t#To check which octet is the subnet mask located(in terms of count of 8),\n \t#which will help in computing for the network address of the IP address\n\t\t$octetindex = floor((int)$subnet/8);\n\n\t #To check the bits that overflowed from the biggest 8 count from the previous variable\n\t #i.e. if the subnet is /25, 3 octets from the left are all 1s and in the 4th octet,\n\t #the first bit from the left is set to 1 while the rest are set to 0 \n\t\t$octetrem = (int)$subnet%8;\n\n\t\tif ($octetindex == 4)\n\t\t\treturn (implode(\".\", $ipvar));\n\n\t #modresult is to maintain count for which bits will be set to '1' to get the value\n\t #i.e. if the value is 3, then the 2nd bit from the right will be set to '1' and a value of\n\t #1 will remain, making the 1st bit from the right, be set to '1' as well for a total value of 3\n\t\t$modresult = (int)$ipvar[$octetindex];\n\t\t$netconstant = 0;\n\t\t$i = 0;\n\n\t\tif ($octetrem == 0)\n\t\t\tfor ($i = $octetindex; $i < 4; $i++ )\n\t\t\t\t$ipvar[$i] = \"0\";\n\n\t\telse if ($octetrem > 0){\n\t\t\twhile ($i < $octetrem){\n\t\t\t\tif ($modresult >= $octetbit[$i]){\n\t\t\t\t\t$netconstant += $octetbit[$i];\n\t\t\t\t\t$modresult = $modresult % $octetbit[$i];\n\t\t\t\t}\n\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\t$ipvar[$octetindex] = (string)$netconstant;\n\n\t\t\tfor($j = $octetindex+1; $j < 4; $j++)\n\t\t\t\t$ipvar[$j] = \"0\";\n\t\t}\n\n\t\t$netadd = implode(\".\", $ipvar);\n\n\t\treturn $netadd;\n\n\t}", "function destroy($iface)\n {\n try {\n $this->load->library('dhcp/Dnsmasq');\n \n $this->dnsmasq->delete_subnet($iface);\n $this->dnsmasq->reset(TRUE);\n\n $this->page->set_status_deleted();\n redirect('/dhcp/subnets');\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return;\n }\n }", "public function setSubnetId($var)\n {\n GPBUtil::checkString($var, True);\n $this->subnet_id = $var;\n\n return $this;\n }", "function banIpAddress($ipaddress){\n\t\t\t//load data from persistence object\n\t\t\t$storageType \t\t= $this->configManager->getStorageType();\n\t\t\n\t\t\t\t\t\t\t\t\n\t\t\tif(strtolower($storageType) == 'file'){\n\t\t\t\t$fileName = $this->configManager->getDataDir().'/'.$this->configManager->getBanFileName();\n\t\t\t\t$this->persistenceManager->setStorageType('file');\n\t\t\t\t$this->persistenceManager->setBanFile($fileName);\n\t\t\t}elseif(strtolower($storageType) == 'mysql'){\n\t\t\t\tdie(\"MySQL storage type, not implemented yet!\");\n\t\t\t}else{\n\t\t\t\tdie(\"Unknown storage type!\");\n\t\t\t}\n\t\t\t\n\t\t\t$this->persistenceManager->banIpAddress($ipaddress);\n\t\t\t\n\t\t}", "function validate_subnet($subnet) {\n\t\t\t$parts = explode(\"/\", $subnet);\n\t\t\tif (count($parts) != 2)\n\t\t\t\treturn false;\n\n\t\t\tif (!IPv6::validate_ip($parts[0]) || !IPv6::validate_cidr($parts[1]))\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}", "public function set_address($new) {\n\t\t$this->CI->api->dns->modify->zone_address($this->zone, $this->address, 'address', $new);\n\t\t$this->hostname = $new;\n\t}", "function convert_ip_to_network_format($ip, $subnet) {\n\t$ipsplit = explode('.', $ip);\n\t$string = $ipsplit[0] . \".\" . $ipsplit[1] . \".\" . $ipsplit[2] . \".0/\" . $subnet;\n\treturn $string;\n}", "public function enableDHCP() {\r\n\t\t/* fire up dhclient */\r\n\t\tFunctions::shellCommand ( \"/sbin/dhclient -c /var/etc/dhclient_\" . ( string ) $this->data->if . \".conf \" . ( string ) $this->data->if . \" >/tmp/\" . ( string ) $this->data->if . \"_output >/tmp/\" . ( string ) $this->data->if . \"_error_output\" );\r\n\t}", "public function configure() {\r\n\t\t$this->logger->info ( 'Setting up WAN interface: ' . ( string ) $this->data->if );\r\n\t\t$this->stop ();\r\n\t\t\r\n\t\t//\t\tSet MTU\n\t\tif (( string ) $this->data->mtu != '') {\r\n\t\t\tFunctions::shellCommand ( \"/sbin/ifconfig \" . ( string ) $this->data->if . \" mtu \" . ( string ) $this->data->mtu );\r\n\t\t}\r\n\t\t\r\n\t\t//\t\tSpoof mac address\n\t\tif (Functions::isMacAddress ( ( string ) $this->data->mac )) {\r\n\t\t\tFunctions::shellCommand ( \"/sbin/ifconfig \" . escapeshellarg ( $this->data->if ) . \" link \" . escapeshellarg ( $this->data->mac ) );\r\n\t\t} else {\r\n\t\t\t$mac = $this->getMacAddress ();\r\n\t\t\tif ($mac == \"ff:ff:ff:ff:ff:ff\") {\r\n\t\t\t\t/* this is not a valid mac address. */\r\n\t\t\t\t$this->logger->info ( \"Generating new MAC address for WAN interface.\" );\r\n\t\t\t\t$random_mac = $this->generateMacAddress ();\r\n\t\t\t\tFunctions::shellCommand ( \"/sbin/ifconfig \" . escapeshellarg ( $this->data->if ) . \" link \" . escapeshellarg ( $random_mac ) );\r\n\t\t\t\t$this->data->mac = $random_mac;\r\n\t\t\t\t\r\n\t\t\t\t$this->config->saveConfig ();\r\n\t\t\t\t$this->logger->info ( \"The invalid MAC(ff:ff:ff:ff:ff:ff) on interface \" . ( string ) $this->data->if . \" has been replaced with \" . $random_mac );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//\t\tSet IP address\n\t\tif (( string ) $this->data->ipaddr == 'dhcp') {\r\n\t\t\t$this->configureDHCP ();\r\n\t\t} elseif (Functions::is_ipAddr ( ( string ) $this->data->ipaddr )) {\r\n\t\t\tFunctions::shellCommand ( \"/sbin/ifconfig \" . ( string ) $this->data->if . \" \" . ( string ) $this->data->ipaddr . \"/\" . Functions::mask2prefix(( string ) $this->data->subnet) );\r\n\t\t\t//\t\tDefault gateway\n\t\t\tif ($this->data->gateway != '') {\r\n\t\t\t\tif (Functions::is_ipAddr ( ( string ) $this->data->gateway )) {\r\n\t\t\t\t\t$return = Functions::shellCommand ( \"/sbin/route add default \" . escapeshellarg ( $this->data->gateway ) );\r\n\t\t\t\t\tif ($return != \"\") {\r\n\t\t\t\t\t\t$this->logger->error ( 'Could not add default gateway, route returned the following message: {' . $return . '}' );\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->logger->info ( 'Could not add default gateway from WAN (' . ( string ) $this->data->ipaddr . ') invalid address' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function ip_in_range($ip, $range) {\r\n if (strpos($ip, '.') !== false) { // regular IPv4\r\n if (strpos($range, '/') !== false) {\r\n // $range is in IP/NETMASK format\r\n list($range, $netmask) = explode('/', $range, 2);\r\n if (strpos($netmask, '.') !== false) {\r\n // $netmask is a 255.255.0.0 format, or 255.*\r\n $nets = explode('.', $netmask);\r\n while(count($nets) < 4) $nets[] = '*';\r\n $netmask = implode('.', $nets);\r\n // by now we have ensured that we have 4 octets of the netmask a.b.c.d\r\n $netmask = str_replace('*', '0', $netmask);\r\n $netmask_dec = ip2float($netmask);\r\n#printf(\"%-10s: %s\\n\", \"Netmask\", $netmask);\r\n#printf(\"%-10s: %-032b\\n\", \"Netmaskbin\", $netmask_dec);\r\n\r\n } else {\r\n // $netmask is a CIDR size block\r\n // fix the range argument\r\n $x = explode('.', $range);\r\n while(count($x)<4) $x[] = '0';\r\n #list($a,$b,$c,$d) = $x;\r\n #$range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\r\n $range = implode('.', $x);\r\n\r\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\r\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\r\n\r\n # Strategy 2 - Use math to create it\r\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\r\n $netmask_dec = ~ $wildcard_dec;\r\n $netmask_dec = (float)(pow(2,32) - pow(2, (32-$netmask)));\r\n\r\n }\r\n#printf(\"%-10s: %s\\n\", \"IP\", $ip);\r\n#printf(\"%-10s: %-032b\\n\", \"IPbin\", ip2float($ip));\r\n#printf(\"%-10s: %s\\n\", \"Range\", $range);\r\n#printf(\"%-10s: %-032b\\n\", \"Rangebin\", ip2float($range));\r\n#printf(\"%-10s: %-032b\\n\", \"Netmask\", $netmask_dec);\r\n# $a = float_and(ip2float($ip), $netmask_dec);\r\n# $b = float_and(ip2float($range), $netmask_dec);\r\n#printf(\"%-10s: %-032b\\n\", \"IP&MASK\", $a);\r\n#printf(\"%-10s: %-032b\\n\", \"Range&MASK\", $b);\r\n return ( float_and(ip2float($ip), $netmask_dec) == float_and(ip2float($range), $netmask_dec) );\r\n } else {\r\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\r\n if (strpos($range, '*') !==false) { // a.b.*.* format\r\n // Just convert to A-B format by setting * to 0 for A and 255 for B\r\n $lower = str_replace('*', '0', $range);\r\n $upper = str_replace('*', '255', $range);\r\n $range = \"$lower-$upper\";\r\n }\r\n\r\n if (strpos($range, '-')!==false) { // A-B format\r\n list($lower, $upper) = explode('-', $range, 2);\r\n $lower_dec = ip2float($lower);\r\n $upper_dec = ip2float($upper);\r\n $ip_dec = ip2float($ip);\r\n return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\r\n }\r\n\r\n echo 'Range argument is not in 1.2.3.4/24 or 1.2.3.4/255.255.255.0 format';\r\n return false;\r\n }\r\n }\r\n if (strpos($ip, ':') !== false) { // IPv6\r\n ini_set(\"display_errors\", 1);\r\n error_reporting(E_ALL);\r\n // Parse out the $range\r\n if (strpos($range, '/') !== false) {\r\n // $range is in IPv6/NETMASK format\r\n list($range, $netbits) = explode('/', $range, 2);\r\n $netmask_binstr = str_pad('', $netbits, '1') . str_pad('', 128-$netbits, '0');\r\n }\r\n if (preg_match('/::$/', $range)) {\r\n $range = preg_replace('/::$/', '', $range);\r\n $x = explode(':', $range);\r\n while(count($x) < 8) $x[] = '0';\r\n $range = implode(':', $x);\r\n }\r\n return ( largearray_and(ip6floatA($ip), largebin2floatA($netmask_binstr)) == largearray_and(ip6floatA($range), largebin2floatA($netmask_binstr)) );\r\n }\r\n\r\n}", "public function set_real_ip() {\r\n\t\t// only run this logic if the REMOTE_ADDR is populated, to avoid causing notices in CLI mode.\r\n\t\tif ( ! isset( $_SERVER['HTTP_CF_CONNECTING_IP'], $_SERVER['REMOTE_ADDR'] ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$cf_ips_values = $this->cloudflare->get_cloudflare_ips();\r\n\t\t$cf_ip_ranges = $cf_ips_values->result->ipv6_cidrs;\r\n\t\t$ip = sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) );\r\n\t\t$ipv6 = get_rocket_ipv6_full( $ip );\r\n\t\tif ( false === strpos( $ip, ':' ) ) {\r\n\t\t\t// IPV4: Update the REMOTE_ADDR value if the current REMOTE_ADDR value is in the specified range.\r\n\t\t\t$cf_ip_ranges = $cf_ips_values->result->ipv4_cidrs;\r\n\t\t}\r\n\r\n\t\tforeach ( $cf_ip_ranges as $range ) {\r\n\t\t\tif (\r\n\t\t\t\t( strpos( $ip, ':' ) && rocket_ipv6_in_range( $ipv6, $range ) )\r\n\t\t\t\t||\r\n\t\t\t\t( false === strpos( $ip, ':' ) && rocket_ipv4_in_range( $ip, $range ) )\r\n\t\t\t) {\r\n\t\t\t\t$_SERVER['REMOTE_ADDR'] = sanitize_text_field( wp_unslash( $_SERVER['HTTP_CF_CONNECTING_IP'] ) );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function edit(Ip $ip)\n {\n //\n }", "function gen_subnet($ipaddr, $bits) {\n\tif (!is_ipaddr($ipaddr) || !is_numeric($bits))\n\treturn \"\";\n\n\treturn long2ip(ip2long($ipaddr) & gen_subnet_mask_long($bits));\n}", "public static function addSubnet( $ip, $network, $expiration, $userID ){\n\t\t\tglobal $wpdb;\n\n\t\t\tif( is_multisite() ){\n\t\t\t\t$currentBlogID = get_current_blog_id();\n\n\t\t\t\tglobal $switched;\n\t\t\t\tswitch_to_blog(1);\n\n\t\t\t\t/*\n\t\t\t\t\tClenses and adds the IP\n\t\t\t\t\tto the database.\n\t\t\t\t*/\n\t\t\t\t$wpdb->query( $wpdb->prepare(\n\t\t\t\t\t\"INSERT INTO \".$wpdb->prefix.\"wps_subnets\n\t\t\t\t\t( blog_id, added_by, start_ip, subnet, expires )\n\t\t\t\t\tVALUES ( %d, %d, %s, %s, '\".$expiration.\"')\",\n\t\t\t\t\t$currentBlogID,\n\t\t\t\t\t$userID,\n\t\t\t\t\t$ip,\n\t\t\t\t\t$network\n\t\t\t\t) );\n\n\t\t\t\t$rangeID = $wpdb->insert_id;\n\n\t\t\t\trestore_current_blog();\n\t\t\t}else{\n\t\t\t\t/*\n\t\t\t\t\tClenses and adds the IP\n\t\t\t\t\tto the database.\n\t\t\t\t*/\n\t\t\t\t$wpdb->query( $wpdb->prepare(\n\t\t\t\t\t\"INSERT INTO \".$wpdb->prefix.\"wps_subnets\n\t\t\t\t\t( added_by, start_ip, subnet, expires )\n\t\t\t\t\tVALUES ( %d, %s, %s, '\".$expiration.\"')\",\n\t\t\t\t\t$userID,\n\t\t\t\t\t$ip,\n\t\t\t\t\t$network\n\t\t\t\t) );\n\n\t\t\t\t$rangeID = $wpdb->insert_id;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tReturns the newly added ID.\n\t\t\t*/\n\t\t\treturn $rangeID;\n\t\t}", "public function setIpAddress($val)\n {\n $this->_propDict[\"ipAddress\"] = $val;\n return $this;\n }", "function update_dhcp($dhcp_configuration)\n{\n $new_dhcp_configuration=parse_dhcp_server();\n // Actualize eth0, ath0 and ath1 information.\n if ($dhcp_configuration['dhcp_server_eth0']=='on')\n {\n $new_dhcp_configuration['eth0']['start']=$dhcp_configuration['dhcp_start_eth0'];\n $new_dhcp_configuration['eth0']['end']=$dhcp_configuration['dhcp_end_eth0'];\n $new_dhcp_configuration['eth0']['expire']=$dhcp_configuration['dhcp_expire_eth0'];\n }\n else\n {\n unset ($new_dhcp_configuration['eth0']);\n }\n if ($dhcp_configuration['dhcp_server_ath0']=='on')\n {\n $new_dhcp_configuration['ath0']['start']=$dhcp_configuration['dhcp_start_ath0'];\n $new_dhcp_configuration['ath0']['end']=$dhcp_configuration['dhcp_end_ath0'];\n $new_dhcp_configuration['ath0']['expire']=$dhcp_configuration['dhcp_expire_ath0'];\n }\n else\n {\n unset ($new_dhcp_configuration['ath0']);\n }\n if ($dhcp_configuration['dhcp_server_ath1']=='on')\n {\n $new_dhcp_configuration['ath1']['start']=$dhcp_configuration['dhcp_start_ath1'];\n $new_dhcp_configuration['ath1']['end']=$dhcp_configuration['dhcp_end_ath1'];\n $new_dhcp_configuration['ath1']['expire']=$dhcp_configuration['dhcp_expire_ath1'];\n }\n else\n {\n unset ($new_dhcp_configuration['ath1']);\n }\n return $new_dhcp_configuration;\n}", "function delete($iface)\n {\n $this->lang->load('dhcp');\n\n $confirm_uri = '/app/dhcp/subnets/destroy/' . $iface;\n $cancel_uri = '/app/dhcp/subnets';\n $items = array($iface . ' - ' . lang('dhcp_dhcp'));\n\n $this->page->view_confirm_delete($confirm_uri, $cancel_uri, $items);\n }", "function ip_in_subnet($addr,$subnet) {\n\tlist($ip, $mask) = explode('/', $subnet);\n\t$mask = 0xffffffff << (32 - $mask);\n\treturn ((ip2long($addr) & $mask) == (ip2long($ip) & $mask));\n}", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MccASMemberBundle:Ip')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Ip entity.');\n }\n\n $editForm = $this->createForm(new IpType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MccASMemberBundle:Ip:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "function add_network_option($network_id, $option, $value)\n {\n }", "function deleteIpAddress($ipaddress){\n\t\t\t//load data from persistence object\n\t\t\t$storageType \t\t= $this->configManager->getStorageType();\n\t\t\n\t\t\t\t\t\t\t\t\n\t\t\tif(strtolower($storageType) == 'file'){\n\t\t\t\t$fileName = $this->configManager->getDataDir().'/'.$this->configManager->getBanFileName();\n\t\t\t\t$this->persistenceManager->setStorageType('file');\n\t\t\t\t$this->persistenceManager->setBanFile($fileName);\n\t\t\t}elseif(strtolower($storageType) == 'mysql'){\n\t\t\t\tdie(\"MySQL storage type, not implemented yet!\");\n\t\t\t}else{\n\t\t\t\tdie(\"Unknown storage type!\");\n\t\t\t}\n\t\t\t\n\t\t\t$this->persistenceManager->deleteIpAddress($ipaddress);\n\t\t\t\n\t\t}", "public function edit(WithdrawNetwork $withdrawNetwork)\n {\n //\n }", "function verifyAndCleanAddresses($data, $subnets_allowed = 'subnets-allowed') {\n\t/** Remove extra spaces */\n\t$data = preg_replace('/\\s\\s+/', ' ', $data);\n\t\n\t/** Swap delimiters for ; */\n\t$data = str_replace(array(\"\\n\", ';', ' ', ','), ',', $data);\n\t$data = str_replace(',,', ',', $data);\n\t$data = trim($data, ',');\n\t\n\t$addresses = explode(',', $data);\n\tforeach ($addresses as $ip_address) {\n\t\t$cidr = null;\n\n\t\t$ip_address = rtrim(trim($ip_address), '.');\n\t\tif (!strlen($ip_address)) continue;\n\t\t\n\t\t/** Handle negated addresses */\n\t\tif (strpos($ip_address, '!') === 0) {\n\t\t\t$ip_address = substr($ip_address, 1);\n\t\t}\n\t\t\n\t\tif (strpos($ip_address, '/') !== false && $subnets_allowed == 'subnets-allowed') {\n\t\t\t$cidr_array = explode('/', $ip_address);\n\t\t\tlist($ip_address, $cidr) = $cidr_array;\n\t\t}\n\t\t\n\t\t/** IPv4 checks */\n\t\tif (strpos($ip_address, ':') === false) {\n\t\t\t/** Valid CIDR? */\n\t\t\tif ($cidr && !checkCIDR($cidr, 32)) return sprintf(__('%s is not valid.'), \"$ip_address/$cidr\");\n\t\t\t\n\t\t\t/** Create full IP */\n\t\t\t$ip_octets = explode('.', $ip_address);\n\t\t\tif (count($ip_octets) < 4) {\n\t\t\t\t$ip_octets = array_merge($ip_octets, array_fill(count($ip_octets), 4 - count($ip_octets), 0));\n\t\t\t}\n\t\t\t$ip_address = implode('.', $ip_octets);\n\t\t} else {\n\t\t\t/** IPv6 checks */\n\t\t\tif ($cidr && !checkCIDR($cidr, 128)) return sprintf(__('%s is not valid.'), \"$ip_address/$cidr\");\n\t\t}\n\t\t\n\t\tif (verifyIPAddress($ip_address) === false) return sprintf(__('%s is not valid.'), $ip_address);\n\t}\n\t\n\treturn $data;\n}", "private function _convertCIDRToNetworkMask($cidr)\n {\n return long2ip(pow(2, 32)-1<<32-$cidr);\n }", "public static function deleteSubnet( $subnetID ){\n\t\t\tglobal $wpdb;\n\n\t\t\tglobal $switched;\n\t\t\tswitch_to_blog(1);\n\t\t\t\n\t\t\t$wpdb->query( $wpdb->prepare(\n\t\t\t\t\"DELETE FROM \".$wpdb->prefix.\"wps_subnets\n\t\t\t\tWHERE id = '%d'\",\n\t\t\t\t$subnetID\n\t\t\t) );\n\n\t\t\trestore_current_blog();\n\t\t}", "public function configureDHCP() {\r\n\t\t$fd = fopen ( \"/var/etc/dhclient_\" . ( string ) $this->data->if . \".conf\", \"w\" );\r\n\t\tif (! $fd) {\r\n\t\t\t$this->logger->error ( \"Cannot open dhclient_\" . ( string ) $this->data->if . \".conf for writing.\\n\" );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (( string ) $this->data->dhcphostname != '') {\r\n\t\t\t$dhclientconf_hostname = \"send dhcp-client-identifier \\\"\" . ( string ) $this->data->dhcpdhostname . \"\\\";\\n\";\r\n\t\t\t$dhclientconf_hostname .= \"\\tsend host-name \\\"\" . ( string ) $this->data->dhcpdhostname . \"\\\";\\n\";\r\n\t\t} else {\r\n\t\t\t$dhclientconf_hostname = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t$dhclientconf = \"\";\r\n\t\t\r\n\t\t$dhclientconf .= \"timeout 60;\\n\n\t\tretry 1;\\n\n\t\tselect-timeout 0;\\n\n\t\tinitial-interval 1;\\n\n\t\tinterface \\\"\" . ( string ) $this->data->interface . \"\\\" {\\n\n\t\t\t{$dhclientconf_hostname}\\n\n\t\t\tscript \\\"/sbin/dhclient-script\\\";\\n\n\t\t}\";\r\n\t\t\r\n\t\tfwrite ( $fd, $dhclientconf );\r\n\t\tfclose ( $fd );\r\n\t\treturn true;\r\n\t}", "public function edit(IP $iP)\n {\n //\n }", "function make_iptables_command($action, $subnet, $http_port, $https_port, $from, $to)\n{\n $command = <<<COMMAND\nsudo iptables -t nat -$action PREROUTING -s $subnet -d $from -p tcp -m tcp --dport $http_port -j DNAT --to-destination $to:$http_port\nsudo iptables -t nat -$action PREROUTING -s $subnet -d $from -p tcp -m tcp --dport 80 -j DNAT --to-destination $to:$http_port\nsudo iptables -t nat -$action PREROUTING -s $subnet -d 192.168.254.8 -p tcp -m tcp --dport 80 -j DNAT --to-destination $to:$http_port\nsudo iptables -t nat -$action PREROUTING -s $subnet -d $from -p tcp -m tcp --dport $https_port -j DNAT --to-destination $to:$https_port\nsudo iptables -t nat -$action PREROUTING -s $subnet -d $from -p tcp -m tcp --dport 443 -j DNAT --to-destination $to:$https_port\nsudo iptables -t nat -$action PREROUTING -s $subnet -d 192.168.254.8 -p tcp -m tcp --dport 443 -j DNAT --to-destination $to:$https_port\nCOMMAND;\n return $command;\n}", "function do_action($ip, $netmask, $if, $action) {\n $_ip_status = set_ipalias($ip, $netmask, $if, $action); \n if($_ip_status == 0) {\n log_error(\"Successfully manipulated IP $ip with netmask $netmask on interface $if\");\n restart_openvpn($ip);\n } else {\n log_error(\"Error when manipulating IP $ip with netmask $netmask on interface $if\");\n exit($_ip_status);\n }\n}", "public function setIp($value)\n {\n return $this->set(self::IP, $value);\n }", "public function setIp($value)\n {\n return $this->set(self::IP, $value);\n }", "function gen_subnet_mask($bits) {\n\treturn long2ip(gen_subnet_mask_long($bits));\n}", "public function edit(Neighbor $neighbor)\n {\n //\n }", "function maxip($subnet) {\n\t\t\tif (!IPv6::validate_subnet($subnet))\n\t\t\t\treturn false;\n\n\t\t\tlist($ip, $cidr) = explode(\"/\", $subnet);\n\n\t\t\treturn IPv6::bintoip(substr(IPv6::iptobin($ip), 0, $cidr) . sprintf(\"%'1\" .(128-$cidr) .\"s\", \"\"));\n\t\t}", "public function setIp($value)\n {\n return $this->set(self::ip, $value);\n }", "function ip_in_subnet($ip, $subnet)\n{\n // Converts a human-readable IP address into its binary representation\n $binary_ip = inet_pton($ip);\n\n // Converts the binary IP into a string of bits.\n // We can't convert the IP to an int (using, for example ip2long()) because php only\n // natively supports unsigned 32 bit ints, while an ipv6 address is 128 bits.\n // If we want, we could make use of some php libraries (e.g. BC Math or GMP) to create a 128\n // bit int, but this is not necessary because we don't need to perform any math operations\n // on this int anyway.\n // Instead, we just convert the IP to a string which is sufficient because we only need to\n // use it for a single string comparison later.\n $ip_bits = inet_to_bits($binary_ip);\n\n // Get the bit string for the subnet address, as well as the length of the subnet mask (in bits)\n list($range, $netmask_len) = explode('/', $subnet, 2); //$netmask_len is aka. the CIDR prefix\n $binary_range = inet_pton($range);\n $range_bits = inet_to_bits($binary_range);\n\n // Get the network bits of the given IP address and the subnet address\n $ip_net_bits = substr($ip_bits, 0, $netmask_len);\n $range_net_bits = substr($range_bits, 0, $netmask_len);\n\n // If the network bits are identical, then this IP is part of the subnet\n return ($ip_net_bits == $range_net_bits);\n}", "public static function subnetContainsIP($subnet, $ip) {\n\t\tlist($network, $prefix) = array_pad(explode('/', $subnet, 2), 2, null);\n\t\t\n\t\tif (filter_var($network, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n\t\t\t// If no prefix was supplied, 32 is implied for IPv4\n\t\t\tif ($prefix === null) {\n\t\t\t\t$prefix = 32;\n\t\t\t}\n\t\t\t\n\t\t\t// Validate the IPv4 network prefix\n\t\t\tif ($prefix < 0 || $prefix > 32) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Increase the IPv4 network prefix to work in the IPv6 address space\n\t\t\t$prefix += 96;\n\t\t} else {\n\t\t\t// If no prefix was supplied, 128 is implied for IPv6\n\t\t\tif ($prefix === null) {\n\t\t\t\t$prefix = 128;\n\t\t\t}\n\t\t\t\n\t\t\t// Validate the IPv6 network prefix\n\t\t\tif ($prefix < 1 || $prefix > 128) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$bin_network = wfWAFUtils::substr(self::inet_pton($network), 0, ceil($prefix / 8));\n\t\t$bin_ip = wfWAFUtils::substr(self::inet_pton($ip), 0, ceil($prefix / 8));\n\t\tif ($prefix % 8 != 0) { //Adjust the last relevant character to fit the mask length since the character's bits are split over it\n\t\t\t$pos = intval($prefix / 8);\n\t\t\t$adjustment = chr(((0xff << (8 - ($prefix % 8))) & 0xff));\n\t\t\t$bin_network[$pos] = ($bin_network[$pos] & $adjustment);\n\t\t\t$bin_ip[$pos] = ($bin_ip[$pos] & $adjustment);\n\t\t}\n\t\t\n\t\treturn ($bin_network === $bin_ip);\n\t}", "public function setUseIPAddress($use_ipaddr) \n \t{\n \t\t$this->use_ipaddr = $use_ipaddr;\n \t}", "public function edit_interface($id)\n {\n $data = array(\n 'svlan' => $this->input->post('svlan'),\n );\n $this->db->where('id', $id);\n $this->db->update('interfaces', $data);\n return 1;\n }", "protected function updateNetworkCellularGatewayDhcpRequest($network_id, $update_network_cellular_gateway_dhcp = null)\n {\n // verify the required parameter 'network_id' is set\n if ($network_id === null || (is_array($network_id) && count($network_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $network_id when calling updateNetworkCellularGatewayDhcp'\n );\n }\n\n $resourcePath = '/networks/{networkId}/cellularGateway/dhcp';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($network_id !== null) {\n $resourcePath = str_replace(\n '{' . 'networkId' . '}',\n ObjectSerializer::toPathValue($network_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($update_network_cellular_gateway_dhcp)) {\n $_tempBody = $update_network_cellular_gateway_dhcp;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\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('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "function delete_network_option($network_id, $option)\n {\n }", "public function updateReplaceHostSubnet(\n $body,\n $name,\n $pretty = null\n ) {\n\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n \n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.'/oapi/v1/hostsubnets/{name}';\n\n //process optional query parameters\n $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array (\n 'name' => $name,\n ));\n\n //process optional query parameters\n APIHelper::appendUrlWithQueryParameters($_queryBuilder, array (\n 'pretty' => $pretty,\n ));\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'APIMATIC 2.0',\n 'Accept' => 'application/json',\n 'content-type' => 'application/json; charset=utf-8'\n );\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::PUT, $_headers, $_queryUrl);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::put($_queryUrl, $_headers, Request\\Body::Json($body));\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n\n $mapper = $this->getJsonMapper();\n\n return $mapper->mapClass($response->body, 'OpenShiftAPIWithKubernetesLib\\\\Models\\\\V1HostSubnet');\n }", "public function getIPAddress(): string;", "function addSubnet($addList){\n\t\t$subList = [];\n\n\t\tfor ($i = 0, $j = 8; $i < sizeof($addList), $j < 33; $i++, $j++){\n\t\t\t$address = $addList[$i] . \"/\" . $j;\n\t\t\t$subList[] = $address;\n\t\t}\n\n\t\treturn $subList;\n\t}", "public function getGivenIpWithNetmask()\n\t{\n\t\treturn $this->given_ip . \"/\" . $this->getMask();\n\t}", "function pnAddressBook_admin_updateconfig() {\r\n\r\n $output = new pnHTML();\r\n\t$output->SetInputMode(_PNH_VERBATIMINPUT);\r\n\t$output->Text(pnAddressBook_themetable('start'));\r\n\r\n // Security check\r\n if (!pnSecAuthAction(0, 'pnAddressBook::', '::', ACCESS_ADMIN)) {\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_NOAUTH));\r\n $output->Text(pnAddressBook_themetable('end'));\r\n\t\treturn $output->GetOutput();\r\n }\r\n\r\n $output->Text(pnAddressBook_admin_menu());\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n\t$output->Linebreak(1);\r\n\r\n // Confirm authorisation code.\r\n if (!pnSecConfirmAuthKey()) {\r\n pnSessionSetVar('errormsg', _BADAUTHKEY);\r\n return false;\r\n }\r\n\r\n // Get parameters from whatever input we need.\r\n $guestmode_1 = pnVarCleanFromInput('guestmode_1');\r\n\t$guestmode_2 = pnVarCleanFromInput('guestmode_2');\r\n\t$guestmode_3 = pnVarCleanFromInput('guestmode_3');\r\n\t$usermode_1 = pnVarCleanFromInput('usermode_1');\r\n\t$usermode_2 = pnVarCleanFromInput('usermode_2');\r\n\t$usermode_3 = pnVarCleanFromInput('usermode_3');\r\n\t$globalprotect = pnVarCleanFromInput('globalprotect');\r\n\t$menu_off = pnVarCleanFromInput('menu_off');\r\n\t$zipbeforecity = pnVarCleanFromInput('zipbeforecity');\r\n\t$abtitle = pnVarCleanFromInput('abtitle');\r\n\t$custom_tab = pnVarCleanFromInput('custom_tab');\r\n\t$itemsperpage = pnVarCleanFromInput('itemsperpage');\r\n\t$hidecopyright = pnVarCleanFromInput('hidecopyright');\r\n\t$use_prefix = pnVarCleanFromInput('use_prefix');\r\n\t$use_img = pnVarCleanFromInput('use_img');\r\n\t$textareawidth = pnVarCleanFromInput('textareawidth');\r\n\t$dateformat = pnVarCleanFromInput('dateformat');\r\n\t$numformat = pnVarCleanFromInput('numformat');\r\n\t$sortdata_1 = pnVarCleanFromInput('sortdata_1');\r\n\t$sortdata_2 = pnVarCleanFromInput('sortdata_2');\r\n\t$sortdata_3 = pnVarCleanFromInput('sortdata_3');\r\n\t$sortdata_4 = pnVarCleanFromInput('sortdata_4');\r\n\t$menu_semi = pnVarCleanFromInput('menu_semi');\r\n\t$name_order = pnVarCleanFromInput('name_order');\r\n\t$special_chars_1 = pnVarCleanFromInput('special_chars_1');\r\n\t$special_chars_2 = pnVarCleanFromInput('special_chars_2');\r\n\r\n // Update module variables.\r\n if (!isset($abtitle)) {\r\n $abtitle = '';\r\n }\r\n\tif (!isset($globalprotect)) {\r\n $globalprotect = 0;\r\n }\r\n\tif (!isset($hidecopyright)) {\r\n $hidecopyright = 0;\r\n }\r\n\tif (!isset($use_prefix)) {\r\n $use_prefix = 0;\r\n }\r\n\tif (!isset($use_img)) {\r\n $use_img = 0;\r\n }\r\n\tif (!isset($menu_off)) {\r\n $menu_off = 0;\r\n }\r\n\tif (!isset($menu_semi)) {\r\n $menu_semi = 0;\r\n }\r\n\tif (!isset($name_order)) {\r\n $name_order = 0;\r\n }\r\n\tif (!isset($zipbeforecity)) {\r\n $zipbeforecity = 0;\r\n }\r\n\tif (!isset($itemsperpage)) {\r\n $itemsperpage = 30;\r\n }\r\n\tif (!isset($custom_tab)) {\r\n $custom_tab = '';\r\n }\r\n\tif (!isset($special_chars_1)) {\r\n $special_chars_1 = '';\r\n }\r\n\tif (!isset($special_chars_2)) {\r\n $special_chars_2 = '';\r\n }\r\n\tif (!isset($textareawidth)) {\r\n $textareawidth = 60;\r\n }\r\n\tif (!isset($dateformat)) {\r\n $dateformat = 0;\r\n }\r\n\tif (!isset($numformat)) {\r\n $numformat = '9,999.99';\r\n }\r\n\t$guestmode = 0;\r\n\tif (isset($guestmode_1)) {\r\n\t\t$guestmode += 4;\r\n\t}\r\n\tif (isset($guestmode_2)) {\r\n\t\t$guestmode += 2;\r\n\t}\r\n\tif (isset($guestmode_3)) {\r\n\t\t$guestmode += 1;\r\n\t}\r\n\r\n\t$usermode = 0;\r\n\tif (isset($usermode_1)) {\r\n\t\t$usermode += 4;\r\n\t}\r\n\tif (isset($usermode_2)) {\r\n\t\t$usermode += 2;\r\n\t}\r\n\tif (isset($usermode_3)) {\r\n\t\t$usermode += 1;\r\n\t}\r\n\tif ($globalprotect == 1) {\r\n\t\tif (($guestmode != 0) || ($usermode != 7)) {\r\n\t\t\t$guestmode = 0;\r\n\t\t\t$usermode = 7;\r\n\t\t\t$error = pnVarPrepHTMLDisplay(_pnAB_GLOBALPROTECTERROR);\r\n\t\t}\r\n\t}\r\n\tif ($guestmode > $usermode) {\r\n\t\t$usermode = $guestmode;\r\n\t\t$error = pnVarPrepHTMLDisplay(_pnAB_GRANTERROR);\r\n\t}\r\n\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'globalprotect', $globalprotect);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'menu_off', $menu_off);\r\n pnModSetVar(__PNADDRESSBOOK__, 'itemsperpage', $itemsperpage);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'guestmode', $guestmode);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'usermode', $usermode);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'custom_tab', $custom_tab);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'zipbeforecity', $zipbeforecity);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'abtitle', $abtitle);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'hidecopyright', $hidecopyright);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'use_prefix', $use_prefix);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'use_img', $use_img);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'textareawidth', $textareawidth);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'dateformat', $dateformat);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'numformat', $numformat);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'menu_semi', $menu_semi);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'name_order', $name_order);\r\n\r\n\tif ($sortdata_1 == $sortdata_2) {\r\n\t\tif ($error) {\r\n\t\t\t$error .= '<br>'.pnVarPrepHTMLDisplay(_pnAB_SORTERROR_1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$error = pnVarPrepHTMLDisplay(_pnAB_SORTERROR_1);\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\t$s_1 = $sortdata_1.','.$sortdata_2;\r\n\t\tpnModSetVar(__PNADDRESSBOOK__, 'sortorder_1', $s_1);\r\n\t}\r\n\tif ($sortdata_3 == $sortdata_4) {\r\n\t\tif ($error) {\r\n\t\t\t$error .= '<br>'.pnVarPrepHTMLDisplay(_pnAB_SORTERROR_2);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$error = pnVarPrepHTMLDisplay(_pnAB_SORTERROR_2);\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\t$s_2 = $sortdata_3.','.$sortdata_4;\r\n\t\tpnModSetVar(__PNADDRESSBOOK__, 'sortorder_2', $s_2);\r\n\t}\r\n\r\n\tif (strlen($special_chars_1) != strlen($special_chars_2)) {\r\n\t\t$error .= '<br>'.pnVarPrepHTMLDisplay(_pnAB_SPECIAL_CHARS_ERROR);\r\n\t}\r\n\telse {\r\n\t\tpnModSetVar(__PNADDRESSBOOK__, 'special_chars_1', $special_chars_1);\r\n\t\tpnModSetVar(__PNADDRESSBOOK__, 'special_chars_2', $special_chars_2);\r\n\t}\r\n\t$msg = pnVarPrepHTMLDisplay(_pnAB_CONF_pnAB_SUCCESS);\r\n\tif (isset($error)) { $msg .= ' - '.$error; }\r\n\r\n\t$args=array('msg'=>$msg);\r\n\r\n // This function generated no output, and so now it is complete we redirect\r\n // the user to an appropriate page for them to carry on their work\r\n pnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'main',$args));\r\n\r\n // Return\r\n return true;\r\n}", "public function disableDHCP() {\r\n\t\tFunctions::shellCommand ( \"/sbin/ifconfig \" . ( string ) $this->data->if . \" down\" );\r\n\t\tsleep ( 1 );\r\n\t\t$pid = Functions::shellCommand ( 'ps awux | grep dhclient | grep -v grep | grep ' . ( string ) $this->data->if . ' | awk \\'{ print $2 }\\'' );\r\n\t\tif (! empty ( $pid )) {\r\n\t\t\tFunctions::shellCommand ( \"kill {$pid}\" );\r\n\t\t}\r\n\t}", "public function editar(ServerRequestInterface $request, ResponseInterface $response){\n $idtipoendereco = $request->getAttribute('idtipoendereco');\n $tipoendereco = new TipoEnderecoController();\n $tipoendereco = $tipoendereco->getOne($idtipoendereco);\n $dados = array (\n \"tipoendereco\"=>$tipoendereco\n );\n \n $this->dados = $dados;\n \n return $this->view('tipoendereco/Update', $response);\n }", "private function validateTunnelForm(){\n\t\t$subnet_type = array('lan_subnet','ipaddr','network');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_local_subnet_type'],$subnet_type)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_type');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'ipaddr'){\n\t\t\t//\t\tvalidate local IP address\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_local_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_ipaddr');\n\t\t\t}\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'network'){\n\t\t\t//\t\tValidate network portion of the local subnet\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_local_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_ipaddr');\n\t\t\t}\n\t\t\tif($_POST['services_ipsec_tunnel_local_subnet_subnet'] < 0 || $_POST['services_ipsec_tunnel_local_subnet_subnet'] > 32){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_subnet');\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!in_array($_POST['services_ipsec_tunnel_remote_subnet_type'],$subnet_type)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_type');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'ipaddr'){\n\t\t\t//\t\tvalidate remote IP address\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_remote_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_ipaddr');\n\t\t\t}\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'network'){\n\t\t\t//\t\tValidate network portion of the remote subnet\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_remote_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_ipaddr');\n\t\t\t}\n\t\t\tif($_POST['services_ipsec_tunnel_remote_subnet_subnet'] < 0 || $_POST['services_ipsec_tunnel_remote_subnet_subnet'] > 32){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_subnet');\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_local_gateway'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_gateway');\n\t\t}\n\t\t\n\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_remote_gateway'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_gateway');\n\t\t}\n\t\t\n\t\tif(!empty($_POST['services_ipsec_tunnel_keepalive_ipaddr']) && !Functions::is_ipAddr($_POST['services_ipsec_tunnel_keepalive_ipaddr'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_keepalive_ipaddr');\n\t\t}\n\t\t\n\t\t$negotiation_modes = array('main','agressive','base');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_negotiation_mode'],$negotiation_modes)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_negotiation_mode');\n\t\t}\n\t\t\n\t\t$identifier_types = array('myipaddr','ipaddr','fqdn','usr_fqdn','dyn_dns');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_id_type'],$identifier_types)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_id_type');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_p1_id_type'] == 'ipaddr' && !Functions::is_ipAddr($_POST['services_ipsec_tunnel_p1_id'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_id');\n\t\t}\n\t\tif($_POST['services_ipsec_tunnel_p1_id_type'] == 'fqdn' && !Functions::isUrl($_POST['services_ipsec_tunnel_p1_id'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_id');\n\t\t}\n\t\t\n\t\t$dh_keygroups = array('1','2','5');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_dh_keygroup'],$dh_keygroups)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_dh_keygroup');\n\t\t}\n\t\t\n\t\tif(!is_numeric($_POST['services_ipsec_tunnel_p1_lifetime'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_lifetime');\n\t\t}\n\t\t\n\t\t$auth_method = array('psk','rsasig');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_auth_method'],$auth_method)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_auth_method');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'psk'){\n\t\t\t$found = false;\n\t\t\tforeach($this->data->keys->key as $key){\n\t\t\t\tif($key['id'] == $_POST['services_ipsec_tunnel_p1_preshared_key']){\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\t\n\t\t\tif(!$found){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_preshared_key');\n\t\t\t}\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'rsasig'){\n\t\t\t$found = false;\n\t\t\tforeach($this->data->certificates->certificate as $cert){\n\t\t\t\tif($cert['id'] == $_POST['services_ipsec_tunnel_p1_rsa_sig']){\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\t\n\t\t\tif(!$found){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_rsa_sig');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$protocol = array('esp','ah','esp_ah');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p2_protocol'],$protocol)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p2_protocol');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_p2_pfs_keygroup'] != 'off' && !in_array($_POST['services_ipsec_tunnel_p2_pfs_keygroup'],$dh_keygroups)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p2_pfs_keygroup');\n\t\t}\n\t\t\n\t\tif(!is_numeric($_POST['services_ipsec_tunnel_p2_lifetime'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p2_lifetime');\n\t\t}\n\t\t\n\t\tif(ErrorHandler::errorCount() > 0){\n\t\t\tthrow new Exception('There is invalid form input');\n\t\t}\n\t}", "public function set($param, $id)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand(\"/ip/address/set\");\n foreach ($param as $name => $value) {\n $sentence->setAttribute($name, $value);\n }\n $sentence->where(\".id\", \"=\", $id);\n $this->talker->send($sentence);\n return \"Sucsess\";\n }", "public function updateAction(Request $request, $id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MccASMemberBundle:Ip')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Ip entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createForm(new IpType(), $entity);\n $editForm->bind($request);\n\n if ($editForm->isValid()) {\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('ip_edit', array('id' => $id)));\n }\n\n return $this->render('MccASMemberBundle:Ip:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function subnetNetwork(array $subnetsSizes)\n {\n $return = array();\n\n if (!$this->_isNetworkSpecified()) {\n throw new BadMethodCallException(\n 'Network address and/or mask are not specified');\n }\n\n $max = $this->_getSubnetUsableHostsCount(\n $this->getNetworkMask());\n $total = array_sum($subnetsSizes);\n if ($max < $total) {\n throw New InvalidArgumentException(\n sprintf('Can\\'t subnet `%s`, `\\%d` is not enough for `%d` hosts',\n $this->getNetworkAddress(), $this->getNetworkMask(), $total));\n }\n\n arsort($subnetsSizes);\n $long = ip2long($this->getNetworkAddress());\n \n foreach ($subnetsSizes as $name => $size) {\n $subnet = $this->_createSubnet($size, $long);\n $long = ip2long($subnet['subnet'])+$subnet['size']+2;\n $return[$name] = $subnet;\n }\n\n return $return;\n }", "protected function updateNetworkCellularGatewaySubnetPoolRequest($network_id, $update_network_cellular_gateway_subnet_pool = null)\n {\n // verify the required parameter 'network_id' is set\n if ($network_id === null || (is_array($network_id) && count($network_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $network_id when calling updateNetworkCellularGatewaySubnetPool'\n );\n }\n\n $resourcePath = '/networks/{networkId}/cellularGateway/subnetPool';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($network_id !== null) {\n $resourcePath = str_replace(\n '{' . 'networkId' . '}',\n ObjectSerializer::toPathValue($network_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($update_network_cellular_gateway_subnet_pool)) {\n $_tempBody = $update_network_cellular_gateway_subnet_pool;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\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('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function __validate_mask() {\n if (isset($this->initial_data['mask'])) {\n # Check that our mask is within range (between 0-32) for IPv4 network.\n if ($this->ip_version === 4 and $this->initial_data[\"mask\"] >= 0 and $this->initial_data[\"mask\"] <= 32) {\n $this->validated_data[\"mask\"] = $this->initial_data['mask'];\n }\n elseif ($this->ip_version === 6 and $this->initial_data[\"mask\"] >= 0 and $this->initial_data[\"mask\"] <= 128) {\n $this->validated_data[\"mask\"] = $this->initial_data['mask'];\n }\n else {\n $this->errors[] = APIResponse\\get(2070);\n }\n } else {\n $this->errors[] = APIResponse\\get(2071);\n }\n }", "function do_c_block_firewall() {\n\t\t$rxs = $this->get_option( 'service_ips' );\n\t\t$service_ips_external = get_option( 'vaultpress_service_ips_external' );\n\n\t\tif ( !empty( $rxs['data'] ) && !empty( $service_ips_external['data'] ) )\n\t\t\t$rxs = array_merge( $rxs['data'], $service_ips_external['data'] );\t\t\n\t\tif ( ! $rxs )\n\t\t\treturn false;\n\t\treturn $this->validate_ip_address( $rxs );\n\t}", "public function start() {\r\n\t\tparent::start ();\r\n\t\tif (( string ) $this->data->ipaddr == 'dhcp') {\r\n\t\t\t$this->enableDHCP ();\r\n\t\t}\r\n\t}", "public function setVip($value)\n {\n return $this->set(self::_VIP, $value);\n }", "public function setVip($value)\n {\n return $this->set(self::_VIP, $value);\n }", "public static function sanitizeIP( $ip ) {\n $ip = trim( $ip );\n if ( $ip === '' ) {\n return null;\n }\n if ( self::isIPv4( $ip ) || !self::isIPv6( $ip ) ) {\n return $ip; // nothing else to do for IPv4 addresses or invalid ones\n }\n // Remove any whitespaces, convert to upper case\n $ip = strtoupper( $ip );\n // Expand zero abbreviations\n $abbrevPos = strpos( $ip, '::' );\n if ( $abbrevPos !== false ) {\n // We know this is valid IPv6. Find the last index of the\n // address before any CIDR number (e.g. \"a:b:c::/24\").\n $CIDRStart = strpos( $ip, \"/\" );\n $addressEnd = ( $CIDRStart !== false )\n ? $CIDRStart - 1\n : strlen( $ip ) - 1;\n // If the '::' is at the beginning...\n if ( $abbrevPos == 0 ) {\n $repeat = '0:';\n $extra = ( $ip == '::' ) ? '0' : ''; // for the address '::'\n $pad = 9; // 7+2 (due to '::')\n // If the '::' is at the end...\n } elseif ( $abbrevPos == ( $addressEnd - 1 ) ) {\n $repeat = ':0';\n $extra = '';\n $pad = 9; // 7+2 (due to '::')\n // If the '::' is in the middle...\n } else {\n $repeat = ':0';\n $extra = ':';\n $pad = 8; // 6+2 (due to '::')\n }\n $ip = str_replace( '::',\n str_repeat( $repeat, $pad - substr_count( $ip, ':' ) ) . $extra,\n $ip\n );\n }\n // Remove leading zereos from each bloc as needed\n $ip = preg_replace( '/(^|:)0+(' . RE_IPV6_WORD . ')/', '$1$2', $ip );\n return $ip;\n }", "public function edit(Address $address)\n\t{\n\t\t//\n\t}", "public function edit(Server $server)\n {\n //\n }", "public function ObtenerIp()\n { \n\n return str_replace(\".\",\"\",$this->getIP()); //Funcion que quita los puntos de la IP\n\n }", "public function testApikeyGetSubnetsV1()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function time4vps_ClientAreaChangeDNS($params, $details)\n{\n $error = null;\n\n if (!empty($_POST)) {\n $error = time4vps_ChangeDNS($params, $_POST['ns1'], $_POST['ns2']);\n if ($error === 'success') {\n time4vps_MarkServerDetailsObsolete($params);\n time4vps_Redirect(time4vps_ActionLink($params, 'ChangeDNS'));\n }\n }\n\n return [\n 'tabOverviewReplacementTemplate' => 'templates/clientarea/pages/changedns.tpl',\n 'templateVariables' => [\n 'details' => $details,\n 'ippattern' => '((^|\\.)((25[0-5])|(2[0-4]\\d)|(1\\d\\d)|([1-9]?\\d))){4}$',\n 'error' => $error\n ]\n ];\n}", "public function setNatIP($value)\n {\n return $this->set('NatIP', $value);\n }", "protected static function fixIpv6($ip){\n\t\t\t// fix double colon\n\t\t\tif(strpos($ip,'::')!==false)$ip=str_replace('::',str_repeat(':',9-substr_count($ip,':')),$ip);\n\t\t\t// fix each slot\n\t\t\t$ip=explode(':',$ip);\n\t\t\tforeach($ip as $k=>$v){\n\t\t\t\t// fix empty/compressed slots\n\t\t\t\t$ip[$k]=$v=str_pad($v,4,'0',STR_PAD_LEFT);\n\t\t\t\t// fix ipv4-style slot\n\t\t\t\tif(strpos($v,'.')!==false){\n\t\t\t\t\t// initially empty buffer\n\t\t\t\t\t$ip[$k]='';\n\t\t\t\t\t// replace each number(byte) with a two-digit hex representation\n\t\t\t\t\tforeach(explode('.',$v) as $v2){\n\t\t\t\t\t\t$v=dechex(min((int)$v2,255));\n\t\t\t\t\t\tif(strlen($v)==1)$v='0'.$v;\n\t\t\t\t\t\t$ip[$k].=$v;\n\t\t\t\t\t}\n\t\t\t\t\t// add colon in between two pairs(bytes) (FFFFFFFF=>FFFF:FFFF)\n\t\t\t\t\t$ip[$k]=implode(':',str_split($ip[$k],4));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn strtoupper(implode(':',$ip));\n\t\t}", "private function set_client_ip($data = null) {\n\t\t$ip = (isset($data)) ? $data : '0.0.0.0';\n\t\tif(strpos($ip, ',')) {\n\t\t\t$ip2 = explode(',', $ip);\n\t\t\t$ip = $ip2[0];\n\t\t\tif(strpos($ip, '192.168.') !== false && isset($ip2[1])) {\n\t\t\t\t$ip = $ip2[1];\n\t\t\t} elseif(strpos($ip, '10.') !== false && isset($ip2[1])) {\n\t\t\t\t$ip = $ip2[1];\n\t\t\t} elseif(strpos($ip, '172.16.') !== false && isset($ip2[1])) {\n\t\t\t\t$ip = $ip2[1];\n\t\t\t}\n\t\t}\n\t\t$ip = filter_var($ip, FILTER_VALIDATE_IP);\n\t\t$ip = ($ip === false) ? '0.0.0.0' : $ip;\n\t\treturn $ip;\n\t}", "private function set_client_ip($data = null) {\n\t\t$ip = (isset($data)) ? $data : '0.0.0.0';\n\t\tif(strpos($ip, ',')) {\n\t\t\t$ip2 = explode(',', $ip);\n\t\t\t$ip = $ip2[0];\n\t\t\tif(strpos($ip, '192.168.') !== false && isset($ip2[1])) {\n\t\t\t\t$ip = $ip2[1];\n\t\t\t} elseif(strpos($ip, '10.') !== false && isset($ip2[1])) {\n\t\t\t\t$ip = $ip2[1];\n\t\t\t} elseif(strpos($ip, '172.16.') !== false && isset($ip2[1])) {\n\t\t\t\t$ip = $ip2[1];\n\t\t\t}\n\t\t}\n\t\t$ip = filter_var($ip, FILTER_VALIDATE_IP);\n\t\t$ip = ($ip === false) ? '0.0.0.0' : $ip;\n\t\treturn $ip;\n\t}", "public function edit($id)\n\t{\n\t\t$network = $this->network->find($id);\n\n\t\tif (is_null($network))\n\t\t{\n\t\t\treturn Redirect::route('networks.index');\n\t\t}\n\n\t\treturn View::make('networks.edit', compact('network'));\n\t}", "public function save_network_options() {\n\n\t\tif ( isset( $_POST['itsec_away_mode'] ) ) {\n\n\t\t\tif ( ! wp_verify_nonce( $_POST['_wpnonce'], 'security_page_toplevel_page_itsec_settings-options' ) ) {\n\t\t\t\tdie( __( 'Security error!', 'it-l10n-ithemes-security-pro' ) );\n\t\t\t}\n\n\t\t\tupdate_site_option( 'itsec_away_mode', $_POST['itsec_away_mode'] ); //we must manually save network options\n\n\t\t}\n\n\t}", "function update_network_option_new_admin_email($old_value, $value)\n {\n }", "public function setSubnetwork($var)\n {\n GPBUtil::checkString($var, True);\n $this->subnetwork = $var;\n\n return $this;\n }", "function getCellNetwork($if)\n {\n \t$arlines = array();\t\t//Store result of ifconfig command\n \texec('ifconfig '.escapeshellarg($if).' '.'2>&1 ', $arlines);\t//execute ifconfig\n \tdebug('(cell_controller.inc|getCellNetwork()) admin client api command: ifconfig '.escapeshellarg($if).' '.'2>&1 '); \t//DEBUG\n \tdebug('(cell_controller.inc|getCellNetwork()) admin client api command output: $arlines', $arlines); \t\t\t\t\t//DEBUG\n \t\n \t//convert array into single line of text\n \t$str='';\n \tforeach($arlines as $line)\n \t{\n \t\t$str=$str.$line;\n \t}\n \t\n \t//run regex on string and find: IP, Gateway, Subnet\n \t$regex=array();\n \tpreg_match(\"/^([A-z]*\\d)\\s+Link\\s+encap:([A-z-]*)\\s.*\\sinet addr:([0-9.]+)\\s*P-t-P:([0-9.]+)\\s*Mask:([0-9.]+)/ims\", $str, $regex);\n \t\n \t$interface = array();\n \tif( !empty($regex) ){\n \t\t$interface['name'] = $regex[1];\n \t\t$interface['type'] = $regex[2];\n \t\t$interface['ip'] = $regex[3];\n \t\t$interface['broadcast'] = $regex[4];\n \t\t$interface['mask'] = $regex[5];\n \t}\n \tdebug('(cell_controller.inc|getCellNetwork()) $interface array '.$interface); \t\t\t\t//DEBUG\n \t\n \treturn $interface;\n }", "public function patchHostSubnet(\n $body,\n $name,\n $pretty = null\n ) {\n\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n \n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.'/oapi/v1/hostsubnets/{name}';\n\n //process optional query parameters\n $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array (\n 'name' => $name,\n ));\n\n //process optional query parameters\n APIHelper::appendUrlWithQueryParameters($_queryBuilder, array (\n 'pretty' => $pretty,\n ));\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'APIMATIC 2.0',\n 'Accept' => 'application/json',\n 'content-type' => 'application/json; charset=utf-8'\n );\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::PATCH, $_headers, $_queryUrl);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::patch($_queryUrl, $_headers, Request\\Body::Json($body));\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n\n $mapper = $this->getJsonMapper();\n\n return $mapper->mapClass($response->body, 'OpenShiftAPIWithKubernetesLib\\\\Models\\\\V1HostSubnet');\n }", "public function Persona (){ \n\n $this->ip=$this->getIP();\n }", "public static function checkIp6(string $requestIp, string $subnet) {\n\t\tif (!((extension_loaded('sockets') && \\defined('AF_INET6')) || @inet_pton('::1'))) {\n\t\t\tthrow new Exception('Unable to check Ipv6. Check that PHP was not compiled with option \"disable-ipv6\".');\n\t\t}\n\n\t\tif (false !== strpos($subnet, '/')) {\n\t\t\tlist($address, $netmask) = explode('/', $subnet, 2);\n\n\t\t\tif ('0' === $netmask) {\n\t\t\t\treturn (bool) unpack('n*', @inet_pton($address));\n\t\t\t}\n\n\t\t\tif ($netmask < 1 || $netmask > 128) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t$address = $subnet;\n\t\t\t$netmask = 128;\n\t\t}\n\n\t\t$bytesAddr = unpack('n*', @inet_pton($address));\n\t\t$bytesTest = unpack('n*', @inet_pton($requestIp));\n\n\t\tif (!$bytesAddr || !$bytesTest) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) {\n\t\t\t$left = $netmask - 16 * ($i - 1);\n\t\t\t$left = ($left <= 16) ? $left : 16;\n\t\t\t$mask = ~(0xffff >> $left) & 0xffff;\n\t\t\tif (($bytesAddr[$i] & $mask) != ($bytesTest[$i] & $mask)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function getIpv6(): string;", "function edit_bot_list_form_submit($form, &$form_state){\n $bot_list_ips = str_replace(array(\"\\r\\n\", \"\\r\"), array(\"\\n\",\"\\n\"), $form_state['values']['bot_list_ip']);\n $ips = explode(\"\\n\", $bot_list_ips);\n variable_set('bot_list_ip', $ips);\n}", "function calc($subnet) {\n\t\t\tif (!IPv6::validate_subnet($subnet))\n\t\t\t\treturn false;\n\n\t\t\tlist($ip, $cidr) = explode(\"/\", $subnet);\n\n\t\t\t$minip = IPv6::minip($subnet);\n\n\t\t\treturn array(\t\"address\"\t=> $ip\n\t\t\t\t,\t\"cidr\"\t\t=> $cidr\n\t\t\t\t,\t\"uncompress\"\t=> IPv6::uncompress($ip)\n\t\t\t\t,\t\"compress\"\t=> IPv6::compress($ip)\n\t\t\t\t,\t\"network\"\t=> $minip .\"/\" .$cidr\n\t\t\t\t,\t\"minip\"\t\t=> $minip\n\t\t\t\t,\t\"maxip\"\t\t=> IPv6::maxip($subnet)\n\t\t\t\t,\t\"ipcount\"\t=> IPv6::cidrips($cidr)\n\t\t\t\t);\n\t\t}", "protected function _updateIpData()\n {\n if (!empty($this->_extraData['ipAddress']))\n {\n $ipAddress = $this->_extraData['ipAddress'];\n }\n else\n {\n $ipAddress = null;\n }\n\n $ipId = XenForo_Model_Ip::log(\n $this->get('user_id'), $this->getContentType(), $this->getContestId(), 'insert', $ipAddress\n );\n $this->set('ip_id', $ipId, '', array('setAfterPreSave' => true));\n\n $this->_db->update($this->getContestTableName(), array(\n 'ip_id' => $ipId\n ), 'photo_contest_id = ' . $this->_db->quote($this->getContestId()));\n }", "public function edit(Rsp $rsp)\n {\n //\n }", "public function delNumeroIP( ) {\n $longitud=strlen($this->numero_ip);\n $this->setNumeroIP(substr($this->numero_ip, 0,$longitud-1));\n }", "function writeIPs() {\n\n\t\t// get banned IPs file name\n\t\t$bannedips_file = $this->settings['bannedips_file'];\n\t\t$empty = true;\n\n\t\t// compile banned IPs file contents\n\t\t$list = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\" . CRLF\n\t\t . \"<ban_list>\" . CRLF;\n\t\tfor ($i = 0; $i < count($this->bannedips); $i++) {\n\t\t\tif ($this->bannedips[$i] != '') {\n\t\t\t\t$list .= \"\\t\\t<ipaddress>\" . $this->bannedips[$i] . \"</ipaddress>\" . CRLF;\n\t\t\t\t$empty = false;\n\t\t\t}\n\t\t}\n\t\tif ($empty) {\n\t\t\t$list .= \"<!-- format:\" . CRLF\n\t\t\t . \"\\t\\t<ipaddress>xx.xx.xx.xx</ipaddress>\" . CRLF\n\t\t\t . \"-->\" . CRLF;\n\t\t}\n\t\t$list .= \"</ban_list>\" . CRLF;\n\n\t\t// write out the list file\n\t\tif (!@file_put_contents($bannedips_file, $list)) {\n\t\t\ttrigger_error('Could not write banned IPs file ' . $bannedips_file . ' !', E_USER_WARNING);\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function stop() {\r\n\t\tif (( string ) $this->data->ipaddr == 'dhcp') {\r\n\t\t\t$this->disableDHCP ();\r\n\t\t}\r\n\t\tparent::stop ();\r\n\t}", "function network_admin_html()\n {\n }", "function wp_privacy_anonymize_ip($ip_addr, $ipv6_fallback = \\false)\n {\n }" ]
[ "0.5744698", "0.55591923", "0.5551555", "0.5549149", "0.55329233", "0.54946864", "0.5439293", "0.5396617", "0.5373008", "0.53587335", "0.53214085", "0.5295203", "0.52042013", "0.5129526", "0.51279265", "0.50930804", "0.50834304", "0.5071166", "0.5052989", "0.50441664", "0.5009406", "0.5007269", "0.5004805", "0.49946934", "0.4985557", "0.4980249", "0.49795902", "0.4977209", "0.49612606", "0.49551535", "0.49549165", "0.49538228", "0.49350452", "0.49268606", "0.49224922", "0.4917396", "0.4901528", "0.48800814", "0.48720387", "0.4864534", "0.48516786", "0.4818973", "0.48157406", "0.47995368", "0.47781712", "0.47781712", "0.47712076", "0.47643355", "0.47538704", "0.47344393", "0.4731294", "0.4700476", "0.46977994", "0.46932212", "0.46819326", "0.468119", "0.46710473", "0.46689707", "0.46551517", "0.4641554", "0.46269393", "0.4617276", "0.45925298", "0.45862493", "0.4578352", "0.4574397", "0.45725423", "0.45695505", "0.4567087", "0.4564327", "0.45453623", "0.45444083", "0.45444083", "0.4543892", "0.45407933", "0.45399114", "0.4539705", "0.45220166", "0.45171556", "0.4515304", "0.4499172", "0.44906503", "0.44906503", "0.44850528", "0.44735992", "0.44696426", "0.4463842", "0.44634765", "0.44439185", "0.44384944", "0.44352955", "0.443319", "0.4419607", "0.441293", "0.4410282", "0.44032156", "0.44031885", "0.44000947", "0.43906268", "0.43902028", "0.43872648" ]
0.0
-1
///////////////////////////////////////////////////////////////////////////// P R I V A T E ///////////////////////////////////////////////////////////////////////////// DHCP server common add/edit form handler.
function _add_edit($iface, $form_type) { // Load libraries //--------------- $this->load->library('dhcp/Dnsmasq'); $this->lang->load('dhcp'); // Set validation rules //--------------------- $this->load->library('form_validation'); $this->form_validation->set_policy('gateway', 'dhcp/Dnsmasq', 'validate_gateway', TRUE); $this->form_validation->set_policy('lease_time', 'dhcp/Dnsmasq', 'validate_lease_time', TRUE); $this->form_validation->set_policy('start', 'dhcp/Dnsmasq', 'validate_start_ip', TRUE); $this->form_validation->set_policy('end', 'dhcp/Dnsmasq', 'validate_end_ip', TRUE); $this->form_validation->set_policy('dns1', 'dhcp/Dnsmasq', 'validate_dns_server'); $this->form_validation->set_policy('dns2', 'dhcp/Dnsmasq', 'validate_dns_server'); $this->form_validation->set_policy('dns3', 'dhcp/Dnsmasq', 'validate_dns_server'); $this->form_validation->set_policy('wins', 'dhcp/Dnsmasq', 'validate_wins_server'); $this->form_validation->set_policy('tftp', 'dhcp/Dnsmasq', 'validate_tftp_server'); $this->form_validation->set_policy('ntp', 'dhcp/Dnsmasq', 'validate_ntp_server'); $this->form_validation->set_policy('wpad', 'dhcp/Dnsmasq', 'validate_wpad_server'); $form_ok = $this->form_validation->run(); // Handle form submit //------------------- if ($this->input->post('submit') && ($form_ok === TRUE)) { $subnet['interface'] = $this->input->post('interface'); $subnet['network'] = $this->input->post('network'); $subnet['gateway'] = $this->input->post('gateway'); $subnet['start'] = $this->input->post('start'); $subnet['end'] = $this->input->post('end'); $subnet['wins'] = $this->input->post('wins'); $subnet['tftp'] = $this->input->post('tftp'); $subnet['ntp'] = $this->input->post('ntp'); $subnet['wpad'] = $this->input->post('wpad'); $subnet['lease_time'] = $this->input->post('lease_time'); $subnet['dns'] = array( $this->input->post('dns1'), $this->input->post('dns2'), $this->input->post('dns3'), ); try { if ($form_type === 'add') { $this->dnsmasq->add_subnet( $subnet['interface'], $subnet['start'], $subnet['end'], $subnet['lease_time'], $subnet['gateway'], $subnet['dns'], $subnet['wins'], $subnet['tftp'], $subnet['ntp'], $subnet['wpad'] ); } else { $this->dnsmasq->update_subnet( $iface, $subnet['start'], $subnet['end'], $subnet['lease_time'], $subnet['gateway'], $subnet['dns'], $subnet['wins'], $subnet['tftp'], $subnet['ntp'], $subnet['wpad'] ); } // Do a full restart for DHCP $this->dnsmasq->restart(TRUE); // Return to summary page with status message $this->page->set_status_added(); redirect('/dhcp/subnets'); } catch (Exception $e) { $this->page->view_exception($e); return; } } // Load the view data //------------------- try { if ($form_type === 'add') $subnet = $this->dnsmasq->get_subnet_default($iface); else $subnet = $this->dnsmasq->get_subnet($iface); } catch (Exception $e) { $this->page->view_exception($e); return; } $data['form_type'] = $form_type; $data['interface'] = $iface; $data['network'] = (isset($subnet['network'])) ? $subnet['network'] : ''; $data['gateway'] = (isset($subnet['gateway'])) ? $subnet['gateway'] : ''; $data['start'] = (isset($subnet['start'])) ? $subnet['start'] : ''; $data['end'] = (isset($subnet['end'])) ? $subnet['end'] : ''; $data['dns'] = (isset($subnet['dns'])) ? $subnet['dns'] : ''; $data['wins'] = (isset($subnet['wins'])) ? $subnet['wins'] : ''; $data['tftp'] = (isset($subnet['tftp'])) ? $subnet['tftp'] : ''; $data['ntp'] = (isset($subnet['ntp'])) ? $subnet['ntp'] : ''; $data['wpad'] = (isset($subnet['wpad'])) ? $subnet['wpad'] : ''; $data['lease_time'] = (isset($subnet['lease_time'])) ? $subnet['lease_time'] : ''; $data['lease_times'] = array(); $data['lease_times'][1] = 1 . " " . lang('base_hour'); $data['lease_times'][2] = 2 . " " . lang('base_hours'); $data['lease_times'][4] = 4 . " " . lang('base_hours'); $data['lease_times'][6] = 6 . " " . lang('base_hours'); $data['lease_times'][12] = 12 . " " . lang('base_hours'); $data['lease_times'][24] = 24 . " " . lang('base_hours'); $data['lease_times'][48] = 2 . " " . lang('base_days'); $data['lease_times'][72] = 3 . " " . lang('base_days'); $data['lease_times'][96] = 4 . " " . lang('base_days'); $data['lease_times'][120] = 5 . " " . lang('base_days'); $data['lease_times'][144] = 6 . " " . lang('base_days'); $data['lease_times'][168] = 7 . " " . lang('base_days'); $data['lease_times'][336] = 2 . " " . lang('base_weeks'); $data['lease_times'][504] = 3 . " " . lang('base_weeks'); $data['lease_times'][672] = 4 . " " . lang('base_weeks'); $data['lease_times'][\clearos\apps\dhcp\Dnsmasq::CONSTANT_UNLIMITED_LEASE] = lang('base_unlimited'); // Load the views //--------------- $this->page->view_form('dhcp/subnets/add_edit', $data, lang('dhcp_subnets')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit()\n {\n $this->title = sprintf('%s: %s', _('Edit'), $this->obj->get('name'));\n unset($this->headerData);\n $this->attributes = array(\n array(),\n array(),\n );\n $this->templates = array(\n '${field}',\n '${input}',\n );\n $fields = array(\n _('LDAP Connection Name') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"name\" name=\"name\" value=\"%s\"/>',\n (\n $_REQUEST['name'] ?\n $_REQUEST['name'] :\n $this->obj->get('name')\n )\n ),\n _('LDAP Server Description') => '<textarea name=\"description\">'\n . (\n $_REQUEST['description'] ?\n $_REQUEST['description'] :\n $this->obj->get('description')\n )\n . '</textarea>',\n _('LDAP Server Address') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"address\" name=\"address\" value=\"%s\"/>',\n (\n $_REQUEST['address'] ?\n $_REQUEST['address'] :\n $this->obj->get('address')\n )\n ),\n _('LDAP Server Port') => '<select id=\"port\" name=\"port\">'\n . sprintf(\n '<option value=\"\">- %s -</option>',\n self::$foglang['PleaseSelect']\n )\n . sprintf(\n '<option value=\"389\"%s>389</option>',\n (\n $_REQUEST['port'] == 389 ?\n ' selected' :\n (\n $this->obj->get('port') == 389 ?\n ' selected' :\n ''\n )\n )\n )\n . sprintf(\n '<option value=\"636\"%s>636</option>',\n (\n $_REQUEST['port'] == 636 ?\n ' selected' :\n (\n $this->obj->get('port') == 636 ?\n ' selected' :\n ''\n )\n )\n )\n . '</select>',\n _('Use Group Matching (recommended)') => '<select id=\"useGroupMatch\" '\n . 'name=\"useGroupMatch\">'\n . sprintf(\n '<option value=\"0\"%s>%s</option>',\n (\n $_REQUEST['useGroupMatch'] < 1 ?\n ' selected' :\n (\n $this->obj->get('useGroupMatch') < 1 ?\n ' selected' :\n ''\n )\n ),\n _('No')\n )\n . sprintf(\n '<option value=\"1\"%s>%s</option>',\n (\n $_REQUEST['useGroupMatch'] > 0 ?\n ' selected' :\n (\n $this->obj->get('useGroupMatch') > 0 ?\n ' selected' :\n ''\n )\n ),\n _('Yes')\n )\n . '</select>',\n _('Search Base DN') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"searchDN\" name=\"searchDN\" value=\"%s\"/>',\n (\n $_REQUEST['searchDN'] ?\n $_REQUEST['searchDN'] :\n $this->obj->get('searchDN')\n )\n ),\n _('Group Search DN') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"grpSearchDN\" name=\"grpSearchDN\" value=\"%s\"/>',\n (\n $_REQUEST['grpSearchDN'] ?\n $_REQUEST['grpSearchDN'] :\n $this->obj->get('grpSearchDN')\n )\n ),\n _('Admin Group') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"adminGroup\" name=\"adminGroup\" value=\"%s\"/>',\n (\n $_REQUEST['adminGroup'] ?\n $_REQUEST['adminGroup'] :\n $this->obj->get('adminGroup')\n )\n ),\n _('Mobile Group') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"userGroup\" name=\"userGroup\" value=\"%s\"/>',\n (\n $_REQUEST['userGroup'] ?\n $_REQUEST['userGroup'] :\n $this->obj->get('userGroup')\n )\n ),\n _('Initial Template') => '<select class=\"smaller\" '\n . 'id=\"inittemplate\">'\n . '<option value=\"pick\" selected >Pick a template</option>'\n . '<option value=\"msad\">Microsoft AD</option>'\n . '<option value=\"open\">OpenLDAP</option>'\n . '<option value=\"edir\">Generic LDAP</option>'\n . '</select>',\n _('User Name Attribute') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"userNamAttr\" name=\"userNamAttr\" value=\"%s\"/>',\n (\n $_REQUEST['userNamAttr'] ?\n $_REQUEST['userNamAttr'] :\n $this->obj->get('userNamAttr')\n )\n ),\n _('Group Member Attribute') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"grpMemberAttr\" name=\"grpMemberAttr\" value=\"%s\"/>',\n (\n $_REQUEST['grpMemberAttr'] ?\n $_REQUEST['grpMemberAttr'] :\n $this->obj->get('grpMemberAttr')\n )\n ),\n _('Search Scope') => '<select id=\"searchScope\" name=\"searchScope\">'\n . sprintf(\n '<option value=\"\">- %s -</option>',\n self::$foglang['PleaseSelect']\n )\n . sprintf(\n '<option value=\"0\"%s>%s</option>',\n (\n isset($_REQUEST['searchScope'])\n && $_REQUEST['searchScope'] == 0 ?\n ' selected' :\n (\n $this->obj->get('searchScope') == 0 ?\n ' selected' :\n ''\n )\n ),\n _('Base only')\n )\n . sprintf(\n '<option value=\"1\"%s>%s</option>',\n (\n $_REQUEST['searchScope'] == 1 ?\n ' selected' :\n (\n $this->obj->get('searchScope') == 1 ?\n ' selected' :\n ''\n )\n ),\n _('Base and subtree')\n )\n . sprintf(\n '<option value=\"2\"%s>%s</option>',\n (\n $_REQUEST['searchScope'] == 2 ?\n ' selected' :\n (\n $this->obj->get('searchScope') == 2 ?\n ' selected' :\n ''\n )\n ),\n _('Subtree and below')\n )\n . '</select>',\n _('Bind DN') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"bindDN\" name=\"bindDN\" value=\"%s\"/>',\n (\n $_REQUEST['bindDN'] ?\n $_REQUEST['bindDN'] :\n $this->obj->get('bindDN')\n )\n ),\n _('Bind Password') => '<input class=\"smaller\" type=\"password\" '\n . sprintf(\n 'id=\"bindPwd\" name=\"bindPwd\" value=\"%s\"/>',\n (\n $_REQUEST['bindPwd'] ?\n $_REQUEST['bindPwd'] :\n $this->obj->get('bindPwd')\n )\n ),\n '&nbsp;' => sprintf(\n '<input class=\"smaller\" name=\"update\" type=\"submit\" value=\"%s\"/>',\n _('Update')\n ),\n );\n foreach ((array)$fields as $field => &$input) {\n $this->data[] = array(\n 'field' => $field,\n 'input' => $input,\n );\n unset($input);\n }\n unset($fields);\n self::$HookManager->processEvent(\n 'LDAP_EDIT',\n array(\n 'headerData' => &$this->headerData,\n 'data' => &$this->data,\n 'templates' => &$this->templates,\n 'attributes' => &$this->attributes\n )\n );\n printf('<form method=\"post\" action=\"%s\">', $this->formAction);\n $this->render();\n echo '</form>';\n }", "function process_add_server()\n{\n // Verify we have all the required info (based on LDAP or AD)\n $error = \"\";\n $enabled = grab_request_var(\"enabled\", \"\");\n if (!empty($enabled)) { $enabled = 1; }\n\n $conn_method = grab_request_var(\"conn_method\", \"\");\n $base_dn = grab_request_var(\"base_dn\", \"\");\n $security_level = grab_request_var(\"security_level\", \"none\");\n\n // AD Only\n $account_suffix = grab_request_var(\"account_suffix\", \"\");\n $domain_controllers = grab_request_var(\"domain_controllers\", \"\");\n\n // LDAP Only\n $ldap_host = grab_request_var(\"ldap_host\", \"\");\n $ldap_port = grab_request_var(\"ldap_port\", \"\");\n\n if ($conn_method == \"ad\") {\n\n // Verify AD sections required\n if (empty($account_suffix) || empty($base_dn) || empty($domain_controllers) || empty($security_level)) {\n $error = _(\"You must fill out all the Active Directory server information.\");\n }\n\n } else if ($conn_method == \"ldap\") {\n\n // Verify LDAP sections required\n if (empty($ldap_host) || empty($ldap_port) || empty($base_dn) || empty($security_level)) {\n $error = _(\"You must fill out all the LDAP server information.\");\n }\n\n } else {\n // Not a recognized connection method...\n $error = _(\"Unknown connection method specified.\");\n }\n\n // Quit if error exists\n if (!empty($error)) {\n display_page(true, $error);\n exit;\n }\n\n $server = array(\"id\" => uniqid(),\n \"enabled\" => $enabled,\n \"conn_method\" => $conn_method,\n \"ad_account_suffix\" => $account_suffix,\n \"ad_domain_controllers\" => $domain_controllers,\n \"base_dn\" => $base_dn,\n \"security_level\" => $security_level,\n \"ldap_port\" => $ldap_port,\n \"ldap_host\" => $ldap_host);\n\n // Add server\n auth_server_add($server);\n\n // Success... display normal page\n display_page();\n}", "function editServiceForm ($pid, $msg = '', $new_name = '', $new_site_url = '', $new_ping_url = '', $new_method = '', $new_enabled = -1)\n{\n global $_CONF, $_TABLES, $LANG_TRB, $LANG_ADMIN, $MESSAGE;\n\n $retval = '';\n\n if ($pid > 0) {\n $result = DB_query (\"SELECT * FROM {$_TABLES['pingservice']} WHERE pid = '$pid'\");\n $A = DB_fetchArray ($result);\n } else {\n $A['is_enabled'] = 1;\n $A['method'] = 'weblogUpdates.ping';\n }\n\n if (!empty ($new_name)) {\n $A['name'] = $new_name;\n }\n if (!empty ($new_site_url)) {\n $A['site_url'] = $new_site_url;\n }\n if (!empty ($new_ping_url)) {\n $A['ping_url'] = $new_ping_url;\n }\n if (!empty ($new_method)) {\n $A['method'] = $new_method;\n }\n if ($new_enabled >= 0) {\n $A['is_enabled'] = $new_enabled;\n }\n\n $retval .= COM_siteHeader ('menu', $LANG_TRB['edit_service']);\n\n if (!empty ($msg)) {\n $retval .= showTrackbackMessage ('Error', $msg);\n }\n\n $token = SEC_createToken();\n\n $retval .= COM_startBlock($LANG_TRB['edit_service'], getHelpUrl() . '#ping',\n COM_getBlockTemplate('_admin_block', 'header'));\n $retval .= SEC_getTokenExpiryNotice($token);\n\n $template = new Template ($_CONF['path_layout'] . 'admin/trackback');\n $template->set_file (array ('editor' => 'serviceeditor.thtml'));\n $template->set_var('xhtml', XHTML);\n $template->set_var('site_url', $_CONF['site_url']);\n $template->set_var('site_admin_url', $_CONF['site_admin_url']);\n $template->set_var('layout_url', $_CONF['layout_url']);\n $template->set_var('max_url_length', 255);\n $template->set_var('method_ping', 'weblogUpdates.ping');\n $template->set_var('method_ping_extended', 'weblogUpdates.extendedPing');\n\n $template->set_var('lang_name', $LANG_TRB['service']);\n $template->set_var('lang_site_url', $LANG_TRB['service_website']);\n $template->set_var('lang_ping_url', $LANG_TRB['service_ping_url']);\n $template->set_var('lang_enabled', $LANG_ADMIN['enabled']);\n $template->set_var('lang_method', $LANG_TRB['ping_method']);\n $template->set_var('lang_method_standard', $LANG_TRB['ping_standard']);\n $template->set_var('lang_method_extended', $LANG_TRB['ping_extended']);\n $template->set_var('lang_save', $LANG_ADMIN['save']);\n $template->set_var('lang_cancel', $LANG_ADMIN['cancel']);\n\n if ($pid > 0) {\n $delbutton = '<input type=\"submit\" value=\"' . $LANG_ADMIN['delete']\n . '\" name=\"servicemode[2]\"%s' . XHTML . '>';\n $jsconfirm = ' onclick=\"return confirm(\\'' . $MESSAGE[76] . '\\');\"';\n $template->set_var('delete_option',\n sprintf ($delbutton, $jsconfirm));\n $template->set_var('delete_option_no_confirmation',\n sprintf ($delbutton, ''));\n } else {\n $template->set_var('delete_option', '');\n }\n\n if (isset ($A['pid'])) {\n $template->set_var('service_id', $A['pid']);\n } else {\n $template->set_var('service_id', '');\n }\n if (isset ($A['name'])) {\n $template->set_var('service_name', $A['name']);\n } else {\n $template->set_var('service_name', '');\n }\n if (isset ($A['site_url'])) {\n $template->set_var('service_site_url', $A['site_url']);\n } else {\n $template->set_var('service_site_url', '');\n }\n if (isset ($A['ping_url'])) {\n $template->set_var('service_ping_url', $A['ping_url']);\n } else {\n $template->set_var('service_ping_url', '');\n }\n if ($A['is_enabled'] == 1) {\n $template->set_var('is_enabled', 'checked=\"checked\"');\n } else {\n $template->set_var('is_enabled', '');\n }\n if ($A['method'] == 'weblogUpdates.ping') {\n $template->set_var('standard_is_checked', 'checked=\"checked\"');\n $template->set_var('extended_is_checked', '');\n } else {\n $template->set_var('standard_is_checked', '');\n $template->set_var('extended_is_checked', 'checked=\"checked\"');\n }\n $template->set_var('gltoken_name', CSRF_TOKEN);\n $template->set_var('gltoken', $token);\n\n $template->parse ('output', 'editor');\n $retval .= $template->finish ($template->get_var ('output'));\n\n $retval .= COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'));\n $retval .= COM_siteFooter ();\n\n return $retval;\n}", "function guifi_domain_create_form($form_state, $node) {\n\n $ip = guifi_main_ip($node->device_id);\n if (guifi_domain_access('create',$node->sid)) {\n $form['text_add'] = array(\n '#type' => 'item',\n '#value' => t('You are not allowed to create a domain on this service.'),\n '#weight' => 0\n );\n return $form;\n }\n if (empty($ip['ipv4'])) {\n $device = db_fetch_object(db_query('SELECT nick FROM {guifi_devices} WHERE id = %d', $node->device_id));\n $url = url('guifi/device/'.$node->device_id);\n $form['text'] = array(\n '#type' => 'item',\n '#value' => t('The server <a href='.$url.'>'.$device->nick.'</a> does not have an IPv4 address, can not create a domain.')\n );\n return $form;\n} \n $form['domain_type'] = array(\n '#type' => 'select',\n '#title' => t('Select new domain type'),\n '#default_value' => 'none',\n '#options' => array('NULL' => 'none', 'master' => 'Master, ex: newdomain.net','delegation' => 'Delegation, ex: newdomain.guifi.net'),\n '#ahah' => array(\n 'path' => 'guifi/js/add-domain',\n 'wrapper' => 'select_type',\n 'effect' => 'fade',\n )\n );\n $form['domain_type_form'] = array(\n '#prefix' => '<div id=\"select_type\">',\n '#suffix' => '</div>',\n '#type' => 'fieldset',\n );\n\n if ($form_state['values']['domain_type'] == 'master') {\n $form['domain_type_form']['sid'] = array(\n '#type' => 'hidden',\n '#value' => $node->id\n );\n $form['domain_type_form']['name'] = array(\n '#type' => 'textfield',\n '#size' => 64,\n '#maxlength' => 32,\n '#title' => t('Add a new domain'),\n '#description' => t('Insert domain name'),\n '#prefix' => '<table style=\"width: 0px\"><tr><td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['type'] = array(\n '#type' => 'hidden',\n '#value' => 'master',\n );\n $form['domain_type_form']['ipv4'] = array(\n '#type' => 'hidden',\n '#value' => $ip[ipv4],\n );\n $form['domain_type_form']['scope'] = array(\n '#type' => 'select',\n '#title' => t('Scope'),\n '#options' => array('internal' => 'internal', 'external' => 'external'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['mname'] = array(\n '#type' => 'hidden',\n '#value' => '0',\n );\n $form['domain_type_form']['submit'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'guifi').'/icons/add.png',\n '#attributes' => array('title' => t('add')),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_domain_create_form_submit),\n '#prefix' => '<td>',\n '#suffix' => '</td></tr></table>',\n );\n }\n\n if ($form_state['values']['domain_type'] == 'delegation') {\n $ip = guifi_main_ip($node->device_id);\n $form['domain_type_form']['sid'] = array(\n '#type' => 'hidden',\n '#value' => $node->id\n );\n $form['domain_type_form']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Add a new delegated Domain Name'),\n '#description' => t('Just the hostname (HOSTNAME.domain.com) will be added before master domain.'),\n '#prefix' => '<table style=\"width: 0px\"><tr><td>',\n '#suffix' => '</td>',\n );\n $domqry= db_query(\"\n SELECT *\n FROM {guifi_dns_domains}\n WHERE type = 'master'\n AND public = 'yes'\n ORDER BY name\"\n );\n $values = array();\n while ($type = db_fetch_object($domqry)) {\n $values[$type->name] = $type->name;\n }\n $form['domain_type_form']['mname'] = array(\n '#type' => 'select',\n '#options' => $values,\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['scope'] = array(\n '#type' => 'select',\n '#title' => t('Scope'),\n '#options' => array('internal' => 'internal', 'external' => 'external'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['type'] = array(\n '#type' => 'hidden',\n '#value' => 'delegation',\n );\n $form['domain_type_form']['ipv4'] = array(\n '#type' => 'hidden',\n '#value' => $ip[ipv4],\n );\n $form['domain_type_form']['submit'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'guifi').'/icons/add.png',\n '#attributes' => array('title' => t('add')),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_domain_create_form_submit),\n '#prefix' => '<td>',\n '#suffix' => '</td></tr></table>',\n );\n }\n return $form;\n}", "function save_object()\n {\n /* Check permissions, don't touch anything if we do not have write permissions \n */\n if (!preg_match(\"/w/\",$this->parent->getacl(\"\"))){\n dhcpPlugin::save_object();\n }elseif(isset($_POST['cn'])){\n\n $this->cn= get_post('cn');\n dhcpPlugin::save_object();\n\n foreach (array(\"server-identifier\", \"default-lease-time\",\n \"max-lease-time\", \"min-lease-time\") as $attr){\n if (isset($_POST[$attr]) && $_POST[$attr] != \"\"){\n $this->statements->set($attr,get_post($attr));\n } else {\n $this->statements->removeAll($attr);\n }\n }\n\n if (isset($_POST[\"authoritative\"])){\n $this->statements->set(\"authoritative\", \"\");\n } else {\n $this->statements->removeAll(\"authoritative\");\n }\n\n $this->statements->removeAll(\"deny\");\n $this->statements->removeAll(\"allow\");\n foreach(array(\"unknown-clients\", \"bootp\", \"booting\") as $name){\n if (isset($_POST[$name])){\n $this->statements->add(\"allow\",$name);\n } else {\n $this->statements->add(\"deny\",$name);\n }\n }\n }\n }", "function guifi_domain_add() {\n guifi_log(GUIFILOG_TRACE,'function guifi_domain_add()');\n if (arg(8) == 'external')\n $ipv4 = '';\n else\n $ipv4 = arg(6);\n\n $output = drupal_get_form('guifi_domain_form',array(\n 'add' => arg(3),\n 'dname' => arg(4),\n 'type' => arg(5),\n 'ipv4' => $ipv4,\n 'mname' => arg(7),\n 'scope' => arg(8),\n 'management' => arg(9)));\n\n // To gain space, save bandwith and CPU, omit blocks\n print theme('page', $output, FALSE);\n}", "private function serverToevoegenAction()\n {\n if (isset($_POST) && !empty($_POST))\n {\n $this->model->maakServer();\n $this->model->foutGoedMelding('success', '<strong>Gelukt!</strong> server is toegevoegd. <span class=\"glyphicon glyphicon-saved\"></span>');\n $this->model->setLog('Server toevoegen', 'Gelukt');\n $this->forward('klant', 'admin');\n }\n }", "function cp_do_form_add_edit_supplier($adata, $aerr_entry) {\n\t# Dim some Vars:\n\t\tglobal $_TCFG, $_DBCFG, $_LANG, $_nl, $_sp;\n\n\t# Build mode dependent strings\n\t\tswitch ($adata['op']) {\n\t\t\tcase \"add\":\n\t\t\t\t$mode_proper\t= $_LANG['_ADMIN']['B_Add'];\n\t\t\t\t$mode_button\t= $_LANG['_ADMIN']['B_Add'];\n\t\t\t\tbreak;\n\t\t\tcase \"edit\":\n\t\t\t\t$mode_proper\t= $_LANG['_ADMIN']['B_Edit'];\n\t\t\t\t$mode_button\t= $_LANG['_ADMIN']['B_Save'];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$adata['op']\t= \"add\";\n\t\t\t\t$mode_proper\t= $_LANG['_ADMIN']['B_Add'];\n\t\t\t\t$mode_button\t= $_LANG['_ADMIN']['B_Add'];\n\t\t\t\tbreak;\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr .= $mode_proper.$_sp.$_LANG['_ADMIN']['Supplier_Info_Entry'];\n\n\t# Build Temp Error Red Font Flag\n\t\t$_err_red_flag = '<font color=\"red\"><b>-->> </b></font>';\n\n\t# Do data entry error string check and build\n\t\tIF ($aerr_entry['flag']) {\n\t\t\t$_cstr .= '<br><b>'.$_LANG['_SDMIN']['AD_ERR00__HDR1'].' '.$_err_red_flag.$_nl;\n\t\t\t$_cstr .= '<font color=\"red\"><br>'.$_LANG['_ADMIN']['AD_ERR00__HDR2'].'</font><br><br>'.$_nl;\n\t\t}\n\n\t# Build common td start tag / col strings (reduce text)\n\t\t$_td_str_left_vtop\t\t= '<td class=\"TP1SML_NR\" width=\"30%\" valign=\"top\">';\n\t\t$_td_str_left\t\t\t= '<td class=\"TP1SML_NR\" width=\"30%\" valign=\"top\">';\n\t\t$_td_str_right\t\t\t= '<td class=\"TP1SML_NL\" width=\"70%\" valign=\"top\">';\n\n\t# Do Main Form\n\t\t$_cstr .= '<form name=\"s_info\" id=\"s_info\" method=\"POST\"action=\"admin.php\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"op\" value=\"'.$adata['op'].'\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"stage\" value=\"1\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"s_id\" value=\"'.htmlspecialchars($adata['s_id']).'\">'.$_nl;\n\n\t\t$_cstr .= '<table cellpadding=\"5\" cellspacing=\"0\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l_Supplier_ID'].$_sp.'</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= $adata['s_id'].$_nl;\n\t\tIF ($adata['op'] == 'add') {$_cstr .= '('.$_LANG['_ADMIN']['auto-assigned'].')';}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n//\t\tIF ($aerr_entry['s_status']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.'<b>'.$_LANG['_ADMIN']['l14_Status'].$_sp.'</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_status_supplier('s_status', $adata['s_status']);\n//\t\tIF ($aerr_entry['s_status']) {\n//\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n//\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_ADMIN']['Required'].$_nl;\n//\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_account']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_AccountID'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_account\" SIZE=20 value=\"'.htmlspecialchars($adata['s_account']).'\">'.$_nl;\n\t\tIF ($aerr_entry['s_account']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n//\t\t} ELSE {\n//\t\t\t$_cstr .= $_LANG['_ADMIN']['Required'].$_nl;\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_terms']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_Terms'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_terms\" SIZE=20 value=\"'.htmlspecialchars($adata['s_terms']).'\">'.$_nl;\n\t\tIF ($aerr_entry['s_terms']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_ADMIN']['Required'].$_nl;\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_company']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_Company'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_company\" SIZE=20 value=\"'.htmlspecialchars($adata['s_company']).'\" maxlength=\"50\">'.$_nl;\n\t\tIF ($aerr_entry['s_company']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_ADMIN']['Required'].$_nl;\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_name_first']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_First_Name'].$_sp.'</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_name_first\" SIZE=20 value=\"'.htmlspecialchars($adata['s_name_first']).'\">'.$_nl;\n\t\tIF ($aerr_entry['s_name_first']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_name_last']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_Last_Name'].$_sp.'</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_name_last\" SIZE=20 value=\"'.htmlspecialchars($adata['s_name_last']).'\">'.$_nl;\n\t\tIF ($aerr_entry['s_name_last']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_addr_01']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_Address_Street_1'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_addr_01\" SIZE=40 value=\"'.htmlspecialchars($adata['s_addr_01']).'\" maxlength=\"50\">'.$_nl;\n\t\tIF ($aerr_entry['s_addr_01']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_ADMIN']['Required'].$_nl;\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_addr_02']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_Address_Street_2'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_addr_02\" SIZE=40 value=\"'.htmlspecialchars($adata['s_addr_02']).'\" maxlength=\"50\">'.$_nl;\n\t\tIF ($aerr_entry['s_addr_02']) {$_cstr .= $_sp.'<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_city']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_City'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_city\" SIZE=40 value=\"'.htmlspecialchars($adata['s_city']).'\" maxlength=\"50\">'.$_nl;\n\t\tIF ($aerr_entry['s_city']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_ADMIN']['Required'].$_nl;\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_state_prov']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_State_Province'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_state_prov\" SIZE=40 value=\"'.htmlspecialchars($adata['s_state_prov']).'\" maxlength=\"50\">'.$_nl;\n\t\tIF ($aerr_entry['s_state_prov']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_ADMIN']['Required'].$_nl;\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_country']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_Country'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_countries('s_country', $adata['s_country']);\n\t\tIF ($aerr_entry['s_country']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_ADMIN']['Required'].$_nl;\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_zip_code']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_Zip_Postal_Code'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_zip_code\" SIZE=12 value=\"'.htmlspecialchars($adata['s_zip_code']).'\">'.$_nl;\n\t\tIF ($aerr_entry['s_zip_code']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_ADMIN']['Required'].$_nl;\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_phone']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_Phone'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_phone\" SIZE=20 value=\"'.htmlspecialchars($adata['s_phone']).'\">'.$_nl;\n\t\tIF ($aerr_entry['s_phone']) {$_cstr .= $_sp.'<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_fax']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_Fax'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_fax\" SIZE=20 value=\"'.htmlspecialchars($adata['s_fax']).'\">'.$_nl;\n\t\tIF ($aerr_entry['s_fax']) {$_cstr .= $_sp.'<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_tollfree']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_TollFree'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_tollfree\" SIZE=20 value=\"'.htmlspecialchars($adata['s_tollfree']).'\">'.$_nl;\n\t\tIF ($aerr_entry['s_tollfree']) {$_cstr .= $_sp.'<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_email'] || $aerr_entry['err_email_matches_another'] || $aerr_entry['err_email_invalid']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_Email_Address'].$_sp.'</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_email\" SIZE=40 value=\"'.htmlspecialchars($adata['s_email']).'\" maxlength=\"50\">'.$_nl;\n\t\tIF ($aerr_entry['s_email']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_sp.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';\n\t\t} ELSEIF ($aerr_entry['err_email_matches_another']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_sp.$_LANG['_ADMIN']['ERR_ERR33'].'</font>';\n\t\t} ELSEIF ($aerr_entry['err_email_invalid']) {\n\t\t\t$_cstr .= '<font color=\"red\">'.$_sp.$_LANG['_ADMIN']['ERR_ERR30'].'</font>';\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\tIF ($aerr_entry['s_taxid']) {$_tmp = $_err_red_flag;} ELSE {$_tmp = '';}\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_tmp.'<b>'.$_LANG['_ADMIN']['l_TaxID'].$_sp;\n\t\t$_cstr .= '</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT NAME=\"s_taxid\" SIZE=20 value=\"'.htmlspecialchars($adata['s_taxid']).'\">'.$_nl;\n\t\tIF ($aerr_entry['s_taxid']) {$_cstr .= $_sp.'<font color=\"red\">'.$_LANG['_ADMIN']['ERR_ERR38'].'</font>';}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left_vtop.'<b>'.$_LANG['_ADMIN']['l_Notes'].$_sp.'</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<TEXTAREA class=\"PSML_NL\" NAME=\"s_notes\" COLS=\"60\" ROWS=\"10\">'.$adata['s_notes'].'</TEXTAREA>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.'<b>'.$_sp.'</b></td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_edit', 'SUBMIT', $mode_button, 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_ADMIN']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl;\n\t\tIF ($adata['op'] == 'edit') {\n\t\t\t$_cstr .= do_input_button_class_sw ('b_delete', 'SUBMIT', $_LANG['_ADMIN']['B_Delete_Entry'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t}\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</form>'.$_nl;\n\n\t# Build a form for showing/adding/editing/deleting additional emails\n\t# Supplier must exist before this form will show.\n\t# If supplier does not exist, a notice about form availability will appear instead.\n\t\tIF ($adata['op'] == 'edit') {\n\t\t\t$_cstr .= do_form_additional_emails($adata['s_id']).$_nl;\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_ADMIN']['l_Email_Address_Additional_later'];\n\t\t}\n\n\t\tIF ($adata['op'] == 'edit') {\n\t\t\t$_mstr .= do_nav_link('admin.php?cp=suppliers&op=view&s_id='.$adata['s_id'], $_TCFG['_IMG_VIEW_M'],$_TCFG['_IMG_VIEW_M_MO'],'','');\n\t\t}\n\t\t$_mstr .= do_nav_link('admin.php?cp=suppliers&op=add', $_TCFG['_IMG_ADD_NEW_M'],$_TCFG['_IMG_ADD_NEW_M_MO'],'','');\n\t\t$_mstr .= do_nav_link('admin.php?cp=suppliers', $_TCFG['_IMG_LISTING_M'],$_TCFG['_IMG_LISTING_M_MO'],'','');\n\n\t# Call block it function\n\t\t$_out = do_mod_block_it($_tstr, $_cstr, 1, $_mstr, 1).'<br>'.$_nl;\n\n\t\treturn $_out;\n}", "public function initClientOverviewForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\t$settings = $this->setup->getClient()->getAllSettings();\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t$this->form->setTitle($lng->txt(\"client_info\"));\n\n\t\t// installation name\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"inst_name\"), \"inst_name\");\n\t\t$ne->setValue(($this->setup->getClient()->getName())\n\t\t\t? $this->setup->getClient()->getName()\n\t\t\t: \"&lt;\".$this->lng->txt(\"no_client_name\").\"&gt;\");\n\t\t$ne->setInfo($this->setup->getClient()->getDescription());\n\t\t$this->form->addItem($ne);\n\n\t\t// client id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"client_id\"), \"client_id\");\n\t\t$ne->setValue($this->setup->getClient()->getId());\n\t\t$this->form->addItem($ne);\n\n\t\t// nic id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_nic_id\"), \"nic_id\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"inst_id\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// database version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"db_version\"), \"db_vers\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"db_version\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// access status\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"access_status\"), \"status\");\n\t\t//$access_link = \"&nbsp;&nbsp;[<a href=\\\"setup.php?cmd=changeaccess&client_id=\".$this->setup->getClient()->getId().\"&back=view\\\">\".$this->lng->txt($access_button).\"</a>]\";\n\t\t$access_status = ($this->setup->getClient()->status[\"access\"][\"status\"]) ? \"online\" : \"disabled\";\n\t\t$ne->setValue($this->lng->txt($access_status).$access_link);\n\t\t$this->form->addItem($ne);\n\n\t\t// server information\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"server_info\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// ilias version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_version\"), \"il_vers\");\n\t\t$ne->setValue(ILIAS_VERSION);\n\t\t$this->form->addItem($ne);\n\n\t\t// host\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"host\"), \"host\");\n\t\t$ne->setValue($_SERVER[\"SERVER_NAME\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// ip address and port\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ip_address\").\" & \".\n\t\t\t$lng->txt(\"port\"));\n\t\t$ne->setValue($_SERVER[\"SERVER_ADDR\"].\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// server software\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"server_software\"), \"server_softw\");\n\t\t$ne->setValue($_SERVER[\"SERVER_SOFTWARE\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// http path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"http_path\"), \"http_path\");\n\t\t$ne->setValue(ILIAS_HTTP_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// absolute path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"absolute_path\"), \"absolute_path\");\n\t\t$ne->setValue(ILIAS_ABSOLUTE_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// third party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"3rd_party_software\"));\n\t\t$this->form->addItem($sh);\n\n\t\t$tools = array(\"convert\", \"zip\", \"unzip\", \"ghostscript\", \"java\", \"htmldoc\", \"ffmpeg\");\n\n\t\tforeach ($tools as $tool)\n\t\t{\n\t\t\t// tool\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt($tool.\"_path\"), $tool.\"_path\");\n\t\t\t$p = $this->setup->ini->readVariable(\"tools\", $tool);\n\t\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\n\t\t// latex\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"url_to_latex\"), \"latex_url\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\", \"latex\"); // #13109\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// virus scanner\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"virus_scanner\"), \"vscan\");\n\t\t$ne->setValue($this->setup->ini->readVariable(\"tools\",\"vscantype\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// scan command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"scan_command\"), \"scan\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"scancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// clean command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"clean_command\"), \"clean\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"cleancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "public function configureDHCP() {\r\n\t\t$fd = fopen ( \"/var/etc/dhclient_\" . ( string ) $this->data->if . \".conf\", \"w\" );\r\n\t\tif (! $fd) {\r\n\t\t\t$this->logger->error ( \"Cannot open dhclient_\" . ( string ) $this->data->if . \".conf for writing.\\n\" );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (( string ) $this->data->dhcphostname != '') {\r\n\t\t\t$dhclientconf_hostname = \"send dhcp-client-identifier \\\"\" . ( string ) $this->data->dhcpdhostname . \"\\\";\\n\";\r\n\t\t\t$dhclientconf_hostname .= \"\\tsend host-name \\\"\" . ( string ) $this->data->dhcpdhostname . \"\\\";\\n\";\r\n\t\t} else {\r\n\t\t\t$dhclientconf_hostname = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t$dhclientconf = \"\";\r\n\t\t\r\n\t\t$dhclientconf .= \"timeout 60;\\n\n\t\tretry 1;\\n\n\t\tselect-timeout 0;\\n\n\t\tinitial-interval 1;\\n\n\t\tinterface \\\"\" . ( string ) $this->data->interface . \"\\\" {\\n\n\t\t\t{$dhclientconf_hostname}\\n\n\t\t\tscript \\\"/sbin/dhclient-script\\\";\\n\n\t\t}\";\r\n\t\t\r\n\t\tfwrite ( $fd, $dhclientconf );\r\n\t\tfclose ( $fd );\r\n\t\treturn true;\r\n\t}", "public function processForm(ServerData $server);", "function psc_manage_forms() {\n\tif(isset($_GET['action'])) {\n\t\tswitch($_GET['action']) {\n\t\t\tcase 'save_captcha_info':\n\t\t\t\tif(wp_verify_nonce($_POST['psc_catch_info'], 'psc_nonce_field')) {\n\t\t\t\t\tpsc_save_api_info($_POST);\n\t\t\t\t}\n\t\t\t\tpsc_admin_index();\n\t\t\t\tbreak;\n\t\t\tcase 'edit_form':\n\t\t\t\tif(isset($_GET['id'])) {\n\t\t\t\t\tif(wp_verify_nonce($_POST['psc_save'], 'psc_nonce_field') && $_POST['psc_id']==$_GET['id']) {\n\t\t\t\t\t\tpsc_save_form($_POST);\n\t\t\t\t\t}\n\t\t\t\t\tpsc_edit_form($_GET['id']);\n\t\t\t\t} else {\n\t\t\t\t\techo 'Error.';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'new_form':\n\t\t\t\tif(wp_verify_nonce($_POST['psc_save'], 'psc_nonce_field')) {\n\t\t\t\t\t$id = psc_save_form($_POST);\n\t\t\t\t}\n\t\t\t\tif(isset($id)) {\n\t\t\t\t\tpsc_edit_form($id);\n\t\t\t\t} else {\n\t\t\t\t\tpsc_edit_form();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\tpsc_admin_index();\n\t}\n\treturn true;\n}", "function server_admin_add(){\r\n\textract($_REQUEST);\r\n\r\n\t$lilo_mongo = new LiloMongo();\r\n\t$lilo_mongo->selectDB('Servers');\r\n\t$lilo_mongo->selectCollection('GameServer');\r\n\r\n\tif($submitted == 1){\r\n\t\t$game_server = array('name' => $server_admin_add_name, 'ip' => $server_admin_add_ip, 'port' => $server_admin_add_port, 'max_ccu' => $server_admin_add_max_ccu);\r\n\t\t$game_server_id = $lilo_mongo->insert($game_server);\r\n\r\n\t\t$lilo_mongo->update($game_server, array_merge($game_server, array('lilo_id' => (string)$game_server_id)), array(\"multiple\" => false) );\r\n\r\n\t}\r\n\r\n\t$_SESSION['pop_status_msg'][] = \"New server added.\";\r\n\r\n\theader(\"Location: \" . $_SESSION['basepath'] . 'server/admin');\r\n\texit;\r\n}", "public function initClientIniForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t// client id\n\t\tif ($this->setup->ini_client_exists)\n\t\t{\n\t\t\t$hi = new ilHiddenInputGUI(\"client_id\");\n\t\t\t$hi->setValue($this->client_id);\n\t\t\t$this->form->addItem($hi);\n\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"client_id\"), \"hh\");\n\t\t\t$ne->setValue($this->client_id);\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ti = new ilTextInputGUI($lng->txt(\"client_id\"), \"client_id\");\n\t\t\t$ti->setMaxLength(32);\n\t\t\t$ti->setRequired(true);\n\t\t\t$this->form->addItem($ti);\n\t\t}\n\n\t\t// database connection\t\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"db_conn\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// db type\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"db_type\"), \"dbt\");\n\t\t$ne->setValue($lng->txt(\"db_\".$_SESSION[\"db_type\"]));\n\t\t$this->form->addItem($ne);\n\n\t\t// db host\n\t\t$ti = new ilTextInputGUI($lng->txt(\"db_host\"), \"db_host\");\n\t\t$ti->setMaxLength(120);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// db name\n\t\tif (in_array($_SESSION[\"db_type\"], array(\"mysql\", \"postgres\", \"innodb\")))\n\t\t{\n\t\t\t$ti = new ilTextInputGUI($lng->txt(\"db_name\"), \"db_name\");\n\t\t\t$ti->setRequired(true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ti = new ilTextInputGUI($lng->txt(\"db_service_name\"), \"db_name\");\n\t\t}\n\t\t$ti->setMaxLength(40);\n\t\t$this->form->addItem($ti);\n\n\t\t// db user\n\t\t$ti = new ilTextInputGUI($lng->txt(\"db_user\"), \"db_user\");\n\t\t$ti->setMaxLength(40);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// db port\n\t\t$ti = new ilTextInputGUI($lng->txt(\"db_port\"), \"db_port\");\n\t\t$ti->setMaxLength(8);\n\t\t$this->form->addItem($ti);\n\n\t\t// db password\n\t\t$ti = new ilTextInputGUI($lng->txt(\"db_pass\"), \"db_pass\");\n\t\t$ti->setMaxLength(40);\n\t\t$this->form->addItem($ti);\n\n\t\t$this->form->addCommandButton(\"saveClientIni\", $lng->txt(\"save\"));\n\n\t\t$this->form->setTitle($lng->txt(\"inst_identification\"));\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "public function process_admin_options() {\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ) update_option( 'jigoshop_tgm_custom_gateway_enabled', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_enabled' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_title'] ) ) update_option( 'jigoshop_tgm_custom_gateway_title', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_title'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_title' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_description'] ) ) update_option( 'jigoshop_tgm_custom_gateway_description', \tjigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_description'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_description' );\n \t}", "public function addServer () {\n return view ('server/add');\n }", "public function vUpdatevirtualAction(){\n\t\t$this->secondaryMenu($this->controller,$this->action);\n\t\t$this->tools($this->controller,$this->action);\n\t\t\t\n\t\t$stypes = Stype::find();\n\t\t$servers = Server::find();\n\t\t\n\t\t$itemservers = array();\n\t\tforeach($servers as $server) {\n\t\t\t$itemservers[] = $server->getName();\n\t\t}\n\t\t\n\t\t\n\t\t$semantic=$this->semantic;\n\t\t\n\t\t$btnCancel = $semantic->htmlButton(\"btnCancel\",\"Annuler\",\"red\");\n\t\t$btnCancel->getOnClick(\"Serveur/index\",\"#index\");\n\t\t\n\t\t\n\t\t$btnCancel = $semantic->htmlButton(\"btnCancel\",\"Annuler\",\"red\");\n\t\t$btnCancel->getOnClick(\"Servers\",\"#divAction\");\n\t\t\n\t\t\n\t\t$form=$semantic->htmlForm(\"frmUpdate\");\n\t\t$form->addInput(\"name\")->getField()->labeledToCorner(\"asterisk\",\"right\");\n\t\t\n\t\t\n\t\t$input2=$semantic->htmlInput(\"Configuration...\");\n\t\t$form->addInput(\"config\")->getField()->labeledToCorner(\"asterisk\",\"right\");\n\t\t\t\n\t\t\n\t\t\n\t\t$form->addDropdown(\"server\",$itemservers,\"Nom du Serveurs : * \",\"Selectionner un nom de serveur ...\",false);\n\t\t\n\t\t$form->addButton(\"submit\", \"Valider\",\"ui green button\")->postFormOnClick(\"Serveur/vAddSubmitvirtual\", \"frmUpdate\",\"#divAction\");\n\t\t\n\t\t\n\n\t\t$form->addButton(\"cancel\", \"Annuler\",\"ui red button\")->postFormOnClick(\"Serveur/hosts\", \"frmDelete\",\"#tab\");\n\t\t\n\t\t\t\n\t\t$this->jquery->compile($this->view);\n\t\t\n\t\t\n\t}", "function odbcadmin_show($xtn, $type, $iam) {\n\t\n\t//get settings if editing\n\tif(!empty($xtn)) {\n\t\t$thisxtn = odbcadmin_get($xtn);\n $dsname=$thisxtn['dsname'];\n $dbname=$thisxtn['dbname'];\n $dbtype=$thisxtn['dbtype'];\n $username=$thisxtn['username'];\n $password=$thisxtn['password'];\n $host=$thisxtn['host'];\n $port=$thisxtn['port'];\n $description=$thisxtn['description'];\n $trace =$thisxtn['trace'];\n $tracefile =$thisxtn['tracefile'];\n $enable =$thisxtn['enable']; \n\t\tif(!is_array($thisxtn)) {\n\t\t\techo \"Error: cannot retreive configure info for this object\";\n\t\t\treturn;\n\t\t}\n\n\t\t$action = 'odbcedit';\n\t\t\n\t\t//draw delete button\n\t\techo <<< End_Of_Delete\n\n\t\t<form method=\"POST\" action=\"{$_SERVER['PHP_SELF']}?type={$type}&display={$iam}\">\n\t\t <input type=\"hidden\" name=\"action\" value=\"odbcdelete\">\n\t\t <input type=\"hidden\" name=\"ext\" value=\"{$thisxtn['id']}\">\n\t\t <input type=\"submit\" value=\"Delete This DSN\">\n </form>\n\nEnd_Of_Delete;\n\t}\n?>\n\t<hr>\n<?php\n\t\n\tif(isset($_REQUEST['action']) && $_REQUEST['action'] == 'odbcadd') {\n\t\t$thisxtn['ext'] = $_REQUEST['ext'];\n\t\t$thisxtn[0] = $_REQUEST['ext'];\n\t\t$action = 'odbcadd';\n\t}\n\t\n\n\n\t//echo \"<form method='POST' action='{$_SERVER['PHP_SELF']}?type=$type&display=$iam&ext=$ext&action=$action'>\";\n echo \"<form name=\\\"addNew\\\" action=\\\"\".$_SERVER['PHP_SELF'].\"?type={$type}&display={$iam}&action={$action}\".\"\\\" method=\\\"post\\\">\";\n\n\techo \"<input type='hidden' name='action' value='{$action}'>\";\n\techo \"<input type='hidden' name='ext' value='{$thisxtn['id']}'>\";\n\n echo \"<table>\";\n\n echo \"<tr><td colspan=2><h3>\";\n echo ($_REQUEST['ext'] ? _('Edit DSN Settings') : _('Add New DSN'));\n echo \"</h3></td></tr>\";\n\n //Status Of Connection Check\n if ($_REQUEST['ext']){\n\n $connect_status = check_db_connect($dsname, $username, $password);\n\t if ($connect_status == \"OK\") {\n\t\t $cstatus = draw_status_box(_(\"Connection Status\"), \"ok\", _('Check database connection successed.'), 200);\n\t }\n else {\n\t\t $cstatus = draw_status_box(_(\"Connection Status\"), \"error\", _(\"$connect_status\"), 200);\n\t }\n \n echo \"<tr align='center'><td align='left' colspan=2>\";\n echo $cstatus; \n echo \"</td></tr>\";\n }\n\n echo \"<tr><td></td></tr>\";\n\n\n //DB type\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"DB-Type\").\"\\n\";\n echo \"<span>\"._(\"Database Type (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n //$type =($ext ? $type : \"mysql\");\n //$list_type = array('PostgreSQL', 'MySQL', 'SQLite', 'MSSQL'); \n //$list_type = array('PostgreSQL', 'MySQL', 'MSSQL'); \n $list_type = odbcdriver_list();\n echo \"&nbsp;&nbsp;<select name=\\\"dbtype\\\" tabindex=\".++$tabindex.\">\\n\";\n foreach ($list_type as $s){\t\t\n\t\tif ($s[1] == \"\".$dbtype){\n\t\t\techo \"<option value = '{$s[1]}' selected>{$s[1]}</option>\\n\";\n\t\t}\n\t\telse if ($s[3] == \"yes\" && find_odbcdriver($s[1])){\n\t\t\techo \"<option value = '{$s[1]}'>{$s[1]}</option>\\n\";\n\t\t}\n }\n echo \"</select>\\n\";\n echo \"</td></tr>\\n\";\n\n //DSNAME\n echo \"<tr \";\n echo ($_REQUEST['ext'] ? '' : '');\n echo \"><td>\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\" >\"._(\"DSN-name\").\"\\n\";\n echo \"<span>\"._(\"DSNAME (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td>\";\n echo \"<td>\";\n echo \"<input type=text name=\\\"dsname\\\" value=\\\"$dsname\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n\n //DB_name\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"DB-name\").\"\\n\";\n echo \"<span>\"._(\"DBname (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n echo \"<input type=text tabindex=\".++$tabindex.\" name=\\\"dbname\\\" value=\\\"$dbname\\\"\\n\";\n echo \"</td></tr>\\n\";\n\n //USERNAME\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"Username\").\"\\n\";\n echo \"<span>\"._(\"Usename (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n echo \"<input type=text tabindex=\".++$tabindex.\" name=\\\"username\\\" value=\\\"$username\\\">\\n\";\n echo \"</td></tr>\\n\";\n\n //PASSWORD\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"Password\").\"\\n\";\n echo \"<span>\"._(\"Password (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n echo \"<input type=text name=\\\"password\\\" value=\\\"$password\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n\n //HOST\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"Host\").\"\\n\";\n echo \"<span>\"._(\"Host (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n echo \"<input type=text name=\\\"host\\\" value=\\\"$host\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n\n //PORT\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"Port\").\"\\n\";\n echo \"<span>\"._(\"Empty for default\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n echo \"<input type=text name=\\\"port\\\" value=\\\"$port\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n\n\n //DESCRIPTION\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"Description\").\"\\n\";\n echo \"<span>\"._(\"Description\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n echo \"<input type=text name=\\\"description\\\" value=\\\"$description\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n\n //Trace\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"Trace\").\"\\n\";\n echo \"<span>\"._(\"Trace Enable\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n $list_type = array('yes', 'no'); \n echo \"&nbsp;&nbsp;<select name=\\\"trace\\\" tabindex=\".++$tabindex.\">\\n\";\n foreach ($list_type as $s){\n echo \"<option value=\\\"$s\\\"\";\n if($s==$trace) echo \" SELECTED\";\n echo \">$s</option>\\n\";\n }\n echo \"</select>\\n\";\n echo \"</td></tr>\\n\";\n\n //TraceFile\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"TraceFile\").\"\\n\";\n echo \"<span>\"._(\"TraceFile\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n echo \"<input type=text name=\\\"tracefile\\\" value=\\\"$tracefile\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n\n //Enable For Res_odbc\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"Enable\").\"\\n\";\n echo \"<span>\"._(\"RES_ODBC Enable (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n $list_type = array('yes', 'no'); \n echo \"&nbsp;&nbsp;<select name=\\\"asenable\\\" tabindex=\".++$tabindex.\">\\n\";\n foreach ($list_type as $s){\n echo \"<option value=\\\"$s\\\"\";\n if($s==$enable) echo \" SELECTED\";\n echo \">$s</option>\\n\";\n }\n echo \"</select>\\n\";\n echo \"</td></tr>\\n\";\n echo \"<tr align = 'right'><td align = 'center' colspan = 2><input type=submit Value='Submit Changes' tabindex=\".++$tabindex.\"></td></tr>\";\n\n\techo\"</table></form>\";\n\t\n\n}", "function editCondoHandler()\t{\t\n global $inputs;\n\n updateDb('condo',[\t\n 'name' => $inputs['name'],\t\n 'area' => $inputs['area'],\t\n 'cost' => $inputs['cost'],\t\n ], [\t\n 'id' => $inputs['id']\t\n ]);\n\n formatOutput(true, 'update success');\t\n}", "public function edit(Server $server)\n {\n //\n }", "function pnAddressBook_admin_modifyconfig() {\r\n\tglobal $bgcolor1,$bgcolor2,$bgcolor3,$bgcolor4;\r\n\r\n $output = new pnHTML();\r\n\t$output->SetInputMode(_PNH_VERBATIMINPUT);\r\n\t$output->Text(pnAddressBook_themetable('start'));\r\n\r\n // Security check\r\n if (!pnSecAuthAction(0, 'pnAddressBook::', '::', ACCESS_ADMIN)) {\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_NOAUTH));\r\n $output->Text(pnAddressBook_themetable('end'));\r\n\t\treturn $output->GetOutput();\r\n }\r\n\r\n $output->Text(pnAddressBook_admin_menu());\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n\t$msg = pnVarCleanFromInput('msg');\r\n\t$output->Title($msg);\r\n\r\n\t// some design ;)\r\n\t$bc1 = $bgcolor1;\r\n\t$bc2 = $bgcolor2;\r\n\tif ($bgcolor1 == $bgcolor2) {\r\n\t\tif ($bgcolor1 == $bgcolor3) {\r\n\t\t\t$bc2 = $bgcolor4;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$bc2 = $bgcolor3;\r\n\t\t}\r\n\t}\r\n\r\n // Start form\r\n $output->FormStart(pnModURL(__PNADDRESSBOOK__, 'admin', 'updateconfig'));\r\n\r\n // Add an authorisation ID\r\n $output->FormHidden('authid', pnSecGenAuthKey());\r\n\r\n\t// get access rights\r\n\tswitch (pnModGetVar(__PNADDRESSBOOK__, 'guestmode')) {\r\n\t\tcase '0':\r\n\t\t\t$guestmode_1 = 0;\r\n\t\t\t$guestmode_2 = 0;\r\n\t\t\t$guestmode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '1':\r\n\t\t\t$guestmode_1 = 0;\r\n\t\t\t$guestmode_2 = 0;\r\n\t\t\t$guestmode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '2':\r\n\t\t\t$guestmode_1 = 0;\r\n\t\t\t$guestmode_2 = 1;\r\n\t\t\t$guestmode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '3':\r\n\t\t\t$guestmode_1 = 0;\r\n\t\t\t$guestmode_2 = 1;\r\n\t\t\t$guestmode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '4':\r\n\t\t\t$guestmode_1 = 1;\r\n\t\t\t$guestmode_2 = 0;\r\n\t\t\t$guestmode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '5':\r\n\t\t\t$guestmode_1 = 1;\r\n\t\t\t$guestmode_2 = 0;\r\n\t\t\t$guestmode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '6':\r\n\t\t\t$guestmode_1 = 1;\r\n\t\t\t$guestmode_2 = 1;\r\n\t\t\t$guestmode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '7':\r\n\t\t\t$guestmode_1 = 1;\r\n\t\t\t$guestmode_2 = 1;\r\n\t\t\t$guestmode_3 = 1;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tswitch (pnModGetVar(__PNADDRESSBOOK__, 'usermode')) {\r\n\t\tcase '0':\r\n\t\t\t$usermode_1 = 0;\r\n\t\t\t$usermode_2 = 0;\r\n\t\t\t$usermode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '1':\r\n\t\t\t$usermode_1 = 0;\r\n\t\t\t$usermode_2 = 0;\r\n\t\t\t$usermode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '2':\r\n\t\t\t$usermode_1 = 0;\r\n\t\t\t$usermode_2 = 1;\r\n\t\t\t$usermode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '3':\r\n\t\t\t$usermode_1 = 0;\r\n\t\t\t$usermode_2 = 1;\r\n\t\t\t$usermode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '4':\r\n\t\t\t$usermode_1 = 1;\r\n\t\t\t$usermode_2 = 0;\r\n\t\t\t$usermode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '5':\r\n\t\t\t$usermode_1 = 1;\r\n\t\t\t$usermode_2 = 0;\r\n\t\t\t$usermode_3 = 1;\r\n\t\t\tbreak;\r\n\t\tcase '6':\r\n\t\t\t$usermode_1 = 1;\r\n\t\t\t$usermode_2 = 1;\r\n\t\t\t$usermode_3 = 0;\r\n\t\t\tbreak;\r\n\t\tcase '7':\r\n\t\t\t$usermode_1 = 1;\r\n\t\t\t$usermode_2 = 1;\r\n\t\t\t$usermode_3 = 1;\r\n\t\t\tbreak;\r\n\t}\r\n\r\n // Start the table that holds the information to be modified.\r\n $output->Text(pnAddressBook_themetable('start'));\r\n\t$output->Linebreak(1);\r\n\t$output->Text('<table align=\"center\" cellpadding=\"5\" cellspacing=\"1\" bgcolor=\"'.$bc2.'\">');\r\n\r\n\t// note\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td colspan=\"4\" align=\"center\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_GRANTNOTE));\r\n\t$output->Linebreak(2);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// headline\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text('<b>'.pnVarPrepHTMLDisplay(_pnAB_GRANTLEVEL).'</b>');\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text(pnVarPrepHTMLDisplay(_pnAB_VIEW));\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text(pnVarPrepHTMLDisplay(_pnAB_CREATE));\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Text(pnVarPrepHTMLDisplay(_pnAB_EDITDELETE));\r\n $output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Access rights for unregistered users\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_GUESTMODE));\r\n\t$output->TableColEnd();\r\n $output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('guestmode_1', $guestmode_1);\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('guestmode_2', $guestmode_2);\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('guestmode_3', $guestmode_3);\r\n $output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Access rights for registered users\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_USERMODE));\r\n\t$output->TableColEnd();\r\n $output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('usermode_1', $usermode_1);\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('usermode_2', $usermode_2);\r\n\t$output->TableColEnd();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('usermode_3', $usermode_3);\r\n $output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// empty row\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td colspan=\"4\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Linebreak(1);\r\n $output->Text('<b>'.pnVarPrepHTMLDisplay(_pnAB_OTHERSTUFF).'</b>');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Title of Address Book\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_TITLE));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('abtitle', pnModGetVar(__PNADDRESSBOOK__, 'abtitle'), 30, 60);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t//Default sortorder 1\r\n\t$sortCols = explode(',',pnModGetVar(__PNADDRESSBOOK__, 'sortorder_1'));\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_SORTORDER_1));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$sortdata_1[] = array('id'=>'adr_sortname', 'name'=>_pnAB_NAME);\r\n\t$sortdata_1[] = array('id'=>'adr_title', 'name'=>_pnAB_TITLE);\r\n\t$sortdata_1[] = array('id'=>'adr_sortcompany', 'name'=>_pnAB_COMPANY);\r\n\t$sortdata_1[] = array('id'=>'adr_zip', 'name'=>_pnAB_ZIP);\r\n\t$sortdata_1[] = array('id'=>'adr_city', 'name'=>_pnAB_CITY);\r\n\t$sortdata_1[] = array('id'=>'adr_state', 'name'=>_pnAB_STATE);\r\n\t$sortdata_1[] = array('id'=>'adr_country', 'name'=>_pnAB_COUNTRY);\r\n\t$custom_tab = pnModGetVar(__PNADDRESSBOOK__,'custom_tab');\r\n\tif ((!empty($custom_tab)) && ($custom_tab != '')) {\r\n\t\t$cus_fields = pnModAPIFunc(__PNADDRESSBOOK__,'admin','customFieldInformation',array('id'=>$id));\r\n\t\tforeach($cus_fields as $cus) {\r\n\t\t\t$the_name = 'adr_custom_'.$cus['nr'];\r\n\t\t\t$sortdata_1[] = array('id'=>$the_name, 'name'=>pnVarPrepHTMLDisplay($cus['name']));\r\n\t\t}\r\n\t}\r\n\t$output->FormSelectMultiple('sortdata_1',$sortdata_1, 0, 1,$sortCols[0], '');\r\n\t$output->Text(' | ');\r\n\t$sortdata_2[] = array('id'=>'adr_sortname', 'name'=>_pnAB_NAME);\r\n\t$sortdata_2[] = array('id'=>'adr_title', 'name'=>_pnAB_TITLE);\r\n\t$sortdata_2[] = array('id'=>'adr_sortcompany', 'name'=>_pnAB_COMPANY);\r\n\t$sortdata_2[] = array('id'=>'adr_zip', 'name'=>_pnAB_ZIP);\r\n\t$sortdata_2[] = array('id'=>'adr_city', 'name'=>_pnAB_CITY);\r\n\t$sortdata_2[] = array('id'=>'adr_state', 'name'=>_pnAB_STATE);\r\n\t$sortdata_2[] = array('id'=>'adr_country', 'name'=>_pnAB_COUNTRY);\r\n\tif ((!empty($custom_tab)) && ($custom_tab != '')) {\r\n\t\t$cus_fields2 = pnModAPIFunc(__PNADDRESSBOOK__,'admin','customFieldInformation',array('id'=>$id));\r\n\t\tforeach($cus_fields2 as $cus) {\r\n\t\t\t$the_name = 'adr_custom_'.$cus['nr'];\r\n\t\t\t$sortdata_2[] = array('id'=>$the_name, 'name'=>pnVarPrepHTMLDisplay($cus['name']));\r\n\t\t}\r\n\t}\r\n\t$output->FormSelectMultiple('sortdata_2',$sortdata_2, 0, 1,$sortCols[1], '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t//Default sortorder 2\r\n\t$sortCols = explode(',',pnModGetVar(__PNADDRESSBOOK__, 'sortorder_2'));\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_SORTORDER_2));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$sortdata_3[] = array('id'=>'adr_sortname', 'name'=>_pnAB_NAME);\r\n\t$sortdata_3[] = array('id'=>'adr_title', 'name'=>_pnAB_TITLE);\r\n\t$sortdata_3[] = array('id'=>'adr_sortcompany', 'name'=>_pnAB_COMPANY);\r\n\t$sortdata_3[] = array('id'=>'adr_zip', 'name'=>_pnAB_ZIP);\r\n\t$sortdata_3[] = array('id'=>'adr_city', 'name'=>_pnAB_CITY);\r\n\t$sortdata_3[] = array('id'=>'adr_state', 'name'=>_pnAB_STATE);\r\n\t$sortdata_3[] = array('id'=>'adr_country', 'name'=>_pnAB_COUNTRY);\r\n\tif ((!empty($custom_tab)) && ($custom_tab != '')) {\r\n\t\t$cus_fields3 = pnModAPIFunc(__PNADDRESSBOOK__,'admin','customFieldInformation',array('id'=>$id));\r\n\t\tforeach($cus_fields3 as $cus) {\r\n\t\t\t$the_name = 'adr_custom_'.$cus['nr'];\r\n\t\t\t$sortdata_3[] = array('id'=>$the_name, 'name'=>pnVarPrepHTMLDisplay($cus['name']));\r\n\t\t}\r\n\t}\r\n\t$output->FormSelectMultiple('sortdata_3',$sortdata_3, 0, 1,$sortCols[0], '');\r\n\t$output->Text(' | ');\r\n\t$sortdata_4[] = array('id'=>'adr_sortname', 'name'=>_pnAB_NAME);\r\n\t$sortdata_4[] = array('id'=>'adr_title', 'name'=>_pnAB_TITLE);\r\n\t$sortdata_4[] = array('id'=>'adr_sortcompany', 'name'=>_pnAB_COMPANY);\r\n\t$sortdata_4[] = array('id'=>'adr_zip', 'name'=>_pnAB_ZIP);\r\n\t$sortdata_4[] = array('id'=>'adr_city', 'name'=>_pnAB_CITY);\r\n\t$sortdata_4[] = array('id'=>'adr_state', 'name'=>_pnAB_STATE);\r\n\t$sortdata_4[] = array('id'=>'adr_country', 'name'=>_pnAB_COUNTRY);\r\n\tif ((!empty($custom_tab)) && ($custom_tab != '')) {\r\n\t\t$cus_fields4 = pnModAPIFunc(__PNADDRESSBOOK__,'admin','customFieldInformation',array('id'=>$id));\r\n\t\tforeach($cus_fields4 as $cus) {\r\n\t\t\t$the_name = 'adr_custom_'.$cus['nr'];\r\n\t\t\t$sortdata_4[] = array('id'=>$the_name, 'name'=>pnVarPrepHTMLDisplay($cus['name']));\r\n\t\t}\r\n\t}\r\n\t$output->FormSelectMultiple('sortdata_4',$sortdata_4, 0, 1,$sortCols[1], '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Name display / sortorder\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_NAME_ORDER));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$temp1 = pnVarPrepHTMLDisplay(_pnAB_LASTNAME).', '.pnVarPrepHTMLDisplay(_pnAB_FIRSTNAME);\r\n\t$temp2 = pnVarPrepHTMLDisplay(_pnAB_FIRSTNAME).' '.pnVarPrepHTMLDisplay(_pnAB_LASTNAME);\r\n\t$name_order_data[] = array('id'=>0, 'name'=>$temp1);\r\n\t$name_order_data[] = array('id'=>1, 'name'=>$temp2);\r\n\t$output->FormSelectMultiple('name_order',$name_order_data, 0, 1,pnModGetVar(__PNADDRESSBOOK__, 'name_order'), '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Special character replacement in sort columns\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_SPECIAL_CHARS));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('special_chars_1', pnModGetVar(__PNADDRESSBOOK__, 'special_chars_1'), 12, 24);\r\n\t$output->Text(' => ');\r\n\t$output->FormText('special_chars_2', pnModGetVar(__PNADDRESSBOOK__, 'special_chars_2'), 12, 24);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Allow global entries\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_GLOBALPROTECT));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('globalprotect', pnModGetVar(__PNADDRESSBOOK__, 'globalprotect'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Use prefixes\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_SHOWPREFIX));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('use_prefix', pnModGetVar(__PNADDRESSBOOK__, 'use_prefix'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Use images\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_SHOWIMG));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('use_img', pnModGetVar(__PNADDRESSBOOK__, 'use_img'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Disable the menu\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_MENU_OFF));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$menu_off_data[] = array('id'=>0, 'name'=>pnVarPrepHTMLDisplay(_pnAB_HIDENOTHING));\r\n\t$menu_off_data[] = array('id'=>1, 'name'=>pnVarPrepHTMLDisplay(_pnAB_HIDEALL));\r\n\t$menu_off_data[] = array('id'=>2, 'name'=>pnVarPrepHTMLDisplay(_pnAB_HIDEGUESTS));\r\n\t$output->FormSelectMultiple('menu_off',$menu_off_data, 0, 1,pnModGetVar(__PNADDRESSBOOK__, 'menu_off'), '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Disable second main menu line\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_MENU_SEMI));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('menu_semi', pnModGetVar(__PNADDRESSBOOK__, 'menu_semi'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Show zip before city\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_ZIPBEFORECITY));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('zipbeforecity', pnModGetVar(__PNADDRESSBOOK__, 'zipbeforecity'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Number of items to display per page\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_ITEMSPERPAGE));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('itemsperpage', pnModGetVar(__PNADDRESSBOOK__, 'itemsperpage'), 4, 4);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Hide Copyright\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_HIDECOPYRIGHT));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormCheckbox('hidecopyright', pnModGetVar(__PNADDRESSBOOK__, 'hidecopyright'));\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// empty row\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td colspan=\"4\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->Linebreak(1);\r\n $output->Text('<b>'.pnVarPrepHTMLDisplay(_pnAB_CUSTOMLABEL).'</b>');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Custom Tab\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_CUSTOM_TAB));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('custom_tab', pnModGetVar(__PNADDRESSBOOK__, 'custom_tab'), 30, 60);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Custom textareawidth\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_CUSTOM_TEXTAREAWIDTH));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$output->FormText('textareawidth', pnModGetVar(__PNADDRESSBOOK__, 'textareawidth'), 4, 4);\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Custom dateformat\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_CUSTOM_DATEFORMAT));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$formdata1[] = array('id'=>0, 'name'=>pnVarPrepForDisplay(_pnAB_DATEFORMAT_1));\r\n\t$formdata1[] = array('id'=>1, 'name'=>pnVarPrepForDisplay(_pnAB_DATEFORMAT_2));\r\n\t$output->FormSelectMultiple('dateformat',$formdata1, 0, 1,pnModGetVar(__PNADDRESSBOOK__, 'dateformat'), '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t// Custom numeric format\r\n\t$output->TableRowStart();\r\n\t$output->Text('<td align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n $output->Text(pnVarPrepHTMLDisplay(_pnAB_CUSTOM_NUMFORMAT));\r\n\t$output->TableColEnd();\r\n $output->Text('<td colspan=\"3\" align=\"left\" valign=\"middle\" bgcolor=\"'.$bc1.'\">');\r\n\t$formdata2[] = array('id'=>'9,999.99', 'name'=>'9,999.99');\r\n\t$formdata2[] = array('id'=>'9.999,99', 'name'=>'9.999,99');\r\n\t$output->FormSelectMultiple('numformat',$formdata2, 0, 1,pnModGetVar(__PNADDRESSBOOK__, 'numformat'), '');\r\n\t$output->TableColEnd();\r\n\t$output->TableRowEnd();\r\n\r\n\t$output->Text('</table>');\r\n\t$output->Linebreak(1);\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n\r\n\t// End form\r\n\t$output->Linebreak(1);\r\n\t$output->Text(pnAddressBook_themetable('start'));\r\n\t$output->Text('<div align=\"center\"><br>');\r\n $output->FormSubmit(pnVarPrepHTMLDisplay(_pnAB_PNADDRESSBOOKUPDATE));\r\n\t$output->Text('<br><br></div>');\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n $output->FormEnd();\r\n\r\n\t// Return the output that has been generated by this function\r\n $output->SetInputMode(_PNH_PARSEINPUT);\r\n\treturn $output->GetOutput();\r\n}", "function pnAddressBook_admin_updateconfig() {\r\n\r\n $output = new pnHTML();\r\n\t$output->SetInputMode(_PNH_VERBATIMINPUT);\r\n\t$output->Text(pnAddressBook_themetable('start'));\r\n\r\n // Security check\r\n if (!pnSecAuthAction(0, 'pnAddressBook::', '::', ACCESS_ADMIN)) {\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_NOAUTH));\r\n $output->Text(pnAddressBook_themetable('end'));\r\n\t\treturn $output->GetOutput();\r\n }\r\n\r\n $output->Text(pnAddressBook_admin_menu());\r\n\t$output->Text(pnAddressBook_themetable('end'));\r\n\t$output->Linebreak(1);\r\n\r\n // Confirm authorisation code.\r\n if (!pnSecConfirmAuthKey()) {\r\n pnSessionSetVar('errormsg', _BADAUTHKEY);\r\n return false;\r\n }\r\n\r\n // Get parameters from whatever input we need.\r\n $guestmode_1 = pnVarCleanFromInput('guestmode_1');\r\n\t$guestmode_2 = pnVarCleanFromInput('guestmode_2');\r\n\t$guestmode_3 = pnVarCleanFromInput('guestmode_3');\r\n\t$usermode_1 = pnVarCleanFromInput('usermode_1');\r\n\t$usermode_2 = pnVarCleanFromInput('usermode_2');\r\n\t$usermode_3 = pnVarCleanFromInput('usermode_3');\r\n\t$globalprotect = pnVarCleanFromInput('globalprotect');\r\n\t$menu_off = pnVarCleanFromInput('menu_off');\r\n\t$zipbeforecity = pnVarCleanFromInput('zipbeforecity');\r\n\t$abtitle = pnVarCleanFromInput('abtitle');\r\n\t$custom_tab = pnVarCleanFromInput('custom_tab');\r\n\t$itemsperpage = pnVarCleanFromInput('itemsperpage');\r\n\t$hidecopyright = pnVarCleanFromInput('hidecopyright');\r\n\t$use_prefix = pnVarCleanFromInput('use_prefix');\r\n\t$use_img = pnVarCleanFromInput('use_img');\r\n\t$textareawidth = pnVarCleanFromInput('textareawidth');\r\n\t$dateformat = pnVarCleanFromInput('dateformat');\r\n\t$numformat = pnVarCleanFromInput('numformat');\r\n\t$sortdata_1 = pnVarCleanFromInput('sortdata_1');\r\n\t$sortdata_2 = pnVarCleanFromInput('sortdata_2');\r\n\t$sortdata_3 = pnVarCleanFromInput('sortdata_3');\r\n\t$sortdata_4 = pnVarCleanFromInput('sortdata_4');\r\n\t$menu_semi = pnVarCleanFromInput('menu_semi');\r\n\t$name_order = pnVarCleanFromInput('name_order');\r\n\t$special_chars_1 = pnVarCleanFromInput('special_chars_1');\r\n\t$special_chars_2 = pnVarCleanFromInput('special_chars_2');\r\n\r\n // Update module variables.\r\n if (!isset($abtitle)) {\r\n $abtitle = '';\r\n }\r\n\tif (!isset($globalprotect)) {\r\n $globalprotect = 0;\r\n }\r\n\tif (!isset($hidecopyright)) {\r\n $hidecopyright = 0;\r\n }\r\n\tif (!isset($use_prefix)) {\r\n $use_prefix = 0;\r\n }\r\n\tif (!isset($use_img)) {\r\n $use_img = 0;\r\n }\r\n\tif (!isset($menu_off)) {\r\n $menu_off = 0;\r\n }\r\n\tif (!isset($menu_semi)) {\r\n $menu_semi = 0;\r\n }\r\n\tif (!isset($name_order)) {\r\n $name_order = 0;\r\n }\r\n\tif (!isset($zipbeforecity)) {\r\n $zipbeforecity = 0;\r\n }\r\n\tif (!isset($itemsperpage)) {\r\n $itemsperpage = 30;\r\n }\r\n\tif (!isset($custom_tab)) {\r\n $custom_tab = '';\r\n }\r\n\tif (!isset($special_chars_1)) {\r\n $special_chars_1 = '';\r\n }\r\n\tif (!isset($special_chars_2)) {\r\n $special_chars_2 = '';\r\n }\r\n\tif (!isset($textareawidth)) {\r\n $textareawidth = 60;\r\n }\r\n\tif (!isset($dateformat)) {\r\n $dateformat = 0;\r\n }\r\n\tif (!isset($numformat)) {\r\n $numformat = '9,999.99';\r\n }\r\n\t$guestmode = 0;\r\n\tif (isset($guestmode_1)) {\r\n\t\t$guestmode += 4;\r\n\t}\r\n\tif (isset($guestmode_2)) {\r\n\t\t$guestmode += 2;\r\n\t}\r\n\tif (isset($guestmode_3)) {\r\n\t\t$guestmode += 1;\r\n\t}\r\n\r\n\t$usermode = 0;\r\n\tif (isset($usermode_1)) {\r\n\t\t$usermode += 4;\r\n\t}\r\n\tif (isset($usermode_2)) {\r\n\t\t$usermode += 2;\r\n\t}\r\n\tif (isset($usermode_3)) {\r\n\t\t$usermode += 1;\r\n\t}\r\n\tif ($globalprotect == 1) {\r\n\t\tif (($guestmode != 0) || ($usermode != 7)) {\r\n\t\t\t$guestmode = 0;\r\n\t\t\t$usermode = 7;\r\n\t\t\t$error = pnVarPrepHTMLDisplay(_pnAB_GLOBALPROTECTERROR);\r\n\t\t}\r\n\t}\r\n\tif ($guestmode > $usermode) {\r\n\t\t$usermode = $guestmode;\r\n\t\t$error = pnVarPrepHTMLDisplay(_pnAB_GRANTERROR);\r\n\t}\r\n\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'globalprotect', $globalprotect);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'menu_off', $menu_off);\r\n pnModSetVar(__PNADDRESSBOOK__, 'itemsperpage', $itemsperpage);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'guestmode', $guestmode);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'usermode', $usermode);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'custom_tab', $custom_tab);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'zipbeforecity', $zipbeforecity);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'abtitle', $abtitle);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'hidecopyright', $hidecopyright);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'use_prefix', $use_prefix);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'use_img', $use_img);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'textareawidth', $textareawidth);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'dateformat', $dateformat);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'numformat', $numformat);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'menu_semi', $menu_semi);\r\n\tpnModSetVar(__PNADDRESSBOOK__, 'name_order', $name_order);\r\n\r\n\tif ($sortdata_1 == $sortdata_2) {\r\n\t\tif ($error) {\r\n\t\t\t$error .= '<br>'.pnVarPrepHTMLDisplay(_pnAB_SORTERROR_1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$error = pnVarPrepHTMLDisplay(_pnAB_SORTERROR_1);\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\t$s_1 = $sortdata_1.','.$sortdata_2;\r\n\t\tpnModSetVar(__PNADDRESSBOOK__, 'sortorder_1', $s_1);\r\n\t}\r\n\tif ($sortdata_3 == $sortdata_4) {\r\n\t\tif ($error) {\r\n\t\t\t$error .= '<br>'.pnVarPrepHTMLDisplay(_pnAB_SORTERROR_2);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$error = pnVarPrepHTMLDisplay(_pnAB_SORTERROR_2);\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\t$s_2 = $sortdata_3.','.$sortdata_4;\r\n\t\tpnModSetVar(__PNADDRESSBOOK__, 'sortorder_2', $s_2);\r\n\t}\r\n\r\n\tif (strlen($special_chars_1) != strlen($special_chars_2)) {\r\n\t\t$error .= '<br>'.pnVarPrepHTMLDisplay(_pnAB_SPECIAL_CHARS_ERROR);\r\n\t}\r\n\telse {\r\n\t\tpnModSetVar(__PNADDRESSBOOK__, 'special_chars_1', $special_chars_1);\r\n\t\tpnModSetVar(__PNADDRESSBOOK__, 'special_chars_2', $special_chars_2);\r\n\t}\r\n\t$msg = pnVarPrepHTMLDisplay(_pnAB_CONF_pnAB_SUCCESS);\r\n\tif (isset($error)) { $msg .= ' - '.$error; }\r\n\r\n\t$args=array('msg'=>$msg);\r\n\r\n // This function generated no output, and so now it is complete we redirect\r\n // the user to an appropriate page for them to carry on their work\r\n pnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'main',$args));\r\n\r\n // Return\r\n return true;\r\n}", "private function getUpdateform(){\n\t \n $servers=count($GLOBALS[\"TYPO3_CONF_VARS\"][\"SYS\"][\"nodes\"]);\n $nodesselect=\"<select multiple size='$servers' name='server_selected[]'>\";\n \n foreach($GLOBALS[\"TYPO3_CONF_VARS\"][\"SYS\"][\"nodes\"] as $node){\n if(gethostbyname($node['host']) != $_SERVER[\"SERVER_ADDR\"]){\n $nodesselect.=\"<option value='{$node[\"host\"]}' selected>{$node[\"host\"]}</option>\";\n }\n }\n \n $nodesselect.=\"</select>\";\n \n \n \n $content=\"\n \n <div style='width:100%;'>\n <table width='100%' cellspacing='10'>\n <tr>\n <td align='right'>\n <input type='radio' name='updfile' value='localconf' checked/>\n </td>\n <td align='left'>\n Update only localconf.php\n </td>\n </tr>\n <tr>\n <td align='right'>\n <input type='radio' name='updfile' value='typo3conf'/>\n </td>\n <td align='left'>\n Update typo3conf dir\n </td>\n </tr>\n <tr>\n <td align='right'>\n <input type='radio' name='updfile' value='fileadmin'/>\n </td>\n <td align='left'>\n Update fileadmin dir\n </td>\n </tr>\n <tr>\n <td align='right' width='50%'>\n Choose server/s:\n </td>\n <td align='left' width='50%'>\n $nodesselect\n </td>\n </tr>\n <tr>\n <td colspan='2' align='center'>\n <input type='submit' name='mode' value='Update'/>\n </td>\n </tr>\n </table>\n </div>\n \n \";\n \n \n return $content;\n }", "function thumbwhere_host_edit_form_validate(&$form, &$form_state) {\n \n //if (twCanDebug()) debug($form); \n //if (twCanDebug()) debug($form_state);\n\n\n // No validation for pk\n\n\n // Convert fk autocomplete for fk_hosttype\n $value = $form['fk_hosttype']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_hosttype'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_hosttype']);\n if (twCanDebug()) debug('fk_hosttype = ' . $value);\n // Validate fk fk_hosttype\n if (empty($value)) {\n form_set_error('fk_hosttype', t('Validation error, \\'fk_hosttype\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_hosttype\\' in is mandatory');\n }\n\n // Convert fk autocomplete for fk_hostcredential\n $value = $form['fk_hostcredential']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_hostcredential'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_hostcredential']);\n if (twCanDebug()) debug('fk_hostcredential = ' . $value);\n // Validate fk fk_hostcredential\n if (empty($value)) {\n form_set_error('fk_hostcredential', t('Validation error, \\'fk_hostcredential\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_hostcredential\\' in is mandatory');\n }\n\n // Validate normaladdress\n $value = $form['address']['#value'];\n // If we have no default value then we don't care much for checking for emptyness.\n if (empty($value)) {\n form_set_error('address', t('Validation error, \\'address\\' is mandatory2.'));\n //throw new Exception('Field \\'address\\' in is mandatory.');\n }\n\n // Validate normalonline\n $value = $form['online']['#value'];\n // If we have no default value then we don't care much for checking for emptyness.\n\n\n \n\n //form_set_value( array('#parents' => array('array_key_parent', 'array_key_to_replace')) , $value, $form_state);\n\n \n \n $thumbwhere_host = $form_state['thumbwhere_host'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('thumbwhere_host', $thumbwhere_host, $form, $form_state);\n \n \n \n}", "function thumbwhere_host_edit_form($form, &$form_state, $thumbwhere_host) {\n\n // Add the default field elements.\n $form['fk_hosttype'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereHost fk_hosttype'),\n '#default_value' => isset($thumbwhere_host->fk_hosttype) ? $thumbwhere_host->fk_hosttype : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_hosttype',\n );\n // Add the default field elements.\n $form['fk_hostcredential'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereHost fk_hostcredential'),\n '#default_value' => isset($thumbwhere_host->fk_hostcredential) ? $thumbwhere_host->fk_hostcredential : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_hostcredential',\n );\n // Add the default field elements.\n $form['address'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereHost address'),\n '#default_value' => isset($thumbwhere_host->address) ? $thumbwhere_host->address : '',\n // '#maxlength' => 255,\n // '#required' => TRUE,\n '#weight' => -5,\n );\n // Add the default field elements.\n $form['online'] = array(\n '#type' => 'checkbox',\n '#title' => t('ThumbWhereHost online'),\n '#default_value' => isset($thumbwhere_host->online) ? $thumbwhere_host->online : 0,\n // '#maxlength' => 255,\n // '#required' => TRUE,\n '#weight' => -5,\n );\n\n\n\n $form['data']['#tree'] = TRUE;\n\n /*\n $form['data']['sample_data'] = array(\n '#type' => 'checkbox',\n '#title' => t('An interesting thumbwhere_host switch'),\n '#default_value' => isset($thumbwhere_host->data['sample_data']) ? $thumbwhere_host->data['sample_data'] : 1,\n );\n */\n\n\n // Add the field related form elements.\n $form_state['thumbwhere_host'] = $thumbwhere_host;\n field_attach_form('thumbwhere_host', $thumbwhere_host, $form, $form_state);\n\n $form['actions'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('form-actions')),\n '#weight' => 400,\n );\n\n // We add the form's #submit array to this button along with the actual submit\n // handler to preserve any submit handlers added by a form callback_wrapper.\n $submit = array();\n\n if (!empty($form['#submit'])) {\n $submit += $form['#submit'];\n }\n\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save thumbwhere_host'),\n '#submit' => $submit + array('thumbwhere_host_edit_form_submit'),\n );\n\n // Do we show the delete button?\n if (!empty($thumbwhere_host->pk_host)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete thumbwhere_host'),\n '#suffix' => l(t('Cancel'), 'admin/thumbwhere/thumbwhere_hosts'),\n '#submit' => $submit + array('thumbwhere_host_form_submit_delete'),\n '#weight' => 45,\n );\n }\n\n // We append the validate handler to #validate in case a form callback_wrapper\n // is used to add validate handlers earlier.\n $form['#validate'][] = 'thumbwhere_host_edit_form_validate';\n return $form;\n}", "public function add(){\n\t\t$this->check_role_access(1);\n\t\t// set the page title\t\t\n\t\t$this->set('title_for_layout', 'Create Client - Clients - Manage Hiring');\t\n\t\t$this->load_static_data();\n\t\t$this->set('statusList', array('0' => 'Active', '1' => 'Inactive'));\n\t\t$this->set('titleList', array('1' => 'Mr.', '2' => 'Ms.'));\n\t\tif ($this->request->is('post')){\n\t\t\t// validates the form\n\t\t\t$this->request->data['Client']['created_by'] = $this->Session->read('USER.Login.id');\n\t\t $this->request->data['Client']['created_date'] = $this->Functions->get_current_date();\n\t\t\t$this->request->data['Client']['update_date'] = $this->Functions->get_current_date();\n\t\t\t$this->request->data['Client']['status'] = 2;\n\t\t\t$this->request->data['Client']['is_inactive'] = 'N';\n\t\t\t$this->Client->set($this->request->data);\n\t\t\t// retain the district\n\t\t\t$this->get_district_list($this->request->data['Client']['state']);\n\t\t\t// validate the client contacts\n\t\t\t$contact_validate = $this->validate_contact();\n\t\t\t// validate the form fields\n\t\t\tif ($this->Client->validates(array('fieldList' => array('client_name','city','pincode','state','res_location_id',\n\t\t\t'account_holder'))) && $contact_validate){\t\t\t\t\t\n\t\t\t\t// save the data\n\t\t\t\tif($this->Client->save($this->request->data['Client'], array('validate' => false))){\n\t\t\t\t\t// save client contact list\n\t\t\t\t\t$this->save_client_contact_list($this->Client->id);\n\t\t\t\t\t// save account holder list\n\t\t\t\t\t$this->save_account_holder($this->Client->id);\n\t\t\t\t\t// update req approval status table\n\t\t\t\t\t$this->save_client_approval($this->Client->id);\n\t\t\t\t\t// send mail to approver\n\t\t\t\t\t$sub = 'Manage Hiring - Client created by '.ucfirst($this->Session->read('USER.Login.first_name')).' '.ucfirst($this->Session->read('USER.Login.last_name'));\n\t\t\t\t\t$from = ucfirst($this->Session->read('USER.Login.first_name')).' '.ucfirst($this->Session->read('USER.Login.last_name'));\n\t\t\t\t\t// get the superiors\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t$this->loadModel('Approve');\n\t\t\t\t\t$approval_data = $this->Approve->find('first', array('fields' => array('level1'), 'conditions'=> array('Approve.users_id' => $this->Session->read('USER.Login.id'))));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// get leader email address\n\t\t\t\t\t$leader_data = $this->Client->Creator->find('all', array('conditions' => array('Creator.id' => $approval_data['Approve']['level1']),'fields' => array('Creator.id',\t'Creator.first_name','Creator.last_name','Creator.email_id')));\n\t\t\t\t\t*/\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// get the Business Head\n\t\t\t\t\t$leader_data = $this->Client->Creator->find('all', array('conditions' => array('roles_id' => '39'), 'fields' => array('Creator.id',\t'Creator.first_name','Creator.last_name', 'Creator.email_id')));\n\t\t\t\t\t\n\t\t\t\t\t// get account holder name\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t$sub = 'Manage Hiring - Client created by '.ucfirst($this->Session->read('USER.Login.first_name')).' '.ucfirst($this->Session->read('USER.Login.last_name'));\n\t\t\t\t\t$from = ucfirst($this->Session->read('USER.Login.first_name')).' '.ucfirst($this->Session->read('USER.Login.last_name'));\n\t\t\t\t\t// get the Business Head\n\t\t\t\t\t$leader_data = $this->Client->Creator->find('all', array('conditions' => array('roles_id' => '39'), 'fields' => array('Creator.id',\t'Creator.first_name','Creator.last_name', 'Creator.email_id')));\n\t\t\t\t\t// get account holder name\n\t\t\t\t\t$ac_holder = $this->ClientAccountHolder->find('all', array('fields' => array(\"group_concat(User.first_name separator ', ') account_holder\"), 'order' => array('User.first_name ASC'), 'conditions' => array('ClientAccountHolder.clients_id' => $this->Client->id, \t'User.is_deleted' => 'N'), 'group' => array('User.id')));\n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\t// if leader found\n\t\t\t\t\tif(!empty($leader_data)){\n\t\t\t\t\t\t$this->loadModel('ClientStatus');\n\t\t\t\t\t\t// make sure not duplicate status exists\n\t\t\t\t\t\t$this->check_duplicate_status($this->Client->id, $leader_data[0]['Creator']['id']);\t\t\t\n\t\t\t\t\t\t// save req. status data\n\t\t\t\t\t\t$data = array('clients_id' => $this->Client->id, 'created_date' => $this->Functions->get_current_date(), 'users_id' => $leader_data[0]['Creator']['id']);\n\t\t\t\t\t\t// save the client status\n\t\t\t\t\t\tif($this->ClientStatus->save($data, true, $fieldList = array('clients_id','created_date','users_id'))){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$ac_holder = $this->ClientAccountHolder->find('all', array('fields' => array(\"group_concat(User.first_name separator ', ') account_holder\"), 'order' => array('User.first_name ASC'), 'conditions' => array('ClientAccountHolder.clients_id' => $this->Client->id, 'User.is_deleted' => 'N')));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$vars = array('from_name' => $from, 'to_name' => ucwords($leader_data[0]['Creator']['first_name'].' '.$leader_data[0]['Creator']['last_name']), 'client_name' => $this->request->data['Client']['client_name'], 'city' => $this->request->data['Client']['city'],'account_holder' => $ac_holder[0][0]['account_holder']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// notify superiors\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!$this->send_email($sub, 'add_client', '[email protected]', $leader_data[0]['Creator']['email_id'],$vars)){\t\n\t\t\t\t\t\t\t\t// show the msg.\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Problem in sending the mail for approval...', 'default', array('class' => 'alert alert-error'));\t\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Client Created Successfully. After approval, it will be visible!', 'default', array('class' => 'alert alert-info'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>You have no superior to approve your request', 'default', array('class' => 'alert alert-info'));\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t// show the msg.\n\t\t\t\t\t$this->redirect('/client/');\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t// show the error msg.\n\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Problem in saving the data...', 'default', array('class' => 'alert alert-error'));\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Please check the validation errors...', 'default', array('class' => 'alert alert-error'));\t\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public function initClientDbForm($a_install = true, $dbupdate = null, $db_status = false, $hotfix_available = false, $custom_updates_available = false)\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t// type\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"db_type\"), \"db_type\");\n\t\t$this->form->addItem($ne);\n\n\t\t// version\n\t\tif ($this->setup->getClient()->getDBType() == \"mysql\" ||\n\t\t\t$this->setup->getClient()->getDBType() == \"innodb\")\n\t\t{\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"version\"), \"db_version\");\n\t\t\t$ilDB = $this->setup->getClient()->db;\n\t\t\t$ne->setValue($ilDB->getDBVersion());\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\n\t\t// host\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"host\"), \"db_host\");\n\t\t$this->form->addItem($ne);\n\n\t\t// name\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"name\"), \"db_name\");\n\t\t$this->form->addItem($ne);\n\n\t\t// user\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"user\"), \"db_user\");\n\t\t$this->form->addItem($ne);\n\n\t\t// port\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"port\"), \"db_port\");\n\t\t$this->form->addItem($ne);\n\n\t\t// creation / collation for mysql\n\t\tif (($this->setup->getClient()->getDBType() == \"mysql\" ||\n\t\t\t$this->setup->getClient()->getDBType() == \"innodb\") && $a_install)\n\t\t{\n\t\t\t// create database \n\t\t\t$cb = new ilCheckboxInputGUI($lng->txt(\"database_create\"), \"chk_db_create\");\n\n\t\t\t\t// collation\n\t\t\t\t$collations = array\n\t\t\t\t(\n\t\t\t\t\t\"utf8_unicode_ci\",\n\t\t\t\t\t\"utf8_general_ci\",\n\t\t\t\t\t\"utf8_czech_ci\",\n\t\t\t\t\t\"utf8_danish_ci\",\n\t\t\t\t\t\"utf8_estonian_ci\",\n\t\t\t\t\t\"utf8_icelandic_ci\",\n\t\t\t\t\t\"utf8_latvian_ci\",\n\t\t\t\t\t\"utf8_lithuanian_ci\",\n\t\t\t\t\t\"utf8_persian_ci\",\n\t\t\t\t\t\"utf8_polish_ci\",\n\t\t\t\t\t\"utf8_roman_ci\",\n\t\t\t\t\t\"utf8_romanian_ci\",\n\t\t\t\t\t\"utf8_slovak_ci\",\n\t\t\t\t\t\"utf8_slovenian_ci\",\n\t\t\t\t\t\"utf8_spanish2_ci\",\n\t\t\t\t\t\"utf8_spanish_ci\",\n\t\t\t\t\t\"utf8_swedish_ci\",\n\t\t\t\t\t\"utf8_turkish_ci\"\n\t\t\t\t);\n\t\t\t\tforeach($collations as $collation)\n\t\t\t\t{\n\t\t\t\t\t$options[$collation] = $collation;\n\t\t\t\t}\n\t\t\t\t$si = new ilSelectInputGUI($lng->txt(\"collation\"), \"collation\");\n\t\t\t\t$si->setOptions($options);\n\t\t\t\t$si->setInfo($this->lng->txt(\"info_text_db_collation2\").\" \".\n\t\t\t\t\t\"<a target=\\\"_new\\\" href=\\\"http://dev.mysql.com/doc/mysql/en/charset-unicode-sets.html\\\">\".\n\t\t\t\t\t\" MySQL Reference Manual :: 10.11.1 Unicode Character Sets</a>\");\n\t\t\t\t$cb->addSubItem($si);\n\n\t\t\t$this->form->addItem($cb);\n\t\t}\n\n\t\tif ($a_install)\n\t\t{\n\t\t\t$this->form->addCommandButton(\"installDatabase\", $lng->txt(\"database_install\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ilDB = $this->setup->getClient()->db;\n\t\t\t$this->lng->setDbHandler($ilDB);\n\t\t\t$dbupdate = new ilDBUpdate($ilDB);\n\n\t\t\t// database version\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"database_version\"), \"curv\");\n\t\t\t$ne->setValue($dbupdate->currentVersion);\n\t\t\t$this->form->addItem($ne);\n\n\t\t\t// file version\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"file_version\"), \"filev\");\n\t\t\t$ne->setValue($dbupdate->fileVersion);\n\t\t\t$this->form->addItem($ne);\n\n\t\t\tif (!$db_status = $dbupdate->getDBVersionStatus())\n\t\t\t{\n\t\t\t\t// next update step\n\t\t\t\t$options = array();\n\t\t\t\tfor ($i = $dbupdate->currentVersion + 1; $i <= $dbupdate->fileVersion; $i++)\n\t\t\t\t{\n\t\t\t\t\t$options[$i] = $i;\n\t\t\t\t}\n\t\t\t\tif (count($options) > 1)\n\t\t\t\t{\n\t\t\t\t\t$si = new ilSelectInputGUI($lng->txt(\"next_update_break\"), \"update_break\");\n\t\t\t\t\t$si->setOptions($options);\n\t\t\t\t\t$si->setInfo($lng->txt(\"next_update_break_info\"));\n\t\t\t\t\t$this->form->addItem($si);\n\t\t\t\t}\n\n\t\t\t\tif ($dbupdate->getRunningStatus() > 0)\n\t\t\t\t{\n\t\t\t\t\tilUtil::sendFailure($this->lng->txt(\"db_update_interrupted\").\"<br /><br />\".\n\t\t\t\t\t\t$this->lng->txt(\"db_update_interrupted_avoid\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tilUtil::sendInfo($this->lng->txt(\"database_needs_update\"));\n\t\t\t\t}\n\t\t\t\t$this->form->addCommandButton(\"updateDatabase\", $lng->txt(\"database_update\"));\n\t\t\t\t$this->form->addCommandButton(\"showUpdateSteps\", $lng->txt(\"show_update_steps\"));\n\t\t\t}\n\t\t\telse if ($hotfix_available)\n\t\t\t{\n\t\t\t\t// hotfix current version\n\t\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"applied_hotfixes\"), \"curhf\");\n\t\t\t\t$ne->setValue($dbupdate->getHotfixCurrentVersion());\n\t\t\t\t$this->form->addItem($ne);\n\n\t\t\t\t// hotfix file version\n\t\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"available_hotfixes\"), \"filehf\");\n\t\t\t\t$ne->setValue($dbupdate->getHotfixFileVersion());\n\t\t\t\t$this->form->addItem($ne);\n\n\t\t\t\t$this->form->addCommandButton(\"applyHotfix\", $lng->txt(\"apply_hotfixes\"));\n\t\t\t\t$this->form->addCommandButton(\"showHotfixSteps\", $lng->txt(\"show_update_steps\"));\n\t\t\t\tilUtil::sendInfo($this->lng->txt(\"database_needs_update\"));\n\t\t\t}\n\t\t\telseif($custom_updates_available)\n\t\t\t{\n\t\t\t\t// custom updates current version\n\t\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"applied_custom_updates\"), \"curcu\");\n\t\t\t\t$ne->setValue($dbupdate->getCustomUpdatesCurrentVersion());\n\t\t\t\t$this->form->addItem($ne);\n\n\t\t\t\t// custom updates file version\n\t\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"available_custom_updates\"), \"filecu\");\n\t\t\t\t$ne->setValue($dbupdate->getCustomUpdatesFileVersion());\n\t\t\t\t$this->form->addItem($ne);\n\n\t\t\t\t$this->form->addCommandButton(\"applyCustomUpdates\", $lng->txt(\"apply_custom_updates\"));\n\t\t\t\tilUtil::sendInfo($this->lng->txt(\"database_needs_update\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($dbupdate->getHotfixFileVersion() > 0)\n\t\t\t\t{\n\t\t\t\t\t// hotfix current version\n\t\t\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"applied_hotfixes\"), \"curhf\");\n\t\t\t\t\t$ne->setValue($dbupdate->getHotfixCurrentVersion());\n\t\t\t\t\t$this->form->addItem($ne);\n\n\t\t\t\t\t// hotfix file version\n\t\t\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"available_hotfixes\"), \"filehf\");\n\t\t\t\t\t$ne->setValue($dbupdate->getHotfixFileVersion());\n\t\t\t\t\t$this->form->addItem($ne);\n\t\t\t\t}\n\t\t\t\tif ($dbupdate->getCustomUpdatesFileVersion() > 0)\n\t\t\t\t{\n\t\t\t\t\t// custom updates current version\n\t\t\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"applied_custom_updates\"), \"curcu\");\n\t\t\t\t\t$ne->setValue($dbupdate->getCustomUpdatesCurrentVersion());\n\t\t\t\t\t$this->form->addItem($ne);\n\n\t\t\t\t\t// custom updates file version\n\t\t\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"available_custom_updates\"), \"filecu\");\n\t\t\t\t\t$ne->setValue($dbupdate->getCustomUpdatesFileVersion());\n\t\t\t\t\t$this->form->addItem($ne);\n\t\t\t\t}\n\t\t\t\tilUtil::sendSuccess($this->lng->txt(\"database_is_uptodate\"));\n\t\t\t}\n\t\t}\n\n\t\t$this->form->setTitle($lng->txt(\"database\"));\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "function dlgModify() {\n global $database;\n\n if ((!$this->sql_getEntry($this->section_id,$this->page_id)) && ($database->is_error())) {\n // SQL Fehler\n $this->print_error(); }\n else {\n // sicherstellen, dass nur bei einem Reload die $_REQUEST Daten verwendet werden\n if ((isset($_REQUEST['action'])) && ($_REQUEST['action'] == 'request')) {\t$this->requestToRecord(); }\n $parser = new templateParser();\n $parser->add('h1',dl_backend_header);\n $parser->add('description',dl_backend_description);\n $parser->add('text_header',dl_backend_text_header);\n $parser->add('value_header',$this->record['header']);\n $parser->add('text_prefix',dl_backend_text_prefix);\n $parser->add('value_prefix',$this->record['prefix']);\n $parser->add('text_select',dl_backend_text_select);\n $parser->add('text_suffix',dl_backend_text_suffix);\n $parser->add('value_suffix',$this->record['suffix']);\n\n $parser->add('form_action', WB_URL.'/modules/dirlist/save.php');\n $parser->add('btn_submit',dl_backend_btn_submit);\n $parser->add('btn_abort',dl_backend_btn_abort);\n $parser->add('abort_location',ADMIN_URL. '/pages/index.php');\n $parser->add('page_id',$this->page_id);\n $parser->add('section_id',$this->section_id);\n\t\t\t// Medienverzeichnis auslesen\n $media_dirs = $this->getMediaDirectories();\n if (!empty($this->record['directory']) && (in_array($this->record['directory'],$media_dirs))) {\n $dummy = ''; }\n else {\n $dummy = ' selected=\"selected\"'; }\n $worker = sprintf('<select name=\"directory\"><option value=\"\"%s>%s</option>',$dummy,dl_backend_select_directory);\n while (list($key,$val) = each($media_dirs)) {\n \t$dummy = $key;\n if (!empty($val)) {\n ($val == $this->record['directory']) ? $dummy = ' selected=\"selected\"' : $dummy = '';\n $worker .= sprintf('<option value=\"%s\"%s>%s</option>',$val,$dummy,$val); }}\n $worker .= '</select>';\n $parser->add('directory',$worker);\n\n // Sortierreihenfolge\n $parser->add('text_sort',dl_backend_text_sort);\n $sortArray[1] \t= dl_backend_sortFilesAscending;\n $sortArray[2] \t= dl_backend_sortFilesDescending;\n $sortArray[4] \t= dl_backend_sortSizeAscending;\n\t $sortArray[8] \t= dl_backend_sortSizeDescending;\n $sortArray[16] \t= dl_backend_sortDateAscending;\n $sortArray[32] \t= dl_backend_sortDateDescending;\n\n $worker = '<select name=\"sort\">';\n for ($i=1; $i < 33; $i = $i*2) {\n \t($i == $this->record['sort']) ? $dummy = ' selected=\"selected\"' : $dummy = '';\n \t$worker .= sprintf('<option value=\"%d\"%s>%s</option>',$i,$dummy,$sortArray[$i]); }\n $worker .= '</select>';\n $parser->add('sort',$worker);\n\n $parser->add('text_preselect',dl_backend_text_preselect);\n if ($this->record['exclude'] == 0) {\n $dummy = ' selected=\"selected\"';\n $dummy2 = ''; }\n else {\n $dummy = '';\n $dummy2 = ' selected=\"selected\"'; }\n $worker = sprintf('<option value=\"0\"%s>%s</option>',$dummy,dl_backend_include);\n $worker .= sprintf('<option value=\"1\"%s>%s</option>',$dummy2,dl_backend_exclude);\n $parser->add('exclude_option',$worker);\n $parser->add('value_extensions',$this->record['extensions']);\n\n ($this->record['blank'] == 1) ? $checked = ' checked=\"checked\"' : $checked = '';\n $parser->add('blank_checked',$checked);\n $parser->add('text_blank', dl_backend_blank);\n\n $parser->add('value_header',$this->record['header']);\n $parser->add('value_prefix',$this->record['prefix']);\n $parser->add('value_suffix',$this->record['suffix']);\n\n $parser->parseTemplateFile(WB_PATH.'/modules/dirlist/htt/backend.htt');\n $parser->echoHTML();\n } // else\n\n }", "function index( $id = \"be1\" ) {\n\n\t\tif ( $this->is_POST()) {\n\t\t// if the method is post\n\n\t\t\t// server side validation\n\t\t\tif ( $this->is_valid_input()) {\n\n\t\t\t\t// save user info\n\t\t\t\t$this->save( $id );\n\t\t\t}\n\t\t}\n\n\t\t//Get Backend_config Object\n\t\t$this->data['backend'] = $this->Backend_config->get_one( $id );\n\n\t\t$this->load_template( 'backend_configs/entry_form',$this->data, true );\n\n\t}", "function modifyServer()\n{\n \t$model = $_POST['txtModel'];\n\t$stag = $_POST['txtStag'];\n\t$expresscode = $_POST['txtExpresscode'];\n\t$sname = $_POST['txtSname'];\n\t$spurpose = $_POST['txtSpurpose'];\n $sos = $_POST['txtSos'];\n $purdate = $_POST['txtPurdate'];\n $wend = $_POST['txtWend'];\n $extwarran = $_POST['txtExtwarran'];\n $assettag = $_POST['txtAssettag'];\n\t\n\t\n\t// check if the server tag is taken\n\t\t$sql = \"UPDATE servers \n\t\t\tSET model = '$model', \n\t\t\t\texpresscode = '$expresscode', \n\t\t\t\tsname = '$sname', \n\t\t\t\tspurpose = '$spurpose', \n\t\t\t\tsos = '$sos', \n\t\t\t\tpurdate = '$purdate', \n\t\t\t\twend = '$wend', \n\t\t\t\textwarran = '$extwarran', \n\t\t\t\tassettag = '$assettag', \n\t\t\t\tWHERE stag = '$stag' \";\n\t\n\t\tdbQuery($sql);\n\t\theader('Location: ../menu.php?v=SRVR');\t\n\t\n}", "function generateAdminForm()\n{\n\t// to provide their password in order for any changes to take effect\n\n\t//Admin Panel variables\n $AdminInputs = array(\n 'fName' => \"\",\n 'lName' => \"\",\n 'email' => \"\",\n 'testRigUsername' => \"\",\n 'testRigPassword' => \"\",\n 'phoneNumber' => \"\",\n 'instName' => \"\",\n 'scpPubKey' => \"\",\n 'scpPrivKey' => \"\",\n 'scpDstIp' => \"\",\n 'scpHostPath' => \"\",\n 'scpUsername' => \"\",\n 'rtEmailAddress' => \"\",\n 'scpHostPath' => \"\",\n 'scpPrivKey' => \"\");\n \n $AdminInputErrors = array(\n 'fName' => \"\",\n 'lName' => \"\",\n 'email' => \"\",\n 'testRigUsername' => \"\",\n 'testRigPassword' => \"\",\n 'phoneNumber' => \"\",\n 'instName' => \"\",\n 'scpPubKey' => \"\",\n 'scpPrivKey' => \"\",\n 'scpDstIp' => \"\",\n 'scpHostPath' => \"\",\n 'scpUsername' => \"\",\n 'rtEmailAddress' => \"\",\n 'scpHostPath' => \"\",\n 'scpPrivKey' => \"\",\n 'admin-testRigPassword' => \"\");\n \n $url = htmlspecialchars($_SERVER[\"PHP_SELF\"]);\n $errFlag = 0;\n $errMsg = \"\";\n $type = 0;\n \n $dbh = getDatabaseHandle();\n \n //let's see if the user wants to update their shit\n \n if ($_REQUEST[\"a\"] == \"ud\") { //did they submit something?\n $type = 1;\n // scrub our inputs\n foreach ($_REQUEST as $key => $value) {\n if (preg_match (\"/admin/\", $key)) {\n $_REQUEST[$key] = scrubInput($value);\n }\n }\n \n $stmnt = $dbh->prepare(\"UPDATE customer \n SET inst_name = :iname,\n contact_fname = :fname,\n contact_lname = :lname, \n contact_phone = :phone,\n contact_email = :email, \n inst_data_host = :host,\n inst_host_uname = :uname, \n inst_host_path = :path,\n tt_system = :tt \n WHERE cid = :CID\");\n $stmnt->bindParam(':iname', $_REQUEST['admin-instName'], PDO::PARAM_STR); \n $stmnt->bindParam(':fname', $_REQUEST['admin-fName'], PDO::PARAM_STR); \n $stmnt->bindParam(':lname', $_REQUEST['admin-lName'], PDO::PARAM_STR); \n $stmnt->bindParam(':phone', $_REQUEST['admin-phoneNumber'], PDO::PARAM_STR); \n $stmnt->bindParam(':email', $_REQUEST['admin-email'], PDO::PARAM_STR); \n $stmnt->bindParam(':host', $_REQUEST['admin-scpDstIp'], PDO::PARAM_STR); \n $stmnt->bindParam(':uname', $_REQUEST['admin-scpUsername'], PDO::PARAM_STR); \n $stmnt->bindParam(':path', $_REQUEST['admin-scpHostPath'], PDO::PARAM_STR); \n $stmnt->bindParam(':tt', $_REQUEST['admin-rtEmailAddress'], PDO::PARAM_STR); \n $stmnt->bindParam(':CID', $_SESSION['CID'], PDO::PARAM_STR);\n $stmnt->execute();\n }\n // Do they want to change their password?\n if ($_REQUEST[\"a\"] == \"np\") { //did they submit something?\n $type = 2;\n if (confirmPass($_REQUEST[\"cpass\"])) {\n if ($_REQUEST[\"npass1\"] == $_REQUEST[\"npass2\"]) {\n $hash = password_hash($_REQUEST[\"npass1\"], PASSWORD_BCRYPT);\n $stmnt = $dbh->prepare(\"UPDATE customer\n SET tr_password = :hash\n WHERE cid = :CID\");\n $stmnt->bindParam(':hash', $hash, PDO::PARAM_STR); \n $stmnt->bindParam(':CID', $_SESSION[\"CID\"], PDO::PARAM_STR);\n $stmnt->execute();\n } else {\n //passwords do not match\n $errFlag = 1;\n $errMsg = \"Your new passwords do not match. Please try again.\";\n }\n } else {\n // bad current password\n $errFlag = 1;\n $errMsg = \"The password supplied does not match our records\";\n }\n }\n \n // Do they want a new SCP key?\n if ($_REQUEST[\"a\"] == \"nk\") { //did they submit something?\n $type = 3;\n if (confirmPass($_REQUEST[\"cpass\"])) {\n // get the users email address so we can mail them the new public key\n $stmnt = $dbh->prepare(\"SELECT contact_email \n FROM customer \n WHERE cid = :CID\");\n $stmnt->bindParam(':CID', $_SESSION[\"CID\"], PDO::PARAM_STR);\n $stmnt->execute();\n $queryResult = $stmnt->fetch(PDO::FETCH_ASSOC); //returns FALSE if empty result\n if (!$queryResult) {\n print \"NO RESPONSE!\";\n // insert error here because we didn't get a result;\n }\n // generate the keys\n list ($scpPrivKey, $scpPubKey) = generateSSHKeys();\n\n // insert the new keys\n $stmnt = $dbh->prepare(\"UPDATE customer\n SET inst_pub_key = :pub,\n inst_priv_key = :priv\n WHERE cid = :CID\");\n $stmnt->bindParam(':pub', $scpPubKey, PDO::PARAM_STR);\n $stmnt->bindParam(':priv', $scpPrivKey, PDO::PARAM_STR);\n $stmnt->bindParam(':CID', $_SESSION[\"CID\"], PDO::PARAM_STR);\n $stmnt->execute();\n // email the new public key\n emailPubKey($scpPubKey, $queryResult[\"contact_email\"]);\n } else {\n // bad current password\n $errFlag = 1;\n $errMsg = \"The password supplied does not match our records\";\n }\n }\n \n // lets get the initial values for this form. This has to be done\n // after any changes ot the DB or they won't be reflected. \n $stmnt = $dbh->prepare(\"SELECT inst_name, contact_fname,\n contact_lname, contact_phone,\n contact_email, inst_data_host,\n inst_host_uname, inst_host_path,\n tt_system \n FROM customer WHERE cid = :CID\");\n $stmnt->bindParam(':CID', $_SESSION[\"CID\"], PDO::PARAM_STR);\n $stmnt->execute();\n $queryResult = $stmnt->fetch(PDO::FETCH_ASSOC); //returns FALSE if empty result\n if (!$queryResult) {\n // insert error here because we didn't get a result;\n }\n \n //We have to assemble to form in a funky way because php does NOT like dealing with the 'for' HTML attribute. Escape the quotes!\n $adminForm = \"<div id='adminFormTitle'><h3 class='text-center'>Account Settings</h3></div>\";\n $adminForm .= \"<a href='#' onclick='toggle_vis(\\\"ud\\\");'>Change Account Information</a></p>\";\n $adminForm .= \"<div id='ud' style='display: none;'>\";\n $adminForm .= \"<form id='updateContactInformation' role='form' class='form-horizontal col-8' action='$url?a=ud' method='post'>\\n\";\n $adminForm .= \"<input type='hidden' name='form_src' value='admin' />\\n\";\n $adminForm .= \"<div class='form-group'><label for='admin-fName'> First Name:</label><input type='text' name='admin-fName' class='form-control' value='$queryResult[contact_fname]' required></div>\\n\";\n $adminForm .= \"<div class='form-group'><label for='admin-lName'> Last Name:</label><input type='text' name='admin-lName' class='form-control' value='$queryResult[contact_lname]' required ></div>\\n\";\n $adminForm .= \"<div class='form-group'><label for='admin-email'> Email Address:</label><input type='email' name='admin-email' class='form-control' value='$queryResult[contact_email]' required></div>\\n\";\n $adminForm .= \"<div class='form-group'><label for='admin-phoneNumber'>Phone Number:</label><input type='text' name='admin-phoneNumber' class='form-control' value='$queryResult[contact_phone]' required></div>\\n\";\n $adminForm .= \"<div class='form-group'><label for='admin-instName'>Institution Name:</label><input type='text' name='admin-instName' class='form-control' value='$queryResult[inst_name]' required ></div>\\n\";\n $adminForm .= \"<div class='form-group'><label for='admin-rtEmailAddress'>RT Email Address:</label><input type='text' name='admin-rtEmailAddress' id='admin-rtEmailAddress' class='form-control' value='$queryResult[tt_system]'></div>\";\n $adminForm .= \"<div class='form-group'><label for='admin-scpUsername'>SCP Username:</label><input type='text' name='admin-scpUsername' id='admin-scpUsername' class='form-control' value='$queryResult[inst_host_uname]' required></div>\";\n $adminForm .= \"<div class='form-group'><label for='admin-scpDstIp'>SCP Host:</label><input type='text' name='admin-scpDstIp' id='admin-scpDstIp' class='form-control' value='$queryResult[inst_data_host]' required></div>\";\n $adminForm .= \"<div class='form-group'><label for='admin-scpHostPath'>SCP Destination (Absolute Path):</label><input type='textarea' name='admin-scpHostPath' id='admin-scpHostPath' class='form-control' value='$queryResult[inst_host_path]' required></div>\";\n $adminForm .= \"<button type='submit' class='btn btn-lg btn-success'>Update Account</button></form>\";\n $adminForm .= \"</div>\";\n \n $adminForm .= \"<a href='#' onclick='toggle_vis(\\\"np\\\");'>Change Password</a></p>\";\n $adminForm .= \"<div id='np' style='display: none;'>\";\n $adminForm .= \"<form id='updatePassword' role='form' class='form-horizontal col-8' action='$url?a=np' method='post'>\\n\";\n $adminForm .= \"<input type='hidden' name='form_src' value='admin' />\\n\";\n $adminForm .= \"<div class='form-group'><label for='cpass'> Current Password:</label><input type='password' name='cpass' class='form-control' value='' required></div>\\n\";\n $adminForm .= \"<div class='form-group'><label for='npass1'> New Password:</label><input type='password' name='npass1' class='form-control' value='' required></div>\\n\";\n $adminForm .= \"<div class='form-group'><label for='npass2'> Confirm Password:</label><input type='password' name='npass2' class='form-control' value='' required></div>\\n\";\n $adminForm .= \"<button type='submit' class='btn btn-lg btn-success'>Update Password</button></form>\";\n $adminForm .= \"</div>\";\n \n $adminForm .= \"<a href='#' onclick='toggle_vis(\\\"nk\\\");'>Generate New Keys</a>\";\n $adminForm .= \"<div id='nk' style='display: none;'>\";\n $adminForm .= \"<form id='updateKey' role='form' class='form-horizontal col-8' action='$url?a=nk' method='post'>\\n\";\n $adminForm .= \"<input type='hidden' name='form_src' value='admin' />\\n\";\n $adminForm .= \"<div class='form-group'><label for='cpass'> Password:</label><input type='password' name='cpass' class='form-control' value='' required></div>\\n\";\n $adminForm .= \"<button type='submit' class='btn btn-lg btn-success'>Request New SCP key</button></form>\";\n $adminForm .= \"</div>\";\n\n #$errMsg = implode(\"<br>\", array_filter($AdminInputErrors));\n return [$adminForm, $errFlag, $errMsg, $type];\n}", "public function server_info_section() {\n \n ?><p><?php _e( 'Information about SMTP server', JPEN_DOMAIN ); ?></p><?php\n\n add_settings_field( \n 'jpen_smtp_host', \n __( 'SMTP Host', JPEN_DOMAIN ), \n [ $this, 'smtp_host_field' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_host',\n 'default' => 'smtp.gmail.com',\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_port', \n __( 'SMTP Port', JPEN_DOMAIN ), \n [ $this, 'smtp_port_field' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_port',\n 'default' => 25,\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_secure', \n __( 'SMTP Secure', JPEN_DOMAIN ), \n [ $this, 'smtp_secure_select' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_secure',\n 'options' => [ 'tls', 'ssl' ],\n 'default' => 'tls',\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_auth', \n __( 'SMTP Auth', JPEN_DOMAIN ), \n [ $this, 'smtp_auth_check' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_auth',\n 'default' => true,\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_debug', \n __( 'SMTP Debug', JPEN_DOMAIN ), \n [ $this, 'smtp_debug_check' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_debug',\n 'default' => 1,\n ) \n );\n }", "public function enableDHCP() {\r\n\t\t/* fire up dhclient */\r\n\t\tFunctions::shellCommand ( \"/sbin/dhclient -c /var/etc/dhclient_\" . ( string ) $this->data->if . \".conf \" . ( string ) $this->data->if . \" >/tmp/\" . ( string ) $this->data->if . \"_output >/tmp/\" . ( string ) $this->data->if . \"_error_output\" );\r\n\t}", "public function beforeSendToClient($cname)\n\t{\n\t\t$form_name = self::form_name($cname, $this->id);\n\n\t\tif (($templated_path = self::templateImagePath($this->attrs['image_path'])) != $this->attrs['image_path'])\n\t\t{\n\t\t\tself::setElementAttribute($form_name, 'image_path', $this->attrs['image_path'] = $templated_path);\n\t\t\t//error_log(__METHOD__.\"() setting templated image-path for $form_name: $templated_path\");\n\t\t}\n\n\t\tif (!is_array(self::$request->sel_options[$form_name])) self::$request->sel_options[$form_name] = array();\n\t\tif ($this->attrs['type'])\n\t\t{\n\t\t\t// += to keep further options set by app code\n\t\t\tself::$request->sel_options[$form_name] += self::typeOptions($this->attrs['type'], $this->attrs['options'],\n\t\t\t\t$no_lang=null, $this->attrs['readonly'], self::get_array(self::$request->content, $form_name));\n\n\t\t\t// if no_lang was modified, forward modification to the client\n\t\t\tif ($no_lang != $this->attr['no_lang'])\n\t\t\t{\n\t\t\t\tself::setElementAttribute($form_name, 'no_lang', $no_lang);\n\t\t\t}\n\t\t}\n\n\t\t// Make sure &nbsp;s, etc. are properly encoded when sent, and not double-encoded\n\t\tforeach(self::$request->sel_options[$form_name] as &$label)\n\t\t{\n\t\t\tif(!is_array($label))\n\t\t\t{\n\t\t\t\t$label = html_entity_decode($label, ENT_NOQUOTES,'utf-8');\n\t\t\t}\n\t\t\telseif($label['label'])\n\t\t\t{\n\t\t\t\t$label['label'] = html_entity_decode($label['label'], ENT_NOQUOTES,'utf-8');\n\t\t\t}\n\t\t}\n\n\t}", "function main_form($type='edit')\n\t{\n\t\t$this->ipsclass->input['id'] = intval($this->ipsclass->input['id']);\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\tif ( ! $this->ipsclass->input['id'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->admin->error(\"No custom field id was passed to edit.\");\n\t\t\t}\n\t\t\t\n\t\t\t$form_code = 'doedit';\n\t\t\t$button = 'Complete Edit';\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form_code = 'doadd';\n\t\t\t$button = 'Add Field';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get field from db\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->input['id'] )\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'downloads_cfields', 'where' => \"cf_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\t\t$fields = $this->ipsclass->DB->fetch_row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fields = array();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Top 'o 'the mornin'\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\t$this->ipsclass->admin->page_title = \"Editing Custom Field \".$fields['cf_title'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->admin->page_title = 'Adding a new custom field';\n\t\t\t$fields['cf_title'] = '';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Wise words\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->page_detail = \"Please double check the information before submitting the form.\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Start form\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 2 => array( 'act' , 'downloads' ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 3 => array( 'id' , $this->ipsclass->input['id'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 5 => array( 'req'\t , 'customfields'\t),\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Format...\n\t\t//-----------------------------------------\n\t\t\t\t\t\t\t\t\t \n\t\t$fields['cf_content'] = $this->func->method_format_content_for_edit($fields['cf_content'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Tbl (no ae?)\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Field Settings\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field Title</b><div class='graytext'>Max characters: 200</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_title\", $fields['cf_title'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Description</b><div class='graytext'>Max Characters: 250</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_desc\", $fields['cf_desc'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t//-----------------------------------------\n\t\t// Apply to categories\n\t\t//-----------------------------------------\n\t\t\n\t\t$sel_menu = \"<select name='cats_apply[]' size='5' multiple='multiple'>\\n\";\n\t\t\n\t\t$cur \t = $this->lib->get_cats_cfield( $fields['cf_id'] );\n\t\t$opts\t = $this->lib->cat_jump_list( 1, 'none', $cur );\n\n\t\tif( is_array($opts) AND count($opts) )\n\t\t{\n\t\t\tforeach( $opts as $cdata )\n\t\t\t{\n\t\t\t\tif( is_array($cur) AND in_array( $cdata[0], $cur ) )\n\t\t\t\t{\n\t\t\t\t\t$cdata[2] = \" selected='selected'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sel_menu .= \"<option value='{$cdata[0]}'{$cdata[2]}>{$cdata[1]}</option>\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sel_menu .= \"</select>\";\n\t\t\t\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Use in Categories</b><div class='graytext'>Select the categories to use this field in</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $sel_menu\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field Type</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t $this->ipsclass->adskin->form_dropdown(\"cf_type\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 0 => array( 'text' , 'Text Input' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 1 => array( 'drop' , 'Drop Down Box' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'area' , 'Text Area' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $fields['cf_type'] )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Maximum Input</b><div class='graytext'>For text input and text areas (in characters)</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_max_input\", $fields['cf_max_input'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Expected Input Format</b><div class='graytext'>Use: <b>a</b> for alpha characters<br />Use: <b>n</b> for numerics.<br />Example, for credit card numbers: nnnn-nnnn-nnnn-nnnn<br />Example, Date of Birth: nn-nn-nnnn<br />Leave blank to accept any input</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_input_format\", $fields['cf_input_format'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Option Content (for drop downs)</b><div class='graytext'>In sets, one set per line<br>Example for 'Software Version' field:<br>10=1.0<br>20=2.0<br>na=Not Applicable<br>Will produce:<br><select name='version'><option value='10'>1.0</option><option value='20'>2.0</option><option value='na'>Not Applicable</option></select><br>10,20, or na stored in database. When showing field on download page, will use value from pair (20=2.0, shows '2.0')</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_textarea(\"cf_content\", $fields['cf_content'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field MUST be completed and not left empty?</b><div class='graytext'>If 'yes', an error will be shown if this field is not completed.</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_not_null\", $fields['cf_not_null'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Include field in auto-generated topics?</b><div class='graytext'>Only applies to categories that automatically generate topics for file submissions</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_topic\", $fields['cf_topic'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Allow users to search in these fields?</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_search\", $fields['cf_search'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form($button);\n\t\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t$this->ipsclass->admin->output();\n\t\t\t\n\t}", "function room_reservations_admin_settings_sms_add($form, &$form_state) {\n $form['carrier'] = array(\n '#title' => t('Wireless carrier'),\n '#type' => 'textfield',\n '#maxlength' => 50,\n '#size' => 50,\n '#description' => t('The name of the wireless carrier, such as !att or\n !verizon.', array(\n '!att' => 'AT&T',\n '!verizon' => 'Verizon',\n )),\n '#weight' => -20,\n );\n $form['domain'] = array(\n '#title' => t('Domain name'),\n '#type' => 'textfield',\n '#maxlength' => 50,\n '#size' => 50,\n '#description' => t('The domain name of the wireless carrier, such as\n !att or !verizon.', array(\n '!att' => '@txt.att.net',\n '!verizon' => '@vtext.com',\n )),\n '#weight' => -10,\n );\n $form['add_carrier']['add'] = array(\n '#type' => 'submit',\n '#value' => t('Add'),\n '#weight' => 100,\n );\n return $form;\n}", "private function saveConfig(){\r\n\t\t//\t\tCheck form input\r\n\t\tif($_POST['interfaces_wan_type'] != 'dhcp' && $_POST['interfaces_wan_type'] != 'static'){\r\n\t\t\tErrorHandler::addError('formerror','interfaces_wan_type');\r\n\t\t}\r\n\t\tif(!empty($_POST['interfaces_wan_mac']) && !Functions::isMacAddress($_POST['interfaces_wan_mac'])){\r\n\t\t\tErrorHandler::addError('formerror','interfaces_wan_mac');\r\n\t\t}\r\n\t\tif(!empty($_POST['interfaces_wan_mtu']) && !is_numeric($_POST['interfaces_wan_mtu'])){\r\n\t\t\tErrorHandler::addError('formerror','interfaces_wan_mtu');\r\n\t\t}\r\n\t\tif($_POST['interfaces_wan_type'] == 'static' && !Functions::is_ipAddr($_POST['interfaces_wan_static_ipaddr'])){\r\n\t\t\tErrorHandler::addError('formerror','interfaces_wan_static_ipaddr');\r\n\t\t}\r\n\t\tif($_POST['interfaces_wan_type'] == 'static' && !Functions::is_ipAddr($_POST['interfaces_wan_static_gateway'])){\r\n\t\t\tErrorHandler::addError('formerror','interfaces_wan_static_gateway');\r\n\t\t}\r\n\t\tif($_POST['interfaces_wan_type'] == 'dhcp' && !Functions::is_hostname($_POST['interfaces_wan_dhcp_hostname'])){\r\n\t\t\tErrorHandler::addError('formerror','interfaces_wan_dhcp_hostname');\r\n\t\t}\r\n\t\tif($_POST['interfaces_wan_type'] == 'static' && !Functions::is_ipAddr($_POST['interfaces_wan_static_subnetmask'])){\r\n\t\t\tErrorHandler::addError('formerror','interfaces_wan_static_subnetmask');\r\n\t\t}\r\n\t\t\r\n\t\t//\tPropagate exit on errors\r\n\t\tif(ErrorHandler::errorCount() > 0){\r\n\t\t\tthrow new Exception('There is invalid form input');\r\n\t\t}\r\n\t\t\r\n\t\t//\tSave actual configuration\r\n\t\tif(!empty($_POST['interfaces_wan_mac'])){\r\n\t\t\t$this->data->mac = $_POST['interfaces_wan_mac'];\r\n\t\t}\r\n\t\tif(!empty($_POST['interfaces_wan_mtu'])){\r\n\t\t\t$this->data->mtu = $_POST['interfaces_wan_mtu'];\r\n\t\t}\r\n\t\t\r\n\t\tif($_POST['interfaces_wan_type'] == 'dhcp'){\r\n\t\t\t$this->data->ipaddr = 'dhcp';\r\n\t\t\t$this->data->dhcphostname = $_POST['interfaces_wan_dhcp_hostname'];\r\n\t\t}\r\n\t\telseif($_POST['interfaces_wan_type'] == 'static'){\r\n\t\t\t$this->data->ipaddr = $_POST['interfaces_wan_static_ipaddr'];\r\n\t\t\t$this->data->gateway = $_POST['interfaces_wan_static_gateway'];\r\n\t\t\t$this->data->subnet = $_POST['interfaces_wan_static_subnetmask'];\r\n\t\t}\r\n\t\techo '<reply action=\"ok\">';\r\n\t\techo $this->data->asXML();\r\n\t\techo '</reply>';\r\n\t\t$this->config->saveConfig();\r\n\t}", "function guifi_domain_form($form_state, $params = array()) {\n global $user;\n\n guifi_log(GUIFILOG_TRACE,'function guifi_domain_form()',$params);\n\n if (empty($form_state['values']))\n $form_state['values'] = $params;\n $form_state['#redirect'] = FALSE;\n\n // if new domain, initializing variables\n if (($form_state['values']['sid'] == NULL) && ($params['add'] != NULL)) {\n $form_state['values']['sid'] = $params['add'];\n $form_state['values']['new'] = TRUE;\n if ($params['mname']) {\n $masteridqry = db_query(\"SELECT name FROM {guifi_dns_domains} WHERE name = '%s'\",$params['mname']);\n $mname = db_fetch_object($masteridqry);\n $form_state['values']['mname'] = $mname->name;\n $form_state['values']['name'] = $params['dname'].'.'.$params['mname'];\n } else {\n $form_state['values']['name'] = $params['dname'];\n }\n $form_state['values']['type'] = $params['type'];\n\n if ($params['scope'] == 'external') {\n $form_state['values']['ipv4'] = '';\n } else {\n $form_state['values']['ipv4'] = $params['ipv4'];\n }\n $form_state['values']['scope'] = $params['scope'];\n $form_state['values']['management'] = $params['management'];\n $form_state['values']['allow'] = 'disabled';\n $form_state['values']['hosts']['0']['new'] = TRUE;\n $form_state['values']['hosts']['0']['counter'] = '0';\n $form_state['values']['hosts']['0']['host'] = 'ns1';\n $form_state['values']['hosts']['0']['ipv4'] = $params['ipv4'];\n $form_state['values']['hosts']['0']['ipv6'] = $params['ipv6'];\n $form_state['values']['hosts']['0']['opt']['options'] = array( 'NS' => 'NS', 'MX' => '0' );\n }\n\n drupal_set_breadcrumb(guifi_node_ariadna($form_state['values']['sid']));\n\n // Check permissions\n if ($params['edit']){\n if (!guifi_domain_access('update',$params['edit'])){\n drupal_set_message(t('You are not authorized to edit this domain','error'));\n return;\n }\n }\n\n // Loading node & zone where the domain belongs to (some information will be used)\n $node = node_load(array('nid' => $form_state['values']['sid']));\n\n // Setting the breadcrumb\n drupal_set_breadcrumb(guifi_node_ariadna($form_state['values']['sid']));\n\n // if contact is NULL, then get it from the node or the user logged in drupal\n if (is_null($form_state['values']['notification']))\n if (guifi_notification_validate($node->notification)) {\n $form_state['values']['notification'] = $node->notification;\n } else {\n drupal_set_message(t('The service has not a valid email address as a contact. Using your email as a default. Change the contact mail address if necessary.'));\n $form_state['values']['notification'] = $user->mail;\n }\n\n if (isset($form_state['action'])) {\n guifi_log(GUIFILOG_TRACE,'action',$form_state['action']);\n if (function_exists($form_state['action'])) {\n if (!call_user_func_array($form_state['action'],\n array(&$form,&$form_state)))\n return $form;\n }\n }\n\n $form_weight = -20;\n if ($form_state['values']['id'])\n $form['id'] = array(\n '#type' => 'hidden',\n '#name' => 'id',\n '#value'=> $form_state['values']['id']\n );\n else\n $form['new'] = array(\n '#type' => 'hidden',\n '#name' => 'new',\n '#value'=> TRUE\n );\n\n if ($params['add'] != NULL){\n drupal_set_title(t('adding a new type %domain at %node',\n array('%node' => $node->nick,\n '%domain' => $form_state['values']['type']\n )));\n } else {\n drupal_set_title(t('edit domain %dname',array('%dname' => $form_state['values']['name'])));\n }\n\n // All preprocess is complete, now going to create the form\n\n $form['main'] = array(\n '#type' => 'fieldset',\n '#title' => t('Domain name main settings').' ('.\n $form_state['values']['name'].')',\n '#weight' => $form_weight++,\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n\n $form['main']['sid'] = array(\n '#type' => 'hidden',\n '#value'=> $form_state['values']['sid'],\n );\n\n $form['main']['type'] = array(\n '#type' => 'hidden',\n '#value'=> $form_state['values']['type'],\n );\n\n $form['main']['mname'] = array(\n '#type' => 'hidden',\n '#value'=> $form_state['values']['mname'],\n );\n\n $form['main']['scope'] = array(\n '#type' => 'hidden',\n '#value'=> $form_state['values']['scope'],\n );\n\n $form['main']['name'] = array(\n '#type' => 'textfield',\n '#size' => 32,\n '#maxlength' => 32,\n '#title' => t('Domain Name'),\n '#required' => TRUE,\n '#default_value' => $form_state['values']['name'],\n '#description' => t('The Domain Name'),\n '#weight' => $form_weight++,\n );\n\n $form['main']['notification'] = array(\n '#type' => 'textfield',\n '#size' => 60,\n '#maxlength' => 1024,\n '#title' => t('contact'),\n '#required' => TRUE,\n '#element_validate' => array('guifi_emails_validate'),\n '#default_value' => $form_state['values']['notification'],\n '#description' => t('Mails where changes on the domain will be notified, if many, separated by \\',\\'')\n .'<br />'\n .t('used for network administration.'),\n '#weight' => $form_weight++,\n );\n\n if ($form_state['values']['scope'] == 'external') {\n $form['main']['ipv4'] = array(\n '#type' => 'textfield',\n '#title' => t('Set the Nameserver IP Address'),\n '#size' => 16,\n '#maxlength' => 16,\n '#required' => TRUE,\n '#default_value'=> $form_state['values']['ipv4'],\n '#element_validate' => array('guifi_ipv4_validate'),\n '#description' => t('External scope: Put the Internet IP Address of NameServer.'),\n '#weight' => $form_weight++,\n );\n } else {\n $form['main']['ipv4'] = array(\n '#type' => 'hidden',\n '#default_value'=> $form_state['values']['ipv4'],\n );\n }\n\n $form['main']['settings'] = array(\n '#type' => 'fieldset',\n '#title' => t('Advanced domain name settings'),\n '#weight' => $form_weight++,\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n\n $form['main']['settings']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#default_value' => $form_state['values']['management'],\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#description' => t('Choose <strong>Automatic</strong> if you want to use your domain management with the utility for servers \"DNSServices\"')\n .'<br \\>'\n .t('Choose <strong>Manual</strong>, if you just want to keep track of your domain/hosts here but want to do the management in your server manually.'),\n );\n $form['main']['settings']['public'] = array(\n '#type' => 'select',\n '#title' => t('Public domain'),\n '#default_value' => $form_state['values']['public'],\n '#options' => array('yes' => 'Yes', 'no' => 'No'),\n '#description' => t('Choose <strong>Yes</strong> if you want your domain/subdomain can be delegated subdomains from other users. (Ex: DELEGATED.yourdomain.net.')\n .'<br/>'\n .t('Choose <strong>No</strong> if your domain/subdomain is private and you do not want to allow delegates subdomains.'),\n );\n $form['main']['settings']['allow'] = array(\n '#type' => 'radios',\n '#required' => TRUE,\n '#title' => t('Transfer Options'),\n '#default_value' => $form_state['values']['allow'],\n '#options' => array('slave' => t('Allow to be enslaved (Recommended)'), 'forward' => t('Allow Forward'), 'disabled' => t('Disabled')),\n '#description' => t('<strong>Enslaved</strong>, Allow other DNS servers on the network have an exact copy of the domain, so, if the original DNS does not work, can access to the hosts.')\n .'<br \\>'\n .t('<strong>Forward</strong>, Allow other DNS servers on the network to forward the request to the master server transparently saving bandwidth.')\n .'<br \\>'\n .t('<strong>Disabled</strong>, If you select this option, the management of your domain may not be transferred in any way, your domain will not be visible to other network servers.'),\n );\n\n $form['main']['settings']['defipv4'] = array(\n '#type' => 'textfield',\n '#title' => t(\"Default Domain IPv4 Address\"),\n '#default_value' => $form_state['values']['defipv4'],\n '#element_validate' => array('guifi_ipv4_validate'),\n '#description' => t(\"Ex: domain.net without hostname resolve this IPv4 Address, tends to be the same address as hostname: www.\")\n .\"<br />\"\n .t(\"leave it blank if not needed.\"),\n '#required' => FALSE,\n );\n $form['main']['settings']['defipv6'] = array(\n '#type' => 'textfield',\n '#title' => t(\"Default Domain IPv6 Address\"),\n '#default_value' => $form_state['values']['defipv6'],\n '#element_validate' => array('guifi_ipv6_validate'),\n '#description' => t(\"Ex: domain.net without hostname resolve this IPv6 Address, tends to be the same address as hostname: www.\")\n .\"<br />\"\n .t(\"leave it blank if not needed.\"),\n '#required' => FALSE,\n );\n\n $form['main']['settings']['externalmx'] = array(\n '#type' => 'textfield',\n '#title' => t(\"External Mailservers MX \"),\n '#default_value' => $form_state['values']['externalmx'],\n '#description' => t(\"Separated by ','. Put them here only if the mail servers are external, if they are not, leave it blank.\")\n .\"<br />\"\n .t(\"Internal MailServers should be configured in the advanced options of the hosts.\"),\n '#required' => FALSE,\n );\n $form['main']['settings']['externalns'] = array(\n '#type' => 'textfield',\n '#title' => t(\"External Namservers \"),\n '#default_value' => $form_state['values']['externalns'],\n '#description' => t(\"Separated by ','. Put external nameserver IP address if you need it, if they are not, leave it blank.\")\n .\"<br />\"\n .t(\"Internal domain Nameservers should be configured in the advanced options of the hosts.\"),\n '#required' => FALSE,\n );\n\n if ($form_state['values']['management'] == 'automatic') {\n if (function_exists('guifi_host_form')){\n $form = array_merge($form,\n call_user_func('guifi_host_form',\n $form_state['values'],\n $form_weight));\n }\n }\n // Comments\n $form_weight = 200;\n\n $form['comment'] = array(\n '#type' => 'textarea',\n '#title' => t('Comments'),\n '#default_value' => $form_state['values']['comment'],\n '#description' => t('This text will be displayed as an information of the domain.'),\n '#cols' => 60,\n '#rows' => 5,\n '#weight' => $form_weight++,\n );\n\n // save/validate/reset buttons\n $form['dbuttons'] = guifi_domain_buttons(FALSE,'',$form_weight);\n\n return $form;\n}", "public function displayPageAddForm(){\n\n // Vérifie les données de champs dupliqués\n $this->handleDuplicateFields();\n\n // Vérifie les données post envoyées\n $this->handleAdd();\n\n // If there ia a modify var\n if(isset($_GET['modify']) && !empty($_GET['modify'])){\n\n $form = get_post($_GET['modify']);\n if($this->isForm($_GET['modify'])){\n\n $formMetas = get_post_meta($_GET['modify']);\n $formArgs = get_post_meta($_GET['modify'],'form-args');\n $formFields = get_post_meta($_GET['modify'],'form-fields');\n $submitArgs = get_post_meta($_GET['modify'],'form-submit-args');\n $formSendArgs = get_post_meta($_GET['modify'],'form-send-args');\n }else\n unset($form);\n\n }\n require_once __DIR__ . '/templates/add.php';\n\n }", "function manage_form($form, $form_state) {\n module_load_include('inc','ccHosting','includes/lib');\n $form = array();\n global $user;\n\n\t$sitedata = array();\n\t$sitedata = getSiteData($form_state['site_id']);\n\n\tif(isset($sitedata)){\n\n\t\t$form['site_name'] = array(\n\t\t\t'#type' => 'textfield',\n\t\t\t'#title' => t('Site Name'),\n\t\t\t'#required' => TRUE,\n\t\t\t'#default_value' => $sitedata['site_name'],\n\t\t);\n\t\t$form['site_description'] = array(\n\t\t\t'#type' => 'textfield',\n\t\t\t'#title' => t('Description'),\n\t\t\t'#required' => TRUE,\n\t\t\t'#default_value' => $sitedata['site_description'],\n\t\t);\n\n\t\t$form['site_domain'] = array(\n\t\t\t'#type' => 'textfield',\n\t\t\t'#title' => t('Domain'),\n\t\t\t'#required' => TRUE,\n\t\t\t'#default_value' => $sitedata['site_domain'],\n\t\t);\n\n\t\t$form['site_cms'] = array(\n\t\t\t'#type' => 'textfield',\n\t\t\t'#title' => t('CMS'),\n\t\t\t'#required' => TRUE,\n\t\t\t'#default_value' => $sitedata['site_cms'],\n\t\t);\n\n\t\t/////// required for form\n\t\t$form['basic_id'] = array(\n\t\t\t'#type' => 'value',\n\t\t\t'#value' => $form_state['site_id'],\n\t\t);\n\t\t$form['bundle_type'] = array(\n\t\t\t'#type' => 'value',\n\t\t\t'#value' => 'ccdev_hosting_bundle',\n\t\t);\n\t\t$form['submit'] = array(\n\t\t\t'#type' => 'submit',\n\t\t\t'#value' => t('Save'),\n\t\t\t'#attributes' => array('class' => array('btn', 'btn-success'), 'style' => \"float:right; padding: 5px 10px;\"),\n\t\t\t'#theme' => \"submit\",\n\t\t\t'#prefix' => \"<div class=''>\",\n\t\t\t'#suffix' => \"</div>\",\n\t\t\t '#ajax' => array(\n\t\t\t 'callback' => 'manage_form_submit',),\n\t\t\t); \n\t}\n return $form;\n}", "function time4vps_ClientAreaChangeDNS($params, $details)\n{\n $error = null;\n\n if (!empty($_POST)) {\n $error = time4vps_ChangeDNS($params, $_POST['ns1'], $_POST['ns2']);\n if ($error === 'success') {\n time4vps_MarkServerDetailsObsolete($params);\n time4vps_Redirect(time4vps_ActionLink($params, 'ChangeDNS'));\n }\n }\n\n return [\n 'tabOverviewReplacementTemplate' => 'templates/clientarea/pages/changedns.tpl',\n 'templateVariables' => [\n 'details' => $details,\n 'ippattern' => '((^|\\.)((25[0-5])|(2[0-4]\\d)|(1\\d\\d)|([1-9]?\\d))){4}$',\n 'error' => $error\n ]\n ];\n}", "public function actionTambahKoneksi() {\n $model = new TblServer();\n\n if (isset($_POST['TblServer'])) {\n $model->attributes = $_POST['TblServer'];\n $cek = TblServer::model()->findByAttributes(array('hostname' => $model->hostname));\n $hostname = $model->host;\n $username = $model->username;\n $password = $model->password;\n $link = @mysql_connect( $hostname, $username, $password );\n if ($link)\n {\n if (!$cek) {\n $model->attributes = $_POST['TblServer'];\n if ($model->save()) {\n\n $this->redirect('index.php?r=tblServer/create', array(\n 'model' => $model\n ));\n }\n } else {\n $this->redirect(array('site/alertServer'));\n }\n }else {\n ?>\n <script>\n alert('Tidak bisa simpan hostname karena gagal koneksi');\n window.location = 'index.php?r=tblServer/TambahKoneksi';\n </script>\n <?php\n }} else {\n $this->render('TambahKoneksi', array(\n 'model' => $model,\n ));\n }\n }", "function editCondoHandler1() {\n global $inputs;\n\n updateDb('condo',[\n 'name' => $inputs['name'],\n 'area' => $inputs['area'],\n 'cost' => $inputs['cost'],\n ], [\n 'id' => $inputs['id']\n ]);\n\n updateDb('condo_building',[\n 'building_id' => $inputs['building_id']\n ], [\n 'condo_id' => $inputs['id']\n ]);\n\n formatOutput(true, 'update success');\n}", "public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $this->struct;\n\n mhtml::startForm(\"edit\",\"backend_edit.php\");\n\n // loop througth fields\n foreach ($this->edit as $key => $field) {\n\n $kind = $struct[$field] ;\n if($kind == 'string') {$kind = 'text' ;} \n $value = $source_first[$field];\n\n mhtml::field($this->virtual_names[$field],$field,$kind,$value);\n\n }\n\n // add secret field for password\n if(isset($this->edit_secret)){\n if($this->edit_secret == true ){\n\n Logger::warn(\"we use one secret only on secret[0] in secret array in model\");\n $virtual_pass = $this->virtual_names[$this->secret[0]];\n mhtml::field($virtual_pass,$this->secret[0],'password');\n\n }\n }\n\n \n\n\n\n\n // mhtml::field('user name ','user_name','text',\"mohammed\");\n // mhtml::field('passwording','password','password');\n // mhtml::field('age','age','number');\n\n mhtml::field_id_model();\n\n mhtml::submitForm();\n\n mhtml::endForm();\n\n }", "public function add() {\n\t\t$data = array();\t\n\t\t// add page title\n\t\t$this->output->append_title('Add New Client');\n\t\t// add breadcrumbs\n\t\t\n\t\t$this->breadcrumb->populate(array(\n\t\t\t'Dashboard' => parent::$module.'/dashboard',\n\t\t\t'users' => parent::$module.'/clients',\n\t\t\t'Add Client'\n\t\t));\n\t\t// process form\n\t\tif($this->input->post())\n\t\t{\n\t\t\t// set validation rules\n\t\t\t$this->form_validation->set_rules('client_first_name', 'First Name', 'trim|required');\n\t\t\t$this->form_validation->set_rules('client_last_name', 'Last Name', 'trim|required');\n\t\t\t$this->form_validation->set_rules('client_address', 'Client Address', 'trim|required');\n\t\t\t$this->form_validation->set_rules('client_url', '', 'trim');\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|edit_unique[users.email]');\n\t\t\t$this->form_validation->set_rules('client_phone_number', 'Phone Number', 'trim|required');\n\t\t\t$this->form_validation->set_rules('client_fb_page_url', '', 'trim');\n\t\t\t$this->form_validation->set_rules('client_twitter_page_url', '', 'trim');\n\t\t\t$this->form_validation->set_rules('client_website_url', '', 'trim');\n\t\t\t$this->form_validation->set_rules('client_timezone', 'Client Timezone', 'trim|required');\n\t\t\t\n\t\t\t\n\t\t\t// validate form\n\t\t\tif($this->form_validation->run() == TRUE)\n\t\t\t{\n\n\t\t\t\t// Create client\n\t\t\t\t$user = Sentry::createUser(array(\n\t\t\t\t\t'first_name' => $this->input->post('client_first_name'),\n\t\t\t\t\t'last_name' => $this->input->post('client_last_name'),\n\t\t\t\t\t'address' => $this->input->post('client_address'),\n\t\t\t\t\t'email' => $this->input->post('email'),\n\t\t\t\t\t'password' => $this->input->post('password'),\n\t\t\t\t\t'country_code' => $this->input->post('client_country_code'),\n\t\t\t\t\t'phone_number' => $this->common->formatPhoneNumber($this->input->post('client_country_code'),$this->input->post('client_phone_number'),true),\n\t\t\t\t\t'timezone' => $this->input->post('client_timezone'),\n\t\t\t\t\t'activated' => true\n\t\t\t\t));\n\t\t\t\t$user_id = $user->getId(); // get user id\n\t\t\t\t\n\t\t\t\t// Find the group using the group id\n\t\t\t\t$adminGroup = Sentry::findGroupById(CLIENT_GROUP_ID); // \n\n\t\t\t\t// Assign the group to the user\n\t\t\t\t$user->addGroup($adminGroup);\n\t\t\t\t\n\t\t\t\t$data = array(\n\t\t\t\t 'client_url' => prep_url($this->input->post('client_url')),\n\t\t\t\t 'client_fb_page_url' => prep_url($this->input->post('client_fb_page_url')),\n\t\t\t\t 'client_twitter_page_url' => prep_url($this->input->post('client_twitter_page_url')),\n\t\t\t\t 'client_website_url' => prep_url($this->input->post('client_website_url')),\n\t\t\t\t 'user_id' => $user_id,\n\t\t\t\t 'created_on' => CURRENT_DATETIME,\n\t\t\t\t 'updated_on' => CURRENT_DATETIME,\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$data = $this->security->xss_clean($data); // filter data & remove malicious code \n\t\t\t\t$this->client_model->insert($data); \n\t\t\t\t\n\t\t\t\t$url = website_url('admin');\n\t\t\t\t\n\t\t\t\t$subject = 'Client Account Creation';\n\t\t\t\t$template_data = array(\n\t\t\t\t\t'email_title' => 'Client Account Creation',\n\t\t\t\t\t'email_heading' => 'Hello '.$this->input->post('client_first_name').' '.$this->input->post('client_last_name'),\n\t\t\t\t\t'email_body' => 'Your account has been created.<br/>\n\t\t\t\t\tYour account details are:<br/>\n\t\t\t\t\tEmail: '.$this->input->post('email').'<br/>\n\t\t\t\t\tPassword: '.$this->input->post('password').'<br/>\n\t\t\t\t\t<br/>Please click on the following link to login:<br/> <a href=\"'.$url.'\">'.$url.'</a><br/>\n\t\t\t\t\tIf clicking the link does not work, please copy and paste the URL into your browser instead.<br/>\n\t\t\t\t\t'\n\t\t\t\t);\n\n\t\t\t\t$body = $this->parser->parse('emails/user_registration', $template_data,TRUE);\n\t\t\t\tif($this->common->sendEmail($email,$subject,$body))\n\t\t\t\t{\n\t\t\t\t\t$this->message->set('success', 'Client added successfully.', TRUE, 'message');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->message->set('warning', 'Unable to send email, please try again later.', TRUE, 'message');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tredirect(website_url('users'));\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->message->set('danger', $this->message->validation_errors());\n\t\t\t}\n\t\t}\n\t\t\n\t\t// create form fields\n\t\t$data['client_first_name'] = array('name' => 'client_first_name',\n\t\t\t'autofocus' => 'autofocus',\n\t\t\t'id' => 'client_first_name',\n\t\t\t'placeholder' => 'First Name',\n\t\t\t'class' => 'form-control',\n\t\t\t'maxlength' => 50,\n\t\t\t'value' => $this->form_validation->set_value('client_first_name')\n\t\t);\n\t\t\n\t\t$data['client_last_name'] = array('name' => 'client_last_name',\n\t\t\t'id' => 'client_last_name',\n\t\t\t'placeholder' => 'Last Name',\n\t\t\t'class' => 'form-control',\n\t\t\t'maxlength' => 50,\n\t\t\t'value' => $this->form_validation->set_value('client_last_name')\n\t\t);\n\t\t\n\t\t$data['client_url'] = array('name' => 'client_url',\n\t\t\t'id' => 'client_url',\n\t\t\t'placeholder' => 'Client URL',\n\t\t\t'class' => 'form-control',\n\t\t\t'maxlength' => 100,\n\t\t\t'value' => $this->form_validation->set_value('client_url')\n\t\t);\n\t\t\n\t\t$data['client_address'] = array('name' => 'client_address',\n\t\t\t'id' => 'client_address',\n\t\t\t'placeholder' => 'Client Address',\n\t\t\t'class' => 'form-control',\n\t\t\t'maxlength' => 300,\n\t\t\t'rows' => 5,\n\t\t\t'value' => $this->form_validation->set_value('client_address')\n\t\t);\n\t\t\n\t\t$data['client_phone_number'] = array('name' => 'client_phone_number',\n\t\t\t'id' => 'client_phone_number',\n\t\t\t'placeholder' => 'Phone Number',\n\t\t\t'class' => 'form-control international-number',\n\t\t\t'maxlength' => 15,\n\t\t\t'type' => 'tel',\n\t\t\t'value' => $this->form_validation->set_value('client_phone_number')\n\t\t);\n\t\t\n\t\t$data['client_fb_page_url'] = array('name' => 'client_fb_page_url',\n\t\t\t'id' => 'client_fb_page_url',\n\t\t\t'placeholder' => 'Facebook Page URL',\n\t\t\t'class' => 'form-control',\n\t\t\t'maxlength' => 100,\n\t\t\t'value' => $this->form_validation->set_value('client_fb_page_url')\n\t\t);\n\t\t\n\t\t$data['client_twitter_page_url'] = array('name' => 'client_twitter_page_url',\n\t\t\t'id' => 'client_twitter_page_url',\n\t\t\t'placeholder' => 'Twitter Page URL',\n\t\t\t'class' => 'form-control',\n\t\t\t'maxlength' => 100,\n\t\t\t'value' => $this->form_validation->set_value('client_twitter_page_url')\n\t\t);\n\t\t\n\t\t$data['client_website_url'] = array('name' => 'client_website_url',\n\t\t\t'id' => 'client_website_url',\n\t\t\t'placeholder' => 'Website URL',\n\t\t\t'class' => 'form-control',\n\t\t\t'maxlength' => 100,\n\t\t\t'value' => $this->form_validation->set_value('client_website_url')\n\t\t);\n\t\t\n\t\t$timezones = $this->timezone->get_timezone_list(); \n\t\t\n\t\t$list=array(''=>'Select Timezone');\n\t\tforeach($timezones as $key=>$value )\n\t\t{\n\t\t\t$list[$value] = $key; \n\t\t}\n\t\t//echo '<pre>'; print_r($list);die;\n\t\t\n\t\t$data['client_timezone'] = array('name' => 'client_timezone',\n\t\t\t'additional' => array(\n\t\t\t\t\t\t\t'id' => 'client_timezone',\n\t\t\t\t\t\t\t'class' => 'form-control',\n\t\t\t\t\t\t),\n\t\t\t'value' => $list,\n\t\t\t'selected' => $this->form_validation->set_value('client_timezone')\n\t\t);\n\t\t\n\t\t$data['client_country_code'] = array('name' => 'client_country_code',\n\t\t\t'id' => 'client_country_code',\n\t\t\t'type' => 'hidden',\n\t\t\t'value' => $this->form_validation->set_value('client_country_code')\n\t\t);\n\t\t\n\t\t$data['email'] = array('name' => 'email',\n\t\t\t'id' => 'email',\n\t\t\t'placeholder' => 'Email',\n\t\t\t'class' => 'form-control',\n\t\t\t'type' => 'text',\n\t\t\t'value' => $this->form_validation->set_value('email')\n\t\t);\n\t\t\n\t\t$data['password'] = array('name' => 'password',\n\t\t\t'id' => 'password',\n\t\t\t'placeholder' => 'Password',\n\t\t\t'class' => 'form-control',\n\t\t\t'type' => 'password',\n\t\t\t'value' => $this->form_validation->set_value('password')\n\t\t);\n\t\t\n\t\t// load view\n\t\t$this->load->view(parent::$module.'/edit',$data);\n\t}", "public static function add_option() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$id = FrmAppHelper::get_post_param( 'field_id', 0, 'absint' );\n\t\t$opt_type = FrmAppHelper::get_post_param( 'opt_type', '', 'sanitize_text_field' );\n\t\t$opt_key = FrmAppHelper::get_post_param( 'opt_key', 0, 'absint' );\n\n $field = FrmField::getOne($id);\n\n if ( 'other' == $opt_type ) {\n\t\t\t$opt = __( 'Other', 'formidable' );\n $other_val = '';\n $opt_key = 'other_' . $opt_key;\n } else {\n\t\t\t$opt = __( 'New Option', 'formidable' );\n }\n $field_val = $opt;\n\n $field_data = $field;\n\t\t$field = (array) $field;\n\t\t$field['separate_value'] = isset( $field_data->field_options['separate_value'] ) ? $field_data->field_options['separate_value'] : 0;\n\t\tunset( $field_data );\n\n\t\t$field_name = 'item_meta[' . $id . ']';\n\t\t$html_id = FrmFieldsHelper::get_html_id( $field );\n $checked = '';\n\n if ( 'other' == $opt_type ) {\n\t\t\tinclude( FrmAppHelper::plugin_path() . '/pro/classes/views/frmpro-fields/other-option.php' );\n } else {\n\t\t\trequire( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/single-option.php' );\n }\n wp_die();\n }", "function default_add(){\n\tglobal $assign_list, $_CONFIG, $_SITE_ROOT, $mod,$log,$C;\n\tglobal $core, $clsModule, $clsButtonNav;\n\t$tableName = \"huy_setting_lipe\";\n\t$classTable = \"Setting_Lipe\";\n\t$pkeyTable = \"id\";\n\t$clsUser=new User();\n\trequire_once DIR_COMMON.\"/clsForm.php\";\n\t//get _GET, _POST\n\t$pvalTable = isset($_REQUEST[$pkeyTable])? $_REQUEST[$pkeyTable] : \"\";\n\t$btnSave = isset($_REQUEST[\"btnSave\"])? $_REQUEST[\"btnSave\"] : \"\";\n\t$c_id = isset($_REQUEST[\"c_id\"])? $_REQUEST[\"c_id\"] : \"\";\n\t// check permission\n\t$username= $_COOKIE['username'];\n\tif ($clsUser->CheckRole($username,$c_id)=='0')\n\t {\n\t $redirect_url='?'.$_SITE_ROOT.'&mod=settinglipe&c_id='.$c_id;\n\t echo \"<script>window.location='\".$redirect_url.\"'</script>\";\n die();\n\t }\n\t//get Mode\n\t$mode = ($pvalTable!=\"\")? \"Edit\" : \"New\";\n\t//init Button\n\t$clsButtonNav->set(\"Save\", \"/icon/disks.png\", \"Save\", 1, \"save\");\n\tif ($mode==\"Edit\"){\n\t\t$clsButtonNav->set(\"New\", \"/icon/add2.png\", \"?topica&mod=$mod&act=add\",1);\n\t\t$clsButtonNav->set(\"Delete\", \"/icon/delete2.png\", \"?topica&mod=$mod&act=delete&$pkeyTable=$pvalTable\");\n\t}\n\t$clsButtonNav->set(\"Cancel\", \"/icon/undo.png\", \"?topica&mod=$mod&c_id=$c_id\");\n\t//################### CHANGE BELOW CODE ###################\n\t$arrLipeTipe = array (\"I\"=>\"Số bài viết\",\"P\"=>\"Bài luyện\",\"E\"=>\"Bài Kiểm tra\",\"V\"=>\"Diễn đàn VBB\");\n\t\n\t$clsForumDiscussions = new ForumDiscussions();\n\t$clsQuizGrades = new QuizGrades();\n\t$clsQuiz = new Quiz();\n\t\n\t//$arrQuizGrades = $clsQuizGrades->getAll();\n\t$arrForumDiscussions = $clsForumDiscussions->getAll(\"course='$c_id'\");\n\t//$arrQuiz = $clsQuiz->getAll(\"course=$c_id and name not like '%luyen tap%'\");\n\t$arrQuiz = $clsQuiz->getAll(\"course=$c_id\");\n\t//print_r($arrQuiz);die();\n\t\n\t//print_r($arrForumDiscussions);die();\n\t$arrOptionForumDiscussions = array();\n\tif (is_array($arrForumDiscussions))\n\tforeach ($arrForumDiscussions as $key => $val){\n\t\t$arrOptionForumDiscussions[$val[\"id\"]] = $val[\"name\"];\n\t}\n\t\n\t$clsSetting_Calendar = new Setting_Calendar();\n\t$arrWeeknumber = $clsSetting_Calendar->getAll(\"c_id='$c_id'\");\n\t//print_r($arrForumDiscussions);die();\n\t$arrOptionWeeknumber = array();\n\tif (is_array($arrWeeknumber))\n\tforeach ($arrWeeknumber as $key => $val){\n\t\t$arrOptionWeeknumber[$val[\"id\"]] = $val[\"week_name\"];\n\t}\n\t\n\t\n\t$arrStyle = array(\"forum\"=>\"Forum\",\"exam\"=>\"Exam\",\"assignment\"=>\"Assignment\"); \n\t//print_r($arrOptionForumDiscussions);die();\n\t//init Form\n\t$clsForm = new Form();\n\t$clsForm->setDbTable($tableName, $pkeyTable, $pvalTable);\n\t$clsForm->setTitle($core->getLang(\"Edit Setting Lipe\"));\n\t\n\t$clsForm->addInputSelect(\"style\", \"\", \"Style\",$arrStyle, 0, \"style='width:200px'\");\n\t$clsForm->addInputText(\"active_id\", \"\", \"active_id\",255, 1, \"style='width:200px'\");\n\t$clsForm->addInputSelect(\"lipe_type\", \"\", \"lipe_type\",$arrLipeTipe,0, \"style='font-size:12px'\");\n\t$clsForm->addInputSelect(\"calendar_id\", \"\", \"Tuần\", $arrOptionWeeknumber, 0, \"style='width:200px'\");\n\t$clsForm->addInputTextArea(\"comment\", \"\", \"Ghi chú\", 255, 10, 5, 1, \"style='width:50%'\");\n\tif ($mode==\"New\"){\n\t$clsForm->addInputHidden(\"c_id\",\"$c_id\");\n\t}\n\t//####################### ENG CHANGE ######################\n\t//do Action\n\tif ($btnSave!=\"\"){\n\t\tif ($clsForm->validate()){\n\t\t\tif ($clsForm->saveData($mode)){\n \t$username=$_COOKIE['username'];\n\t\t\t\t\t$actionlog=new ActionLog();\n\t\t\t\t\t$actionlog->insertValue($username,'Setting lipe / Add new lipe','Course id: '.$c_id);\n\t\t\t\t\theader(\"location: ?$_SITE_ROOT&mod=$mod&c_id=$c_id\");\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$assign_list[\"clsModule\"] = $clsModule;\n\t$assign_list[\"clsForm\"] = $clsForm;\n\t$assign_list[$pkeyTable] = $pvalTable;\n\t$assign_list[\"c_id\"] = $c_id;\n\t$assign_list[\"arrForumDiscussions\"] = $arrForumDiscussions;\n\t$assign_list[\"arrQuiz\"] = $arrQuiz;\n\t\n\n}", "function display_machine_type_edit_form($user, $id=false) {\r\n if (!($id === false)) {\r\n try {\r\n $machineType = new MachineType($user->dbConn, $id);\r\n } catch (Exception $e) {\r\n $id = false;\r\n }\r\n }\r\n echo \"<form action='machine_type.php\".(($id === false) ? \"\" : \"?id=\".intval($id)).\"' method='POST' class='form-horizontal'>\r\n <fieldset>\r\n <div class='control-group'>\r\n <label class='control-label' for='machine_type[name]'>Name</label>\r\n <div class='controls'>\r\n <input name='machine_type[name]' type='text' class='input-xlarge' id='machine_type[name]'\".(($id === false) ? \"\" : \" value='\".escape_output($machineType->name).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='machine_type[description]'>Description</label>\r\n <div class='controls'>\r\n <input name='machine_type[description]' type='text' class='input-xlarge' id='machine_type[description]'\".(($id === false) ? \"\" : \" value='\".escape_output($machineType->description).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='form-actions'>\r\n <button type='submit' class='btn btn-primary'>\".(($id === false) ? \"Add Machine Type\" : \"Save changes\").\"</button>\r\n <a href='#' onClick='window.location.replace(document.referrer);' class='btn'>\".(($id === false) ? \"Go back\" : \"Discard changes\").\"</a>\r\n </div>\r\n </fieldset>\\n</form>\\n\";\r\n}", "function handleAdministration() {\n if (! isset ($_POST[\"adminaction\"])) { // no administration needed\n return;\n }\n\n if (! $_SESSION[\"isadmin\"]) { // user is not admin\n showFrame(\"Příklady může upravovat pouze administrátor!\", false);\n return;\n }\n\n switch ($_POST[\"adminaction\"]) {\n case \"addproblem\":\n addProblem();\n break;\n\n case \"saveproblem\":\n saveProblem();\n break;\n\n case \"deleteproblem\":\n if (! isset ($_POST[\"deletecheck\"])) { // misclick protection\n showFrame(\"Při mazání musí být zaškrtnuto políčko <b>Smazat</b>.\", false);\n return;\n }\n deleteProblem();\n break;\n\n default:\n showFrame(\"Neplatná hodnota položky <b>adminaction</b>\", false);\n return;\n }\n}", "function handle_options()\r\n {\r\n $options = $this->get_options();\r\n \r\n if (isset($_POST['submitted'])) {\r\n \t\t\r\n \t\t//check security\r\n \t\tcheck_admin_referer('snazzy-nonce');\r\n \t\t\r\n $options = array();\r\n \r\n $options['years'] = htmlspecialchars($_POST['years']);\r\n $options['mini'] = $_POST['mini'];\r\n $options['posts'] = $_POST['posts'];\r\n $options['pages'] = $_POST['pages'];\r\n \r\n update_option($this->db_option, $options);\r\n \r\n echo '<div class=\"updated fade\"><p>Plugin settings saved.</p></div>';\r\n }\r\n \r\n $layout = $options['layout'];\r\n $years = stripslashes($options['years']);\r\n $mini = $options['mini'] == 'on' ? 'checked' : '';\r\n $posts = $options['posts'] == 'on' ? 'checked' : '';\r\n $pages = $options['pages'] == 'on' ? 'checked' : '';\r\n \r\n // URL for form submit, equals our current page\r\n $action_url = $_SERVER['REQUEST_URI'];\r\n \r\n include('snazzy-archives-options.php');\r\n }", "function display_machine_edit_form($user, $id=false) {\r\n if (!($id === false)) {\r\n try {\r\n $machine = new Machine($user->dbConn, $id);\r\n } catch (Exception $e) {\r\n $id = false;\r\n }\r\n } \r\n echo \"<form action='machine.php\".(($id === false) ? \"\" : \"?id=\".intval($id)).\"' method='POST' class='form-horizontal'>\\n\".(($id === false) ? \"\" : \"<input type='hidden' name='machine[id]' value='\".intval($id).\"' />\").\"\r\n <fieldset>\r\n <div class='control-group'>\r\n <label class='control-label' for='machine[name]'>Name</label>\r\n <div class='controls'>\r\n <input name='machine[name]' type='text' class='input-xlarge' id='machine[name]'\".(($id === false) ? \"\" : \" value='\".escape_output($machine->name).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='machine[machine_type_id]'>Machine Type</label>\r\n <div class='controls'>\\n\";\r\n display_machine_type_dropdown($user->dbConn, \"machine[machine_type_id]\", ($id === false) ? 0 : $machine->machineType['id']);\r\n echo \" </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='machine[facility_id]'>Facility</label>\r\n <div class='controls'>\r\n <input name='machine[facility_id]' value='\".intval($user->facility['id']).\"' type='hidden' />\r\n <span class='input-xlarge uneditable-input'>\".escape_output($user->facility['name']).\"</span>\r\n </div>\r\n </div>\\n\";\r\n if (!($id === false)) {\r\n if (count($machine->machineParameters) > 0) {\r\n echo \" <div class='control-group'>\r\n <label class='control-label' for='machine[machine_parameters]'>Machine Parameters</label>\r\n <div class='controls'>\\n\";\r\n foreach ($machine->machineParameters as $machineParameter) {\r\n echo \" <div class='control-group'>\r\n <label class='control-label' for='machine[machine_parameters][\".intval($machineParameter->machineTypeAttribute['id']).\"][value]'>\".escape_output($machineParameter->machineTypeAttribute['name']).\"</label>\\n\";\r\n $jsonArray = json_decode($machineParameter->value, true);\r\n if ($jsonArray == null) {\r\n echo \" <input name='machine[machine_parameters][\".intval($machineParameter->machineTypeAttribute['id']).\"][value]' value='\".escape_output($machineParameter->value).\"' />\\n\";\r\n } else {\r\n echo \" <div class='controls'>\\n\";\r\n foreach ($jsonArray as $key=>$value) {\r\n echo \" <label class='control-label' for='machine[machine_parameters][\".intval($machineParameter->machineTypeAttribute['id']).\"][\".escape_output($key).\"]'>\".escape_output($key).\"</label>\r\n <div class='controls'>\r\n <input name='machine[machine_parameters][\".intval($machineParameter->machineTypeAttribute['id']).\"][\".escape_output($key).\"]' value='\".escape_output($value).\"' />\r\n </div><br />\\n\";\r\n }\r\n echo \" </div>\\n\";\r\n }\r\n echo \" </div>\\n\";\r\n }\r\n echo \" </div>\\n\";\r\n }\r\n }\r\n echo \" <div class='form-actions'>\r\n <button type='submit' class='btn btn-primary'>\".(($id === false) ? \"Add Machine\" : \"Save changes\").\"</button>\r\n <a href='#' onClick='window.location.replace(document.referrer);' class='btn'>\".(($id === false) ? \"Go back\" : \"Discard changes\").\"</a>\r\n </div>\r\n </fieldset>\\n</form>\\n\";\r\n}", "public function hookConfigForm() {\n\t\trequire IIIF_API_BRIDGE_DIRECTORY . '/config_form.php';\n\t}", "function abook_create_form($form_url, $name, $title, $button,\n $backend, $defdata=array()) {\n\n global $oTemplate;\n\n $output = addForm($form_url, 'post', 'f_add', '', '', array(), TRUE);\n\n if ($button == _(\"Update address\")) {\n $edit = true;\n $backends = NULL;\n } else {\n $edit = false;\n $backends = getWritableBackends();\n }\n \n $fields = array (\n 'nickname' => 'NickName',\n 'firstname' => 'FirstName',\n 'lastname' => 'LastName',\n 'email' => 'Email',\n 'label' => 'Info',\n );\n $values = array();\n foreach ($fields as $sqm=>$template) {\n $values[$template] = isset($defdata[$sqm]) ? $defdata[$sqm] : '';\n }\n \n $oTemplate->assign('writable_backends', $backends);\n $oTemplate->assign('values', $values);\n $oTemplate->assign('edit', $edit);\n $oTemplate->assign('current_backend', $backend);\n \n $output .= $oTemplate->fetch('addrbook_addedit.tpl');\n\n return $output;\n}", "public function add_client_controller() {\n $dni = clientModel::clean_string($_POST['cliente_dni_reg']);\n $nombre = clientModel::clean_string($_POST['cliente_nombre_reg']);\n $apellido = clientModel::clean_string($_POST['cliente_apellido_reg']);\n $telefono = clientModel::clean_string($_POST['cliente_telefono_reg']);\n $direccion = clientModel::clean_string($_POST['cliente_direccion_reg']);\n\n // Check empty fields\n if ($dni == \"\" || $nombre == \"\" || $apellido == \"\" ||\n $telefono == \"\" || $direccion == \"\") {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrió un error inesperado\",\n \"No has llenado todos los campos requeridos\");\n return $res;\n }\n\n // Check data's integrity\n // Check DNI\n if (clientModel::check_data(\"[0-9]{8}[-]{1}[TRWAechoGMYFPDXBNJZSQVHLCKE]{1}\", $dni)) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Formato de DNI erróneo\",\n \"El DNI no coincide con el formato solicitado.\");\n return $res;\n }\n\n // Check first name\n if (clientModel::check_data(\"[a-zA-ZáéíóúÁÉÍÓÚñÑ ]{1,40}\", $nombre)) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Formato de Nombre erróneo\",\n \"El Nombre no coincide con el formato solicitado.\");\n return $res;\n }\n\n // Check last name\n if (clientModel::check_data(\"[a-zA-ZáéíóúÁÉÍÓÚñÑ ]{1,40}\", $apellido)) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Formato de Apellido erróneo\",\n \"El Apellido no coincide con el formato solicitado.\");\n return $res;\n }\n\n // Check phone\n if (clientModel::check_data(\"[0-9()+]{9,20}\", $telefono)) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Formato de Telefono erróneo\",\n \"El Telefono no coincide con el formato solicitado.\");\n return $res;\n }\n\n // Check address\n if (clientModel::check_data(\"[a-zA-Z0-9áéíóúÁÉÍÓÚñÑ().,#\\- ]{1,190}\", $direccion)){\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Formato de Dirección erróneo\",\n \"La Dirección no coincide coon el formato solicitado.\");\n return $res;\n }\n\n // Check DNI as unique data in database\n $query = clientModel::execute_simple_query(\"SELECT cliente_dni\n FROM cliente\n WHERE cliente_dni = '$dni'\");\n if ($query->rowCount() > 0) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado\",\n \"¡Ya existe un cliente con este DNI registrado en el sistema!\");\n return $res;\n }\n\n $data_client_reg = [\n \"dni\" => $dni,\n \"nombre\" => $nombre,\n \"apellido\" => $apellido,\n \"telefono\" => $telefono,\n \"direccion\" => $direccion\n ];\n\n $query = clientModel::add_client_model($data_client_reg);\n\n if ($query->rowCount() == 1) {\n $res = clientModel::message_with_parameters(\"clean\", \"success\", \"Cliente registrado\",\n \"Los datos del usuario han sido registrados con éxito.\");\n } else {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrio un error inesperado\",\n \"No hemos podido registrar el cliente.\");\n }\n return $res;\n }", "abstract protected function _setNewForm();", "function addCondoHandler() {\n global $inputs;\n\n $lastId = insert('condo',[\n 'name' => $inputs['name'],\n 'area' => $inputs['area'],\n 'cost' => $inputs['cost'],\n ]);\n\n insert('condo_building', [\n 'condo_id' => $lastId,\n 'building_id' => getLogin()['bid'],\n ]);\n\n formatOutput(true, 'add success');\n}", "function cliente_form($azione=\"\", $id_cli=\"\"){\n\t\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$str=\"\";\n\tif ($azione==\"mod\") {\n\t\t$q_mod=\"SELECT * FROM cliente WHERE id_cli = $id_cli\";\n\t\t$r_mod=$db->query($q_mod);\n\t\t$ro_mod=mysql_fetch_array($r_mod);\n\t}\t\n\t$str.= \"<div class=\\\"clienti\\\">\\n\";\n\t$str.=\"<form method=\\\"POST\\\" action=\\\"cliente_save.php\\\" onsubmit=\\\"return checkForm();\\\">\\n\";\n\t$str.=\"<input type=\\\"hidden\\\" name=\\\"azione\\\" value=\\\"\";\n\t$str.= $azione;\n\t$str.= \"\\\">\\n\";\n\tif ($azione==\"mod\") {\n\t\t$str.=\"<input type=\\\"hidden\\\" name=\\\"id_cli\\\" value=\\\"\";\n\t\t$str.= $id_cli;\n\t\t$str.= \"\\\">\\n\";\n\t}\t\n\t$str.= \"<TABLE id=\\\"clienti\\\">\\n\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Tipo di Cliente\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select id=\\\"id_tipo_cliente\\\" size=\\\"1\\\" name=\\\"id_tipo_cliente\\\">\\n\";\n\t$str.=\"<option value=\\\"\\\">Scegli</option>\\n\";\n\t$q = \"SELECT * FROM tipo_cliente\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\t\n\t\tif ($azione==\"mod\" and $ro['id_tipo_cliente']==$ro_mod['id_tipo_cliente']) {\n\t\t\t$sel=\"Selected\";\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_tipo_cliente'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\n\t}\n\t$str.=\"</select>\\n\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Nominativo\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"nominativo\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['nominativo'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"E-Mail\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"email\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['email'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Codice Fiscale\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"codfis\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['codfisc'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Citt&agrave;\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select size=\\\"1\\\" name=\\\"id_citta\\\">\\n\";\n\t$str.=\"<option value=\\\"\\\">Scegli</option>\\n\";\n\t$q = \"SELECT * FROM citta order by nome asc\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\tif ( $azione ==\"mod\" and $ro['id_citta']==$ro_mod['id_citta']) {\n\t\t\t$sel=\"Selected\";\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_citta'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\t}\n\t$str.=\"</select>\\n\";\n\t$str.=\" Nuova:\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"new_citta\\\" value=\\\"\\\" size=\\\"20\\\"/>\\n\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"<TR>\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t$str.= \"Via\";\n\t$str.= \"</TD>\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"via\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['via'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"<TR>\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t$str.= \"Telefono Fisso\";\n\t$str.= \"</TD>\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"fisso\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['tel_fisso'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"<TR>\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t$str.= \"Cellulare\";\n\t$str.= \"</TD>\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"mobile\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['tel_mobile'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"<TR>\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t$str.= \"Nota\";\n\t$str.= \"</TD>\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"nota\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['nota'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"<TR>\";\n\t$str.= \"<TD colspan=\\\"2\\\" align=\\\"center\\\">\";\n\t$str.= \"<input type=\\\"submit\\\" value=\\\"Submit\\\" class=\\\"buttonSubmit\\\" />\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"</TABLE>\";\n\t$str.=\"</form>\";\n\t$str.=\"</div>\";\n\n\t\n\treturn $str;\n}", "function room_reservations_admin_settings_sms_add_submit($form_id, &$form_state) {\n if ($form_state['clicked_button']['#value'] == t('Add')) {\n $carrier = $form_state['values']['carrier'];\n $domain = $form_state['values']['domain'];\n $sql = \"\n INSERT INTO {room_reservations_variables}\n (name, value)\n VALUES ('%s', '%s')\n \";\n $result = db_query($sql, 'carrier', $carrier . '~' . $domain);\n if (!$result) {\n drupal_set_message(t('The wireless carrier could not be added.'), \n 'error');\n }\n else {\n drupal_set_message(t('The wireless carrier has been added.'));\n }\n }\n}", "public function initDbSlaveForm()\n\t{\n\t\tglobal $lng, $ilCtrl, $ilDB;\n\n\t\t$client = $this->setup->getClient();\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t// db type\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"db_type\"), \"slave_type\");\n\t\t$ne->setValue($lng->txt(\"db_\".$ilDB->getDbType()));\n\t\t$this->form->addItem($ne);\n\n\t\t// activate slave\n\t\t$act = new ilCheckboxInputGUI($this->lng->txt(\"db_active\"), \"slave_active\");\n\t\t$act->setChecked($client->getDbSlaveActive());\n\t\t$this->form->addItem($act);\n\n\t\t// slave host\n\t\t$ti = new ilTextInputGUI($lng->txt(\"db_host\"), \"slave_host\");\n\t\t$ti->setValue($client->getDbSlaveHost());\n\t\t$ti->setMaxLength(120);\n\t\t$ti->setRequired(true);\n\t\t$act->addSubItem($ti);\n\n\t\t// slave name\n\t\t$ti = new ilTextInputGUI($lng->txt(\"db_name\"), \"slave_name\");\n\t\t$ti->setValue($client->getDbSlaveName());\n\t\t$ti->setRequired(true);\n\t\t$ti->setMaxLength(40);\n\t\t$act->addSubItem($ti);\n\n\t\t// slave user\n\t\t$ti = new ilTextInputGUI($lng->txt(\"db_user\"), \"slave_user\");\n\t\t$ti->setValue($client->getDbSlaveUser());\n\t\t$ti->setMaxLength(40);\n\t\t$ti->setRequired(true);\n\t\t$act->addSubItem($ti);\n\n\t\t// slave port\n\t\t$ti = new ilTextInputGUI($lng->txt(\"db_port\"), \"slave_port\");\n\t\t$ti->setValue($client->getDbSlavePort());\n\t\t$ti->setMaxLength(8);\n\t\t$act->addSubItem($ti);\n\n\t\t// set password\n\t\t$set_pw = new ilCheckboxInputGUI($this->lng->txt(\"db_set_password\"), \"set_slave_password\");\n\t\t$act->addSubItem($set_pw);\n\n\t\t// slave password\n\t\t$ti = new ilTextInputGUI($lng->txt(\"db_pass\"), \"slave_pass\");\n\t\t$ti->setMaxLength(40);\n\t\t$set_pw->addSubItem($ti);\n\n\t\t$this->form->addCommandButton(\"saveDbSlave\", $lng->txt(\"save\"));\n\n\t\t$this->form->setTitle($lng->txt(\"db_slave_settings\"));\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "public function server_admin() {\n\n\t\tif ( defined( 'EDD_RI_IS_SERVER' ) && EDD_RI_IS_SERVER ) {\n\t\t\tif ( ! class_exists( 'EDD_RI', false ) ) {\n\t\t\t\trequire( __DIR__ . '/server/class-EDD_RI.php' );\n\t\t\t}\n\n\t\t\tEDD_RI::init();\n\t\t}\n\t}", "function editAdminHandler() {\n global $inputs;\n\n updateDb('admin',[\n 'name' => $inputs['admin_username'],\n 'password' => $inputs['admin_password'],\n ], [\n 'id' => $inputs['id']\n ]);\n\n updateDb('admin_building',[\n 'building_id' => $inputs['admin_building'],\n ], [\n 'admin_id' => $inputs['id']\n ]);\n\n formatOutput(true, 'update success');\n}", "abstract function setupform();", "public function uultra_load_wdiget_addition_form()\r\n\t{\r\n\t\t$html = '';\r\n\t\t$html .= '<div class=\"uultra-adm-widget-cont-add-new\" >';\r\n \r\n\t\t$html .= '<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=\"50%\"> '.__(\"Name: \",'xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\"><input name=\"uultra_add_mod_widget_title\" type=\"text\" id=\"uultra_add_mod_widget_title\" style=\"width:120px\" /> \r\n\t\t </td>\r\n\t\t </tr>\r\n\t\t <tr>\r\n\t\t\t\t<td width=\"50%\"> '.__('Type:','xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\">\r\n\t\t\t\t<select name=\"uultra_add_mod_widget_type\" id=\"uultra_add_mod_widget_type\" size=\"1\">\r\n\t\t\t\t <option value=\"\" selected=\"selected\">'.__(\"Select Type: \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"1\">'.__(\"Text: \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"2\">Shortcode</option>\r\n\t\t\t\t</select>\r\n\r\n\t\t </td>\r\n\t\t\t </tr>\r\n\t\t<tr>\r\n\t\t\t\t<td width=\"50%\"> '.__('Editable by user:','xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\">\r\n\t\t\t\t<select name=\"uultra_add_mod_widget_editable\" id=\"uultra_add_mod_widget_editable\" size=\"1\">\r\n\t\t\t\t \r\n\t\t\t\t <option value=\"0\" selected=\"selected\">'.__(\"NO \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"1\">'.__(\"YES\",'xoousers').'</option>\r\n\t\t\t\t</select>\r\n\r\n\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t<td>'.__('Content:','xoousers').'</td>\r\n\t\t\t\t<td>&nbsp;</textarea> \r\n\t\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t\r\n\t\t\t\t<td colspan=\"2\"><textarea name=\"uultra_add_mod_widget_content\" id=\"uultra_add_mod_widget_content\" style=\"width:98%;\" rows=\"5\"></textarea> \r\n\t\t\t </td>\r\n\t\t\t </tr> \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t</table> '; \t\t\t\r\n\t\t\t \r\n\t\t\t$html .= ' <p class=\"submit\">\r\n\t\t\t\t\t<input type=\"button\" name=\"submit\" class=\"button uultra-widgets-add-new-close\" value=\"'.__('Close','xoousers').'\" /> <input type=\"button\" name=\"submit\" class=\"button button-primary uultra-widgets-add-new-confirm\" value=\"'.__('Submit','xoousers').'\" /> <span id=\"uultra-add-new-widget-m-w\" ></span>\r\n\t\t\t\t</p> ';\r\n\t\t\t\t\r\n\t\t\t$html .= '</div>';\r\n\t\t\t\t\r\n\t\t\techo $html;\r\n\t\t\tdie();\r\n\t\r\n\t}", "function ca_services_admin_settings_form() {\n $form = array();\n\n $form['ca_services_list'] = array(\n '#type' => 'select',\n '#title' => t('Services\\'s List Template'),\n '#options' => array(\n 'ca_services_list_template_one' => t('Template One'),\n 'ca_services_list_template_two' => t('Template Two'),\n 'ca_services_list_template_three' => t('Template Three'),\n ),\n '#default_value' => variable_get('ca_services_list_template', 'ca_services_list_template_one'),\n '#required' => TRUE,\n );\n $form['ca_services_node'] = array(\n '#type' => 'select',\n '#title' => t('Services\\'s Node Template'),\n '#options' => array(\n 'ca_services_node_template_one' => t('Template One'),\n 'ca_services_node_template_two' => t('Template Two'),\n 'ca_services_node_template_three' => t('Template Three'),\n ),\n '#default_value' => variable_get('ca_services_node_template', 'ca_services_node_template_one'),\n '#required' => TRUE,\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#submit' => array('ca_services_admin_settings_form_submit'),\n );\n\n return $form;\n}", "function ca_services_admin_settings_form_submit($form, &$form_state) {\n variable_set('ca_services_list_template', $form_state['values']['ca_services_list']);\n variable_set('ca_services_node_template', $form_state['values']['ca_services_node']);\n drupal_set_message('Configuration has been saved.');\n}", "function display_form_edit_form($user, $id=false) {\r\n if (!($id === false)) {\r\n try {\r\n $form = new Form($user->dbConn, $id);\r\n } catch (Exception $e) {\r\n $id = false;\r\n }\r\n }\r\n echo \"<form action='form.php\".(($id === false) ? \"\" : \"?id=\".intval($id)).\"' method='POST' class='form-horizontal'>\r\n <fieldset>\\n\".(($id === false) ? \"\" : \"<input type='hidden' name='form[id]' value='\".intval($id).\"' />\").\"\r\n <div class='control-group'>\r\n <label class='control-label' for='form[name]'>Name</label>\r\n <div class='controls'>\r\n <input name='form[name]' type='text' class='input-xlarge' id='form[name]'\".(($id === false) ? \"\" : \" value='\".escape_output($form->name).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='form[description]'>Description</label>\r\n <div class='controls'>\r\n <input name='form[description]' type='text' class='input-xlarge' id='form[description]'\".(($id === false) ? \"\" : \" value='\".escape_output($form->description).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='form[form_type_id]'>Type</label>\r\n <div class='controls'>\r\n \";\r\n display_form_type_dropdown($user->dbConn, \"form[form_type_id]\", (($id === false) ? 0 : intval($form->formType['id'])));\r\n echo \" </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='form[machine_type_id]'>Machine Type</label>\r\n <div class='controls'>\r\n \";\r\n display_machine_type_dropdown($user->dbConn, \"form[machine_type_id]\", (($id === false) ? 0 : intval($form->machineType['id'])));\r\n echo \" </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='form[js]'>Javascript</label>\r\n <div class='controls'>\r\n <textarea class='input-xlarge' id='form[js]' name='form[js]' cols='500' rows='10'>\".(($id === false) ? \"\" : escape_output($form->js)).\"</textarea>\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='form[php]'>PHP</label>\r\n <div class='controls'>\r\n <textarea class='input-xlarge' id='form[php]' name='form[php]' cols='500' rows='10'>\".(($id === false) ? \"\" : escape_output($form->php)).\"</textarea>\r\n </div>\r\n </div>\r\n <div class='form-actions'>\r\n <button type='submit' class='btn btn-primary'>\".(($id === false) ? \"Create form\" : \"Save changes\").\"</button>\r\n <a href='#' onClick='window.location.replace(document.referrer);' class='btn'>\".(($id === false) ? \"Go back\" : \"Discard changes\").\"</a>\r\n </div>\r\n </fieldset>\\n</form>\\n\";\r\n}", "function add_cmd()\n\t{\n\t\tif(User::can_add(false,ANY_CATEGORY))\n\t\t{\n\t\t\trequire_once 'forms/edit.php';\n\t\t\t$this->add_form(new EditManageHelpForm());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tUrl::redirect_current();\n\t\t}\n\t}", "public function hookConfigForm() {\n }", "function qform_manage($def, $cfg, $title = array())\n{\n global $config, $txt;\n\n $cmd = get_param('qform_cmd');\n $id = get_param('id');\n\n // get cmd from POST\n if (empty($cmd)) {\n $cmd = post_param('qform_cmd');\n }\n if (empty($id)) {\n $id = post_param('primary_val');\n }\n\n // manage cmd\n if (empty($cmd)) {\n $cmd = $cfg['cmd_default'];\n }\n if (!empty($id)) {\n $cmd = 'update';\n }\n if (post_param('qform_process')) {\n $cmd = 'process';\n }\t\t// id not required for NEW cmd\n\n // logging\n if (!isset($cfg['enable_log'])) {\n $cfg['enable_log'] = $config['enable_qform_log'];\n }\n if (!isset($cfg['detailed_log'])) {\n $cfg['detailed_log'] = $config['enable_detailed_log'];\n }\n if (empty($cfg['log_title'])) {\n $cfg['enable_log'] = $cfg['detailed_log'] = '';\n }\n\n // default vars\n if (!isset($cfg['pre_process'])) {\n $cfg['pre_process'] = '';\n }\n if (!isset($cfg['auto_save_changes'])) {\n $cfg['auto_save_changes'] = true;\n }\n if (!isset($cfg['update_ignore_value'])) {\n $cfg['update_ignore_value'] = false;\n }\n if (!isset($cfg['cmd_save_enable'])) {\n $cfg['cmd_save_enable'] = true;\n }\n\n switch ($cmd) {\n case 'search':\n if (function_exists($cfg['pre_process'])) {\n call_user_func($cfg['pre_process'], 'search', false);\n }\n $cfg['title'] = empty($title['search']) ? 'Search' : $title['search'];\n if ($cfg['cmd_search_enable']) {\n return qform_search($def, $cfg);\n } else {\n just_die('Search disabled!');\n }\n break;\n\n\n case 'list':\n if (function_exists($cfg['pre_process'])) {\n call_user_func($cfg['pre_process'], 'list', false);\n }\n $cfg['title'] = empty($title['list']) ? 'List' : $title['list'];\n if ($cfg['cmd_list_enable']) {\n return qform_list($def, $cfg);\n } else {\n just_die('List disabled!');\n }\n break;\n\n\n case 'new':\n if (function_exists($cfg['pre_process'])) {\n call_user_func($cfg['pre_process'], 'new', false);\n }\n $cfg['title'] = empty($title['new']) ? 'New Item' : $title['new'];\n if ($cfg['cmd_new_enable']) {\n $cfg['cmd'] = 'new';\t\t\t\t\t// cmd: new, update, search\n $output = qform_compile($def, $cfg);\n return $output;\n } else {\n just_die('New item not allowed.');\n }\n break;\n\n\n case 'update':\n $cfg['title'] = empty($title['update']) ? 'Update Item' : $title['update'];\n if ($cfg['cmd_update_enable']) {\n $cfg['cmd'] = 'update';\n $cfg['primary_val'] = get_param('id');\n if (function_exists($cfg['pre_process'])) {\n call_user_func($cfg['pre_process'], 'update', $id);\n }\n $output = qform_compile($def, $cfg);\n return $output;\n } else {\n just_die('Item update not allowed.');\n }\n break;\n\n\n case 'process':\n $id = post_param('primary_val');\n if (!$cfg['cmd_new_enable'] && !$id) {\n just_die('New not allowed');\n }\n if (!$cfg['cmd_update_enable'] && $id) {\n just_die('Edit not allowed');\n }\n if (!$cfg['cmd_save_enable'] && $id) {\n just_die('Save not allowed');\n }\n if (function_exists($cfg['pre_process'])) {\n call_user_func($cfg['pre_process'], $id ? 'update' : 'new', $id);\n }\n $output = qform_process($def, $cfg);\n if (!$cfg['auto_save_changes']) {\n return $output;\n }\n break;\n\n\n case 'remove_item':\n if ($cfg['cmd_remove_enable']) {\n $cfg['cmd'] = 'remove_item';\n $id = get_param('primary_val');\n if (function_exists($cfg['pre_process'])) {\n call_user_func($cfg['pre_process'], 'remove_item', $id);\n }\n if (!$cfg['auto_save_changes']) {\n return array('qqq');\n }\n qform_remove_item($def, $cfg);\n } else {\n just_die('Item removal not allowed.');\n }\n break;\n\n\n case 'remove_file':\n $id = get_param('primary_val');\n $cfg['cmd'] = 'remove_file';\n if (function_exists($cfg['pre_process'])) {\n call_user_func($cfg['pre_process'], 'remove_file', $id);\n }\n qform_remove_file($def, $cfg);\n break;\n\n\n default:\n just_die('Unknown command type of <b>'.$cmd.'</b>!');\n break;\n }\n}", "function server_admin_default(){\r\n\t// add server\r\n\r\n\t$ajax = func_arg(0);\r\n\r\n\t// dapatkan semua level dari Assets.Level\r\n\t$lilo_mongo = new LiloMongo();\r\n\t$lilo_mongo->selectDB('Servers');\r\n\t$lilo_mongo->selectCollection('GameServer');\r\n\r\n\t$server_array = $lilo_mongo->find();\r\n\r\n\t$html = '';\r\n\t$template = new Template();\r\n\t$template->basepath = $_SESSION['basepath'];\r\n\t\r\n\t$template->server_array = $server_array;\r\n\r\n\t$html = $template->render(\"modules/010_game_server_management/templates/server_admin_default.php\");\r\n\tif(trim($ajax) == 'ajax'){\r\n\t\t\r\n\t} else {\r\n\t\t$html = ui_admin_default(NULL, $html);\r\n\t}\r\n\r\n\treturn $html;\r\n\t\r\n}", "function displayClientInsertForm($errorMessages, $missingFields, $client, $contact) {\n\tif ($errorMessages) {\n\t\tforeach($errorMessages as $errorMessage) {\n\t\t\techo $errorMessage;\n\t\t}\n\t}\n\t\n\t\n\t\t\t\n?>\n\t<section class=\"content\">\n <!--added because we need the information to be submitted in a form-->\n <form action=\"<?php echo htmlentities( $_SERVER['PHP_SELF'] ); ?>\" method=\"post\" style=\"margin-bottom:50px;\" enctype=\"multipart/form-data\">\n <input type=\"hidden\" name=\"action\" value=\"client-add\"/>\n <!--end add-->\n\t\t<figure class=\"client-logo l-col-20\">\n\t\t\t<img class=\"client-logo-img small\" src=\" <?php echo \"images/default.jpg\"?>\" title=\"Client/Company name logo\" alt=\"Client/Company name logo\" />\n\t\t\t<fieldset class=\"client-logo-upload\">\n\t\t\t\t<legend class=\"client-logo-title\">Upload Client Logo</legend>\n\t\t\t\t<header class=\"client-logo-header\">\n\t\t\t\t\t<h1 class=\"client-logo-title\">Upload Client Logo</h1>\n\t\t\t\t</header>\n\t\t\t\t<input id=\"client-logo-file\" name=\"client-logo-file\" class=\"client-logo-file\" type=\"file\" value=\"Browse\" />\n\t\t\t\t<input id=\"client-logo-upload-btn\" name=\"client-logo-upload-btn\" class=\"client-logo-upload-btn\" type=\"button\" value=\"Upload\" /> or <a class=\"\" href=\"#\">Cancel</a>\n\t\t\t</fieldset>\n\t\t</figure>\n\t\t<section class=\"client-detail l-col-80\">\n \t<fieldset class=\"client-details-entry\">\n\t\t\t\t<legend class=\"client-details-title\">Enter client details:</legend>\n\t\t\t\t<header class=\"client-details-header\">\n\t\t\t\t\t<h1 class=\"client-details-title\">Enter client details:</h1>\n\t\t\t\t\t<h4 class=\"required\">= Required</h4>\n\t\t\t\t</header>\n\t\t\t\t<ul class=\"details-list client-details-list\">\n\t\t \t\t\t<li class=\"client-details-item name\">\n\t\t\t\t\t\t<label for=\"client-name\" <?php validateField(\"client_name\", $missingFields)?> class=\"client-details-label\">Client's name:</label>\n\t\t\t\t\t\t<input id=\"client-name\" name=\"client-name\" class=\"client-name-input\" type=\"text\" tabindex=\"1\" value=\"<?php echo $client->getValueEncoded(\"client_name\")?>\" /><br />\n\t\t\t\t\t\t<label for=\"contact-info-sync\" class=\"client-details-label\">Client and contact the same:</label>\n\t\t\t\t\t\t<input id=\"contact-info-sync\" name=\"contact-info-sync\" class=\"contact-info-sync-input\" type=\"checkbox\" tabindex=\"11\" value=\"info-sync\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"client-details-item phoneNum\">\n\t\t\t\t\t\t<label for=\"client-phone\" class=\"client-details-label\">Phone number:</label>\n\t\t\t\t\t\t<input id=\"client-phone\" name=\"client-phone\" class=\"client-phone-input\" type=\"text\" tabindex=\"2\" value=\"<?php echo $client->getValueEncoded(\"client_phone\")?>\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"client-details-item email\">\n\t\t\t\t\t\t<label for=\"client-email\" <?php validateField(\"client_email\", $missingFields)?> class=\"client-details-label\">Email address:</label>\n\t\t\t\t\t\t<input id=\"client-email\" name=\"client-email\" class=\"client-email-input\" type=\"text\" tabindex=\"3\" value=\"<?php echo $client->getValueEncoded(\"client_email\")?>\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"client-details-item fax\">\n\t\t\t\t\t\t<label for=\"client-fax\" class=\"client-details-label\">Fax number:</label>\n\t\t\t\t\t\t<input id=\"client-fax\" name=\"client-fax\" class=\"client-fax-input\" type=\"text\" tabindex=\"4\" value=\"\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"client-details-item address\">\n\t\t\t\t\t\t<label for=\"client-streetAddress\" <?php validateField(\"client_address\", $missingFields)?> class=\"client-details-label\">Street Address:</label>\n\t\t\t\t\t\t<textarea id=\"client-streetAddress\" name=\"client-streetAddress\" class=\"client-streetAddress-input\" tabindex=\"5\"><?php echo $client->getValueEncoded(\"client_address\")?></textarea><br />\n\t\t\t\t\t\t<label for=\"client-city\" <?php validateField(\"client_city\", $missingFields)?> class=\"client-details-label\">City:</label>\n\t\t\t\t\t\t<input id=\"client-city\" name=\"client-city\" class=\"client-city-input\" type=\"text\" tabindex=\"6\" value=\"<?php echo $client->getValueEncoded(\"client_city\")?>\" /><br />\n\t\t\t\t\t\t<label for=\"client-state\" <?php validateField(\"client_state\", $missingFields)?> class=\"client-details-label\">State:</label>\n\t\t\t\t\t\t<select id=\"client-state\" name=\"client-state\" class=\"client-state-select\" tabindex=\"7\">\n\t\t\t\t\t\t\t<option selected=\"selected\" value=\"default\">Select state</option>\n\t\t\t\t\t\t\t<option value=\"AL\">Alabama</option>\n\t\t\t\t\t\t\t<option value=\"AK\">Alaska</option>\n\t\t\t\t\t\t\t<option value=\"AZ\">Arizona</option>\n\t\t\t\t\t\t\t<option value=\"AR\">Arkansas</option>\n\t\t\t\t\t\t\t<option value=\"CA\">California</option>\n\t\t\t\t\t\t\t<option value=\"CO\">Colorado</option>\n\t\t\t\t\t\t\t<option value=\"CT\">Connecticut</option>\n\t\t\t\t\t\t\t<option value=\"DE\">Delaware</option>\n\t\t\t\t\t\t\t<option value=\"FL\">Florida</option>\n\t\t\t\t\t\t\t<option value=\"GA\">Georgia</option>\n\t\t\t\t\t\t\t<option value=\"HI\">Hawaii</option>\n\t\t\t\t\t\t\t<option value=\"ID\">Idaho</option>\n\t\t\t\t\t\t\t<option value=\"IL\">Illinois</option>\n\t\t\t\t\t\t\t<option value=\"IN\">Indiana</option>\n\t\t\t\t\t\t\t<option value=\"IA\">Iowa</option>\n\t\t\t\t\t\t\t<option value=\"KS\">Kansas</option>\n\t\t\t\t\t\t\t<option value=\"KY\">Kentucky</option>\n\t\t\t\t\t\t\t<option value=\"LA\">Louisiana</option>\n\t\t\t\t\t\t\t<option value=\"ME\">Maine</option>\n\t\t\t\t\t\t\t<option value=\"MD\">Maryland</option>\n\t\t\t\t\t\t\t<option value=\"MA\">Massachusetts</option>\n\t\t\t\t\t\t\t<option value=\"MI\">Michigan</option>\n\t\t\t\t\t\t\t<option value=\"MN\">Minnesota</option>\n\t\t\t\t\t\t\t<option value=\"MS\">Mississippi</option>\n\t\t\t\t\t\t\t<option value=\"MO\">Missouri</option>\n\t\t\t\t\t\t\t<option value=\"MT\">Montana</option>\n\t\t\t\t\t\t\t<option value=\"NE\">Nebraska</option>\n\t\t\t\t\t\t\t<option value=\"NV\">Nevada</option>\n\t\t\t\t\t\t\t<option value=\"NH\">New Hampshire</option>\n\t\t\t\t\t\t\t<option value=\"NJ\">New Jersey</option>\n\t\t\t\t\t\t\t<option value=\"NM\">New Mexico</option>\n\t\t\t\t\t\t\t<option value=\"NY\">New York</option>\n\t\t\t\t\t\t\t<option value=\"NC\">North Carolina</option>\n\t\t\t\t\t\t\t<option value=\"ND\">North Dakota</option>\n\t\t\t\t\t\t\t<option value=\"OH\">Ohio</option>\n\t\t\t\t\t\t\t<option value=\"OK\">Oklahoma</option>\n\t\t\t\t\t\t\t<option value=\"OR\">Oregon</option>\n\t\t\t\t\t\t\t<option value=\"PA\">Pennsylvania</option>\n\t\t\t\t\t\t\t<option value=\"RI\">Rhode Island</option>\n\t\t\t\t\t\t\t<option value=\"SC\">South Carolina</option>\n\t\t\t\t\t\t\t<option value=\"SD\">South Dakota</option>\n\t\t\t\t\t\t\t<option value=\"TN\">Tennessee</option>\n\t\t\t\t\t\t\t<option value=\"TX\">Texas</option>\n\t\t\t\t\t\t\t<option value=\"UT\">Utah</option>\n\t\t\t\t\t\t\t<option value=\"VT\">Vermont</option>\n\t\t\t\t\t\t\t<option value=\"VA\">Virginia</option>\n\t\t\t\t\t\t\t<option value=\"WA\">Washington</option>\n\t\t\t\t\t\t\t<option value=\"WV\">West Virginia</option>\n\t\t\t\t\t\t\t<option value=\"WI\">Wisconsin</option>\n\t\t\t\t\t\t\t<option value=\"WY\">Wyoming</option>\n\t\t\t\t\t\t\t<option value=\"DC\">Washington DC</option>\n\t\t\t\t\t\t\t<option value=\"PR\">Puerto Rico</option>\n\t\t\t\t\t\t\t<option value=\"VI\">U.S. Virgin Islands</option>\n\t\t\t\t\t\t\t<option value=\"AS\">American Samoa</option>\n\t\t\t\t\t\t\t<option value=\"GU\">Guam</option>\n\t\t\t\t\t\t\t<option value=\"MP\">Northern Mariana Islands</option>\n\t\t\t\t\t\t</select><br />\n\t\t\t\t\t\t<label for=\"client-zip\" <?php validateField(\"client_zip\", $missingFields)?> class=\"client-details-label\">Zip code:</label>\n\t\t\t\t\t\t<input id=\"client-zip\" name=\"client-zip\" class=\"client-zip-input\" type=\"text\" tabindex=\"8\" value=\"<?php echo $client->getValueEncoded(\"client_zip\")?>\" /><br />\n\t\t\t\t\t\t<label for=\"client-country\" class=\"client-details-label\">Client's country:</label>\n\t\t\t\t\t\t<select id=\"client-country\" name=\"client-country\" class=\"client-country-select\" tabindex=\"9\">\n\t\t\t\t\t\t\t<option value=\"\">Select client's country...</option>\n\t\t\t\t\t\t\t<option selected=\"selected\" value=\"US\">United States of America</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</li>\n <?php \n\t\t\t\t\t\t//get the currencies out to populate the drop down.\n\t\t\t\t\t\t$currency = Client::getCurrency();\n\t\t\t\t\t?>\n\t\t\t\t\t<li class=\"client-details-item currency\">\n\t\t\t\t\t\t<label for=\"client-currency\" class=\"client-details-label\">Preferred currency:</label>\n <select name=\"client_currency_index\" id=\"client_currency_index\" size=\"1\"> \n\t\t\t\t\t\t<?php foreach ($currency as $currencies) { ?>\n \t\t\t\t\t\t\t<option value=\"<?php echo $currencies[\"client_currency_index\"] ?>\"<?php setSelected($client, \"client_currency_index\", $currencies[\"client_currency_index\"]) ?>><?php echo $currencies[\"client_preferred_currency\"]?></option>\n \t\t\t\t\t<?php } ?>\n </select><br />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</fieldset>\n\t\t\t<fieldset class=\"contact-details-entry\">\n\t\t\t\t<legend class=\"contact-details-title\">Enter contact details:</legend>\n\t\t\t\t<h4 class=\"required\">= Required</h4>\n\t\t\t\t<ul class=\"details-list client-details-list\">\n\t\t\t\t\t<li class=\"client-details-item name\">\n\t\t\t\t\t\t<label for=\"contact-name\" <?php validateField(\"contact_name\", $missingFields)?> class=\"client-details-label\">Your contact's name:</label>\n\t\t\t\t\t\t<input id=\"contact-name\" name=\"contact-name\" class=\"contact-contact-info-input\" type=\"text\" tabindex=\"12\" value=\"<?php echo $contact->getValueEncoded(\"contact_name\")?>\" /><br />\n\t\t\t\t\t\t<label for=\"contact-primary\" class=\"client-details-label\">This the primary contact: </label>\n\t\t\t\t\t\t<input id=\"contact-primary\" name=\"contact-primary\" class=\"contact-info-input\" type=\"checkbox\" checked=\"checked\" tabindex=\"13\" value=\"1\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"client-details-item phoneNum\">\n\t\t\t\t\t\t<label for=\"contact-officePhone\" class=\"client-details-label\">Office phone:</label>\n\t\t\t\t\t\t<input id=\"contact-officePhone\" name=\"contact-officePhone\" class=\"contact-contact-info-input\" type=\"text\" tabindex=\"14\" value=\"\" /><br />\n\t\t\t\t\t\t<label for=\"contact-mobilePhone\" class=\"client-details-label\">Mobile phone:</label>\n\t\t\t\t\t\t<input id=\"contact-mobilePhone\" name=\"contact-mobilePhone\" class=\"contact-info-input\" type=\"text\" tabindex=\"15\" value=\"\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"client-details-item email\">\n\t\t\t\t\t\t<label for=\"contact-email\" class=\"client-details-label\">Email:</label>\n\t\t\t\t\t\t<input id=\"contact-email\" name=\"contact-email\" class=\"contact-contact-info-input\" type=\"text\" tabindex=\"16\" value=\"\" />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"client-details-item fax\">\n\t\t\t\t\t\t<label for=\"contact-fax\" class=\"client-details-label\">Fax:</label>\n\t\t\t\t\t\t<input id=\"contact-fax\" name=\"contact-fax\" class=\"contact-contact-info-input\" type=\"text\" tabindex=\"17\" value=\"\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</fieldset>\n\t\t\t<fieldset class=\"client-details-entry\">\n\t\t\t\t<ul class=\"details-list client-details-submit\">\n\t\t\t\t\t<li class=\"client-details-item submit-client\">\n\t\t\t\t\t\t<label for=\"client-add-btn\" class=\"client-details-label\">All done?</label>\n\t\t\t\t\t\t<!--modified field to be of type submit instead of button-->\n <input id=\"client-add-btn\" name=\"client-add-btn\" class=\"client-add-btn\" type=\"submit\" value=\"+ Add Client\" tabindex=\"11\"/> \n\t\t\t\t\t\t<!--input id=\"client-add-btn\" name=\"client-add-btn\" class=\"client-add-btn\" type=\"button\" value=\"+Add Client\" tabindex=\"11\" /-->\n\t\t\t\t\t\t<!--end change--> \n\t\t\t\t\t\t or <a class=\"\" href=\"#\" tabindex=\"11\">Cancel</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</fieldset>\n\t\t</section>\n\t</section>\n</section>\n</form>\n<?php }", "function config_form($config, $err, $user_fields) {\n global $OUTPUT;\n \n //deserialize in case the form is being initialized with config from db\n if ( !isset( $config->hosts ) ) {\n $config = $this->deserialize_configuration( $config );\n \n }\n \n $config = $this->set_defaults( $config );\n // display one extra fieldset\n array_push($config->hosts, 'extra');\n \n include \"config.html\";\n }", "abstract public function bindForm();", "abstract public function bindForm();", "function share_selection_config_services_form() {\n $settings = array();\n\n $services = share_selection_get_links(NULL, TRUE);\n //$settings['show'] = variable_get('share_selection_show', NULL);\n //$settings['weight'] = variable_get('share_selection_weight', NULL);\n //$settings['custom'] = variable_get('share_selection_custom', NULL);\n\n $form['share_selection'] = array('#theme' => 'share_selection_services_drag_table');\n $form['share_selection']['share_selection_show'] = array('#tree' => TRUE);\n $form['share_selection']['share_selection_weight'] = array('#tree' => TRUE);\n // Custom service options.\n $form['share_selection_custom'] = array(\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n '#title' => t('Custom services options'),\n '#description' => t('Set the custom options per service.'),\n '#tree' => TRUE,\n );\n foreach ($services as $service_id => $service) {\n $icon_path = drupal_get_path('module', $service['module']) . '/images/' . $service['icon'];\n $icon = array(\n 'path' => isset($service['icon']) ? $icon_path : '',\n );\n $weight = isset($settings['weight'][$service_id]) ? $settings['weight'][$service_id] : 0;\n\n $form['share_selection']['share_selection_show'][$service_id] = array(\n '#service' => ucwords(str_replace('_', ' ', $service['module'])),\n '#weight' => $weight,\n '#type' => 'checkbox',\n '#title' => theme('image', $icon) . \" \" . t('Show %name', array('%name' => $service['name'])),\n '#return_value' => 1,\n '#default_value' => isset($settings['show'][$service_id]) ? $settings['show'][$service_id] : 0,\n );\n $form['share_selection']['share_selection_weight'][$service_id] = array(\n '#type' => 'weight',\n '#delta' => 100,\n '#default_value' => $weight,\n );\n\n if (isset($service['custom_options'])) {\n $form['share_selection_custom'][$service_id] = array(\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n '#title' => $service['name'],\n );\n foreach ($service['custom_options'] as $option_key => $option_label) {\n $form['share_selection_custom'][$service_id][$option_key] = array(\n '#type' => 'textfield',\n '#title' => $option_label,\n '#default_value' => isset($settings['custom'][$service_id][$option_key]) ? $settings['custom'][$service_id][$option_key] : '',\n '#size' => '60',\n );\n }\n }\n }\n $form['replacement_tokens'] = array(\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n '#title' => t('Replacement tokens'),\n );\n $form['replacement_tokens']['tokens'] = array(\n '#theme' => 'token_tree',\n '#token_types' => array('node'),\n '#global_types' => TRUE,\n '#click_insert' => TRUE,\n );\n return system_settings_form($form);\n}", "function options_form(&$form, &$form_state) {\n parent::options_form($form, $form_state);\n $handlers = $this->display->handler->get_handlers('field');\n if (empty($handlers)) {\n $form['error_markup'] = array(\n '#value' => t('You need at least one field before you can configure your table settings'),\n '#prefix' => '<div class=\"error form-item description\">',\n '#suffix' => '</div>',\n );\n return;\n }\n\n // Create an array of allowed columns from the data we know:\n foreach ($handlers as $field => $handler) {\n if ($label = $handler->label()) {\n $field_names[$field] = $label;\n }\n else {\n $field_names[$field] = $handler->ui_name();\n }\n }\n $field_names[''] = '<none>';\n $field_names['--static--'] = '<static value>';\n\n $form['shop']['name'] = array(\n '#type' => 'textfield',\n '#default_value' => $this->options['shop']['name'],\n '#title' => t('Shop name'),\n );\n $form['shop']['company'] = array(\n '#type' => 'textfield',\n '#default_value' => $this->options['shop']['company'],\n '#title' => t('Shop company'),\n );\n $form['shop']['url'] = array(\n '#type' => 'textfield',\n '#default_value' => $this->options['shop']['url'],\n '#title' => t('Shop url'),\n );\n $form['currencies'] = array(\n '#type' => 'textarea',\n '#title' => t('Currencies'),\n '#default_value' => $this->options['currencies'],\n '#description' => t(\"List of currencies used in the shop. One currency - one selement. 'id' element is code of currency, 'rate' is currency rate. 'rate' also can be CBRF, NBU, NBK or CB.\"),\n );\n //only taxonomy vocabularies can now be used as categories\n $vocabularies = array('' => '<none>');\n foreach (taxonomy_get_vocabularies() as $v) {\n $vocabularies[$v->vid] = $v->name;\n }\n $form['vocabulary'] = array(\n '#type' => 'select',\n '#title' => t('Vocabulary'),\n '#default_value' => $this->options['vocabulary'],\n '#options' => $vocabularies,\n '#description' => t('What vocabulary to use for categories tag.'),\n );\n\n foreach (yandexmarket_fields() as $tag => $value) {\n $safe = str_replace(array('][', '_', ' '), '-', $tag);\n // the $id of the column for dependency checking.\n $id = 'edit-style-options-yacolumns-' . $safe . '-field';\n $types = yandexmarket_types($tag);\n $form['yacolumns'][$tag] = array(\n '#type' => 'fieldset',\n '#title' => $tag . ' (' . implode(', ', $types) . ')',\n '#collapsible' => TRUE,\n '#tree' => TRUE,\n '#collapsed' => ($this->options['yacolumns'][$tag]['field'] == ''\n || !isset($this->options['yacolumns'][$tag]['field']))?TRUE:FALSE,\n );\n $form['yacolumns'][$tag]['field'] = array(\n '#type' => 'select',\n '#options' => $field_names,\n '#default_value' => $this->options['yacolumns'][$tag]['field'],\n );\n $form['yacolumns'][$tag]['static'] = array(\n '#type' => 'textfield',\n '#title' => t('Static value'),\n '#size' => 40,\n '#default_value' => $this->options['yacolumns'][$tag]['static'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array($id => array('--static--')),\n );\n $form['yacolumns'][$tag]['description'] = array(\n '#value' => '<div>' . $value['description'] . '</div>',\n );\n }\n return $form;\n\n }", "public function admin_add_new() {\n ?>\n <div class=\"wrap\">\n <h2><?php _e('Add New Form', 'swpm-form-builder'); ?></h2>\n <?php\n include_once( SWPM_FORM_BUILDER_PATH . 'includes/admin-new-form.php' );\n ?>\n </div>\n <?php\n }", "function postProcessSettingsForm($controller)\n {\n }", "function check_servers ($serv_params){\r\n\r\n global $lingo,$divstyle_white,$divstyle_blue,$divstyle_orange,$divstyle_grey,$strings,$crm_api_user, $crm_api_pass, $crm_wsdl_url,$funky_gear,$sess_account_id,$sess_contact_id;\r\n\r\n #$lingoname = \"name_ja\";\r\n $lingoname = \"name_\".$lingo;\r\n\r\n $server_id = $serv_params[0];\r\n $server_name = $serv_params[1];\r\n $server_type = $serv_params[2];\r\n\r\n ##########################################\r\n # Get server-related switches\r\n\r\n $subicondivwidth = \"26\";\r\n $subiconheight = \"3\";\r\n $subrowdivwidth = \"80%\";\r\n\r\n $serverbit_object_type = \"ConfigurationItems\";\r\n $serverbit_action = \"select\";\r\n // parent CI will be the registered server (also a CI) - not the filter as we may use this filter for other purposes\r\n // The type is Live Status 1/0\r\n $serverbit_type_id = '423752fe-a632-9b4d-8c3b-52ccc968fe59';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n \r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = $strings[\"CI_ServerStatus\"];\r\n\r\n $addserver = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$server_name.\": \".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_status_id = $serverbits[$srvbitcnt]['id'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $server_status = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_status_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n switch ($server_status){\r\n\r\n case '':\r\n $server_status_show = \"NA\";\r\n $thisdivstyle_orange = $divstyle_white;\r\n break;\r\n case '1':\r\n $server_status_show = $strings[\"CI_ServerStatusOnline\"];\r\n $addserver = \"\";\r\n $thisdivstyle_orange = $divstyle_blue;\r\n break;\r\n case '0':\r\n $server_status_show = $strings[\"CI_ServerStatusOffline\"];\r\n $addserver = \"\";\r\n $thisdivstyle_orange = $divstyle_orange;\r\n break;\r\n\r\n } // switch\r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle_orange.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addserver.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $server_status_show = \"NA\";\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR> \".$addserver.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # End get server-related switches\r\n ##########################################\r\n # Get server-related switches\r\n\r\n $subicondivwidth = \"26\";\r\n $subiconheight = \"3\";\r\n $subrowdivwidth = \"80%\";\r\n\r\n $serverbit_object_type = \"ConfigurationItems\";\r\n $serverbit_action = \"select\";\r\n // parent CI will be the registered server (also a CI) - not the filter as we may use this filter for other purposes\r\n // The type is Live Status 1/0\r\n $serverbit_type_id = '2864a518-19f4-ddfa-366e-52ccd012c28b';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n \r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = $strings[\"CI_ServerStatusMaintenance\"];\r\n\r\n $addservermaintenance = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_maintenance_status_id = $serverbits[$srvbitcnt]['id'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $server_maintenance_status = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_maintenance_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_maintenance_status_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n switch ($server_maintenance_status){\r\n\r\n case '':\r\n $server_status_show = \"NA\";\r\n $thisdivstyle_orange = $divstyle_white;\r\n break;\r\n case '1':\r\n $server_status_show = \"ON\";\r\n $addservermaintenance = \"\";\r\n $thisdivstyle_orange = $divstyle_orange;\r\n $view = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id;\r\n break;\r\n case '0':\r\n $server_status_show = \"OFF\";\r\n $addservermaintenance = \"\";\r\n $thisdivstyle_orange = $divstyle_blue;\r\n $view = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id;\r\n break;\r\n\r\n } // switch\r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle_orange.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR>\".$edit.$view.$addservermaintenance.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $server_status_show = \"NA\";\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR> \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # Maintenance Window DateTime Start\r\n $serverbit_type_id = '787ab970-8f2a-efed-3aca-52ecd566b16b';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n\r\n $serverbits = \"\";\r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = \"Maintenance Window Start DateTime\"; //$strings[\"CI_ServerStatusMaintenance\"];\r\n\r\n $addservermaintenance = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_maintenance_start_datetime_id = $serverbits[$srvbitcnt]['id'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $server_maintenance_start_datetime = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_maintenance_start_datetime_id.\"&valuetype=\".$valtype.\"&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_maintenance_start_datetime_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n if ($server_maintenance_start_datetime){\r\n $start_datetime_show = $server_maintenance_start_datetime;\r\n $thisdivstyle = $divstyle_orange;\r\n $addservermaintenance = \"\";\r\n } else {\r\n $start_datetime_show = \"NA\";\r\n $thisdivstyle = $divstyle_white;\r\n } \r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$start_datetime_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_start_datetime_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B>NA<BR> \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # Maintenance Window DateTime End\r\n $serverbit_type_id = 'b38181b6-eb59-0bc3-bad3-52ecd65163f5';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n\r\n $serverbits = \"\";\r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = \"Maintenance Window End DateTime\"; //$strings[\"CI_ServerStatusMaintenance\"];\r\n\r\n $addservermaintenance = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_maintenance_end_datetime_id = $serverbits[$srvbitcnt]['id'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $server_maintenance_end_datetime = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_maintenance_end_datetime_id.\"&valuetype=\".$valtype.\"&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_maintenance_end_datetime_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n if ($server_maintenance_end_datetime){\r\n $end_datetime_show = $server_maintenance_end_datetime;\r\n $thisdivstyle = $divstyle_orange;\r\n $addservermaintenance = \"\";\r\n } else {\r\n $end_datetime_show = \"NA\";\r\n $thisdivstyle = $divstyle_white;\r\n } \r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$end_datetime_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_end_datetime_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B>NA<BR> \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n\r\n # End get server-related switches\r\n ##########################################\r\n # Get server-related back-up details\r\n # Back-up Day: 67a6bcaf-4e45-42d6-79da-52d4df16784c\r\n # Back-up End Time: 913315fd-34d5-036e-0c52-52d4d91550d9\r\n # Back-up Job Name: 8802ae00-1abe-9819-558f-52d4d74b6ca2\r\n # Back-up Start Time: 4d440215-68e1-efe3-158e-52d4d808e6b1\r\n # Back-up Status: 530ae095-b3e7-c9fe-61fb-52d5aee0a272\r\n # Back-up Status Keyword(s): 56291976-233c-912a-b10e-52d4dfc8357c\r\n # Execution Server: 91694cfa-3f33-6505-d894-52d4d84722c0\r\n # Target Server: 734f02a8-5821-86f1-3229-52d4d80696ac\r\n\r\n $subicondivwidth = \"26\";\r\n $subiconheight = \"3\";\r\n $subrowdivwidth = \"80%\";\r\n\r\n $serverbit_object_type = \"ConfigurationItems\";\r\n $serverbit_action = \"select\";\r\n # parent CI will be the registered server (also a CI) - not the filter as we may use this filter for other purposes\r\n # The type is Maintenance 1/0\r\n $serverbit_type_id = '530ae095-b3e7-c9fe-61fb-52d5aee0a272';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n \r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = $strings[\"CI_ServerStatusBackup\"];\r\n\r\n $addserverbackup = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"&partype=dbcb0dbb-c3b8-8edb-1bd6-52b8e31ff812');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_backup_status_id = $serverbits[$srvbitcnt]['id'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $server_backup_status = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_backup_status_id.\"&valuetype=\".$valtype.\"&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_backup_status_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n switch ($server_backup_status){\r\n\r\n case '':\r\n $server_status_show = \"NA\";\r\n $thisdivstyle_orange = $divstyle_grey;\r\n break;\r\n case '1':\r\n $server_status_show = \"OK\";\r\n $addserverbackup = \"\";\r\n $thisdivstyle_orange = $divstyle_blue;\r\n break;\r\n case '0':\r\n $server_status_show = \"NG\";\r\n $addserverbackup = \"\";\r\n $thisdivstyle_orange = $divstyle_orange;\r\n break;\r\n\r\n } // switch\r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle_orange.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_backup_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addserverbackup.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $server_status_show = \"NA\";\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR> \".$addserverbackup.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # End get server-related switches\r\n ##########################################\r\n\r\n return $servers;\r\n\r\n }", "function update_dhcp($dhcp_configuration)\n{\n $new_dhcp_configuration=parse_dhcp_server();\n // Actualize eth0, ath0 and ath1 information.\n if ($dhcp_configuration['dhcp_server_eth0']=='on')\n {\n $new_dhcp_configuration['eth0']['start']=$dhcp_configuration['dhcp_start_eth0'];\n $new_dhcp_configuration['eth0']['end']=$dhcp_configuration['dhcp_end_eth0'];\n $new_dhcp_configuration['eth0']['expire']=$dhcp_configuration['dhcp_expire_eth0'];\n }\n else\n {\n unset ($new_dhcp_configuration['eth0']);\n }\n if ($dhcp_configuration['dhcp_server_ath0']=='on')\n {\n $new_dhcp_configuration['ath0']['start']=$dhcp_configuration['dhcp_start_ath0'];\n $new_dhcp_configuration['ath0']['end']=$dhcp_configuration['dhcp_end_ath0'];\n $new_dhcp_configuration['ath0']['expire']=$dhcp_configuration['dhcp_expire_ath0'];\n }\n else\n {\n unset ($new_dhcp_configuration['ath0']);\n }\n if ($dhcp_configuration['dhcp_server_ath1']=='on')\n {\n $new_dhcp_configuration['ath1']['start']=$dhcp_configuration['dhcp_start_ath1'];\n $new_dhcp_configuration['ath1']['end']=$dhcp_configuration['dhcp_end_ath1'];\n $new_dhcp_configuration['ath1']['expire']=$dhcp_configuration['dhcp_expire_ath1'];\n }\n else\n {\n unset ($new_dhcp_configuration['ath1']);\n }\n return $new_dhcp_configuration;\n}", "function pnAddressBook_admin_menu() {\r\n\r\n \t$settingsURL\t= pnModURL(__PNADDRESSBOOK__,'admin','modifyconfig');\r\n\t$categoryURL\t= pnModURL(__PNADDRESSBOOK__,'admin','categories');\r\n\t$labelURL\t\t= pnModURL(__PNADDRESSBOOK__,'admin','labels');\r\n\t$prefixURL\t\t= pnModURL(__PNADDRESSBOOK__,'admin','prefixes');\r\n\t$customURL\t\t= pnModURL(__PNADDRESSBOOK__,'admin','customfields');\r\n//START - gehunter\r\n\t$exportURL\t\t= pnModURL(__PNADDRESSBOOK__,'user','export');\r\n//END - gehunter\r\n\r\n\t$settingsTXT\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_CONFIG);\r\n\t$categoryTXT\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_pnAB_CATEGORY);\r\n\t$labelTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_LABEL);\r\n\t$prefixTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_PREFIX);\r\n\t$customTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_CUSTOM);\r\n//START - gehunter\r\n\t$exportTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_ADMIN_EXPORT);\r\n//END - gehunter\r\n\r\n\t$output = new pnHTML();\r\n\t$output->SetInputMode(_PNH_VERBATIMINPUT);\r\n\t$output->Title(pnVarPrepHTMLDisplay(_PNADDRESSBOOK));\r\n\t$output->Text('<div align=\"center\">');\r\n\t$output->Text(pnAddressBook_themetable('start',2));\r\n\t$output->Text('<div align=\"center\">');\r\n\t$output->URL($settingsURL,$settingsTXT);\r\n\t$output->Text(' | ');\r\n $output->URL($categoryURL,$categoryTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($labelURL,$labelTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($prefixURL,$prefixTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($customURL,$customTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($exportURL,$exportTXT);\r\n\t$output->Text('</div>');\r\n\t$output->Text(pnAddressBook_themetable('end',2));\r\n\t$output->Text('</div>');\r\n\t$output->Linebreak(1);\r\n\r\n // Return the output that has been generated by this function\r\n return $output->GetOutput();\r\n}", "public function index() {\n $content = $this->lcopun->copun_add_form();\n $this->template->full_admin_html_view($content);\n }", "public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\n }", "public function admin_options(){\r\n echo '<h3>'.__('Netgíró Payment Gateway', 'netgiro').'</h3>';\r\n echo '<p>'.__('Verslaðu á netinu með Netgíró á einfaldan hátt.').'</p>';\r\n echo '<table class=\"form-table\">';\r\n $this -> generate_settings_html();\r\n echo '</table>';\r\n }", "function ras_new_select() {\n\t\t\t\n\t\techo form(\n\t\t\thed(poll_gTxt('add_new_poll').'<p><a href=\"?event=poll_prefs\" >'.poll_gTxt('do_not_save').'</a></p>', 3,' style=\"margin-top: 2em; text-align: center;\"').\n\n\t\t\tstartTable('edit').\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('poll_name')).\n\t\t\t\tfInputCell('name')\n\t\t\t).\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('poll_prompt')).\n\t\t\t\tfInputCell('prompt','','','88')\n\t\t\t).\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_1')).\n\t\t\t\tfInputCell('n0')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_2')).\n\t\t\t\tfInputCell('n1')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_3')).\n\t\t\t\tfInputCell('n2')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_4')).\n\t\t\t\tfInputCell('n3')\n\t\t\t).\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_5')).\n\t\t\t\tfInputCell('n4')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_6')).\n\t\t\t\tfInputCell('n5')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_7')).\n\t\t\t\tfInputCell('n6')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_8')).\n\t\t\t\tfInputCell('n7')\n\t\t\t).\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_9')).\n\t\t\t\tfInputCell('n8')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_10')).\n\t\t\t\tfInputCell('n9')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\ttd().\n\t\t\t\ttd(\n\t\t\t\t\tfInput('submit', '', gTxt('save_new'), 'publish')\n\t\t\t\t)\n\t\t\t).\n\n\t\t\tendTable().\n\n\t\t\teInput('poll_db').\n\t\t\tsInput('new_poll')\n\t\t);\n\t}", "function wck_show_update_form(){\r\n\t\tcheck_ajax_referer( \"wck-edit-entry\" );\t\t\r\n\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\t$id = absint($_POST['id']);\r\n\t\t$element_id = absint( $_POST['element_id'] );\r\n\r\n do_action( \"wck_before_adding_form_{$meta}\", $id, $element_id );\r\n\r\n\t\techo self::mb_update_form($this->args['meta_array'], $meta, $id, $element_id);\r\n\t\t\r\n\t\tdo_action( \"wck_after_adding_form\", $meta, $id, $element_id );\r\n do_action( \"wck_after_adding_form_{$meta}\", $id, $element_id );\r\n\r\n\t\texit;\r\n\t}", "function cmdAdmin()\n\t{\n\t\t$cmd = $this->cmd;\n\n\t\tswitch ($this->cmd)\n\t\t{\n\t\t\tcase NULL:\n\t\t\tcase \"clientlist\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->displayClientList();\n\t\t\t\t$this->active_tab = \"clientlist\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"changepassword\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->changeMasterPassword();\n\t\t\t\t$this->active_tab = \"password\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"mastersettings\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->changeMasterSettings();\n\t\t\t\t$this->active_tab = \"basicsettings\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"determineToolsPath\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->determineToolsPath();\n\t\t\t\tbreak;\n\n\t\t\tcase \"changedefault\":\n\t\t\t\t$this->changeDefaultClient();\n\t\t\t\tbreak;\n\n\t\t\tcase \"newclient\":\n\t\t\t\t$this->cmd = \"selectdb\";\n\t\t\t\t$this->setDisplayMode(\"setup\");\n\t\t\t\t$this->setup->ini_client_exists = $this->setup->newClient();\n\t\t\t\t$this->selectDBType();\n\t\t\t\tbreak;\n\n\t\t\tcase \"selectdbtype\":\n\t\t\tcase \"displayIni\":\n\t\t\t\t$this->cmd = \"ini\";\n\t\t\t\t$this->setDisplayMode(\"setup\");\n\t\t\t\t//$this->setup->ini_client_exists = $this->setup->newClient($this->client_id);\n\t\t\t\t$this->displayIni();\n\t\t\t\tbreak;\n\n\t\t\tcase \"startup\":\n\t\t\t\t$this->setDisplayMode(\"setup\");\n\t\t\t\t$this->setup->ini_client_exists = $this->setup->newClient();\n\t\t\t\t$this->displayStartup();\n\t\t\t\tbreak;\n\n\t\t\tcase \"delete\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->displayDeleteConfirmation();\n\t\t\t\tbreak;\n\n\t\t\tcase \"togglelist\":\n\t\t\t\t$this->setDisplayMode(\"view\");\n\t\t\t\t$this->toggleClientList();\n\t\t\t\tbreak;\n\n\t\t\tcase \"preliminaries\":\n\t\t\t\t$this->setup->checkPreliminaries();\n\t\t\t\t$this->displayPreliminaries();\n\t\t\t\t$this->active_tab = \"preliminaries\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"updateBasicSettings\":\n\t\t\tcase \"performLogin\":\n\t\t\tcase \"performMLogin\":\n\t\t\t\t$this->$cmd();\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->cmdClient();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function _editFieldView() {\n\n\t\t/* Call in Smarty to display template */\n\t\tbfLoad ( 'bfSmarty' );\n\n\t\t$tmp = bfSmarty::getInstance ( 'com_form' );\n\t\t$tmp->caching = false;\n\t\t$tmp->assignFromArray ( $this->_config );\n\n\t\t$disabled = bfHTML::yesnoRadioList ( 'disabled', '', $this->_config ['disabled'] );\n\t\t$tmp->assign ( 'DISABLED', $disabled );\n\t\t$tmp->assign ( 'CONFIG', $this->_config );\n\n\t\t/* Yes No Answers */\n\t\t$qs = array ('verify_brazil_cpf', 'verify_brazil_cnpj', 'filter_strtoupper', 'filter_strtolower', 'verify_isvalidvatnumber', 'verify_isexistingusername', 'verify_isnotexistingusername', 'verify_isinteger', 'verify_isvalidurl', 'verify_isvalidcreditcardnumber', 'verify_isvalidukpostcode', 'published', 'allowsetbyget', 'allowbyemail', 'filter_a2z', 'filter_StripTags', 'filter_StringTrim', 'filter_Alnum', 'filter_Digits', 'required', 'verify_isemailaddress', 'verify_isblank', 'verify_isnotblank', 'verify_isipaddress', 'verify_isvalidukninumber', 'verify_isvalidssn', 'verify_isvaliduszip' );\n\t\tforeach ( $qs as $q ) {\n\t\t\t$tmp->assign ( strtoupper ( $q ), bfHTML::yesnoRadioList ( $q, '', $this->_config [$q] ) );\n\t\t}\n\n\t\t$OPTIONS = array (bfHTML::makeOption ( '0', 'Public' ), bfHTML::makeOption ( '1', 'Registered' ), bfHTML::makeOption ( '2', 'Special' ) );\n\n\t\t$access = bfHTML::selectList2 ( $OPTIONS, 'access', '', 'value', 'text', $this->_config ['access'] );\n\t\t$tmp->assign ( 'ACCESS', $access );\n\n\t\t$params = bfHTML::yesnoRadioList ( 'params', '', $this->_config ['params'] );\n\t\t$tmp->assign ( 'PARAMS', $params );\n\n\t\t$OPTIONS = array ();\n\t\t$dir = new DirectoryIterator ( bfcompat::getAbsolutePath () . '/components/com_form/plugins/fields/datepicker/jscalendar-1.0/lang' );\n\t\tforeach ( $dir as $file ) {\n\t\t\tif ($file->isDot ())\n\t\t\t\tcontinue;\n\t\t\t\t// Do something with $file\n\t\t\t$OPTIONS [] = bfHTML::makeOption ( $file->getFilename (), $file->getFilename () );\n\t\t}\n\n\t\t$LANG = bfHTML::selectList2 ( $OPTIONS, 'lang', '', 'value', 'text', $this->_config ['lang'] );\n\t\t$tmp->assign ( 'LANG', $LANG );\n\n\t\t$OPTIONS = array (bfHTML::makeOption ( 'calendar-blue.css', 'calendar-blue.css' ), bfHTML::makeOption ( 'calendar-blue2.css', 'calendar-blue2.css' ), bfHTML::makeOption ( 'calendar-brown.css', 'calendar-brown.css' ), bfHTML::makeOption ( 'calendar-green.css', 'calendar-green.css' ), bfHTML::makeOption ( 'calendar-system.css', 'calendar-system.css' ), bfHTML::makeOption ( 'calendar-tas.css', 'calendar-tas.css' ), bfHTML::makeOption ( 'calendar-win2k-1.css', 'calendar-win2k-1.css' ), bfHTML::makeOption ( 'calendar-win2k-2.css', 'calendar-win2k-2.css' ), bfHTML::makeOption ( 'calendar-win2k-cold-1.css', 'calendar-win2k-cold-1.css' ), bfHTML::makeOption ( 'calendar-win2k-cold-2.css', 'calendar-win2k-cold-2.css' ) );\n\n\t\t$CSSFILE = bfHTML::selectList2 ( $OPTIONS, 'cssfile', '', 'value', 'text', $this->_config ['cssfile'] );\n\t\t$tmp->assign ( 'CSSFILE', $CSSFILE );\n\n\t\t$tmp->display ( dirname ( __FILE__ ) . DS . 'editView.tpl' );\n\t}", "protected function SetupPanel() {\n\t\t\t$this->mctAddress = AddressMetaControl::Create($this, $this->strUrlHashArgument, QMetaControlCreateType::CreateOnRecordNotFound);\n\n\t\t\t// Dialog Message\n\t\t\t$this->dlgMessage = new MessageDialog($this);\n\t\t\t$this->dlgMessage_Reset();\n\t\t\t$this->btnSave->RemoveAllActions(QClickEvent::EventName);\n\t\t\t$this->btnSave->AddAction(new QClickEvent(), new QShowDialogBox($this->dlgMessage));\n\t\t\t$this->btnSave->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSave_Click'));\n\n\t\t\tif (!$this->mctAddress->EditMode) {\n\t\t\t\t// Trying to create a NEW address\n\t\t\t\t$this->mctAddress->Address->Person = $this->objPerson;\n\t\t\t\t$this->btnSave->Text = 'Create';\n\t\t\t} else {\n\t\t\t\t// Ensure the Address object belongs to the person\n\t\t\t\tif ($this->mctAddress->Address->PersonId != $this->objPerson->Id) {\n\t\t\t\t\treturn $this->ReturnTo('#contact');\n\t\t\t\t}\n\t\t\t\t$this->btnSave->Text = 'Update';\n\n\t\t\t\t$this->btnDelete = new QLinkButton($this);\n\t\t\t\t$this->btnDelete->Text = 'Delete';\n\t\t\t\t$this->btnDelete->CssClass = 'delete';\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to permenantly DELETE this record?'));\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnDelete_Click'));\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());\n\t\t\t}\n\n\t\t\t// Create Controls\n\t\t\t$this->lstAddressType = $this->mctAddress->lstAddressType_Create();\n\t\t\t$this->calDateUntilWhen = $this->mctAddress->calDateUntilWhen_Create();\n\t\t\t$this->calDateUntilWhen->MinimumYear = 2000;\n\t\t\t$this->calDateUntilWhen->MaximumYear = date('Y') + 10;\n\t\t\t$this->chkCurrentFlag = $this->mctAddress->chkCurrentFlag_Create();\n\n\t\t\t// Fixup \"Address Type\"\n\t\t\t$this->lstAddressType->GetItem(0)->Name = 'Previous Home';\n\t\t\tif (!$this->mctAddress->EditMode) $this->lstAddressType->AddSelectOneOption();\n\n\t\t\t$this->chkInvalidFlag = $this->mctAddress->chkInvalidFlag_Create();\n\t\t\t$this->txtAddress1 = $this->mctAddress->txtAddress1_Create();\n\t\t\t$this->txtAddress2 = $this->mctAddress->txtAddress2_Create();\n\t\t\t$this->txtAddress3 = $this->mctAddress->txtAddress3_Create();\n\t\t\t$this->txtCity = $this->mctAddress->txtCity_Create();\n\t\t\t$this->lstState = $this->mctAddress->lstState_Create();\n\t\t\t$this->txtZipCode = $this->mctAddress->txtZipCode_Create();\n\t\t\t$this->txtCountry = $this->mctAddress->txtCountry_Create();\n\t\t\t$this->txtInternationalState = $this->mctAddress->txtState_Create();\n\t\t\t$this->txtInternationalState->Visible = false;\n\t\t\t$this->chkInternationalFlag = $this->mctAddress->chkInternationalFlag_Create();\n\t\t\t$this->chkInternationalFlag->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'chkInternationalFlag_Click'));\n\t\t\t$this->chkInternationalFlag_Click();\n\t\t\t\n\t\t\t// Add Actions\n\t\t\t$this->lstAddressType->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lstAddressType_Change'));\n\n\t\t\t// Setup Controls\n\t\t\t$this->lstAddressType_Change();\n\t\t}", "function execute()\n {\n plugin::execute();\n\n if($this->is_account && !$this->view_logged){\n $this->view_logged = TRUE;\n new log(\"view\",\"terminal/\".get_class($this),$this->dn);\n }\n\n /* Do we need to flip is_account state? */\n if (isset($_POST['modify_state'])){\n $this->is_account= !$this->is_account;\n }\n\n /* Do we represent a valid terminal? */\n if (!$this->is_account && $this->parent === NULL){\n $display= \"<img alt=\\\"\\\" src=\\\"images/small-error.png\\\" align=\\\"middle\\\">&nbsp;<b>\".\n _(\"This DN has no terminal features.\").\"</b>\";\n return ($display);\n }\n\n /* Show main page */\n $smarty= get_smarty();\n $smarty->assign(\"gotoLpdEnable_dialog\", $this->gotoLpdEnable_dialog->execute());\n\n /* Assign acls */\n $tmp= $this->plInfo();\n foreach($tmp['plProvidedAcls'] as $name => $translation){\n $smarty->assign($name.\"ACL\",$this->getacl($name));\n }\n\n if(isset($_POST['gotoXdmcpServer_add']) && isset($_POST['XdmcpAddServer'])){\n if(!in_array_strict($_POST['gotoXdmcpServer_add'],$this->selected_xdmcp_servers)){\n $this->selected_xdmcp_servers[] =get_post('gotoXdmcpServer_add');\n }\n }\n\n if(isset($_POST['selected_xdmcp_servers']) && isset($_POST['XdmcpDelServer'])){\n $tmp = array();\n foreach($this->selected_xdmcp_servers as $name){\n if(!in_array_strict($name,$_POST['selected_xdmcp_servers'])){\n $tmp[] = $name;\n }\n }\n $this->selected_xdmcp_servers = $tmp;\n }\n\n /* Arrays */ \n foreach(array(\"XMethods\", \"XDrivers\", \"XResolutions\", \"XColordepths\",\n \"XKbModels\",\"XKbVariants\",\"MouseTypes\", \"MousePorts\") as $val){\n $smarty->assign(\"$val\", set_post($this->$val));\n }\n $smarty->assign(\"XKbLayouts\", set_post($this->XKbLayouts));\n $smarty->assign(\"XKbLayoutKeys\",set_post(array_flip($this->XKbLayouts)));\n $smarty->assign(\"nfsservers\", set_post($this->config->data['SERVERS']['NFS']));\n\n\n /* Create a list of useable servers for the currently selected \n * connection type.\n */ \n $xdmcp_types = $this->config->data['SERVERS']['TERMINAL_SESSION_TYPES'];\n $available_servers = array();\n foreach($xdmcp_types as $servername =>$supported_types){\n if(in_array_strict(strtoupper($this->gotoXMethod),$supported_types)){\n $available_servers[] = $servername;\n }\n }\n\n /* Append additional information to invalid server selections.\n */\n $tmp = array();\n foreach($this->selected_xdmcp_servers as $server){\n if(in_array_strict($server,$available_servers)){\n $tmp[$server] = $server;\n }else{\n $tmp[$server] = $server.\"&nbsp;-&nbsp;\"._(\"Unsupported\");\n }\n }\n\n /* Remove already selected servers from available list. \n */\n foreach($available_servers as $key => $server){\n if(isset($tmp[$server])){\n unset($available_servers[$key]);\n }\n }\n\n $smarty->assign(\"selected_xdmcp_servers\", set_post($tmp));\n $smarty->assign(\"inherited_xdmcp_servers\",set_post($this->inherited_xdmcp_servers));\n $smarty->assign(\"available_xdmcp_servers\",set_post($available_servers));\n\n /* Variables - select */\n foreach(array(\"gotoXMethod\",\"gotoXDriver\", \"gotoXResolution\", \"gotoXColordepth\", \n \"gotoLpdServer\", \"gotoXKbModel\", \"gotoXKbLayout\",\n \"gotoXKbVariant\", \"gotoXMouseType\", \"gotoXMouseport\") as $val){\n\n $smarty->assign($val.\"_select\", set_post($this->$val));\n }\n\n /* Variables */\n foreach(array(\"gotoXHsync\", \"gotoXVsync\") as $val){\n $smarty->assign($val, set_post($this->$val));\n }\n\n /* Checkboxes */\n foreach(array(\"gotoScannerEnable\") as $val){\n if ($this->$val == TRUE) {\n $smarty->assign(\"$val\", \"checked\");\n } else {\n $smarty->assign(\"$val\", \"\");\n }\n }\n\n /* Phone stuff */\n $smarty->assign (\"goFonHardware\", set_post($this->goFonHardware));\n $hl= \"<select size=\\\"1\\\" name=\\\"goFonHardware\\\" title=\\\"\".\n _(\"Choose the phone located at the current terminal\").\"\\\" >\\n\";\n foreach ($this->hardware_list as $cn => $description){\n if ($cn == $this->goFonHardware){\n $selected= \"selected\";\n } else {\n $selected= \"\";\n }\n if (isset($this->used_hardware[$cn])){\n $color= \"style=\\\"color:#A0A0A0\\\"\";\n } else {\n $color= \"\";\n }\n $hl.= \" <option $color label=\\\"$cn\\\" value=\\\"$cn\\\" $selected>$description</option>\\n\";\n }\n $hl.= \"</select>\\n\";\n $smarty->assign (\"hardware_list\", $hl);\n $smarty->assign (\"gotoXMonitor\", set_post($this->gotoXMonitor));\n\n $smarty->assign(\"AutoSyncACL\",$this->getacl(\"AutoSync\"));\n\n $smarty->assign(\"AutoSyncCHK\",\" \");\n if($this->AutoSync){\n $smarty->assign(\"AutoSyncCHK\",\" checked \");\n $smarty->assign(\"gotoXVsyncACL\", preg_replace(\"/w/\",\"\",$this->getacl(\"gotoXVsync\")));\n $smarty->assign(\"gotoXHsyncACL\", preg_replace(\"/w/\",\"\",$this->getacl(\"gotoXHsync\")));\n }\n\n /* Show main page */\n return($smarty->fetch (get_template_path('terminalService.tpl', TRUE,dirname(__FILE__))));\n }", "public static function _options_page(){\n\t\tif( isset($_POST['urls']) ){\n\t\t\tself::updateUrls($_POST['urls']);\n\t\t}\n\t\t\n\t\t$vars = (object) array();\n\t\t$vars->messages = implode( \"\\n\", self::$messages );\n\t\t$vars->path = self::$path;\n\t\t$vars->urls = self::getUrls();\n\t\tself::render( 'admin', $vars );\n\t}", "function immobile_form($azione=\"\", $id_imm=\"\",$id_cli=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$str=\"\";\n\tif ($azione==\"mod\") {\n\t\t\n\t\t$q_mod=\"SELECT * FROM immobile WHERE immobile.id_imm = $id_imm\";\n\t\t$r_mod=$db->query($q_mod);\n\n\t\t$ro_mod=mysql_fetch_array($r_mod);\n\t}\t\n\n\t$str.= \"<div class=\\\"clienti\\\">\\n\";\n\t$str.=\"<form method=\\\"POST\\\" action=\\\"immobile_save.php\\\">\\n\";\n\t$str.=\"<input type=\\\"hidden\\\" name=\\\"azione\\\" value=\\\"\";\n\t$str.= $azione;\n\t$str.= \"\\\">\\n\";\n\tif ($azione==\"mod\") {\n\t\t$str.=\"<input type=\\\"hidden\\\" name=\\\"id_imm\\\" value=\\\"\";\n\t\t$str.= $id_imm;\n\t\t$str.= \"\\\">\\n\";\n\t}\t\n\t$str.= \"<TABLE id=\\\"clienti\\\">\\n\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Associa a Cliente\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\n\tif ($id_cli!=\"\") {\n\t\t$str.= nominativo_stampa($id_cli);\n\t\t$str.=\"<input type=\\\"hidden\\\" name=\\\"id_cli\\\" value=\\\"\";\n\t\t$str.= $id_cli;\n\t\t$str.= \"\\\">\\n\";\n\t}\n\telse {\n\t\t$str.=\"<select size=\\\"1\\\" name=\\\"id_cli\\\">\\n\";\n\t\t$str.=\"<option value=\\\"\\\">Scegli</option>\\n\";\n\t\t$q_tipi=\"SELECT * FROM tipo_cliente\";\n\t\t$r_tipi=$db->query($q_tipi);\n\t\t$i=1;\n\t\twhile ($ro_tipi=mysql_fetch_array($r_tipi)) {\n\t\t\t\n\t\t\t$str.=\"<optgroup class=\\\"opt$i\\\" label=\\\"\";\n\t\t\t$str.=$ro_tipi['nome'];\n\t\t\t$str.=\"\\\">\";\n\t\t\t$i++;\n\t\t\t$q = \"SELECT * FROM cliente WHERE id_tipo_cliente=$ro_tipi[id_tipo_cliente] order by nominativo asc\";\t\n\t\t\n\t\t\t$r = $db->query($q);\n\t\t\tif ($r) {\n\t\t\t\t\n\t\t\t\n\t\t\t\twhile($ro = mysql_fetch_array($r)){\n\t\t\t\t\tif ($azione==\"mod\" AND $ro['id_cli']==$ro_mod['id_cli']) { // restituisce un warning se non � associato a nessun cliente\n\t\t\t\t\t\t$sel=\"Selected\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$sel=\" \";\n\t\t\t\t\t}\n\t\t\t\t$str.=\"<option $sel value=\\\"\";\n\t\t\t\t$str.= $ro['id_cli'];\n\t\t\t\t$str.=\"\\\">\";\n\t\t\t\t$str.= $ro['nominativo'];\n\t\t\t\t$str.=\"</option>\\n\";\n\t\t\t\t}\t\n\t\t\t}\n\t\t$str.=\"</optgroup>\";\t\n\t\t}\n\t\t\n\t\t$str.=\"</select>\\n\";\n\t}\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Tipo di Locazione\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select size=\\\"1\\\" name=\\\"id_tipo_locazione\\\">\\n\";\n\t$q = \"SELECT * FROM tipo_locazione order by nome asc\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\tif ( $azione==\"mod\" AND $ro['id_tipo_locazione']==$ro_mod['id_tipo_locazione']) {\n\t\t\t$sel=\"Selected\";\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_tipo_locazione'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\n\t}\n\t$str.=\"</select>\\n\";\n\t\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Rif.Num.\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input class=\\\"readonly\\\" type=\\\"text\\\" name=\\\"id_imm\\\" readonly value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $id_imm;\n\t}\n\telse {\n\t\t$str.=crea_id_imm();\n\t}\n\t$str.=\"\\\" size=\\\"10\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Tipo di Immobile\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select size=\\\"1\\\" name=\\\"id_tipo_immobile\\\">\\n\";\n\n\t$q = \"SELECT * FROM tipo_immobile order by nome asc\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\tif ($azione==\"mod\" AND $ro['id_tipo_immobile']==$ro_mod['id_tipo_immobile']) {\n\t\t\t$sel=\"Selected\";\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_tipo_immobile'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\n\t}\n\t$str.=\"</select>\\n\";\n\t$str.=\" Nuova Tipologia:\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"new_tipo_immobile\\\" value=\\\"\\\" size=\\\"15\\\"/>\\n\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Provincia\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select size=\\\"1\\\" name=\\\"id_provincia\\\">\\n\";\n\t$str.=\"<option value=\\\"\\\">Scegli</option>\\n\";\n\t$q = \"SELECT * FROM provincia order by nome asc\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\tif ($azione==\"mod\" AND $ro['id_provincia']==$ro_mod['id_provincia']) {\n\t\t\t$sel=\"Selected\";\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_provincia'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\n\t}\n\t$str.=\"</select>\\n\";\n\t$str.=\" Nuova:\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"new_provincia\\\" value=\\\"\\\" size=\\\"15\\\"/>\\n\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\t\n\t\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Citt&agrave;\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select size=\\\"1\\\" name=\\\"id_citta\\\">\\n\";\n\t$str.=\"<option value=\\\"\\\">Scegli</option>\\n\";\n\t$q = \"SELECT * FROM citta order by nome asc\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\tif ($azione==\"mod\" AND $ro['id_citta']==$ro_mod['id_comune']) {\n\t\t\t$sel=\"Selected\";\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_citta'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\n\t}\n\t$str.=\"</select>\\n\";\n\t$str.=\" Nuova:\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"new_citta\\\" value=\\\"\\\" size=\\\"15\\\"/>\\n\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Zona\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select size=\\\"1\\\" name=\\\"id_zona\\\">\\n\";\n\t$str.=\"<option value=\\\"\\\">Scegli</option>\\n\";\n\t$q = \"SELECT * FROM zona order by nome asc\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\tif ($azione==\"mod\" AND $ro['id_zona']==$ro_mod['id_zona']) {\n\t\t\t$sel=\"Selected\";\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_zona'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\n\t}\n\t$str.=\"</select>\\n\";\n\t$str.=\" Nuova:\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"new_zona\\\" value=\\\"\\\" size=\\\"15\\\"/>\\n\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Via\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"via\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['via'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Mq\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"mq\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['mq'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n \n $str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Mq Comm\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"mq_comm\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['mq_comm'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n \n\t\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Prezzo\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"prezzo\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['prezzo'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Garage\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select size=\\\"1\\\" name=\\\"id_garage\\\">\\n\";\n\t$str.=\"<option value=\\\"\\\">Scegli</option>\\n\";\n\t$q = \"SELECT * FROM garage\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\tif ($azione==\"mod\" AND $ro['id_garage']==$ro_mod['id_garage']) {\n\t\t\t$sel=\"Selected\";\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_garage'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\n\t}\n\t$str.=\"</select>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Numero Piani\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"num_piani\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['num_piani'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Numero Camere\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"num_camere\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['num_camere'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Numero Bagni\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"num_bagni\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['num_bagni'];\n\t}\t\n\t$str.=\"\\\" size=\\\"40\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\t\n\t\n\t\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Stato\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select size=\\\"1\\\" name=\\\"id_stato\\\">\\n\";\n\t$str.=\"<option value=\\\"\\\">Scegli</option>\\n\";\n\t$q = \"SELECT * FROM stato\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\tif ($azione==\"mod\" AND $ro['id_stato']==$ro_mod['id_stato']) {\n\t\t\t$sel=\"Selected\";\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_stato'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\t}\n\t$str.=\"</select>\\n\";\n\t\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t\n\t\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Classe Energetica\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"classe_en\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['classe_en'];\n\t}\t\n\t$str.=\"\\\" size=\\\"20\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Spese Condominiali\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"spese_cond\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['spese_cond'];\n\t}\t\n\t$str.=\"\\\" size=\\\"20\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t\n\t$str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Num Vani\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"vani\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['vani'];\n\t}\t\n\t$str.=\"\\\" size=\\\"20\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n \n $str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Ascensore\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select size=\\\"1\\\" name=\\\"id_ascensore\\\">\\n\";\n\t$str.=\"<option value=\\\"\\\">Scegli</option>\\n\";\n\t$q = \"SELECT * FROM ascensore\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\tif ($azione==\"mod\" AND $ro['id_ascensore']==$ro_mod['id_ascensore']) {\n\t\t\t$sel=\"Selected\";\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_ascensore'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\n\t}\n\t$str.=\"</select>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n \n \n $str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Chiavi\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.=\"<select size=\\\"1\\\" name=\\\"id_chiavi\\\">\\n\";\n\t$str.=\"<option value=\\\"\\\">Scegli</option>\\n\";\n\t$q = \"SELECT * FROM chiavi\";\t\n\t$r = $db->query($q);\n\twhile($ro = mysql_fetch_array($r)){\n\t\tif ($azione==\"mod\" AND $ro['id_chiavi']==$ro_mod['id_chiavi']) {\n\t\t\t$sel=\"Selected\";\n\t\t}\n\t\telse {\n\t\t\t$sel=\" \";\n\t\t}\n\t\t\n\t\t$str.=\"<option $sel value=\\\"\";\n\t\t$str.= $ro['id_chiavi'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= $ro['nome'];\n\t\t$str.=\"</option>\\n\";\n\n\t}\n\t$str.=\"</select>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n \n \n $str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Anno Costruzione\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"anno_costruzione\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['anno_costruzione'];\n\t}\t\n\t$str.=\"\\\" size=\\\"20\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n \n $str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Al piano\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"al_piano\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['al_piano'];\n\t}\t\n\t$str.=\"\\\" size=\\\"20\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n \n $str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Posto Auto\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n \n $str.=\"<input type=\\\"checkbox\\\" name=\\\"posto_auto\\\" value=\\\"1\\\" \";\n\t\n\tif ($azione==\"mod\" && $ro_mod['posto_auto']==1) {\n\t\t$str.=\"checked\";\n\t}\n $str.=\" >\\n\";\n\t\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n \n $str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Esclusiva\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n \n $str.=\"<input type=\\\"checkbox\\\" name=\\\"esclusiva\\\" value=\\\"1\\\" \";\n\t\n\tif ($azione==\"mod\" && $ro_mod['esclusiva']==1) {\n\t\t$str.=\"checked\";\n\t}\n $str.=\" >\\n\";\n\t\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n \n\t $str.= \"<TR>\\n\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t$str.= \"Durata Esclusiva\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t$str.= \"<input type=\\\"text\\\" name=\\\"esclusiva_durata\\\" value=\\\"\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['esclusiva_durata'];\n\t}\t\n\t$str.=\"\\\" size=\\\"20\\\"/>\\n\";\n\t$str.= \"</TD>\\n\";\n\t$str.= \"</TR>\\n\";\n\t$str.= \"<TR>\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t$str.= \"Note\";\n\t$str.= \"</TD>\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t$str.= \"<textarea rows=\\\"10\\\" cols=\\\"80\\\" name=\\\"note\\\">\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['note'];\n\t}\t\n\t$str.=\"</textarea>\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n $str.= \"<TR>\";\n\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t$str.= \"Note PUBBLICHE\";\n\t$str.= \"</TD>\";\n\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t$str.= \"<textarea rows=\\\"10\\\" cols=\\\"80\\\" name=\\\"note_sito\\\">\";\n\tif ($azione==\"mod\") {\n\t\t$str.= $ro_mod['note_sito'];\n\t}\t\n\t$str.=\"</textarea>\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\n\t$str.= \"<TR>\";\n\t$str.= \"<TD colspan=\\\"2\\\" align=\\\"center\\\">\";\n\t$str.= \"<input type=\\\"submit\\\" value=\\\"Submit\\\" class=\\\"buttonSubmit\\\" />\";\n\t$str.= \"</TD>\";\n\t$str.= \"</TR>\";\n\t$str.= \"</TABLE>\";\n\t$str.=\"</form>\";\n\t$str.=\"</div>\";\n\n\t\n\treturn $str;\n}", "function addwebserviceAction() {\n\n $request = $this->getRequest();\n $form = $this->getForm();\n\n $clientId = $this->getRequest()->getParam('clientId');\n\n $form->addElement('hidden', 'clientId', array('value' => $clientId)) ;\n\n if ($this->getRequest()->getMethod() == 'POST') {\n if (!$form->isValid($request->getPost())) {\n // Invalid entries\n $this->view->webservice_form = $form;\n return $this->render('add-webservice'); // re-render webservice form\n } else {\n $result=$this->saveWebservice();\n\n if($result) {\n $this->_redirect('admin/webservice/index/clientId/'.$clientId);\n } else {\n\n }\n }\n }\n $this->view->webservice_form = $form;\n\n }", "public function formHandler()\n {\n $_SESSION['title'] = \"Caiman: Dashboard\";\n $this->allowAccessTo(array(1, 3));\n\n $oldPassword = null;\n $newPasswordRepeat = null;\n $newPassword = null;\n\n if (isset($_GET['e'])) {\n $this->e = filter_input(INPUT_GET, 'e', FILTER_SANITIZE_SPECIAL_CHARS);\n }\n // form update\n if ($this->e == \"updatePassword\") {\n $_SESSION['title'] = \"Caiman: Update password\";\n if (isset($_POST['oldPassword'])) {\n $oldPassword = filter_input(INPUT_POST, 'oldPassword', FILTER_SANITIZE_STRING);\n }\n if (isset($_POST['newPassword'])) {\n $newPassword = filter_input(INPUT_POST, 'newPassword', FILTER_SANITIZE_STRING);\n }\n if (isset($_POST['newPasswordRepeat'])) {\n $newPasswordRepeat = filter_input(INPUT_POST, 'newPasswordRepeat', FILTER_SANITIZE_STRING);\n }\n\n if (isset($oldPassword) && isset($newPassword) && isset($newPasswordRepeat)) {\n $_SESSION['user']->updatePassword($newPassword, $newPasswordRepeat, $oldPassword);\n }\n }\n\n // update if account if visible or not\n if ($this->e == \"updatePrivateAccount\") {\n\n if ($_SESSION['user']->idUser != -1) {\n $_SESSION['user']->updatePrivateAccount();\n header('Location:' . $_SERVER['HTTP_REFERER']);\n }\n }\n }", "function zdtw_menu_options_callback() {\n echo '<form id=\"'.$this->prefix.'-form\" class=\"zd-settings-form\" method=\"POST\" action=\"options.php\">'.\"\\n\";\n\n// print_r( $this->options );\n// echo $this->settings_page_id;\n\n // settings_fields( $option_group )\n settings_fields( $this->settings_page_id );\n// settings_fields( $this->prefix . '-general-section' );\n\n do_settings_fields( $this->settings_page_id, $this->prefix .'-general-section' );\n\n submit_button();\n\n echo '</form>'.\"\\n\";\n }", "function odbcdriver_show($xtn, $type, $iam){\n\t//get driver information if editing\n\tif(!empty($xtn)) {\n\t\t$thisxtn = odbcdriver_get($xtn);\n $dv_name= $thisxtn['name'];\n $dv_driver= $thisxtn['driver'];\n $dv_setup= $thisxtn['setup'];\n $dv_enable = $thisxtn['enable']; \n\t\t$dv_description = $thisxtn['description']; \n\t\tif(!is_array($thisxtn)) {\n\t\t\techo \"Error: cannot retreive configuration info for this object\";\n\t\t\treturn;\n\t\t}\n\n\t\t$action = 'driveredit';\n\t\t\n\t\t//draw delete button\n\t\techo <<< End_Of_Delete\n\t\t<form method=\"POST\" action=\"{$_SERVER['PHP_SELF']}?type={$type}&display={$iam}\">\n\t\t<input type=\"hidden\" name=\"action\" value=\"driverdelete\">\n\t\t<input type=\"hidden\" name=\"ext\" value=\"{$thisxtn['id']}\">\n\t\t<input type=\"submit\" value=\"Delete This Driver\"></form>\nEnd_Of_Delete;\n\t}\n\n\techo(\"<hr>\");\n\n\tif(isset($_REQUEST['action']) && $_REQUEST['action'] == 'driveradd') {\n\t\t$thisxtn['ext'] = $_REQUEST['ext'];\n\t\t$thisxtn[0] = $_REQUEST['ext'];\n\t\t$action = 'driveradd';\n\t}\n\n echo \"<form name=\\\"addNewdriver\\\" action=\\\"\".$_SERVER['PHP_SELF'].\"?type={$type}&display={$iam}&action={$action}\".\"\\\" method=\\\"post\\\">\";\n\n\techo \"<input type='hidden' name='action' value='{$action}'>\";\n\techo \"<input type='hidden' name='ext' value='{$thisxtn['id']}'>\";\n\n echo \"<table>\";\n\n echo \"<tr><td colspan=2><h3>\";\n echo ($_REQUEST['ext'] ? _('Edit ODBC Driver') : _('Add ODBC Driver'));\n echo \"</h3></td></tr>\\n\";\n\n //Session Name\n echo \"<tr \";\n echo ($_REQUEST['ext'] ? '' : '');\n echo \"><td>\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\" >\"._(\"Name\").\"\\n\";\n echo \"<span>\"._(\"Name (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n /*\n $list_type = get_driverlist();\n echo \"&nbsp;&nbsp;<select name=\\\"dv_name\\\" tabindex=\".++$tabindex.\">\\n\";\n foreach ($list_type as $s){\t\t\n\t\tif ($s == \"\".$dv_name){\n\t\t\techo \"<option value = '{$s}' selected>{$s}</option>\\n\";\n\t\t}\n\t\telse{\n\t\t\techo \"<option value = '{$s}'>{$s}</option>\\n\";\n\t\t}\n }\n echo \"</select>\\n\";\n */\n echo \"<input type=text name=\\\"dv_name\\\" value=\\\"$dv_name\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n\n /*\n echo \"<tr \";\n echo ($_REQUEST['ext'] ? '' : '');\n echo \"><td>\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\" >\"._(\"Name\").\"\\n\";\n echo \"<span>\"._(\"Name (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td>\";\n echo \"<td>\";\n echo \"<input type=text name=\\\"dv_name\\\" value=\\\"$dv_name\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n */\n\n //Driver \n echo \"<tr \";\n echo ($_REQUEST['ext'] ? '' : '');\n echo \"><td>\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\" >\"._(\"Driver\").\"\\n\";\n echo \"<span>\"._(\"Driver (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td>\";\n echo \"<td>\";\n echo \"<input type=text name=\\\"dv_driver\\\" value=\\\"$dv_driver\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n\n //Setup \n echo \"<tr \";\n echo ($_REQUEST['ext'] ? '' : '');\n echo \"><td>\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\" >\"._(\"Setup\").\"\\n\";\n echo \"<span>\"._(\"Setup (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td>\";\n echo \"<td>\";\n echo \"<input type=text name=\\\"dv_setup\\\" value=\\\"$dv_setup\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n\n //description \n echo \"<tr \";\n echo ($_REQUEST['ext'] ? '' : '');\n echo \"><td>\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\" >\"._(\"Description\").\"\\n\";\n echo \"<span>\"._(\"Setup (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td>\";\n echo \"<td>\";\n echo \"<input type=text name=\\\"dv_description\\\" value=\\\"$dv_description\\\" tabindex=\".++$tabindex.\">\\n\";\n echo \"</td></tr>\\n\";\n\n //Enable For using\n echo \"<tr><td>\\n\";\n echo \"<a href=\\\"#\\\" class=\\\"info\\\">\"._(\"Enable\").\"\\n\";\n echo \"<span>\"._(\"RES_ODBC Enable (REQUIRED)\").\"</span></a>\\n\";\n echo \"</td><td>\\n\";\n $list_type = array('yes', 'no'); \n echo \"&nbsp;&nbsp;<select name=\\\"dv_enable\\\" tabindex=\".++$tabindex.\">\\n\";\n foreach ($list_type as $s){\n echo \"<option value=\\\"$s\\\"\";\n if($s==$dv_enable) echo \" SELECTED\";\n echo \">$s</option>\\n\";\n }\n echo \"</select>\\n\";\n echo \"</td></tr>\\n\";\n\n echo \"<tr><td></td><td><input type=submit Value='Submit Changes' tabindex=\".++$tabindex.\"></td></tr></table>\";\n\n\techo\"</form>\";\n}", "public function add_edit_phonesclient($phonesclient_id=null){\n\t\t$this->layout = 'ajax';\n\t\n\t\tif($this->request->is('post') || $this->request->is('put')){\n\t\t\tif(isset($phonesclient_id) && intval($phonesclient_id) > 0){\n\n\t\t\t\t//update\n\t\t\t\t$this->request->data['Phonesclient']['IDPhoneclient'] = $phonesclient_id;\n\t\t\t\tif ($this->Phonesclient->save($this->request->data)) {\n\t\t\t\t\t$this->loadModel('Phonesgroup');\n\t\t\t\t\t$this->Phonesgroup->deleteAll($phonesclient_id);\n\n\t\t\t\t\t$arr_phonesgroup = array();\n\t\t\t\t\tif(isset($this->request->data['Groupcmd']['IDGroup'])){\n\t\t\t\t\t\tforeach ($this->request->data['Groupcmd']['IDGroup'] as $key => $value) {\n\t\t\t\t\t\t\t$arr = array(\"IDPhoneclient\" => $phonesclient_id, \"IDGroup\" => $value, \"IDUser\" => $this->obj_logged_user->getID());\n\t\t\t\t\t\t\t$arr_phonesgroup[$key] = $arr;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//debug($arr_commandsgroup);exit();\n\t\t\t\t\t$this->Commandgroup->saveAll($arr_phonesgroup);\n\t\t\t\t\techo json_encode(array('success'=>true,'msg'=>__('Guardado con &eacute;xito.'),'phonesclient_id'=>$phonesclient_id));\n\t\t\t\t\texit();\n\t\t\t\t}else{\n\t\t\t\t\techo json_encode(array('success'=>false,'msg'=>__('Su informaci&oacute;n es incorrecta'),'validation'=>$this->Phonesclient->validationErrors));\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}else{\n\t\n\t\t\t\t//insert\n\t\t\t\t$this->request->data['Phonesclient']['IDUser'] = $this->obj_logged_user->getID();\t\t\n\t\t\t\tif ($this->Phonesclient->save($this->request->data)) {\n\t\t\t\t\t$phonesclient_id = $this->Phonesclient->IDPhoneclient;\n\t\t\t\t\techo json_encode(array('success'=>true,'msg'=>__('El grupo fue agregado con &eacute;xito.'),'phonesclient_id'=>$phonesclient_id));\n\t\t\t\t\texit();\n\t\t\t\t}else{\n\t\t\t\t\techo json_encode(array('success'=>false,'msg'=>__('Su informaci&oacute;n es incorrecta'),'validation'=>$this->Phonesclient->validationErrors));\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tif(isset($phonesclient_id)){\n\t\t\t\t$this->loadModel('Phonesgroup');\n\t\t\t\t$this->loadModel('Groupcmd');\n\t\t\t\t\n\t\t\t\t$arr_obj_phonesgroup = $this->Phonesgroup->find('all',\n\t\t\t\t\tarray('conditions'=>array('Phonesgroup.IDPhoneclient' => $phonesclient_id)));\n\n\t\t\t\t$arr_phonesgroup_idgroup = array();\n\t\t\t\tforeach ($arr_obj_phonesgroup as $key => $obj_phonesgroup) {\n\t\t\t\t\t$arr_phonesgroup_idgroup[] = $obj_phonesgroup['Phonesgroup']['IDGroup'];\n\t\t\t\t}\n\n\t\t\t\t$arr_obj_groupcmds = $this->Groupcmd->findObjects('all',array(\n\t\t\t\t\t'conditions'=>array('Groupcmd.Status !=' => 0),\n\t\t\t\t\t'order'=> array('Groupcmd.DGroup desc')));\n\n\t\t\t\t$obj_phonesclient = $this->Phonesclient->findBy('IDPhoneclient', $phonesclient_id);\n\t\t\t\t$this->request->data = $obj_phonesclient->data;\n\t\t\t\t$this->set(compact('phonesclient_id','obj_phonesclient','arr_obj_groupcmds','arr_commandgroup_idgroup'));\n\t\t\t}\n\n\t\t\t$this->loadModel('Groupcmd');\n\t\t\t$arr_commandgroup_idgroup = array();\n\t\t\t$arr_obj_groupcmds = $this->Groupcmd->findObjects('all',array(\n\t\t\t\t'conditions'=>array('Groupcmd.Status !=' => 0),\n\t\t\t\t'order'=> array('Groupcmd.DGroup desc')));\n\t\t\t$this->set(compact('arr_obj_groupcmds','arr_commandgroup_idgroup'));\n\t\t}\n\t}", "private function validateTunnelForm(){\n\t\t$subnet_type = array('lan_subnet','ipaddr','network');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_local_subnet_type'],$subnet_type)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_type');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'ipaddr'){\n\t\t\t//\t\tvalidate local IP address\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_local_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_ipaddr');\n\t\t\t}\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'network'){\n\t\t\t//\t\tValidate network portion of the local subnet\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_local_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_ipaddr');\n\t\t\t}\n\t\t\tif($_POST['services_ipsec_tunnel_local_subnet_subnet'] < 0 || $_POST['services_ipsec_tunnel_local_subnet_subnet'] > 32){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_subnet_subnet');\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!in_array($_POST['services_ipsec_tunnel_remote_subnet_type'],$subnet_type)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_type');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'ipaddr'){\n\t\t\t//\t\tvalidate remote IP address\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_remote_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_ipaddr');\n\t\t\t}\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'network'){\n\t\t\t//\t\tValidate network portion of the remote subnet\n\t\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_remote_subnet_ipaddr'])){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_ipaddr');\n\t\t\t}\n\t\t\tif($_POST['services_ipsec_tunnel_remote_subnet_subnet'] < 0 || $_POST['services_ipsec_tunnel_remote_subnet_subnet'] > 32){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_subnet_subnet');\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_local_gateway'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_local_gateway');\n\t\t}\n\t\t\n\t\tif(!Functions::is_ipAddr($_POST['services_ipsec_tunnel_remote_gateway'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_remote_gateway');\n\t\t}\n\t\t\n\t\tif(!empty($_POST['services_ipsec_tunnel_keepalive_ipaddr']) && !Functions::is_ipAddr($_POST['services_ipsec_tunnel_keepalive_ipaddr'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_keepalive_ipaddr');\n\t\t}\n\t\t\n\t\t$negotiation_modes = array('main','agressive','base');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_negotiation_mode'],$negotiation_modes)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_negotiation_mode');\n\t\t}\n\t\t\n\t\t$identifier_types = array('myipaddr','ipaddr','fqdn','usr_fqdn','dyn_dns');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_id_type'],$identifier_types)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_id_type');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_p1_id_type'] == 'ipaddr' && !Functions::is_ipAddr($_POST['services_ipsec_tunnel_p1_id'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_id');\n\t\t}\n\t\tif($_POST['services_ipsec_tunnel_p1_id_type'] == 'fqdn' && !Functions::isUrl($_POST['services_ipsec_tunnel_p1_id'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_id');\n\t\t}\n\t\t\n\t\t$dh_keygroups = array('1','2','5');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_dh_keygroup'],$dh_keygroups)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_dh_keygroup');\n\t\t}\n\t\t\n\t\tif(!is_numeric($_POST['services_ipsec_tunnel_p1_lifetime'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_lifetime');\n\t\t}\n\t\t\n\t\t$auth_method = array('psk','rsasig');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p1_auth_method'],$auth_method)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_auth_method');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'psk'){\n\t\t\t$found = false;\n\t\t\tforeach($this->data->keys->key as $key){\n\t\t\t\tif($key['id'] == $_POST['services_ipsec_tunnel_p1_preshared_key']){\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\t\n\t\t\tif(!$found){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_preshared_key');\n\t\t\t}\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'rsasig'){\n\t\t\t$found = false;\n\t\t\tforeach($this->data->certificates->certificate as $cert){\n\t\t\t\tif($cert['id'] == $_POST['services_ipsec_tunnel_p1_rsa_sig']){\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\t\n\t\t\tif(!$found){\n\t\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p1_rsa_sig');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$protocol = array('esp','ah','esp_ah');\n\t\tif(!in_array($_POST['services_ipsec_tunnel_p2_protocol'],$protocol)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p2_protocol');\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_p2_pfs_keygroup'] != 'off' && !in_array($_POST['services_ipsec_tunnel_p2_pfs_keygroup'],$dh_keygroups)){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p2_pfs_keygroup');\n\t\t}\n\t\t\n\t\tif(!is_numeric($_POST['services_ipsec_tunnel_p2_lifetime'])){\n\t\t\tErrorHandler::addError('formerror','services_ipsec_tunnel_p2_lifetime');\n\t\t}\n\t\t\n\t\tif(ErrorHandler::errorCount() > 0){\n\t\t\tthrow new Exception('There is invalid form input');\n\t\t}\n\t}", "function control($command){\n\t\tglobal $jbArr;\n\t\t\n\t\tswitch ($command){\n\t\t case \"addwhere\":\n\t\t $_SESSION['jb-addtype'] = $_POST['addplat'];\n\t\t break;\n\t\t}\n\t}", "public function Handler(){\n\t\tif (isset($_POST['add'])){\n\t\t\t$this->guestbookModel->Add(strip_tags($_POST['comment']));\n\t\t} elseif(isset($_POST['clear'])){\n\t\t\t$this->guestbookModel->DeleteAll();\n\t\t} elseif(isset($_SESSION['create'])){\n\t\t\t$this->guestbookModel->Init();\n\t\t}\n\t\t$this->RedirectTo($this->request->CreateUrl($this->request->controller));\n\t}" ]
[ "0.626785", "0.60536283", "0.5828579", "0.58136135", "0.5762051", "0.57211995", "0.5690881", "0.5672909", "0.56667525", "0.5653919", "0.5644392", "0.56437135", "0.5636675", "0.5626331", "0.5608877", "0.55976593", "0.5575544", "0.5573823", "0.5566496", "0.5548915", "0.5548566", "0.5544078", "0.5529468", "0.5525904", "0.5523782", "0.5494934", "0.5483929", "0.5454617", "0.544684", "0.5445108", "0.54217255", "0.54207593", "0.5414079", "0.5411899", "0.5400314", "0.5396336", "0.5395598", "0.53955066", "0.53883165", "0.5359236", "0.53514415", "0.53511715", "0.5351006", "0.53447133", "0.53377414", "0.5327237", "0.53226614", "0.5322201", "0.53122914", "0.53095", "0.53043026", "0.5303331", "0.5297534", "0.5294721", "0.5292842", "0.5291684", "0.5285487", "0.5283534", "0.5279366", "0.52737266", "0.52599466", "0.5255059", "0.5253289", "0.52411443", "0.5236171", "0.52312595", "0.5230822", "0.5223723", "0.52233714", "0.52228665", "0.52210194", "0.521387", "0.5200059", "0.5200059", "0.51950324", "0.519393", "0.5193743", "0.51886994", "0.5188269", "0.5186289", "0.5183064", "0.51808256", "0.5180243", "0.5178082", "0.5173634", "0.51721615", "0.5165819", "0.51650023", "0.5162373", "0.5151082", "0.514521", "0.514475", "0.5140347", "0.5138793", "0.5136833", "0.51319176", "0.5129444", "0.5128704", "0.5128495", "0.5124032" ]
0.7181706
0
Display a listing of the resource.
public function index() { // $data['users'] = User::get(); return view('welcome', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // return view('create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // $rules = [ 'nomor_induk' => 'required|string|unique:users', 'nama' => 'required|string', 'alamat' => 'required', 'tanggal_lahir' => 'required|date', 'tanggal_bergabung' => 'required|date' ]; $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { return redirect('create') ->with('status','Data tidak berhasil ditambahkan, silahkan mengisi form dengan lengkap dan benar') ->withErrors($validator) ->withInput(); } $user = new User; $user->nomor_induk = $request->nomor_induk; $user->nama = $request->nama; $user->alamat = $request->alamat; $user->tanggal_lahir = $request->tanggal_lahir; $user->tanggal_bergabung = $request->tanggal_bergabung; $user->save(); return redirect('/')->with('status', 'Pengguna dengan nama '.$user->name.' telah berhasil ditambahkan'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($nomor_induk) { // if($nomor_induk!=null) { $data['user'] = User::where('nomor_induk', $nomor_induk)->first(); return view('detail', $data); } else return redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78560394", "0.76944435", "0.7274738", "0.7242069", "0.7171281", "0.70639855", "0.7054131", "0.6983364", "0.69478005", "0.69461757", "0.69413805", "0.69277894", "0.690145", "0.68984276", "0.68984276", "0.68784773", "0.68642735", "0.68610847", "0.6857929", "0.684406", "0.6834666", "0.6812317", "0.6806476", "0.68056434", "0.6802016", "0.6796308", "0.67925215", "0.67925215", "0.6788407", "0.67854327", "0.67798024", "0.67778105", "0.6768292", "0.67620933", "0.6746622", "0.6746622", "0.67451817", "0.6744156", "0.67404944", "0.67362344", "0.672656", "0.67133087", "0.66945624", "0.66931814", "0.6689649", "0.6689253", "0.66885525", "0.668543", "0.6683226", "0.66704214", "0.6670041", "0.666635", "0.666635", "0.6661137", "0.66608137", "0.6659381", "0.6657332", "0.66547334", "0.6653617", "0.6643329", "0.6632568", "0.6632244", "0.6628306", "0.6628306", "0.6620114", "0.66194344", "0.66173506", "0.6616366", "0.6611815", "0.6609614", "0.6606548", "0.65972704", "0.6595697", "0.6595222", "0.65914685", "0.65912557", "0.6588314", "0.6581422", "0.6581033", "0.6580827", "0.657766", "0.6577083", "0.6574992", "0.6570292", "0.65680474", "0.65676284", "0.6567584", "0.65626866", "0.6562467", "0.6562467", "0.65586925", "0.6558524", "0.6557367", "0.65571094", "0.6556675", "0.6556111", "0.6555878", "0.6555186", "0.6549289", "0.6548959", "0.65455836" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($nomor_induk) { // if($nomor_induk!=null) { $data['user'] = User::where('nomor_induk', $nomor_induk)->first(); $data['user']->delete(); return redirect('/'); } else return redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
pretizena o kontrolu, jestli byla hodnota opravdu zadana v options
public function getValue() { try { $value = parent::getValue(); if (strlen($value) > 0) { if (!array_key_exists((string)$value, (array)$this->getOptions())) { throw new LBoxExceptionFormControl("$value: ". LBoxExceptionFormControl::MSG_FORM_CONTROL_VALUE_NOT_OPTION, LBoxExceptionFormControl::CODE_FORM_CONTROL_VALUE_NOT_OPTION); } } return $value; } catch (Exception $e) { throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function options();", "public function options();", "public function options();", "public function options();", "public function options();", "protected function get_options()\n\t{}", "public function options() {}", "abstract function options();", "function getOptions() ;", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "public function get_options()\n {\n }", "public function initOptions() {\n parent::initOptions();\n $this->_options->setOpt(\"WTPSI Company ID\",'wtpsicpnyid','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI XML ID\",'wtpsixmlid','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI UserName\",'wtpsiusername','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI Password\",'wtpsixmlpasswd','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI WTP Login\",'wtpsiwtplogin','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI User Contact\",'wtpsicontactuser','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI Contact Password \",'wtpsicontactpasswd','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI POSNO \",'wtpsiposno','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"Utiliser le login company\",'wtpsiusecpny','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI WSDL \",'wtpsiwsdl','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI Add-Ons WSDL \",'wtpsiaddonswsdl','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"VALIDATION des WTP : allproj\",'wtpvalidationallproj','boolean',array('compulsory'=>true), false ,'EPassLibre');\n $this->_options->setOpt(\"VALIDATION des WTP 64 bits\", 'wtp64bits', 'boolean',array('compulsory'=>true), false ,'EPassLibre');\n }", "public function options_load();", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "function inkpro_create_options() {\r\n\treturn array();\r\n}", "public function admin_options(){\r\n echo '<h3>'.__('Netgíró Payment Gateway', 'netgiro').'</h3>';\r\n echo '<p>'.__('Verslaðu á netinu með Netgíró á einfaldan hátt.').'</p>';\r\n echo '<table class=\"form-table\">';\r\n $this -> generate_settings_html();\r\n echo '</table>';\r\n }", "abstract public function getOptions();", "public function admin_options() {\n\n\t\t\t?>\n\t\t\t<h3>ATOS</h3>\n\t\t\t<p><?php _e('Acceptez les paiements par carte bleue grâce à Atos.', 'woothemes'); ?></p>\n\t\t\t<p><?php _e('Plugin créé par David Fiaty', 'woothemes'); ?> - <a href=\"http://www.cmsbox.fr\">http://www.cmsbox.fr</a></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "public function options()\n\t{\n\n\t $tr = new GoogleTranslate('tr');\n\t $tr->setTarget('ru');\n\n\t $options = \\App\\Option::all();\n\t $text = '';\n\n\t foreach ($options as $option) {\n\t $text .= ' | '.$option->id.'=='.$option->title;\n\t }\n\n\t $ru = $tr->translate($text);\n\t $options2 = [];\n\t $options2 = explode(' | ', $ru);\n\t unset($options2[0]);\n\n\t foreach ($options2 as $option2) {\n\t list($id, $title) = explode('==', $option2);\n\t $option_data = $options->firstWhere('id', $id);\n\t $option_data->title = trim($title);\n\t $option_data->slug = str_slug(trim($title));\n\t $option_data->save();\n\t }\n\n\t echo 'The End!';\n\t}", "function getOptions();", "public function optionsAction()\n\t{\n\t\treturn '';\n\t}", "protected function initOptions()\n {\n }", "public function configureOptions();", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "public function options($opts)\n {\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function get_stLight_options($data_options);", "public function controleur_option()\n {\n $this->load->model('m_utilisateurs');\n $resultat = $this->m_utilisateurs->liste_option();\n $results = json_decode(json_encode($resultat), true);\n\n echo \"<option value='' selected='selected'>(choisissez)</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['utl_id'] . \"'>\" . $row['utl_nom'] . \"</option>\";\n }\n }", "public function getOptions()\r\n {\r\n }", "public static function es_admin_option() {\n\t}", "public function __construct() {\n\t\t$this->ryte_option = $this->get_option();\n\t}", "abstract protected function options(): array;", "protected static abstract function getOptions();", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "public function options_init() {\n\t\t\tglobal $allowedtags;\n\t\t\t$allowedtags['p'] = array();\n\t\t\t$this->allowedtags = $allowedtags;\n\n\t\t // set options equal to defaults\n\t\t $this->_options = get_option( $this->options_group[0]['options_name'] );\n\t\t if ( false === $this->_options ) {\n\t\t\t\t$this->_options = $this->get_defaults();\n\t\t }\n\t\t if ( isset( $_GET['undo'] ) && !isset( $_GET['settings-updated'] ) && is_array( $this->get_option('previous') ) ) {\n\t\t \t$this->_options = $this->get_option('previous');\n\t\t }\n\t\t update_option( $this->options_group[0]['options_name'], $this->_options );\t\t\n\t\t \n\t\t}", "public function register_options(){\n\t\tparent::register_options();\n\t\t//$orgzr = \\WBF\\modules\\options\\Organizer::getInstance();\n\t\t//Do stuff...\n\t}", "protected function get_registered_options()\n {\n }", "public function client_option()\n {\n $this->load->model('m_contacts');\n $resultat = $this->m_contacts->liste_option();\n $results = json_decode(json_encode($resultat), true);\n\n echo \"<option value='' selected='selected'>(choisissez)</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['id'] . \"'>\" . $row['value'] . \"</option>\";\n }\n }", "public function updateIncidencia_options()\n {\n $this->output->set_header(\"Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization\");\n $this->output->set_header(\"Access-Control-Allow-Methods: POST, OPTIONS\");\n $this->output->set_header(\"Access-Control-Allow-Origin: *\");\n\n $this->response(null, API_Controller::HTTP_OK);\n }", "function WidgetMeteoControl() {\n\t\t\n\t\t\t$options = get_option('widget_trebimeteo');\n\t\t\tif ( !is_array($options) )\t{ $options = array('title' => 'Previsioni Meteo', 'trebiregione' => '1', 'trebilocalita' => '6', 'trebicuno' => 'ffffff','trebicdue' => 'ffffff', 'trebictre' => 'ffffff', 'trebibuno' => '93c1db', 'trebibdue' => '3a8ebd', 'trebibtre' => 'ffffff', 'trebilarghezza' => '190', 'trebialtezza' => '240', 'trebitipo' => 'xssmall'); }\n\n\t\t\tif ( $_POST['trebimeteo-submit'] )\n\t\t\t{\n\t\t\t\t// Remember to sanitize and format use input appropriately.\n\t\t\t\t$options['trebimeteotitle'] = strip_tags(stripslashes($_POST['trebimeteotitle']));\n\t\t\t\t$options['trebiregione'] = strip_tags(stripslashes($_POST['trebiregione']));\n\t\t\t\t$options['trebilocalita'] = strip_tags(stripslashes($_POST['trebilocalita']));\n\t\t\t\t$options['trebicuno'] = strip_tags(stripslashes($_POST['trebicuno']));\n\t\t\t\t$options['trebicdue'] = strip_tags(stripslashes($_POST['trebicdue']));\n\t\t\t\t$options['trebictre'] = strip_tags(stripslashes($_POST['trebictre']));\n\t\t\t\t$options['trebibuno'] = strip_tags(stripslashes($_POST['trebibuno']));\n\t\t\t\t$options['trebibdue'] = strip_tags(stripslashes($_POST['trebibdue']));\n\t\t\t\t$options['trebibtre'] = strip_tags(stripslashes($_POST['trebibtre']));\n\t\t\t\t$options['trebialtezza'] = strip_tags(stripslashes($_POST['trebialtezza']));\n\t\t\t\t$options['trebilarghezza'] = strip_tags(stripslashes($_POST['trebilarghezza']));\n\t\t\t\t$options['trebitipo'] = strip_tags(stripslashes($_POST['trebitipo']));\n\n\t\t\t\tupdate_option('widget_trebimeteo', $options);\n\t\t\t}\n\n\t\t\t$trebimeteotitle = htmlspecialchars($options['trebimeteotitle'], ENT_QUOTES);\n\t\t\t$trebiregione = htmlspecialchars($options['trebiregione'], ENT_QUOTES);\n\t\t\t$trebilocalita = htmlspecialchars($options['trebilocalita'], ENT_QUOTES);\n\t\t\t$trebicuno = htmlspecialchars($options['trebicuno'], ENT_QUOTES);\n\t\t\t$trebicdue = htmlspecialchars($options['trebicdue'], ENT_QUOTES);\n\t\t\t$trebictre = htmlspecialchars($options['trebictre'], ENT_QUOTES);\n\t\t\t$trebibuno = htmlspecialchars($options['trebibuno'], ENT_QUOTES);\n\t\t\t$trebibdue = htmlspecialchars($options['trebibdue'], ENT_QUOTES);\n\t\t\t$trebibtre = htmlspecialchars($options['trebibtre'], ENT_QUOTES);\n\t\t\t$trebialtezza = htmlspecialchars($options['trebialtezza'], ENT_QUOTES);\n\t\t\t$trebilarghezza = htmlspecialchars($options['trebilarghezza'], ENT_QUOTES);\n\t\t\t$trebitipo = htmlspecialchars($options['trebitipo'], ENT_QUOTES);\n\n\t\t\t$xpath = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),\"\",plugin_basename(__FILE__));\n\t\t\t\n\t\t\t?>\n \n\t<p style=\"text-align:right;\"><label for=\"trebimeteo-title\">Titolo <input id=\"trebimeteotitle\" name=\"trebimeteotitle\" type=\"text\" value=\"<?php echo $trebimeteotitle;?>\" /></label></p>\n <p style=\"text-align:right;\"><label for=\"trebiregione\">ID Regione (<a target=\"_blank\" href=\"<?php echo home_url().'/wp-admin/options-general.php?page=3bmeteo.php'; ?>\">?</a>) <input id=\"trebiregione\" name=\"trebiregione\" type=\"text\" value=\"<?php echo $trebiregione;?>\"/></label></p>\n\t<p style=\"text-align:right;\"><label for=\"trebilocalita\">ID Localit&agrave; (<a target=\"_blank\" href=\"<?php echo home_url().'/wp-admin/options-general.php?page=3bmeteo.php';?>\">?</a>) <input id=\"trebilocalita\" name=\"trebilocalita\" type=\"text\" value=\"<?php echo $trebilocalita;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebialtezza\">Altezza <input id=\"trebialtezza\" name=\"trebialtezza\" type=\"text\" value=\"<?php echo $trebialtezza;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebilarghezza\">Larghezza <input id=\"trebilarghezza\" name=\"trebilarghezza\" type=\"text\" value=\"<?php echo $trebilarghezza;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibuno\">B1 <input id=\"trebibuno\" name=\"trebibuno\" type=\"text\" value=\"<?php echo $trebibuno;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibdue\">B2 <input id=\"trebibdue\" name=\"trebibdue\" type=\"text\" value=\"<?php echo $trebibdue;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibtre\">B3 <input id=\"trebibtre\" name=\"trebibtre\" type=\"text\" value=\"<?php echo $trebibtre;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebicuno\">C1 <input id=\"trebicuno\" name=\"trebicuno\" type=\"text\" value=\"<?php echo $trebicuno;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebicdue\">C2 <input id=\"trebicdue\" name=\"trebicdue\" type=\"text\" value=\"<?php echo $trebicdue;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebictre\">C3 <input id=\"trebictre\" name=\"trebictre\" type=\"text\" value=\"<?php echo $trebictre;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebitipo\">Tipo\n <select id=\"trebitipo\" name=\"trebitipo\"> \n\t\t<option label=\"Localit&agrave; Compatti 1 giorno\" value=\"xssmall\"<?php if ($trebitipo=='xssmall') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 1 giorno</option> \n\t\t<option label=\"Localit&agrave; Compatti 6 giorni\" value=\"lsmall\"<?php if ($trebitipo=='lsmall') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 6 giorni</option> \n\t\t<option label=\"Localit&agrave; Compatti 7 giorni\" value=\"lbigor\"<?php if ($trebitipo=='lbigor') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 7 giorni</option> \n\t\t<option label=\"Localit&agrave; Dati in Diretta\" value=\"treale\"<?php if ($trebitipo=='treale') echo ' selected=\"selected\"';?>>Localit&agrave; Dati in Diretta</option> \n\t\t<option label=\"Tutte le Localit&agrave;\" value=\"ssmall\"<?php if ($trebitipo=='ssmall') echo ' selected=\"selected\"';?>>Tutte le Localit&agrave;</option> \n\t\t<option label=\"Localit&agrave; estese 7 giorni\" value=\"lbig\"<?php if ($trebitipo=='lbig') echo ' selected=\"selected\"';?>>Localit&agrave; estese 7 giorni</option> \n\t\t<option label=\"Localit&agrave; estese orario\" value=\"oraxora\"<?php if ($trebitipo=='oraxora') echo ' selected=\"selected\"';?>>Localit&agrave; estese orario</option> \n\t\t<option label=\"Regionali compatto\" value=\"msmall\"<?php if ($trebitipo=='msmall') echo ' selected=\"selected\"';?>>Regionali compatto</option> \n\t\t<option label=\"Regionali 7 giorni\" value=\"msmacro\"<?php if ($trebitipo=='msmacro') echo ' selected=\"selected\"';?>>Regionali 7 giorni</option> \n\t\t<option label=\"Localit&agrave; Marine 1 giorno\" value=\"lsmari\"<?php if ($trebitipo=='lsmari') echo ' selected=\"selected\"';?>>Localit&agrave; Marine 1 giorno</option> \n\t\t<option label=\"Localit&agrave; Marine 7 giorno\" value=\"lmari\"<?php if ($trebitipo=='lmari') echo ' selected=\"selected\"';?>>Localit&agrave; Marine 7 giorno</option> \n\t\t<option label=\"Regionali Marine 7 giorni\" value=\"mmari\"<?php if ($trebitipo=='mmari') echo ' selected=\"selected\"';?>>Regionali Marine 7 giorni</option> \n\t\t<option label=\"Neve 1 giorno\" value=\"lsneve\"<?php if ($trebitipo=='lsneve') echo ' selected=\"selected\"';?>>Neve 1 giorno</option> \n\t\t<option label=\"Neve 7 giorni\" value=\"lneve\"<?php if ($trebitipo=='lneve') echo ' selected=\"selected\"';?>>Neve 7 giorni</option>\n\t</select>\n </label>\n\t</p>\n <!--<p style=\"text-align:right;\">\n <select id=\"trebimeteoregione\" name=\"trebimeteoregione\"> \n\t\t<option label=\"Abruzzo (idreg=1)\" value=\"1\">Abruzzo (idreg=1)</option> \n\t\t<option label=\"Basilicata (idreg=2)\" value=\"2\">Basilicata (idreg=2)</option> \n\t\t<option label=\"Calabria (idreg=3)\" value=\"3\">Calabria (idreg=3)</option> \n\t\t<option label=\"Campania (idreg=4)\" value=\"4\">Campania (idreg=4)</option> \n\t\t<option label=\"Emilia (idreg=5)\" value=\"5\">Emilia (idreg=5)</option> \n\t\t<option label=\"Friuli (idreg=6)\" value=\"6\">Friuli (idreg=6)</option> \n\t\t<option label=\"Lazio (idreg=7)\" value=\"7\">Lazio (idreg=7)</option> \n\t\t<option label=\"Liguria (idreg=8)\" value=\"8\">Liguria (idreg=8)</option> \n\t\t<option label=\"Lombardia (idreg=9)\" value=\"9\">Lombardia (idreg=9)</option> \n\t\t<option label=\"Marche (idreg=10)\" value=\"10\">Marche (idreg=10)</option> \n\t\t<option label=\"Molise (idreg=11)\" value=\"11\">Molise (idreg=11)</option> \n\t\t<option label=\"Piemonte (idreg=12)\" value=\"12\">Piemonte (idreg=12)</option> \n\t\t<option label=\"Puglia (idreg=13)\" value=\"13\">Puglia (idreg=13)</option> \n\t\t<option label=\"Sardegna (idreg=14)\" value=\"14\">Sardegna (idreg=14)</option> \n\t\t<option label=\"Sicilia (idreg=15)\" value=\"15\">Sicilia (idreg=15)</option> \n\t\t<option label=\"Toscana (idreg=16)\" value=\"16\">Toscana (idreg=16)</option> \n\t\t<option label=\"Trentino (idreg=17)\" value=\"17\">Trentino (idreg=17)</option> \n\t\t<option label=\"Umbria (idreg=18)\" value=\"18\">Umbria (idreg=18)</option> \n\t\t<option label=\"Valle aosta (idreg=19)\" value=\"19\">Valle d'aosta (idreg=19)</option> \n\t\t<option label=\"Veneto (idreg=20)\" value=\"20\">Veneto (idreg=20)</option> \n\t</select> \n\t</p>-->\n <!-- <p style=\"text-align:right;\"> \n\t<select name=\"trebimeteolocalita\" id=\"trebimeteolocalita\"> \n\t\t<option label=\"Seleziona Localit&agrave;\" value=\"01\">Seleziona Localit&agrave;</option> \n\t</select> \n <p style=\"text-align:right;\"><label for=\"trebiloc\">Localit&agrave; <input style=\"width: 200px;\" id=\"trebiloc\" name=\"trebiloc\" type=\"text\" value=\"<?php //echo $loc;?>\" /></label></p>-->\n <p><input type=\"hidden\" id=\"trebimeteo-submit\" name=\"trebimeteo-submit\" value=\"1\" /></p> \n<?php\n\t\t}", "abstract function fields_options();", "function yaz_set_option($id, $options)\n{\n}", "private function setOptsFromGET(){\n\n $this->_opt['save'] = 0;\n\n $this->_opt['show_reps'] = 1;\n\n /* Replace default Options with GET params */\n\n foreach($_GET as $key=>$value){\n\n $this->_opt[$key] = $value;\n }\n\n \n\n }", "static function optionsIns();", "private function showOptions() : void\n {\n $selectedOption = $this->console->choice(__('Please cheoose your option:'), $this->getAllOptions() );\n $this->setSelectedOption($selectedOption);\n $this->handleOption();\n }", "public function options($crud = 'list'){\n if($crud==='list'){\n $data['title']='Options';\n $this->load->server('settings/options',$data);\n }\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "public function process_admin_options() {\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ) update_option( 'jigoshop_tgm_custom_gateway_enabled', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_enabled' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_title'] ) ) update_option( 'jigoshop_tgm_custom_gateway_title', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_title'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_title' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_description'] ) ) update_option( 'jigoshop_tgm_custom_gateway_description', \tjigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_description'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_description' );\n \t}", "function wassupoptions() {\n\t\t//# initialize class variables with current options \n\t\t//# or with defaults if none\n\t\t$this->loadSettings();\n\t}", "protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }", "public function remove_options()\n {\n }", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function admin_options(){\r\n \r\n if(!get_option('woocommerce_flow_api_key_valid'))\r\n $this->add_error('La llave de api es obligatoria.');\r\n\r\n if(!get_option('woocommerce_flow_secret_key_valid')){\r\n $this->add_error('La llave secreta es obligatoria.');\r\n }\r\n\r\n if($this->is_valid_for_use()){\r\n $this->display_errors();\r\n parent::admin_options();\r\n }\r\n else{\r\n ?>\r\n <div class=\"inline error\">\r\n <p>\r\n <strong><?php esc_html_e( 'Gateway disabled', 'woocommerce' ); ?></strong>: <?php esc_html_e( 'Flow no soporta el tipo de moneda (' .get_woocommerce_currency() .').', 'woocommerce' ); ?>\r\n </p>\r\n </div>\r\n <?php\r\n }\r\n \r\n }", "protected\n function getOptions() {\n return array();\n }", "function lg_mac_activ_options()\n\t{\n\t\t$theme_opts =get_option('lgmac_opts');\n\t\tif(!$theme_opts) //si le theme est désactivé et réactivé plus tard il ne sera pas nécessaire de reactiver le theme\n\t\t\t{\t\t\t//afin de créer l'option\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t$opts =array(\n\t\t\t\t'image_01_url' => '',\n\t\t\t\t'slider_shortcode' =>'',\n\t\t\t\t'HeaderC' =>'',\n\t\t\t\t'FooterColor'=>'',\n\t\t\t\t'FooterCopyright'=>'',\n\t\t\t\t'lgmac_img_FirstBlock'=>'',\n\t\t\t\t'lgmac_img_firstblock133'=>'',\n\n\n\t\t\t\t);\n\t\t\t\tadd_option('lgmac_opts',$opts);\n\t\t\t}\n\t}", "protected function getOptions()\n\t{\n\t\t$this->options['USE_ACCOUNT_NUMBER'] = (Config\\Option::get(\"sale\", \"account_number_template\", \"\") !== \"\") ? true : false;\n\t}", "public function save_option() {\n\t\tupdate_option( self::OPTION_NAME, $this->ryte_option );\n\t}", "public function view_option()\n{\n\t//option included, excluded\n\treturn \"excluded\";\n}", "public function view_option()\n{\n\t//option included, excluded\n\treturn \"excluded\";\n}", "public function options($config);", "public function optionsAction() {\n\n $request = $this->getRequest();\n $orderId = (integer) $request->getParam('orderId', 0);\n\n $order = null;\n //try to find according to customerId\n if ($orderId > 0) {\n try {\n $order = new Yourdelivery_Model_Order($orderId);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n \n }\n }\n \n $this->view->order = $order;\n }", "public static function set_options() {\r\n\t\tself::add_option(\"my_option\", \"foo\");\r\n\t}", "protected function _getDefaultOptions()\n {\n }", "public function optionList(){\n $this->layout = null;\n\n\t $this->set('chamados',\n $this->Chamado->find('list', array(\n 'fields' => array('Chamado.id', 'Chamado.numero'),\n 'conditions' => array('Chamado.servico_id' => $this->params['url']['servico']))));\n }", "function get_options(){\n\t\treturn $this->options;\n\t}", "function __construct(){\n\t\t$this->options();\n\t}", "public function options($opts)\n {\n parent::options($opts);\n }", "function post_options()\n\t{\n\t\tglobal $auth;\n\n\t\t$this->auth_bbcode = ($auth->acl_get('u_blogbbcode')) ? true : false;\n\t\t$this->auth_smilies = ($auth->acl_get('u_blogsmilies')) ? true : false;\n\t\t$this->auth_img = ($auth->acl_get('u_blogimg')) ? true : false;\n\t\t$this->auth_url = ($auth->acl_get('u_blogurl')) ? true : false;\n\t\t$this->auth_flash = ($auth->acl_get('u_blogflash')) ? true : false;\n\n\t\tblog_plugins::plugin_do('post_options');\n\t}", "public function setOptions($options){\n\n\t}", "function form_options($options) {\n }", "function of_option_setup()\t{\n\t\n\tglobal $of_options, $options_machine;\n\t\n\t$options_machine = new Options_Machine($of_options);\n\t\t\n\tif (!get_option(OPTIONS)){\n\t\t\n\t\t$defaults = (array) $options_machine->Defaults;\n\t\tupdate_option(OPTIONS,$defaults);\n\t\tgenerate_options_css($defaults); \n\t\t\n\t}\n\t\n\t\n}", "function options() {\n require( TEMPLATE_PATH . \"/options.php\" );\n}", "function panier_options_recuperer_fond($flux){\n\t\n\t// surcharge la configuration du panier\n \tif ($flux['args']['fond'] == 'formulaires/configurer_paniers'){\n \t\tinclude_spip('inc/config');\n \t\t$flux['args']['contexte']['code_avantage'] = lire_config(\"paniers/panier_options/code_avantage\"); \n $flux['args']['contexte']['pourcentage_avantage'] = lire_config(\"paniers/panier_options/pourcentage_avantage\");\n \n \t\t$option_champ = recuperer_fond('formulaires/configurer_paniers_options', $flux['args']['contexte']);\n \t\t$flux['data']['texte'] = str_replace('<!--extra-->', '<!--extra-->' . $option_champ, $flux['data']['texte']); \t\t\t\n \t}\n \t\n \t// surcharge le formulaire du panier\n \tif ($flux['args']['fond'] == 'formulaires/panier'){\n \t\t\n \t\tinclude_spip('inc/config');\n \t\t$pourcentage_avantage = lire_config(\"paniers/panier_options/pourcentage_avantage\");\n \t\t$code_avantage = lire_config(\"paniers/panier_options/code_avantage\"); \n \t\t\n \t\t//seulement si l'option est configurée\n \t\tif($pourcentage_avantage && $code_avantage){\n \t\t\t$flux['args']['contexte']['_pourcentage_avantage'] = $pourcentage_avantage;\n \t\t\t$code_valide=false;\n \t\t\t\n \t\t\t//est-ce que l'avantage est déjà validé ?\n \t\t\tif (!$id_panier) {\n\t\t\t\tinclude_spip('inc/paniers');\n\t\t\t\t$id_panier = paniers_id_panier_encours();\n\t\t\t}\n \t\t\t$avantage_valide = sql_getfetsel('options','spip_paniers',array('id_panier = '.sql_quote($id_panier)));\n \t\t\tif($avantage_valide==\"avantage_valide\") $code_valide=true;\n \t\t\t\n \t\t\t//sinon tester si votre_code_avantage est le bon\n \t\t\tif($code_valide==false){\n\t\t\t\t$config_code_avantage = lire_config(\"paniers/panier_options/code_avantage\");\n\t\t\t\t$request_code_avantage=_request('votre_code_avantage');\n\t\t\t\tif($request_code_avantage==$config_code_avantage)$code_valide=true;\n\t\t\t}\n\t\t\tif($code_valide){\n\t\t\t\t//afficher le formulaire avec l'avantage calculé\n\t\t\t\t$option_calculer = recuperer_fond('formulaires/avantage_calculer_total', $flux['args']['contexte']);\n\t\t\t\t$flux['data']['texte'] = preg_replace('%(<tr class=\"total_ttc(.*?)</tr>)%is', ' '.\"\\n\".$option_calculer, $flux['data']['texte']);\n\t\t\t}\n \t\t\n\t\t\t//affiche le champ input votre_code_avantage\n\t\t\t$option_champ = recuperer_fond('formulaires/avantage_option_input', $flux['args']['contexte']);\n\t\t\t$flux['data']['texte'] = str_replace('</table>', '</table>' . $option_champ, $flux['data']['texte']);\n \t\t}\n \t}\n \t\n\n \treturn $flux;\n}" ]
[ "0.72613066", "0.72613066", "0.72613066", "0.72613066", "0.72613066", "0.71345896", "0.7083198", "0.6962012", "0.6934162", "0.6877075", "0.687704", "0.687704", "0.6835018", "0.66093355", "0.6590709", "0.6577263", "0.6577263", "0.65758413", "0.6555942", "0.65462404", "0.65135205", "0.65004545", "0.64737874", "0.6464996", "0.64405406", "0.6431425", "0.6397812", "0.63855577", "0.63804764", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6376528", "0.6345907", "0.63442427", "0.6343486", "0.6335261", "0.63188547", "0.6315012", "0.62935185", "0.62405825", "0.6223206", "0.6207922", "0.6197014", "0.6172204", "0.616245", "0.6153138", "0.6146656", "0.61439204", "0.612581", "0.6122547", "0.6118926", "0.611372", "0.60894483", "0.60894483", "0.60894483", "0.60894483", "0.6088427", "0.60776544", "0.60764456", "0.60687006", "0.60686564", "0.60686564", "0.60686564", "0.60686564", "0.60686564", "0.60686564", "0.60686564", "0.6061058", "0.6059108", "0.60463244", "0.6029423", "0.60271823", "0.60240066", "0.60240066", "0.60217", "0.6016996", "0.60148627", "0.6011124", "0.60099846", "0.6008114", "0.60051024", "0.5997568", "0.5989355", "0.5974845", "0.5965132", "0.59606147", "0.5950121", "0.5948804" ]
0.0
-1
pretizena o kontrolu, jestli byla hodnota opravdu zadana v options
public function setValue($value = NULL) { try { if ($value && !array_key_exists($value, $this->options)) { throw new LBoxExceptionFormControl(LBoxExceptionFormControl::MSG_FORM_CONTROL_VALUE_NOT_OPTION, LBoxExceptionFormControl::CODE_FORM_CONTROL_VALUE_NOT_OPTION); } parent::setValue($value); } catch (Exception $e) { throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function options();", "public function options();", "public function options();", "public function options();", "public function options();", "protected function get_options()\n\t{}", "public function options() {}", "abstract function options();", "function getOptions() ;", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "public function get_options()\n {\n }", "public function initOptions() {\n parent::initOptions();\n $this->_options->setOpt(\"WTPSI Company ID\",'wtpsicpnyid','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI XML ID\",'wtpsixmlid','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI UserName\",'wtpsiusername','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI Password\",'wtpsixmlpasswd','text',array('compulsory'=>false), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI WTP Login\",'wtpsiwtplogin','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI User Contact\",'wtpsicontactuser','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI Contact Password \",'wtpsicontactpasswd','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI POSNO \",'wtpsiposno','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"Utiliser le login company\",'wtpsiusecpny','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI WSDL \",'wtpsiwsdl','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"WTPSI Add-Ons WSDL \",'wtpsiaddonswsdl','text',array('compulsory'=>true), NULL ,'EPassLibre');\n $this->_options->setOpt(\"VALIDATION des WTP : allproj\",'wtpvalidationallproj','boolean',array('compulsory'=>true), false ,'EPassLibre');\n $this->_options->setOpt(\"VALIDATION des WTP 64 bits\", 'wtp64bits', 'boolean',array('compulsory'=>true), false ,'EPassLibre');\n }", "public function options_load();", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "function inkpro_create_options() {\r\n\treturn array();\r\n}", "public function admin_options(){\r\n echo '<h3>'.__('Netgíró Payment Gateway', 'netgiro').'</h3>';\r\n echo '<p>'.__('Verslaðu á netinu með Netgíró á einfaldan hátt.').'</p>';\r\n echo '<table class=\"form-table\">';\r\n $this -> generate_settings_html();\r\n echo '</table>';\r\n }", "abstract public function getOptions();", "public function admin_options() {\n\n\t\t\t?>\n\t\t\t<h3>ATOS</h3>\n\t\t\t<p><?php _e('Acceptez les paiements par carte bleue grâce à Atos.', 'woothemes'); ?></p>\n\t\t\t<p><?php _e('Plugin créé par David Fiaty', 'woothemes'); ?> - <a href=\"http://www.cmsbox.fr\">http://www.cmsbox.fr</a></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "public function options()\n\t{\n\n\t $tr = new GoogleTranslate('tr');\n\t $tr->setTarget('ru');\n\n\t $options = \\App\\Option::all();\n\t $text = '';\n\n\t foreach ($options as $option) {\n\t $text .= ' | '.$option->id.'=='.$option->title;\n\t }\n\n\t $ru = $tr->translate($text);\n\t $options2 = [];\n\t $options2 = explode(' | ', $ru);\n\t unset($options2[0]);\n\n\t foreach ($options2 as $option2) {\n\t list($id, $title) = explode('==', $option2);\n\t $option_data = $options->firstWhere('id', $id);\n\t $option_data->title = trim($title);\n\t $option_data->slug = str_slug(trim($title));\n\t $option_data->save();\n\t }\n\n\t echo 'The End!';\n\t}", "function getOptions();", "public function optionsAction()\n\t{\n\t\treturn '';\n\t}", "protected function initOptions()\n {\n }", "public function configureOptions();", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "public function options($opts)\n {\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function get_stLight_options($data_options);", "public function controleur_option()\n {\n $this->load->model('m_utilisateurs');\n $resultat = $this->m_utilisateurs->liste_option();\n $results = json_decode(json_encode($resultat), true);\n\n echo \"<option value='' selected='selected'>(choisissez)</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['utl_id'] . \"'>\" . $row['utl_nom'] . \"</option>\";\n }\n }", "public function getOptions()\r\n {\r\n }", "public static function es_admin_option() {\n\t}", "public function __construct() {\n\t\t$this->ryte_option = $this->get_option();\n\t}", "abstract protected function options(): array;", "protected static abstract function getOptions();", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "public function options_init() {\n\t\t\tglobal $allowedtags;\n\t\t\t$allowedtags['p'] = array();\n\t\t\t$this->allowedtags = $allowedtags;\n\n\t\t // set options equal to defaults\n\t\t $this->_options = get_option( $this->options_group[0]['options_name'] );\n\t\t if ( false === $this->_options ) {\n\t\t\t\t$this->_options = $this->get_defaults();\n\t\t }\n\t\t if ( isset( $_GET['undo'] ) && !isset( $_GET['settings-updated'] ) && is_array( $this->get_option('previous') ) ) {\n\t\t \t$this->_options = $this->get_option('previous');\n\t\t }\n\t\t update_option( $this->options_group[0]['options_name'], $this->_options );\t\t\n\t\t \n\t\t}", "public function register_options(){\n\t\tparent::register_options();\n\t\t//$orgzr = \\WBF\\modules\\options\\Organizer::getInstance();\n\t\t//Do stuff...\n\t}", "protected function get_registered_options()\n {\n }", "public function client_option()\n {\n $this->load->model('m_contacts');\n $resultat = $this->m_contacts->liste_option();\n $results = json_decode(json_encode($resultat), true);\n\n echo \"<option value='' selected='selected'>(choisissez)</option>\";\n foreach ($results as $row) {\n echo \"<option value='\" . $row['id'] . \"'>\" . $row['value'] . \"</option>\";\n }\n }", "public function updateIncidencia_options()\n {\n $this->output->set_header(\"Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization\");\n $this->output->set_header(\"Access-Control-Allow-Methods: POST, OPTIONS\");\n $this->output->set_header(\"Access-Control-Allow-Origin: *\");\n\n $this->response(null, API_Controller::HTTP_OK);\n }", "function WidgetMeteoControl() {\n\t\t\n\t\t\t$options = get_option('widget_trebimeteo');\n\t\t\tif ( !is_array($options) )\t{ $options = array('title' => 'Previsioni Meteo', 'trebiregione' => '1', 'trebilocalita' => '6', 'trebicuno' => 'ffffff','trebicdue' => 'ffffff', 'trebictre' => 'ffffff', 'trebibuno' => '93c1db', 'trebibdue' => '3a8ebd', 'trebibtre' => 'ffffff', 'trebilarghezza' => '190', 'trebialtezza' => '240', 'trebitipo' => 'xssmall'); }\n\n\t\t\tif ( $_POST['trebimeteo-submit'] )\n\t\t\t{\n\t\t\t\t// Remember to sanitize and format use input appropriately.\n\t\t\t\t$options['trebimeteotitle'] = strip_tags(stripslashes($_POST['trebimeteotitle']));\n\t\t\t\t$options['trebiregione'] = strip_tags(stripslashes($_POST['trebiregione']));\n\t\t\t\t$options['trebilocalita'] = strip_tags(stripslashes($_POST['trebilocalita']));\n\t\t\t\t$options['trebicuno'] = strip_tags(stripslashes($_POST['trebicuno']));\n\t\t\t\t$options['trebicdue'] = strip_tags(stripslashes($_POST['trebicdue']));\n\t\t\t\t$options['trebictre'] = strip_tags(stripslashes($_POST['trebictre']));\n\t\t\t\t$options['trebibuno'] = strip_tags(stripslashes($_POST['trebibuno']));\n\t\t\t\t$options['trebibdue'] = strip_tags(stripslashes($_POST['trebibdue']));\n\t\t\t\t$options['trebibtre'] = strip_tags(stripslashes($_POST['trebibtre']));\n\t\t\t\t$options['trebialtezza'] = strip_tags(stripslashes($_POST['trebialtezza']));\n\t\t\t\t$options['trebilarghezza'] = strip_tags(stripslashes($_POST['trebilarghezza']));\n\t\t\t\t$options['trebitipo'] = strip_tags(stripslashes($_POST['trebitipo']));\n\n\t\t\t\tupdate_option('widget_trebimeteo', $options);\n\t\t\t}\n\n\t\t\t$trebimeteotitle = htmlspecialchars($options['trebimeteotitle'], ENT_QUOTES);\n\t\t\t$trebiregione = htmlspecialchars($options['trebiregione'], ENT_QUOTES);\n\t\t\t$trebilocalita = htmlspecialchars($options['trebilocalita'], ENT_QUOTES);\n\t\t\t$trebicuno = htmlspecialchars($options['trebicuno'], ENT_QUOTES);\n\t\t\t$trebicdue = htmlspecialchars($options['trebicdue'], ENT_QUOTES);\n\t\t\t$trebictre = htmlspecialchars($options['trebictre'], ENT_QUOTES);\n\t\t\t$trebibuno = htmlspecialchars($options['trebibuno'], ENT_QUOTES);\n\t\t\t$trebibdue = htmlspecialchars($options['trebibdue'], ENT_QUOTES);\n\t\t\t$trebibtre = htmlspecialchars($options['trebibtre'], ENT_QUOTES);\n\t\t\t$trebialtezza = htmlspecialchars($options['trebialtezza'], ENT_QUOTES);\n\t\t\t$trebilarghezza = htmlspecialchars($options['trebilarghezza'], ENT_QUOTES);\n\t\t\t$trebitipo = htmlspecialchars($options['trebitipo'], ENT_QUOTES);\n\n\t\t\t$xpath = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),\"\",plugin_basename(__FILE__));\n\t\t\t\n\t\t\t?>\n \n\t<p style=\"text-align:right;\"><label for=\"trebimeteo-title\">Titolo <input id=\"trebimeteotitle\" name=\"trebimeteotitle\" type=\"text\" value=\"<?php echo $trebimeteotitle;?>\" /></label></p>\n <p style=\"text-align:right;\"><label for=\"trebiregione\">ID Regione (<a target=\"_blank\" href=\"<?php echo home_url().'/wp-admin/options-general.php?page=3bmeteo.php'; ?>\">?</a>) <input id=\"trebiregione\" name=\"trebiregione\" type=\"text\" value=\"<?php echo $trebiregione;?>\"/></label></p>\n\t<p style=\"text-align:right;\"><label for=\"trebilocalita\">ID Localit&agrave; (<a target=\"_blank\" href=\"<?php echo home_url().'/wp-admin/options-general.php?page=3bmeteo.php';?>\">?</a>) <input id=\"trebilocalita\" name=\"trebilocalita\" type=\"text\" value=\"<?php echo $trebilocalita;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebialtezza\">Altezza <input id=\"trebialtezza\" name=\"trebialtezza\" type=\"text\" value=\"<?php echo $trebialtezza;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebilarghezza\">Larghezza <input id=\"trebilarghezza\" name=\"trebilarghezza\" type=\"text\" value=\"<?php echo $trebilarghezza;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibuno\">B1 <input id=\"trebibuno\" name=\"trebibuno\" type=\"text\" value=\"<?php echo $trebibuno;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibdue\">B2 <input id=\"trebibdue\" name=\"trebibdue\" type=\"text\" value=\"<?php echo $trebibdue;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibtre\">B3 <input id=\"trebibtre\" name=\"trebibtre\" type=\"text\" value=\"<?php echo $trebibtre;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebicuno\">C1 <input id=\"trebicuno\" name=\"trebicuno\" type=\"text\" value=\"<?php echo $trebicuno;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebicdue\">C2 <input id=\"trebicdue\" name=\"trebicdue\" type=\"text\" value=\"<?php echo $trebicdue;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebictre\">C3 <input id=\"trebictre\" name=\"trebictre\" type=\"text\" value=\"<?php echo $trebictre;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebitipo\">Tipo\n <select id=\"trebitipo\" name=\"trebitipo\"> \n\t\t<option label=\"Localit&agrave; Compatti 1 giorno\" value=\"xssmall\"<?php if ($trebitipo=='xssmall') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 1 giorno</option> \n\t\t<option label=\"Localit&agrave; Compatti 6 giorni\" value=\"lsmall\"<?php if ($trebitipo=='lsmall') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 6 giorni</option> \n\t\t<option label=\"Localit&agrave; Compatti 7 giorni\" value=\"lbigor\"<?php if ($trebitipo=='lbigor') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 7 giorni</option> \n\t\t<option label=\"Localit&agrave; Dati in Diretta\" value=\"treale\"<?php if ($trebitipo=='treale') echo ' selected=\"selected\"';?>>Localit&agrave; Dati in Diretta</option> \n\t\t<option label=\"Tutte le Localit&agrave;\" value=\"ssmall\"<?php if ($trebitipo=='ssmall') echo ' selected=\"selected\"';?>>Tutte le Localit&agrave;</option> \n\t\t<option label=\"Localit&agrave; estese 7 giorni\" value=\"lbig\"<?php if ($trebitipo=='lbig') echo ' selected=\"selected\"';?>>Localit&agrave; estese 7 giorni</option> \n\t\t<option label=\"Localit&agrave; estese orario\" value=\"oraxora\"<?php if ($trebitipo=='oraxora') echo ' selected=\"selected\"';?>>Localit&agrave; estese orario</option> \n\t\t<option label=\"Regionali compatto\" value=\"msmall\"<?php if ($trebitipo=='msmall') echo ' selected=\"selected\"';?>>Regionali compatto</option> \n\t\t<option label=\"Regionali 7 giorni\" value=\"msmacro\"<?php if ($trebitipo=='msmacro') echo ' selected=\"selected\"';?>>Regionali 7 giorni</option> \n\t\t<option label=\"Localit&agrave; Marine 1 giorno\" value=\"lsmari\"<?php if ($trebitipo=='lsmari') echo ' selected=\"selected\"';?>>Localit&agrave; Marine 1 giorno</option> \n\t\t<option label=\"Localit&agrave; Marine 7 giorno\" value=\"lmari\"<?php if ($trebitipo=='lmari') echo ' selected=\"selected\"';?>>Localit&agrave; Marine 7 giorno</option> \n\t\t<option label=\"Regionali Marine 7 giorni\" value=\"mmari\"<?php if ($trebitipo=='mmari') echo ' selected=\"selected\"';?>>Regionali Marine 7 giorni</option> \n\t\t<option label=\"Neve 1 giorno\" value=\"lsneve\"<?php if ($trebitipo=='lsneve') echo ' selected=\"selected\"';?>>Neve 1 giorno</option> \n\t\t<option label=\"Neve 7 giorni\" value=\"lneve\"<?php if ($trebitipo=='lneve') echo ' selected=\"selected\"';?>>Neve 7 giorni</option>\n\t</select>\n </label>\n\t</p>\n <!--<p style=\"text-align:right;\">\n <select id=\"trebimeteoregione\" name=\"trebimeteoregione\"> \n\t\t<option label=\"Abruzzo (idreg=1)\" value=\"1\">Abruzzo (idreg=1)</option> \n\t\t<option label=\"Basilicata (idreg=2)\" value=\"2\">Basilicata (idreg=2)</option> \n\t\t<option label=\"Calabria (idreg=3)\" value=\"3\">Calabria (idreg=3)</option> \n\t\t<option label=\"Campania (idreg=4)\" value=\"4\">Campania (idreg=4)</option> \n\t\t<option label=\"Emilia (idreg=5)\" value=\"5\">Emilia (idreg=5)</option> \n\t\t<option label=\"Friuli (idreg=6)\" value=\"6\">Friuli (idreg=6)</option> \n\t\t<option label=\"Lazio (idreg=7)\" value=\"7\">Lazio (idreg=7)</option> \n\t\t<option label=\"Liguria (idreg=8)\" value=\"8\">Liguria (idreg=8)</option> \n\t\t<option label=\"Lombardia (idreg=9)\" value=\"9\">Lombardia (idreg=9)</option> \n\t\t<option label=\"Marche (idreg=10)\" value=\"10\">Marche (idreg=10)</option> \n\t\t<option label=\"Molise (idreg=11)\" value=\"11\">Molise (idreg=11)</option> \n\t\t<option label=\"Piemonte (idreg=12)\" value=\"12\">Piemonte (idreg=12)</option> \n\t\t<option label=\"Puglia (idreg=13)\" value=\"13\">Puglia (idreg=13)</option> \n\t\t<option label=\"Sardegna (idreg=14)\" value=\"14\">Sardegna (idreg=14)</option> \n\t\t<option label=\"Sicilia (idreg=15)\" value=\"15\">Sicilia (idreg=15)</option> \n\t\t<option label=\"Toscana (idreg=16)\" value=\"16\">Toscana (idreg=16)</option> \n\t\t<option label=\"Trentino (idreg=17)\" value=\"17\">Trentino (idreg=17)</option> \n\t\t<option label=\"Umbria (idreg=18)\" value=\"18\">Umbria (idreg=18)</option> \n\t\t<option label=\"Valle aosta (idreg=19)\" value=\"19\">Valle d'aosta (idreg=19)</option> \n\t\t<option label=\"Veneto (idreg=20)\" value=\"20\">Veneto (idreg=20)</option> \n\t</select> \n\t</p>-->\n <!-- <p style=\"text-align:right;\"> \n\t<select name=\"trebimeteolocalita\" id=\"trebimeteolocalita\"> \n\t\t<option label=\"Seleziona Localit&agrave;\" value=\"01\">Seleziona Localit&agrave;</option> \n\t</select> \n <p style=\"text-align:right;\"><label for=\"trebiloc\">Localit&agrave; <input style=\"width: 200px;\" id=\"trebiloc\" name=\"trebiloc\" type=\"text\" value=\"<?php //echo $loc;?>\" /></label></p>-->\n <p><input type=\"hidden\" id=\"trebimeteo-submit\" name=\"trebimeteo-submit\" value=\"1\" /></p> \n<?php\n\t\t}", "abstract function fields_options();", "function yaz_set_option($id, $options)\n{\n}", "private function setOptsFromGET(){\n\n $this->_opt['save'] = 0;\n\n $this->_opt['show_reps'] = 1;\n\n /* Replace default Options with GET params */\n\n foreach($_GET as $key=>$value){\n\n $this->_opt[$key] = $value;\n }\n\n \n\n }", "static function optionsIns();", "private function showOptions() : void\n {\n $selectedOption = $this->console->choice(__('Please cheoose your option:'), $this->getAllOptions() );\n $this->setSelectedOption($selectedOption);\n $this->handleOption();\n }", "public function options($crud = 'list'){\n if($crud==='list'){\n $data['title']='Options';\n $this->load->server('settings/options',$data);\n }\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "public function process_admin_options() {\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ) update_option( 'jigoshop_tgm_custom_gateway_enabled', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_enabled' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_title'] ) ) update_option( 'jigoshop_tgm_custom_gateway_title', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_title'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_title' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_description'] ) ) update_option( 'jigoshop_tgm_custom_gateway_description', \tjigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_description'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_description' );\n \t}", "function wassupoptions() {\n\t\t//# initialize class variables with current options \n\t\t//# or with defaults if none\n\t\t$this->loadSettings();\n\t}", "protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }", "public function remove_options()\n {\n }", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function admin_options(){\r\n \r\n if(!get_option('woocommerce_flow_api_key_valid'))\r\n $this->add_error('La llave de api es obligatoria.');\r\n\r\n if(!get_option('woocommerce_flow_secret_key_valid')){\r\n $this->add_error('La llave secreta es obligatoria.');\r\n }\r\n\r\n if($this->is_valid_for_use()){\r\n $this->display_errors();\r\n parent::admin_options();\r\n }\r\n else{\r\n ?>\r\n <div class=\"inline error\">\r\n <p>\r\n <strong><?php esc_html_e( 'Gateway disabled', 'woocommerce' ); ?></strong>: <?php esc_html_e( 'Flow no soporta el tipo de moneda (' .get_woocommerce_currency() .').', 'woocommerce' ); ?>\r\n </p>\r\n </div>\r\n <?php\r\n }\r\n \r\n }", "protected\n function getOptions() {\n return array();\n }", "function lg_mac_activ_options()\n\t{\n\t\t$theme_opts =get_option('lgmac_opts');\n\t\tif(!$theme_opts) //si le theme est désactivé et réactivé plus tard il ne sera pas nécessaire de reactiver le theme\n\t\t\t{\t\t\t//afin de créer l'option\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t$opts =array(\n\t\t\t\t'image_01_url' => '',\n\t\t\t\t'slider_shortcode' =>'',\n\t\t\t\t'HeaderC' =>'',\n\t\t\t\t'FooterColor'=>'',\n\t\t\t\t'FooterCopyright'=>'',\n\t\t\t\t'lgmac_img_FirstBlock'=>'',\n\t\t\t\t'lgmac_img_firstblock133'=>'',\n\n\n\t\t\t\t);\n\t\t\t\tadd_option('lgmac_opts',$opts);\n\t\t\t}\n\t}", "protected function getOptions()\n\t{\n\t\t$this->options['USE_ACCOUNT_NUMBER'] = (Config\\Option::get(\"sale\", \"account_number_template\", \"\") !== \"\") ? true : false;\n\t}", "public function save_option() {\n\t\tupdate_option( self::OPTION_NAME, $this->ryte_option );\n\t}", "public function view_option()\n{\n\t//option included, excluded\n\treturn \"excluded\";\n}", "public function view_option()\n{\n\t//option included, excluded\n\treturn \"excluded\";\n}", "public function options($config);", "public function optionsAction() {\n\n $request = $this->getRequest();\n $orderId = (integer) $request->getParam('orderId', 0);\n\n $order = null;\n //try to find according to customerId\n if ($orderId > 0) {\n try {\n $order = new Yourdelivery_Model_Order($orderId);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n \n }\n }\n \n $this->view->order = $order;\n }", "public static function set_options() {\r\n\t\tself::add_option(\"my_option\", \"foo\");\r\n\t}", "protected function _getDefaultOptions()\n {\n }", "public function optionList(){\n $this->layout = null;\n\n\t $this->set('chamados',\n $this->Chamado->find('list', array(\n 'fields' => array('Chamado.id', 'Chamado.numero'),\n 'conditions' => array('Chamado.servico_id' => $this->params['url']['servico']))));\n }", "function get_options(){\n\t\treturn $this->options;\n\t}", "function __construct(){\n\t\t$this->options();\n\t}", "public function options($opts)\n {\n parent::options($opts);\n }", "function post_options()\n\t{\n\t\tglobal $auth;\n\n\t\t$this->auth_bbcode = ($auth->acl_get('u_blogbbcode')) ? true : false;\n\t\t$this->auth_smilies = ($auth->acl_get('u_blogsmilies')) ? true : false;\n\t\t$this->auth_img = ($auth->acl_get('u_blogimg')) ? true : false;\n\t\t$this->auth_url = ($auth->acl_get('u_blogurl')) ? true : false;\n\t\t$this->auth_flash = ($auth->acl_get('u_blogflash')) ? true : false;\n\n\t\tblog_plugins::plugin_do('post_options');\n\t}", "public function setOptions($options){\n\n\t}", "function form_options($options) {\n }", "function of_option_setup()\t{\n\t\n\tglobal $of_options, $options_machine;\n\t\n\t$options_machine = new Options_Machine($of_options);\n\t\t\n\tif (!get_option(OPTIONS)){\n\t\t\n\t\t$defaults = (array) $options_machine->Defaults;\n\t\tupdate_option(OPTIONS,$defaults);\n\t\tgenerate_options_css($defaults); \n\t\t\n\t}\n\t\n\t\n}", "function options() {\n require( TEMPLATE_PATH . \"/options.php\" );\n}", "function panier_options_recuperer_fond($flux){\n\t\n\t// surcharge la configuration du panier\n \tif ($flux['args']['fond'] == 'formulaires/configurer_paniers'){\n \t\tinclude_spip('inc/config');\n \t\t$flux['args']['contexte']['code_avantage'] = lire_config(\"paniers/panier_options/code_avantage\"); \n $flux['args']['contexte']['pourcentage_avantage'] = lire_config(\"paniers/panier_options/pourcentage_avantage\");\n \n \t\t$option_champ = recuperer_fond('formulaires/configurer_paniers_options', $flux['args']['contexte']);\n \t\t$flux['data']['texte'] = str_replace('<!--extra-->', '<!--extra-->' . $option_champ, $flux['data']['texte']); \t\t\t\n \t}\n \t\n \t// surcharge le formulaire du panier\n \tif ($flux['args']['fond'] == 'formulaires/panier'){\n \t\t\n \t\tinclude_spip('inc/config');\n \t\t$pourcentage_avantage = lire_config(\"paniers/panier_options/pourcentage_avantage\");\n \t\t$code_avantage = lire_config(\"paniers/panier_options/code_avantage\"); \n \t\t\n \t\t//seulement si l'option est configurée\n \t\tif($pourcentage_avantage && $code_avantage){\n \t\t\t$flux['args']['contexte']['_pourcentage_avantage'] = $pourcentage_avantage;\n \t\t\t$code_valide=false;\n \t\t\t\n \t\t\t//est-ce que l'avantage est déjà validé ?\n \t\t\tif (!$id_panier) {\n\t\t\t\tinclude_spip('inc/paniers');\n\t\t\t\t$id_panier = paniers_id_panier_encours();\n\t\t\t}\n \t\t\t$avantage_valide = sql_getfetsel('options','spip_paniers',array('id_panier = '.sql_quote($id_panier)));\n \t\t\tif($avantage_valide==\"avantage_valide\") $code_valide=true;\n \t\t\t\n \t\t\t//sinon tester si votre_code_avantage est le bon\n \t\t\tif($code_valide==false){\n\t\t\t\t$config_code_avantage = lire_config(\"paniers/panier_options/code_avantage\");\n\t\t\t\t$request_code_avantage=_request('votre_code_avantage');\n\t\t\t\tif($request_code_avantage==$config_code_avantage)$code_valide=true;\n\t\t\t}\n\t\t\tif($code_valide){\n\t\t\t\t//afficher le formulaire avec l'avantage calculé\n\t\t\t\t$option_calculer = recuperer_fond('formulaires/avantage_calculer_total', $flux['args']['contexte']);\n\t\t\t\t$flux['data']['texte'] = preg_replace('%(<tr class=\"total_ttc(.*?)</tr>)%is', ' '.\"\\n\".$option_calculer, $flux['data']['texte']);\n\t\t\t}\n \t\t\n\t\t\t//affiche le champ input votre_code_avantage\n\t\t\t$option_champ = recuperer_fond('formulaires/avantage_option_input', $flux['args']['contexte']);\n\t\t\t$flux['data']['texte'] = str_replace('</table>', '</table>' . $option_champ, $flux['data']['texte']);\n \t\t}\n \t}\n \t\n\n \treturn $flux;\n}" ]
[ "0.726089", "0.726089", "0.726089", "0.726089", "0.726089", "0.71345204", "0.70826685", "0.6962327", "0.6934403", "0.6876732", "0.68766975", "0.68766975", "0.6834879", "0.66074157", "0.6590271", "0.657728", "0.657728", "0.6575855", "0.6555563", "0.65461475", "0.65139157", "0.64999044", "0.6473459", "0.6465295", "0.6440465", "0.6431252", "0.6397752", "0.63853234", "0.63797116", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.63769424", "0.6346378", "0.6345833", "0.63434374", "0.6334298", "0.6318265", "0.6315169", "0.62934005", "0.6242104", "0.6222959", "0.6208428", "0.6197364", "0.6173591", "0.6162051", "0.61531514", "0.6146403", "0.61450166", "0.61252064", "0.61230016", "0.6120653", "0.61139745", "0.60892904", "0.60892904", "0.60892904", "0.60892904", "0.6088193", "0.6076755", "0.60765046", "0.6069208", "0.60691595", "0.60691595", "0.60691595", "0.60691595", "0.60691595", "0.60691595", "0.60691595", "0.6060222", "0.60589", "0.60456824", "0.60295", "0.60273355", "0.6023454", "0.6023454", "0.6021599", "0.60167515", "0.60166776", "0.60107946", "0.60106605", "0.6008059", "0.6004423", "0.5997191", "0.59878665", "0.59755147", "0.5966092", "0.5960287", "0.5949752", "0.5948195" ]
0.0
-1
Calculate the holiday datetime for defined year and return it.
public function calculate( int $year ): \DateTime { $refDate = new DateTime( $year . '-12-24 00:00:00' ); $multiplier = 4 - $this->_adventDay; $refDate->modify( '-' . ( $refDate->getDayNumberOfWeek() + ( $multiplier * 7 ) ) . ' days' ); if ( 0 !== $this->_modifyDays ) { $refDate->modify( ( $this->_modifyDays > 0 ? '+' : '-' ) . abs( $this->_modifyDays ) . ' days' ); } return $refDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_holidays($inc_year){\n\t//$year = date(\"Y\");\n\t$year = $inc_year;\n\n\t// $holidays[] = new Holiday(\"New Year's Day\", get_timestamp(\"$year-1-1\"));\n\t$holidays[] = new Holiday(\"Republic Day\", get_timestamp(\"$year-1-26\"));\n\t// $holidays[] = new Holiday(\"Labour Day\", ordinal_day(1, 'Mon', 3, $year));\n\t// $holidays[] = new Holiday(\"Anzac Day\", get_timestamp(\"$year-4-25\"));\n\t//$holidays[] = new Holiday(\"St. Patrick's Day\", get_timestamp(\"$year-3-17\"));\n\t// TODO: $holidays[] = new Holiday(\"Good Friday\", easter_date($year));\n\t// $holidays[] = new Holiday(\"Easter\", easter_date($year));\n\t// TODO: $holidays[] = new Holiday(\"Easter Monday\", easter_date($year));\n\t// $holidays[] = new Holiday(\"Foundation Day\", ordinal_day(1, 'Mon', 6, $year));\n\t// $holidays[] = new Holiday(\"Queen's Birthday\", ordinal_day(1, 'Mon', 10, $year));\n\t//$holidays[] = new Holiday(\"Memorial Day\", memorial_day($year));\n\t//$holidays[] = new Holiday(\"Mother's Day\", ordinal_day(2, 'Sun', 5, $year));\n\t//$holidays[] = new Holiday(\"Father's Day\", ordinal_day(3, 'Sun', 6, $year));\n\t//$holidays[] = new Holiday(\"Independence Day\", get_timestamp(\"$year-7-4\"));\n\t//$holidays[] = new Holiday(\"Labor Day\", ordinal_day(1, 'Mon', 9, $year));\n\t$holidays[] = new Holiday(\"Christmas\", get_timestamp(\"$year-12-25\"));\n\t$holidays[] = new Holiday(\"Dussera\", get_timestamp(\"2010-10-15\"));\n\t$holidays[] = new Holiday(\"Ugadi\", get_timestamp(\"2010-3-16\"));\n\t$holidays[] = new Holiday(\"kanada Rajyotshava\", get_timestamp(\"$year-11-1\"));\n\t$holidays[] = new Holiday(\"Christmas\", get_timestamp(\"2010-3-16\"));\n\t$holidays[] = new Holiday(\"Diwali\", get_timestamp(\"2010-11-04\"));\n\t$holidays[] = new Holiday(\"Diwali\", get_timestamp(\"2010-11-05\"));\n\t// $holidays[] = new Holiday(\"Boxing Day\", get_timestamp(\"$year-12-26\"));\n\n\t$numHolidays = count($holidays) - 1;\n\t$out_array = array();\n\n\tfor ($i = 0; $i < $numHolidays; $i++){\n\t\t$out_array[] = $holidays[$i]->date;\n\t}\n\tunset($holidays);\n\treturn $out_array;\n}", "private function calculateNewYearHolidays(): void\n {\n $newYearsDay = new DateTime(\"$this->year-01-01\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n $dayAfterNewYearsDay = new DateTime(\"$this->year-01-02\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n\n switch ($newYearsDay->format('w')) {\n case 0:\n $newYearsDay->add(new DateInterval('P1D'));\n $dayAfterNewYearsDay->add(new DateInterval('P1D'));\n break;\n case 5:\n $dayAfterNewYearsDay->add(new DateInterval('P2D'));\n break;\n case 6:\n $newYearsDay->add(new DateInterval('P2D'));\n $dayAfterNewYearsDay->add(new DateInterval('P2D'));\n break;\n }\n\n $this->addHoliday(new Holiday('newYearsDay', [], $newYearsDay, $this->locale));\n $this->addHoliday(new Holiday('dayAfterNewYearsDay', [], $dayAfterNewYearsDay, $this->locale));\n }", "function GetYearHoliday($the_year = NULL, $cond_1, $cond_2) {\n\t\t$_where = empty($the_year) ? \"\" : \"and my_year = $the_year\";\n\t\t$companyid = $this->companyID;\n\t\t$emp_seqno = $this->empSeqNo;\n\t\t$sql_string = <<<_YearHolidayList_\n\t\t\t\tselect my_year,\n\t\t\t\t\t in_date,\n\t\t\t\t\t year_holidays,\n\t\t\t\t\t /*year_adjust_days,--HCP version v.1.0.5.4.1 no this filed*/\n\t\t\t\t\t nvl(already_rest_days,0) as already_rest_days,\n\t\t\t\t\t defered_year_days,\n\t\t\t\t\t defered_adjust_days,\n\t\t\t\t\t defered_expried_date,\n\t\t\t\t\t nvl(already_rest_ddays,0) as already_rest_ddays,\n\t\t\t\t\t active_date,\n\t\t\t\t\t expired_date\n\t\t\t\t\tfrom (select A.*,rownum rn\n\t\t\t\t\t\t from (select my_year,\n\t\t\t\t\t\t\t\t\t\t in_date,\n\t\t\t\t\t\t\t\t\t year_holidays,\n\t\t\t\t\t\t\t\t\t already_rest_days,\n\t\t\t\t\t\t\t\t\t defered_year_days,\n\t\t\t\t\t\t\t\t\t defered_expried_date,\n\t\t\t\t\t\t\t\t\t already_rest_ddays,\n\t\t\t\t\t\t\t\t\t active_date,\n\t\t\t\t\t\t\t\t\t expired_date\n\t\t\t\t\t\t from ehr_year_holiday_v\n\t\t\t\t\t\t where company_id = '$companyid'\n\t\t\t\t\t\t\t\t\t and emp_seq_no = '$emp_seqno'\n\t\t\t\t\t\t\t\t\t $_where\n\t\t\t\t\t\t\t\t order by year_holidays desc) A\n\t\t\t\t\t\t\t\t where rownum <=$cond_2)\n\t\t\t\t\t\t\twhere rn >=$cond_1\n\t\t\t\t\t\t\torder by year_holidays desc\n_YearHolidayList_;\n\t\t// print $sql_string;\n\t\treturn $this->DBConn->GetArray($sql_string);\n\n\t}", "function holiday ($yr=0)\n\t{\n\t\tif ($yr==0) $yr = (int)date(\"Y\");\n\t\t$this->bjd = gregorian_to_jd(1,1,$yr);\n\t\t$this->ejd = gregorian_to_jd(12,31,$yr);\n\n\t\t//add holidays easily define in the gregorian calendar\n\t\t$this->holidays = Array(\n\t\t\t\"newyearseve\" => gregorian_to_jd(12,31,$yr),\n\t\t\t\"valentinesday\"=> gregorian_to_jd(2,14,$yr),\n\t\t\t\"presidentsday\" => nth_weekday_jd(3,dMONDAY,2,$yr),\n\t\t\t\"stpatricksday\" => gregorian_to_jd(3,17,$yr),\n\t\t\t\"aprilfoolsday\" => gregorian_to_jd(4,1,$yr),\n\t\t\t\"cincodemayo\" => gregorian_to_jd(5,5,$yr),\n\t\t\t\"mothersday\" => nth_weekday_jd(2,dSUNDAY,5,$yr),\n\t\t\t\"memorialday\" => $this->memorialDay($yr),\n\t\t\t\"fathersday\" => nth_weekday_jd(3,dSUNDAY,6,$yr),\n\t\t\t\"fourthofjuly\" => gregorian_to_jd(7,4,$yr),\n\t\t\t\"laborday\" => nth_weekday_jd(1,dMONDAY,9,$yr),\n\t\t\t\"columbusday\" => nth_weekday_jd(2,dMONDAY,10,$yr),\n\t\t\t\"halloween\" => gregorian_to_jd(10,31,$yr), \n\t\t\t\"thanksgiving\" => nth_weekday_jd(4, dTHURSDAY, 11,$yr),\n\t\t\t\"christmas\" => gregorian_to_jd(12,24,$yr),\n\t\t\t\"christmasday\" => gregorian_to_jd(12,25,$yr),\n\t\t\t\"mardigras\" => easter_jd($yr,-47),\n\t\t\t\"easter\" =>\teaster_jd($yr)\n\t\t);\n\t\t\t\n\t\tasort($this->holidays);\n\t}", "private function calculateWaitangiDay(): void\n {\n if ($this->year < 1974) {\n return;\n }\n\n $date = new DateTime(\"$this->year-02-6\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n\n if ($this->year >= 2015 && !$this->isWorkingDay($date)) {\n $date->modify('next monday');\n }\n\n $this->addHoliday(new Holiday('waitangiDay', [], $date, $this->locale));\n }", "private function calculateLiberationDay(): void\n {\n if ($this->year >= 1949) {\n $this->addHoliday(new Holiday(\n 'liberationDay',\n ['it' => 'Festa della Liberazione'],\n new DateTime(\"$this->year-4-25\", DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale\n ));\n }\n }", "public function calculate( int $year ): \\DateTime\n {\n\n if ( self::HEMISPHERE_NORTH === $this->_hemisphere && $year > 1499 && $year < 2150 )\n {\n switch ( $this->_type )\n {\n case self::TYPE_SPRING:\n return new DateTime( $year . '-03-' . self::SPRING_DAYS[ $year ] . ' 00:00:00 UTC' );\n case self::TYPE_SUMMER:\n return new DateTime( $year . '-06-' . self::SUMMER_DAYS[ $year ] . ' 00:00:00 UTC' );\n case self::TYPE_AUTUMN:\n return new DateTime( $year . '-09-' . self::AUTUMN_DAYS[ $year ] . ' 00:00:00 UTC' );\n #case self::TYPE_WINTER:\n default:\n return new DateTime( $year . '-12-' . self::WINTER_DAYS[ $year ] . ' 00:00:00 UTC' );\n }\n }\n\n $foundIdx = -1;\n $idx = 0;\n\n // Search the index of the reference date that covers the defined year\n foreach ( self::REFERENCES[ $this->_type ][ $this->_hemisphere ] as $reference )\n {\n if ( 0 > $foundIdx && $reference[ 'min-year' ] <= $year && $reference[ 'max-year' ] >= $year )\n {\n $foundIdx = $idx;\n break;\n }\n $idx++;\n }\n\n if ( $foundIdx < 0 )\n {\n // There is no calculation available for defined year => use the static default date\n return new DateTime( $year . self::DEFAULTS[ $this->_type ][ $this->_hemisphere ] );\n }\n\n // The reference date was found => Init it as DateTime instance\n $refDate = new DateTime( self::REFERENCES[ $this->_type ][ $this->_hemisphere ][ $foundIdx ][ 'date' ] );\n\n // Calculate the difference in year (can be also negative!)\n $diffYears = $year - $refDate->year;\n\n if ( 0 !== $diffYears )\n {\n $refDate->addSeconds( $diffYears * self::DIFFS[ $this->_type ][ $this->_hemisphere ] );\n }\n\n return $refDate;\n\n }", "public function getHolidayEpiphany($year)\n {\n return $this->createHoliday('Heilige Drei Könige', $year . '-01-06', Holiday::TYPE_HOLIDAY);\n }", "public function getHolidayReformationDay($year)\n {\n return $this->createHoliday('Reformationstag', $year . '-10-31', Holiday::TYPE_HOLIDAY);\n }", "public function getHolidayAllSaintsDay($year)\n {\n return $this->createHoliday('Allerheiligen', $year . '-11-01', Holiday::TYPE_HOLIDAY);\n }", "public static function getHolidaysInYear($year) {\n $criteria = new CDbCriteria();\n $criteria->addCondition('YEAR(t.date) = ' . $year);\n $models = self::model()->findAll($criteria);\n $aRetVal = [];\n foreach ($models as $model) {\n // Check if plan was approved\n $plan = HrHolidayPlans::model()->findByPk($year);\n if ($plan && $plan->isApproved()) {\n $aRetVal[$model->date] = $model->date;\n }\n }\n \n return $aRetVal;\n }", "public function getHolidayPentecostSunday($year)\n {\n $pentecost = $this->createHoliday('Pfingstsonntag', $this->getEaster($year), Holiday::TYPE_HOLIDAY);\n $pentecost->modify('+49 days');\n return $pentecost;\n\n }", "public function getHolidayEasterSunday($year)\n {\n return $this->createHoliday('Ostersonntag', $this->getEaster($year), Holiday::TYPE_HOLIDAY);\n }", "function holidays () {\n\t$year = date(\"Y\");\n\t$p = date(\"N\", strtotime(\"February 1, $year\")) == 1 ? 'second' : 'third';\n\t$easter = date(\"Y-m-d\", easter_date($year));\n\n\t$holday_descriptions = array(\n\t\t\"January 1, $year\",\n\t\t\"January $year third Monday\",\n\t\t\"February $year $p Monday\",\n\t\t\"$easter - 2 days\",\n\t\t\"last Monday of May $year\",\n\t\t\"July 4, $year\",\n\t\t\"september $year first monday\",\n\t\t\"fourth Thursday of November $year\",\n\t\t\"December 25, $year\"\n\t);\n\n\t$holday_dates = array();\n\n\tforeach ($holday_descriptions as $d) {\n\t\t$holday_dates[] = date(\"Y-m-d\", strtotime($d));\n\t}\n\n\treturn $holday_dates;\n}", "private function calculateLabourDay(): void\n {\n if ($this->year < 1900) {\n return;\n }\n\n $date = new DateTime(\n ($this->year < 1910 ? 'second wednesday of october' : 'fourth monday of october') . \" $this->year\",\n DateTimeZoneFactory::getDateTimeZone($this->timezone)\n );\n\n $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale));\n }", "public function getTwoYearDates()\n {\n $current_year = date('Y-m-d',strtotime(date('Y-01-01')));\n $next_year = date('Y-m-d', strtotime('last day of december next year'));\n\n return Holiday::where('date', '>=', $current_year)\n ->where('date', '<=', $next_year)\n ->orderBy('date', 'asc')\n ->paginate(25);\n }", "private function calculateAnzacDay(): void\n {\n if ($this->year < 1921) {\n return;\n }\n\n $date = new DateTime(\"$this->year-04-25\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n\n if ($this->year >= 2015 && !$this->isWorkingDay($date)) {\n $date->modify('next monday');\n }\n\n $this->addHoliday(new Holiday('anzacDay', [], $date, $this->locale));\n }", "function danish_holidays($year = null)\n {\n if (is_null($year)) {\n $year = (int) date('Y');\n }\n $dayLength = 24 * 60 * 60; // seconds\n $easter = mktime(0, 0, 0, 3, (21 + (easter_days($year))), $year);\n $holidays = [];\n $holidays['Nytårsdag'] = date('Y-m-d', mktime(0, 0, 0, 1, 1, $year));\n $holidays['Palmesøndag'] = date('Y-m-d', $easter - (6.5 * $dayLength));\n $holidays['Skærtorsdag'] = date('Y-m-d', $easter - (3 * $dayLength));\n $holidays['Langfredag'] = date('Y-m-d', $easter - (2 * $dayLength));\n $holidays['Påskedag'] = date('Y-m-d', $easter);\n $holidays['2. påskedag'] = date('Y-m-d', $easter + (1 * $dayLength));\n $holidays['Store bededag'] = date('Y-m-d', $easter + (26 * $dayLength));\n $holidays['Kristi himmelfart'] = date('Y-m-d', $easter + (39 * $dayLength));\n $holidays['Pinsedag'] = date('Y-m-d', $easter + (49 * $dayLength));\n $holidays['2. pinsedag'] = date('Y-m-d', $easter + (50 * $dayLength));\n//\t\t$holidays['Grundlovsdag'] = date('Y-m-d', mktime(0, 0, 0, 6, 5, $year));\n $holidays['Juleaften'] = date('Y-m-d', mktime(0, 0, 0, 12, 24, $year));\n $holidays['Juledag'] = date('Y-m-d', mktime(0, 0, 0, 12, 25, $year));\n $holidays['2. juledag'] = date('Y-m-d', mktime(0, 0, 0, 12, 26, $year));\n $holidays['Nytårsaften'] = date('Y-m-d', mktime(0, 0, 0, 12, 31, $year));\n return $holidays;\n }", "function _buildKayinNewYear()\n {\n \n $this->_addHoliday(\n 'KayinNewYear',\n $this->_year . '-01-10',\n 'KayinNewYear Day'\n );\n }", "public function getGyereknapHoliday(int $year = null)\n {\n return $this->getHolidaysByYear(\"Gyereknap\", $year)[0];\n }", "public function testRemembranceDayAfter2006(): void\n {\n $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR);\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-03-24\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "public function get_holiday_list($year) {\n for ($i = 1; $i <= 12; $i++) { // query for months\n if ($i >= 1 && $i <= 9) { // if i<=9 concate with Mysql.becuase on Mysql query fast in two digit like 01.\n $start_date = $year . \"-\" . '0' . $i . '-' . '01';\n $end_date = $year . \"-\" . '0' . $i . '-' . '31';\n } else {\n $start_date = $year . \"-\" . $i . '-' . '01';\n $end_date = $year . \"-\" . $i . '-' . '31';\n }\n $get_holiday_list[$i] = $this->settings_model->get_holiday_list_by_date($start_date, $end_date); // get all report by start date and in date \n }\n return $get_holiday_list; // return the result\n }", "function get_corresponding_fiscal_year($date) {\n $year = $date->format('Y');\n if ($date <= DateTime::createFromFormat('Y-m-d', $year . '-6-30')) {\n return $year;\n } else {\n return $year + 1;\n }\n}", "public function testCanadaDayOnAfter1983(): void\n {\n $year = 2019; // July 1 is not Sunday\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-07-01\", new \\DateTimeZone(self::TIMEZONE))\n );\n $year = 2018; // July 1 is Sunday\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-07-02\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "private function calculateNationalDay(): void\n {\n if ($this->year < 1916) {\n return;\n }\n\n $holidayName = 'Svenska flaggans dag';\n\n // Since 1983 this day was named 'Sveriges nationaldag'\n if ($this->year >= 1983) {\n $holidayName = 'Sveriges nationaldag';\n }\n\n $this->addHoliday(new Holiday(\n 'nationalDay',\n ['sv' => $holidayName],\n new DateTime(\"$this->year-6-6\", DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale\n ));\n }", "private function calculateRepublicDay(): void\n {\n if ($this->year >= 1946) {\n $this->addHoliday(new Holiday(\n 'republicDay',\n ['it' => 'Festa della Repubblica'],\n new DateTime(\"$this->year-6-2\", DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale\n ));\n }\n }", "public function calculateHoliday($checkDate){\n\t\n\t\t$jaar = date('Y');\n\t\t$feestdag = array();\n\t\t$a = $jaar % 19;\n\t\t$b = intval($jaar/100);\n\t\t$c = $jaar % 100;\n\t\t$d = intval($b/4);\n\t\t$e = $b % 4;\n\t\t$g = intval((8 * $b + 13) / 25);\n\t\t$theta = intval((11 * ($b - $d - $g) - 4) / 30);\n\t\t$phi = intval((7 * $a + $theta + 6) / 11);\n\t\t$psi = (19 * $a + ($b - $d - $g) + 15 -$phi) % 29;\n\t\t$i = intval($c / 4);\n\t\t$k = $c % 4;\n\t\t$lamda = ((32 + 2 * $e) + 2 * $i - $k - $psi) % 7;\n\t\t$maand = intval((90 + ($psi + $lamda)) / 25);\n\t\t$dag = (19 + ($psi + $lamda) + $maand) % 32;\n\n\t\t$feestdag[] = date('Y-m-d', mktime (1,1,1,1,1,$jaar)); // Nieuwjaarsdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag-2,$jaar)); // Goede Vrijdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag,$jaar)); // 1e Paasdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag+1,$jaar)); // 2e Paasdag\n\n\t\tif ($jaar < '2014'){\n\t\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,4,30,$jaar)); // Koninginnedag\n\t\t}\n\t\telse {\n\t\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,4,26,$jaar)); // Koningsdag\n\t\t}\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,5,5,$jaar)); // Bevrijdingsdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag+39,$jaar)); // Hemelvaart\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag+49,$jaar)); // 1e Pinksterdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,$maand,$dag+50,$jaar)); // 2e Pinksterdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,12,25,$jaar)); // 1e Kerstdag\n\t\t$feestdag[] = date('Y-m-d',mktime (0,0,0,12,26,$jaar)); // 2e Kerstdag\n\n/*\n\t\tfile_put_contents('/tmp/filename.txt', print_r($feestdag, true));\n\t\tfile_put_contents('/tmp/filename2.txt', $checkDate);\n*/\n\n\t\treturn in_array($checkDate, $feestdag) ? true : false;\n\t}", "public function getHolidays()\n {\n\t\t$db = $this->getDbo();\n\t\t$rHolidays = array();\n\t\t\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('a.*')\n\t\t\t->from('#__cooltouraman_holiday AS a')\n\t\t\t->where('1');\n\t\t\t\n\t\t$db->setQuery($query);\n\t\t\n\t\t$holidays = $db->loadObjectlist();\n\t\t\n\t\tforeach($holidays as $holiday)\n\t\t{ \n\t\t\t$thisYear = new DateTime();\n\t\t\t$nextYear = new DateTime();\n\t\t\t$nextYear->modify('+ 1 year');\n\t\t\t\n\t\t\tif ($holiday->year === '*')\n\t\t\t\t\t$holiday->year = $thisYear->format(\"Y\");\n\t\t\t\n\t\t\tif ($holiday->year === $thisYear->format(\"Y\") || $holiday->year === $nextYear->format(\"Y\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$holidayDate = new DateTime($holiday->year.'-'.$holiday->month.'-'.$holiday->day);\n\t\t\t\t$monthName = strtoupper($holidayDate->format(\"F\"));\n\n\t\t\t\tif(!isset($rHolidays[$monthName]))\n\t\t\t\t\t$rHolidays[$monthName] = array();\n\t\t\t\t\n\t\t\t\t$rHolidays[$monthName][$holidayDate->format(\"d-m-Y\")]['day'] = $holidayDate->format(\"d\");\n\t\t\t\t$rHolidays[$monthName][$holidayDate->format(\"d-m-Y\")]['title'] = $holiday->title;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $rHolidays;\n }", "function date_difference($start_date, $end_date, $workdays_only = false, $skip_holidays = false){\n\t$start_date = strtotime($start_date);\n\t$end_date = strtotime($end_date);\n\t$seconds_in_a_day = 86400;\n\t$sunday_val = \"0\";\n\t$saturday_val = \"6\";\n\t$workday_counter = 0;\n\t$holiday_array = array();\n\n\t$ptr_year = intval(date(\"Y\", $start_date));\n\t$holiday_array[$ptr_year] = get_holidays(date(\"Y\", $start_date));\n\n\tfor($day_val = $start_date; $day_val <= $end_date; $day_val+=$seconds_in_a_day){\n\t\t$pointer_day = date(\"w\", $day_val);\n\t\tif($workdays_only == true){\n\t\t\tif(($pointer_day != $sunday_val) AND ($pointer_day != $saturday_val)){\n\t\t\t\tif($skip_holidays == true){\n\t\t\t\t\tif(intval(date(\"Y\", $day_val))!=$ptr_year){\n\t\t\t\t\t\t$ptr_year = intval(date(\"Y\", $day_val));\n\t\t\t\t\t\t$holiday_array[$ptr_year] = get_holidays(date(\"Y\", $day_val));\n\t\t\t\t\t}\n\t\t\t\t\tif(!in_array($day_val, $holiday_array[date(\"Y\", $day_val)])){\n\t\t\t\t\t\t$workday_counter++;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$workday_counter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\tif($skip_holidays == true){\n\t\t\t\tif(intval(date(\"Y\", $day_val))!=$ptr_year){\n\t\t\t\t\t$ptr_year = intval(date(\"Y\", $day_val));\n\t\t\t\t\t$holiday_array[$ptr_year] = get_holidays(date(\"Y\", $day_val));\n\t\t\t\t}\n\t\t\t\tif(!in_array($day_val, $holiday_array[date(\"Y\", $day_val)])){\n\t\t\t\t\t$workday_counter++;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$workday_counter++;\n\t\t\t}\n\t\t}\n\t}\n\treturn $workday_counter;\n}", "function testSubstituteHolidaysInMay2008()\n {\n $obj = Date_Holidays::factory('Japan', 2008);\n if (Date_Holidays::isError($obj)) {\n $this->fail('Factory was unable to produce driver-object');\n }\n // calculate substitute holiday for Children's Day (1st time)\n $this->assertTrue($obj->isHoliday(new Date('2008-05-06')), '1st time');\n\n // calculate substitute holiday for Children's Day (2nd time)\n // because re-calculated holidays internaly\n $this->assertTrue($obj->isHoliday(new Date('2008-05-06')), '2nd time');\n\n // in 2007, this day is not substitute holiday\n $this->assertFalse($obj->isHoliday(new Date('2007-05-07')), 'in 2007');\n }", "function bbconnect_kpi_calculate_fiscal_year_for_date($inputDate, $fyStart = '07-01', $fyEnd = '06-30') {\n if ($inputDate instanceof DateTime) {\n $date = $inputDate->getTimestamp();\n } elseif (is_int($inputDate)) {\n $date = $inputDate;\n } else {\n $date = strtotime($inputDate);\n }\n $inputyear = date('Y', $date);\n\n $fystartdate = strtotime($inputyear.'-'.$fyStart);\n $fyenddate = strtotime($inputyear.'-'.$fyEnd);\n\n if ($date <= $fyenddate) {\n $fy = intval($inputyear);\n } else {\n $fy = intval(intval($inputyear) + 1);\n }\n\n return $fy;\n}", "public function holidays($country, $year, array $options = [])\n {\n $jsonData = [\n 'country' => $country,\n 'year' => $year\n ];\n $jsonData = array_merge($jsonData, $options);\n $data = $this->request('POST', 'api/v1/date/holidays', [\n 'json' => $jsonData\n ]);\n return $data;\n }", "function getDate($s)\n\t{\n\t\tif (array_key_exists($s, $this->holidays)) return (strtotime(jdtogregorian(intval($this->holidays[$s],10)+1)));\n\n\n\t\t//the key doesn't exist, return 0\n\t\treturn (0);\n\t}", "public function initialize(): void\n {\n $this->timezone = 'Europe/Stockholm';\n\n // Add common holidays\n $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale));\n\n // Add common Christian holidays (common in Sweden)\n $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale));\n $this->calculateEpiphanyEve();\n $this->calculateWalpurgisEve();\n $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale));\n $this->calculateStJohnsHolidays(); // aka Midsummer\n $this->calculateAllSaintsHolidays();\n $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale));\n\n $this->addHoliday($this->newYearsEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE));\n\n // Calculate other holidays\n $this->calculateNationalDay();\n }", "function getWorkingDays($startDate,$endDate,$holidays){\n //We add one to inlude both dates in the interval.\n if($startDate!=NULL && $endDate!=NULL){\n $days = ($endDate->getTimestamp() - $startDate->getTimestamp()) / 86400 + 1;\n $no_full_weeks = floor($days / 7);\n $no_remaining_days = fmod($days, 7);\n //It will return 1 if it's Monday,.. ,7 for Sunday\n $the_first_day_of_week = date(\"N\",$startDate->getTimestamp());\n $the_last_day_of_week = date(\"N\",$endDate->getTimestamp());\n\n // echo $the_last_day_of_week;\n\n //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\n\n //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\n\n if ($the_first_day_of_week <= $the_last_day_of_week){\n\n if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\n\n if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\n\n }\n else{\n\n if ($the_first_day_of_week <= 6) {\n\n //In the case when the interval falls in two weeks, there will be a Sunday for sure\n\n $no_remaining_days--;\n\n }\n\n }\n //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\n\n//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\n\n $workingDays = $no_full_weeks * 5;\n\n if ($no_remaining_days > 0 )\n\n {\n\n $workingDays += $no_remaining_days;\n\n }\n //We subtract the holidays\n\n/* foreach($holidays as $holiday){\n\n $time_stamp=strtotime($holiday);\n\n //If the holiday doesn't fall in weeken\n\n if (strtotime($startDate) <= $time_stamp && $time_stamp <= strtotime($endDate) && date(\"N\",$time_stamp) != 6 && date(\"N\",$time_stamp) != 7)\n\n $workingDays--;\n\n }*/\n return round ($workingDays-1);\n }\nreturn NULL;\n}", "function getNextHolidayHeading()\n{\n\t$nextHolidayHeading = \"\";\n\t$holidayNames = array(\"New Year\", \"Valentine's Day\", \"Saint Patrick's Day\", \"Easter\", \"Oktoberfest\", \"Thanksgiving\", \"Halloween\", \"Thanksgiving\", \"Christmas\");\n\t$currentDate = date(\"m/d\");\n\t$holidayDateBounds = array(\"01/04\", \"02/17\", \"03/20\", \"04/30\", \"09/19\", \"10/14\", \"11/02\", \"11/26\", \"12/27\"); /* upper bound for corresponding holiday dates */\n\t$numHolidays = 9;\n\t\n\t$currentMonth = substr($currentDate, 0, 2);\n\t\n\tif ((strcmp($currentMonth, \"04\") > 0) && (strcmp($currentMonth, \"09\") < 0))\n\t{\n\t\t$nextHolidayHeading = \"None\"; \n\t}\n\t\n\telse \n\t{\n\t\tfor ($i = 0; $i < $numHolidays; $i++)\n\t\t{\n\t\t\tif ($currentDate <= $holidayDateBounds[$i])\n\t\t\t{\n\t\t\t\t$nextHolidayHeading = $holidayNames[$i];\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($i >= 9)\n\t\t{\n\t\t\t$nextHolidayHeading = $holidayNames[0];\n\t\t}\n\t}\n\t\n\treturn $nextHolidayHeading;\n}", "private function calculateCatholicChristmasDay(): void\n {\n if ($this->year < 2017) {\n return;\n }\n\n $this->addHoliday(\n new Holiday(\n 'catholicChristmasDay',\n [\n 'uk' => 'Католицький день Різдва',\n 'ru' => 'Католическое рождество',\n ],\n new \\DateTime(\"$this->year-12-25\", new \\DateTimeZone($this->timezone)),\n $this->locale\n ),\n false // Catholic Christmas Day will not be substituted to an monday if it's on a weekend!\n );\n }", "public function isHoliday($date);", "public function initialize(): void\n {\n $this->timezone = 'Europe/Bratislava';\n\n // 1.1.\n $this->calculateSlovakIndependenceDay();\n // 6.1.\n $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n // 1.5.\n $this->addHoliday($this->internationalWorkersDay(\n $this->year,\n $this->timezone,\n $this->locale,\n Holiday::TYPE_BANK\n ));\n // 8.5.\n $this->addHoliday($this->victoryInEuropeDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n // 5.7.\n $this->calculateSaintsCyrilAndMethodiusDay();\n // 29.8.\n $this->calculateSlovakNationalUprisingDay();\n // 1.9.\n $this->calculateSlovakConstitutionDay();\n // 15.9.\n $this->calculateOurLadyOfSorrowsDay();\n // 1.11.\n $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n // 17.11.\n $this->calculateStruggleForFreedomAndDemocracyDay();\n // 24.12.\n $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n // 25.12.\n $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n // 26.12.\n $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n\n // variable holidays - easter\n $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK));\n }", "function testHolidays2009()\n {\n $drv = Date_Holidays::factory('Spain', 2009, 'en_EN');\n if (Date_Holidays::isError($drv)) {\n $this->fail(helper_get_error_message($drv));\n }\n\n foreach ($this->testDates2009 as $name => $dateInfo) {\n $day = $drv->getHoliday($name);\n if (Date_Holidays::isError($day)) {\n $this->fail(helper_get_error_message($day));\n }\n $this->assertEquals($name, $day->getInternalName());\n $date = $day->getDate();\n $this->assertEquals($dateInfo['day'], $date->format('d'), $name);\n $this->assertEquals($dateInfo['month'], $date->format('m'), $name);\n $this->assertEquals($dateInfo['year'], $date->format('Y'), $name);\n }\n }", "public function getWithAppliedHolidays($holidays) {\n\n $payrollDates = $this->generatedPayrollDates;\n\n foreach ($holidays AS $holiday) {\n /* @var $holiday Holiday */\n for ($i = 0; $i < count($payrollDates); $i ++) {\n /* @var $this->generatedPayrollDates[$i] PayrollDate */\n if ($payrollDates[$i]->date->format(\"Y-m-d\") == $holiday->date) {\n $payrollDates[$i]->holidayType = $holiday->holiday_type_code;\n }\n }\n }\n\n return $payrollDates;\n }", "public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay(): void\n {\n $year = 1999;\n $this->assertHoliday(\n self::REGION,\n self::SUBSTITUTE_PREFIX.self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-10-11\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "function _buildMahaThingyan1()\n {\n $this->_addHoliday(\n 'MahaThingyan1',\n $this->_year . '-04-11',\n 'MahaThingyan Day'\n );\n }", "public function getCalendarHolidayName ()\n {\n return $this->calendar_holiday_name;\n }", "function easterSunday( $nYEAR ) \r\n{\r\n // but mktime() starts at 1970-01-01! \r\n if ( $nYEAR < 1970 ) \r\n { \r\n $dtEasterSunday = mktime( 1,1,1,1,1,1970 ); \r\n } \r\n else \r\n { \r\n $nGZ = ( $nYEAR % 19 ) + 1; \r\n $nJHD = div( $nYEAR, 100 ) + 1; \r\n $nKSJ = div( 3 * $nJHD, 4 ) - 12; \r\n $nKORR = div( 8 * $nJHD + 5, 25 ) - 5; \r\n $nSO = div( 5 * $nYEAR, 4 ) - $nKSJ - 10; \r\n $nEPAKTE = (( 11 * $nGZ + 20 + $nKORR - $nKSJ ) % 30 ); \r\n \r\n if (( $nEPAKTE == 25 OR $nGZ == 11 ) AND $nEPAKTE == 24 ) \r\n { \r\n $nEPAKTE = $nEPAKTE + 1; \r\n }\r\n \r\n $nN = 44 - $nEPAKTE; \r\n if( $nN < 21 ) \r\n { \r\n $nN = $nN + 30; \r\n } \r\n $nN = $nN + 7 - (( $nSO + $nN ) % 7 ); \r\n $nN = $nN + isLeapYear( $nYEAR ); \r\n $nN = $nN + 59; \r\n \r\n $nA = isLeapYear( $nYEAR ); \r\n // Month \r\n $nNM = $nN; \r\n if ( $nNM > ( 59 + $nA )) \r\n { \r\n $nNM = $nNM + 2 - $nA; \r\n } \r\n $nNM = $nNM + 91; \r\n $nMONTH = div( 20 * $nNM, 611 ) - 2; \r\n \r\n // Day \r\n $nNT = $nN; \r\n $nNT = $nN; \r\n if ( $nNT > ( 59 + $nA )) \r\n { \r\n $nNT = $nNT + 2 - $nA; \r\n } \r\n $nNT = $nNT + 91; \r\n $nM = div( 20 * $nNT, 611 ); \r\n $nDAY = $nNT - div( 611 * $nM, 20 ); \r\n \r\n $dtEasterSunday = mktime( 0,0,0,$nMONTH,$nDAY,$nYEAR ); \r\n } \r\n return $dtEasterSunday; \r\n}", "public function testSportsDayIn2020(): void\n {\n $year = 2020;\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-7-24\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "function dayOfProgrammer($year) {\n if($year <1918 && $year%400!=0 && $year%100==0 ) {\n $date=date_create($year.'-01-01');\n date_add($date,date_interval_create_from_date_string(\"254 days\"));\n return date_format($date,\"d.m.Y\"); \n } else if($year == 1918) {\n $date=date_create($year.'-01-01');\n date_add($date,date_interval_create_from_date_string(\"268 days\"));\n return date_format($date,\"d.m.Y\");\n } else {\n $date=date_create($year.'-01-01');\n date_add($date,date_interval_create_from_date_string(\"255 days\"));\n return date_format($date,\"d.m.Y\");\n }\n}", "function testHolidaysFrom1970to2050WithSetYear()\n {\n $obj =& Date_Holidays::factory('Japan');\n if (Date_Holidays::isError($obj)) {\n $this->fail('Factory was unable to produce driver-object');\n }\n for ($year = 1970; $year < 2051; $year++) {\n $obj->setYear($year);\n $invalid_holidays = array();\n foreach ($obj->getHolidayDates() as $holiday) {\n $dt = substr($holiday->getDate(), 0, 10);\n if (array_key_exists($dt, $this->_holidays)) {\n unset($this->_holidays[$dt]);\n } else {\n $invalid_holidays[] = $holiday->getDate();\n }\n }\n }\n // if all holidays was calculated or not\n $this->assertEquals(0, count($this->_holidays));\n\n // if no invalid holidays was calculated or not\n $this->assertEquals(0, count($invalid_holidays));\n }", "function holiday($name, $date){\n\t\t$this->name = $name; // Official name of holiday\n\t\t$this->date = $date; // UNIX timestamp of date\n\t}", "public function getAllSaintsDay($year)\n {\n $date = new \\DateTime($year.'-10-31');\n for ($i = 0; $i < 7; $i++) {\n if ($date->format('w') == 6) {\n break;\n }\n $date->add(new \\DateInterval('P1D'));\n }\n\n return $date;\n }", "function getLeaveHoliday($db, $strStartDate, $strFinishDate)\n{\n $intResult = 0;\n if ($strStartDate == \"\" || $strFinishDate == \"\") {\n return 0;\n }\n $strSQL = \"SELECT count(id) AS total FROM hrd_calendar WHERE status='t' AND leave='t' \";\n $strSQL .= \"AND holiday BETWEEN '$strStartDate' AND '$strFinishDate' \";\n $resTmp = $db->execute($strSQL);\n if ($rowTmp = $db->fetchrow($resTmp)) {\n if ($rowTmp['total'] != \"\") {\n $intResult = $rowTmp['total'];\n }\n }\n return $intResult;\n}", "function hebrew_year_days($yr) {\n\t\treturn ( hebrew_to_jd(7, 1, $yr + 1) - hebrew_to_jd(7, 1, $yr) );\n\t}", "public function testSportsDayIn2021(): void\n {\n $year = 2021;\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-7-23\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "private function calculateSlovakConstitutionDay(): void\n {\n $this->addHoliday(new Holiday(\n 'slovakConstitutionDay',\n [\n 'sk' => 'Deň Ústavy Slovenskej republiky',\n 'en' => 'Day of the Constitution of the Slovak Republic',\n ],\n new DateTime($this->year . '-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale,\n Holiday::TYPE_OFFICIAL\n ));\n }", "function getUpcomingHolidays($date=NULL) {\n\t\tif (!$date) $date = time();\n\t\t$year = date('Y');\n\t\t$rs = aql::select(\"ct_holiday { slug, date where date is not null order by date_order asc }\");\n\t\tforeach ($rs as $r) {\n\t\t\tif (strtotime($r['date'].'/'.$year) > $date ) $this_years_holidays[$r['slug']] = strtotime($r['date'].'/'.$year);\n\t\t\telse $next_years_holidays[$r['slug']] = strtotime($r['date'].'/'.($year+1));\n\t\t}\n\t\treturn(array_merge($this_years_holidays,$next_years_holidays));\n}", "public function initialize(): void\n {\n $this->timezone = 'Europe/Oslo';\n\n // Add common holidays\n $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale));\n\n // Add common Christian holidays (common in Norway)\n $this->addHoliday($this->maundyThursday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale));\n\n // Calculate other holidays\n $this->calculateConstitutionDay();\n }", "function happyNewYear () {\n $day = (int) date('z');\n $year = date('Y');\n $yearCheck = ((int)$year ? $year % 4 == 0 ? $year % 400 == 0 && $year % 100 == 0 ? 366 : 365 : 365 : \"ERROR\");\n $daytill = $yearCheck-$day;\n echo \"До Нового Года осталось: $daytill дней\";\n}", "public function getCityHolidays($year): array\n {\n return [\n\n $this->getEasterDate($year,'SEXTA_FEIRA_SANTA') => $this->createData('Paixão de Cristo'),\n $this->getEasterDate($year,'CORPUS_CHRISTI') => $this->createData('Corpus Christi'),\n\n '01-25' => $this->createData('Aniversário de São Paulo', null, [ self::CITY_CODE ]),\n '11-20' => $this->createData('Consciência Negra', null, [ self::CITY_CODE ]),\n ];\n }", "public function testSportsDayBetween1996And2000(): void\n {\n $year = 1997;\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-10-10\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "public function getNagyboldogasszonyNapjaHoliday(int $year = null)\n {\n return $this->getHolidaysByYear(\"Nagyboldogasszony napja\", $year)[0];\n }", "private function calculateChristmasHolidays(): void\n {\n $christmasDay = new DateTime(\"$this->year-12-25\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n $boxingDay = new DateTime(\"$this->year-12-26\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n\n switch ($christmasDay->format('w')) {\n case 0:\n $christmasDay->add(new DateInterval('P2D'));\n break;\n case 5:\n $boxingDay->add(new DateInterval('P2D'));\n break;\n case 6:\n $christmasDay->add(new DateInterval('P2D'));\n $boxingDay->add(new DateInterval('P2D'));\n break;\n }\n\n $this->addHoliday(new Holiday('christmasDay', [], $christmasDay, $this->locale));\n $this->addHoliday(new Holiday('secondChristmasDay', [], $boxingDay, $this->locale));\n }", "private function calculateSecondInternationalWorkersDay(): void\n {\n if ($this->year >= 2018) {\n return;\n }\n\n $this->addHoliday(new Holiday('secondInternationalWorkersDay', [\n 'uk' => 'День міжнародної солідарності трудящих',\n 'ru' => 'День международной солидарности трудящихся',\n ], new \\DateTime(\"$this->year-05-02\", new \\DateTimeZone($this->timezone)), $this->locale));\n }", "private function setHoliday(Request $request , Holiday $holiday){\n $holiday->year = $request->input('year');\n $holiday->hol_name = $request->input('hol_name');\n $holiday->day_off = $request->input('day_off');\n //Format Date then insert it to the database\n $holiday->date_from = date('Y-m-d', strtotime(str_replace('-', '/', $request->input('date_from'))));\n $holiday->date_to = date('Y-m-d', strtotime(str_replace('-', '/', $request->input('date_to'))));\n\n $holiday->save();\n }", "private function calculateStJohnsHolidays(): void\n {\n $date = new DateTime(\"$this->year-6-20 this saturday\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n $this->addHoliday(new Holiday(\n 'stJohnsDay',\n [],\n $date,\n $this->locale\n ));\n\n $date->sub(new DateInterval('P1D'));\n $this->addHoliday(new Holiday(\n 'stJohnsEve',\n [],\n $date,\n $this->locale,\n Holiday::TYPE_OBSERVANCE\n ));\n }", "public function getHolidayAssumptionOfTheBlessedVirginMary($year)\n {\n return $this->createHoliday('Mariä Himmelfahrt', $year . '-08-15', Holiday::TYPE_HOLIDAY);\n }", "function testGreeneyDay()\n {\n // with ja_JP.xml\n $obj = Date_Holidays::factory('Japan', 1986);\n if (Date_Holidays::isError($obj)) {\n $this->fail('Factory was unable to produce driver-object');\n }\n $obj->addTranslationFile(LANG_FILE . '/Japan/ja_JP.xml', 'ja_JP');\n if (Date_Holidays::isError($obj)) {\n $this->fail('fail to add translation file');\n }\n\n // the day of week on 1986-05-04 is 0 (sunday)\n $this->assertNull($obj->getHolidayForDate('1986-05-04'));\n\n $obj->setYear(1987);\n $this->assertEquals('国民の休日', $obj->getHolidayForDate('1987-05-04', 'ja_JP')->getTitle(), 'showa day in 1987');\n\n $obj->setYear(2007);\n $this->assertEquals('みどりの日', $obj->getHolidayForDate('2007-05-04', 'ja_JP')->getTitle(), 'showa day in 2007');\n }", "public function getHolidayCorpusChristi($year)\n {\n $corpusChristi = $this->createHoliday('Fronleichnam', $this->getEaster($year), Holiday::TYPE_HOLIDAY);\n $corpusChristi->modify('+60 days');\n return $corpusChristi;\n }", "public function calculateBonusDay()\n {\n /**\n * If we would assume that bonus day will always be on the 15th,\n * we could simply check if the first day of the month is a week day, \n * since the 1st and the 15th are always on the same weekday. However,\n * the bonus day might change in the future.\n * (usualBonusDay + indexOfFirstDay + 6) mod 7 \n * gives you the numeric representation of the 15th day of the month \n */\n $bonusDay = ($this->_bonusDay + $this->_startsOn + 6) % 7;\n if ($bonusDay == 0) {\n return $this->_bonusDay + $this->_altBonusDay;\n } else if ($bonusDay == 6) {\n return $this->_bonusDay + $this->_altBonusDay + 1;\n } else {\n return $this->_bonusDay;\n }\n }", "function getEndDateWeek($week, $year) {\n \n $dto = new DateTime();\n $dto->setISODate($year, $week);\n $ret['week_start'] = $dto->format('Y-m-d');\n $dto->modify('+6 days');\n $ret['week_end'] = $dto->format('Y-m-d');\n \n $ultimo_dia_semana = $dto->format('Y-m-d');\n return $ultimo_dia_semana;\n \n}", "private function calculateSlovakNationalUprisingDay(): void\n {\n $this->addHoliday(new Holiday(\n 'slovakNationalUprisingDay',\n [\n 'sk' => 'Výročie Slovenského národného povstania',\n 'en' => 'Slovak National Uprising Day',\n ],\n new DateTime($this->year . '-08-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale,\n Holiday::TYPE_OFFICIAL\n ));\n }", "function Date_Holidays_Driver_Jewish()\n {\n }", "function _buildIndependence()\n {\n $this->_addHoliday(\n 'Independence',\n $this->_year . '-01-04',\n 'Independence\\'s Day'\n );\n }", "public function getMidSummerDay($year)\n {\n $date = new \\DateTime($year.'-06-20');\n for ($i = 0; $i < 7; $i++) {\n if ($date->format('w') == 6) {\n break;\n }\n $date->add(new \\DateInterval('P1D'));\n }\n\n return $date;\n }", "public function testRemembranceDayBefore2006(): void\n {\n $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1);\n $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year);\n }", "function easter_jd ( $year, $offset=0 ) {\n\n\t\t$FirstDig = (int)($year/100);\t//first 2 digits of year\n\t\t$Remain19 = $year % 19;\t\t\t//remainder of year / 19\n\n\t\t//calculate PFM date\n\n\t\t$temp = ( (int)(($FirstDig - 15) /2) + 202 - 11 * $Remain19);\n\n\t\tswitch ($FirstDig) {\n\t\t\tcase 21:\n\t\t\tcase 24:\n\t\t\tcase 25:\n\t\t\tcase 27:\n\t\t\tcase 28:\n\t\t\tcase 29:\n\t\t\tcase 30:\n\t\t\tcase 31:\n\t\t\tcase 32:\n\t\t\tcase 34:\n\t\t\tcase 35:\n\t\t\tcase 38:\n\t\t\t\t$temp = $temp - 1;\n\t\t\t\tbreak;\n\n\t\t\tcase 33:\n\t\t\tcase 36:\n\t\t\tcase 37:\n\t\t\tcase 39:\n\t\t\tcase 40:\n\t\t\t\t$temp = $temp - 2;\n\t\t\t\tbreak;\n\t\t}\t//end switch\n\n\t\t$temp = $temp % 30;\n\n\t\t$tA = $temp + 21;\n\t\tif ($temp == 29 ) $tA = $tA -1;\n\t\tif($temp == 28 And $Remain19 > 10) $tA = $tA - 1;\n\n\t\t//find the next Sunday\n\t\t$tB = ($tA - 19) % 7;\n\n\t\t$tC = (40 - $FirstDig) % 4;\n\t\tif ($tC == 3) $tC = $tC +1;\n\t\tif ($tC > 1) $tC = $tC +1;\n\n\t\t$temp = $year % 100;\n\t\t$tD = ($temp + ((int)($temp / 4)) ) % 7;\n\n\t\t$tE = ((20 -$tB - $tC - $tD) % 7 ) + 1;\n\t\t$da = $tA + $tE;\n\n\t\t//return the date\n\t\tif ( $da > 31 ) {\n\t\t\t$da = $da - 31;\n\t\t\t$mo = 4;\n\t\t} else {\n\t\t\t$mo = 3;\n\t\t}\n\n\t\treturn( gregorian_to_jd($mo, $da, $year) + $offset );\n\n\t}", "public function initialize(): void\n {\n $this->timezone = 'Europe/Kiev';\n\n // Add common holidays\n // New Years Day will not be substituted to an monday if it's on a weekend!\n $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale), false);\n $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->internationalWomensDay($this->year, $this->timezone, $this->locale));\n\n // Add Christian holidays\n $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale));\n\n // Add other holidays\n $this->calculateChristmasDay();\n $this->calculateSecondInternationalWorkersDay();\n $this->calculateVictoryDay();\n $this->calculateConstitutionDay();\n $this->calculateIndependenceDay();\n $this->calculateDefenderOfUkraineDay();\n $this->calculateCatholicChristmasDay();\n }", "public function testSportsDayAfter2000(): void\n {\n $year = $this->generateRandomYear(2001);\n\n // Some years the date has changed, so in this test we neeed to skip them.\n if (! in_array($year, [2020, 2021])) {\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"second monday of october {$year}\", new \\DateTimeZone(self::TIMEZONE))\n );\n }\n }", "function erp_financial_start_date() {\n $financial_year_dates = erp_get_financial_year_dates();\n\n return $financial_year_dates['start'];\n}", "function get_holidays() {\n $arr_holidays = array(\n 0 => array(\n 'day' => 1,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 1 => array(\n 'day' => 2,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 2 => array(\n 'day' => 3,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 3 => array(\n 'day' => 4,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 4 => array(\n 'day' => 5,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 5 => array(\n 'day' => 6,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 6 => array(\n 'day' => 7,\n 'month' => 1,\n 'holiday_name' => 'Рождество Христово',\n ),\n 7 => array(\n 'day' => 8,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 8 => array(\n 'day' => 23,\n 'month' => 2,\n 'holiday_name' => 'День защитника отечества',\n ),\n 9 => array(\n 'day' => 8,\n 'month' => 3,\n 'holiday_name' => 'Международный женский день',\n ),\n );\n\n return $arr_holidays;\n}", "public function start($year) {\n static $days= ['MO' => 1, 'TU' => 2, 'WE' => 3, 'TH' => 4, 'FR' => 5, 'SA' => 6, 'SU' => 0];\n\n $start= sscanf($this->dtstart, '%4d%2d%2dT%2d%2d%d');\n if (null === $this->rrule) {\n return gmmktime($start[3], $start[4], $start[5], $start[1], $start[2], $year);\n } else {\n\n // RRULE: https://tools.ietf.org/html/rfc5545#section-3.3.10\n $r= [];\n foreach (explode(';', $this->rrule) as $attributes) {\n sscanf($attributes, \"%[^=]=%[^\\r]\", $key, $value);\n $r[$key]= $value;\n }\n\n if ('YEARLY' !== $r['FREQ']) {\n throw new IllegalStateException('Unexpected frequency '.$r['FREQ']);\n }\n\n // -1SU = \"Last Sunday in month\"\n // 1SU = \"First Sunday in month\"\n // 2SU = \"Second Sunday in month\"\n if ('-' === $r['BYDAY'][0]) {\n $month= (int)$r['BYMONTH'] + 1;\n $by= $days[substr($r['BYDAY'], 2)];\n $last= idate('w', gmmktime(0, 0, 0, $month, -1, $year));\n $day= $by - $last - 1;\n } else {\n $month= (int)$r['BYMONTH'];\n $by= $days[substr($r['BYDAY'], 1)];\n $first= idate('w', gmmktime(0, 0, 0, $month, 0, $year));\n $day= $by + $first + 1 + 7 * ($r['BYDAY'][0] - 1);\n }\n\n return gmmktime($start[3], $start[4], $start[5], $month, $day, $year);\n }\n }", "function centuryFromYear($year)\n{\n return $year%100==0?(int)floor($year/100):(int)floor($year/100)+1;\n}", "public function testHolidayType(): void\n {\n $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR);\n $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OFFICIAL);\n }", "function add_business_days($start_date, $business_days, $holidays, $date_format) {\r\n $first_end_date = add_business_days_no_holidays($start_date, $business_days, $date_format);\r\n\r\n // Now, what about holidays?\r\n $add_more_days = 0;\r\n foreach ($holidays as $holiday) {\r\n if (( strtotime($start_date) <= strtotime($holiday) ) && ( strtotime($first_end_date) >= strtotime($holiday) )) {\r\n $add_more_days++;\r\n }\r\n }\r\n\r\n $end_date = $first_end_date;\r\n if ($add_more_days != 0) {\r\n $end_date = add_business_days_no_holidays($first_end_date, $add_more_days, $date_format);\r\n }\r\n\r\n return $end_date;\r\n}", "function get_holiday()\n\t {\n\t\t$holiday_list \t= $this ->ObjM->holiday_list();\n\t\t//var_dump($holiday_list); exit;\n\t\t\n\t\tif(count($holiday_list)<1){\n\t\t\t$json_arr[]=array('validation'=>'false');\t\n\t\t\techo json_encode($json_arr);\n\t\t\texit;\t \n\t\t}\n\t\t\n\t\tfor($i=0;$i<count($holiday_list);$i++){\n\t\t\tif($holiday_list[$i]['type'] == 'multi')\n\t\t\t{\n\t\t\t $holiday_date = date('d-m-Y',$holiday_list[$i]['start_date']).' To '.date('d-m-Y',$holiday_list[$i]['end_date']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$holiday_date = date('d-m-Y',$holiday_list[$i]['start_date']);\t\n\t\t\t}\n\t\t\t$day = date(\"D\", $holiday_list[$i]['start_date']);\n\t\t\t\n\t\t\t$json_arr[]=array(\n\t\t\t\t\t'title'\t\t\t\t=>\t$holiday_list[$i]['title'],\n\t\t\t\t\t'holiday_date'\t\t=>\t$holiday_date,\n\t\t\t\t\t'holiday_day'\t\t=>\t$day,\n\t\t\t\t\t'description'\t\t=>\t$holiday_list[$i]['description'],\n\t\t\t\t\t'validation'\t \t=>\t'true' );\n\t\t }\n\t\t echo json_encode($json_arr);\n\t\t\texit;\n\t }", "public function getYearEraDayIndex($year);", "function add_business_days_no_holidays($start_date, $business_days, $date_format) {\r\n $ts_start_date = strtotime($start_date);\r\n\r\n $weeks = floor($business_days / 5);\r\n $days1 = $business_days % 5;\r\n\r\n // Now, the end day is at a weekend?\r\n $init_day = date('N', $ts_start_date);\r\n $last_day = $init_day + $days1;\r\n $days2 = 0;\r\n if ($last_day > 5) {\r\n// $days2 = 8 - $last_day;\r\n $days2 = 2; //add two days for going over weekend??\r\n \r\n }\r\n\r\n $total_days = ( $weeks * 7 ) + ( $days1 + $days2 );\r\n\r\n return date('Y-m-d', strtotime('+' . $total_days . ' days', $ts_start_date));\r\n}", "private function calculateStruggleForFreedomAndDemocracyDay(): void\n {\n $this->addHoliday(new Holiday(\n 'struggleForFreedomAndDemocracyDay',\n [\n 'sk' => 'Deň boja za slobodu a demokraciu',\n 'cs' => 'Den boje za svobodu a demokracii',\n 'en' => 'Struggle for Freedom and Democracy Day',\n ],\n new DateTime($this->year . '-11-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale,\n Holiday::TYPE_OFFICIAL\n ));\n }", "function getWorkingDays($startDate, $endDate, $holidays) {\r\n\r\n // do strtotime calculations just once\r\n $endDate = strtotime($endDate);\r\n $startDate = strtotime($startDate);\r\n\r\n\r\n //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24\r\n //We add one to inlude both dates in the interval.\r\n $days = ($endDate - $startDate) / 86400;\r\n\r\n $no_full_weeks = floor($days / 7);\r\n $no_remaining_days = fmod($days, 7);\r\n\r\n //It will return 1 if it's Monday,.. ,7 for Sunday\r\n $the_first_day_of_week = date(\"N\", $startDate);\r\n $the_last_day_of_week = date(\"N\", $endDate);\r\n\r\n //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\r\n //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\r\n if ($the_first_day_of_week <= $the_last_day_of_week) {\r\n if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week)\r\n $no_remaining_days--;\r\n if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week)\r\n $no_remaining_days--;\r\n }\r\n else {\r\n // (edit by Tokes to fix an edge case where the start day was a Sunday\r\n // and the end day was NOT a Saturday)\r\n // the day of the week for start is later than the day of the week for end\r\n if ($the_first_day_of_week == 7) {\r\n // if the start date is a Sunday, then we definitely subtract 1 day\r\n $no_remaining_days--;\r\n\r\n if ($the_last_day_of_week == 6) {\r\n // if the end date is a Saturday, then we subtract another day\r\n $no_remaining_days--;\r\n }\r\n } else {\r\n // the start date was a Saturday (or earlier), and the end date was (Mon..Fri)\r\n // so we skip an entire weekend and subtract 2 days\r\n $no_remaining_days -= 2;\r\n }\r\n }\r\n\r\n //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\r\n//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\r\n $workingDays = $no_full_weeks * 5;\r\n if ($no_remaining_days > 0) {\r\n $workingDays += $no_remaining_days;\r\n }\r\n\r\n //We subtract the holidays\r\n foreach ($holidays as $holiday) {\r\n $time_stamp = strtotime($holiday);\r\n //If the holiday doesn't fall in weekend\r\n if ($startDate <= $time_stamp && $time_stamp <= $endDate && date(\"N\", $time_stamp) != 6 && date(\"N\", $time_stamp) != 7)\r\n $workingDays--;\r\n }\r\n\r\n if ($workingDays < 0) {\r\n $workingDays = .01;\r\n }\r\n return $workingDays;\r\n\r\n\r\n ////Example:\r\n//\r\n//$holidays=array(\"2008-12-25\",\"2008-12-26\",\"2009-01-01\");\r\n//\r\n//echo getWorkingDays(\"2008-12-22\",\"2009-01-02\",$holidays)\r\n//// => will return 7\r\n//\r\n}", "function startEndDateOfAWeek($week, $year) \n{\n\t$time = strtotime(\"1 January $year\", time());\n\t$day = date(\"w\", $time);\n\t$time += ((7 * $week) + 1 - $day) * 24 * 3600;\n\t$dates[0] = date(\"Y-n-j\", $time);\n\t$time += 6 * 24 * 3600;\n\t$dates[1] = date(\"Y-n-j\", $time);\n\treturn $dates;\n}", "public function initialize(): void\n {\n $this->timezone = 'Europe/Rome';\n\n // Add common holidays\n $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale));\n\n // Add Christian holidays\n $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->immaculateConception($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale));\n $this->addHoliday($this->stStephensDay($this->year, $this->timezone, $this->locale));\n\n // Calculate other holidays\n $this->calculateLiberationDay();\n $this->calculateRepublicDay();\n }", "function testShowaDay()\n {\n // with ja_JP.xml\n $obj = Date_Holidays::factory('Japan', 1949);\n if (Date_Holidays::isError($obj)) {\n $this->fail('Factory was unable to produce driver-object');\n }\n $obj->addTranslationFile(LANG_FILE . '/Japan/ja_JP.xml', 'ja_JP');\n if (Date_Holidays::isError($obj)) {\n $this->fail('fail to add translation file');\n }\n\n $this->assertEquals('天皇誕生日', $obj->getHolidayForDate('1949-04-29', 'ja_JP')->getTitle(), 'showa day in 1949');\n\n $obj->setYear(1989);\n $this->assertEquals('みどりの日', $obj->getHolidayForDate('1989-04-29', 'ja_JP')->getTitle(), 'showa day in 1989');\n\n $obj->setYear(2007);\n $this->assertEquals('昭和の日', $obj->getHolidayForDate('2007-04-29', 'ja_JP')->getTitle(), 'showa day in 2007');\n }", "public function calculateEpiphanyEve(): void\n {\n $this->addHoliday(new Holiday(\n 'epiphanyEve',\n [],\n new DateTime(\"$this->year-1-5\", DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale,\n Holiday::TYPE_OBSERVANCE\n ));\n }", "private function calculateAllSaintsHolidays(): void\n {\n $date = new DateTime(\"$this->year-10-31 this saturday\", DateTimeZoneFactory::getDateTimeZone($this->timezone));\n $this->addHoliday(new Holiday(\n 'allSaintsDay',\n [],\n $date,\n $this->locale\n ));\n\n $date->sub(new DateInterval('P1D'));\n $this->addHoliday(new Holiday(\n 'allSaintsEve',\n [],\n $date,\n $this->locale,\n Holiday::TYPE_OBSERVANCE\n ));\n }", "function get_holiday_dropdown()\n {\n $result = '\n <option value=\"Undefined|none\">Not seasonal</option>\n <option value=\"Undefined|Christmas\">Christmas</option>\n <option value=\"Undefined|New Year\">New Year</option>\n <option value=\"Undefined|Valentine\">Valentine</option>\n <option value=\"Undefined|Mid term\">Mid term</option>\n <option value=\"Undefined|Paddys\">Paddys</option>\n <option value=\"Undefined|Mothers\">Mothers</option>\n <option value=\"Undefined|Easter\">Easter</option>\n <option value=\"Undefined|Summer specials\">Summer Special</option>\n <option value=\"Undefined|International Cork Day\">International Cork Day</option>\n ';\n $this->db->select('*');\n $this->db->from('holidays');\n $query = $this->db->get();\n if ($query->num_rows() > 0)\n {\n foreach ($query->result() as $item)\n {\n $result .=\n '<option value=\"Defined|' . $item->holidayTitle . '|' . $this->toDisplayDate($item->holidayStartDate) . '|' . $this->toDisplayDate($item->holidayEndDate) . '\">' . $item->holidayTitle . '</option>';\n }\n }\n else\n {\n $result = '<select name=\"holiday\" id=\"holiday\"><option>None</option></select>';\n }\n return $result;\n }", "public function computeTransitionDate($year)\n {\n $minute = str_pad($this->minute, 2, STR_PAD_LEFT);\n $second = str_pad($this->second, 2, STR_PAD_LEFT);\n\n $transition = DateTime::createFromFormat('Y-m-d G:i:s', \n \"{$year}-{$this->month}-1 {$this->hour}:{$minute}:{$second}\",\n new DateTimeZone('UTC')\n );\n \n if ($transition == FALSE) {\n throw new Exception('invalid transition rule');\n }\n \n $sign = $this->numwk < 0 ? '-' : '+';\n \n if ($sign == '-') {\n $transition->modify(\"+1 month -1 day\");\n }\n \n while($transition->format('w') != $this->wkday) {\n $transition->modify($sign . '1 day');\n }\n $transition->modify($sign . (abs($this->numwk) -1) . ' weeks');\n \n return $transition;\n }", "function dateDiffInDays($startDate,$endDate,$holidays = array(\"2019-01-26\",\"2019-08-15\",\"2019-10-02\")){\r\n $endDate = strtotime($endDate);\r\n $startDate = strtotime($startDate);\r\n //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24\r\n //We add one to inlude both dates in the interval.\r\n $days = ($endDate - $startDate) / 86400 + 1;\r\n $no_full_weeks = floor($days / 7);\r\n $no_remaining_days = fmod($days, 7);\r\n //It will return 1 if it's Monday,.. ,7 for Sunday\r\n $the_first_day_of_week = date(\"N\", $startDate);\r\n $the_last_day_of_week = date(\"N\", $endDate);\r\n //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\r\n //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\r\n if ($the_first_day_of_week <= $the_last_day_of_week) {\r\n if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\r\n if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\r\n }\r\n else {\r\n // (edit by Tokes to fix an edge case where the start day was a Sunday\r\n // and the end day was NOT a Saturday)\r\n // the day of the week for start is later than the day of the week for end\r\n if ($the_first_day_of_week == 7) {\r\n // if the start date is a Sunday, then we definitely subtract 1 day\r\n $no_remaining_days--;\r\n if ($the_last_day_of_week == 6) {\r\n // if the end date is a Saturday, then we subtract another day\r\n $no_remaining_days--;\r\n }\r\n }\r\n else {\r\n // the start date was a Saturday (or earlier), and the end date was (Mon..Fri)\r\n // so we skip an entire weekend and subtract 2 days\r\n $no_remaining_days -= 2;\r\n }\r\n }\r\n //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\r\n//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\r\n $workingDays = $no_full_weeks * 5;\r\n if ($no_remaining_days > 0 )\r\n {\r\n $workingDays += $no_remaining_days;\r\n }\r\n //We subtract the holidays\r\n foreach($holidays as $holiday){\r\n $time_stamp=strtotime($holiday);\r\n //If the holiday doesn't fall in weekend\r\n if ($startDate <= $time_stamp && $time_stamp <= $endDate && date(\"N\",$time_stamp) != 6 && date(\"N\",$time_stamp) != 7)\r\n $workingDays--;\r\n }\r\n return $workingDays;\r\n}", "function getStartEndDate( $week, $year ) {\n $dto = new DateTime();\n $dto->setISODate( $year, $week, 0 );\n $dates['start'] = $dto->format( \"Y-m-d\" );\n $dto->modify( \"+6 days\" ); // move forward one week\n $dates['end'] = $dto->format( \"Y-m-d\" );\n return $dates;\n}", "function GetHoliday($HolidCode) {\r\n $result = \"\";\r\n $conn = conn();\r\n $stmt = $conn->prepare(\"SELECT * FROM `specialdates` WHERE `HolidayCode`='$HolidCode'\");\r\n $stmt->execute();\r\n $result_array = $stmt->fetchAll();\r\n return $result_array;\r\n $conn = NULL;\r\n }", "function get_current_finacial_year(){\n $str_query=\"select financial_year_id, year_name, date_start, date_end from financial_year \n where CURDATE() between date_start and date_end\";\n\tif (!$this->sql_query($str_query)){\n return false;\n\t}\n\t\n return $this->fetch();\n }", "public function get_public_holidays($yymm)\n\t{\n\t\tif ($yymm != null) {\n\t\t\t$this->db->select('holidays.*', false)->from('holidays')->like('start_date', $yymm);\n\t\t\treturn $this->db->get()->result();\n\t\t} else {\n\t\t\terror_log('Error, Undefined variabled: $yymm');\n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.69561625", "0.6951806", "0.6826785", "0.6540133", "0.6462488", "0.6451407", "0.6447207", "0.63755596", "0.6332938", "0.6327886", "0.6201066", "0.61964434", "0.61730283", "0.60724235", "0.60103595", "0.6002728", "0.58549833", "0.58504105", "0.58391345", "0.5832619", "0.5730938", "0.57201624", "0.56788456", "0.5627159", "0.5624321", "0.56146264", "0.5584866", "0.5577184", "0.55575377", "0.55483186", "0.5547625", "0.554173", "0.55269283", "0.55128783", "0.549113", "0.5481608", "0.5477169", "0.54394275", "0.5426831", "0.5412221", "0.539925", "0.53969693", "0.53929776", "0.5384953", "0.53832364", "0.53797305", "0.53669196", "0.5350729", "0.5326613", "0.53189087", "0.5288402", "0.5283606", "0.5283191", "0.5274363", "0.5247316", "0.5241885", "0.5230477", "0.52303636", "0.52283746", "0.52181476", "0.52124727", "0.51993775", "0.5191196", "0.5187587", "0.5178829", "0.5160344", "0.51599216", "0.51474875", "0.5137486", "0.5135886", "0.5125392", "0.5121438", "0.51096815", "0.50949675", "0.50892967", "0.5079672", "0.50465083", "0.50302434", "0.50204545", "0.4977618", "0.49771383", "0.49678084", "0.49670103", "0.4960777", "0.49591646", "0.49584535", "0.49480847", "0.49445847", "0.49403977", "0.49357903", "0.49271512", "0.49228737", "0.4907324", "0.49062482", "0.49057657", "0.4904044", "0.4897597", "0.48847085", "0.48769942", "0.48700684" ]
0.6059145
14
Get all the regions of country
public static function findAll( $countryid ) { return Doctrine_Query::create ()->from ( 'Regions s' ) ->where('s.country_id = ?', array($countryid)) ->orderBy('s.name') ->execute ( array (), Doctrine_Core::HYDRATE_ARRAY ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountriesPerRegion();", "public static function get_all_regions() {\r\n $DB = new \\Nefuzz\\Php\\DBC();\r\n $result = ($DB)->query_to_array(\"\r\n SELECT *\r\n FROM regions;\r\n \",'',[]);\r\n $DB->quit();\r\n return $result;\r\n }", "public function getRegions() {\n $query = <<<SQL\n SELECT\n *\n FROM\n region\nSQL;\n\t\t\n\t\treturn $this->DB->execute($query);\n }", "public function getRegions()\n {\n\n $regions = array(\n \"\" => \"Default (empty)\",\n \"us-east-2\"\t\t\t=> \"US East (Ohio)\",\n \"us-east-1\"\t\t\t=> \"US East (N. Virginia)\",\n \"us-west-1\"\t\t\t=> \"US West (N. California)\",\n \"us-west-2\"\t\t\t=> \"US West (Oregon)\",\n //\"ap-east-1\" => \"Asia Pacific (Hong Kong)***\",\n \"ap-south-1\"\t\t=> \"Asia Pacific (Mumbai)\",\n //\"ap-northeast-3\"\t=> \"Asia Pacific (Osaka-Local)****\",\n \"ap-northeast-2\"\t=> \"Asia Pacific (Seoul)\",\n \"ap-southeast-1\"\t=> \"Asia Pacific (Singapore)\",\n \"ap-southeast-2\"\t=> \"Asia Pacific (Sydney)\",\n \"ap-northeast-1\"\t=> \"Asia Pacific (Tokyo)\",\n \"ca-central-1\"\t\t=> \"Canada (Central)\",\n \"cn-north-1\"\t => \"China (Beijing)\",\n \"cn-northwest-1\"\t=> \"China (Ningxia)\",\n \"eu-central-1\"\t\t=> \"EU (Frankfurt)\",\n \"eu-west-1\"\t\t => \"EU (Ireland)\",\n \"eu-west-2\"\t\t => \"EU (London)\",\n \"eu-west-3\"\t\t => \"EU (Paris)\",\n \"eu-north-1\"\t\t=> \"EU (Stockholm)\",\n \"sa-east-1\"\t\t => \"South America (São Paulo)\",\n \"me-south-1\"\t\t=> \"Middle East (Bahrain)\",\n );\n // ***You must enable this Region before you can use it.\n // ****You can use the Asia Pacific (Osaka-Local) Region only in conjunction with the Asia Pacific\n // (Tokyo) Region. To request access to the Asia Pacific (Osaka-Local) Region, contact your sales representative.\n\n return $regions;\n }", "public function get_regions()\n\t{\n\t\t$this->load->model('promo_model');\n\t\t$region= $this->promo_model->regions();\n\t\t\n\t\techo json_encode($region);\n\t}", "public function countryRegionAction()\n {\n $arrRes = array();\n\n $countryId = $this->getRequest()->getParam('parent');\n $colRegions = Mage::getResourceModel('directory/region_collection')\n ->addCountryFilter($countryId)\n ->load();\n \n\t$arrRegions = $this->_toOptionArray($colRegions);\n if (!empty($arrRegions)) {\n foreach ($arrRegions as $region) {\n $arrRes[] = $region;\n }\n }\n\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($arrRes));\n }", "public function getRegions()\n {\n return $this->regions;\n }", "function getRegions() {\n $query = \" SELECT ID,Name,CityID FROM #__ssregions \";\n $this->_db->setQuery($query);\n return $this->_db->loadAssocList();\n }", "function getRegionsStub($country)\n{\n return array(\"Kentriki Makedonia\", \"Thraki\", \"Peloponisos\", \"Kriti\");\n}", "public function getRegionJsonList()\n {\n $collectionByCountry = [];\n /** @var \\Magento\\Directory\\Model\\ResourceModel\\Region\\Collection $collection */\n $collection = $this->regionCollectionFactory->create();\n /** @var \\Magento\\Directory\\Model\\Region $item */\n foreach ($collection as $item) {\n $collectionByCountry[$item->getData('country_id')][] = $item->getData();\n }\n\n return $collectionByCountry;\n }", "public function getCountries();", "public function getRegiones()\n\t{\n\t\t$regiones = $this->Model_Region->getRegiones();\n\t\techo json_encode($regiones);\n\t}", "private function getRegions(): array\n {\n try {\n /** @var Regions[] $regions */\n $regions = $this->getDoctrine()\n ->getRepository(Regions::class)\n ->findAll();\n }\n catch(\\Exception $ex) {\n return [];\n }\n\n return $regions;\n }", "public function getRegionsIterator()\n {\n return $this->data->getRegions()->getIterator();\n }", "private function allCountries()\n {\n $countries = [];\n $isos = $this->countryIso();\n foreach ($isos as $iso) {\n $path = __DIR__ . '/config/geography/' . $iso . '.php';\n $countries[$iso] = require $path;\n }\n\n return $countries;\n }", "function getCountryRegion($country) {\n\treturn getDetailedTableInfo2(\"vl_countries\",\"lower(country)=lower('$country')\",\"region\");\n}", "public function getCountriesInfo();", "public function getAllCountriesLocations()\n\t{\n\t\t$sCacheId = $this->cache()->set('gmap.countries');\n\t\n\t\tif (!($aRows = $this->cache()->get($sCacheId)))\n\t\t{\n\t\t\t$aRows = $this->database()->select('fc.country_iso, c.name, c.phrase_var_name, fc.*, COUNT(u.user_id) as total_people')\n\t\t\t\t->from(Phpfox::getT('gmap_countries'), 'fc')\t\t\n\t\t\t\t->join(Phpfox::getT('country'), 'c', 'fc.country_iso = c.country_iso')\t\n\t\t\t\t->join(Phpfox::getT('user'), 'u', 'u.country_iso = fc.country_iso')\n\t\t\t\t->join(Phpfox::getT('gmap'), 'f', 'u.user_id = f.user_id')\n\t\t\t\t->group('u.country_iso')\n\t\t\t\t->where('f.not_found = \\'0\\'')\n\t\t\t\t->execute('getSlaveRows');\n\t\t\t\t\n\t\t\t$this->cache()->save($sCacheId, $aRows);\n\t\t}\n\t\t\n\t\tif($aRows != null && is_array($aRows))\n\t\t{\n\t\t\tforeach($aRows as $key => $aRow)\n\t\t\t{\n\t\t\t\tif(isset($aRow['phrase_var_name']) && $aRow['phrase_var_name'] != '')\n\t\t\t\t{\n\t\t\t\t\t$aRows[$key]['name'] = Phpfox::getPhrase($aRow['phrase_var_name']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$aRows = $this->sortByProperty($aRows, 'name');\n\t\t}\n\t\t\n\t\treturn $aRows;\n\t}", "protected function operatingCountries()\n {\n return OperatingCountry::all();\n }", "public function getRegionsByCountryAction(Request $request) {\n $em = $this->getDoctrine()->getManager();\n $countryId = $request->get('countryId');\n $type = $request->get('type');\n $typeClass = $request->get('typeClass');\n\n $regions = $em->getRepository('AppBundle:Region')->getByCountry($countryId);\n\n $response = $this->render('AppBundle:Location/ajax:regions.html.twig', array(\n 'regions' => $regions,\n 'type' => $type,\n 'typeClass'=> $typeClass\n ))->getContent();\n\n return new Response(json_encode($response));\n }", "function getRegionsNew() {\n $query = \" SELECT ID,Name,CityID FROM #__ssregions WHERE ID LIKE 'WebSite%'\";\n $this->_db->setQuery($query);\n return $this->_db->loadAssocList();\n }", "public function regions()\n {\n return $this->hasManyThrough(FirmLocation::class, CandidateLocation::class, 'candidate_id', 'id', 'id' , 'location_id');\n }", "public function regions(Request $request)\n {\n $langcode = $request->query->get('lang', 'fi');\n $cities = explode(' ', $request->query->get('q'));\n $data = $this->getCityBoundaries($cities, $langcode);\n return new JsonResponse($data);\n }", "function getRegions() {\n global $myPDODB, $whereFilter;\n $output = array();\n\n $whereLocal = array();\n $whereClause = getWhereClause($whereLocal);\n\n $sql = \"SELECT r.name AS 'name', r.id AS 'id', COUNT( s.id ) AS 'number', 'region' AS 'type'\nFROM regions AS r\nJOIN countries AS c ON r.id = c.region_id\nJOIN students AS s ON c.id = s.destination_country \n$whereClause\nGROUP BY r.name\nORDER BY r.name;\";\n\n $sth = $myPDODB->prepare($sql);\n $result = $sth->execute();\n\n if ($result) {\n $regions = $sth->fetchAll(PDO::FETCH_ASSOC);\n\n foreach ($regions as $region) {\n // get the country details for each region\n $countries = getCountries($region['id']);\n array_push($output, array(\"item_id\" => $region['id'] * 100000, \"fixed\" => true, \"name\" => $region['name'], \"number\" => $region['number'], \"type\" => $region['type'], \"children\" => $countries));\n }\n }\n\n // add the regions to the output array\n return $output;\n}", "public function getRegions()\n\t{\n\t\t$this->ensureRegionsLoaded();\n\t\treturn new GmthBridgeIterator(new \\ArrayIterator($this->_regions),\n\t\t\t$this, '\\PhpExtended\\Gmth\\GmthBridgeRegion');\n\t}", "function GetCountries()\n\t{\n\t\t$result = $this->sendRequest(\"GetCountries\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function getAllCountries() {\n $myModel = new My_Model();\n $result = $myModel->select('countries', \"*\", null);\n if (count($result) > 1) {\n return $result = [\n \"message\" => \"countries list\",\n \"data\" => $result\n ];\n } else {\n return $resp = [\n \"message\" => \"no country available\",\n \"data\" => \"null\"\n ];\n }\n }", "function _get_regions_subregions(){\n $this->gen_contents['regions'] = $this->admin_career_event_model->dbSelectAllRegions();\n $arr_data = $this->admin_career_event_model->dbSelectAllSubRegions();\n $this->gen_contents['raw_subregion']= $arr_data;\n $id \t\t\t\t\t= 0;\n $arr_subregion\t\t\t\t= array();\n\n foreach ($arr_data as $value){\n if($id != $value->regionid){\n $id = $value->regionid;\n $arr_subregion['R'][$id] = array();\n }\n $arr_subregion['R'][$id][] = array('id' =>$value->id,'name'=>$value->sub_name);\n }\n //gets all the region and subregion for the purpose of displaying filter\n //used to diaply subregion using jason array \t\t\t\t\n $this->gen_contents['json_array'] \t= json_encode($arr_subregion);\n\t\t\t\n\t\t}", "public function getRegioni()\n\t{\n\t\t//Ritorna le regioni, tutte le regioni, TUTTE\n\t\t$query = \"SELECT * FROM regioni\";\n\t\tif($result = parent::query($query))\n\t\t{\n\t\t\t//Controlla che il risultato ottenuto non sia 0, quindi ho ottenuto un risultato\n\t\t\tif($result->num_rows > 0)\n\t\t\t{\n\t\t\t\t//Fetch_array di tutte le righe del comune\n\t\t\t\twhile($row = $result->fetch_array())\n\t\t\t\t{\n\t\t\t\t\t//Crea un array associativo (una sorta di matrice)\n\t\t\t\t\t//Due campi, cod_regione e il nome della regione\n\t\t\t\t\t//ritorna alla funzione Ajax l'array appena creato\n\t\t\t\t\t//che conterrà il nostro array associativo delle regioni\n\t\t\t\t\t$regioni[] = array(\n\t\t\t\t\t\t'cod_regione' => $row['cod_regione'],\n\t\t\t\t\t\t'regione' => $row['regione']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn $regioni;\n\t\t\t}\n\t\t}\n\t}", "public function getStates() {\n $stateList = array();\n \n if (!empty($this->billing_country)) {\n /*\n * PCM\n */\n $stateList = Subregion::model()->findAll('region_id=\"' . $this->billing_country . '\"');\n\n $stateList = CHtml::listData($stateList, 'name', 'name');\n \n }\n return $stateList;\n }", "public static function getAll()\n {\n $database = DatabaseFactory::getFactory()->getConnection();\n\n $sql = \"SELECT region_id, region_name FROM region\";\n $query = $database->prepare($sql);\n $query->execute();\n\n // fetchAll() is the PDO method that gets all result rows\n return $query->fetchAll();\n }", "public function getAllCountryCodes() {\n\t\t$filter = new Filters\\Misc\\CountryCode();\n\t\treturn $filter->query->find();\n\t}", "public function get_regions($country_code)\n\t{\n\t\t$query = \"SELECT `country`, `region`, `name` FROM `regions` WHERE `country` = '\".$country_code.\"' ORDER BY CASE WHEN `region` = '\".NO_REGION.\"' THEN 1 ELSE 0 END, `region`\";\n\t\t$result = $this->db->query($query);\n\t\tif ($result->num_rows() > 0 ) \n\t\t\treturn $result->result();\n\t\treturn false;\n\t}", "public function index()\n {\n $regions = Region::with(['activeAgencies:id,cities'])->withCount('activeAgencies')->get();\n\n return GeoJsonLandingCollection::make($regions);\n }", "public function getContinents() {\n $db = database::getDB();\n $query = \"SELECT DISTINCT continent FROM countries ORDER BY id\";\n $data = $db->query($query);\n return $data;\n }", "public function getCountries() {\n\t\treturn $this->getData('/objekt/laender');\n\t}", "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 }", "public function regions(Request $request): RegionCollection\n {\n return RegionCollection::make(Region::query()->with('translates')->paginate($request->get('perPage') ?? 50));\n }", "function getSiteCountries() {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_COUNTRIES . \" WHERE status='1' ORDER BY country_name\");\n\n return $data;\n }", "public function countries(): array\n {\n return $this->client->get(\"country\");\n }", "public function getCountries() {\n\n $result = $this->doRequest('v1.0/all-countries', 'GET');\n\n return $result;\n\n }", "public function actionIndex() {\n $searchModel = new RegionSearch;\n $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());\n $dataFilterCountry = \\common\\models\\address\\Country::getNameArr();\n \n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n 'dataFilterCountry' => $dataFilterCountry,\n ]);\n }", "public function getSelectedRegionsCollection()\n\t{\n\t\t$collection = $this->getRegionInstance()->getRegionCollection($this);\n\t\treturn $collection;\n\t}", "public function getRegions($countryId = NULL) {\n if (isset($countryId) && $countryId != '') {\n $html = '<option value=\"\">--Select State--</option> ';\n\n $countryData = $this->get_single_row_by_id(TBL_COUNTRIES, 'id', $countryId, 'array');\n\n $this->db->select('id, country_id, region, code'); \n $this->db->where('country_id', $countryData['id']);\n $result = $this->db->get(TBL_REGIONS);\n if ($result->num_rows() > 0 )\n $data = $result->result_array();\n \n if (is_array($data) && !empty($data)) {\n foreach ($data as $states) {\n if ($countryData['country_name'] != $states['region'])\n $html .= '<option value=\"' . $states['id'] . '\">' . $states['region'] . '</option>';\n }\n } else {\n $html = '';\n $html .= '<option value=\"\">No States Available</option>';\n }\n return $html;\n } else {\n $this->db->select('id, country_id, region, code'); \n $result = $this->db->get(TBL_REGIONS);\n if ($result->num_rows() > 0 )\n return $result->result_array();\n else\n return FALSE;\n }\n }", "public function getCountriesIsoList() {\n return $this->_get(4);\n }", "public static function shipping_map() {\n\n\t\t$countryRegions = array();\n\t\t$regions = Region_Shipping::get();\n\t\tif ($regions && $regions->exists()) {\n\n\t\t\tforeach ($regions as $region) {\n\t\t\t\t$country = $region->Country();\n\t\t\t\t$countryRegions[$country->Code][$region->Code] = $region->Title;\n\t\t\t}\n\t\t}\n\t\treturn $countryRegions;\n\t}", "function getAllStates(Country $country) {\n $out = [];\n $r = $this->db->query(\"SELECT divcode, divname FROM country_state WHERE country = '{$country->code}'\");\n while($row = $r->fetchArray(SQLITE3_ASSOC)) {\n $out[$row['divcode']] = $row['divname'];\n }\n return $out;\n }", "public function getRegiones($id){ //id del pais\n return Region::where('codPais','=',$id)->get();\n \n }", "public function getAllLocations()\n\t{\n\t\t$sCacheId = $this->cache()->set('gmap.locations');\n\t\n\t\tif (!($aRows = $this->cache()->get($sCacheId)))\n\t\t{\n\t\t\t$aRows = $this->database()->select('f.*, u.full_name, u.user_name, u.country_iso')\n\t\t\t\t->from(Phpfox::getT('gmap'), 'f')\t\t\n\t\t\t\t->join(Phpfox::getT('user'), 'u', 'u.user_id = f.user_id')\t\n\t\t\t\t->where('f.not_found = \\'0\\'')\n\t\t\t\t->execute('getSlaveRows');\n\t\t\t\t\n\t\t\t$this->cache()->save($sCacheId, $aRows);\n\t\t}\n\t\t\n\t\t$aOutput = array();\n\t\t\n\t\tif($aRows != null && is_array($aRows))\n\t\tforeach($aRows as $aRow)\n\t\t{\n\t\t\t$aOutput[$aRow['country_iso']][] = $aRow;\n\t\t}\n\t\treturn $aOutput;\n\t}", "protected function _initCountryRegions()\n {\n /** @var $region \\Magento\\Directory\\Model\\Region */\n foreach ($this->_regionCollection as $region) {\n $countryNormalized = strtolower($region->getCountryId());\n $regionCode = strtolower($region->getCode());\n $regionName = strtolower($region->getDefaultName());\n $this->_countryRegions[$countryNormalized][$regionCode] = $region->getId();\n $this->_countryRegions[$countryNormalized][$regionName] = $region->getId();\n $this->_regions[$region->getId()] = $region->getDefaultName();\n }\n return $this;\n }", "public static function getCountries()\n\t{\n\t\t$country[\"AFG\"] = Array(\"iso2\" => \"AF\", \"name\" => \"Afghanistan, Islamic Republic \");\n\t\t$country[\"ALA\"] = Array(\"iso2\" => \"AX\", \"name\" => \"Åland Islands\");\n\t\t$country[\"ALB\"] = Array(\"iso2\" => \"AL\", \"name\" => \"Albania, Republic of\");\n\t\t$country[\"DZA\"] = Array(\"iso2\" => \"DZ\", \"name\" => \"Algeria, People's Democratic Republic\");\n\t\t$country[\"ASM\"] = Array(\"iso2\" => \"AS\", \"name\" => \"American Samoa\");\n\t\t$country[\"AND\"] = Array(\"iso2\" => \"AD\", \"name\" => \"Andorra, Principality of\");\n\t\t$country[\"AGO\"] = Array(\"iso2\" => \"AO\", \"name\" => \"Angola, Republic of\");\n\t\t$country[\"AIA\"] = Array(\"iso2\" => \"AI\", \"name\" => \"Anguilla\");\n\t\t$country[\"ATA\"] = Array(\"iso2\" => \"AQ\", \"name\" => \"Antarctica (the territory Sout\");\n\t\t$country[\"ATG\"] = Array(\"iso2\" => \"AG\", \"name\" => \"Antigua and Barbuda\");\n\t\t$country[\"ARG\"] = Array(\"iso2\" => \"AR\", \"name\" => \"Argentina, Argentine Republic\");\n\t\t$country[\"ARM\"] = Array(\"iso2\" => \"AM\", \"name\" => \"Armenia, Republic of\");\n\t\t$country[\"ABW\"] = Array(\"iso2\" => \"AW\", \"name\" => \"Aruba\");\n\t\t$country[\"AUS\"] = Array(\"iso2\" => \"AU\", \"name\" => \"Australia, Commonwealth of\");\n\t\t$country[\"AUT\"] = Array(\"iso2\" => \"AT\", \"name\" => \"Austria, Republic of\");\n\t\t$country[\"AZE\"] = Array(\"iso2\" => \"AZ\", \"name\" => \"Azerbaijan, Republic of\");\n\t\t$country[\"BHS\"] = Array(\"iso2\" => \"BS\", \"name\" => \"Bahamas, Commonwealth of the\");\n\t\t$country[\"BHR\"] = Array(\"iso2\" => \"BH\", \"name\" => \"Bahrain, Kingdom of\");\n\t\t$country[\"BGD\"] = Array(\"iso2\" => \"BD\", \"name\" => \"Bangladesh, People's Republic \");\n\t\t$country[\"BRB\"] = Array(\"iso2\" => \"BB\", \"name\" => \"Barbados\");\n\t\t$country[\"BLR\"] = Array(\"iso2\" => \"BY\", \"name\" => \"Belarus, Republic of\");\n\t\t$country[\"BEL\"] = Array(\"iso2\" => \"BE\", \"name\" => \"Belgium, Kingdom of\");\n\t\t$country[\"BLZ\"] = Array(\"iso2\" => \"BZ\", \"name\" => \"Belize\");\n\t\t$country[\"BEN\"] = Array(\"iso2\" => \"BJ\", \"name\" => \"Benin, Republic of\");\n\t\t$country[\"BMU\"] = Array(\"iso2\" => \"BM\", \"name\" => \"Bermuda\");\n\t\t$country[\"BTN\"] = Array(\"iso2\" => \"BT\", \"name\" => \"Bhutan, Kingdom of\");\n\t\t$country[\"BOL\"] = Array(\"iso2\" => \"BO\", \"name\" => \"Bolivia, Republic of\");\n\t\t$country[\"BIH\"] = Array(\"iso2\" => \"BA\", \"name\" => \"Bosnia and Herzegovina\");\n\t\t$country[\"BWA\"] = Array(\"iso2\" => \"BW\", \"name\" => \"Botswana, Republic of\");\n\t\t$country[\"BVT\"] = Array(\"iso2\" => \"BV\", \"name\" => \"Bouvet Island (Bouvetoya)\");\n\t\t$country[\"BRA\"] = Array(\"iso2\" => \"BR\", \"name\" => \"Brazil, Federative Republic of\");\n\t\t$country[\"IOT\"] = Array(\"iso2\" => \"IO\", \"name\" => \"British Indian Ocean Territory\");\n\t\t$country[\"VGB\"] = Array(\"iso2\" => \"VG\", \"name\" => \"British Virgin Islands\");\n\t\t$country[\"BRN\"] = Array(\"iso2\" => \"BN\", \"name\" => \"Brunei Darussalam\");\n\t\t$country[\"BGR\"] = Array(\"iso2\" => \"BG\", \"name\" => \"Bulgaria, Republic of\");\n\t\t$country[\"BFA\"] = Array(\"iso2\" => \"BF\", \"name\" => \"Burkina Faso\");\n\t\t$country[\"BDI\"] = Array(\"iso2\" => \"BI\", \"name\" => \"Burundi, Republic of\");\n\t\t$country[\"KHM\"] = Array(\"iso2\" => \"KH\", \"name\" => \"Cambodia, Kingdom of\");\n\t\t$country[\"CMR\"] = Array(\"iso2\" => \"CM\", \"name\" => \"Cameroon, Republic of\");\n\t\t$country[\"CAN\"] = Array(\"iso2\" => \"CA\", \"name\" => \"Canada\");\n\t\t$country[\"CPV\"] = Array(\"iso2\" => \"CV\", \"name\" => \"Cape Verde, Republic of\");\n\t\t$country[\"CYM\"] = Array(\"iso2\" => \"KY\", \"name\" => \"Cayman Islands\");\n\t\t$country[\"CAF\"] = Array(\"iso2\" => \"CF\", \"name\" => \"Central African Republic\");\n\t\t$country[\"TCD\"] = Array(\"iso2\" => \"TD\", \"name\" => \"Chad, Republic of\");\n\t\t$country[\"CHL\"] = Array(\"iso2\" => \"CL\", \"name\" => \"Chile, Republic of\");\n\t\t$country[\"CHN\"] = Array(\"iso2\" => \"CN\", \"name\" => \"China, People's Republic of\");\n\t\t$country[\"CXR\"] = Array(\"iso2\" => \"CX\", \"name\" => \"Christmas Island\");\n\t\t$country[\"CCK\"] = Array(\"iso2\" => \"CC\", \"name\" => \"Cocos (Keeling) Islands\");\n\t\t$country[\"COL\"] = Array(\"iso2\" => \"CO\", \"name\" => \"Colombia, Republic of\");\n\t\t$country[\"COM\"] = Array(\"iso2\" => \"KM\", \"name\" => \"Comoros, Union of the\");\n\t\t$country[\"COD\"] = Array(\"iso2\" => \"CD\", \"name\" => \"Congo, Democratic Republic of \");\n\t\t$country[\"COG\"] = Array(\"iso2\" => \"CG\", \"name\" => \"Congo, Republic of the\");\n\t\t$country[\"COK\"] = Array(\"iso2\" => \"CK\", \"name\" => \"Cook Islands\");\n\t\t$country[\"CRI\"] = Array(\"iso2\" => \"CR\", \"name\" => \"Costa Rica, Republic of\");\n\t\t$country[\"CIV\"] = Array(\"iso2\" => \"CI\", \"name\" => \"Cote d'Ivoire, Republic of\");\n\t\t$country[\"HRV\"] = Array(\"iso2\" => \"HR\", \"name\" => \"Croatia, Republic of\");\n\t\t$country[\"CUB\"] = Array(\"iso2\" => \"CU\", \"name\" => \"Cuba, Republic of\");\n\t\t$country[\"CYP\"] = Array(\"iso2\" => \"CY\", \"name\" => \"Cyprus, Republic of\");\n\t\t$country[\"CZE\"] = Array(\"iso2\" => \"CZ\", \"name\" => \"Czech Republic\");\n\t\t$country[\"DNK\"] = Array(\"iso2\" => \"DK\", \"name\" => \"Denmark, Kingdom of\");\n\t\t$country[\"DJI\"] = Array(\"iso2\" => \"DJ\", \"name\" => \"Djibouti, Republic of\");\n\t\t$country[\"DMA\"] = Array(\"iso2\" => \"DM\", \"name\" => \"Dominica, Commonwealth of\");\n\t\t$country[\"DOM\"] = Array(\"iso2\" => \"DO\", \"name\" => \"Dominican Republic\");\n\t\t$country[\"ECU\"] = Array(\"iso2\" => \"EC\", \"name\" => \"Ecuador, Republic of\");\n\t\t$country[\"EGY\"] = Array(\"iso2\" => \"EG\", \"name\" => \"Egypt, Arab Republic of\");\n\t\t$country[\"SLV\"] = Array(\"iso2\" => \"SV\", \"name\" => \"El Salvador, Republic of\");\n\t\t$country[\"GNQ\"] = Array(\"iso2\" => \"GQ\", \"name\" => \"Equatorial Guinea, Republic of\");\n\t\t$country[\"ERI\"] = Array(\"iso2\" => \"ER\", \"name\" => \"Eritrea, State of\");\n\t\t$country[\"EST\"] = Array(\"iso2\" => \"EE\", \"name\" => \"Estonia, Republic of\");\n\t\t$country[\"ETH\"] = Array(\"iso2\" => \"ET\", \"name\" => \"Ethiopia, Federal Democratic R\");\n\t\t$country[\"FRO\"] = Array(\"iso2\" => \"FO\", \"name\" => \"Faroe Islands\");\n\t\t$country[\"FLK\"] = Array(\"iso2\" => \"FK\", \"name\" => \"Falkland Islands (Malvinas)\");\n\t\t$country[\"FJI\"] = Array(\"iso2\" => \"FJ\", \"name\" => \"Fiji, Republic of the Fiji Isl\");\n\t\t$country[\"FIN\"] = Array(\"iso2\" => \"FI\", \"name\" => \"Finland, Republic of\");\n\t\t$country[\"FRA\"] = Array(\"iso2\" => \"FR\", \"name\" => \"France, French Republic\");\n\t\t$country[\"GUF\"] = Array(\"iso2\" => \"GF\", \"name\" => \"French Guiana\");\n\t\t$country[\"PYF\"] = Array(\"iso2\" => \"PF\", \"name\" => \"French Polynesia\");\n\t\t$country[\"ATF\"] = Array(\"iso2\" => \"TF\", \"name\" => \"French Southern Territories\");\n\t\t$country[\"GAB\"] = Array(\"iso2\" => \"GA\", \"name\" => \"Gabon, Gabonese Republic\");\n\t\t$country[\"GMB\"] = Array(\"iso2\" => \"GM\", \"name\" => \"Gambia, Republic of the\");\n\t\t$country[\"GEO\"] = Array(\"iso2\" => \"GE\", \"name\" => \"Georgia\");\n\t\t$country[\"DEU\"] = Array(\"iso2\" => \"DE\", \"name\" => \"Germany, Federal Republic of\");\n\t\t$country[\"GHA\"] = Array(\"iso2\" => \"GH\", \"name\" => \"Ghana, Republic of\");\n\t\t$country[\"GIB\"] = Array(\"iso2\" => \"GI\", \"name\" => \"Gibraltar\");\n\t\t$country[\"GRC\"] = Array(\"iso2\" => \"GR\", \"name\" => \"Greece, Hellenic Republic\");\n\t\t$country[\"GRL\"] = Array(\"iso2\" => \"GL\", \"name\" => \"Greenland\");\n\t\t$country[\"GRD\"] = Array(\"iso2\" => \"GD\", \"name\" => \"Grenada\");\n\t\t$country[\"GLP\"] = Array(\"iso2\" => \"GP\", \"name\" => \"Guadeloupe\");\n\t\t$country[\"GUM\"] = Array(\"iso2\" => \"GU\", \"name\" => \"Guam\");\n\t\t$country[\"GTM\"] = Array(\"iso2\" => \"GT\", \"name\" => \"Guatemala, Republic of\");\n\t\t$country[\"GGY\"] = Array(\"iso2\" => \"GG\", \"name\" => \"Guernsey, Bailiwick of\");\n\t\t$country[\"GIN\"] = Array(\"iso2\" => \"GN\", \"name\" => \"Guinea, Republic of\");\n\t\t$country[\"GNB\"] = Array(\"iso2\" => \"GW\", \"name\" => \"Guinea-Bissau, Republic of\");\n\t\t$country[\"GUY\"] = Array(\"iso2\" => \"GY\", \"name\" => \"Guyana, Co-operative Republic \");\n\t\t$country[\"HTI\"] = Array(\"iso2\" => \"HT\", \"name\" => \"Haiti, Republic of\");\n\t\t$country[\"HMD\"] = Array(\"iso2\" => \"HM\", \"name\" => \"Heard Island and McDonald Isla\");\n\t\t$country[\"VAT\"] = Array(\"iso2\" => \"VA\", \"name\" => \"Holy See (Vatican City State)\");\n\t\t$country[\"HND\"] = Array(\"iso2\" => \"HN\", \"name\" => \"Honduras, Republic of\");\n\t\t$country[\"HKG\"] = Array(\"iso2\" => \"HK\", \"name\" => \"Hong Kong, Special Administrat\");\n\t\t$country[\"HUN\"] = Array(\"iso2\" => \"HU\", \"name\" => \"Hungary, Republic of\");\n\t\t$country[\"ISL\"] = Array(\"iso2\" => \"IS\", \"name\" => \"Iceland, Republic of\");\n\t\t$country[\"IND\"] = Array(\"iso2\" => \"IN\", \"name\" => \"India, Republic of\");\n\t\t$country[\"IDN\"] = Array(\"iso2\" => \"ID\", \"name\" => \"Indonesia, Republic of\");\n\t\t$country[\"IRN\"] = Array(\"iso2\" => \"IR\", \"name\" => \"Iran, Islamic Republic of\");\n\t\t$country[\"IRQ\"] = Array(\"iso2\" => \"IQ\", \"name\" => \"Iraq, Republic of\");\n\t\t$country[\"IRL\"] = Array(\"iso2\" => \"IE\", \"name\" => \"Ireland\");\n\t\t$country[\"IMN\"] = Array(\"iso2\" => \"IM\", \"name\" => \"Isle of Man\");\n\t\t$country[\"ISR\"] = Array(\"iso2\" => \"IL\", \"name\" => \"Israel, State of\");\n\t\t$country[\"ITA\"] = Array(\"iso2\" => \"IT\", \"name\" => \"Italy, Italian Republic\");\n\t\t$country[\"JAM\"] = Array(\"iso2\" => \"JM\", \"name\" => \"Jamaica\");\n\t\t$country[\"JPN\"] = Array(\"iso2\" => \"JP\", \"name\" => \"Japan\");\n\t\t$country[\"JEY\"] = Array(\"iso2\" => \"JE\", \"name\" => \"Jersey, Bailiwick of\");\n\t\t$country[\"JOR\"] = Array(\"iso2\" => \"JO\", \"name\" => \"Jordan, Hashemite Kingdom of\");\n\t\t$country[\"KAZ\"] = Array(\"iso2\" => \"KZ\", \"name\" => \"Kazakhstan, Republic of\");\n\t\t$country[\"KEN\"] = Array(\"iso2\" => \"KE\", \"name\" => \"Kenya, Republic of\");\n\t\t$country[\"KIR\"] = Array(\"iso2\" => \"KI\", \"name\" => \"Kiribati, Republic of\");\n\t\t$country[\"PRK\"] = Array(\"iso2\" => \"KP\", \"name\" => \"Korea, Democratic People's Rep\");\n\t\t$country[\"KOR\"] = Array(\"iso2\" => \"KR\", \"name\" => \"Korea, Republic of\");\n\t\t$country[\"KWT\"] = Array(\"iso2\" => \"KW\", \"name\" => \"Kuwait, State of\");\n\t\t$country[\"KGZ\"] = Array(\"iso2\" => \"KG\", \"name\" => \"Kyrgyz Republic\");\n\t\t$country[\"LAO\"] = Array(\"iso2\" => \"LA\", \"name\" => \"Lao People's Democratic Republ\");\n\t\t$country[\"LVA\"] = Array(\"iso2\" => \"LV\", \"name\" => \"Latvia, Republic of\");\n\t\t$country[\"LBN\"] = Array(\"iso2\" => \"LB\", \"name\" => \"Lebanon, Lebanese Republic\");\n\t\t$country[\"LSO\"] = Array(\"iso2\" => \"LS\", \"name\" => \"Lesotho, Kingdom of\");\n\t\t$country[\"LBR\"] = Array(\"iso2\" => \"LR\", \"name\" => \"Liberia, Republic of\");\n\t\t$country[\"LBY\"] = Array(\"iso2\" => \"LY\", \"name\" => \"Libyan Arab Jamahiriya\");\n\t\t$country[\"LIE\"] = Array(\"iso2\" => \"LI\", \"name\" => \"Liechtenstein, Principality of\");\n\t\t$country[\"LTU\"] = Array(\"iso2\" => \"LT\", \"name\" => \"Lithuania, Republic of\");\n\t\t$country[\"LUX\"] = Array(\"iso2\" => \"LU\", \"name\" => \"Luxembourg, Grand Duchy of\");\n\t\t$country[\"MAC\"] = Array(\"iso2\" => \"MO\", \"name\" => \"Macao, Special Administrative \");\n\t\t$country[\"MKD\"] = Array(\"iso2\" => \"MK\", \"name\" => \"Macedonia, the former Yugoslav\");\n\t\t$country[\"MDG\"] = Array(\"iso2\" => \"MG\", \"name\" => \"Madagascar, Republic of\");\n\t\t$country[\"MWI\"] = Array(\"iso2\" => \"MW\", \"name\" => \"Malawi, Republic of\");\n\t\t$country[\"MYS\"] = Array(\"iso2\" => \"MY\", \"name\" => \"Malaysia\");\n\t\t$country[\"MDV\"] = Array(\"iso2\" => \"MV\", \"name\" => \"Maldives, Republic of\");\n\t\t$country[\"MLI\"] = Array(\"iso2\" => \"ML\", \"name\" => \"Mali, Republic of\");\n\t\t$country[\"MLT\"] = Array(\"iso2\" => \"MT\", \"name\" => \"Malta, Republic of\");\n\t\t$country[\"MHL\"] = Array(\"iso2\" => \"MH\", \"name\" => \"Marshall Islands, Republic of \");\n\t\t$country[\"MTQ\"] = Array(\"iso2\" => \"MQ\", \"name\" => \"Martinique\");\n\t\t$country[\"MRT\"] = Array(\"iso2\" => \"MR\", \"name\" => \"Mauritania, Islamic Republic o\");\n\t\t$country[\"MUS\"] = Array(\"iso2\" => \"MU\", \"name\" => \"Mauritius, Republic of\");\n\t\t$country[\"MYT\"] = Array(\"iso2\" => \"YT\", \"name\" => \"Mayotte\");\n\t\t$country[\"MEX\"] = Array(\"iso2\" => \"MX\", \"name\" => \"Mexico, United Mexican States\");\n\t\t$country[\"FSM\"] = Array(\"iso2\" => \"FM\", \"name\" => \"Micronesia, Federated States o\");\n\t\t$country[\"MDA\"] = Array(\"iso2\" => \"MD\", \"name\" => \"Moldova, Republic of\");\n\t\t$country[\"MCO\"] = Array(\"iso2\" => \"MC\", \"name\" => \"Monaco, Principality of\");\n\t\t$country[\"MNG\"] = Array(\"iso2\" => \"MN\", \"name\" => \"Mongolia\");\n\t\t$country[\"MNE\"] = Array(\"iso2\" => \"ME\", \"name\" => \"Montenegro, Republic of\");\n\t\t$country[\"MSR\"] = Array(\"iso2\" => \"MS\", \"name\" => \"Montserrat\");\n\t\t$country[\"MAR\"] = Array(\"iso2\" => \"MA\", \"name\" => \"Morocco, Kingdom of\");\n\t\t$country[\"MOZ\"] = Array(\"iso2\" => \"MZ\", \"name\" => \"Mozambique, Republic of\");\n\t\t$country[\"MMR\"] = Array(\"iso2\" => \"MM\", \"name\" => \"Myanmar, Union of\");\n\t\t$country[\"NAM\"] = Array(\"iso2\" => \"NA\", \"name\" => \"Namibia, Republic of\");\n\t\t$country[\"NRU\"] = Array(\"iso2\" => \"NR\", \"name\" => \"Nauru, Republic of\");\n\t\t$country[\"NPL\"] = Array(\"iso2\" => \"NP\", \"name\" => \"Nepal, State of\");\n\t\t$country[\"ANT\"] = Array(\"iso2\" => \"AN\", \"name\" => \"Netherlands Antilles\");\n\t\t$country[\"NLD\"] = Array(\"iso2\" => \"NL\", \"name\" => \"Netherlands, Kingdom of the\");\n\t\t$country[\"NCL\"] = Array(\"iso2\" => \"NC\", \"name\" => \"New Caledonia\");\n\t\t$country[\"NZL\"] = Array(\"iso2\" => \"NZ\", \"name\" => \"New Zealand\");\n\t\t$country[\"NIC\"] = Array(\"iso2\" => \"NI\", \"name\" => \"Nicaragua, Republic of\");\n\t\t$country[\"NER\"] = Array(\"iso2\" => \"NE\", \"name\" => \"Niger, Republic of\");\n\t\t$country[\"NGA\"] = Array(\"iso2\" => \"NG\", \"name\" => \"Nigeria, Federal Republic of\");\n\t\t$country[\"NIU\"] = Array(\"iso2\" => \"NU\", \"name\" => \"Niue\");\n\t\t$country[\"NFK\"] = Array(\"iso2\" => \"NF\", \"name\" => \"Norfolk Island\");\n\t\t$country[\"MNP\"] = Array(\"iso2\" => \"MP\", \"name\" => \"Northern Mariana Islands, Comm\");\n\t\t$country[\"NOR\"] = Array(\"iso2\" => \"NO\", \"name\" => \"Norway, Kingdom of\");\n\t\t$country[\"OMN\"] = Array(\"iso2\" => \"OM\", \"name\" => \"Oman, Sultanate of\");\n\t\t$country[\"PAK\"] = Array(\"iso2\" => \"PK\", \"name\" => \"Pakistan, Islamic Republic of\");\n\t\t$country[\"PLW\"] = Array(\"iso2\" => \"PW\", \"name\" => \"Palau, Republic of\");\n\t\t$country[\"PSE\"] = Array(\"iso2\" => \"PS\", \"name\" => \"Palestinian Territory, Occupie\");\n\t\t$country[\"PAN\"] = Array(\"iso2\" => \"PA\", \"name\" => \"Panama, Republic of\");\n\t\t$country[\"PNG\"] = Array(\"iso2\" => \"PG\", \"name\" => \"Papua New Guinea, Independent \");\n\t\t$country[\"PRY\"] = Array(\"iso2\" => \"PY\", \"name\" => \"Paraguay, Republic of\");\n\t\t$country[\"PER\"] = Array(\"iso2\" => \"PE\", \"name\" => \"Peru, Republic of\");\n\t\t$country[\"PHL\"] = Array(\"iso2\" => \"PH\", \"name\" => \"Philippines, Republic of the\");\n\t\t$country[\"PCN\"] = Array(\"iso2\" => \"PN\", \"name\" => \"Pitcairn Islands\");\n\t\t$country[\"POL\"] = Array(\"iso2\" => \"PL\", \"name\" => \"Poland, Republic of\");\n\t\t$country[\"PRT\"] = Array(\"iso2\" => \"PT\", \"name\" => \"Portugal, Portuguese Republic\");\n\t\t$country[\"PRI\"] = Array(\"iso2\" => \"PR\", \"name\" => \"Puerto Rico, Commonwealth of\");\n\t\t$country[\"QAT\"] = Array(\"iso2\" => \"QA\", \"name\" => \"Qatar, State of\");\n\t\t$country[\"REU\"] = Array(\"iso2\" => \"RE\", \"name\" => \"Reunion\");\n\t\t$country[\"ROU\"] = Array(\"iso2\" => \"RO\", \"name\" => \"Romania\");\n\t\t$country[\"RUS\"] = Array(\"iso2\" => \"RU\", \"name\" => \"Russian Federation\");\n\t\t$country[\"RWA\"] = Array(\"iso2\" => \"RW\", \"name\" => \"Rwanda, Republic of\");\n\t\t$country[\"BLM\"] = Array(\"iso2\" => \"BL\", \"name\" => \"Saint Barthelemy\");\n\t\t$country[\"SHN\"] = Array(\"iso2\" => \"SH\", \"name\" => \"Saint Helena\");\n\t\t$country[\"KNA\"] = Array(\"iso2\" => \"KN\", \"name\" => \"Saint Kitts and Nevis, Federat\");\n\t\t$country[\"LCA\"] = Array(\"iso2\" => \"LC\", \"name\" => \"Saint Lucia\");\n\t\t$country[\"MAF\"] = Array(\"iso2\" => \"MF\", \"name\" => \"Saint Martin\");\n\t\t$country[\"SPM\"] = Array(\"iso2\" => \"PM\", \"name\" => \"Saint Pierre and Miquelon\");\n\t\t$country[\"VCT\"] = Array(\"iso2\" => \"VC\", \"name\" => \"Saint Vincent and the Grenadin\");\n\t\t$country[\"WSM\"] = Array(\"iso2\" => \"WS\", \"name\" => \"Samoa, Independent State of\");\n\t\t$country[\"SMR\"] = Array(\"iso2\" => \"SM\", \"name\" => \"San Marino, Republic of\");\n\t\t$country[\"STP\"] = Array(\"iso2\" => \"ST\", \"name\" => \"Sao Tome and Principe, Democra\");\n\t\t$country[\"SAU\"] = Array(\"iso2\" => \"SA\", \"name\" => \"Saudi Arabia, Kingdom of\");\n\t\t$country[\"SEN\"] = Array(\"iso2\" => \"SN\", \"name\" => \"Senegal, Republic of\");\n\t\t$country[\"SRB\"] = Array(\"iso2\" => \"RS\", \"name\" => \"Serbia, Republic of\");\n\t\t$country[\"SYC\"] = Array(\"iso2\" => \"SC\", \"name\" => \"Seychelles, Republic of\");\n\t\t$country[\"SLE\"] = Array(\"iso2\" => \"SL\", \"name\" => \"Sierra Leone, Republic of\");\n\t\t$country[\"SGP\"] = Array(\"iso2\" => \"SG\", \"name\" => \"Singapore, Republic of\");\n\t\t$country[\"SVK\"] = Array(\"iso2\" => \"SK\", \"name\" => \"Slovakia (Slovak Republic)\");\n\t\t$country[\"SVN\"] = Array(\"iso2\" => \"SI\", \"name\" => \"Slovenia, Republic of\");\n\t\t$country[\"SLB\"] = Array(\"iso2\" => \"SB\", \"name\" => \"Solomon Islands\");\n\t\t$country[\"SOM\"] = Array(\"iso2\" => \"SO\", \"name\" => \"Somalia, Somali Republic\");\n\t\t$country[\"ZAF\"] = Array(\"iso2\" => \"ZA\", \"name\" => \"South Africa, Republic of\");\n\t\t$country[\"SGS\"] = Array(\"iso2\" => \"GS\", \"name\" => \"South Georgia and the South Sa\");\n\t\t$country[\"ESP\"] = Array(\"iso2\" => \"ES\", \"name\" => \"Spain, Kingdom of\");\n\t\t$country[\"LKA\"] = Array(\"iso2\" => \"LK\", \"name\" => \"Sri Lanka, Democratic Socialis\");\n\t\t$country[\"SDN\"] = Array(\"iso2\" => \"SD\", \"name\" => \"Sudan, Republic of\");\n\t\t$country[\"SUR\"] = Array(\"iso2\" => \"SR\", \"name\" => \"Suriname, Republic of\");\n\t\t$country[\"SJM\"] = Array(\"iso2\" => \"SJ\", \"name\" => \"Svalbard & Jan Mayen Islands\");\n\t\t$country[\"SWZ\"] = Array(\"iso2\" => \"SZ\", \"name\" => \"Swaziland, Kingdom of\");\n\t\t$country[\"SWE\"] = Array(\"iso2\" => \"SE\", \"name\" => \"Sweden, Kingdom of\");\n\t\t$country[\"CHE\"] = Array(\"iso2\" => \"CH\", \"name\" => \"Switzerland, Swiss Confederati\");\n\t\t$country[\"SYR\"] = Array(\"iso2\" => \"SY\", \"name\" => \"Syrian Arab Republic\");\n\t\t$country[\"TWN\"] = Array(\"iso2\" => \"TW\", \"name\" => \"Taiwan\");\n\t\t$country[\"TJK\"] = Array(\"iso2\" => \"TJ\", \"name\" => \"Tajikistan, Republic of\");\n\t\t$country[\"TZA\"] = Array(\"iso2\" => \"TZ\", \"name\" => \"Tanzania, United Republic of\");\n\t\t$country[\"THA\"] = Array(\"iso2\" => \"TH\", \"name\" => \"Thailand, Kingdom of\");\n\t\t$country[\"TLS\"] = Array(\"iso2\" => \"TL\", \"name\" => \"Timor-Leste, Democratic Republ\");\n\t\t$country[\"TGO\"] = Array(\"iso2\" => \"TG\", \"name\" => \"Togo, Togolese Republic\");\n\t\t$country[\"TKL\"] = Array(\"iso2\" => \"TK\", \"name\" => \"Tokelau\");\n\t\t$country[\"TON\"] = Array(\"iso2\" => \"TO\", \"name\" => \"Tonga, Kingdom of\");\n\t\t$country[\"TTO\"] = Array(\"iso2\" => \"TT\", \"name\" => \"Trinidad and Tobago, Republic \");\n\t\t$country[\"TUN\"] = Array(\"iso2\" => \"TN\", \"name\" => \"Tunisia, Tunisian Republic\");\n\t\t$country[\"TUR\"] = Array(\"iso2\" => \"TR\", \"name\" => \"Turkey, Republic of\");\n\t\t$country[\"TKM\"] = Array(\"iso2\" => \"TM\", \"name\" => \"Turkmenistan\");\n\t\t$country[\"TCA\"] = Array(\"iso2\" => \"TC\", \"name\" => \"Turks and Caicos Islands\");\n\t\t$country[\"TUV\"] = Array(\"iso2\" => \"TV\", \"name\" => \"Tuvalu\");\n\t\t$country[\"UGA\"] = Array(\"iso2\" => \"UG\", \"name\" => \"Uganda, Republic of\");\n\t\t$country[\"UKR\"] = Array(\"iso2\" => \"UA\", \"name\" => \"Ukraine\");\n\t\t$country[\"ARE\"] = Array(\"iso2\" => \"AE\", \"name\" => \"United Arab Emirates\");\n\t\t$country[\"GBR\"] = Array(\"iso2\" => \"GB\", \"name\" => \"United Kingdom of Great Britain\");\n\t\t$country[\"USA\"] = Array(\"iso2\" => \"US\", \"name\" => \"United States of America\");\n\t\t$country[\"UMI\"] = Array(\"iso2\" => \"UM\", \"name\" => \"United States Minor Outlying I\");\n\t\t$country[\"VIR\"] = Array(\"iso2\" => \"VI\", \"name\" => \"United States Virgin Islands\");\n\t\t$country[\"URY\"] = Array(\"iso2\" => \"UY\", \"name\" => \"Uruguay, Eastern Republic of\");\n\t\t$country[\"UZB\"] = Array(\"iso2\" => \"UZ\", \"name\" => \"Uzbekistan, Republic of\");\n\t\t$country[\"VUT\"] = Array(\"iso2\" => \"VU\", \"name\" => \"Vanuatu, Republic of\");\n\t\t$country[\"VEN\"] = Array(\"iso2\" => \"VE\", \"name\" => \"Venezuela, Bolivarian Republic\");\n\t\t$country[\"VNM\"] = Array(\"iso2\" => \"VN\", \"name\" => \"Vietnam, Socialist Republic of\");\n\t\t$country[\"WLF\"] = Array(\"iso2\" => \"WF\", \"name\" => \"Wallis and Futuna\");\n\t\t$country[\"ESH\"] = Array(\"iso2\" => \"EH\", \"name\" => \"Western Sahara\");\n\t\t$country[\"YEM\"] = Array(\"iso2\" => \"YE\", \"name\" => \"Yemen\");\n\t\t$country[\"ZMB\"] = Array(\"iso2\" => \"ZM\", \"name\" => \"Zambia, Republic of\");\n\t\t$country[\"ZWE\"] = Array(\"iso2\" => \"ZW\", \"name\" => \"Zimbabwe, Republic of\");\n\t\t$country[\"0\"] = Array(\"iso2\" => \"0\", \"name\" => \"NO VALID COUNTRY\");\n\n\t\treturn $country;\n\t}", "public function getCountryList()\n {\n return $this->call('country.list');\n }", "public function GetCountries(){\n try {\n \n // $country=new Countries();\n $countries=Countries::model()->GetCountries();\n return $countries;\n \n } catch (Exception $ex) {\n Yii::log(\"SkiptaUserService:GetCountries::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n }\n }", "public function getRegions($countryIdent = NULL, $subdivisionIdent = NULL) {\n\t\t$params = '';\n\n\t\tif (NULL !== $countryIdent) {\n\t\t\t$params = '?land=' . $countryIdent;\n\t\t}\n\n\t\tif (NULL !== $subdivisionIdent) {\n\t\t\t$params = '?bundesland=' . $subdivisionIdent;\n\t\t}\n\n\t\treturn $this->getData('/objekt/regionen' . $params);\n\t}", "function get_all_countries($obj, $continent='')\n{\n\t$country_result = $obj->db->query($obj->Query_reader->get_query_by_code('get_countries_list', array('continent'=>$continent)));\n\t\n\treturn $country_result->result_array();\n}", "public function getYaCityRegions() {\n\t $arYaRegions=array();\n\t foreach ($this->arRegions as $val){\n\t if( $val[\"GeoRegionType\"]==\"City\" || $val[\"GeoRegionType\"]==\"Village\" ){\n\t $arYaRegions[$val[\"GeoRegionId\"]]=$val[\"GeoRegionName\"];\n\t }\n\t }\n\t asort($arYaRegions);\n\t return $arYaRegions;\n\t}", "public static function getRegionOptions() {\n $file = fopen(drupal_get_path('module', 'smart_content_smart_ip') . '/data/region_codes.csv', \"r\");\n $region_codes = [];\n while (!feof($file)) {\n $regions = fgetcsv($file);\n if (!empty($regions[2])) {\n $country_name = self::getCountryNameFromCode($regions[0]);\n $region_codes[$country_name][$regions[2]] = $regions[2];\n }\n }\n ksort($region_codes);\n foreach ($region_codes as $key => $value) {\n ksort($value);\n $region_codes[$key] = $value;\n }\n return $region_codes;\n }", "public function getAllCountries() {\n return $this->_countries->pluck ( 'name', 'code','id','flag');\n }", "public function regions()\n {\n return $this->hasMany('App\\SelectedRegion');\n }", "public function getCountriesList() {\n return $this->_get(7);\n }", "static function get_countries() {\n static $ret = array();\n if(empty($ret)) {\n global $wpdb;\n $ret = $wpdb->get_results('SELECT * FROM ai_country ORDER BY name', OBJECT_K);\n }\n return $ret;\n }", "public function getCountries()\n {\n foreach (CountryStorage::getAll() as $id=>$content) {\n $key = $content->id;\n $value = $content->name;\n $countryoptions[$key] = $value;\n }\n return $countryoptions;\n }", "public function getState($countryId) {\n $data = [];\n $countries = $this->countryInformationAcquirer->getCountriesInfo();\n foreach ($countries as $country) {\n if ($country->getId() == $countryId) { \n $regions = [];\n if ($availableRegions = $country->getAvailableRegions()) {\n foreach ($availableRegions as $region) {\n $data[] = [\n 'code' => $region->getCode(),\n 'region_id' => $region->getId(),\n 'name' => $region->getName()\n ];\n }\n }\n }\n }\n\n return $data;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public static function getCountries()\n {\n return self::$countryList;\n }", "public function actionCountries()\n {\n $continentId = Yii::$app->request->get(\"continentId\");\n $countries = Country::getAvailable( $continentId );\n echo json_encode( $countries );\n Yii::$app->end(200);\n }", "public function getZoneCountriesProperty()\n {\n return Country::whereIn('id', $this->selectedCountries)->get();\n }", "public function getAll()\n {\n \ttry {\n\t\t\t// Cargo los entrenamientos.\n\t\t\t$country = Country::get();\n\t\t\t\n \t} catch (\\Exception $e) {\n \t\treturn ResponseHelper::armyResponse(false, 400, \"Internal Error\", \"Error: \" . $e->getMessage()) ;\n \t}\n\n\t\treturn ResponseHelper::armyResponse(true, 200, $country, \"countries\");\n }", "public function provider_get_region() {\n\t\t$array_provide = array();\n\t\tforeach ( self::ARRAY_REGION as $region ) {\n\t\t\t$expected = str_replace( '_', '-', strtolower( $region ) );\n\t\t\t$array_provide[] = array( $region, $expected );\n\t\t}\n\t\treturn $array_provide;\n\t}", "function loadCountriesFromRegion($region,$companyID) {\n\tif($region) {\n\t\tglobal $trailSessionUser;\n\t\n\t\t$theUserID=0;\n\t\t//ensure $trailSessionUser is not a visitor\n\t\tif(substr($trailSessionUser,0,7)!=\"visitor\") {\n\t\t\t$theUserID=getUserID($trailSessionUser);\n\t\t}\n\t\n\t\t//get the towns first\n\t\t$query=0;\n\t\t$query=mysqlquery(\"select distinct countryID,country from vl_countries where region='$region' order by country\");\n\t\tif(mysqlnumrows($query)) {\n\t\t\t$return=0;\n\t\t\t$return=\"\n\t\t\t\t<table width=\\\"100%\\\" border=\\\"0\\\">\n\t\t\t\t <tr>\n\t\t\t\t\t<td colspan=\\\"2\\\">Select the markets covered:</td>\n\t\t\t\t </tr>\";\n\t\t\t$q=array();\n\t\t\twhile($q=mysqlfetcharray($query)) {\n\t\t\t\t$return.=\"\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td width=\\\"1%\\\"><input type=\\\"checkbox\\\" name=\\\"marketscoveredUnique[]\\\" value=\\\"$q[countryID]\\\" \".(checkMarketAgainstProvider($theUserID,$q[\"countryID\"],$companyID)?\"checked\":\"\").\"></td>\n\t\t\t\t\t\t\t<td width=\\\"99%\\\">\".removeSpecialCharacters($q[country]).\"</td>\n\t\t\t\t\t\t</tr>\";\n\t\t\t}\n\t\t\t$return.=\"</table>\";\n\t\n\t\t\treturn $return;\n\t\t} else {\n\t\t\t$return=0;\n\t\t\t//$return=\"No countries found in database!\";\n\t\t\t$return=\"\";\n\t\n\t\t\treturn $return;\n\t\t}\n\t}\n}", "public function country_list()\n {\n $result = common_select_values('id, name', 'ad_countries', '', 'result');\n return $result; \n }", "public function getCountries() {\n $dql = \"SELECT c from Country c\n ORDER BY c.name\";\n $countries = $this->em\n ->createQuery($dql)\n ->getResult();\n return $countries;\n }", "public function index()\n {\n return view('backend.region.index')->withRegions($this->region->getForDataTable()->paginate(10));\n }", "public function index(Country $country)\n {\n $data = [\n 'title' => 'Регионы',\n 'country' => $country,\n 'regions' => $country->regions()->paginate(25)\n ];\n\n return view('admin.regions.index', $data);\n }", "function countryList()\n {\n $arrClms = array(\n 'country_id',\n 'name',\n );\n $varOrderBy = 'name ASC ';\n $arrRes = $this->select(TABLE_COUNTRY, $arrClms);\n //pre($arrRes);\n return $arrRes;\n }", "public function getAllCountriesProperty()\n {\n return Country::get();\n }", "public function getRegion(): RegionInterface;", "public function countries(): array\n {\n $payload = Payload::list('countries');\n\n $result = $this->transporter->get($payload->uri)->throw();\n\n return (array) $result->json('data');\n }", "public function getSelectedRegions()\n\t{\n\t\tif (!$this->hasSelectedRegions()) {\n\t\t\t$regions = array();\n\t\t\tforeach ($this->getSelectedRegionsCollection() as $region) {\n\t\t\t\t$regions[] = $region;\n\t\t\t}\n\t\t\t$this->setSelectedRegions($regions);\n\t\t}\n\t\treturn $this->getData('selected_regions');\n\t}", "public function getCountryList() {\n $result = array();\n $collection = Mage::getModel('directory/country')->getCollection();\n foreach ($collection as $country) {\n $cid = $country->getId();\n $cname = $country->getName();\n $result[$cid] = $cname;\n }\n return $result;\n }", "public function getCountries()\n {\n return \"/V1/directory/countries\";\n }", "public function countryList(){\n $sorted = $this->country->select('id','country_name')->get()->sortBy('country_name');\n return $sorted->values()->all();\n }", "public function getCountries() {\n $db = database::getDB();\n $query = \"SELECT country FROM countries ORDER BY id\";\n $data = $db->query($query);\n return $data;\n }", "public function getCountries()\n {\n return $this->_countries;\n }", "public function regions()\n {\n return $this->hasMany('Region', 'lot_id');\n }", "function countries()\n{\n return app('earth')->getCountries();\n}", "public function listCountries() {\r\n\t\t\t$sql = Connection::getHandle()->prepare(\"SELECT DISTINCT c.countries_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.countries_name,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.countries_iso_code_2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCASE WHEN z.zone_id > 0 THEN 'true' ELSE 'false' END AS zone\r\n\t\t\t\t\t\t\t\t\t\tFROM bs_countries c\r\n\t\t\t\t\t\t\t\t\t\tLEFT JOIN bs_zones z ON (c.countries_iso_code_2 = z.countries_id)\r\n\t\t\t\t\t\t\t\t\t\tGROUP BY c.countries_id\r\n\t\t\t\t\t\t\t\t\t\tORDER BY c.countries_id\");\r\n\t\t\t$sql->execute();\r\n\r\n\t\t\twhile ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\t\t\t\t$results[] = $row;\r\n\t\t\t}\r\n\r\n\t\t\treturn $results;\r\n\t\t}", "public function get_country_list() \n\t{\n\t\treturn $this->db->select('num_code')\n\t\t->select('country_name')\n\t\t->select('num_code')\n\t\t->from('system_iso3166_l10n')\n\t\t->order_by('country_name', 'ASC')\t\n\t\t->get()->result();\n\t}", "public function sGetCountryList()\n {\n $context = Shopware()->Container()->get('shopware_storefront.context_service')->getShopContext();\n $service = Shopware()->Container()->get('shopware_storefront.location_service');\n\n $countryList = $service->getCountries($context);\n $countryList = Shopware()->Container()->get('legacy_struct_converter')->convertCountryStructList($countryList);\n\n $countryList = array_map(function ($country) {\n $request = $this->front->Request();\n $countryId = (int) $country['id'];\n $country['flag'] = ((int) $request->getPost('country') === $countryId || (int) $request->getPost('countryID') === $countryId);\n\n return $country;\n }, $countryList);\n\n $countryList = $this->eventManager->filter(\n 'Shopware_Modules_Admin_GetCountries_FilterResult',\n $countryList,\n ['subject' => $this]\n );\n\n return $countryList;\n }", "private function countryIso()\n {\n $cacheKey = 'country_abbrs';\n $ttl = config('priongeography.cache_ttl', 60*24);\n\n return $this->cache->remember($cacheKey, $ttl, function () {\n $countries = scandir(__DIR__.'/config/geography');\n $countries = str_replace(\".php\", \"\", $countries);\n unset($countries[0]);\n unset($countries[1]);\n\n return $countries;\n });\n }", "public function getAllCountrie()\n\t{\n\t\t$countrie = Countrie::all() ;\t\n\t\t$data = array() ;\n\t\tforeach($countrie as $value){\n\t\t\t$countryData = array(\n\t\t\t'id' => $value->id ,\n\t\t\t'name_ar' => $value->name_ar ,\n\t\t\t'name_en' => $value->name_en \n\t\t\t) ;\n\t\t\tarray_push($data , $countryData) ;\n\t\t}\n\t\t return response()->json([\n 'status' => 1,\n 'data' => $data, \t\t\t\t\n ]); \n\t}", "public function callRegions(array $params = array())\n {\n return $this->call('objekt/regionen', $params);\n }", "function GetCountries () {\n\t\t$this->db->order_by('name','ASC');\n\t\t$result = $this->db->get('countries');\n\n\t\t$countries = array();\n\t\tforeach ($result->result_array() as $country) {\n\t\t\t$countries[] = array(\n\t\t\t\t\t\t\t'iso2' => $country['iso2'],\n\t\t\t\t\t\t\t'name' => $country['name']\n\t\t\t\t\t\t);\n\t\t}\n\n\t\treturn $countries;\n\t}", "protected function updateRegions()\n {\n $regions = [\n ['_stateId' => 1, 'name' => 'Almería'],\n ['_stateId' => 1, 'name' => 'Cádiz'],\n ['_stateId' => 1, 'name' => 'Córdoba'],\n ['_stateId' => 1, 'name' => 'Granada'],\n ['_stateId' => 1, 'name' => 'Huelva'],\n ['_stateId' => 1, 'name' => 'Jaén'],\n ['_stateId' => 1, 'name' => 'Málaga'],\n ['_stateId' => 1, 'name' => 'Sevilla'],\n ['_stateId' => 2, 'name' => 'Huesca'],\n ['_stateId' => 2, 'name' => 'Teruel'],\n ['_stateId' => 2, 'name' => 'Zaragoza'],\n ['_stateId' => 3, 'name' => 'Asturias'],\n ['_stateId' => 4, 'name' => 'Islas Baleares'],\n ['_stateId' => 5, 'name' => 'Las Palmas'],\n ['_stateId' => 5, 'name' => 'Santa Cruz de Tenerife'],\n ['_stateId' => 6, 'name' => 'Cantabria'],\n ['_stateId' => 7, 'name' => 'Ávila'],\n ['_stateId' => 7, 'name' => 'Burgos'],\n ['_stateId' => 7, 'name' => 'León'],\n ['_stateId' => 7, 'name' => 'Palencia'],\n ['_stateId' => 7, 'name' => 'Salamanca'],\n ['_stateId' => 7, 'name' => 'Segovia'],\n ['_stateId' => 7, 'name' => 'Soria'],\n ['_stateId' => 7, 'name' => 'Valladolid'],\n ['_stateId' => 7, 'name' => 'Zamora'],\n ['_stateId' => 8, 'name' => 'Albacete'],\n ['_stateId' => 8, 'name' => 'Ciudad Real'],\n ['_stateId' => 8, 'name' => 'Cuenca'],\n ['_stateId' => 8, 'name' => 'Guadalajara'],\n ['_stateId' => 8, 'name' => 'Toledo'],\n ['_stateId' => 9, 'name' => 'Barcelona'],\n ['_stateId' => 9, 'name' => 'Girona'],\n ['_stateId' => 9, 'name' => 'Lleida'],\n ['_stateId' => 9, 'name' => 'Tarragona'],\n ['_stateId' => 10, 'name' => 'Alicante'],\n ['_stateId' => 10, 'name' => 'Castellón'],\n ['_stateId' => 10, 'name' => 'Valencia'],\n ['_stateId' => 11, 'name' => 'Badajoz'],\n ['_stateId' => 11, 'name' => 'Cáceres'],\n ['_stateId' => 12, 'name' => 'A Coruña'],\n ['_stateId' => 12, 'name' => 'Lugo'],\n ['_stateId' => 12, 'name' => 'Ourense'],\n ['_stateId' => 12, 'name' => 'Pontevedra'],\n ['_stateId' => 13, 'name' => 'Madrid'],\n ['_stateId' => 14, 'name' => 'Murcia'],\n ['_stateId' => 15, 'name' => 'Navarra'],\n ['_stateId' => 16, 'name' => 'Álava'],\n ['_stateId' => 16, 'name' => 'Bizkaia'],\n ['_stateId' => 16, 'name' => 'Gipuzkoa'],\n ['_stateId' => 17, 'name' => 'La Rioja'],\n ['_stateId' => 18, 'name' => 'Ceuta'],\n ['_stateId' => 19, 'name' => 'Melilla']\n ];\n\n foreach ($regions as $rData) {\n $region = Region::findOne([\n 'name' => $rData['name'],\n ]);\n $region->state_id = $rData['_stateId'];\n if ($region->save() === false) {\n throw new SaveException($region);\n }\n }\n }", "public static function All()\n\t{\n\t\t$query = 'EXEC [getCountries]';\n\t\t$query .= '@languageCode = \\'' . Localisation::getCurrentLanguage() . '\\'';\n\n\t\t$rows = Database::ODBCExecute($query);\n\n\t\t$countries = array();\n\t\tforeach ($rows as $row) {\n\t\t\t$countries[] = new Country(\n\t\t\t\t$row['code'],\n\t\t\t\t$row['name']\n\t\t\t);\n\t\t}\n\n\t\treturn $countries;\n\t}", "function getCustomerEngRegion($customer_id)\n {\n /* @changes: intersect of region\n * @author: Sagar Jogi dt: 09/08/2017\n */\n $user=DB::query(\"SELECT r.region FROM \" . CFG::$tblPrefix . \"user AS r WHERE active='1' and r.id=%d\",$_SESSION['user_login']['id']);\n $cust=DB::query(\" SELECT c.region_id as cregion FROM \" . CFG::$tblPrefix . \"user_region AS c WHERE c.user_id=%d\",$customer_id);\n foreach($cust as $k=>$v){\n $abc.=$cust[$k]['cregion'].',';\n }\n $check=DB::query(\"SELECT all_region FROM \" . CFG::$tblPrefix . \"user WHERE id=%d\",$_SESSION['user_login']['id']);\n if($check[0]['all_region']=='1') {\n return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region r WHERE status='1' and FIND_IN_SET( r.id, '$abc') order by name asc\");\n } else {\n \n \n// pre($abc);exit;\n $userexp= explode(',',$user[0]['region']);\n $custexp= explode(',',$abc);\n \n// pre($cust);exit;\n $result=array_intersect($userexp,$custexp);\n $resimp= implode(',', $result);\n// pre($cust);exit;\n return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region AS r WHERE FIND_IN_SET( r.id, '$resimp')\"); \n }\n /*return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region AS r LEFT JOIN \" . CFG::$tblPrefix . \"user AS u ON FIND_IN_SET( r.id, u.region ) >0\nWHERE u.id =%d and u.active='1' and r.status='1'\",$customer_id); */\n \n }", "public function getCountries() {\n\n $countries = civicrm_api3('Address', 'Getoptions', [\n 'field' => 'country_id',\n ]);\n return $countries['values'];\n }", "protected function _getCountries()\n {\n return $options = $this->_getCountryCollection()\n ->setForegroundCountries($this->_getTopDestinations())\n ->toOptionArray();\n }" ]
[ "0.7903392", "0.7782696", "0.7662441", "0.76123255", "0.7608062", "0.75489277", "0.7529003", "0.74997705", "0.7449707", "0.73814595", "0.7333836", "0.7246486", "0.7168686", "0.7033201", "0.69006836", "0.6895331", "0.68423885", "0.68405896", "0.6831059", "0.68093216", "0.6801508", "0.6684878", "0.666801", "0.6636602", "0.66157115", "0.6611681", "0.6594956", "0.65929586", "0.6589433", "0.6574451", "0.6574244", "0.6571904", "0.65712136", "0.65703535", "0.6565743", "0.6559214", "0.65590066", "0.65481836", "0.6541982", "0.6526439", "0.65238655", "0.6519071", "0.6513745", "0.65099734", "0.6487449", "0.6487242", "0.6487", "0.647973", "0.6472099", "0.64685243", "0.64603484", "0.6459482", "0.64429516", "0.6441383", "0.64385", "0.6434257", "0.6412477", "0.64003265", "0.63921845", "0.63747466", "0.63665015", "0.6366322", "0.6364255", "0.6354704", "0.6354704", "0.6354704", "0.6353932", "0.6334197", "0.6317161", "0.63074833", "0.6297933", "0.62855756", "0.62755615", "0.6275031", "0.6264765", "0.62643415", "0.6263548", "0.6260285", "0.62575454", "0.6257318", "0.6256084", "0.6243696", "0.6238029", "0.623529", "0.6234468", "0.6228484", "0.6225648", "0.62242854", "0.62218297", "0.62144715", "0.6211583", "0.6201119", "0.6193925", "0.6188141", "0.6184895", "0.618422", "0.61764103", "0.6176104", "0.6175634", "0.61674654" ]
0.6872928
16
Find a state by id
public static function find($id) { return Doctrine::getTable ( 'Regions' )->findOneBy ( 'region_id', $id ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findStateById($id) {\n $state = State::find($id);\n\n $result = array();\n foreach (request()->session()->get('languages') as $lang => $language) {\n foreach($this->translatedAttributes as $field) {\n $result[$lang . '_' . $field] = $state->getTranslation($lang)->{$field};\n }\n }\n\n\n dd($state);\n\n return $state;\n }", "public static function find($id);", "public static function findById($id);", "public static function findById($id)\n\t{\n\t\n\t}", "public function getState($stateId);", "public static function findById($id)\n {\n }", "abstract public function find($id);", "public static function findIdentity($id)\r\n {\r\n return static::findOne(['id' => $id, 'status' => ACTIVE]);\r\n }", "function findById($id);", "function find($id);", "function findById($id)\n {\n }", "public function getState($id) {\n if (isset($this->state[$id])) {\n return $this->state[$id];\n }\n\n return NULL;\n }", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find( $id );", "public function findById($id) {\n \treturn $this->find($id)->current();\n }", "static public function find($id) {\n return static::getMapper()->find($id);\n }", "public function find(int $id) ;", "function particularstatelist($id)\n\t{\n\t\t$getParstates=\"SELECT * from states where id = $id\";\n\t\t$getParstatesdata = $this->get_results( $getParstates );\n\t\treturn $getParstatesdata;\n\t}", "public function getStateByID($stateID) {\n\t\t// Build query, prep, and bind\n\t\t$sql = \"SELECT * FROM states WHERE id = :stateID \";\n\t\t$statement = $this->PDODB->prepare($sql);\n\t\t$statement->bindValue(\":stateID\", $stateID);\n\n\t\t// Execute the query\n\t\t$statement->execute();\n\n\t\t// Fetch object\n\t\t$state = $statement->fetchObject();\n\t\t\n\t\treturn $state;\n\t}", "public function show($id)\n {\n //GET states/$id\n $state = State::find($id);\n\n return JSON_encode(compact('state'));\n }", "static function find($id) {\n return self::findBy(\"id\", $id);\n }", "public function getStateId();", "public function getStateId();", "public static function find($id) {\n\t\treturn self::find_by('id', $id);\n\t}", "public function findByID($id){\n return $this->Find(self::TABLE,$id);\n }", "public function findById ($id);", "public function find($id)\r\n {\r\n return $this->repository->find($id);\r\n }", "public function packingFind($id);", "public function find($id)\n\t{\n\t\t// TODO: Implement find() method.\n\t}", "public function getStateByField($id, $field_name)\n {\n return State::where($field_name, $id)->first();\n }", "public function find($id) {\n\t\treturn $this->academic_session->find($id);\n\t}", "public function find($id)\n {\n }", "public function find($id)\n {\n }", "public function find($id)\n {\n }", "public function findById ( $id )\n\t{\n\t\treturn $this->abstractFindById(self::RETURNTYPE,$id);\n\t}", "public static function findIdentity($id);", "public function find($id)\n {\n return $this->repo->find($id);\n }", "public function find($id)\n {\n return $this->repo->find($id);\n }", "public static function findIdentity($id)\n {\n return static::findOne(['id' => $id, 'status' => self::STATUS_ACTIVE]);\n }", "public static function findIdentity($id)\n {\n return static::findOne(['id' => $id, 'status' => self::STATUS_ACTIVE]);\n }", "public static function find($id, $key = 'id');", "public function find($id) {\n $data = $this->db->fetchAssoc(\"SELECT * FROM $this->table WHERE id = ?\", [ $id ]);\n return $data ? $this->build($data) : FALSE;\n }", "public function find($id)\n {\n return $this->service->find($id);\n }", "public function find($id)\n {\n $flagData = $this->db->fetchAssoc('SELECT * FROM flag WHERE flag_id = ?', array($id));\n return $flagData ? $this->buildflag($flagData) : FALSE;\n }", "public static function find($id) {\n return parent::find(__CLASS__, $id);\n }", "public static function find($id) {\n\t\t$regionDb = Yadda_Db_Table::getInstance('region');\n\t\t$select = $regionDb\n\t\t\t->select()\n\t\t\t->from('region')\n\t\t\t->where('status = ?', 'active')\n\t\t\t->where('id = ?', $id);\n\t\t$region = $regionDb->fetchRow($select);\n\t\tif ($region === null) {\n\t\t\tthrow new Yadda_Model_Exception('There is no region with the supplied ID.');\n\t\t}\n\t\treturn self::toArray($region);\n\t}", "public function actionGetstate($id)\n\t{\n\t\t$rows = \\app\\models\\State::find()->where(['state_country_id' => $id,'is_status'=>0])->all();\t \n\t\techo \"<option value=''>\".Yii::t('app', '--- Select State ---').\"</option>\";\t \n\t\tif(count($rows)>0){\n\t\t foreach($rows as $row){\n\t\t echo \"<option value='$row->state_id'>$row->state_name</option>\";\n\t\t }\n\t\t}\n\t\telse{\n\t\t echo \"\";\n\t\t} \n \t}", "public function find( $id )\n {\n return $this->getMapper()\n ->find( $id );\n }", "public function find( $id )\n {\n return $this->getMapper()\n ->find( $id );\n }", "public function find( $id )\n {\n return $this->getMapper()\n ->find( $id );\n }", "public function findEntity($id);", "public static function findIdentity($id)\n {\n // возвращает объект activerecord содержащий текущего пользователя.\n return static::findOne($id);\n //return static::findOne(['id' => $id, 'status' => self::STATUS_ACTIVE]);\n }", "public function find(int $id)\n {\n }", "public function find($id)\n {\n return $this->store->find($id);\n }", "public function find($id)\n {\n return $this->store->find($id);\n }", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public function findById($id);", "public static function getIdByName($state)\n {\n }", "public static function findIdentity($id)\n {\n // TODO: Implement findIdentity() method.\n return static::findOne(['id' => $id, 'status' => self::STATUS_ACTIVE]);\n }", "function findProperty($id);", "public function find($id)\n {\n return $this->getRepository()->find($id);\n }", "public function find($id)\n {\n return $this->getRepository()->find($id);\n }" ]
[ "0.6952702", "0.6849062", "0.6708004", "0.6674862", "0.6629438", "0.65590054", "0.65490085", "0.6543576", "0.6535497", "0.6529078", "0.6524736", "0.65186894", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.6517762", "0.65017855", "0.6467927", "0.645273", "0.6444966", "0.643913", "0.6418392", "0.64043057", "0.63882893", "0.6371088", "0.6371088", "0.63624406", "0.63319683", "0.6318446", "0.63045603", "0.6299352", "0.62912494", "0.62812996", "0.62528414", "0.62516123", "0.62516123", "0.62516123", "0.6251435", "0.6241828", "0.62228835", "0.62228835", "0.62215775", "0.62215775", "0.6215163", "0.62102807", "0.61850584", "0.6184149", "0.6183858", "0.61798924", "0.6179783", "0.61606836", "0.61606836", "0.61606836", "0.6147608", "0.6143348", "0.61409914", "0.6139245", "0.6139245", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6132577", "0.6130803", "0.6122981", "0.6115519", "0.61128825", "0.61128825" ]
0.629867
50
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401075", "0.8377201", "0.8377201", "0.8344036", "0.8253612", "0.824826", "0.8212931", "0.8146173", "0.81110245", "0.80821866", "0.7991871", "0.7990792", "0.79829323", "0.7959539", "0.79514205", "0.7949228", "0.7925649", "0.7915602", "0.7900597", "0.789401", "0.78905416", "0.78900814", "0.7860653", "0.784153", "0.784153", "0.7837333", "0.7824408", "0.7811713", "0.7809475", "0.77930796", "0.7786932", "0.77811307", "0.7781027", "0.7762589", "0.7754874", "0.771782", "0.771782", "0.7716963", "0.77135783", "0.7704182", "0.76933175", "0.7692517", "0.76914805", "0.7690911", "0.7674092", "0.7667445", "0.76653653", "0.7655474", "0.7650134", "0.76432997", "0.7643136", "0.76426333", "0.7634668", "0.7631141", "0.7629124", "0.76274264", "0.7620046", "0.7620046", "0.76134425", "0.7604216", "0.7603608", "0.76030916", "0.76030916", "0.7602084", "0.7600515", "0.75968313", "0.7587718", "0.7585746", "0.7581106", "0.7563173", "0.7554152", "0.7552851", "0.75510716", "0.7544145", "0.7543556", "0.75401926", "0.75379413", "0.7529233", "0.75155455", "0.75145584", "0.7499859", "0.7495578", "0.74946797", "0.7491706", "0.74881786", "0.7486718", "0.74794", "0.7478064", "0.7472763", "0.74716425", "0.7464693", "0.74643433", "0.7462231", "0.7462003", "0.74613416", "0.7449114", "0.74394757", "0.7434772", "0.7433077", "0.7431579", "0.7424624" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'firstName' => 'required|min:3|alpha', 'birthDate' => 'required|date', 'email' => 'required|email|unique:users,email', 'password' => 'required|min:6|confirmed', 'password_confirmation' => 'required|min:6', 'company' => 'required|array|min:1', 'company.*' => 'required|numeric', // 'lastName' => 'required|min:3|alpha', 'gender' => 'required|max:1|alpha', 'mobilePhoneNumber' => 'required|max:13|string', 'languageID' => 'required|max:2|alpha', 'role' => 'required|alpha' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Display a listing of the resource.
public function index() { $demandeurs = Demandeur::all(); $autorisations = AutorisationPassageSalle::orderByDesc('autorisation_passage_salles.created_at') ->join('demandeurs', 'autorisation_passage_salles.idDemandeur', '=', 'demandeurs.idDemandeur') ->get()->values(); return view('autorisationPassageSalle')->with('demandeurs',$demandeurs) ->with('autorisations',$autorisations); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1